{
  "resourceType": "StructureDefinition",
  "id": "HVOPersonLogical",
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-type-characteristics",
      "valueCode": "can-be-target"
    }
  ],
  "url": "http://electronichealth.se/fhir/hvo/StructureDefinition/HVOPersonLogical",
  "name": "HVOPersonLogical",
  "title": "Person",
  "status": "draft",
  "description": "Klassen person håller information om en mänsklig individ.",
  "fhirVersion": "5.0.0",
  "mapping": [
    {
      "identity": "PersonToHVOPractitioner",
      "uri": "HVOPractitioner"
    }
  ],
  "kind": "logical",
  "abstract": false,
  "type": "http://electronichealth.se/fhir/hvo/StructureDefinition/HVOPersonLogical",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Base",
  "derivation": "specialization",
  "snapshot": {
    "element": [
      {
        "id": "HVOPersonLogical",
        "path": "HVOPersonLogical",
        "short": "Person",
        "definition": "Klassen person håller information om en mänsklig individ.",
        "min": 0,
        "max": "*",
        "base": {
          "path": "HVOPersonLogical",
          "min": 0,
          "max": "*"
        },
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "HVOPersonLogical.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": "HVOPersonLogical.id",
        "short": "id",
        "definition": "Angivelse av person-id i form av personnummer eller samordningsnummer.\r\n\r\nAnges för de personer som har särskild administrativ behörighet att söka eller förändra uppgifter inom domänen på uppdrag av en särskild organisation.",
        "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": "HVOPersonLogical.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": "PersonToHVOPractitioner",
            "map": "HVOPractitioner.identifier"
          }
        ]
      },
      {
        "id": "HVOPersonLogical.namn",
        "path": "HVOPersonLogical.namn",
        "short": "namn",
        "definition": "Angivelse av personens namn.",
        "comment": "Note that FHIR strings SHALL NOT exceed 1,048,576 (1024*1024) characters in size",
        "min": 1,
        "max": "1",
        "base": {
          "path": "HVOPersonLogical.namn",
          "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": "PersonToHVOPractitioner",
            "map": "HVOPractitioner.name"
          }
        ]
      },
      {
        "id": "HVOPersonLogical.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": "HVOPersonLogical.skyddadIdentitet",
        "short": "skyddadIdentitet",
        "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": "1",
        "base": {
          "path": "HVOPersonLogical.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": "PersonToHVOPractitioner"
          }
        ]
      }
    ]
  },
  "differential": {
    "element": [
      {
        "id": "HVOPersonLogical",
        "path": "HVOPersonLogical",
        "short": "Person",
        "definition": "Klassen person håller information om en mänsklig individ."
      },
      {
        "id": "HVOPersonLogical.id",
        "path": "HVOPersonLogical.id",
        "short": "id",
        "definition": "Angivelse av person-id i form av personnummer eller samordningsnummer.\r\n\r\nAnges för de personer som har särskild administrativ behörighet att söka eller förändra uppgifter inom domänen på uppdrag av en särskild organisation.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Identifier"
          }
        ],
        "mapping": [
          {
            "identity": "PersonToHVOPractitioner",
            "map": "HVOPractitioner.identifier"
          }
        ]
      },
      {
        "id": "HVOPersonLogical.namn",
        "path": "HVOPersonLogical.namn",
        "short": "namn",
        "definition": "Angivelse av personens namn.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "PersonToHVOPractitioner",
            "map": "HVOPractitioner.name"
          }
        ]
      },
      {
        "id": "HVOPersonLogical.skyddadIdentitet",
        "path": "HVOPersonLogical.skyddadIdentitet",
        "short": "skyddadIdentitet",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Coding"
          }
        ],
        "mapping": [
          {
            "identity": "PersonToHVOPractitioner"
          }
        ]
      }
    ]
  }
}