{
  "resourceType": "StructureDefinition",
  "id": "SHCIntygsformularLogical",
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-type-characteristics",
      "valueCode": "can-be-target"
    }
  ],
  "url": "http://electronichealth.se/fhir/shc/StructureDefinition/SHCIntygsformularLogical",
  "name": "SHCIntygsformularLogical",
  "title": "Intygsformulär",
  "status": "draft",
  "description": "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": "5.0.0",
  "mapping": [
    {
      "identity": "IntygsformularToSHCQuestionnaire",
      "uri": "SHCQuestionnaire"
    }
  ],
  "kind": "logical",
  "abstract": false,
  "type": "http://electronichealth.se/fhir/shc/StructureDefinition/SHCIntygsformularLogical",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Base",
  "derivation": "specialization",
  "snapshot": {
    "element": [
      {
        "id": "SHCIntygsformularLogical",
        "path": "SHCIntygsformularLogical",
        "short": "Intygsformulär",
        "definition": "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": 0,
        "max": "*",
        "base": {
          "path": "SHCIntygsformularLogical",
          "min": 0,
          "max": "*"
        },
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "SHCIntygsformularLogical.intygsformularid",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
            "valueCode": "normative"
          },
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
            "valueCode": "4.0.0"
          }
        ],
        "path": "SHCIntygsformularLogical.intygsformularid",
        "short": "intygsformulärid",
        "definition": "Utgivarens identifierare",
        "comment": "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": 1,
        "max": "*",
        "base": {
          "path": "SHCIntygsformularLogical.intygsformularid",
          "min": 1,
          "max": "*"
        },
        "type": [
          {
            "code": "Identifier"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "ident-1",
            "severity": "warning",
            "human": "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.exists()",
            "source": "http://hl7.org/fhir/StructureDefinition/Identifier"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "v2",
            "map": "CX / EI (occasionally, more often EI maps to a resource id or a URL)"
          },
          {
            "identity": "rim",
            "map": "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]"
          },
          {
            "identity": "servd",
            "map": "Identifier"
          },
          {
            "identity": "IntygsformularToSHCQuestionnaire",
            "map": "SHCQuestionnaire.identifier"
          }
        ]
      },
      {
        "id": "SHCIntygsformularLogical.typAvIntygsperson",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
            "valueCode": "normative"
          },
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
            "valueCode": "4.0.0"
          }
        ],
        "path": "SHCIntygsformularLogical.typAvIntygsperson",
        "short": "typ av intygsperson",
        "definition": "kod för den typ av roll som intygsperson innehar vid utfärdandet av detta intyg\r\nt.ex. kund, brukare, patient, donator,sökande",
        "comment": "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": 1,
        "max": "1",
        "base": {
          "path": "SHCIntygsformularLogical.typAvIntygsperson",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "Coding"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "cod-1",
            "severity": "warning",
            "human": "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": "code.exists().not() implies display.exists().not()",
            "source": "http://hl7.org/fhir/StructureDefinition/Coding"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "v2",
            "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6"
          },
          {
            "identity": "rim",
            "map": "CV"
          },
          {
            "identity": "orim",
            "map": "fhir:Coding rdfs:subClassOf dt:CDCoding"
          },
          {
            "identity": "IntygsformularToSHCQuestionnaire",
            "map": "SHCQuestionnaire.subjectType"
          }
        ]
      },
      {
        "id": "SHCIntygsformularLogical.version",
        "path": "SHCIntygsformularLogical.version",
        "short": "version",
        "definition": "ID-beteckning för version, satt av intygsformulärutgivaren",
        "comment": "Note that FHIR strings SHALL NOT exceed 1,048,576 (1024*1024) characters in size",
        "min": 1,
        "max": "1",
        "base": {
          "path": "SHCIntygsformularLogical.version",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "IntygsformularToSHCQuestionnaire",
            "map": "SHCQuestionnaire.version"
          }
        ]
      },
      {
        "id": "SHCIntygsformularLogical.intygsformularnamn",
        "path": "SHCIntygsformularLogical.intygsformularnamn",
        "short": "intygsformulärnamn",
        "definition": "kort, beskrivande och användarvänlig titel för frågeformuläret.",
        "comment": "Note that FHIR strings SHALL NOT exceed 1,048,576 (1024*1024) characters in size",
        "min": 1,
        "max": "1",
        "base": {
          "path": "SHCIntygsformularLogical.intygsformularnamn",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "IntygsformularToSHCQuestionnaire",
            "map": "SHCQuestionnaire.title"
          }
        ]
      },
      {
        "id": "SHCIntygsformularLogical.intygsandamal",
        "path": "SHCIntygsformularLogical.intygsandamal",
        "short": "intygsändamål",
        "definition": "textbeskrivning av det ändamål för vilket ett visst intyg utfärdas",
        "comment": "Note that FHIR strings SHALL NOT exceed 1,048,576 (1024*1024) characters in size",
        "min": 1,
        "max": "1",
        "base": {
          "path": "SHCIntygsformularLogical.intygsandamal",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "IntygsformularToSHCQuestionnaire",
            "map": "SHCQuestionnaire.useContext[purpose]"
          }
        ]
      },
      {
        "id": "SHCIntygsformularLogical.giltighetsperiod",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
            "valueCode": "normative"
          },
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
            "valueCode": "4.0.0"
          }
        ],
        "path": "SHCIntygsformularLogical.giltighetsperiod",
        "short": "giltighetsperiod",
        "definition": "anger den tidsperiod som formuläret är giltigt",
        "comment": "A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. \"the patient was an inpatient of the hospital for this time range\") or one value from the range applies (e.g. \"give to the patient between these two times\").\n\nPeriod is not used for a duration (a measure of elapsed time). See [Duration](datatypes.html#Duration).",
        "min": 1,
        "max": "1",
        "base": {
          "path": "SHCIntygsformularLogical.giltighetsperiod",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "Period"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "per-1",
            "severity": "error",
            "human": "If present, start SHALL have a lower or equal value than end",
            "expression": "start.hasValue().not() or end.hasValue().not() or (start.lowBoundary() <= end.highBoundary())",
            "source": "http://hl7.org/fhir/StructureDefinition/Period"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "v2",
            "map": "DR"
          },
          {
            "identity": "rim",
            "map": "IVL<TS>[lowClosed=\"true\" and highClosed=\"true\"] or URG<TS>[lowClosed=\"true\" and highClosed=\"true\"]"
          },
          {
            "identity": "IntygsformularToSHCQuestionnaire",
            "map": "SHCQuestionnaire.effectivePeriod"
          }
        ]
      },
      {
        "id": "SHCIntygsformularLogical.intygsformularstatus",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
            "valueCode": "normative"
          },
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
            "valueCode": "4.0.0"
          }
        ],
        "path": "SHCIntygsformularLogical.intygsformularstatus",
        "short": "intygsformulärstatus",
        "definition": "kod för aktuellt status (t.ex. utkast, aktiv)",
        "comment": "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": 1,
        "max": "1",
        "base": {
          "path": "SHCIntygsformularLogical.intygsformularstatus",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "Coding"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "cod-1",
            "severity": "warning",
            "human": "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": "code.exists().not() implies display.exists().not()",
            "source": "http://hl7.org/fhir/StructureDefinition/Coding"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "v2",
            "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6"
          },
          {
            "identity": "rim",
            "map": "CV"
          },
          {
            "identity": "orim",
            "map": "fhir:Coding rdfs:subClassOf dt:CDCoding"
          },
          {
            "identity": "IntygsformularToSHCQuestionnaire",
            "map": "SHCQuestionnaire.status"
          }
        ]
      },
      {
        "id": "SHCIntygsformularLogical.intygsbeskrivning",
        "path": "SHCIntygsformularLogical.intygsbeskrivning",
        "short": "intygsbeskrivning",
        "definition": "beskrivning av formuläret skriven på ett enkelt och lättförståeligt sätt för användaren.",
        "comment": "Note that FHIR strings SHALL NOT exceed 1,048,576 (1024*1024) characters in size",
        "min": 1,
        "max": "1",
        "base": {
          "path": "SHCIntygsformularLogical.intygsbeskrivning",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "IntygsformularToSHCQuestionnaire",
            "map": "SHCQuestionnaire.description"
          }
        ]
      },
      {
        "id": "SHCIntygsformularLogical.uri",
        "path": "SHCIntygsformularLogical.uri",
        "short": "uri",
        "definition": "unik URI som identifierar intygsformuläret och används som dess kanoniska referens",
        "comment": "Note that FHIR strings SHALL NOT exceed 1,048,576 (1024*1024) characters in size",
        "min": 1,
        "max": "1",
        "base": {
          "path": "SHCIntygsformularLogical.uri",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "IntygsformularToSHCQuestionnaire",
            "map": "SHCQuestionnaire.url"
          }
        ]
      },
      {
        "id": "SHCIntygsformularLogical.intygskategori",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
            "valueCode": "normative"
          },
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
            "valueCode": "4.0.0"
          }
        ],
        "path": "SHCIntygsformularLogical.intygskategori",
        "short": "intygskategori",
        "definition": "kod för gruppering av intyg utifrån visst kriterium\r\nexempel Rättsintyg, Vårdintyg, Hälsointyg, Sjukintyg",
        "comment": "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": 1,
        "max": "1",
        "base": {
          "path": "SHCIntygsformularLogical.intygskategori",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "Coding"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "cod-1",
            "severity": "warning",
            "human": "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": "code.exists().not() implies display.exists().not()",
            "source": "http://hl7.org/fhir/StructureDefinition/Coding"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "v2",
            "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6"
          },
          {
            "identity": "rim",
            "map": "CV"
          },
          {
            "identity": "orim",
            "map": "fhir:Coding rdfs:subClassOf dt:CDCoding"
          },
          {
            "identity": "IntygsformularToSHCQuestionnaire",
            "map": "SHCQuestionnaire.useContext[category]"
          }
        ]
      },
      {
        "id": "SHCIntygsformularLogical.publiceringstidpunkt",
        "path": "SHCIntygsformularLogical.publiceringstidpunkt",
        "short": "publiceringstidpunkt",
        "definition": "tidpunkt då formuläret publicerades",
        "min": 0,
        "max": "1",
        "base": {
          "path": "SHCIntygsformularLogical.publiceringstidpunkt",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "time"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "IntygsformularToSHCQuestionnaire",
            "map": "SHCQuestionnaire.approvalDate"
          }
        ]
      },
      {
        "id": "SHCIntygsformularLogical.laghanvisning",
        "path": "SHCIntygsformularLogical.laghanvisning",
        "short": "laghänvisning",
        "definition": "vilken författning detta  intygsformulär baseras på",
        "comment": "Note that FHIR strings SHALL NOT exceed 1,048,576 (1024*1024) characters in size",
        "min": 1,
        "max": "1",
        "base": {
          "path": "SHCIntygsformularLogical.laghanvisning",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "IntygsformularToSHCQuestionnaire",
            "map": "SHCQuestionnaire.useContext[legislation]"
          }
        ]
      },
      {
        "id": "SHCIntygsformularLogical.intygsmottagarroll",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
            "valueCode": "normative"
          },
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
            "valueCode": "4.0.0"
          }
        ],
        "path": "SHCIntygsformularLogical.intygsmottagarroll",
        "short": "intygsmottagarroll",
        "definition": "A reference to a code defined by a terminology system.",
        "comment": "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": 0,
        "max": "*",
        "base": {
          "path": "SHCIntygsformularLogical.intygsmottagarroll",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Coding"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "cod-1",
            "severity": "warning",
            "human": "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": "code.exists().not() implies display.exists().not()",
            "source": "http://hl7.org/fhir/StructureDefinition/Coding"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "v2",
            "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6"
          },
          {
            "identity": "rim",
            "map": "CV"
          },
          {
            "identity": "orim",
            "map": "fhir:Coding rdfs:subClassOf dt:CDCoding"
          },
          {
            "identity": "IntygsformularToSHCQuestionnaire"
          }
        ]
      },
      {
        "id": "SHCIntygsformularLogical.bestarAv",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
            "valueCode": "normative"
          },
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
            "valueCode": "4.0.0"
          }
        ],
        "path": "SHCIntygsformularLogical.bestarAv",
        "short": "består av",
        "definition": "består av",
        "comment": "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": 0,
        "max": "*",
        "base": {
          "path": "SHCIntygsformularLogical.bestarAv",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/shc/StructureDefinition/SHCFragaLogical"
            ]
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "ref-1",
            "severity": "error",
            "human": "SHALL have a contained resource if a local reference is provided",
            "expression": "reference.exists()  implies (reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids')) or (reference='#' and %rootResource!=%resource))",
            "source": "http://hl7.org/fhir/StructureDefinition/Reference"
          },
          {
            "key": "ref-2",
            "severity": "error",
            "human": "At least one of reference, identifier and display SHALL be present (unless an extension is provided).",
            "expression": "reference.exists() or identifier.exists() or display.exists() or extension.exists()",
            "source": "http://hl7.org/fhir/StructureDefinition/Reference"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "rim",
            "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)"
          },
          {
            "identity": "IntygsformularToSHCQuestionnaire",
            "map": "SHCQuestionnaire.item[question]"
          }
        ]
      },
      {
        "id": "SHCIntygsformularLogical.bestarAv2",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
            "valueCode": "normative"
          },
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
            "valueCode": "4.0.0"
          }
        ],
        "path": "SHCIntygsformularLogical.bestarAv2",
        "short": "består av2",
        "definition": "består av2",
        "comment": "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": 0,
        "max": "*",
        "base": {
          "path": "SHCIntygsformularLogical.bestarAv2",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/shc/StructureDefinition/SHCSektionLogical"
            ]
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "ref-1",
            "severity": "error",
            "human": "SHALL have a contained resource if a local reference is provided",
            "expression": "reference.exists()  implies (reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids')) or (reference='#' and %rootResource!=%resource))",
            "source": "http://hl7.org/fhir/StructureDefinition/Reference"
          },
          {
            "key": "ref-2",
            "severity": "error",
            "human": "At least one of reference, identifier and display SHALL be present (unless an extension is provided).",
            "expression": "reference.exists() or identifier.exists() or display.exists() or extension.exists()",
            "source": "http://hl7.org/fhir/StructureDefinition/Reference"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "rim",
            "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)"
          },
          {
            "identity": "IntygsformularToSHCQuestionnaire",
            "map": "SHCQuestionnaire.item[section]"
          }
        ]
      }
    ]
  },
  "differential": {
    "element": [
      {
        "id": "SHCIntygsformularLogical",
        "path": "SHCIntygsformularLogical",
        "short": "Intygsformulär",
        "definition": "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."
      },
      {
        "id": "SHCIntygsformularLogical.intygsformularid",
        "path": "SHCIntygsformularLogical.intygsformularid",
        "short": "intygsformulärid",
        "definition": "Utgivarens identifierare",
        "min": 1,
        "max": "*",
        "type": [
          {
            "code": "Identifier"
          }
        ],
        "mapping": [
          {
            "identity": "IntygsformularToSHCQuestionnaire",
            "map": "SHCQuestionnaire.identifier"
          }
        ]
      },
      {
        "id": "SHCIntygsformularLogical.typAvIntygsperson",
        "path": "SHCIntygsformularLogical.typAvIntygsperson",
        "short": "typ av intygsperson",
        "definition": "kod för den typ av roll som intygsperson innehar vid utfärdandet av detta intyg\r\nt.ex. kund, brukare, patient, donator,sökande",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Coding"
          }
        ],
        "mapping": [
          {
            "identity": "IntygsformularToSHCQuestionnaire",
            "map": "SHCQuestionnaire.subjectType"
          }
        ]
      },
      {
        "id": "SHCIntygsformularLogical.version",
        "path": "SHCIntygsformularLogical.version",
        "short": "version",
        "definition": "ID-beteckning för version, satt av intygsformulärutgivaren",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "IntygsformularToSHCQuestionnaire",
            "map": "SHCQuestionnaire.version"
          }
        ]
      },
      {
        "id": "SHCIntygsformularLogical.intygsformularnamn",
        "path": "SHCIntygsformularLogical.intygsformularnamn",
        "short": "intygsformulärnamn",
        "definition": "kort, beskrivande och användarvänlig titel för frågeformuläret.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "IntygsformularToSHCQuestionnaire",
            "map": "SHCQuestionnaire.title"
          }
        ]
      },
      {
        "id": "SHCIntygsformularLogical.intygsandamal",
        "path": "SHCIntygsformularLogical.intygsandamal",
        "short": "intygsändamål",
        "definition": "textbeskrivning av det ändamål för vilket ett visst intyg utfärdas",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "IntygsformularToSHCQuestionnaire",
            "map": "SHCQuestionnaire.useContext[purpose]"
          }
        ]
      },
      {
        "id": "SHCIntygsformularLogical.giltighetsperiod",
        "path": "SHCIntygsformularLogical.giltighetsperiod",
        "short": "giltighetsperiod",
        "definition": "anger den tidsperiod som formuläret är giltigt",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Period"
          }
        ],
        "mapping": [
          {
            "identity": "IntygsformularToSHCQuestionnaire",
            "map": "SHCQuestionnaire.effectivePeriod"
          }
        ]
      },
      {
        "id": "SHCIntygsformularLogical.intygsformularstatus",
        "path": "SHCIntygsformularLogical.intygsformularstatus",
        "short": "intygsformulärstatus",
        "definition": "kod för aktuellt status (t.ex. utkast, aktiv)",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Coding"
          }
        ],
        "mapping": [
          {
            "identity": "IntygsformularToSHCQuestionnaire",
            "map": "SHCQuestionnaire.status"
          }
        ]
      },
      {
        "id": "SHCIntygsformularLogical.intygsbeskrivning",
        "path": "SHCIntygsformularLogical.intygsbeskrivning",
        "short": "intygsbeskrivning",
        "definition": "beskrivning av formuläret skriven på ett enkelt och lättförståeligt sätt för användaren.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "IntygsformularToSHCQuestionnaire",
            "map": "SHCQuestionnaire.description"
          }
        ]
      },
      {
        "id": "SHCIntygsformularLogical.uri",
        "path": "SHCIntygsformularLogical.uri",
        "short": "uri",
        "definition": "unik URI som identifierar intygsformuläret och används som dess kanoniska referens",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "IntygsformularToSHCQuestionnaire",
            "map": "SHCQuestionnaire.url"
          }
        ]
      },
      {
        "id": "SHCIntygsformularLogical.intygskategori",
        "path": "SHCIntygsformularLogical.intygskategori",
        "short": "intygskategori",
        "definition": "kod för gruppering av intyg utifrån visst kriterium\r\nexempel Rättsintyg, Vårdintyg, Hälsointyg, Sjukintyg",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Coding"
          }
        ],
        "mapping": [
          {
            "identity": "IntygsformularToSHCQuestionnaire",
            "map": "SHCQuestionnaire.useContext[category]"
          }
        ]
      },
      {
        "id": "SHCIntygsformularLogical.publiceringstidpunkt",
        "path": "SHCIntygsformularLogical.publiceringstidpunkt",
        "short": "publiceringstidpunkt",
        "definition": "tidpunkt då formuläret publicerades",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "time"
          }
        ],
        "mapping": [
          {
            "identity": "IntygsformularToSHCQuestionnaire",
            "map": "SHCQuestionnaire.approvalDate"
          }
        ]
      },
      {
        "id": "SHCIntygsformularLogical.laghanvisning",
        "path": "SHCIntygsformularLogical.laghanvisning",
        "short": "laghänvisning",
        "definition": "vilken författning detta  intygsformulär baseras på",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "IntygsformularToSHCQuestionnaire",
            "map": "SHCQuestionnaire.useContext[legislation]"
          }
        ]
      },
      {
        "id": "SHCIntygsformularLogical.intygsmottagarroll",
        "path": "SHCIntygsformularLogical.intygsmottagarroll",
        "short": "intygsmottagarroll",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Coding"
          }
        ],
        "mapping": [
          {
            "identity": "IntygsformularToSHCQuestionnaire"
          }
        ]
      },
      {
        "id": "SHCIntygsformularLogical.bestarAv",
        "path": "SHCIntygsformularLogical.bestarAv",
        "short": "består av",
        "definition": "består av",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/shc/StructureDefinition/SHCFragaLogical"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "IntygsformularToSHCQuestionnaire",
            "map": "SHCQuestionnaire.item[question]"
          }
        ]
      },
      {
        "id": "SHCIntygsformularLogical.bestarAv2",
        "path": "SHCIntygsformularLogical.bestarAv2",
        "short": "består av2",
        "definition": "består av2",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/shc/StructureDefinition/SHCSektionLogical"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "IntygsformularToSHCQuestionnaire",
            "map": "SHCQuestionnaire.item[section]"
          }
        ]
      }
    ]
  }
}