<StructureDefinition xmlns="http://hl7.org/fhir">
  <url value="http://electronichealth.se/fhir/StructureDefinition/NLLPrescriberLocation" />
  <name value="NLLPrescriberLocation" />
  <status value="draft" />
  <fhirVersion value="4.0.0" />
  <mapping>
    <identity value="EHM" />
    <name value="E-hälsomyndigheten interna model" />
  </mapping>
  <kind value="resource" />
  <abstract value="false" />
  <type value="Location" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Location" />
  <derivation value="constraint" />
  <differential>
    <element id="Location.identifier">
      <path value="Location.identifier" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="system" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <mustSupport value="true" />
    </element>
    <element id="Location.identifier:organizationNumber">
      <path value="Location.identifier" />
      <sliceName value="organizationNumber" />
      <short value="Unique identity of the workplace" />
      <definition value="The unique identity of the workplace in the form of an organization number." />
      <max value="1" />
      <mustSupport value="true" />
      <mapping>
        <identity value="EHM" />
        <map value="Arbetsplats.Arbetsplatsid" />
      </mapping>
    </element>
    <element id="Location.identifier:organizationNumber.system">
      <path value="Location.identifier.system" />
      <short value="Swedish organization number" />
      <definition value="Swedish “organisationsnummer” according to SKV 709." />
      <min value="1" />
      <fixedUri value="urn:oid:2.5.4.97" />
      <mustSupport value="true" />
    </element>
    <element id="Location.identifier:organizationNumber.value">
      <path value="Location.identifier.value" />
      <short value="Organization number" />
      <definition value="The organization number of the workplace where where the prescription is made. Swedish “organisationsnummer” according to SKV 709. 10 digits." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Location.name">
      <path value="Location.name" />
      <short value="Name of the workplace" />
      <definition value="The name of the workplace" />
      <mustSupport value="true" />
      <mapping>
        <identity value="EHM" />
        <map value="Arbetsplats.Namn" />
      </mapping>
    </element>
    <element id="Location.telecom">
      <path value="Location.telecom" />
      <short value="Telephone number to the prescriber" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Location.telecom.extension">
      <path value="Location.telecom.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="Location.telecom.extension:nllAvailableToPatient">
      <path value="Location.telecom.extension" />
      <sliceName value="nllAvailableToPatient" />
      <short value="Availble to the patient" />
      <definition value="Indicates if this contact information should be available to the patient." />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://electronichealth.se/fhir/StructureDefinition/NLLAvailableToPatient" />
      </type>
      <mustSupport value="true" />
      <mapping>
        <identity value="EHM" />
        <map value="Kontaktuppgift.Tillgänglig för patient" />
      </mapping>
    </element>
    <element id="Location.telecom.system">
      <path value="Location.telecom.system" />
      <short value="phone" />
      <fixedCode value="phone" />
    </element>
    <element id="Location.telecom.value">
      <path value="Location.telecom.value" />
      <short value="Telephone number" />
      <definition value="A telephone number to the prescriber," />
      <min value="1" />
      <mustSupport value="true" />
      <mapping>
        <identity value="EHM" />
        <map value="Kontaktuppgift.Kontaktväg.Telefon.Telefonnummer" />
      </mapping>
    </element>
    <element id="Location.telecom.rank">
      <path value="Location.telecom.rank" />
      <short value="Order of use" />
      <mustSupport value="true" />
      <mapping>
        <identity value="EHM" />
        <map value="Kontaktuppgift.Kontaktväg.Rangordning" />
      </mapping>
    </element>
    <element id="Location.address">
      <path value="Location.address" />
      <short value="Address to the prescriber" />
      <mustSupport value="true" />
    </element>
    <element id="Location.address.extension">
      <path value="Location.address.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="Location.address.extension:nllAvailableToPatient">
      <path value="Location.address.extension" />
      <sliceName value="nllAvailableToPatient" />
      <short value="Available to the patient" />
      <definition value="Indicates if this contact information should be available to the patient." />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://electronichealth.se/fhir/StructureDefinition/NLLAvailableToPatient" />
      </type>
      <mustSupport value="true" />
      <mapping>
        <identity value="EHM" />
        <map value="Kontaktuppgift.Tillgänglig för patient" />
      </mapping>
    </element>
    <element id="Location.address.type">
      <path value="Location.address.type" />
      <definition value="Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both. In swedish: Postadress or Besöksadress." />
      <mustSupport value="true" />
      <mapping>
        <identity value="EHM" />
        <map value="Adress.Adresstyp" />
      </mapping>
    </element>
    <element id="Location.address.line">
      <path value="Location.address.line" />
      <short value="Street address" />
      <definition value="This component contains the house number, apartment number, street name, street direction,  P.O. Box number. In swedish: Adress" />
      <mustSupport value="true" />
      <mapping>
        <identity value="EHM" />
        <map value="Adress.Adress" />
      </mapping>
    </element>
    <element id="Location.address.city">
      <path value="Location.address.city" />
      <short value="Name of postal area" />
      <definition value="The name of the city, town, suburb, village or other community or delivery center. In swedish: Postort" />
      <mustSupport value="true" />
      <mapping>
        <identity value="EHM" />
        <map value="Adress.Postort" />
      </mapping>
    </element>
    <element id="Location.address.postalCode">
      <path value="Location.address.postalCode" />
      <short value="Postal code" />
      <definition value="A postal code designating a region defined by the postal service. Swedish: Postnummer. 5 digits." />
      <mustSupport value="true" />
      <mapping>
        <identity value="EHM" />
        <map value="Adress.Postnummer" />
      </mapping>
    </element>
  </differential>
</StructureDefinition>