ServiceRequest Resource
The FHIR ServiceRequest resource is used to represent a request for a healthcare service or procedure. Within AdvaPACS, a ServiceRequest represents an imaging order. It contains the information needed to identify and schedule the requested procedure, including the patient, procedure, modality, accession number, and other order identifiers.
For full information on the ServiceRequest resource, please refer to the FHIR standard.
Supported Transactions
AdvaPACS supports the following transactions for the ServiceRequest resource:
| Function | Method | Endpoint | Description |
|---|---|---|---|
| Get ServiceRequest | GET | /ServiceRequest/{id} | Retrieves a specific ServiceRequest resource by its logical ID. |
| Search ServiceRequests | GET | /ServiceRequest | Searches for ServiceRequest resources using one or more supported search parameters. |
| Create ServiceRequest | POST | /ServiceRequest | Creates a new ServiceRequest resource. |
| Update ServiceRequest | PUT | /ServiceRequest/{id} | Updates an existing ServiceRequest resource. |
| Patch ServiceRequest | PATCH | /ServiceRequest/{id} | Partially updates an existing ServiceRequest resource. |
Supported Fields
AdvaPACS supports the following attributes for the ServiceRequest resource. The exact attributes returned may vary depending on the features enabled for the tenant, such as Assigning Authorities or Organisations & Sites.
{
"fullUrl":"/fhir/ServiceRequest/1c38c9ae-d539-4f7d-ba23-4987d51794fc",
"resource":{
"resourceType":"ServiceRequest",
"id":"1c38c9ae-d539-4f7d-ba23-4987d51794fc",
"identifier":[
{
"type":{
"coding":[
{
"system":"http://terminology.hl7.org/CodeSystem/v2-0203",
"code":"ACSN"
}
]
},
"system":"https://sgp.api.integration.advapacs.com/fhir/NamingSystem/c4f90af7-743f-4c02-9d5c-ce5850867f8d",
"value":"1234"
},
{
"system":"urn:dicom:uid",
"value":"1.2.3.4"
},
{
"type":{
"coding":[
{
"system":"http://terminology.hl7.org/CodeSystem/v2-0203",
"code":"PLAC"
}
]
},
"system":"https://sgp.api.integration.advapacs.com/fhir/NamingSystem/016a56eb-87ce-4323-9d2b-f9c36ae6672e",
"value":"1234"
},
{
"type":{
"coding":[
{
"system":"http://terminology.hl7.org/CodeSystem/v2-0203",
"code":"FILL"
}
]
},
"system":"https://sgp.api.integration.advapacs.com/fhir/NamingSystem/605434a1-5000-4711-925f-ddbf5ebc19a0",
"value":"1234"
},
{
"type":{
"coding":[
{
"system":"http://terminology.hl7.org/CodeSystem/v2-0203",
"code":"VN"
}
]
},
"system":"https://sgp.api.integration.advapacs.com/fhir/NamingSystem/1d1ebfe9-b6c0-4f1d-9c39-64fff26c582b",
"value":"1234"
},
{
"type":{
"text":"Scheduled Procedure Step ID"
},
"value":"1234"
},
{
"type":{
"text":"Requested Procedure ID"
},
"value":"1234"
}
],
"requisition":{
"type":{
"coding":[
{
"system":"http://terminology.hl7.org/CodeSystem/v2-0203",
"code":"PGN"
}
]
},
"system":"https://sgp.api.integration.advapacs.com/fhir/NamingSystem/5723970f-152f-4b26-adc0-a83373e29d7e",
"value":"1234"
},
"status":"active",
"intent":"order",
"code":{
"coding":[
{
"system":"http://loinc.org",
"code":"36554-4",
"display":"XR Chest Single view"
}
]
},
"subject":{
"reference":"Patient/732a7d3c-de13-49ac-a311-c2cf00949610"
},
"orderDetail":[
{
"parameter":[
{
"code":{
"coding":[
{
"system":"http://advapacs.com/fhir/servicerequest-orderdetail-parameter-code",
"code":"modality"
}
]
},
"valueString":"CT"
},
{
"code":{
"coding":[
{
"system":"http://advapacs.com/fhir/servicerequest-orderdetail-parameter-code",
"code":"requested-procedure-description"
}
]
},
"valueString":"CT Brain"
},
{
"code":{
"coding":[
{
"system":"http://advapacs.com/fhir/servicerequest-orderdetail-parameter-code",
"code":"requested-procedure-code"
}
]
},
"valueCodeableConcept":{
"coding":[
{
"code":"CTBRAIN",
"display":"CT Brain"
}
]
}
},
{
"code":{
"coding":[
{
"system":"http://advapacs.com/fhir/servicerequest-orderdetail-parameter-code",
"code":"scheduled-protocol-code"
}
]
},
"valueCodeableConcept":{
"coding":[
{
"code":"CTBRAINC",
"display":"CT Brain with Contrast"
}
]
}
}
]
}
],
"occurrenceDateTime":"2023-03-30T00:00:00+00:00",
"requester":{
"reference":"Practitioner/6e6a1f7d-73e1-4fb1-b8b8-bd3da26d0672"
},
"performer":[
{
"reference":"Organization/8e6f3507-de7c-41ed-91c8-b1b5a8df0df5"
},
{
"reference":"Device/1ac413bf-17b1-4360-8d1f-f4ce4d0d4bca"
}
],
"locationReference":[
{
"reference":"Location/fee9e386-3784-478f-88ec-1c7dfd58efee"
}
]
}
}
Examples
The following examples show how to create, retrieve, search, update, and patch ServiceRequest resources using the AdvaPACS FHIR API. These examples demonstrate common operations for working with imaging orders in AdvaPACS.
Get a ServiceRequest
A specific ServiceRequest can be retrieved using the logical ID assigned to the resource. The response contains the details of the corresponding imaging order.
GET /fhir/R5/ServiceRequest/[ServiceRequest_ID]
Authorization: ID=<ApiId>,Secret=<ApiSecret>
Accept: application/fhir+json
Host: <FhirEndpoint>
For example, to retrieve a ServiceRequest with logical ID 3bdbfdd2-f83e-4d17-9b5c-4dd6c4c12345:
GET /fhir/R5/ServiceRequest/3bdbfdd2-f83e-4d17-9b5c-4dd6c4c12345
Authorization: ID=<ApiId>,Secret=<ApiSecret>
Accept: application/fhir+json
Host: <FhirEndpoint>
A successful request returns the requested ServiceRequest resource:
{
"resourceType": "ServiceRequest",
"id": "3bdbfdd2-f83e-4d17-9b5c-4dd6c4c12345",
"status": "active",
"intent": "order",
"identifier": [
{
"type": {
"coding": [
{
"code": "ACSN"
}
]
},
"value": "ACC-123456"
}
],
"subject": {
"reference": "Patient/1001"
},
"code": {
"concept": {
"text": "CT Chest"
}
}
}
Search ServiceRequests
ServiceRequest resources can be searched using one or more supported search parameters. Multiple parameters can be combined to narrow the results returned by the FHIR API. The following search parameters are supported:
| Parameter | Description | Example |
|---|---|---|
_id | Search by the logical FHIR resource ID. | ?_id=3bdbfdd2-f83e-4d17-9b5c-4dd6c4c12345 |
identifier | Search by an order identifier, such as an accession number. | ?identifier=ACC-123456 |
patient | Search for ServiceRequests associated with a specific Patient. | ?patient=Patient/1001 |
status | Search by the current status of the ServiceRequest. | ?status=active |
requester | Search by the Practitioner or Organization that requested the procedure. | ?requester=Practitioner/123 |
occurrence | Search by the date on which the requested procedure is scheduled to occur. | ?occurrence=2026-08-31 |
scheduled-procedure-step-id | Search by the Scheduled Procedure Step ID associated with the order. | ?scheduled-procedure-step-id=SPS12345 |
requested-procedure-id | Search by the Requested Procedure ID associated with the order. | ?requested-procedure-id=RP12345 |
For example, to search for a ServiceRequest by accession number:
GET /fhir/R5/ServiceRequest?identifier=ACC-123456
Authorization: ID=<ApiId>,Secret=<ApiSecret>
Accept: application/fhir+json
Host: <FhirEndpoint>
A successful search returns a FHIR Bundle containing the matching ServiceRequest resources:
{
"resourceType": "Bundle",
"type": "searchset",
"total": 1,
"entry": [
{
"resource": {
"resourceType": "ServiceRequest",
"id": "3bdbfdd2-f83e-4d17-9b5c-4dd6c4c12345",
"status": "active",
"intent": "order",
"identifier": [
{
"type": {
"coding": [
{
"code": "ACSN"
}
]
},
"value": "ACC-123456"
}
],
"subject": {
"reference": "Patient/1001"
}
}
}
]
}
Create a ServiceRequest
A new ServiceRequest can be created by sending a FHIR ServiceRequest resource to the /ServiceRequest endpoint. The request contains the information required to create the imaging order, including the patient, accession number, requested procedure, modality, and scheduled date and time.
POST /fhir/R5/ServiceRequest
Authorization: ID=<ApiId>,Secret=<ApiSecret>
Content-Type: application/fhir+json
Accept: application/fhir+json
Host: <FhirEndpoint>
For example, the following request creates a new ServiceRequest for a CT head procedure:
{
"resourceType": "ServiceRequest",
"identifier": [
{
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "ACSN"
}
]
},
"system": "https://example.com/fhir/R5/NamingSystem/accession-number",
"value": "AUTOTEST",
"assigner": {
"reference": "Organization/3588f973-8bb0-4133-9296-77aa49441eb2"
}
},
{
"system": "urn:dicom:uid",
"value": "urn:oid:1.2.3.4.5.6"
},
{
"type": {
"text": "Scheduled Procedure Step ID"
},
"value": "1"
}
],
"status": "active",
"intent": "order",
"code": {
"concept": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "303653007",
"display": "Computed tomography of head"
}
]
}
},
"orderDetail": [
{
"parameter": [
{
"code": {
"coding": [
{
"system": "http://dicom.nema.org/resources/ontology/DCM",
"code": "CT"
}
]
}
}
]
}
],
"subject": {
"reference": "Patient/da8fd5ab-a47a-47f8-9b59-3748b260228b"
},
"occurrenceDateTime": "2026-08-31T09:30:00+12:00"
}
The subject must reference the Patient associated with the imaging order. Identifiers can be used to provide the accession number, Study Instance UID, Scheduled Procedure Step ID, and other identifiers associated with the order.
A successful request creates the ServiceRequest and returns the created resource, including the logical id assigned by AdvaPACS.
Patch a ServiceRequest
An existing ServiceRequest can be partially updated using a FHIR PATCH request. This allows individual fields to be changed without replacing the entire resource. For example, the following request updates the status of a ServiceRequest to complete:
PATCH /fhir/R5/ServiceRequest/[ServiceRequest_ID]
Authorization: ID=<ApiId>,Secret=<ApiSecret>
Content-Type: application/json-patch+json
Accept: application/fhir+json
Host: <FhirEndpoint>
The request body contains the JSON Patch operation to apply:
[
{
"op": "replace",
"path": "/status",
"value": "complete"
}
]
This can be used to cancel, complete, or otherwise update the lifecycle state of an imaging order without replacing the full ServiceRequest resource.