<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="SHCHalsoOchSjukvardspersonalLogical" />
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-type-characteristics">
    <valueCode value="can-be-target" />
  </extension>
  <url value="http://electronichealth.se/fhir/shc/StructureDefinition/SHCHalsoOchSjukvardspersonalLogical" />
  <name value="SHCHalsoOchSjukvardspersonalLogical" />
  <title value="Hälso- och sjukvårdspersonal" />
  <status value="draft" />
  <description value="Klassen Hälso- och sjukvårdspersonal håller information om person eller personer som i sitt yrke utför hälso- och sjukvård." />
  <fhirVersion value="5.0.0" />
  <mapping>
    <identity value="HalsoOchSjukvardspersonalToSHCPractitioner" />
    <uri value="SHCPractitioner" />
  </mapping>
  <kind value="logical" />
  <abstract value="false" />
  <type value="http://electronichealth.se/fhir/shc/StructureDefinition/SHCHalsoOchSjukvardspersonalLogical" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Base" />
  <derivation value="specialization" />
  <snapshot>
    <element id="SHCHalsoOchSjukvardspersonalLogical">
      <path value="SHCHalsoOchSjukvardspersonalLogical" />
      <short value="Hälso- och sjukvårdspersonal" />
      <definition value="Klassen Hälso- och sjukvårdspersonal håller information om person eller personer som i sitt yrke utför hälso- och sjukvård." />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="SHCHalsoOchSjukvardspersonalLogical" />
        <min value="0" />
        <max value="*" />
      </base>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="SHCHalsoOchSjukvardspersonalLogical.halso-OchSjukvardspersonalsid">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="SHCHalsoOchSjukvardspersonalLogical.halso-OchSjukvardspersonalsid" />
      <short value="hälso- och sjukvårdspersonalsid" />
      <definition value="unikt id för en person som utför hälso-och sjukvård" />
      <comment value="The rules of the identifier.type  determine if a check digit is part of the ID value or sent separately, such as through the checkDigit extension." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="SHCHalsoOchSjukvardspersonalLogical.halso-OchSjukvardspersonalsid" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="Identifier" />
      </type>
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <constraint>
        <key value="ident-1" />
        <severity value="warning" />
        <human value="Identifier with no value has limited utility.  If communicating that an identifier value has been suppressed or missing, the value element SHOULD be present with an extension indicating the missing semantic - e.g. data-absent-reason" />
        <expression value="value.exists()" />
        <source value="http://hl7.org/fhir/StructureDefinition/Identifier" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="CX / EI (occasionally, more often EI maps to a resource id or a URL)" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="II - The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs.  Also maps to Role[classCode=IDENT]" />
      </mapping>
      <mapping>
        <identity value="servd" />
        <map value="Identifier" />
      </mapping>
      <mapping>
        <identity value="HalsoOchSjukvardspersonalToSHCPractitioner" />
        <map value="SHCPractitioner.id" />
      </mapping>
    </element>
    <element id="SHCHalsoOchSjukvardspersonalLogical.hSA-IDPerson">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="SHCHalsoOchSjukvardspersonalLogical.hSA-IDPerson" />
      <short value="HSA-ID person" />
      <definition value="unikt ID som används inom vård och omsorg i Sverige för att identifiera personer, enheter och system i HSA-katalogen" />
      <comment value="The rules of the identifier.type  determine if a check digit is part of the ID value or sent separately, such as through the checkDigit extension." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="SHCHalsoOchSjukvardspersonalLogical.hSA-IDPerson" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="Identifier" />
      </type>
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <constraint>
        <key value="ident-1" />
        <severity value="warning" />
        <human value="Identifier with no value has limited utility.  If communicating that an identifier value has been suppressed or missing, the value element SHOULD be present with an extension indicating the missing semantic - e.g. data-absent-reason" />
        <expression value="value.exists()" />
        <source value="http://hl7.org/fhir/StructureDefinition/Identifier" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="CX / EI (occasionally, more often EI maps to a resource id or a URL)" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="II - The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs.  Also maps to Role[classCode=IDENT]" />
      </mapping>
      <mapping>
        <identity value="servd" />
        <map value="Identifier" />
      </mapping>
      <mapping>
        <identity value="HalsoOchSjukvardspersonalToSHCPractitioner" />
        <map value="SHCPractitioner.identifier[hsaid]" />
      </mapping>
    </element>
    <element id="SHCHalsoOchSjukvardspersonalLogical.befattning">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="SHCHalsoOchSjukvardspersonalLogical.befattning" />
      <short value="befattning" />
      <definition value="kod för den befattning som hälso- och sjukvårdspersonal innehar" />
      <comment value="Codes may be defined very casually in enumerations or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="SHCHalsoOchSjukvardspersonalLogical.befattning" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="Coding" />
      </type>
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <constraint>
        <key value="cod-1" />
        <severity value="warning" />
        <human value="A Coding SHOULD NOT have a display unless a code is also present.  Computation on Coding.display alone is generally unsafe.  Consider using CodeableConcept.text" />
        <expression value="code.exists().not() implies display.exists().not()" />
        <source value="http://hl7.org/fhir/StructureDefinition/Coding" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="CV" />
      </mapping>
      <mapping>
        <identity value="orim" />
        <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" />
      </mapping>
      <mapping>
        <identity value="HalsoOchSjukvardspersonalToSHCPractitioner" />
        <map value="SHCPractitioner.qualification.code.coding[hsa-befattning]" />
      </mapping>
    </element>
    <element id="SHCHalsoOchSjukvardspersonalLogical.forskrivarkod">
      <path value="SHCHalsoOchSjukvardspersonalLogical.forskrivarkod" />
      <short value="förskrivarkod" />
      <definition value="kod för personlig identifikation av en förskrivare" />
      <comment value="Note that FHIR strings SHALL NOT exceed 1,048,576 (1024*1024) characters in size" />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="SHCHalsoOchSjukvardspersonalLogical.forskrivarkod" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="string" />
      </type>
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="HalsoOchSjukvardspersonalToSHCPractitioner" />
        <map value="SHCPractitioner.qualification.identifier[prescriber]" />
      </mapping>
    </element>
    <element id="SHCHalsoOchSjukvardspersonalLogical.arbetsplatskod">
      <path value="SHCHalsoOchSjukvardspersonalLogical.arbetsplatskod" />
      <short value="arbetsplatskod" />
      <definition value="kod som identifierar den arbetsplats där förskrivning sker" />
      <comment value="Note that FHIR strings SHALL NOT exceed 1,048,576 (1024*1024) characters in size" />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="SHCHalsoOchSjukvardspersonalLogical.arbetsplatskod" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="string" />
      </type>
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="HalsoOchSjukvardspersonalToSHCPractitioner" />
      </mapping>
    </element>
    <element id="SHCHalsoOchSjukvardspersonalLogical.harRollen">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="SHCHalsoOchSjukvardspersonalLogical.harRollen" />
      <short value="har rollen" />
      <definition value="har rollen" />
      <comment value="References SHALL be a reference to an actual FHIR resource, and SHALL be resolvable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository." />
      <min value="1" />
      <max value="1" />
      <base>
        <path value="SHCHalsoOchSjukvardspersonalLogical.harRollen" />
        <min value="1" />
        <max value="1" />
      </base>
      <type>
        <code value="Reference" />
        <targetProfile value="http://electronichealth.se/fhir/shc/StructureDefinition/SHCPersonLogical" />
      </type>
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <constraint>
        <key value="ref-1" />
        <severity value="error" />
        <human value="SHALL have a contained resource if a local reference is provided" />
        <expression value="reference.exists()  implies (reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids')) or (reference='#' and %rootResource!=%resource))" />
        <source value="http://hl7.org/fhir/StructureDefinition/Reference" />
      </constraint>
      <constraint>
        <key value="ref-2" />
        <severity value="error" />
        <human value="At least one of reference, identifier and display SHALL be present (unless an extension is provided)." />
        <expression value="reference.exists() or identifier.exists() or display.exists() or extension.exists()" />
        <source value="http://hl7.org/fhir/StructureDefinition/Reference" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" />
      </mapping>
      <mapping>
        <identity value="HalsoOchSjukvardspersonalToSHCPractitioner" />
        <map value="SHCPractitioner." />
      </mapping>
    </element>
  </snapshot>
  <differential>
    <element id="SHCHalsoOchSjukvardspersonalLogical">
      <path value="SHCHalsoOchSjukvardspersonalLogical" />
      <short value="Hälso- och sjukvårdspersonal" />
      <definition value="Klassen Hälso- och sjukvårdspersonal håller information om person eller personer som i sitt yrke utför hälso- och sjukvård." />
    </element>
    <element id="SHCHalsoOchSjukvardspersonalLogical.halso-OchSjukvardspersonalsid">
      <path value="SHCHalsoOchSjukvardspersonalLogical.halso-OchSjukvardspersonalsid" />
      <short value="hälso- och sjukvårdspersonalsid" />
      <definition value="unikt id för en person som utför hälso-och sjukvård" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Identifier" />
      </type>
      <mapping>
        <identity value="HalsoOchSjukvardspersonalToSHCPractitioner" />
        <map value="SHCPractitioner.id" />
      </mapping>
    </element>
    <element id="SHCHalsoOchSjukvardspersonalLogical.hSA-IDPerson">
      <path value="SHCHalsoOchSjukvardspersonalLogical.hSA-IDPerson" />
      <short value="HSA-ID person" />
      <definition value="unikt ID som används inom vård och omsorg i Sverige för att identifiera personer, enheter och system i HSA-katalogen" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Identifier" />
      </type>
      <mapping>
        <identity value="HalsoOchSjukvardspersonalToSHCPractitioner" />
        <map value="SHCPractitioner.identifier[hsaid]" />
      </mapping>
    </element>
    <element id="SHCHalsoOchSjukvardspersonalLogical.befattning">
      <path value="SHCHalsoOchSjukvardspersonalLogical.befattning" />
      <short value="befattning" />
      <definition value="kod för den befattning som hälso- och sjukvårdspersonal innehar" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Coding" />
      </type>
      <mapping>
        <identity value="HalsoOchSjukvardspersonalToSHCPractitioner" />
        <map value="SHCPractitioner.qualification.code.coding[hsa-befattning]" />
      </mapping>
    </element>
    <element id="SHCHalsoOchSjukvardspersonalLogical.forskrivarkod">
      <path value="SHCHalsoOchSjukvardspersonalLogical.forskrivarkod" />
      <short value="förskrivarkod" />
      <definition value="kod för personlig identifikation av en förskrivare" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
      <mapping>
        <identity value="HalsoOchSjukvardspersonalToSHCPractitioner" />
        <map value="SHCPractitioner.qualification.identifier[prescriber]" />
      </mapping>
    </element>
    <element id="SHCHalsoOchSjukvardspersonalLogical.arbetsplatskod">
      <path value="SHCHalsoOchSjukvardspersonalLogical.arbetsplatskod" />
      <short value="arbetsplatskod" />
      <definition value="kod som identifierar den arbetsplats där förskrivning sker" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
      <mapping>
        <identity value="HalsoOchSjukvardspersonalToSHCPractitioner" />
      </mapping>
    </element>
    <element id="SHCHalsoOchSjukvardspersonalLogical.harRollen">
      <path value="SHCHalsoOchSjukvardspersonalLogical.harRollen" />
      <short value="har rollen" />
      <definition value="har rollen" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://electronichealth.se/fhir/shc/StructureDefinition/SHCPersonLogical" />
      </type>
      <mapping>
        <identity value="HalsoOchSjukvardspersonalToSHCPractitioner" />
        <map value="SHCPractitioner." />
      </mapping>
    </element>
  </differential>
</StructureDefinition>