<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="SHCIntygsformularLogical" />
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-type-characteristics">
    <valueCode value="can-be-target" />
  </extension>
  <url value="http://electronichealth.se/fhir/shc/StructureDefinition/SHCIntygsformularLogical" />
  <name value="SHCIntygsformularLogical" />
  <title value="Intygsformulär" />
  <status value="draft" />
  <description value="Klassen intygsformulär håller information om formulär med fastställda fält och frågor som är avsedda att fyllas i med olika uppgifter rörande intygsperson." />
  <fhirVersion value="5.0.0" />
  <mapping>
    <identity value="IntygsformularToSHCQuestionnaire" />
    <uri value="SHCQuestionnaire" />
  </mapping>
  <kind value="logical" />
  <abstract value="false" />
  <type value="http://electronichealth.se/fhir/shc/StructureDefinition/SHCIntygsformularLogical" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Base" />
  <derivation value="specialization" />
  <snapshot>
    <element id="SHCIntygsformularLogical">
      <path value="SHCIntygsformularLogical" />
      <short value="Intygsformulär" />
      <definition value="Klassen intygsformulär håller information om formulär med fastställda fält och frågor som är avsedda att fyllas i med olika uppgifter rörande intygsperson." />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="SHCIntygsformularLogical" />
        <min value="0" />
        <max value="*" />
      </base>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="SHCIntygsformularLogical.intygsformularid">
      <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="SHCIntygsformularLogical.intygsformularid" />
      <short value="intygsformulärid" />
      <definition value="Utgivarens identifierare" />
      <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="1" />
      <max value="*" />
      <base>
        <path value="SHCIntygsformularLogical.intygsformularid" />
        <min value="1" />
        <max value="*" />
      </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="IntygsformularToSHCQuestionnaire" />
        <map value="SHCQuestionnaire.identifier" />
      </mapping>
    </element>
    <element id="SHCIntygsformularLogical.typAvIntygsperson">
      <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="SHCIntygsformularLogical.typAvIntygsperson" />
      <short value="typ av intygsperson" />
      <definition value="kod för den typ av roll som intygsperson innehar vid utfärdandet av detta intyg&#xD;&#xA;t.ex. kund, brukare, patient, donator,sökande" />
      <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="1" />
      <max value="1" />
      <base>
        <path value="SHCIntygsformularLogical.typAvIntygsperson" />
        <min value="1" />
        <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="IntygsformularToSHCQuestionnaire" />
        <map value="SHCQuestionnaire.subjectType" />
      </mapping>
    </element>
    <element id="SHCIntygsformularLogical.version">
      <path value="SHCIntygsformularLogical.version" />
      <short value="version" />
      <definition value="ID-beteckning för version, satt av intygsformulärutgivaren" />
      <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="SHCIntygsformularLogical.version" />
        <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="IntygsformularToSHCQuestionnaire" />
        <map value="SHCQuestionnaire.version" />
      </mapping>
    </element>
    <element id="SHCIntygsformularLogical.intygsformularnamn">
      <path value="SHCIntygsformularLogical.intygsformularnamn" />
      <short value="intygsformulärnamn" />
      <definition value="kort, beskrivande och användarvänlig titel för frågeformuläret." />
      <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="SHCIntygsformularLogical.intygsformularnamn" />
        <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="IntygsformularToSHCQuestionnaire" />
        <map value="SHCQuestionnaire.title" />
      </mapping>
    </element>
    <element id="SHCIntygsformularLogical.intygsandamal">
      <path value="SHCIntygsformularLogical.intygsandamal" />
      <short value="intygsändamål" />
      <definition value="textbeskrivning av det ändamål för vilket ett visst intyg utfärdas" />
      <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="SHCIntygsformularLogical.intygsandamal" />
        <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="IntygsformularToSHCQuestionnaire" />
        <map value="SHCQuestionnaire.useContext[purpose]" />
      </mapping>
    </element>
    <element id="SHCIntygsformularLogical.giltighetsperiod">
      <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="SHCIntygsformularLogical.giltighetsperiod" />
      <short value="giltighetsperiod" />
      <definition value="anger den tidsperiod som formuläret är giltigt" />
      <comment value="A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. &quot;the patient was an inpatient of the hospital for this time range&quot;) or one value from the range applies (e.g. &quot;give to the patient between these two times&quot;).&#xA;&#xA;Period is not used for a duration (a measure of elapsed time). See [Duration](datatypes.html#Duration)." />
      <min value="1" />
      <max value="1" />
      <base>
        <path value="SHCIntygsformularLogical.giltighetsperiod" />
        <min value="1" />
        <max value="1" />
      </base>
      <type>
        <code value="Period" />
      </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="per-1" />
        <severity value="error" />
        <human value="If present, start SHALL have a lower or equal value than end" />
        <expression value="start.hasValue().not() or end.hasValue().not() or (start.lowBoundary() &lt;= end.highBoundary())" />
        <source value="http://hl7.org/fhir/StructureDefinition/Period" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="DR" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="IVL&lt;TS&gt;[lowClosed=&quot;true&quot; and highClosed=&quot;true&quot;] or URG&lt;TS&gt;[lowClosed=&quot;true&quot; and highClosed=&quot;true&quot;]" />
      </mapping>
      <mapping>
        <identity value="IntygsformularToSHCQuestionnaire" />
        <map value="SHCQuestionnaire.effectivePeriod" />
      </mapping>
    </element>
    <element id="SHCIntygsformularLogical.intygsformularstatus">
      <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="SHCIntygsformularLogical.intygsformularstatus" />
      <short value="intygsformulärstatus" />
      <definition value="kod för aktuellt status (t.ex. utkast, aktiv)" />
      <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="1" />
      <max value="1" />
      <base>
        <path value="SHCIntygsformularLogical.intygsformularstatus" />
        <min value="1" />
        <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="IntygsformularToSHCQuestionnaire" />
        <map value="SHCQuestionnaire.status" />
      </mapping>
    </element>
    <element id="SHCIntygsformularLogical.intygsbeskrivning">
      <path value="SHCIntygsformularLogical.intygsbeskrivning" />
      <short value="intygsbeskrivning" />
      <definition value="beskrivning av formuläret skriven på ett enkelt och lättförståeligt sätt för användaren." />
      <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="SHCIntygsformularLogical.intygsbeskrivning" />
        <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="IntygsformularToSHCQuestionnaire" />
        <map value="SHCQuestionnaire.description" />
      </mapping>
    </element>
    <element id="SHCIntygsformularLogical.uri">
      <path value="SHCIntygsformularLogical.uri" />
      <short value="uri" />
      <definition value="unik URI som identifierar intygsformuläret och används som dess kanoniska referens" />
      <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="SHCIntygsformularLogical.uri" />
        <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="IntygsformularToSHCQuestionnaire" />
        <map value="SHCQuestionnaire.url" />
      </mapping>
    </element>
    <element id="SHCIntygsformularLogical.intygskategori">
      <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="SHCIntygsformularLogical.intygskategori" />
      <short value="intygskategori" />
      <definition value="kod för gruppering av intyg utifrån visst kriterium&#xD;&#xA;exempel Rättsintyg, Vårdintyg, Hälsointyg, Sjukintyg" />
      <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="1" />
      <max value="1" />
      <base>
        <path value="SHCIntygsformularLogical.intygskategori" />
        <min value="1" />
        <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="IntygsformularToSHCQuestionnaire" />
        <map value="SHCQuestionnaire.useContext[category]" />
      </mapping>
    </element>
    <element id="SHCIntygsformularLogical.publiceringstidpunkt">
      <path value="SHCIntygsformularLogical.publiceringstidpunkt" />
      <short value="publiceringstidpunkt" />
      <definition value="tidpunkt då formuläret publicerades" />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="SHCIntygsformularLogical.publiceringstidpunkt" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="time" />
      </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="IntygsformularToSHCQuestionnaire" />
        <map value="SHCQuestionnaire.approvalDate" />
      </mapping>
    </element>
    <element id="SHCIntygsformularLogical.laghanvisning">
      <path value="SHCIntygsformularLogical.laghanvisning" />
      <short value="laghänvisning" />
      <definition value="vilken författning detta  intygsformulär baseras på" />
      <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="SHCIntygsformularLogical.laghanvisning" />
        <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="IntygsformularToSHCQuestionnaire" />
        <map value="SHCQuestionnaire.useContext[legislation]" />
      </mapping>
    </element>
    <element id="SHCIntygsformularLogical.intygsmottagarroll">
      <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="SHCIntygsformularLogical.intygsmottagarroll" />
      <short value="intygsmottagarroll" />
      <definition value="A reference to a code defined by a terminology system." />
      <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="*" />
      <base>
        <path value="SHCIntygsformularLogical.intygsmottagarroll" />
        <min value="0" />
        <max value="*" />
      </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="IntygsformularToSHCQuestionnaire" />
      </mapping>
    </element>
    <element id="SHCIntygsformularLogical.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="SHCIntygsformularLogical.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="SHCIntygsformularLogical.bestarAv" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="Reference" />
        <targetProfile value="http://electronichealth.se/fhir/shc/StructureDefinition/SHCFragaLogical" />
      </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="IntygsformularToSHCQuestionnaire" />
        <map value="SHCQuestionnaire.item[question]" />
      </mapping>
    </element>
    <element id="SHCIntygsformularLogical.bestarAv2">
      <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="SHCIntygsformularLogical.bestarAv2" />
      <short value="består av2" />
      <definition value="består av2" />
      <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="SHCIntygsformularLogical.bestarAv2" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="Reference" />
        <targetProfile value="http://electronichealth.se/fhir/shc/StructureDefinition/SHCSektionLogical" />
      </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="IntygsformularToSHCQuestionnaire" />
        <map value="SHCQuestionnaire.item[section]" />
      </mapping>
    </element>
  </snapshot>
  <differential>
    <element id="SHCIntygsformularLogical">
      <path value="SHCIntygsformularLogical" />
      <short value="Intygsformulär" />
      <definition value="Klassen intygsformulär håller information om formulär med fastställda fält och frågor som är avsedda att fyllas i med olika uppgifter rörande intygsperson." />
    </element>
    <element id="SHCIntygsformularLogical.intygsformularid">
      <path value="SHCIntygsformularLogical.intygsformularid" />
      <short value="intygsformulärid" />
      <definition value="Utgivarens identifierare" />
      <min value="1" />
      <max value="*" />
      <type>
        <code value="Identifier" />
      </type>
      <mapping>
        <identity value="IntygsformularToSHCQuestionnaire" />
        <map value="SHCQuestionnaire.identifier" />
      </mapping>
    </element>
    <element id="SHCIntygsformularLogical.typAvIntygsperson">
      <path value="SHCIntygsformularLogical.typAvIntygsperson" />
      <short value="typ av intygsperson" />
      <definition value="kod för den typ av roll som intygsperson innehar vid utfärdandet av detta intyg&#xD;&#xA;t.ex. kund, brukare, patient, donator,sökande" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Coding" />
      </type>
      <mapping>
        <identity value="IntygsformularToSHCQuestionnaire" />
        <map value="SHCQuestionnaire.subjectType" />
      </mapping>
    </element>
    <element id="SHCIntygsformularLogical.version">
      <path value="SHCIntygsformularLogical.version" />
      <short value="version" />
      <definition value="ID-beteckning för version, satt av intygsformulärutgivaren" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
      <mapping>
        <identity value="IntygsformularToSHCQuestionnaire" />
        <map value="SHCQuestionnaire.version" />
      </mapping>
    </element>
    <element id="SHCIntygsformularLogical.intygsformularnamn">
      <path value="SHCIntygsformularLogical.intygsformularnamn" />
      <short value="intygsformulärnamn" />
      <definition value="kort, beskrivande och användarvänlig titel för frågeformuläret." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
      <mapping>
        <identity value="IntygsformularToSHCQuestionnaire" />
        <map value="SHCQuestionnaire.title" />
      </mapping>
    </element>
    <element id="SHCIntygsformularLogical.intygsandamal">
      <path value="SHCIntygsformularLogical.intygsandamal" />
      <short value="intygsändamål" />
      <definition value="textbeskrivning av det ändamål för vilket ett visst intyg utfärdas" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
      <mapping>
        <identity value="IntygsformularToSHCQuestionnaire" />
        <map value="SHCQuestionnaire.useContext[purpose]" />
      </mapping>
    </element>
    <element id="SHCIntygsformularLogical.giltighetsperiod">
      <path value="SHCIntygsformularLogical.giltighetsperiod" />
      <short value="giltighetsperiod" />
      <definition value="anger den tidsperiod som formuläret är giltigt" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Period" />
      </type>
      <mapping>
        <identity value="IntygsformularToSHCQuestionnaire" />
        <map value="SHCQuestionnaire.effectivePeriod" />
      </mapping>
    </element>
    <element id="SHCIntygsformularLogical.intygsformularstatus">
      <path value="SHCIntygsformularLogical.intygsformularstatus" />
      <short value="intygsformulärstatus" />
      <definition value="kod för aktuellt status (t.ex. utkast, aktiv)" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Coding" />
      </type>
      <mapping>
        <identity value="IntygsformularToSHCQuestionnaire" />
        <map value="SHCQuestionnaire.status" />
      </mapping>
    </element>
    <element id="SHCIntygsformularLogical.intygsbeskrivning">
      <path value="SHCIntygsformularLogical.intygsbeskrivning" />
      <short value="intygsbeskrivning" />
      <definition value="beskrivning av formuläret skriven på ett enkelt och lättförståeligt sätt för användaren." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
      <mapping>
        <identity value="IntygsformularToSHCQuestionnaire" />
        <map value="SHCQuestionnaire.description" />
      </mapping>
    </element>
    <element id="SHCIntygsformularLogical.uri">
      <path value="SHCIntygsformularLogical.uri" />
      <short value="uri" />
      <definition value="unik URI som identifierar intygsformuläret och används som dess kanoniska referens" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
      <mapping>
        <identity value="IntygsformularToSHCQuestionnaire" />
        <map value="SHCQuestionnaire.url" />
      </mapping>
    </element>
    <element id="SHCIntygsformularLogical.intygskategori">
      <path value="SHCIntygsformularLogical.intygskategori" />
      <short value="intygskategori" />
      <definition value="kod för gruppering av intyg utifrån visst kriterium&#xD;&#xA;exempel Rättsintyg, Vårdintyg, Hälsointyg, Sjukintyg" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Coding" />
      </type>
      <mapping>
        <identity value="IntygsformularToSHCQuestionnaire" />
        <map value="SHCQuestionnaire.useContext[category]" />
      </mapping>
    </element>
    <element id="SHCIntygsformularLogical.publiceringstidpunkt">
      <path value="SHCIntygsformularLogical.publiceringstidpunkt" />
      <short value="publiceringstidpunkt" />
      <definition value="tidpunkt då formuläret publicerades" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="time" />
      </type>
      <mapping>
        <identity value="IntygsformularToSHCQuestionnaire" />
        <map value="SHCQuestionnaire.approvalDate" />
      </mapping>
    </element>
    <element id="SHCIntygsformularLogical.laghanvisning">
      <path value="SHCIntygsformularLogical.laghanvisning" />
      <short value="laghänvisning" />
      <definition value="vilken författning detta  intygsformulär baseras på" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
      <mapping>
        <identity value="IntygsformularToSHCQuestionnaire" />
        <map value="SHCQuestionnaire.useContext[legislation]" />
      </mapping>
    </element>
    <element id="SHCIntygsformularLogical.intygsmottagarroll">
      <path value="SHCIntygsformularLogical.intygsmottagarroll" />
      <short value="intygsmottagarroll" />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="Coding" />
      </type>
      <mapping>
        <identity value="IntygsformularToSHCQuestionnaire" />
      </mapping>
    </element>
    <element id="SHCIntygsformularLogical.bestarAv">
      <path value="SHCIntygsformularLogical.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/SHCFragaLogical" />
      </type>
      <mapping>
        <identity value="IntygsformularToSHCQuestionnaire" />
        <map value="SHCQuestionnaire.item[question]" />
      </mapping>
    </element>
    <element id="SHCIntygsformularLogical.bestarAv2">
      <path value="SHCIntygsformularLogical.bestarAv2" />
      <short value="består av2" />
      <definition value="består av2" />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://electronichealth.se/fhir/shc/StructureDefinition/SHCSektionLogical" />
      </type>
      <mapping>
        <identity value="IntygsformularToSHCQuestionnaire" />
        <map value="SHCQuestionnaire.item[section]" />
      </mapping>
    </element>
  </differential>
</StructureDefinition>