1.1 Queries and Operations - Overview
In addition to the generic Shared Health polling query, PrescribeIT™ defines additional capabilities: There is a query that Pharmacies will execute to retrieve a deferred Prescription. This is one that has not been targeted to a specific pharmacy. PrescribeIT™ also defines an operation for physicians to inquire about formulary coverage. Both are described below.
1.2 Formulary Query
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.
1.2.1 Formulary Query Request
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 CanadianJurisdiction (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:
|
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
1.2.2 Examples
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=ON&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=QC&product=http://hl7.org/fhir/sid/ca-hc-din|00312770&representative-din=true
1.2.3 Formulary Query Response
The results will be a Parameters instance corresponding to the formulary-response profile. An example response can be seen here.
1.3 Deferred Messages
The retrieval of the deferred message is done by querying the same endpoint as is used for directed messages, but in this case, search criteria must be specified. Tags are searched using the '_tag' search criteria. The search must contain the message-key tag (i.e. PrescribeIT™ Rx Id) and at least one of the birth-date and last-name tags. If both are specified, both must match. Thus the above message could be retrieved 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
-
GET https://EnvironmentSpecificHost/EnvironmentSpecificPathInbox/Bundle?_tag=http%3A//prescribeit.ca/fhir/CodeSystem/message-key|S724THSR5LDA,http%3A//prescribeit.ca/fhir/CodeSystem/birth-date|2012-06-07
-
GET https://EnvironmentSpecificHost/EnvironmentSpecificPathInbox/Bundle?_tag=http%3A//prescribeit.ca/fhir/CodeSystem/message-key|S724THSR5LDA,http%3A//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 does not matter