{
  "resourceType": "StructureDefinition",
  "id": "medicationrequest-ca-core",
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/obligation",
      "extension": [
        {
          "url": "code",
          "valueCode": "SHALL:able-to-populate"
        },
        {
          "url": "elementId",
          "valueString": "status"
        },
        {
          "url": "elementId",
          "valueString": "priority"
        },
        {
          "url": "elementId",
          "valueString": "medicationReference"
        },
        {
          "url": "elementId",
          "valueString": "medicationCodeableConcept"
        },
        {
          "url": "elementId",
          "valueString": "authoredOn"
        },
        {
          "url": "elementId",
          "valueString": "requester"
        },
        {
          "url": "elementId",
          "valueString": "dosageInstruction"
        },
        {
          "url": "elementId",
          "valueString": "dosageInstruction.text"
        },
        {
          "url": "elementId",
          "valueString": "dosageInstruction.timing"
        },
        {
          "url": "elementId",
          "valueString": "dosageInstruction.timing.repeat"
        },
        {
          "url": "elementId",
          "valueString": "dosageInstruction.timing.repeat.frequency"
        },
        {
          "url": "elementId",
          "valueString": "dosageInstruction.timing.repeat.period"
        },
        {
          "url": "elementId",
          "valueString": "dosageInstruction.route"
        },
        {
          "url": "elementId",
          "valueString": "dosageInstruction.doseAndRate"
        },
        {
          "url": "elementId",
          "valueString": "dosageInstruction.doseAndRate.dose[x]"
        },
        {
          "url": "elementId",
          "valueString": "dispenseRequest.numberOfRepeatsAllowed"
        },
        {
          "url": "actor",
          "valueCanonical": "http://fhir.infoway-inforoute.ca/ca-core/ActorDefinition/server"
        }
      ]
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/obligation",
      "extension": [
        {
          "url": "code",
          "valueCode": "SHALL:no-error"
        },
        {
          "url": "elementId",
          "valueString": "status"
        },
        {
          "url": "elementId",
          "valueString": "priority"
        },
        {
          "url": "elementId",
          "valueString": "medicationReference"
        },
        {
          "url": "elementId",
          "valueString": "medicationCodeableConcept"
        },
        {
          "url": "elementId",
          "valueString": "authoredOn"
        },
        {
          "url": "elementId",
          "valueString": "requester"
        },
        {
          "url": "elementId",
          "valueString": "dosageInstruction"
        },
        {
          "url": "elementId",
          "valueString": "dosageInstruction.timing"
        },
        {
          "url": "elementId",
          "valueString": "dosageInstruction.timing.repeat"
        },
        {
          "url": "elementId",
          "valueString": "dosageInstruction.timing.repeat.frequency"
        },
        {
          "url": "elementId",
          "valueString": "dosageInstruction.timing.repeat.period"
        },
        {
          "url": "elementId",
          "valueString": "dosageInstruction.route"
        },
        {
          "url": "elementId",
          "valueString": "dosageInstruction.doseAndRate"
        },
        {
          "url": "elementId",
          "valueString": "dosageInstruction.doseAndRate.dose[x]"
        },
        {
          "url": "elementId",
          "valueString": "dispenseRequest.numberOfRepeatsAllowed"
        },
        {
          "url": "actor",
          "valueCanonical": "http://fhir.infoway-inforoute.ca/ca-core/ActorDefinition/client"
        }
      ]
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-imposeProfile",
      "valueCanonical": "http://hl7.org/fhir/ca/baseline/StructureDefinition/profile-medicationRequest"
    }
  ],
  "url": "http://fhir.infoway-inforoute.ca/ca-core/StructureDefinition/medicationrequest-ca-core",
  "name": "MedicationRequestCACore",
  "title": "Medication Request (CA-Core)",
  "status": "draft",
  "experimental": false,
  "description": "This profile represents the constraints applied to the MedicationRequest resource by the CA Core+ project to represent the minimum expectations for the MedicationRequest resource when used to promote capacity building for functionality found across Canadian FHIR implementations. It is informed by the constraints of shared across CIHI pCHDCF data sets and has also undergone analysis to assert alignment with the [Canadian Baseline MedicationRequest Profile v1.1.0](http://build.fhir.org/ig/HL7-Canada/ca-baseline/branches/master/StructureDefinition-profile-medicationrequest.html)",
  "copyright": "Copyright © 2024 Canada Health Infoway. All rights reserved. [Terms of Use and License Agreements](https://ic.infoway-inforoute.ca/en/about/tou). [Privacy Policy](https://www.infoway-inforoute.ca/en/legal/privacy-policy).",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "pCHDCF",
      "name": "Pan-Canadian Health Data Content Framework"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "MedicationRequest",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/MedicationRequest",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "MedicationRequest.status",
        "path": "MedicationRequest.status",
        "mapping": [
          {
            "identity": "pCHDCF",
            "map": "Medication Request Status"
          }
        ]
      },
      {
        "id": "MedicationRequest.priority",
        "path": "MedicationRequest.priority",
        "mapping": [
          {
            "identity": "pCHDCF",
            "map": "Medication Request Priority"
          }
        ]
      },
      {
        "id": "MedicationRequest.intent",
        "path": "MedicationRequest.intent",
        "comment": "This element is considered mandatory in the Base FHIR R4 Specification. \r\n\r\nBase R4 Note: It is expected that the type of requester will be restricted for different stages of a MedicationRequest. For example, Proposals can be created by a patient, relatedPerson, Practitioner or Device. Plans can be created by Practitioners, Patients, RelatedPersons and Devices. Original orders can be created by a Practitioner only. An instance-order is an instantiation of a request or order and may be used to populate Medication Administration Record. This element is labeled as a modifier because the intent alters when and how the resource is actually applicable."
      },
      {
        "id": "MedicationRequest.medication[x]",
        "path": "MedicationRequest.medication[x]",
        "comment": "Currently, this profile allows pCHDCF medication code and name concepts to be met through either medicationReference or medicationCodeableConcept. Future expectations to support one data type over another will become clearer as pCHDCF modelling evolves and expressed the minimum set of information that needs to be demonstrable for a medicationRequest. For example, if details only expressed on the medication resource (e.g., the amount of drug in the packaged product, form details separate from the form expressed on the CCDD code) needs to be exchanged in relation to a medicationRequest then support of medicationReference may be required to meet the full breadth of expectation.",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "$this"
            }
          ],
          "rules": "open"
        },
        "mapping": [
          {
            "identity": "pCHDCF",
            "map": "Medication Code",
            "comment": "Mapping of this concept applies to both medicationReference or medicationCodeableConcept data types"
          },
          {
            "identity": "pCHDCF",
            "map": "Medication Brand Name",
            "comment": "Mapping of this concept applies to both medicationReference or medicationCodeableConcept data types"
          },
          {
            "identity": "pCHDCF",
            "map": "Medication Generic Name",
            "comment": "Mapping of this concept applies to both medicationReference or medicationCodeableConcept data types"
          }
        ]
      },
      {
        "id": "MedicationRequest.medication[x]:medicationReference",
        "path": "MedicationRequest.medication[x]",
        "sliceName": "medicationReference",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.infoway-inforoute.ca/ca-core/StructureDefinition/medication-ca-core"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "pCHDCF",
            "map": "Medication Details*",
            "comment": "*The reference that is the target of this element conveys additional details about the Medication (e.g., Code, Brand Name, Generic Name) as indicated in the pCHDCF artefacts. Readers should review the profile to understand the pCHDCF mapping against its elements"
          }
        ]
      },
      {
        "id": "MedicationRequest.medication[x]:medicationCodeableConcept",
        "path": "MedicationRequest.medication[x]",
        "sliceName": "medicationCodeableConcept",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "mapping": [
          {
            "identity": "pCHDCF",
            "map": "Medication Code*",
            "comment": "*medicationCodeableConcept may convey both coded (e.g., code, system, display) as well as text details for this concept"
          },
          {
            "identity": "pCHDCF",
            "map": "Medication Brand Name*",
            "comment": "*medicationCodeableConcept may convey both coded (e.g., code, system, display) as well as text details for this concept"
          },
          {
            "identity": "pCHDCF",
            "map": "Medication Generic Name*",
            "comment": "*medicationCodeableConcept may convey both coded (e.g., code, system, display) as well as text details for this concept"
          }
        ],
        "binding": {
          "extension": [
            {
              "extension": [
                {
                  "url": "purpose",
                  "valueCode": "candidate"
                },
                {
                  "url": "valueSet",
                  "valueCanonical": "https://fhir.infoway-inforoute.ca/ValueSet/manufacturedproductmp"
                },
                {
                  "url": "documentation",
                  "valueMarkdown": "ValueSet used to convey Medication Brand Name for Manufactured Products"
                }
              ],
              "url": "http://hl7.org/fhir/tools/StructureDefinition/additional-binding"
            },
            {
              "extension": [
                {
                  "url": "purpose",
                  "valueCode": "candidate"
                },
                {
                  "url": "valueSet",
                  "valueCanonical": "https://fhir.infoway-inforoute.ca/ValueSet/non-proprietarytherapeuticproductntp"
                },
                {
                  "url": "documentation",
                  "valueMarkdown": "ValueSet used to convey Medication Generic Name for Non-Proprietary Therapeutic Products"
                }
              ],
              "url": "http://hl7.org/fhir/tools/StructureDefinition/additional-binding"
            },
            {
              "extension": [
                {
                  "url": "purpose",
                  "valueCode": "candidate"
                },
                {
                  "url": "valueSet",
                  "valueCanonical": "https://fhir.infoway-inforoute.ca/ValueSet/devicenon-proprietarytherapeuticproductdevicentp"
                },
                {
                  "url": "documentation",
                  "valueMarkdown": "ValueSet used to convey Medication Generic Name for Device Non-Proprietary Therapeutic Products"
                }
              ],
              "url": "http://hl7.org/fhir/tools/StructureDefinition/additional-binding"
            }
          ],
          "strength": "preferred",
          "valueSet": "http://fhir.infoway-inforoute.ca/ValueSet/hc-CCDD"
        }
      },
      {
        "id": "MedicationRequest.subject",
        "path": "MedicationRequest.subject",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.infoway-inforoute.ca/ca-core/StructureDefinition/patient-ca-core",
              "http://hl7.org/fhir/StructureDefinition/Group"
            ]
          }
        ]
      },
      {
        "id": "MedicationRequest.authoredOn",
        "path": "MedicationRequest.authoredOn",
        "mapping": [
          {
            "identity": "pCHDCF",
            "map": "Medication Request Date"
          }
        ]
      },
      {
        "id": "MedicationRequest.requester",
        "path": "MedicationRequest.requester",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.infoway-inforoute.ca/ca-core/StructureDefinition/practitioner-ca-core",
              "http://fhir.infoway-inforoute.ca/ca-core/StructureDefinition/practitionerRole-ca-core",
              "http://hl7.org/fhir/StructureDefinition/Practitioner",
              "http://hl7.org/fhir/StructureDefinition/PractitionerRole",
              "http://hl7.org/fhir/StructureDefinition/Organization",
              "http://hl7.org/fhir/StructureDefinition/Patient",
              "http://hl7.org/fhir/StructureDefinition/RelatedPerson",
              "http://hl7.org/fhir/StructureDefinition/Device"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "pCHDCF",
            "map": "Medication Prescriber*",
            "comment": "*The reference that is the target of this element conveys additional details about the Medication Prescriber (e.g. first name, last name, ID) as indicated in the pCHDCF artefacts"
          }
        ]
      },
      {
        "id": "MedicationRequest.dosageInstruction",
        "path": "MedicationRequest.dosageInstruction"
      },
      {
        "id": "MedicationRequest.dosageInstruction.text",
        "path": "MedicationRequest.dosageInstruction.text",
        "comment": "Implementers are encouraged to provide feedback on the impact of expectating systems demonstrate they support the text element without further expectations to demonstrate they can populate or receive the sequence element (which can be used when dosageInstructions have more than one line that should be treated sequentially)",
        "mapping": [
          {
            "identity": "pCHDCF",
            "map": "Medication Administration Instruction"
          }
        ]
      },
      {
        "id": "MedicationRequest.dosageInstruction.timing",
        "path": "MedicationRequest.dosageInstruction.timing",
        "mapping": [
          {
            "identity": "pCHDCF",
            "map": "Medication Administration Instruction Time",
            "comment": "The current definition for this concept implies a separation of generic instructions from the instructions of when the medication should be administered. While dosageInstruction.timing provides these details, the current mapping is to a backbone element where individual structured components are expressed together to provide meaning (e.g., frequency + period + bounds instead of a instruction text string for timing). Implementers are encouraged to provide feedback on the frrquency that these separated timing instructions are captured in string form in child fields (e.g., dosageInstruction.additionalInstruction, dosageInstruction.code.text) to more specific targets in future releases"
          }
        ]
      },
      {
        "id": "MedicationRequest.dosageInstruction.timing.repeat.frequency",
        "path": "MedicationRequest.dosageInstruction.timing.repeat.frequency",
        "mapping": [
          {
            "identity": "pCHDCF",
            "map": "Medication Frequency",
            "comment": "The current definition for this concept implies that the frequency is understood within a given time period. To fully provide meaning to frequency under this definition, the MedicationRequest.dosageInstruction.timing.repeat.period element must also be used."
          }
        ]
      },
      {
        "id": "MedicationRequest.dosageInstruction.timing.repeat.period",
        "path": "MedicationRequest.dosageInstruction.timing.repeat.period",
        "mapping": [
          {
            "identity": "pCHDCF",
            "map": "Medication Frequency*",
            "comment": "*The current definition for this concept implies that the frequency is understood within a given time period. To fully provide meaning to frequency under this definition, the MedicationRequest.dosageInstruction.timing.repeat.period element must also be used."
          }
        ]
      },
      {
        "id": "MedicationRequest.dosageInstruction.route",
        "path": "MedicationRequest.dosageInstruction.route",
        "mapping": [
          {
            "identity": "pCHDCF",
            "map": "Medication Route of Administration"
          }
        ],
        "binding": {
          "extension": [
            {
              "extension": [
                {
                  "url": "purpose",
                  "valueCode": "candidate"
                },
                {
                  "url": "valueSet",
                  "valueCanonical": "https://fhir.infoway-inforoute.ca/ValueSet/routeofadministration"
                },
                {
                  "url": "documentation",
                  "valueMarkdown": "SCTCA Route of Administration"
                }
              ],
              "url": "http://hl7.org/fhir/tools/StructureDefinition/additional-binding"
            }
          ],
          "strength": "preferred",
          "description": "Route of admnistration for the prescription from the PrescribeIT value set",
          "valueSet": "https://fhir.infoway-inforoute.ca/ValueSet/prescriptionrouteofadministration"
        }
      },
      {
        "id": "MedicationRequest.dosageInstruction.doseAndRate.dose[x]",
        "path": "MedicationRequest.dosageInstruction.doseAndRate.dose[x]",
        "mapping": [
          {
            "identity": "pCHDCF",
            "map": "Medication Prescribed Dose"
          }
        ]
      },
      {
        "id": "MedicationRequest.dispenseRequest",
        "path": "MedicationRequest.dispenseRequest"
      },
      {
        "id": "MedicationRequest.dispenseRequest.numberOfRepeatsAllowed",
        "path": "MedicationRequest.dispenseRequest.numberOfRepeatsAllowed",
        "mapping": [
          {
            "identity": "pCHDCF",
            "map": "Medication Refills"
          }
        ]
      }
    ]
  }
}