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):
- Provide exactly two repeated parameters: first with
ge, second withle(e.g.date=ge...&date=le...). - Format:
[ge|le]yyyy-MM-ddTHH:MM:SS[+|-]HH:MM. - Start instant must be earlier than end instant.
- 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.
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.
Response
The server responds with a FHIR Bundle of type searchset containing matching MedicationAdministration resources. Each resource represents a single insulin administration event.
