API Name: put-diagnostic-order


This API creates or updates a Diagnostic Order record representing a request for a diagnostic investigation, treatment, or operation to be performed for a patient. The ServiceRequest resource captures the order details including the service code, ordering and performing practitioners, reason, and body site.

Specification


Endpoint [baseurl]/ServiceRequest/$put-diagnostic-order
Protocol HTTPS
HTTP Method Post
HTTP Header Content-Type: application/fhir+json

Request Body

Remarks:

  • This is a type-level operation that operates on the ServiceRequest resource type.
  • The request body contains a single ServiceRequest resource. Provenance may be included as a contained resource referenced via relevantHistory.
  • ServiceRequest.identifier.system must be fixed to https://fhir.synapxe.sg/NamingSystem/order-no.
  • ServiceRequest.code uses a CodeableReference; provide the order code via code.concept (CodeableConcept).
  • ServiceRequest.bodySite.coding requires system, code, and display to all be present.
  • (All Slices) is an automatically generated section and should be ignored. Do not pass this as an input parameter. It will also not be part of response.

ServiceRequest

idΣ0..1id
metaΣ0..1Meta
implicitRulesΣ ?!0..1uri
language0..1codeBinding
textC0..1Narrative
ProvenanceC0..*Provenance
extensionC0..*Extension
modifierExtensionΣ ?! C0..*Extension
id0..0string
extensionC0..0Extension
useΣ ?!0..0codeBinding
typeΣ0..0CodeableConceptBinding
systemΣ1..1uriFixed Value
valueΣ C1..1string
periodΣ C0..0Period
assignerΣ C0..0Reference(Organization)
instantiatesCanonicalΣ0..0canonical(ActivityDefinition | PlanDefinition)
instantiatesUriΣ0..0uri
basedOnΣ C0..0Reference(CarePlan | MedicationRequest | ServiceRequest)
replacesΣ C0..0Reference(ServiceRequest)
requisitionΣ C0..0Identifier
statusΣ ?!1..1codeBinding
intentΣ ?!1..1codeBinding
categoryΣ0..0CodeableConcept
priorityΣ0..1codeBinding
doNotPerformΣ ?!0..0boolean
id0..0string
extensionC0..0Extension
id0..0string
extensionC0..0Extension
id0..0string
extensionC0..0Extension
systemΣ1..1uri
versionΣ0..1string
codeΣ C1..1code
displayΣ C1..1string
userSelectedΣ0..0boolean
textΣ0..0string
referenceΣ C0..1Reference
subjectΣ C1..1Reference(Patient)
focusΣ C0..0Reference(Resource)
encounterΣ C0..1Reference(Encounter)
occurrenceDateTimedateTime
asNeededBooleanboolean
asNeededCodeableConceptCodeableConcept
authoredOnΣ1..1dateTime
requesterΣ C1..1Reference(Practitioner)
performerTypeΣ0..0CodeableConcept
performerΣ C0..*Reference(Practitioner)
locationΣ0..0CodeableReference(Location)
id0..0string
extensionC0..0Extension
conceptΣ0..1CodeableConcept
referenceΣ C0..1Reference
insuranceC0..0Reference(ClaimResponse | Coverage)
supportingInfo0..0CodeableReference(Resource)
specimenΣ C0..0Reference(Specimen)
id0..0string
extensionC0..0Extension
id0..0string
extensionC0..0Extension
systemΣ1..1uri
versionΣ0..0string
codeΣ C1..1code
displayΣ C1..1string
userSelectedΣ0..0boolean
textΣ0..0string
bodyStructureΣ C0..0Reference(BodyStructure)
note0..*Annotation
id0..0string
extensionC0..0Extension
referenceΣ C1..1string
typeΣ0..0uriBinding
identifierΣ C0..0Identifier
displayΣ C0..0string
{
"resourceType": "ServiceRequest",
"meta": {
"profile": [
"https://fhir.synapxe.sg/StructureDefinition/profile-servicerequest"
]
},
{
"resourceType": "Provenance",
"id": "provenance-001",
"meta": {
"profile": [
"https://fhir.synapxe.sg/StructureDefinition/profile-provenance"
]
},
"target": [
{
"system": "https://fhir.synapxe.sg/NamingSystem/order-no",
"value": "ORD-2026-00567"
}
}
],
"recorded": "2026-02-20T11:00:00+08:00",
"agent": [
{
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/provenance-participant-type",
"code": "author",
"display": "Author"
}
]
},
"who": {
"type": "Practitioner",
"system": "https://fhir.synapxe.sg/NamingSystem/mcr",
"value": "M34567"
},
"display": "Dr. Tan Wei Ming"
}
}
]
}
],
{
"system": "https://fhir.synapxe.sg/NamingSystem/order-no",
"value": "ORD-2026-00567"
}
],
"status": "active",
"intent": "order",
"priority": "urgent",
"code": {
"concept": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77477000",
"display": "Computerized axial tomography"
}
],
"text": "CT Abdomen with contrast"
}
},
"subject": {
"type": "Patient",
"system": "https://fhir.synapxe.sg/NamingSystem/nric",
"value": "T1234567Z"
}
},
"type": "Encounter",
"system": "https://fhir.synapxe.sg/NamingSystem/eventID",
"value": "ENC-2026-11234"
}
},
"occurrenceDateTime": "2026-02-25T09:00:00+08:00",
"authoredOn": "2026-02-20T11:00:00+08:00",
"type": "Practitioner",
"system": "https://fhir.synapxe.sg/NamingSystem/mcr",
"value": "M34567"
},
"display": "Dr. Tan Wei Ming"
},
{
"type": "Practitioner",
"system": "https://fhir.synapxe.sg/NamingSystem/mcr",
"value": "M89012"
},
"display": "Dr. Lee Radiologist"
}
],
"reason": [
{
"concept": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "271442003",
"display": "Abdominal pain"
}
],
"text": "Acute abdominal pain with elevated inflammatory markers - rule out appendicitis"
}
}
],
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "818981001",
"display": "Abdomen"
}
]
}
],
"note": [
{
"type": "Practitioner",
"system": "https://fhir.synapxe.sg/NamingSystem/mcr",
"value": "M34567"
},
"display": "Dr. Tan Wei Ming"
},
"time": "2026-02-20T11:00:00+08:00",
"text": "Patient has known allergy to iodinated contrast. Please use low-osmolar contrast agent and follow pre-medication protocol. Clinical urgency - patient presenting with acute abdomen."
}
],
{
"reference": "#provenance-001"
}
]
}

