{
  "resourceType": "StructureDefinition",
  "meta": {
    "lastUpdated": "2017-08-25T13:04:43.459+00:00"
  },
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
      "valueCode": "phx"
    }
  ],
  "url": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-MedicationRequest-1",
  "version": "0.0.1",
  "name": "CareConnect-MedicationRequest-1",
  "status": "draft",
  "date": "2017-07-14T09:40:46.3799462+00:00",
  "publisher": "HL7 UK",
  "description": "This MedicationRequest Resource represents an order for both supply of the medication and the instructions for administration of the medication to a patient.",
  "copyright": "Copyright © 2016 HL7 UK\r\n\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at\r\n\r\nhttp://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\r\n\r\nHL7® FHIR® standard Copyright © 2011+ HL7\r\n\r\nThe HL7® FHIR® standard is used under the FHIR license. You may obtain a copy of the FHIR license at\r\n\r\nhttps://www.hl7.org/fhir/license.html",
  "fhirVersion": "3.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "MedicationRequest",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/MedicationRequest",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "path": "MedicationRequest.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "MedicationRequest.extension:supplyType",
        "path": "MedicationRequest.extension",
        "sliceName": "supplyType",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-MedicationSupplyType-1"
          }
        ]
      },
      {
        "id": "MedicationRequest.extension:flag",
        "path": "MedicationRequest.extension",
        "sliceName": "flag",
        "type": [
          {
            "code": "Extension",
            "profile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-MedicationFlag-1"
          }
        ]
      },
      {
        "id": "MedicationRequest.identifier.system",
        "path": "MedicationRequest.identifier.system",
        "min": 1
      },
      {
        "id": "MedicationRequest.identifier.value",
        "path": "MedicationRequest.identifier.value",
        "min": 1
      },
      {
        "id": "MedicationRequest.identifier.assigner",
        "path": "MedicationRequest.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Organization-1"
          }
        ]
      },
      {
        "id": "MedicationRequest.basedOn",
        "path": "MedicationRequest.basedOn",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/CarePlan"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/ProcedureRequest"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/ReferralRequest"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-MedicationRequest-1"
          }
        ]
      },
      {
        "id": "MedicationRequest.groupIdentifier.assigner",
        "path": "MedicationRequest.groupIdentifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Organization-1"
          }
        ]
      },
      {
        "id": "MedicationRequest.status",
        "path": "MedicationRequest.status",
        "min": 1
      },
      {
        "id": "MedicationRequest.medication[x]",
        "path": "MedicationRequest.medication[x]",
        "type": [
          {
            "code": "CodeableConcept"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Medication-1"
          }
        ],
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "MedicationCode"
            }
          ],
          "strength": "required",
          "description": "A code from the SNOMED Clinical Terminology UK coding system that describes a manufactured material (e.g. a pharmaceutical product or personal medical device).",
          "valueSetReference": {
            "reference": "https://fhir.hl7.org.uk/STU3/ValueSet/CareConnect-ManufacturedMaterialSnCT-1"
          }
        }
      },
      {
        "id": "MedicationRequest.subject",
        "path": "MedicationRequest.subject",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Group"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Patient-1"
          }
        ]
      },
      {
        "id": "MedicationRequest.context",
        "path": "MedicationRequest.context",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Encounter-1"
          }
        ]
      },
      {
        "id": "MedicationRequest.authoredOn",
        "path": "MedicationRequest.authoredOn",
        "min": 1
      },
      {
        "id": "MedicationRequest.requester.agent",
        "path": "MedicationRequest.requester.agent",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Organization-1"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Patient-1"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Practitioner-1"
          }
        ]
      },
      {
        "id": "MedicationRequest.requester.onBehalfOf",
        "path": "MedicationRequest.requester.onBehalfOf",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Organization-1"
          }
        ]
      },
      {
        "id": "MedicationRequest.recorder",
        "path": "MedicationRequest.recorder",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Practitioner-1"
          }
        ]
      },
      {
        "id": "MedicationRequest.reasonReference",
        "path": "MedicationRequest.reasonReference",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Condition-1"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Observation-1"
          }
        ]
      },
      {
        "id": "MedicationRequest.note.author[x]",
        "path": "MedicationRequest.note.author[x]",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
          },
          {
            "code": "string"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Patient-1"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Practitioner-1"
          }
        ]
      },
      {
        "id": "MedicationRequest.dosageInstruction",
        "path": "MedicationRequest.dosageInstruction",
        "min": 1
      },
      {
        "id": "MedicationRequest.dosageInstruction.text",
        "path": "MedicationRequest.dosageInstruction.text",
        "min": 1
      },
      {
        "id": "MedicationRequest.dosageInstruction.additionalInstruction.coding",
        "path": "MedicationRequest.dosageInstruction.additionalInstruction.coding",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "ordered": false,
          "rules": "open"
        }
      },
      {
        "id": "MedicationRequest.dosageInstruction.additionalInstruction.coding:snomedCT",
        "path": "MedicationRequest.dosageInstruction.additionalInstruction.coding",
        "sliceName": "snomedCT",
        "max": "1"
      },
      {
        "path": "MedicationRequest.dosageInstruction.additionalInstruction.coding.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "MedicationRequest.dosageInstruction.additionalInstruction.coding:snomedCT.extension:snomedCTDescriptionID",
        "path": "MedicationRequest.dosageInstruction.additionalInstruction.coding.extension",
        "sliceName": "snomedCTDescriptionID",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-coding-sctdescid"
          }
        ]
      },
      {
        "id": "MedicationRequest.dosageInstruction.additionalInstruction.coding:snomedCT.system",
        "path": "MedicationRequest.dosageInstruction.additionalInstruction.coding.system",
        "min": 1,
        "fixedUri": "http://snomed.info/sct"
      },
      {
        "id": "MedicationRequest.dosageInstruction.additionalInstruction.coding:snomedCT.version",
        "path": "MedicationRequest.dosageInstruction.additionalInstruction.coding.version",
        "max": "0"
      },
      {
        "id": "MedicationRequest.dosageInstruction.additionalInstruction.coding:snomedCT.code",
        "path": "MedicationRequest.dosageInstruction.additionalInstruction.coding.code",
        "min": 1
      },
      {
        "id": "MedicationRequest.dosageInstruction.additionalInstruction.coding:snomedCT.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "MedicationRequest.dosageInstruction.additionalInstruction.coding.display",
        "min": 1
      },
      {
        "id": "MedicationRequest.dosageInstruction.route.coding",
        "path": "MedicationRequest.dosageInstruction.route.coding",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "ordered": false,
          "rules": "open"
        }
      },
      {
        "id": "MedicationRequest.dosageInstruction.route.coding:snomedCT",
        "path": "MedicationRequest.dosageInstruction.route.coding",
        "sliceName": "snomedCT",
        "max": "1",
        "binding": {
          "strength": "preferred",
          "description": "A code from the SNOMED Clinical Terminology UK coding system that describes the e-Prescribing route of administration.",
          "valueSetReference": {
            "reference": "https://fhir.hl7.org.uk/STU3/ValueSet/CareConnect-MedicationDosageRoute-1"
          }
        }
      },
      {
        "path": "MedicationRequest.dosageInstruction.route.coding.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "MedicationRequest.dosageInstruction.route.coding:snomedCT.extension:snomedCTDescriptionID",
        "path": "MedicationRequest.dosageInstruction.route.coding.extension",
        "sliceName": "snomedCTDescriptionID",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-coding-sctdescid"
          }
        ]
      },
      {
        "id": "MedicationRequest.dosageInstruction.route.coding:snomedCT.system",
        "path": "MedicationRequest.dosageInstruction.route.coding.system",
        "min": 1,
        "fixedUri": "http://snomed.info/sct"
      },
      {
        "id": "MedicationRequest.dosageInstruction.route.coding:snomedCT.version",
        "path": "MedicationRequest.dosageInstruction.route.coding.version",
        "max": "0"
      },
      {
        "id": "MedicationRequest.dosageInstruction.route.coding:snomedCT.code",
        "path": "MedicationRequest.dosageInstruction.route.coding.code",
        "min": 1
      },
      {
        "id": "MedicationRequest.dosageInstruction.route.coding:snomedCT.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "MedicationRequest.dosageInstruction.route.coding.display",
        "min": 1
      },
      {
        "id": "MedicationRequest.dosageInstruction.method.coding",
        "path": "MedicationRequest.dosageInstruction.method.coding",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "ordered": false,
          "rules": "open"
        }
      },
      {
        "id": "MedicationRequest.dosageInstruction.method.coding:snomedCT",
        "path": "MedicationRequest.dosageInstruction.method.coding",
        "sliceName": "snomedCT",
        "max": "1",
        "binding": {
          "strength": "preferred",
          "description": "A code from the SNOMED Clinical Terminology UK coding system that describes the e-Prescribing method.",
          "valueSetReference": {
            "reference": "https://fhir.hl7.org.uk/STU3/ValueSet/CareConnect-MedicationDosageMethod-1"
          }
        }
      },
      {
        "path": "MedicationRequest.dosageInstruction.method.coding.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "MedicationRequest.dosageInstruction.method.coding:snomedCT.extension:snomedCTDescriptionID",
        "path": "MedicationRequest.dosageInstruction.method.coding.extension",
        "sliceName": "snomedCTDescriptionID",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-coding-sctdescid"
          }
        ]
      },
      {
        "id": "MedicationRequest.dosageInstruction.method.coding:snomedCT.system",
        "path": "MedicationRequest.dosageInstruction.method.coding.system",
        "min": 1,
        "fixedUri": "http://snomed.info/sct"
      },
      {
        "id": "MedicationRequest.dosageInstruction.method.coding:snomedCT.version",
        "path": "MedicationRequest.dosageInstruction.method.coding.version",
        "max": "0"
      },
      {
        "id": "MedicationRequest.dosageInstruction.method.coding:snomedCT.code",
        "path": "MedicationRequest.dosageInstruction.method.coding.code",
        "min": 1
      },
      {
        "id": "MedicationRequest.dosageInstruction.method.coding:snomedCT.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "MedicationRequest.dosageInstruction.method.coding.display",
        "min": 1
      },
      {
        "id": "MedicationRequest.dispenseRequest.validityPeriod.start",
        "path": "MedicationRequest.dispenseRequest.validityPeriod.start",
        "min": 1
      },
      {
        "path": "MedicationRequest.dispenseRequest.quantity.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "MedicationRequest.dispenseRequest.quantity:SimpleQuantity.extension:quantityText",
        "path": "MedicationRequest.dispenseRequest.quantity.extension",
        "sliceName": "quantityText",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-MedicationQuantityText-1"
          }
        ]
      },
      {
        "id": "MedicationRequest.dispenseRequest.quantity:SimpleQuantity.value",
        "path": "MedicationRequest.dispenseRequest.quantity.value",
        "min": 1
      },
      {
        "id": "MedicationRequest.dispenseRequest.quantity:SimpleQuantity.unit",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "MedicationRequest.dispenseRequest.quantity.unit",
        "min": 1
      },
      {
        "id": "MedicationRequest.dispenseRequest.quantity:SimpleQuantity.system",
        "path": "MedicationRequest.dispenseRequest.quantity.system",
        "min": 1
      },
      {
        "id": "MedicationRequest.dispenseRequest.quantity:SimpleQuantity.code",
        "path": "MedicationRequest.dispenseRequest.quantity.code",
        "min": 1
      },
      {
        "id": "MedicationRequest.dispenseRequest.expectedSupplyDuration.value",
        "path": "MedicationRequest.dispenseRequest.expectedSupplyDuration.value",
        "min": 1
      },
      {
        "id": "MedicationRequest.dispenseRequest.expectedSupplyDuration.comparator",
        "path": "MedicationRequest.dispenseRequest.expectedSupplyDuration.comparator",
        "max": "0"
      },
      {
        "id": "MedicationRequest.dispenseRequest.expectedSupplyDuration.system",
        "path": "MedicationRequest.dispenseRequest.expectedSupplyDuration.system",
        "min": 1,
        "fixedUri": "http://unitsofmeasure.org"
      },
      {
        "id": "MedicationRequest.dispenseRequest.expectedSupplyDuration.code",
        "path": "MedicationRequest.dispenseRequest.expectedSupplyDuration.code",
        "min": 1,
        "binding": {
          "strength": "required",
          "description": "A unit of time (units from UCUM).",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/units-of-time"
          }
        }
      },
      {
        "id": "MedicationRequest.dispenseRequest.performer",
        "path": "MedicationRequest.dispenseRequest.performer",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Organization-1"
          }
        ]
      },
      {
        "id": "MedicationRequest.priorPrescription",
        "path": "MedicationRequest.priorPrescription",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-MedicationRequest-1"
          }
        ]
      }
    ]
  }
}