Medicines Data Repository Implementation Guide
0.1.0 - ci-build

Medicines Data Repository Implementation Guide, published by Te Whatu Ora. This guide is not an authorized publication; it is the continuous build for version 0.1.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7NZ/mdr/ and changes regularly. See the Directory of published versions

Consumer View API

This page describes the API interface for the Consumer View API and its supported interactions.

The API implements a subset of the standard FHIR REST API functionality that is relevant to Medicines prescribing and dispensing.

The supported interactions are described by the CapabilityStatement for the Consumer View API and are summarised at the bottom of this page.

Medicines Consumer View restriction

The consumer view API is restricted to showing the medicines information for only the requesting patient, so only searches for an individual patient’s information are supported.

API Examples

The CapabilityStatement for the API can be returned with the following query (also useful for checking connectivity):

https://apibroker.whanautahi.com/mcv/fhir/metadata

To return all MedicationRequests (prescriptions) for a single Patient:

https://apibroker.whanautahi.com/mcv/fhir/MedicationRequest?patient=ZZZ0008

To also include all MedicationDispense resources (dispensing information) in addition to all MedicationRequests (prescriptions) for a patient, you can use the the _revinclude (“A reverse include”) parameter:

https://apibroker.whanautahi.com/mcv/fhir/MedicationRequest?patient=ZZZ0008 &_revinclude=MedicationDispense:prescription

The example response bundle for this search is included in the IG here.

Consumer View API CapabilityStatement

The below summary is generated from the CapabilityStatement resource and lists the supported Resources, interactions, and parameters.


MDR Consumer View Capability Statement


MedicationRequest

Interactions
CodeDocumentation
read Supports retrieving a resource by its id. Will return a single resource.
Search Parameters
NameTypeDocumentation
_lastUpdated date
Definition: http://hl7.org/fhir/SearchParameter/Resource-lastUpdated

When the resource version last changed (use format yyyy-mm-ddThh:mm:ssZ)

_security token
Definition: http://hl7.org/fhir/SearchParameter/Resource-security

Security Labels applied to this resource

status token
Definition: http://hl7.org/fhir/SearchParameter/medications-status

Status of the prescription

authoredon date
Definition: http://hl7.org/fhir/SearchParameter/MedicationRequest-authoredon

Return prescriptions written on this date (use format yyyy-mm-ddThh:mm:ssZ)

patient reference
Definition: http://hl7.org/fhir/SearchParameter/clinical-patient

Returns prescriptions for a specific patient (NHI)

These are the _include parameters that are supported on searches

MedicationDispense

Interactions
CodeDocumentation
read Supports retrieving a resource by its id. Will return a single resource.
Search Parameters
NameTypeDocumentation
_lastUpdated date
Definition: http://hl7.org/fhir/SearchParameter/Resource-lastUpdated

When the resource version last changed (use format yyyy-mm-ddThh:mm:ssZ)

_security token
Definition: http://hl7.org/fhir/SearchParameter/Resource-security

Security Labels applied to this resource

patient reference
Definition: http://hl7.org/fhir/SearchParameter/clinical-patient

The identity of a patient to list dispenses for (NHI)

whenprepared date
Definition: http://hl7.org/fhir/SearchParameter/MedicationDispense-whenprepared

Returns dispenses prepared on this date (use format yyyy-mm-ddThh:mm:ssZ)

whenhandedover date
Definition: http://hl7.org/fhir/SearchParameter/MedicationDispense-whenhandedover

Returns dispenses handed over on this date (use format yyyy-mm-ddThh:mm:ssZ)

status token
Definition: http://hl7.org/fhir/SearchParameter/medications-status

Returns dispenses with a specified dispense status

Search includes
Name
MedicationDispense:prescription
MedicationDispense:medication
These are the _include parameters that are supported on searches