API Reference

Overview

Laboratory Results are represented as an FHIR Diagnostic Report object. A diagnostic report is the set of information that is typically provided by a diagnostic service when investigations are complete. The information includes a mix of atomic results, text reports, images, and codes.

Each DiagnosticReport has next elements:

  • a status
  • a category code of ‘LAB’
  • a code (preferably a LOINC code) which tells you what is being measured
  • a patient
  • the diagnostically relevant time (known as the “effective time” and typically the time of specimen collection)
    when the report was released

Each DiagnosticReport supports next elements:

  • who issues the report
  • a result

Profile specific implementation guidance:

  • Additional codes that translate or map to the DiagnosticReport codes or category codes are allowed. For example:
    • providing both a local system codes and a LOINC code that it map to
    • providing a more specific category codes to the “LAB” category code, such as “CH” (chemistry), in an additional coding element.
  • Results that are free text or report form are represented using the ‘presentedForm’ element in DiagnosticReport.

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

USCore Data ElementFHIR Resource Field
statusObservation.status
categoryObservation.category
LOINC codeObservation.code
patientObservation.subject

Must support elements, mandatory and optional search parameters

DiagnosticReport must support these elements:

  • status
  • Slices for category
    -category:LaboratorySlice
  • code
  • subject
  • effectiveDateTime
  • issued
  • performer
  • result

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

The syntax used to describe the interactions is described here.

SHALL support searching for all DiagnosticReports for a patient using the patient search parameter:
GET [base url]/DiagnosticReport?patient={Type/}[id]

SHALL support searching for all DiagnosticReports for a patient using the patient and category search parameters:
GET [base url]/DiagnosticReport?patient={Type/}[id]&category=http://terminology.hl7.org/CodeSystem/v2-0074|LAB

SHALL support searching for all DiagnosticReports for a patient using the patient and code search parameters

  • including optional support for OR search on code (e.g.code={system|}[code],{system|}[code],...)
    GET [base url]/DiagnosticReport?patient={Type/}[id]&code={system|}[code],{system|}[code]

SHALL support searching for all DiagnosticReports for a patient and category and date search parameters

  • including support for these date comparators: gt,lt,ge,le
  • including optional support for AND search on date (e.g.date=[date]&date=[date])
    GET [base url]/DiagnosticReport?patient={Type/}[id]&category=http://terminology.hl7.org/CodeSystem/v2-0074|LAB&date={gt|lt|ge|le}[date]

The following search parameter combinations SHOULD be supported (optional):

SHOULD support searching using the combination of the patient and status search parameters:

  • including support for OR search on status (e.g.status={system|}[code],{system|}[code])
    GET [base url]/DiagnosticReport?patient={Type/}[id]&status={system|}[code],{system|}[code]

SHOULD support searching using the combination of the patient and code and date search parameters:

  • including optional support for OR search on code (e.g.code={system|}[code],{system|}[code],...)
  • including support for these date comparators: gt,lt,ge,le
  • including optional support for AND search on date (e.g.date=[date]&date=[date]&...)
    GET [base url]/DiagnosticReport?patient={Type/}[id]&code={system|}[code]{,{system|}[code],...}&date={gt|lt|ge|le}[date]

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

DiagnosticReport By Patient Id

Search for DiagnosticReport by patient.

METHOD GET

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

PARAMS
[base url] - FHIR base url
[id] - Id for the Patient

HEADERS

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

HeaderTypeRequired/OptionalValue
Authorizationstringrequired'Bearer'

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/DiagnosticReport?patient=Patient/c5137fa5-3216-b12a-cbbc-a0c6bef361g7' \
--header 'Authorization: Bearer fe1cd986-1ac7-4c26-b8b3-d632a48408fd'

DiagnosticReport By Id

Get DiagnosticReport by ID.

METHOD GET

[base url]/DiagnosticReport/{id}

or

[base url]/DiagnosticReport?_id={id}

PARAMS
[base url] - FHIR base url
{id} - Id for DiagnosticReport resource

HEADERS

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

HeaderTypeRequired/OptionalValue
Authorizationstringrequired'Bearer'

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/DiagnosticReport/c5137fa5-3216-b12a-cbbc-a0c6bef361g7' \
--header 'Authorization: Bearer fe1cd986-1ac7-4c26-b8b3-d632a48408fd'

