API Reference

Specimen Information

Overview

Specimen Information addresses:

The Specimen resource describes a sample of a physical substance collected from a patient for laboratory analysis, diagnostic testing, or other purposes. This profile meets the U.S. Core Data for Interoperability (USCDI) v3 requirements for Specimen Information.

Specimens can include blood, urine, tissue samples, swabs, and other biological materials collected for testing. The Specimen resource provides information about what was collected, how it was collected, when it was collected, and its current status.

Each Specimen Must Have:

  • a specimen code

Each Specimen Must Support:

  • a patient

Profile Specific Implementation Guidance:

  • Since the binding is extensible when a code is unavailable, just text is allowed.
  • in addition to Specimen search criteria, clients may request Specimen resources be included with Observation or DiagnosticReport resource query. An example query is provided in the Notes section below.

This resource conforms to USCDI v3 for Specimen - refers to US Core Specimen Profile 6.1.0. Specimen response will be provided in JSON (refers to Capability Statement) format as per FHIR standard R4 version.

Must support elements, mandatory and optional search parameters

Specimen must support these elements:

  • type
  • subject

Each Specimen Must Have (Mandatory):

  • type

The following search parameters and search parameter combinations SHALL be supported:

The syntax used to describe the interactions is described here.

SHALL support both read Specimen by id AND Specimen search using the _id search parameter:

GET [base url]/Specimen/[id]

GET [base url]/Specimen?_id=[id]

The following search parameter combinations SHOULD be supported:

SHOULD support searching using the patient search parameter:

GET [base url]/Specimen?patient={Type/}[id]

The response to any search operation is always a list of resources in a Bundle or an Operation Outcome.

The following search parameter combinations MAY be supported:

MAY support searching for Observation resources that reference a Specimen using the _include parameter:

GET [base url]/[Resource-type]?_id=[id]&_include=Observation:specimen

The response to any search operation is always a list of resources in a Bundle or an Operation Outcome.

Specimen by ID

Read a single Specimen resource by its ID.

METHOD GET

GET [base url]/Specimen/[id]

PARAMS [base url] * FHIR base url [id] - Specimen's id

HEADERS

The Authorization token SHALL be obtained during Authentication and Authorization process. Goto Authentication and Authorization for further details.

HeaderTypeRequired/OptionalValue
AuthorizationstringrequiredBearer <token>

RESPONSES

CodeDescriptionComment
200OKThe request was processed successfully
400Bad requestInvalid request parameters or FHIR operation outcome resource returned
401UnauthorizedThis code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource
404no Route matched with those valuesThe request was able to communicate with a given server, but the server could not find what was requested
500Internal Server ErrorThe server has encountered a situation it doesn't know how to handle

EXAMPLE:

curl --location --request GET 'https://sandbox.fhir.elationemr.com/fhir/Specimen/specimen-123' \
--header 'Authorization: Bearer fe1cd986-1ac7-4c26-b8b3-d632a48408fd'

Specimen Search by ID

Search for Specimen using the _id search parameter.

METHOD GET

GET [base url]/Specimen?_id=[id]

PARAMS [base url] - FHIR base url [id] - Specimen's id

HEADERS

The Authorization token SHALL be obtained during Authentication and Authorization process. Goto Authentication and Authorization for further details.

HeaderTypeRequired/OptionalValue
AuthorizationstringrequiredBearer <token>

RESPONSES

CodeDescriptionComment
200OKThe request was processed successfully
400Bad requestInvalid request parameters or FHIR operation outcome resource returned
401UnauthorizedThis code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource
404no Route matched with those valuesThe request was able to communicate with a given server, but the server could not find what was requested
500Internal Server ErrorThe server has encountered a situation it doesn't know how to handle

The response to any search operation is always a list of resources in a Bundle or an Operation Outcome.

EXAMPLE:

curl --location --request GET 'https://sandbox.fhir.elationemr.com/fhir/Specimen?_id=specimen-123' \
--header 'Authorization: Bearer fe1cd986-1ac7-4c26-b8b3-d632a48408fd'

Specimen by Patient

Search for Specimen using the patient parameter.

METHOD GET

GET [base url]/Specimen?patient={Type/}[id]

PARAMS [base url] - FHIR base url {Type/} - Reference type for the patient resource. Example: Patient/ [id] - Patient's id

HEADERS

The Authorization token SHALL be obtained during Authentication and Authorization process. Goto Authentication and Authorization for further details.

HeaderTypeRequired/OptionalValue
AuthorizationstringrequiredBearer <token>

RESPONSES

CodeDescriptionComment
200OKThe request was processed successfully
400Bad requestInvalid request parameters or FHIR operation outcome resource returned
401UnauthorizedThis code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource
404no Route matched with those valuesThe request was able to communicate with a given server, but the server could not find what was requested
500Internal Server ErrorThe server has encountered a situation it doesn't know how to handle

The response to any search operation is always a list of resources in a Bundle or an Operation Outcome.

EXAMPLE:

curl --location --request GET 'https://sandbox.fhir.elationemr.com/fhir/Specimen?patient=Patient/05b87542-b50e-4f19-8a87-2da2e6959bfb' \
--header 'Authorization: Bearer fe1cd986-1ac7-4c26-b8b3-d632a48408fd'

Observation with Included Specimen

Search for Observation resources with included Specimen references.

METHOD GET

GET [base url]/Observation?_id=[id]&_include=Observation:specimen

PARAMS [base url] - FHIR base url [id] - Observation's id _include - Include related Specimen resources in the response bundle

HEADERS

The Authorization token SHALL be obtained during Authentication and Authorization process. Goto Authentication and Authorization for further details.

HeaderTypeRequired/OptionalValue
AuthorizationstringrequiredBearer <token>

RESPONSES

CodeDescriptionComment
200OKThe request was processed successfully
400Bad requestInvalid request parameters or FHIR operation outcome resource returned
401UnauthorizedThis code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource
404no Route matched with those valuesThe request was able to communicate with a given server, but the server could not find what was requested
500Internal Server ErrorThe server has encountered a situation it doesn't know how to handle

The response to any search operation is always a list of resources in a Bundle or an Operation Outcome.

EXAMPLE:

curl --location --request GET 'https://sandbox.fhir.elationemr.com/fhir/Observation?_id=9163726&_include=Observation:specimen' \
--header 'Authorization: Bearer fe1cd986-1ac7-4c26-b8b3-d632a48408fd'