<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="SHCSektionIUtfardatIntygLogical" />
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-type-characteristics">
    <valueCode value="can-be-target" />
  </extension>
  <url value="http://electronichealth.se/fhir/shc/StructureDefinition/SHCSektionIUtfardatIntygLogical" />
  <name value="SHCSektionIUtfardatIntygLogical" />
  <title value="Sektion i utfärdat intyg" />
  <status value="draft" />
  <description value="Klassen Sektion i utfärdat intyg håller information om det element som organiserar innehållet i ett intygsformulär i logiska sektioner i det utfärdade intyget." />
  <fhirVersion value="5.0.0" />
  <mapping>
    <identity value="SektionIUtfardatIntygToSHCQuestionnaireResponse.item.section" />
    <uri value="SHCQuestionnaireResponse.item.section" />
  </mapping>
  <kind value="logical" />
  <abstract value="false" />
  <type value="http://electronichealth.se/fhir/shc/StructureDefinition/SHCSektionIUtfardatIntygLogical" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Base" />
  <derivation value="specialization" />
  <snapshot>
    <element id="SHCSektionIUtfardatIntygLogical">
      <path value="SHCSektionIUtfardatIntygLogical" />
      <short value="Sektion i utfärdat intyg" />
      <definition value="Klassen Sektion i utfärdat intyg håller information om det element som organiserar innehållet i ett intygsformulär i logiska sektioner i det utfärdade intyget." />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="SHCSektionIUtfardatIntygLogical" />
        <min value="0" />
        <max value="*" />
      </base>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="SHCSektionIUtfardatIntygLogical.linkid">
      <path value="SHCSektionIUtfardatIntygLogical.linkid" />
      <short value="linkid" />
      <definition value="unikt ID för sektion i intygsformulär som möjliggör länkning till motsvarande objekt i en QuestionnaireResponse-resurs" />
      <comment value="Note that FHIR strings SHALL NOT exceed 1,048,576 (1024*1024) characters in size" />
      <min value="1" />
      <max value="1" />
      <base>
        <path value="SHCSektionIUtfardatIntygLogical.linkid" />
        <min value="1" />
        <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="SektionIUtfardatIntygToSHCQuestionnaireResponse.item.section" />
        <map value="(SHCQuestionnaireResponse)item[section].linkId" />
      </mapping>
    </element>
    <element id="SHCSektionIUtfardatIntygLogical.text">
      <path value="SHCSektionIUtfardatIntygLogical.text" />
      <short value="text" />
      <definition value="text som visas" />
      <comment value="Note that FHIR strings SHALL NOT exceed 1,048,576 (1024*1024) characters in size" />
      <min value="1" />
      <max value="1" />
      <base>
        <path value="SHCSektionIUtfardatIntygLogical.text" />
        <min value="1" />
        <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="SektionIUtfardatIntygToSHCQuestionnaireResponse.item.section" />
        <map value="(SHCQuestionnaireResponse)item[section].text" />
      </mapping>
    </element>
    <element id="SHCSektionIUtfardatIntygLogical.bestarAv">
      <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="SHCSektionIUtfardatIntygLogical.bestarAv" />
      <short value="består av" />
      <definition value="består av" />
      <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="0" />
      <max value="*" />
      <base>
        <path value="SHCSektionIUtfardatIntygLogical.bestarAv" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="Reference" />
        <targetProfile value="http://electronichealth.se/fhir/shc/StructureDefinition/SHCSvarLogical" />
      </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="SektionIUtfardatIntygToSHCQuestionnaireResponse.item.section" />
      </mapping>
    </element>
  </snapshot>
  <differential>
    <element id="SHCSektionIUtfardatIntygLogical">
      <path value="SHCSektionIUtfardatIntygLogical" />
      <short value="Sektion i utfärdat intyg" />
      <definition value="Klassen Sektion i utfärdat intyg håller information om det element som organiserar innehållet i ett intygsformulär i logiska sektioner i det utfärdade intyget." />
    </element>
    <element id="SHCSektionIUtfardatIntygLogical.linkid">
      <path value="SHCSektionIUtfardatIntygLogical.linkid" />
      <short value="linkid" />
      <definition value="unikt ID för sektion i intygsformulär som möjliggör länkning till motsvarande objekt i en QuestionnaireResponse-resurs" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
      <mapping>
        <identity value="SektionIUtfardatIntygToSHCQuestionnaireResponse.item.section" />
        <map value="(SHCQuestionnaireResponse)item[section].linkId" />
      </mapping>
    </element>
    <element id="SHCSektionIUtfardatIntygLogical.text">
      <path value="SHCSektionIUtfardatIntygLogical.text" />
      <short value="text" />
      <definition value="text som visas" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
      <mapping>
        <identity value="SektionIUtfardatIntygToSHCQuestionnaireResponse.item.section" />
        <map value="(SHCQuestionnaireResponse)item[section].text" />
      </mapping>
    </element>
    <element id="SHCSektionIUtfardatIntygLogical.bestarAv">
      <path value="SHCSektionIUtfardatIntygLogical.bestarAv" />
      <short value="består av" />
      <definition value="består av" />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://electronichealth.se/fhir/shc/StructureDefinition/SHCSvarLogical" />
      </type>
      <mapping>
        <identity value="SektionIUtfardatIntygToSHCQuestionnaireResponse.item.section" />
      </mapping>
    </element>
  </differential>
</StructureDefinition>