<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="DataStandardsWales-MedicationList" />
  <url value="https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-MedicationList" />
  <version value="1.1.1" />
  <name value="DataStandardsWalesMedicationList" />
  <title value="Data Standards Wales Medication List" />
  <status value="active" />
  <experimental value="false" />
  <date value="2023-08-02" />
  <publisher value="NHS Wales" />
  <copyright value="2024 NHS Wales." />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="List" />
  <baseDefinition value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-List" />
  <derivation value="constraint" />
  <differential>
    <element id="List.code">
      <path value="List.code" />
      <min value="1" />
      <fixedCodeableConcept>
        <coding>
          <system value="http://snomed.info/sct" />
          <code value="933361000000108" />
          <display value="Medications and medical devices" />
        </coding>
      </fixedCodeableConcept>
    </element>
    <element id="List.subject">
      <path value="List.subject" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-Patient" />
      </type>
    </element>
    <element id="List.encounter">
      <path value="List.encounter" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-Encounter" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="List.source">
      <path value="List.source" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-Patient" />
        <targetProfile value="https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-Practitioner" />
        <targetProfile value="https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-PractitionerRole" />
        <targetProfile value="https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-Device" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="List.note.author[x]">
      <path value="List.note.author[x]" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-Patient" />
        <targetProfile value="https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-Practitioner" />
        <targetProfile value="https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-Organization" />
        <targetProfile value="https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-RelatedPerson" />
      </type>
      <type>
        <code value="string" />
      </type>
    </element>
    <element id="List.entry">
      <path value="List.entry" />
      <mustSupport value="true" />
    </element>
    <element id="List.entry.item">
      <path value="List.entry.item" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-MedicationStatement" />
      </type>
    </element>
  </differential>
</StructureDefinition>