<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="au-medicationrequest" />
  <url value="http://hl7.org.au/fhir/StructureDefinition/au-medicationrequest" />
  <version value="1.1.0" />
  <name value="AUBaseMedicationRequest" />
  <title value="AU Base Medication Request" />
  <status value="draft" />
  <date value="2017-05-11T09:51:36.6519188+10:00" />
  <publisher value="Health Level Seven Australia (Medications WG)" />
  <contact>
    <telecom>
      <system value="url" />
      <value value="http://hl7.org.au/fhir" />
      <use value="work" />
    </telecom>
  </contact>
  <description value="This profile defines a medication request structure including core localisation concepts for use as a prescription in an Australian context." />
  <fhirVersion value="3.0.0" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="MedicationRequest" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/MedicationRequest" />
  <derivation value="constraint" />
  <differential>
    <element id="MedicationRequest">
      <path value="MedicationRequest" />
      <short value="A prescription for a medication for a patient in an Australian healthcare context" />
      <definition value="Prescription of medication" />
    </element>
    <element id="MedicationRequest.extension">
      <path value="MedicationRequest.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="MedicationRequest.extension:groundsForConcurrentSupply">
      <path value="MedicationRequest.extension" />
      <sliceName value="groundsForConcurrentSupply" />
      <short value="Grounds for Concurrent Supply of Medication" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org.au/fhir/StructureDefinition/grounds-for-concurrent-supply" />
      </type>
    </element>
    <element id="MedicationRequest.extension:minimumIntervalBetweenRepeats">
      <path value="MedicationRequest.extension" />
      <sliceName value="minimumIntervalBetweenRepeats" />
      <short value="Minimum Interval Between Repeats" />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org.au/fhir/StructureDefinition/minimum-interval-between-repeats" />
      </type>
    </element>
    <element id="MedicationRequest.extension:brandName">
      <path value="MedicationRequest.extension" />
      <sliceName value="brandName" />
      <short value="Medication Brand Name" />
      <definition value="The brand medication text name for an associated medication, this may be supplied if a coded brand name is not available for medicationCodeableConcept but the brand name is needed." />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org.au/fhir/StructureDefinition/medication-brand-name" />
      </type>
    </element>
    <element id="MedicationRequest.extension:genericName">
      <path value="MedicationRequest.extension" />
      <sliceName value="genericName" />
      <short value="Medication Generic Drug Name" />
      <definition value="The generic medication text name for an associated medication, this may not be the same as the medicationCodeableConcept medication (prescribed, dispensed or stated) but may be used to provide an additional or equivalent drug name that is a generic medication concept." />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org.au/fhir/StructureDefinition/medication-generic-name" />
      </type>
    </element>
    <element id="MedicationRequest.identifier">
      <path value="MedicationRequest.identifier" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="system" />
        </discriminator>
        <discriminator>
          <type value="value" />
          <path value="type" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="MedicationRequest.identifier:etpVendorIdentifier">
      <path value="MedicationRequest.identifier" />
      <sliceName value="etpVendorIdentifier" />
      <short value="Electronic Transfer of Prescription Supplier Identifier" />
      <definition value="Identifier assigned by ETP vendor e.g. ERx, Medisecure etc. This is the assgigned numeric value typically represented as a barcode on a prescription instance." />
    </element>
    <element id="MedicationRequest.identifier:etpVendorIdentifier.type">
      <path value="MedicationRequest.identifier.type" />
      <min value="1" />
      <binding>
        <strength value="required" />
        <description value="Local Identifier Type" />
        <valueSetReference>
          <reference value="http://hl7.org.au/fhir/ValueSet/au-hl7v2-0203" />
        </valueSetReference>
      </binding>
    </element>
    <element id="MedicationRequest.identifier:etpVendorIdentifier.type.coding">
      <path value="MedicationRequest.identifier.type.coding" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="MedicationRequest.identifier:etpVendorIdentifier.type.coding.system">
      <path value="MedicationRequest.identifier.type.coding.system" />
      <min value="1" />
      <fixedUri value="http://hl7.org.au/fhir/v2/0203" />
    </element>
    <element id="MedicationRequest.identifier:etpVendorIdentifier.type.coding.code">
      <path value="MedicationRequest.identifier.type.coding.code" />
      <min value="1" />
      <fixedCode value="ETP" />
    </element>
    <element id="MedicationRequest.identifier:etpVendorIdentifier.type.text">
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="MedicationRequest.identifier.type.text" />
      <min value="1" />
      <fixedString value="ETP Identifier" />
    </element>
    <element id="MedicationRequest.identifier:etpVendorIdentifier.system">
      <path value="MedicationRequest.identifier.system" />
      <short value="ETP vendor identifier system URL" />
      <definition value="URL assigned by the ETP (electronic transfer of prescription) vendor allocating the identifier." />
      <min value="1" />
    </element>
    <element id="MedicationRequest.identifier:etpVendorIdentifier.value">
      <path value="MedicationRequest.identifier.value" />
      <short value="ETP vendor identifier" />
      <definition value="ETP Vendor allocated identifier for the request this dispense record is fulfilling." />
      <min value="1" />
    </element>
    <element id="MedicationRequest.identifier:etpVendorIdentifier.assigner">
      <path value="MedicationRequest.identifier.assigner" />
      <short value="ETP vendor" />
      <definition value="ETP Vendor assigning this identifier" />
      <min value="1" />
    </element>
    <element id="MedicationRequest.identifier:etpVendorIdentifier.assigner.display">
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="MedicationRequest.identifier.assigner.display" />
      <short value="ETP vendor name" />
      <definition value="Name of the ETP vendor assigning this identifier." />
      <min value="1" />
    </element>
    <element id="MedicationRequest.identifier:localScriptNumber">
      <path value="MedicationRequest.identifier" />
      <sliceName value="localScriptNumber" />
      <short value="Local Prescription Number" />
      <definition value="Identifier assigined by the prescribing system allows linking of a prescription record to local system identifier." />
    </element>
    <element id="MedicationRequest.identifier:localScriptNumber.type">
      <path value="MedicationRequest.identifier.type" />
      <short value="Coded identifier type for local prescription number" />
      <min value="1" />
      <binding>
        <strength value="required" />
        <description value="Local Identifier Type" />
        <valueSetReference>
          <reference value="http://hl7.org.au/fhir/ValueSet/au-hl7v2-0203" />
        </valueSetReference>
      </binding>
    </element>
    <element id="MedicationRequest.identifier:localScriptNumber.type.coding">
      <path value="MedicationRequest.identifier.type.coding" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="MedicationRequest.identifier:localScriptNumber.type.coding.system">
      <path value="MedicationRequest.identifier.type.coding.system" />
      <min value="1" />
      <fixedUri value="http://hl7.org.au/fhir/v2/0203" />
    </element>
    <element id="MedicationRequest.identifier:localScriptNumber.type.coding.code">
      <path value="MedicationRequest.identifier.type.coding.code" />
      <min value="1" />
      <fixedCode value="LPN" />
    </element>
    <element id="MedicationRequest.identifier:localScriptNumber.type.text">
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="MedicationRequest.identifier.type.text" />
      <min value="1" />
      <fixedString value="Local Prescription Number" />
    </element>
    <element id="MedicationRequest.identifier:localScriptNumber.system">
      <path value="MedicationRequest.identifier.system" />
      <short value="Namespace for local prescription number" />
      <definition value="URL namespace assigned by the local prescription system." />
      <min value="1" />
    </element>
    <element id="MedicationRequest.identifier:localScriptNumber.value">
      <path value="MedicationRequest.identifier.value" />
      <short value="Prescription number" />
      <min value="1" />
    </element>
    <element id="MedicationRequest.identifier:localScriptNumber.assigner">
      <path value="MedicationRequest.identifier.assigner" />
      <min value="1" />
    </element>
    <element id="MedicationRequest.identifier:localScriptNumber.assigner.display">
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="MedicationRequest.identifier.assigner.display" />
      <min value="1" />
    </element>
    <element id="MedicationRequest.medication[x]">
      <path value="MedicationRequest.medication[x]" />
      <slicing>
        <discriminator>
          <type value="type" />
          <path value="$this" />
        </discriminator>
        <rules value="closed" />
      </slicing>
    </element>
    <element id="MedicationRequest.medication[x]:medicationCodeableConcept">
      <path value="MedicationRequest.medication[x]" />
      <sliceName value="medicationCodeableConcept" />
      <short value="Coded Prescribed Medication" />
      <min value="0" />
      <type>
        <code value="CodeableConcept" />
      </type>
    </element>
    <element id="MedicationRequest.medication[x]:medicationCodeableConcept.coding">
      <path value="MedicationRequest.medication[x].coding" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="system" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="MedicationRequest.medication[x]:medicationCodeableConcept.coding:pbs">
      <path value="MedicationRequest.medication[x].coding" />
      <sliceName value="pbs" />
      <short value="PBS Item Code" />
      <definition value="PBS code from http://pbs.gov.au/code/item. Use of PBS as a code to refer to a type of medication, this excludes implication of context based on the PBS code. Where context is to be implied or stated PBS code needs to be associated with recording a prescription (MedicationRequest) or dispense record(MedicationDispense)" />
      <binding>
        <strength value="preferred" />
        <valueSetReference>
          <reference value="http://hl7.org.au/fhir/ValueSet/pbs-item" />
        </valueSetReference>
      </binding>
    </element>
    <element id="MedicationRequest.medication[x]:medicationCodeableConcept.coding:pbs.system">
      <path value="MedicationRequest.medication[x].coding.system" />
      <min value="1" />
      <fixedUri value="http://pbs.gov.au/code/item" />
    </element>
    <element id="MedicationRequest.medication[x]:medicationCodeableConcept.coding:gtin">
      <path value="MedicationRequest.medication[x].coding" />
      <sliceName value="gtin" />
      <short value="Medication Package Global Trade Item Number (GTIN)" />
      <definition value="GTIN value from http://www.gs1.org/gtin." />
      <binding>
        <strength value="preferred" />
        <valueSetReference>
          <reference value="http://hl7.org.au/fhir/ValueSet/gtin" />
        </valueSetReference>
      </binding>
    </element>
    <element id="MedicationRequest.medication[x]:medicationCodeableConcept.coding:gtin.system">
      <path value="MedicationRequest.medication[x].coding.system" />
      <min value="1" />
      <fixedUri value="http://www.gs1.org/gtin" />
    </element>
    <element id="MedicationRequest.medication[x]:medicationCodeableConcept.coding:amt">
      <path value="MedicationRequest.medication[x].coding" />
      <sliceName value="amt" />
      <short value="AMT Medicines" />
      <binding>
        <strength value="preferred" />
        <valueSetUri value="https://healthterminologies.gov.au/fhir/ValueSet/australian-medication-1" />
      </binding>
    </element>
    <element id="MedicationRequest.medication[x]:medicationCodeableConcept.coding:amt.extension">
      <path value="MedicationRequest.medication[x].coding.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="MedicationRequest.medication[x]:medicationCodeableConcept.coding:amt.extension:medicationClass">
      <path value="MedicationRequest.medication[x].coding.extension" />
      <sliceName value="medicationClass" />
      <short value="Class of Medication Coding" />
      <definition value="General category of coding to allow usage of codes to be distinguished from the same CodeSystem" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org.au/fhir/StructureDefinition/medication-type" />
      </type>
    </element>
    <element id="MedicationRequest.medication[x]:medicationCodeableConcept.coding:amt.system">
      <path value="MedicationRequest.medication[x].coding.system" />
      <min value="1" />
      <fixedUri value="http://snomed.info/sct" />
    </element>
    <element id="MedicationRequest.medication[x]:medicationCodeableConcept.coding:mimsPackage">
      <path value="MedicationRequest.medication[x].coding" />
      <sliceName value="mimsPackage" />
      <short value="MIMS Package" />
      <max value="1" />
      <binding>
        <strength value="preferred" />
        <valueSetReference>
          <reference value="http://hl7.org.au/fhir/ValueSet/mims" />
        </valueSetReference>
      </binding>
    </element>
    <element id="MedicationRequest.medication[x]:medicationCodeableConcept.coding:mimsPackage.system">
      <path value="MedicationRequest.medication[x].coding.system" />
      <min value="1" />
      <fixedUri value="http://www.mims.com.au/codes" />
    </element>
    <element id="MedicationRequest.medication[x]:medicationCodeableConcept.text">
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="MedicationRequest.medication[x].text" />
      <short value="Medication primary text" />
      <definition value="A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.&#xD;&#xA;&#xD;&#xA;This may be a brand or generic name as suitable for the intent of the entry." />
    </element>
    <element id="MedicationRequest.medication[x]:medicationReference">
      <path value="MedicationRequest.medication[x]" />
      <sliceName value="medicationReference" />
      <short value="Prescribed Medication" />
      <min value="0" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org.au/fhir/StructureDefinition/au-medication" />
      </type>
    </element>
    <element id="MedicationRequest.supportingInformation">
      <path value="MedicationRequest.supportingInformation" />
      <slicing>
        <discriminator>
          <type value="profile" />
          <path value="resolve()" />
        </discriminator>
        <ordered value="false" />
        <rules value="open" />
      </slicing>
    </element>
    <element id="MedicationRequest.supportingInformation:bodyHeight">
      <path value="MedicationRequest.supportingInformation" />
      <sliceName value="bodyHeight" />
      <short value="Observation of Body Height" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org.au/fhir/StructureDefinition/au-bodyheight" />
      </type>
    </element>
    <element id="MedicationRequest.supportingInformation:bodyWeight">
      <path value="MedicationRequest.supportingInformation" />
      <sliceName value="bodyWeight" />
      <short value="Observation of Body Weight" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org.au/fhir/StructureDefinition/au-bodyweight" />
      </type>
    </element>
    <element id="MedicationRequest.authoredOn">
      <path value="MedicationRequest.authoredOn" />
      <short value="Created date" />
    </element>
    <element id="MedicationRequest.reasonCode">
      <path value="MedicationRequest.reasonCode" />
      <binding>
        <strength value="preferred" />
        <valueSetUri value="https://healthterminologies.gov.au/fhir/ValueSet/clinical-condition-1" />
      </binding>
    </element>
    <element id="MedicationRequest.dosageInstruction">
      <path value="MedicationRequest.dosageInstruction" />
      <type>
        <code value="Dosage" />
        <profile value="http://hl7.org.au/fhir/StructureDefinition/au-dosage" />
      </type>
    </element>
    <element id="MedicationRequest.dispenseRequest">
      <path value="MedicationRequest.dispenseRequest" />
      <short value="Requested dispensing" />
    </element>
    <element id="MedicationRequest.dispenseRequest.numberOfRepeatsAllowed">
      <path value="MedicationRequest.dispenseRequest.numberOfRepeatsAllowed" />
      <short value="Maximum repeats authorised" />
    </element>
    <element id="MedicationRequest.substitution">
      <path value="MedicationRequest.substitution" />
      <short value="Brand substitution details" />
    </element>
    <element id="MedicationRequest.substitution.allowed">
      <path value="MedicationRequest.substitution.allowed" />
      <short value="Brand substitution flag" />
    </element>
    <element id="MedicationRequest.substitution.reason">
      <path value="MedicationRequest.substitution.reason" />
      <binding>
        <strength value="preferred" />
        <valueSetUri value="https://healthterminologies.gov.au/fhir/ValueSet/medicine-substitution-reason-1" />
      </binding>
    </element>
  </differential>
</StructureDefinition>