On this page

Canadian Code Systems

Canadian Code Systems​

The pan-Canadian profiles use codes from Canadian code systems: drug identification numbers, Canadian drug products, SNOMED CT's Canadian edition and the pan-Canadian lab codes. The packages name these code systems but do not contain their codes, so the server's operator loads them from each publisher's own files.

Code systemURLPublished by
Drug Identification Number (DIN)http://hl7.org/fhir/NamingSystem/ca-hc-dinHealth Canada
Canadian Clinical Drug Data Set (CCDD)http://terminology.hl7.org/CodeSystem/hc-CCDDHealth Canada
SNOMED CT Canadian editionhttp://snomed.info/sctCanada Health Infoway
pan-Canadian LOINC Observation Code Database (pCLOCD)https://fhir.infoway-inforoute.ca/CodeSystem/pCLOCDCanada Health Infoway

The National Vaccine Catalogue's codes come with SNOMED CT's Canadian edition, as its reference sets. Each SNOMED CT reference set is a value set at http://snomed.info/sct?fhir_vs=refset/<id>: that is how CA Core+ and PS-CA name the vaccine, immunization site and route codes they use.

French names are kept as fr-CA designations.

SNOMED CT's Canadian edition and pCLOCD are licensed through Canada Health Infoway for use in Canada. Load them only on a server in Canada.

Looking up a code​

CodeSystem/$lookup returns a code's name, its French name and its properties. For a DIN, the properties include the product's current status in Health Canada's Drug Product Database:

curl 'https://api.openorchid.ca/fhir/R4/CodeSystem/$lookup?system=http://hl7.org/fhir/NamingSystem/ca-hc-din&code=00038202' \
  -H "Authorization: Bearer $ACCESS_TOKEN"
{
  "resourceType": "Parameters",
  "parameter": [
    { "name": "name", "valueString": "Health Canada Drug Identification Number" },
    { "name": "display", "valueString": "BACTERIOSTATIC WATER FOR INJECTION USP Q.S. TO 30 ML MULTI-DOSE VIALS" },
    {
      "name": "designation",
      "part": [
        { "name": "language", "valueCode": "fr-CA" },
        { "name": "value", "valueString": "EAU BACTÉRIOSTATIQUE POUR PRÉPARATIONS INJECTABLES USP Q.S À 30 ML FIOLES MULTIDOSE" }
      ]
    },
    {
      "name": "property",
      "part": [
        { "name": "code", "valueCode": "status" },
        { "name": "value", "valueCode": "MARKETED" },
        { "name": "description", "valueString": "The current Drug Product Database status, such as MARKETED" }
      ]
    }
    // ...
  ]
}

Checking a code against a value set​

ValueSet/$validate-code says whether a code is in a value set. This checks a CCDD code against the CA Core+ value set for prescribed medications:

curl 'https://api.openorchid.ca/fhir/R4/ValueSet/$validate-code?url=https://fhir.infoway-inforoute.ca/ValueSet/prescriptionmedicinalproduct&system=http://terminology.hl7.org/CodeSystem/hc-CCDD&code=02569728' \
  -H "Authorization: Bearer $ACCESS_TOKEN"
{
  "resourceType": "Parameters",
  "parameter": [
    { "name": "result", "valueBoolean": true },
    {
      "name": "display",
      "valueString": "BESREMI (ropeginterferon alfa-2b 500 mcg per 1 mL solution for injection syringe) FORUS THERAPEUTICS INC."
    }
  ]
}

A code that is not in the value set returns "result": false. The same works for the value sets built from SNOMED CT reference sets, such as the vaccines CA Core+ uses:

curl 'https://api.openorchid.ca/fhir/R4/ValueSet/$validate-code?url=https://fhir.infoway-inforoute.ca/ValueSet/vaccineadministeredtradenamecode&system=http://snomed.info/sct&code=<SNOMED CT code>' \
  -H "Authorization: Bearer $ACCESS_TOKEN"

ValueSet/$expand lists a value set's codes. See Terminology for these operations in general.

Codes in the records you write​

Whether a wrong code refuses a write depends on how strongly the profile binds the element to its value set:

  • A required binding refuses a code outside the value set, in a project with the validate-terminology feature. The Canadian project template leaves validate-terminology off for now, so in a Canadian project no binding refuses a write.
  • Preferred, extensible and example bindings never refuse a write.

In CA Core+ 1.2.1-dft, most elements that use the Canadian code systems are preferred or example bindings: the medication code (CCDD), the lab test code (pCLOCD), and the vaccine code. So the server accepts other codes there, and an app that wants Canadian codes checks them with $validate-code before it writes.