DiagnosticReport by patient and category search parameters

Get DiagnosticReports using the combination of the patient and category search parameters:

METHOD GET

`GET [base url]/DiagnosticReport?patient={Type/}[id]&category=http://terminology.hl7.org/CodeSystem/v2-0074|LAB`

PARAMS
[base url] - FHIR base url
{Type} - Type for the Reference. Example: Patient
[id] - patient id

HEADERS

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

HeaderTypeRequired/OptionalValue
Authorizationstringrequired'Bearer'

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/DiagnosticReport?patient=Patient/fe1cd986-1ac7-4c26-b8b3-d632a48408fd&category=http://terminology.hl7.org/CodeSystem/v2-0074|LAB' \
--header 'Authorization: Bearer 1239b275-909e-4754-8f73-1e411fd6769e'

DiagnosticReport by patient and code search parameters

Get DiagnosticReports using the combination of the patient and code search parameters:

METHOD GET

`GET [base url]/DiagnosticReport?patient={Type/}[id]&code={system|}[code],{system|}[code]`

PARAMS
[base url] - FHIR base url
{Type} - Type for the Reference. Example: Patient
[id] - patient id
{system|} - an identity of the terminology system, used to specify DiagnosticReport code
[code] - DiagnosticReport code

HEADERS

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

HeaderTypeRequired/OptionalValue
Authorizationstringrequired'Bearer'

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/DiagnosticReport?patient=Patient/fe1cd986-1ac7-4c26-b8b3-d632a48408fd&code=http://loinc.org|24323-8 \
--header 'Authorization: Bearer 1239b275-909e-4754-8f73-1e411fd6769e'

DiagnosticReport by patient and category and date search parameters

Get DiagnosticReports using the combination of the patient and category and date search parameters

METHOD GET

`GET [base url]/DiagnosticReport?patient={Type/}[id]&category=http://terminology.hl7.org/CodeSystem/v2-0074|LAB&date={gt|lt|ge|le}[date]`

PARAMS
[base url] - FHIR base url
{Type} - Type for the Reference. Example: Patient
[id] - patient id
[date] - DiagnosticReport effective date

HEADERS

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

HeaderTypeRequired/OptionalValue
Authorizationstringrequired'Bearer'

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/DiagnosticReport?patient=Patient/fe1cd986-1ac7-4c26-b8b3-d632a48408fd&category=http://terminology.hl7.org/CodeSystem/v2-0074|LAB&date=ge2010-01-14T00:00:00Z\
--header 'Authorization: Bearer 1239b275-909e-4754-8f73-1e411fd6769e'

DiagnosticReport by patient and status search parameters

Get DiagnosticReports using the combination of the patient and status search parameters

METHOD GET

`GET [base url]/DiagnosticReport?patient={Type/}[id]&status={system|}[code],{system|}[code]`

PARAMS
[base url] - FHIR base url
{Type} - Type for the Reference. Example: Patient
[id] - patient id
{system|} - an identity of the terminology system, used to specify status
[code] - DiagnosticReport status

HEADERS

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

HeaderTypeRequired/OptionalValue
Authorizationstringrequired'Bearer'

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/DiagnosticReport?patient=Patient/fe1cd986-1ac7-4c26-b8b3-d632a48408fd&status=completed\
--header 'Authorization: Bearer 1239b275-909e-4754-8f73-1e411fd6769e'

DiagnosticReport by patient and code and date search parameters

Get DiagnosticReports using the combination of the patient and code and date search parameters

METHOD GET

`GET [base url]/DiagnosticReport?patient={Type/}[id]&code={system|}[code]{,{system|}[code],...}&date={gt|lt|ge|le}[date]`

PARAMS
[base url] - FHIR base url
{Type} - Type for the Reference. Example: Patient
[id] - patient id
[date] - DiagnosticReport effective date
{system|} - an identity of the terminology system, used to specify DiagnosticReport code
[code] - DiagnosticReport code

HEADERS

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

HeaderTypeRequired/OptionalValue
Authorizationstringrequired'Bearer'

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/DiagnosticReport?patient=Patient/fe1cd986-1ac7-4c26-b8b3-d632a48408fd&code=http://loinc.org|24323-8&date=ge2019-01-14T00:00:00Z\
--header 'Authorization: Bearer 1239b275-909e-4754-8f73-1e411fd6769e'