Successful Response

idΣ0..1id
metaΣ0..1Meta
implicitRulesΣ ?!0..1uri
language0..1codeBinding
textC0..1Narrative
ProvenanceC0..*Provenance
extensionC0..*Extension
modifierExtensionΣ ?! C0..*Extension
id0..0string
extensionC0..0Extension
useΣ ?!0..0codeBinding
typeΣ0..0CodeableConceptBinding
systemΣ1..1uriFixed Value
valueΣ C1..1string
periodΣ C0..0Period
assignerΣ C0..0Reference(Organization)
instantiatesCanonicalΣ0..0canonical(ActivityDefinition | PlanDefinition)
instantiatesUriΣ0..0uri
basedOnΣ C0..0Reference(CarePlan | MedicationRequest | ServiceRequest)
replacesΣ C0..0Reference(ServiceRequest)
requisitionΣ C0..0Identifier
statusΣ ?!1..1codeBinding
intentΣ ?!1..1codeBinding
categoryΣ0..0CodeableConcept
priorityΣ0..1codeBinding
doNotPerformΣ ?!0..0boolean
id0..0string
extensionC0..0Extension
id0..0string
extensionC0..0Extension
id0..0string
extensionC0..0Extension
systemΣ1..1uri
versionΣ0..1string
codeΣ C1..1code
displayΣ C1..1string
userSelectedΣ0..0boolean
textΣ0..0string
referenceΣ C0..1Reference
subjectΣ C1..1Reference(Patient)
focusΣ C0..0Reference(Resource)
encounterΣ C0..1Reference(Encounter)
occurrenceDateTimedateTime
asNeededBooleanboolean
asNeededCodeableConceptCodeableConcept
authoredOnΣ1..1dateTime
requesterΣ C1..1Reference(Practitioner)
performerTypeΣ0..0CodeableConcept
performerΣ C0..*Reference(Practitioner)
locationΣ0..0CodeableReference(Location)
id0..0string
extensionC0..0Extension
conceptΣ0..1CodeableConcept
referenceΣ C0..1Reference
insuranceC0..0Reference(ClaimResponse | Coverage)
supportingInfo0..0CodeableReference(Resource)
specimenΣ C0..0Reference(Specimen)
id0..0string
extensionC0..0Extension
id0..0string
extensionC0..0Extension
systemΣ1..1uri
versionΣ0..0string
codeΣ C1..1code
displayΣ C1..1string
userSelectedΣ0..0boolean
textΣ0..0string
bodyStructureΣ C0..0Reference(BodyStructure)
note0..*Annotation
id0..0string
extensionC0..0Extension
referenceΣ C1..1string
typeΣ0..0uriBinding
identifierΣ C0..0Identifier
displayΣ C0..0string
{
"resourceType": "ServiceRequest",
"id": "ord-2026-00567",
"meta": {
"versionId": "1",
"lastUpdated": "2026-02-20T11:00:00.1+08:00",
"profile": [
"https://fhir.synapxe.sg/StructureDefinition/profile-servicerequest"
]
},
{
"resourceType": "Provenance",
"id": "provenance-001",
"meta": {
"profile": [
"https://fhir.synapxe.sg/StructureDefinition/profile-provenance"
]
},
"target": [
{
"system": "https://fhir.synapxe.sg/NamingSystem/order-no",
"value": "ORD-2026-00567"
}
}
],
"recorded": "2026-02-20T11:00:00+08:00",
"agent": [
{
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/provenance-participant-type",
"code": "author",
"display": "Author"
}
]
},
"who": {
"type": "Practitioner",
"system": "https://fhir.synapxe.sg/NamingSystem/mcr",
"value": "M34567"
},
"display": "Dr. Tan Wei Ming"
}
}
]
}
],
{
"system": "https://fhir.synapxe.sg/NamingSystem/order-no",
"value": "ORD-2026-00567"
}
],
"status": "active",
"intent": "order",
"priority": "urgent",
"code": {
"concept": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77477000",
"display": "Computerized axial tomography"
}
],
"text": "CT Abdomen with contrast"
}
},
"subject": {
"type": "Patient",
"system": "https://fhir.synapxe.sg/NamingSystem/nric",
"value": "T1234567Z"
}
},
"type": "Encounter",
"system": "https://fhir.synapxe.sg/NamingSystem/eventID",
"value": "ENC-2026-11234"
}
},
"occurrenceDateTime": "2026-02-25T09:00:00+08:00",
"authoredOn": "2026-02-20T11:00:00+08:00",
"type": "Practitioner",
"system": "https://fhir.synapxe.sg/NamingSystem/mcr",
"value": "M34567"
},
"display": "Dr. Tan Wei Ming"
},
{
"type": "Practitioner",
"system": "https://fhir.synapxe.sg/NamingSystem/mcr",
"value": "M89012"
},
"display": "Dr. Lee Radiologist"
}
],
"reason": [
{
"concept": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "271442003",
"display": "Abdominal pain"
}
],
"text": "Acute abdominal pain with elevated inflammatory markers - rule out appendicitis"
}
}
],
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "818981001",
"display": "Abdomen"
}
]
}
],
"note": [
{
"type": "Practitioner",
"system": "https://fhir.synapxe.sg/NamingSystem/mcr",
"value": "M34567"
},
"display": "Dr. Tan Wei Ming"
},
"time": "2026-02-20T11:00:00+08:00",
"text": "Patient has known allergy to iodinated contrast. Please use low-osmolar contrast agent and follow pre-medication protocol. Clinical urgency - patient presenting with acute abdomen."
}
],
{
"reference": "#provenance-001"
}
]
}

Business Level Errors


This section details the business level errors exposed by OperationOutcome resource for this operation. Refer to API Error Handling for framework level errors.

For illustration only

http status code code details.coding.code details.text
404 not-found E-10000 No matching patient found based on NRIC, Date of Birth and Gender
404 not-found E-10001 Institution code for organization is not found
404 not-found E-10002 Organization code is not found
400 business-rule E-10003 Patient is not currently enrolled to the organization
400 duplicate E-10004 An attempt was made to create a duplicate record
400 invalid E-10005 Invalid order identifier
400 invalid E-10006 Invalid order status