<StructureDefinition xmlns="http://hl7.org/fhir">
  <url value="http://electronichealth.se/fhir/StructureDefinition/NLLPowAttConsent" />
  <name value="NLLPowAttConsent" />
  <status value="draft" />
  <description value="OLD! Togs fram innan fullmakter pausades i NLL 1.0. Represents a power of attorney between a patient and another person (related person or in its practtice) or care organization for e.g. purchase of medication or access to the medication list." />
  <fhirVersion value="4.0.0" />
  <mapping>
    <identity value="EHM" />
    <name value="eHälsomyndighetens informationsmodell" />
  </mapping>
  <kind value="resource" />
  <abstract value="false" />
  <type value="Consent" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Consent" />
  <derivation value="constraint" />
  <differential>
    <element id="Consent.extension">
      <path value="Consent.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="Consent.extension:registeringOrganization">
      <path value="Consent.extension" />
      <sliceName value="registeringOrganization" />
      <type>
        <code value="Extension" />
        <profile value="http://electronichealth.se/fhir/StructureDefinition/organizationRef" />
      </type>
      <mapping>
        <identity value="EHM" />
        <map value="Fullmakt.registrerandeOrganisatoriskEnhet" />
      </mapping>
    </element>
    <element id="Consent.extension:documentType">
      <path value="Consent.extension" />
      <sliceName value="documentType" />
      <type>
        <code value="Extension" />
        <profile value="http://electronichealth.se/fhir/StructureDefinition/DocumentType" />
      </type>
      <binding>
        <strength value="required" />
        <valueSet value="http://electronichealth.se/fhir/ValueSet/DocumentTypes" />
      </binding>
      <mapping>
        <identity value="EHM" />
        <map value="UnderlagTyp" />
      </mapping>
    </element>
    <element id="Consent.extension:submittedBy">
      <path value="Consent.extension" />
      <sliceName value="submittedBy" />
      <type>
        <code value="Extension" />
        <profile value="http://electronichealth.se/fhir/StructureDefinition/TypeOfSubmitter" />
      </type>
      <binding>
        <strength value="required" />
        <valueSet value="http://electronichealth.se/fhir/ValueSet/pow-att-submitter-type" />
      </binding>
      <mapping>
        <identity value="EHM" />
        <map value="InlämnadAvRollTyp" />
      </mapping>
    </element>
    <element id="Consent.extension:consentingDelegate">
      <path value="Consent.extension" />
      <sliceName value="consentingDelegate" />
      <type>
        <code value="Extension" />
        <profile value="http://electronichealth.se/fhir/StructureDefinition/ConsentingPart" />
      </type>
      <mapping>
        <identity value="EHM" />
        <map value="Fullmaktsgivare" />
        <comment value="Fullmaktsgivare samt FullmaktsgivareRollTyp" />
      </mapping>
    </element>
    <element id="Consent.extension:consentingParty">
      <path value="Consent.extension" />
      <sliceName value="consentingParty" />
      <type>
        <code value="Extension" />
        <profile value="http://electronichealth.se/fhir/StructureDefinition/ConsentingPart" />
      </type>
      <mapping>
        <identity value="EHM" />
        <map value="Fullmaktstagare" />
      </mapping>
    </element>
    <element id="Consent.identifier">
      <path value="Consent.identifier" />
      <mustSupport value="true" />
    </element>
    <element id="Consent.status">
      <path value="Consent.status" />
      <short value="proposed | active | inactive" />
      <definition value="Indicates the current state of this consent. Supported states are: proposed, active, inactive" />
      <mustSupport value="true" />
      <mapping>
        <identity value="EHM" />
        <map value="Fullmakt.status" />
      </mapping>
    </element>
    <element id="Consent.category">
      <path value="Consent.category" />
      <binding>
        <strength value="required" />
        <valueSet value="http://electronichealth.se/fhir/ValueSet/pow-att-types" />
      </binding>
      <mapping>
        <identity value="EHM" />
        <map value="FullmaktTyp" />
      </mapping>
    </element>
    <element id="Consent.category.coding.system">
      <path value="Consent.category.coding.system" />
      <fixedUri value="http://electronichealth.se/fhir/ValueSet/pow-att-types" />
      <binding>
        <strength value="required" />
        <description value="Type of power of attorney" />
      </binding>
    </element>
    <element id="Consent.patient">
      <path value="Consent.patient" />
      <mustSupport value="true" />
      <mapping>
        <identity value="EHM" />
        <map value="patientRef" />
      </mapping>
    </element>
    <element id="Consent.dateTime">
      <path value="Consent.dateTime" />
      <mustSupport value="true" />
      <mapping>
        <identity value="EHM" />
        <map value="Fullmakt.giltigFrom giltigTom" />
      </mapping>
    </element>
    <element id="Consent.provision.dataPeriod">
      <path value="Consent.provision.dataPeriod" />
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>