Search Medication Dispense R2

This transaction involves a request by a DHDR consumer for medication information about patients whose demographic data match data provided in the query request (e.g. query using Health Card Number or query using Health Card Number with gender and birth date).

Message Type







GET [base]/MedicationDispense/{?[parameters]{&_format=[mime-type]}}

When an access request is made to the DHDR solution for a patient’s dispensed drug event history, the DHDR solution uniquely identifies the patient based on the supplied patient identifiers, and returns that patient’s drug events history to the calling system. The calling system can then use the results to create a drug profile for the patient.


The transactions will:

  • Allow a client application to search the DHDR solution database for MedicationDispense records matching the search criteria
  • Allow the DHDR solution to return an appropriate set of MedicationDispense records


Considerations for choosing between 1 point and 3 point matching:

  • 1 point matching runs a risk of wrong identity information if the identifier is not validated against the same source
  • 3 point matching reduces the risk of misidentification, but increases the risk of not including relevant data
  • In the case that there is a question about the alignment of identity data, the three point approach is advised for identity verification.


lite services [base] = /dispense-service2


HTTP Header Requirements

Only the base HTTP Header values are required, as described in the Submitting FHIR Messages Overview section.


Search by Health Card Number (1 point matching):


  • patient.identifier
    • Example
      • patient.identifier=|########


Search by Health Card Number with Gender and Birth Date (3 point matching):

For more precise identification of a patient for which it searches for dispenses, a consuming system is advised to use three-point patient identity verification, which includes gender and/or date of birth in addition to identifier. This would filter out dispense records with not-matching gender or date of birth. The dispenses will be returned if at any time Patient’s gender and/or birth date matched the values in the request parameters, even if the current gender and/or birth date are different


  • patient.identifier=|########
  • patient.gender=male|female|other|unknown
  • patient.birthdate=yyyy-mm-dd
    • Example
      • patient.identifier=|12345678&patient.birthdate=1971-11-28&patient.gender=female


Optional Parameters for Both Options:

  • Date: whenhandedover
    • Example
      • whenhandedover=gt2016-05-25
      • whenhandedover=ge2016-05-25&whenhandedover=le2016-12-31
  • Sort order: _sort (only by whenhandedoverin the current release)
    • Example
      • _sort:desc=whenhandedover
  • Size limit (for response paging): _count
    • Example: _count=10
    • Count of records (no records would be returned): _summary=count
      If there is no _count in the search request, the server will return all matching records in one response.
  • Format: JSON (default) or XML (format=[mime-type])
    • Example
      • _format=application/json+fhir
      • _format=application/xml+fhir



Using “Search by Health Card Number” or “Search by Health Card Number with Gender and Birth Date”:

Returns a FHIR SearchSet Bundle with a list of MedicationDispense resources, also “containing” the following resources:

  • Patient
  • Medication
  • MedicationRequest
  • Practitioner
  • Organization
  • DetectedIssue



Sample Message|6948425589

NOTE:  There is a required HTTP Header that is not included in this example.  To get a working example of the HTTP Header, you can use innovation-lab TestHarness