{
  "resourceType": "StructureDefinition",
  "id": "HVOVerksamhetLogical",
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-type-characteristics",
      "valueCode": "can-be-target"
    }
  ],
  "url": "http://electronichealth.se/fhir/hvo/StructureDefinition/HVOVerksamhetLogical",
  "name": "HVOVerksamhetLogical",
  "title": "Verksamhet",
  "status": "draft",
  "description": "Klassen verksamhet håller information om arbete som fortlöpande utförs i linje med viss övergripande inriktning.",
  "fhirVersion": "5.0.0",
  "mapping": [
    {
      "identity": "VerksamhetToHVOBusiness",
      "uri": "HVOBusiness"
    }
  ],
  "kind": "logical",
  "abstract": false,
  "type": "http://electronichealth.se/fhir/hvo/StructureDefinition/HVOVerksamhetLogical",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Base",
  "derivation": "specialization",
  "snapshot": {
    "element": [
      {
        "id": "HVOVerksamhetLogical",
        "path": "HVOVerksamhetLogical",
        "short": "Verksamhet",
        "definition": "Klassen verksamhet håller information om arbete som fortlöpande utförs i linje med viss övergripande inriktning.",
        "min": 0,
        "max": "*",
        "base": {
          "path": "HVOVerksamhetLogical",
          "min": 0,
          "max": "*"
        },
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "HVOVerksamhetLogical.inriktning",
        "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": "HVOVerksamhetLogical.inriktning",
        "short": "inriktning",
        "definition": "Angivelse av vilken typ av målinriktat arbete som utförs, t.ex. allmän intesivvård, förlossningsverksamhet eller  psykiatriverksamhet för barn och unga.",
        "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": "HVOVerksamhetLogical.inriktning",
          "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": "VerksamhetToHVOBusiness",
            "map": "HVOBusiness.category"
          }
        ]
      },
      {
        "id": "HVOVerksamhetLogical.harOppetUnder",
        "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": "HVOVerksamhetLogical.harOppetUnder",
        "short": "har öppet under",
        "definition": "har öppet under",
        "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": "HVOVerksamhetLogical.harOppetUnder",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/hvo/StructureDefinition/HVOTillganglighetstidLogical"
            ]
          }
        ],
        "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": "VerksamhetToHVOBusiness",
            "map": "HVOBusiness.availability.availableTime"
          }
        ]
      },
      {
        "id": "HVOVerksamhetLogical.harTillganglighetsavvikelse",
        "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": "HVOVerksamhetLogical.harTillganglighetsavvikelse",
        "short": "har tillgänglighetsavvikelse",
        "definition": "har tillgänglighetsavvikelse",
        "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": "HVOVerksamhetLogical.harTillganglighetsavvikelse",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/hvo/StructureDefinition/HVOStorningsinformationLogical"
            ]
          }
        ],
        "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": "VerksamhetToHVOBusiness",
            "map": "HVOBusiness.availability.notAvailable"
          }
        ]
      },
      {
        "id": "HVOVerksamhetLogical.bedrivsPa",
        "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": "HVOVerksamhetLogical.bedrivsPa",
        "short": "bedrivsPa",
        "definition": "bedrivsPa",
        "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": "HVOVerksamhetLogical.bedrivsPa",
          "min": 0,
          "max": "*"
        },
        "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": "VerksamhetToHVOBusiness",
            "map": "HVOBusiness.location(HVOLocation)"
          }
        ]
      },
      {
        "id": "HVOVerksamhetLogical.bedriver",
        "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": "HVOVerksamhetLogical.bedriver",
        "short": "bedriver",
        "definition": "bedriver",
        "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": 1,
        "max": "1",
        "base": {
          "path": "HVOVerksamhetLogical.bedriver",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/hvo/StructureDefinition/HVOOrganisatoriskEnhetLogical"
            ]
          }
        ],
        "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": "VerksamhetToHVOBusiness",
            "map": "HVOBusiness.providedBy(HVOOrganizationalUnit)"
          }
        ]
      }
    ]
  },
  "differential": {
    "element": [
      {
        "id": "HVOVerksamhetLogical",
        "path": "HVOVerksamhetLogical",
        "short": "Verksamhet",
        "definition": "Klassen verksamhet håller information om arbete som fortlöpande utförs i linje med viss övergripande inriktning."
      },
      {
        "id": "HVOVerksamhetLogical.inriktning",
        "path": "HVOVerksamhetLogical.inriktning",
        "short": "inriktning",
        "definition": "Angivelse av vilken typ av målinriktat arbete som utförs, t.ex. allmän intesivvård, förlossningsverksamhet eller  psykiatriverksamhet för barn och unga.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Coding"
          }
        ],
        "mapping": [
          {
            "identity": "VerksamhetToHVOBusiness",
            "map": "HVOBusiness.category"
          }
        ]
      },
      {
        "id": "HVOVerksamhetLogical.harOppetUnder",
        "path": "HVOVerksamhetLogical.harOppetUnder",
        "short": "har öppet under",
        "definition": "har öppet under",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/hvo/StructureDefinition/HVOTillganglighetstidLogical"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "VerksamhetToHVOBusiness",
            "map": "HVOBusiness.availability.availableTime"
          }
        ]
      },
      {
        "id": "HVOVerksamhetLogical.harTillganglighetsavvikelse",
        "path": "HVOVerksamhetLogical.harTillganglighetsavvikelse",
        "short": "har tillgänglighetsavvikelse",
        "definition": "har tillgänglighetsavvikelse",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/hvo/StructureDefinition/HVOStorningsinformationLogical"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "VerksamhetToHVOBusiness",
            "map": "HVOBusiness.availability.notAvailable"
          }
        ]
      },
      {
        "id": "HVOVerksamhetLogical.bedrivsPa",
        "path": "HVOVerksamhetLogical.bedrivsPa",
        "short": "bedrivsPa",
        "definition": "bedrivsPa",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/hvo/StructureDefinition/HVOPlatsLogical"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "VerksamhetToHVOBusiness",
            "map": "HVOBusiness.location(HVOLocation)"
          }
        ]
      },
      {
        "id": "HVOVerksamhetLogical.bedriver",
        "path": "HVOVerksamhetLogical.bedriver",
        "short": "bedriver",
        "definition": "bedriver",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/hvo/StructureDefinition/HVOOrganisatoriskEnhetLogical"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "VerksamhetToHVOBusiness",
            "map": "HVOBusiness.providedBy(HVOOrganizationalUnit)"
          }
        ]
      }
    ]
  }
}