{
  "resourceType": "StructureDefinition",
  "id": "SHCPersonLogical",
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-type-characteristics",
      "valueCode": "can-be-target"
    }
  ],
  "url": "http://electronichealth.se/fhir/shc/StructureDefinition/SHCPersonLogical",
  "name": "SHCPersonLogical",
  "title": "Person",
  "status": "draft",
  "description": "Klassen person håller information om en mänsklig individ.",
  "fhirVersion": "5.0.0",
  "mapping": [
    {
      "identity": "PersonToSHCMedicalCertificateSubject",
      "uri": "SHCMedicalCertificateSubject"
    }
  ],
  "kind": "logical",
  "abstract": false,
  "type": "http://electronichealth.se/fhir/shc/StructureDefinition/SHCPersonLogical",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Base",
  "derivation": "specialization",
  "snapshot": {
    "element": [
      {
        "id": "SHCPersonLogical",
        "path": "SHCPersonLogical",
        "short": "Person",
        "definition": "Klassen person håller information om en mänsklig individ.",
        "min": 0,
        "max": "*",
        "base": {
          "path": "SHCPersonLogical",
          "min": 0,
          "max": "*"
        },
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "SHCPersonLogical.id",
        "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": "SHCPersonLogical.id",
        "short": "id",
        "definition": "Angivelse av person-id i form av personnummer eller samordningsnummer",
        "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": 0,
        "max": "1",
        "base": {
          "path": "SHCPersonLogical.id",
          "min": 0,
          "max": "1"
        },
        "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": "PersonToSHCMedicalCertificateSubject",
            "map": "SHCMedicalCertificateSubject/SHCRelatedPerson.identifier"
          }
        ]
      },
      {
        "id": "SHCPersonLogical.typAvIdentitetsbeteckning",
        "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": "SHCPersonLogical.typAvIdentitetsbeteckning",
        "short": "?typ av identitetsbeteckning",
        "definition": "fhir:\r\nPatient.identifier:pnr.type\r\nDefinition\tA coded type for the identifier that can be used to determine which identifier to use for a specific purpose.\r\nCardinality\t0...1\r\nType\tCodeableConcept\r\nBinding\t\r\nA coded type for an identifier that can be used to determine which identifier to use for a specific purpose.\r\n\r\nIdentifier Type Codes (extensible)\r\nSummary\tTrue\r\nRequirements\t\r\nAllows users to make use of identifiers when the identifier system is not known.\r\n\r\nComments\t\r\nThis element deals only with general categories of identifiers. It SHOULD not be used for codes that correspond 1..1 with the Identifier.system. Some identifiers may fall into multiple categories due to common usage. Where the system is known, a type is unnecessary because the type is always part of the system definition. However systems often need to handle identifiers where the system is not known. There is not a 1:1 relationship between type and system, since many different systems have the same type.\r\n\r\nInvariants\t\r\nele-1: All FHIR elements must have a @value or children\r\nhasValue() or (children().count() > id.count())\r\nMappings\t\r\nv2: CX.5\r\nrim: Role.code or implied by context",
        "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": "SHCPersonLogical.typAvIdentitetsbeteckning",
          "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": "PersonToSHCMedicalCertificateSubject"
          }
        ]
      },
      {
        "id": "SHCPersonLogical.fornamn",
        "path": "SHCPersonLogical.fornamn",
        "short": "förnamn",
        "definition": "namn som är associerat med personen",
        "comment": "Note that FHIR strings SHALL NOT exceed 1,048,576 (1024*1024) characters in size",
        "min": 1,
        "max": "1",
        "base": {
          "path": "SHCPersonLogical.fornamn",
          "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": "PersonToSHCMedicalCertificateSubject",
            "map": "SHCRelatedPerson/SHCPractitioner/SHCMedicalCertificateSubject.name.given"
          }
        ]
      },
      {
        "id": "SHCPersonLogical.skyddadIdentitet",
        "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": "SHCPersonLogical.skyddadIdentitet",
        "short": "skyddadIdentitet",
        "definition": "kod för vilken sekretessmarkering som skyddar en persons personuppgifter för att förhindra att de röjs eller missbrukas",
        "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": "1",
        "base": {
          "path": "SHCPersonLogical.skyddadIdentitet",
          "min": 0,
          "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": "PersonToSHCMedicalCertificateSubject",
            "map": "SHCMedicalCertificateSubject/SHCRelatedPerson.meta.security"
          }
        ]
      },
      {
        "id": "SHCPersonLogical.kodForTilltalsnamn",
        "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": "SHCPersonLogical.kodForTilltalsnamn",
        "short": "kod för tilltalsnamn",
        "definition": "kod för uppgift om tilltalsnamn finns för förnamn markeras detta med en numerisk tvåställig kod",
        "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": "SHCPersonLogical.kodForTilltalsnamn",
          "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": "PersonToSHCMedicalCertificateSubject"
          }
        ]
      },
      {
        "id": "SHCPersonLogical.efternamn",
        "path": "SHCPersonLogical.efternamn",
        "short": "efternamn",
        "definition": "namn som är associerat med personen",
        "comment": "Note that FHIR strings SHALL NOT exceed 1,048,576 (1024*1024) characters in size",
        "min": 1,
        "max": "1",
        "base": {
          "path": "SHCPersonLogical.efternamn",
          "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": "PersonToSHCMedicalCertificateSubject",
            "map": "SHCRelatedPerson/SHCPractitioner/SHCMedicalCertificateSubject.name.family"
          }
        ]
      },
      {
        "id": "SHCPersonLogical.kon",
        "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": "SHCPersonLogical.kon",
        "short": "kön",
        "definition": "kod för administrativt kön",
        "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": "SHCPersonLogical.kon",
          "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": "PersonToSHCMedicalCertificateSubject",
            "map": "SHCMedicalCertificateSubject.gender"
          }
        ]
      },
      {
        "id": "SHCPersonLogical.fodelsedatum",
        "path": "SHCPersonLogical.fodelsedatum",
        "short": "födelsedatum",
        "definition": "födelsedatumet för person",
        "comment": "UTC offset is allowed for dates and partial dates",
        "min": 1,
        "max": "1",
        "base": {
          "path": "SHCPersonLogical.fodelsedatum",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "dateTime"
          }
        ],
        "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": "PersonToSHCMedicalCertificateSubject",
            "map": "SHCPerson.birthDate"
          }
        ]
      },
      {
        "id": "SHCPersonLogical.har",
        "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": "SHCPersonLogical.har",
        "short": "har",
        "definition": "har",
        "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": "SHCPersonLogical.har",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/shc/StructureDefinition/SHCKontaktuppgiftPersonLogical"
            ]
          }
        ],
        "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": "PersonToSHCMedicalCertificateSubject",
            "map": "SHCPerson.contact"
          }
        ]
      }
    ]
  },
  "differential": {
    "element": [
      {
        "id": "SHCPersonLogical",
        "path": "SHCPersonLogical",
        "short": "Person",
        "definition": "Klassen person håller information om en mänsklig individ."
      },
      {
        "id": "SHCPersonLogical.id",
        "path": "SHCPersonLogical.id",
        "short": "id",
        "definition": "Angivelse av person-id i form av personnummer eller samordningsnummer",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Identifier"
          }
        ],
        "mapping": [
          {
            "identity": "PersonToSHCMedicalCertificateSubject",
            "map": "SHCMedicalCertificateSubject/SHCRelatedPerson.identifier"
          }
        ]
      },
      {
        "id": "SHCPersonLogical.typAvIdentitetsbeteckning",
        "path": "SHCPersonLogical.typAvIdentitetsbeteckning",
        "short": "?typ av identitetsbeteckning",
        "definition": "fhir:\r\nPatient.identifier:pnr.type\r\nDefinition\tA coded type for the identifier that can be used to determine which identifier to use for a specific purpose.\r\nCardinality\t0...1\r\nType\tCodeableConcept\r\nBinding\t\r\nA coded type for an identifier that can be used to determine which identifier to use for a specific purpose.\r\n\r\nIdentifier Type Codes (extensible)\r\nSummary\tTrue\r\nRequirements\t\r\nAllows users to make use of identifiers when the identifier system is not known.\r\n\r\nComments\t\r\nThis element deals only with general categories of identifiers. It SHOULD not be used for codes that correspond 1..1 with the Identifier.system. Some identifiers may fall into multiple categories due to common usage. Where the system is known, a type is unnecessary because the type is always part of the system definition. However systems often need to handle identifiers where the system is not known. There is not a 1:1 relationship between type and system, since many different systems have the same type.\r\n\r\nInvariants\t\r\nele-1: All FHIR elements must have a @value or children\r\nhasValue() or (children().count() > id.count())\r\nMappings\t\r\nv2: CX.5\r\nrim: Role.code or implied by context",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Coding"
          }
        ],
        "mapping": [
          {
            "identity": "PersonToSHCMedicalCertificateSubject"
          }
        ]
      },
      {
        "id": "SHCPersonLogical.fornamn",
        "path": "SHCPersonLogical.fornamn",
        "short": "förnamn",
        "definition": "namn som är associerat med personen",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "PersonToSHCMedicalCertificateSubject",
            "map": "SHCRelatedPerson/SHCPractitioner/SHCMedicalCertificateSubject.name.given"
          }
        ]
      },
      {
        "id": "SHCPersonLogical.skyddadIdentitet",
        "path": "SHCPersonLogical.skyddadIdentitet",
        "short": "skyddadIdentitet",
        "definition": "kod för vilken sekretessmarkering som skyddar en persons personuppgifter för att förhindra att de röjs eller missbrukas",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Coding"
          }
        ],
        "mapping": [
          {
            "identity": "PersonToSHCMedicalCertificateSubject",
            "map": "SHCMedicalCertificateSubject/SHCRelatedPerson.meta.security"
          }
        ]
      },
      {
        "id": "SHCPersonLogical.kodForTilltalsnamn",
        "path": "SHCPersonLogical.kodForTilltalsnamn",
        "short": "kod för tilltalsnamn",
        "definition": "kod för uppgift om tilltalsnamn finns för förnamn markeras detta med en numerisk tvåställig kod",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Coding"
          }
        ],
        "mapping": [
          {
            "identity": "PersonToSHCMedicalCertificateSubject"
          }
        ]
      },
      {
        "id": "SHCPersonLogical.efternamn",
        "path": "SHCPersonLogical.efternamn",
        "short": "efternamn",
        "definition": "namn som är associerat med personen",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "PersonToSHCMedicalCertificateSubject",
            "map": "SHCRelatedPerson/SHCPractitioner/SHCMedicalCertificateSubject.name.family"
          }
        ]
      },
      {
        "id": "SHCPersonLogical.kon",
        "path": "SHCPersonLogical.kon",
        "short": "kön",
        "definition": "kod för administrativt kön",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Coding"
          }
        ],
        "mapping": [
          {
            "identity": "PersonToSHCMedicalCertificateSubject",
            "map": "SHCMedicalCertificateSubject.gender"
          }
        ]
      },
      {
        "id": "SHCPersonLogical.fodelsedatum",
        "path": "SHCPersonLogical.fodelsedatum",
        "short": "födelsedatum",
        "definition": "födelsedatumet för person",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "dateTime"
          }
        ],
        "mapping": [
          {
            "identity": "PersonToSHCMedicalCertificateSubject",
            "map": "SHCPerson.birthDate"
          }
        ]
      },
      {
        "id": "SHCPersonLogical.har",
        "path": "SHCPersonLogical.har",
        "short": "har",
        "definition": "har",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/shc/StructureDefinition/SHCKontaktuppgiftPersonLogical"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "PersonToSHCMedicalCertificateSubject",
            "map": "SHCPerson.contact"
          }
        ]
      }
    ]
  }
}