{
  "resourceType": "StructureDefinition",
  "id": "HVOPlatsLogical",
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-type-characteristics",
      "valueCode": "can-be-target"
    }
  ],
  "url": "http://electronichealth.se/fhir/hvo/StructureDefinition/HVOPlatsLogical",
  "name": "HVOPlatsLogical",
  "title": "Plats",
  "status": "draft",
  "description": "Klassen plats håller information om avgränsad geografisk plats (punkt) eller geografiskt område (yta) med välbestämt läge. Här avses plats ur ett geografiskt eller fysiskt perspektiv, inte ur ett organisations- eller verksamhetsperspektiv.",
  "fhirVersion": "5.0.0",
  "mapping": [
    {
      "identity": "PlatsToHVOLocation",
      "uri": "HVOLocation"
    }
  ],
  "kind": "logical",
  "abstract": false,
  "type": "http://electronichealth.se/fhir/hvo/StructureDefinition/HVOPlatsLogical",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Base",
  "derivation": "specialization",
  "snapshot": {
    "element": [
      {
        "id": "HVOPlatsLogical",
        "path": "HVOPlatsLogical",
        "short": "Plats",
        "definition": "Klassen plats håller information om avgränsad geografisk plats (punkt) eller geografiskt område (yta) med välbestämt läge. Här avses plats ur ett geografiskt eller fysiskt perspektiv, inte ur ett organisations- eller verksamhetsperspektiv.",
        "min": 0,
        "max": "*",
        "base": {
          "path": "HVOPlatsLogical",
          "min": 0,
          "max": "*"
        },
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "HVOPlatsLogical.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": "HVOPlatsLogical.id",
        "short": "id",
        "definition": "Angivelse av identifierare för plats.",
        "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": "HVOPlatsLogical.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": "PlatsToHVOLocation",
            "map": "HVOLocation.identifier"
          }
        ]
      },
      {
        "id": "HVOPlatsLogical.namn",
        "path": "HVOPlatsLogical.namn",
        "short": "namn",
        "definition": "Angivelse av platsens namn.",
        "comment": "Note that FHIR strings SHALL NOT exceed 1,048,576 (1024*1024) characters in size",
        "min": 0,
        "max": "1",
        "base": {
          "path": "HVOPlatsLogical.namn",
          "min": 0,
          "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": "PlatsToHVOLocation",
            "map": "HVOLocation.name"
          }
        ]
      },
      {
        "id": "HVOPlatsLogical.beskrivning",
        "path": "HVOPlatsLogical.beskrivning",
        "short": "beskrivning",
        "definition": "Textuell beskrivning av en viss plats. Används som komplement till attributen namn och platstyp i de fall en ytterligare textuell beskrivning krävs.",
        "comment": "Note that FHIR strings SHALL NOT exceed 1,048,576 (1024*1024) characters in size",
        "min": 0,
        "max": "1",
        "base": {
          "path": "HVOPlatsLogical.beskrivning",
          "min": 0,
          "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": "PlatsToHVOLocation",
            "map": "HVOLocation.description"
          }
        ]
      },
      {
        "id": "HVOPlatsLogical.status",
        "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": "HVOPlatsLogical.status",
        "short": "status",
        "definition": "Angivelse av kod för platsens status, för att dokumentera om en plats är aktiv eller inaktiv. Betydelsen av aktiv/inaktiv kan vara beroende av vilket typ av platsangivelse som avses. En position kan exempelvis inte bli inaktiv, men en belägenhetsadress kan upphöra existera om den fastighet som pekas ut rivs. Ett geografiskt område angivet enligt ett visst kodverk skulle kunna markeras som inaktivt, exempelvis den geografiska kommungränsen i det fall en kommun delas eller går samman med en annan kommun.",
        "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": "HVOPlatsLogical.status",
          "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": "PlatsToHVOLocation",
            "map": "HVOLocation.status"
          }
        ]
      },
      {
        "id": "HVOPlatsLogical.funktion",
        "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": "HVOPlatsLogical.funktion",
        "short": "funktion",
        "definition": "Angivelse av kod för funktion som plats fyller.",
        "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": "HVOPlatsLogical.funktion",
          "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": "PlatsToHVOLocation",
            "map": "HVOLocation.type"
          }
        ]
      },
      {
        "id": "HVOPlatsLogical.adressrad",
        "path": "HVOPlatsLogical.adressrad",
        "short": "adress.rad",
        "definition": "Angivelse av en belägenhetsadress. \r\nAnges enligt Svensk standard · SS 637003:2025.\r\nExempel: \r\nSibeliusgången 17 \r\nAkalla\r\nStockholm",
        "comment": "Note that FHIR strings SHALL NOT exceed 1,048,576 (1024*1024) characters in size",
        "min": 0,
        "max": "*",
        "base": {
          "path": "HVOPlatsLogical.adressrad",
          "min": 0,
          "max": "*"
        },
        "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": "PlatsToHVOLocation",
            "map": "HVOLocation.address.line"
          }
        ]
      },
      {
        "id": "HVOPlatsLogical.kommunkod",
        "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": "HVOPlatsLogical.kommunkod",
        "short": "kommunkod",
        "definition": "Angivelse av fyrställig kod för kommun enligt Statistiska centralbyrån (SCB). \r\nExempel: 2584 (Kiruna kommun)",
        "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": "HVOPlatsLogical.kommunkod",
          "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": "PlatsToHVOLocation",
            "map": "HVOLocation.identifier[municipality]"
          }
        ]
      },
      {
        "id": "HVOPlatsLogical.lanskod",
        "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": "HVOPlatsLogical.lanskod",
        "short": "länskod",
        "definition": "Angivelse av tvåställig kod för län enligt Statistiska Centralbyrån (SCB). \r\nExempel: 25 (Norrbottens lä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": 0,
        "max": "1",
        "base": {
          "path": "HVOPlatsLogical.lanskod",
          "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": "PlatsToHVOLocation",
            "map": "HVOLocation.identifier[county]"
          }
        ]
      },
      {
        "id": "HVOPlatsLogical.typ",
        "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": "HVOPlatsLogical.typ",
        "short": "typ",
        "definition": "Angivelse av kod för typ av plats i en fysisk bemärkelse. Exempel är byggnad, rum och väg. Detta värde anges endast i de fall då typ av platsangivelse inte framgår av övriga attribut.",
        "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": "HVOPlatsLogical.typ",
          "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": "PlatsToHVOLocation",
            "map": "HVOLocation.form"
          }
        ]
      },
      {
        "id": "HVOPlatsLogical.giltigFrom",
        "path": "HVOPlatsLogical.giltigFrom",
        "short": "giltigFrom",
        "definition": "Angivelse av den tidpunkt från och med vilken platsen är registrerad med angiven status.",
        "min": 1,
        "max": "1",
        "base": {
          "path": "HVOPlatsLogical.giltigFrom",
          "min": 1,
          "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": "PlatsToHVOLocation",
            "map": "HVOLocation.extension[period].valuePeriod.start"
          }
        ]
      },
      {
        "id": "HVOPlatsLogical.giltigTom",
        "path": "HVOPlatsLogical.giltigTom",
        "short": "giltigTom",
        "definition": "Angivelse av den tidpunkt då platsens angivna status upphör att gälla. Ska ej anges om denna tidpunkt är okänd.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "HVOPlatsLogical.giltigTom",
          "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": "PlatsToHVOLocation",
            "map": "HVOLocation.extension[period].valuePeriod.end"
          }
        ]
      },
      {
        "id": "HVOPlatsLogical.harPosition",
        "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": "HVOPlatsLogical.harPosition",
        "short": "har position",
        "definition": "har position",
        "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": "1",
        "base": {
          "path": "HVOPlatsLogical.harPosition",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/hvo/StructureDefinition/HVOPositionLogical"
            ]
          }
        ],
        "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": "PlatsToHVOLocation",
            "map": "HVOLocation.position"
          }
        ]
      },
      {
        "id": "HVOPlatsLogical.avgransasGeografisktAv",
        "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": "HVOPlatsLogical.avgransasGeografisktAv",
        "short": "avgränsas geografiskt av",
        "definition": "avgränsas geografiskt 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": "HVOPlatsLogical.avgransasGeografisktAv",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/hvo/StructureDefinition/HVOPositionLogical"
            ]
          }
        ],
        "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)"
          }
        ]
      },
      {
        "id": "HVOPlatsLogical.delAv",
        "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": "HVOPlatsLogical.delAv",
        "short": "delAv",
        "definition": "delAv",
        "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": "1",
        "base": {
          "path": "HVOPlatsLogical.delAv",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/hvo/StructureDefinition/HVOPlatsLogical"
            ]
          }
        ],
        "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": "PlatsToHVOLocation",
            "map": "HVOLocation.partOf(HVOLocation)"
          }
        ]
      }
    ]
  },
  "differential": {
    "element": [
      {
        "id": "HVOPlatsLogical",
        "path": "HVOPlatsLogical",
        "short": "Plats",
        "definition": "Klassen plats håller information om avgränsad geografisk plats (punkt) eller geografiskt område (yta) med välbestämt läge. Här avses plats ur ett geografiskt eller fysiskt perspektiv, inte ur ett organisations- eller verksamhetsperspektiv."
      },
      {
        "id": "HVOPlatsLogical.id",
        "path": "HVOPlatsLogical.id",
        "short": "id",
        "definition": "Angivelse av identifierare för plats.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Identifier"
          }
        ],
        "mapping": [
          {
            "identity": "PlatsToHVOLocation",
            "map": "HVOLocation.identifier"
          }
        ]
      },
      {
        "id": "HVOPlatsLogical.namn",
        "path": "HVOPlatsLogical.namn",
        "short": "namn",
        "definition": "Angivelse av platsens namn.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "PlatsToHVOLocation",
            "map": "HVOLocation.name"
          }
        ]
      },
      {
        "id": "HVOPlatsLogical.beskrivning",
        "path": "HVOPlatsLogical.beskrivning",
        "short": "beskrivning",
        "definition": "Textuell beskrivning av en viss plats. Används som komplement till attributen namn och platstyp i de fall en ytterligare textuell beskrivning krävs.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "PlatsToHVOLocation",
            "map": "HVOLocation.description"
          }
        ]
      },
      {
        "id": "HVOPlatsLogical.status",
        "path": "HVOPlatsLogical.status",
        "short": "status",
        "definition": "Angivelse av kod för platsens status, för att dokumentera om en plats är aktiv eller inaktiv. Betydelsen av aktiv/inaktiv kan vara beroende av vilket typ av platsangivelse som avses. En position kan exempelvis inte bli inaktiv, men en belägenhetsadress kan upphöra existera om den fastighet som pekas ut rivs. Ett geografiskt område angivet enligt ett visst kodverk skulle kunna markeras som inaktivt, exempelvis den geografiska kommungränsen i det fall en kommun delas eller går samman med en annan kommun.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Coding"
          }
        ],
        "mapping": [
          {
            "identity": "PlatsToHVOLocation",
            "map": "HVOLocation.status"
          }
        ]
      },
      {
        "id": "HVOPlatsLogical.funktion",
        "path": "HVOPlatsLogical.funktion",
        "short": "funktion",
        "definition": "Angivelse av kod för funktion som plats fyller.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Coding"
          }
        ],
        "mapping": [
          {
            "identity": "PlatsToHVOLocation",
            "map": "HVOLocation.type"
          }
        ]
      },
      {
        "id": "HVOPlatsLogical.adressrad",
        "path": "HVOPlatsLogical.adressrad",
        "short": "adress.rad",
        "definition": "Angivelse av en belägenhetsadress. \r\nAnges enligt Svensk standard · SS 637003:2025.\r\nExempel: \r\nSibeliusgången 17 \r\nAkalla\r\nStockholm",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "PlatsToHVOLocation",
            "map": "HVOLocation.address.line"
          }
        ]
      },
      {
        "id": "HVOPlatsLogical.kommunkod",
        "path": "HVOPlatsLogical.kommunkod",
        "short": "kommunkod",
        "definition": "Angivelse av fyrställig kod för kommun enligt Statistiska centralbyrån (SCB). \r\nExempel: 2584 (Kiruna kommun)",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Coding"
          }
        ],
        "mapping": [
          {
            "identity": "PlatsToHVOLocation",
            "map": "HVOLocation.identifier[municipality]"
          }
        ]
      },
      {
        "id": "HVOPlatsLogical.lanskod",
        "path": "HVOPlatsLogical.lanskod",
        "short": "länskod",
        "definition": "Angivelse av tvåställig kod för län enligt Statistiska Centralbyrån (SCB). \r\nExempel: 25 (Norrbottens län)",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Coding"
          }
        ],
        "mapping": [
          {
            "identity": "PlatsToHVOLocation",
            "map": "HVOLocation.identifier[county]"
          }
        ]
      },
      {
        "id": "HVOPlatsLogical.typ",
        "path": "HVOPlatsLogical.typ",
        "short": "typ",
        "definition": "Angivelse av kod för typ av plats i en fysisk bemärkelse. Exempel är byggnad, rum och väg. Detta värde anges endast i de fall då typ av platsangivelse inte framgår av övriga attribut.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Coding"
          }
        ],
        "mapping": [
          {
            "identity": "PlatsToHVOLocation",
            "map": "HVOLocation.form"
          }
        ]
      },
      {
        "id": "HVOPlatsLogical.giltigFrom",
        "path": "HVOPlatsLogical.giltigFrom",
        "short": "giltigFrom",
        "definition": "Angivelse av den tidpunkt från och med vilken platsen är registrerad med angiven status.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "time"
          }
        ],
        "mapping": [
          {
            "identity": "PlatsToHVOLocation",
            "map": "HVOLocation.extension[period].valuePeriod.start"
          }
        ]
      },
      {
        "id": "HVOPlatsLogical.giltigTom",
        "path": "HVOPlatsLogical.giltigTom",
        "short": "giltigTom",
        "definition": "Angivelse av den tidpunkt då platsens angivna status upphör att gälla. Ska ej anges om denna tidpunkt är okänd.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "time"
          }
        ],
        "mapping": [
          {
            "identity": "PlatsToHVOLocation",
            "map": "HVOLocation.extension[period].valuePeriod.end"
          }
        ]
      },
      {
        "id": "HVOPlatsLogical.harPosition",
        "path": "HVOPlatsLogical.harPosition",
        "short": "har position",
        "definition": "har position",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/hvo/StructureDefinition/HVOPositionLogical"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "PlatsToHVOLocation",
            "map": "HVOLocation.position"
          }
        ]
      },
      {
        "id": "HVOPlatsLogical.avgransasGeografisktAv",
        "path": "HVOPlatsLogical.avgransasGeografisktAv",
        "short": "avgränsas geografiskt av",
        "definition": "avgränsas geografiskt av",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/hvo/StructureDefinition/HVOPositionLogical"
            ]
          }
        ]
      },
      {
        "id": "HVOPlatsLogical.delAv",
        "path": "HVOPlatsLogical.delAv",
        "short": "delAv",
        "definition": "delAv",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/hvo/StructureDefinition/HVOPlatsLogical"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "PlatsToHVOLocation",
            "map": "HVOLocation.partOf(HVOLocation)"
          }
        ]
      }
    ]
  }
}