RDC Interoperability Guide
1.2.2

Search MedicationAdministration (Insulin) by parameters

A client can search for insulin MedicationAdministration resources by using the GET method on the server's MedicationAdministration endpoint with the query parameters below.

Supported codes

  • 67866001_short_acting (short-acting insulin)
  • 67866001_long_acting (long-acting insulin)

Codes are provided in medication.concept.coding.code using the system https://roche.com/fhir/iop/cs (see examples below).

Query Parameters

Parameter Description Required
subject External Patient id true
code Code to search for (see list above) true
date Administration occurrence date/time range (applies to occurenceDateTime) (see validation below) either date or _lastUpdated
_lastUpdated Last updated timestamp range (Resource.meta.lastUpdated) (see validation below) either date or _lastUpdated

subject parameter

The subject parameter MUST be provided with the external Patient id of the patient whose Medication Administration are being queried. The patient id must follow the FHIR specified format for id

Date / _lastUpdated validation

Rules (applied independently to each provided time-range parameter):

  1. Provide exactly two repeated parameters: first with ge, second with le (e.g. date=ge...&date=le...).
  2. Format: [ge|le]yyyy-MM-ddTHH:MM:SS[+|-]HH:MM.
  3. Start instant must be earlier than end instant.
  4. Maximum supported span is 90 days.

Either date or _lastUpdated MUST be present; both MAY be present.

Examples

Search short-acting insulin administrations

curl -sS "https://${server}/${basePath}/MedicationAdministration?subject=${patient_id}&code=67866001_short_acting&date=ge2024-09-01T00%3A00%3A00Z&date=le2024-09-14T00%3A00%3A00Z" \
  -H "client_id: ${client_id}" \
  -H "client_secret: ${client_secret}" \
  -H "org_id: ${org_id}" \
  -H "certificate: ${certificate}" | jq

This request searches for MedicationAdministration (code 67866001_short_acting) for the patient with the ID patient_id whose effective date time is greater than 2024-09-01T00:00:00 and less than 2024-09-14T00:00:00. The Response observations are sorted in ascending order of date.

Below is the response for MedicationAdministration search result for a given external patient ID. The search result contains 4 MedicationAdministration collected between time period 22/10/2025 02:00:00 and 30/10/2025 02:15:00 at an interval of 5 minutes apart.

{
"resourceType": "Bundle",
"id": "rdc-Bundle-R5-ShortActing-MedAdministration-Search-Result",
"type": "searchset",
"link": [
{
"relation": "self",
"url": "/fhir/r5/api/MedicationAdministration?date&subject=12345&code=67866001_short_acting"
}
],
"entry": [
{
"fullUrl": "urn:uuid:c64fea3a-3dbd-4ba0-866a-61ab622a32f8",
"resourceType": "MedicationAdministration",
"id": "cf.insulin.o.235bded9db344925b3c0d35932a0cbaf",
"meta": {
"versionId": "1761565293580",
"lastUpdated": "2025-10-27T11:41:33.580+00:00",
"profile": [
"https://roche.com/fhir/iop/StructureDefinition/rdc-MedicationAdministration"
]
},
"status": "completed",
"concept": {
"coding": [
{
"system": "https://roche.com/fhir/iop/cs",
"code": "67866001_short_acting",
"display": "67866001_short_acting"
}
]
}
},
"subject": {
"reference": "Patient/12345"
},
"occurenceDateTime": "2025-10-27T11:41:14+00:00",
"dosage": {
"dose": {
"value": 32,
"unit": "[iU]",
"system": "http://unitsofmeasure.org",
"code": "[iU]"
}
}
},
"search": {
"mode": "match"
}
},
{
"fullUrl": "urn:uuid:f2c6daec-dade-453d-86be-3cf1a79c2c3a",
"resourceType": "MedicationAdministration",
"id": "cf.insulin.o.3b1565863f4a4f2d9a35851937c1f2bf",
"meta": {
"versionId": "1761232434934",
"lastUpdated": "2025-10-23T15:13:54.934+00:00",
"profile": [
"https://roche.com/fhir/iop/StructureDefinition/rdc-MedicationAdministration"
]
},
"status": "completed",
"concept": {
"coding": [
{
"system": "https://roche.com/fhir/iop/cs",
"code": "67866001_short_acting",
"display": "67866001_short_acting"
}
]
}
},
"subject": {
"reference": "Patient/12345"
},
"occurenceDateTime": "2025-10-23T15:13:06+00:00",
"dosage": {
"dose": {
"value": 12,
"unit": "[iU]",
"system": "http://unitsofmeasure.org",
"code": "[iU]"
}
}
},
"search": {
"mode": "match"
}
},
{
"fullUrl": "urn:uuid:b96f01d3-0c50-4dc6-a44b-ba8084002e11",
"resourceType": "MedicationAdministration",
"id": "cf.insulin.o.4bf3b65b85f84149a4dc6370685d557e",
"meta": {
"versionId": "1761332371366",
"lastUpdated": "2025-10-24T18:59:31.366+00:00",
"profile": [
"https://roche.com/fhir/iop/StructureDefinition/rdc-MedicationAdministration"
]
},
"status": "completed",
"concept": {
"coding": [
{
"system": "https://roche.com/fhir/iop/cs",
"code": "67866001_short_acting",
"display": "67866001_short_acting"
}
]
}
},
"subject": {
"reference": "Patient/12345"
},
"occurenceDateTime": "2025-10-24T18:59:13+00:00",
"dosage": {
"dose": {
"value": 22,
"unit": "[iU]",
"system": "http://unitsofmeasure.org",
"code": "[iU]"
}
}
},
"search": {
"mode": "match"
}
}
]
}

