PrescribeIT® Specification and Guide Version 5.0

 

This section explains how to query formulary data as well as how to retrieve deferred or held bundles. If you are looking for information on how to query messages from your inbox, refer to Shared Health Polling for Messages section.

In addition to PrescribeIT®'s support for messaging between EMR and PMS systems, PrescribeIT® also supports formulary lookups - in some jurisdictions. A prescriber can specify the drug and the jurisdiction in which the medication will be dispensed. The operation will return an indication of whether the selected product is covered in that jurisdiction and potentially information about the cost of the medication, as well as helpful links about the product and coverage restrictions.

This capability is invoked by using the formulary operation. This is an operation rather than a query because it's more of a decision support operation than a query of existing records. The operation is invoked using an HTTP GET and responds with either an OperationOutcome (if there were errors) or a Parameters instance containing the result.

The request uses two mandatory parameters and one optional parameter:

Parameter name search type Comments
jurisdiction token This mandatory parameter can be sent as just a code because the code system is fixed. Code values are the Canada-Post defined province and territory codes. The code is bound to FormularyJurisdictions (required)
product token This mandatory parameter must be sent as the combination of the product code system and code, separated by "|". The code is bound to PrescriptionMedicinalProduct (extensible).
A Canadian Clinical Drug Data Set (CCDD) Code must be sent if one is available. CCDD values include the following:
  • Manufactured Product (MP) Code
  • Non-Proprietary Therapeutic Product (NTP) Code
  • Therapeutic Moiety (TM) Code
A Health Canada DIN may be sent if a CCDD value is not available for the product being prescribed
representative-Din token This optional boolean parameter may only be sent if the product is a DIN (i.e. If the 'system' portion of the product parameter matches the URL 'http://hl7.org/fhir/sid/ca-hc-din'). If the value is set to 'true', it indicates that the search should match on all products having the same formulation as the specified manufactured product, regardless of manufacturer or packaging.

NOTE: The order of the parameters does not matter

The Endpoints will vary by either environment or for Formulary queries, will vary by environment and context. The real URLs will be published at a later point in time. Implementers should make the endpoints' URLs configurable within their systems.

  • GET https://EnvironmentSpecificHost/EnvironmentSpecificPathInbox/$formulary?jurisdiction=AB&product=http://fhir.infoway-inforoute.ca/CodeSystem/canadianclinicaldrugdataset|2214997
  • GET https://EnvironmentSpecificHost/EnvironmentSpecificPathInbox/$formulary?product=http://fhir.infoway-inforoute.ca/CodeSystem/canadianclinicaldrugdataset|2241377&jurisdiction=AB
  • GET https://EnvironmentSpecificHost/EnvironmentSpecificPathInbox/$formulary?jurisdiction=AB&product=http://hl7.org/fhir/sid/ca-hc-din|00312770&representative-din=true

The results will be a Parameters instance corresponding to the formulary-response profile. An example response can be seen here.

The retrieval of a deferred or held bundle is done by querying the same endpoint as is used when polling the inbox, but in this case, additional search criteria must also be specified. The additional search criteria parameters are provided using the '_tag' structure as part of the query. The search criteria parameters must contain the message-key tag (i.e. PrescribeIT® Rx Id) and at least one of the birth-date or last-name tags. Thus the retrieval of a deferred or held bundle can be executed using one of the following queries (note the escaping of the ':' in the system URIs):

Further details can be found in the Deferred Prescriptions page

Interaction Message Header 401 - Execute Deferred Prescription from Physician Office diagram
  • GET https://EnvironmentSpecificHost/EnvironmentSpecificPathInbox/Bundle?_tag=http://prescribeit.ca/fhir/CodeSystem/message-key|A888GAGP,http://prescribeit.ca/fhir/CodeSystem/birth-date|2012-06-07
  • GET https://EnvironmentSpecificHost/EnvironmentSpecificPathInbox/Bundle?_tag=http://prescribeit.ca/fhir/CodeSystem/message-key|A888GAGP,http://prescribeit.ca/fhir/CodeSystem/last-name|Smith

The response to the query will be a Non-authoritative Deferred Query Response bundle. An example of such a response can be seen here.

NOTE: The order of the tags within the search criteria parameters within the query does not matter.

The response to the query will be a Interaction Bundle – Held or Non-authoritative Deferred Bundle Retrieval Response section. Examples of such a response can be seen below.

The response will return either a held bundle or a deferred bundle depending on the search criteria that was provided and matching bundle that was found. The held bundles are considered authoritative and deferred bundles contain non-authoritative orders which are copies of authoritative printed paper or faxed prescriptions.

Previously this response was only used for deferred bundles but has now been enhanced to return held bundles as well. To understand whether a held bundle or deferred bundle is being returned the receiving pharmacy system must determine this based on the task types that are contained within the bundle. A held bundle will contain any combination of e110, e120, e16x tasks and a deferred bundle will contain only e180 tasks.

Once a deferred or held bundle is retrieved the PMS system must send the clear queue request to acknowledge and delete the retrieved deferred or held bundle from PrescribeIT®.

Held bundles are only applicable in jurisdictions where electronic prescriptions or renewal responses cannot be sent directly to the specified pharmacy and a hold and retrieve workflow is used instead (NOTE: refer to the functional specification documents to understand which jurisdictions this is applicable for.

Posting and Polling Sequence diagram

Further details can be found in Deferred Prescriptions Bundle or Held Prescriptions sections which also contain flow diagrams.