ServiceRequest

The FHIR R4 ServiceRequest resource represents a request for a clinical service to be performed. This includes lab tests, imaging, procedures, referrals, consults, and other services. It is commonly used to document orders initiated by clinicians as part of diagnostic or treatment workflows.

Use Cases

  • Order laboratory tests or radiology studies
  • Refer a patient to a specialist or external facility
  • Track the status of a service requested during an encounter

Base URLs

Authentication

All requests require OAuth 2.0 authentication using a Bearer Token. Unauthorized requests return 401 Unauthorized responses.

Required Scopes

  • servicerequest.read for GET
  • servicerequest.write for POST, PUT, DELETE

For more information, go to: OAuth 2.0 Authentication

Supported Methods

MethodOperationDescription
GETRead ServiceRequestRetrieves a specific ServiceRequest record by its FHIR ID.
GETSearch ServiceRequestSearches for ServiceRequest records associated with a patient.
POSTCreate ServiceRequestSubmits a new ServiceRequest record to the Health Gorilla FHIR server.
GETDownload ServiceRequest PDFRetrieves a PDF version of the ServiceRequest document, formatted for human-readable display.

Search Parameters

The Health Gorilla ServiceRequest endpoint represents referrals. That is why category must carry the SNOMED referral code, and why it is required for API versions from August 2022 onward.

ParameterRequiredDescription
categoryYes, for API versions from August 2022Must be the SNOMED referral code. No other value is accepted.
patientNoThe patient whose referrals you want, as Patient/{id}. You can also search by a patient identifier using patient.identifier.
statusNoFilters on the referral status.
_lastUpdatedNoFilters on when the record was last written in the Health Gorilla FHIR server. Accepts a comparison prefix, for example ge2025-01-01.
_offsetNoSkips the given number of results.
_countNoLimits the number of results returned per page.

The search also accepts _include=Referral:subject, _include=Referral:requester.agent, _include=Referral:requester.onBehalfOf, _include=Referral:recipient, and _include=Referral:supportingInfo. The Referral prefix reflects how Health Gorilla names the referral resource internally and is not a typo.

Resource Attributes

AttributeDescriptionExample ValuesFHIR Data TypeRequired
idUnique FHIR ID for the service requestservicerequest-98765idYes
statusCurrent status of the requestactivecodeYes
intentPurpose of the requestorder, plancodeYes
codeType of service being requestedLOINC or SNOMED CTCodeableConceptYes
subjectThe patient associated with the requestPatient/{id}Reference(Patient)Yes
requesterWho initiated the requestPractitioner/{id}, Organization/{id}ReferenceNo
performerIntended individual or organization to fulfill the orderOrganization/{id}, Practitioner/{id}Reference[]No
reasonCodeReason for the servicechest pain, screeningCodeableConcept[]No
occurrenceScheduled time for the service2024-01-15T09:00:00-07:00dateTimeNo
authoredOnDate the request was created2023-12-01T14:32:00-08:00dateTimeNo
noteAdditional notes or comments"Urgent referral requested"Annotation[]No

Webhooks

ServiceRequest records can trigger webhook notifications when new requests are submitted or existing requests are updated. These are useful for tracking pending services or orders that require action. For more information, go to: Webhooks and Polling

Error Handling

All ServiceRequest operations follow standard Health Gorilla error handling, including structured FHIR OperationOutcome responses. For more information, go to: Error Handling

Additional Resources