{
  "resourceType": "StructureDefinition",
  "url": "http://ehealth.bc.ca/fhir/StructureDefinition/ca-bc-eforms-profile-medication",
  "name": "Medication",
  "status": "draft",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Medication",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Medication",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Medication.meta",
        "path": "Medication.meta"
      },
      {
        "id": "Medication.meta.profile",
        "path": "Medication.meta.profile",
        "comment": "Apply \"http://ehealth.bc.ca/fhir/StructureDefinition/ca-bc-eforms-profile-medication\"",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Medication.implicitRules",
        "path": "Medication.implicitRules",
        "max": "0"
      },
      {
        "id": "Medication.language",
        "path": "Medication.language",
        "max": "0"
      },
      {
        "id": "Medication.extension",
        "path": "Medication.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        },
        "min": 0
      },
      {
        "id": "Medication.extension:myExtension",
        "path": "Medication.extension",
        "sliceName": "myExtension",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://prescribeit.ca/fhir/StructureDefinition/ext-medication-strength-description"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Medication.code",
        "path": "Medication.code",
        "code": [
          {
            "system": "https://fhir.infoway-inforoute.ca/ValueSet/CA-HC-DIN",
            "display": "DIN"
          },
          {
            "system": "https://fhir.infoway-inforoute.ca/ValueSet/CA-HC-NPN",
            "display": "NPN"
          },
          {
            "system": "https://fhir.infoway-inforoute.ca/ValueSet/prescriptionmedicinalproduct",
            "display": "CCDD"
          },
          {
            "system": "https://fhir.infoway-inforoute.ca/ValueSet/medication-snomed-uv-ips",
            "display": "SNOMED CT(Medicatons) - IPS"
          },
          {
            "system": "https://fhir.infoway-inforoute.ca/ValueSet/whoatc-uv-ips",
            "display": "WHO ATC IPS"
          }
        ],
        "min": 1
      },
      {
        "id": "Medication.code.extension",
        "path": "Medication.code.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        },
        "min": 0
      },
      {
        "id": "Medication.code.extension:myExtension",
        "path": "Medication.code.extension",
        "sliceName": "myExtension",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://prescribeit.ca/fhir/StructureDefinition/ext-medication-code-representative"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Medication.code.coding",
        "path": "Medication.code.coding",
        "comment": "CA Baseline Usage Notes: either text or at least one coding or both have to be present"
      },
      {
        "id": "Medication.code.coding.system",
        "path": "Medication.code.coding.system",
        "min": 1
      },
      {
        "id": "Medication.code.coding.code",
        "path": "Medication.code.coding.code",
        "min": 1
      },
      {
        "id": "Medication.code.text",
        "path": "Medication.code.text",
        "comment": "CA Baseline Usage Notes: either text or at least one coding or both have to be present"
      }
    ]
  }
}