Search long-acting insulin administrations using lastUpdated

curl -sS "https://${server}/${basePath}/MedicationAdministration?subject=${patient_id}&code=67866001_long_acting&_lastUpdated=ge2025-09-01T00%3A00%3A00Z&_lastUpdated=le2025-09-02T00%3A00%3A00Z" \
  -H "client_id: ${client_id}" \
  -H "client_secret: ${client_secret}" \
  -H "org_id: ${org_id}" \
  -H "certificate: ${certificate}" | jq

This request searches for MedicationAdministration (code 67866001_long_acting) for the patient with the ID patient_id whose last updated time is greater than 2025-09-01T00:00:00 and less than 2025-09-02T00:00:00. The Response observations are sorted in ascending order of date.

Below is the response for MedicationAdministration search result for a given external patient ID. The search result contains 4 MedicationAdministration collected between time period 22/10/2025 02:00:00 and 30/10/2025 02:15:00 at an interval of 5 minutes apart.

{
"resourceType": "Bundle",
"id": "rdc-Bundle-R5-LongActing-MedAdministration-Search-Result",
"type": "searchset",
"link": [
{
"relation": "self",
"url": "/fhir/r5/api/MedicationAdministration?date&subject=12345&code=67866001_long_acting"
}
],
"entry": [
{
"fullUrl": "urn:uuid:c64fea3a-3dbd-4ba0-866a-61ab622a32f8",
"resourceType": "MedicationAdministration",
"id": "cf.insulin.o.235bded9db344925b3c0d35932a0cbaf",
"meta": {
"versionId": "1761565293580",
"lastUpdated": "2025-10-27T11:41:33.580+00:00",
"profile": [
"https://roche.com/fhir/iop/StructureDefinition/rdc-MedicationAdministration"
]
},
"status": "completed",
"concept": {
"coding": [
{
"system": "https://roche.com/fhir/iop/cs",
"code": "67866001_long_acting",
"display": "67866001_long_acting"
}
]
}
},
"subject": {
"reference": "Patient/12345"
},
"occurenceDateTime": "2025-10-27T11:41:14+00:00",
"dosage": {
"dose": {
"value": 32,
"unit": "[iU]",
"system": "http://unitsofmeasure.org",
"code": "[iU]"
}
}
},
"search": {
"mode": "match"
}
},
{
"fullUrl": "urn:uuid:f2c6daec-dade-453d-86be-3cf1a79c2c3a",
"resourceType": "MedicationAdministration",
"id": "cf.insulin.o.3b1565863f4a4f2d9a35851937c1f2bf",
"meta": {
"versionId": "1761232434934",
"lastUpdated": "2025-10-23T15:13:54.934+00:00",
"profile": [
"https://roche.com/fhir/iop/StructureDefinition/rdc-MedicationAdministration"
]
},
"status": "completed",
"concept": {
"coding": [
{
"system": "https://roche.com/fhir/iop/cs",
"code": "67866001_long_acting",
"display": "67866001_long_acting"
}
]
}
},
"subject": {
"reference": "Patient/12345"
},
"occurenceDateTime": "2025-10-23T15:13:06+00:00",
"dosage": {
"dose": {
"value": 12,
"unit": "[iU]",
"system": "http://unitsofmeasure.org",
"code": "[iU]"
}
}
},
"search": {
"mode": "match"
}
},
{
"fullUrl": "urn:uuid:b96f01d3-0c50-4dc6-a44b-ba8084002e11",
"resourceType": "MedicationAdministration",
"id": "cf.insulin.o.4bf3b65b85f84149a4dc6370685d557e",
"meta": {
"versionId": "1761332371366",
"lastUpdated": "2025-10-24T18:59:31.366+00:00",
"profile": [
"https://roche.com/fhir/iop/StructureDefinition/rdc-MedicationAdministration"
]
},
"status": "completed",
"concept": {
"coding": [
{
"system": "https://roche.com/fhir/iop/cs",
"code": "67866001_long_acting",
"display": "67866001_long_acting"
}
]
}
},
"subject": {
"reference": "Patient/12345"
},
"occurenceDateTime": "2025-10-24T18:59:13+00:00",
"dosage": {
"dose": {
"value": 22,
"unit": "[iU]",
"system": "http://unitsofmeasure.org",
"code": "[iU]"
}
}
},
"search": {
"mode": "match"
}
}
]
}

Response

The server responds with a FHIR Bundle of type searchset containing matching MedicationAdministration resources. Each resource represents a single insulin administration event.