{
  "resourceType": "StructureDefinition",
  "id": "8db0f969-2f09-4aa5-8003-f58fdd2a9148",
  "meta": {
    "lastUpdated": "2019-05-06T17:20:32.0759359+00:00"
  },
  "url": "https://ehealthontario.ca/API/FHIR/StructureDefinition/ca-on-medications-profile-MedicationRequest",
  "name": "MedicationRequest-Prescription",
  "status": "draft",
  "date": "2019-05-06T17:20:31.1379911+00:00",
  "fhirVersion": "3.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "MedicationRequest",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/MedicationRequest",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "MedicationRequest.identifier",
        "path": "MedicationRequest.identifier",
        "definition": "Identifier assigned by the ordering facility - this is an identifier assigned outside FHIR.",
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.identifier.system",
        "path": "MedicationRequest.identifier.system",
        "comment": "Not populated in the current releases namespaces are unknown.",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.identifier.value",
        "path": "MedicationRequest.identifier.value",
        "definition": "The portion of the identifier typically displayed to the user and which is unique within the context of the system. It should be unique by agency and date of service.",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.intent",
        "path": "MedicationRequest.intent",
        "fixedCode": "order",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.medication[x]:medicationReference",
        "path": "MedicationRequest.medicationReference",
        "sliceName": "medicationReference",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "https://ehealthontario.ca/API/FHIR/StructureDefinition/ca-on-medications-profile-Medication"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.medication[x]:medicationReference.reference",
        "path": "MedicationRequest.medicationReference.reference",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.subject",
        "path": "MedicationRequest.subject",
        "short": "Who medication request is for",
        "definition": "A link to a resource representing the person to whom the medication will be given.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "https://ehealthontario.ca/API/FHIR/StructureDefinition/ca-on-medications-profile-Patient-dispense"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.subject.reference",
        "path": "MedicationRequest.subject.reference",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.requester",
        "path": "MedicationRequest.requester",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.requester.agent",
        "path": "MedicationRequest.requester.agent",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "https://ehealthontario.ca/API/FHIR/StructureDefinition/ca-on-medications-profile-Practitioner-prescriber"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.requester.agent.reference",
        "path": "MedicationRequest.requester.agent.reference",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.reasonCode",
        "path": "MedicationRequest.reasonCode",
        "definition": "The reason or the indication for ordering the medication. Medical condition: ICD-9-CM, ODB Reason for Use,ICD-10-CA, DND Eligible Medical Conditions.",
        "comment": "Medical condition: ICD-9-CM, ODB Reason for Use, ICD-10-CA, DND Eligible Medical Conditions",
        "max": "1",
        "mustSupport": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "MedicationRequestReason"
            }
          ],
          "strength": "extensible",
          "valueSetReference": {
            "reference": "https://ehealthontario.ca/fhir/ValueSet/dhdr-ca-on-drug-odb-prescription-reason"
          }
        }
      },
      {
        "id": "MedicationRequest.reasonCode.coding",
        "path": "MedicationRequest.reasonCode.coding",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.reasonCode.coding.system",
        "path": "MedicationRequest.reasonCode.coding.system",
        "definition": "Identity of the terminology system. One of  four systems allowed by CPhA standard: ICD-9, ODB reason for use, ICD-10 and DND Eligible Medical Conditions. Only “ODB reason for use” is in scope in the current release.",
        "min": 1,
        "fixedUri": "https://ehealthontario.ca/API/FHIR/NamingSystem/ca-on-drug-odb-prescription-reason",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.reasonCode.coding.code",
        "path": "MedicationRequest.reasonCode.coding.code",
        "comment": "See Terminology Worksheet for list of codes. Note that FHIR strings may not exceed 1MB in size",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.reasonCode.coding.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "MedicationRequest.reasonCode.coding.display",
        "comment": "See Terminology Worksheet for list of display values. Note that FHIR strings may not exceed 1MB in size",
        "mustSupport": true
      }
    ]
  }
}