Overview

ServiceRequest is a record of a request for a procedure or diagnostic or other service to be planned, proposed, or performed, as distinguished by the ServiceRequest.intent field value, with or on a patient. The procedure will lead to either a Procedure or DiagnosticReport, which in turn may reference one or more Observations, which summarize the performance of the procedures and associated documentation such as observations, images, findings that are relevant to the treatment/management of the subject

Example Usage Scenarios:

The following are example usage scenarios for the this profile:

Query for a specific procedure or test request such as an electrocardiogram (ECG) order or a referral to a support program.
Query for a specific service offered to a patient such as a referral to a support program.
Query for category of service request (e.g. all cardiology requests)

Each Service Request has next elements:

  • a status
  • an intent code indicating whether the request is a proposal, plan, or order
  • a code defining what is being requested
  • a patient

Each Service Request must support:

  • a category
  • when requested service should happen
  • when request was made
  • the requester

Profile specific implementation guidance:

  • See the SDOH guidance page for more information when exchanging Social Determinants of Health (SDOH) Service Requests.
  • The ServiceRequest.category binding must support at a minimum the US Core ServiceRequest Category Codes. However, this valueset can be treated as extensible and other category codes can be used instead.
  • The ServiceRequest.code valueset is broad to accommodate a wide variety of use cases and should be constrained to a subset for a particular use case or domain. (for example, LOINC for laboratory orders.)

ServiceRequest 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

ServiceRequest must support these elements:

  • status
  • intent
  • Slices for category
    • category:us-core
  • code
  • subject
  • occurrence[x]
    • occurrencePeriod
  • authoredOn
  • requester

The following search parameters and search parameter combinations SHALL be supported (mandatory):

The syntax used to describe the interactions is described here.

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

SHALL support fetching a ServiceRequest using the _id search parameter:
GET [base url]/ServiceRequest[id]

SHALL support searching using the combination of the patient and category search parameters:
GET [base url]/ServiceRequest?patient={Type/}[id]&category={system|}[code]

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

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

SHALL support searching using the combination of the patient and category and authored search parameters:

  • including support for these authored comparators: gt,lt,ge,le
  • including optional support for AND search on authored (e.g. authored=[date]&authored=[date]]&...)
    GET [base url]/ServiceRequest?patient={Type/}[id]&category={system|}[code]&authored={gt|lt|ge|le}[date]{&authored={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]/ServiceRequest?patient={Type/}[id]&status={system|}[code]{,{system|}[code],...}

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

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

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

ServiceRequest by patient's id

Search for all ServiceRequests by patient.

METHOD GET

[base url]/ServiceRequest?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. Goto 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/ServiceRequest?patient=Patient/c5137fa5-3216-b12a-cbbc-a0c6bef361g7' \
--header 'Authorization: Bearer fe1cd986-1ac7-4c26-b8b3-d632a48408fd'

ServiceRequest By id

Get ServiceRequest by ID.

METHOD GET

[base url]/ServiceRequest/{id}

or

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

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

HEADERS

The Authorization token SHALL be obtained during Authentication and Authorization process. Goto 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/ServiceRequest/c5137fa5-3216-b12a-cbbc-a0c6bef361g7' \
--header 'Authorization: Bearer fe1cd986-1ac7-4c26-b8b3-d632a48408fd'

ServiceRequest by patient and category

Get All ServiceRequests by Patient and Category.

METHOD GET

GET [base url]/ServiceRequest?patient={Type/}[id]&category={system|}[code]

PARAMS
[base url] - FHIR base url
{Type/} - optional reference type. Example: Patient/
[id] - Id for the Patient
{system|} - The system for the category, e.g. http://loinc.org
{code} - code in the system, e.g. sdoh

HEADERS

The Authorization token SHALL be obtained during Authentication and Authorization process. Goto 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/ServiceRequest?patient=Patient/c5137fa5-3216-b12a-cbbc-a0c6bef361g7&category=http://loinc.org|sdoh' \
--header 'Authorization: Bearer fe1cd986-1ac7-4c26-b8b3-d632a48408fd'

ServiceRequest By patient and code

Get All ServiceRequests by Patient and Code.

METHOD GET

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

PARAMS
[base url] - FHIR base url
{Type/} - optional reference type. Example: Patient/
[id] - Id for the Patient
{system|} - The system for the ServiceRequest code, e.g. http://snomed.info/sct
{code} - code in the system, e.g. 35637008

HEADERS

The Authorization token SHALL be obtained during Authentication and Authorization process. Goto 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/ServiceRequest?patient=Patient/c5137fa5-3216-b12a-cbbc-a0c6bef361g7&code=http://snomed.info/sct|35637008' \
--header 'Authorization: Bearer fe1cd986-1ac7-4c26-b8b3-d632a48408fd'

ServiceRequest by patient and category and authored

Get all ServiceRequests for the specified patient and category and date of authoring

METHOD GET

GET [base url]/ServiceRequest?patient={Type}/[id]&category={system|}[code]&authored={gt|lt|ge|le}{date}&authored={gt|lt|ge|le}{date}

PARAMS
[base url] - FHIR base url
{Type/} - optional reference type. Example: Patient/
[id] - patient id
{system|} - The system for the category, e.g. http://loinc.org
{code} - code in the system, e.g. sdoh
{authored} - an estimated or actual date, when the ServiceRequest signed
{gt|lt|ge|le} - search modifiers for date parameter. See Search specification for more information.

HEADERS

The Authorization token SHALL be obtained during Authentication and Authorization process. Goto 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/ServiceRequest?patient=Patient/fe1cd986-1ac7-4c26-b8b3-d632a48408fd&category=http://loinc.org|sdoh&date=ge2019-01-14' \
--header 'Authorization: Bearer 1239b275-909e-4754-8f73-1e411fd6769e'

ServiceRequest by patient and code and authored

Get all ServiceRequests for the specified patient and ServiceRequest code and date of authoring

METHOD GET

GET [base url]/ServiceRequest?patient={Type}/[id]&code={system|}[code]&authored={gt|lt|ge|le}{date}&authored={gt|lt|ge|le}{date}

PARAMS
[base url] - FHIR base url
{Type/} - optional reference type. Example: Patient/
[id] - patient id
{system|} - The system for the category, e.g. http://snomed.info/sct
{code} - code in the system, e.g. 35637008
{authored} - an estimated or actual date, when the ServiceRequest signed
{gt|lt|ge|le} - search modifiers for date parameter. See Search specification for more information.

HEADERS

The Authorization token SHALL be obtained during Authentication and Authorization process. Goto 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/ServiceRequest?patient=Patient/fe1cd986-1ac7-4c26-b8b3-d632a48408fd&code=http://snomed.info/sct|35637008&date=ge2019-01-14' \
--header 'Authorization: Bearer 1239b275-909e-4754-8f73-1e411fd6769e'

ServiceRequest by patient and status

Get all ServiceRequests for the specified patient and status

METHOD GET

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

PARAMS
[base url] - FHIR base url
{Type/} - optional reference type. Example: Patient/
[id] - patient id
{system|} - The system for the code (optional)
{code} - code in the system, e.g. completed

HEADERS

The Authorization token SHALL be obtained during Authentication and Authorization process. Goto 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/ServiceRequest?patient=Patient/fe1cd986-1ac7-4c26-b8b3-d632a48408fd&status=completed' \
--header 'Authorization: Bearer 1239b275-909e-4754-8f73-1e411fd6769e'