{
  "resourceType": "StructureDefinition",
  "id": "HVOTjanstLogical",
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-type-characteristics",
      "valueCode": "can-be-target"
    }
  ],
  "url": "http://electronichealth.se/fhir/hvo/StructureDefinition/HVOTjanstLogical",
  "name": "HVOTjanstLogical",
  "title": "Tjänst",
  "status": "draft",
  "description": "Klassen tjänst håller information aktivitet som erbjuds för att tillgodose ett behov.",
  "fhirVersion": "5.0.0",
  "mapping": [
    {
      "identity": "TjanstToHVOService",
      "uri": "HVOService"
    }
  ],
  "kind": "logical",
  "abstract": false,
  "type": "http://electronichealth.se/fhir/hvo/StructureDefinition/HVOTjanstLogical",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Base",
  "derivation": "specialization",
  "snapshot": {
    "element": [
      {
        "id": "HVOTjanstLogical",
        "path": "HVOTjanstLogical",
        "short": "Tjänst",
        "definition": "Klassen tjänst håller information aktivitet som erbjuds för att tillgodose ett behov.",
        "min": 0,
        "max": "*",
        "base": {
          "path": "HVOTjanstLogical",
          "min": 0,
          "max": "*"
        },
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "HVOTjanstLogical.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": "HVOTjanstLogical.id",
        "short": "id",
        "definition": "Angivelse av identifierare för tjänsten.",
        "comment": "The rules of the identifier.type  determine if a check digit is part of the ID value or sent separately, such as through the checkDigit extension.",
        "min": 1,
        "max": "1",
        "base": {
          "path": "HVOTjanstLogical.id",
          "min": 1,
          "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": "TjanstToHVOService",
            "map": "HVOService.identifier"
          }
        ]
      },
      {
        "id": "HVOTjanstLogical.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": "HVOTjanstLogical.typ",
        "short": "typ",
        "definition": "Angivelse av kod för typ av tjänst.",
        "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": "HVOTjanstLogical.typ",
          "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": "TjanstToHVOService",
            "map": "HVOService.type"
          }
        ]
      },
      {
        "id": "HVOTjanstLogical.motesform",
        "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": "HVOTjanstLogical.motesform",
        "short": "mötesform",
        "definition": "Angivelse av kod för vilken form tjänstens möten erbjuds i. Exempel är videosamtal, fysisk träff eller chatt.",
        "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": "*",
        "base": {
          "path": "HVOTjanstLogical.motesform",
          "min": 1,
          "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": "TjanstToHVOService",
            "map": "HVOService.characteristic"
          }
        ]
      },
      {
        "id": "HVOTjanstLogical.beskrivning",
        "path": "HVOTjanstLogical.beskrivning",
        "short": "beskrivning",
        "definition": "Textuell beskrivning av tjänst. Används som komplement för attributet typ i de fall en 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": "HVOTjanstLogical.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": "TjanstToHVOService",
            "map": "HVOService.comment"
          }
        ]
      },
      {
        "id": "HVOTjanstLogical.giltigFrom",
        "path": "HVOTjanstLogical.giltigFrom",
        "short": "giltigFrom",
        "definition": "Angivelse av den tidpunkt från och med vilken tjänsten erbjuds.",
        "min": 1,
        "max": "1",
        "base": {
          "path": "HVOTjanstLogical.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": "TjanstToHVOService",
            "map": "HVOService.extension[period].valuePeriod.start"
          }
        ]
      },
      {
        "id": "HVOTjanstLogical.giltigTom",
        "path": "HVOTjanstLogical.giltigTom",
        "short": "giltigTom",
        "definition": "Angivelse av den tidpunkt då en tjänst upphör att erbjudas. Ska ej anges när tidpunkt denna tidpunkt är okänd.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "HVOTjanstLogical.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": "TjanstToHVOService",
            "map": "HVOService.extension[period].valuePeriod.end"
          }
        ]
      },
      {
        "id": "HVOTjanstLogical.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": "HVOTjanstLogical.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": "HVOTjanstLogical.har",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/hvo/StructureDefinition/HVOKontaktuppgiftLogical"
            ]
          }
        ],
        "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": "TjanstToHVOService",
            "map": "HVOService.contact"
          }
        ]
      },
      {
        "id": "HVOTjanstLogical.erbjudsTill",
        "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": "HVOTjanstLogical.erbjudsTill",
        "short": "erbjuds till",
        "definition": "erbjuds till",
        "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": "HVOTjanstLogical.erbjudsTill",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/hvo/StructureDefinition/HVOMalgruppLogical"
            ]
          }
        ],
        "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": "TjanstToHVOService",
            "map": "HVOService.eligibility"
          }
        ]
      },
      {
        "id": "HVOTjanstLogical.finnsTillganglig",
        "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": "HVOTjanstLogical.finnsTillganglig",
        "short": "finns tillgänglig",
        "definition": "finns tillgänglig",
        "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": "HVOTjanstLogical.finnsTillganglig",
          "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": "TjanstToHVOService",
            "map": "HVOService.availability.availableTime"
          }
        ]
      },
      {
        "id": "HVOTjanstLogical.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": "HVOTjanstLogical.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": "HVOTjanstLogical.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": "TjanstToHVOService",
            "map": "HVOService.availability.notAvailableTime"
          }
        ]
      },
      {
        "id": "HVOTjanstLogical.harSarskilda",
        "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": "HVOTjanstLogical.harSarskilda",
        "short": "har särskilda",
        "definition": "har särskilda",
        "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": "HVOTjanstLogical.harSarskilda",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/hvo/StructureDefinition/HVOVillkorLogical"
            ]
          }
        ],
        "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": "TjanstToHVOService",
            "map": "HVOService.eligibility"
          }
        ]
      },
      {
        "id": "HVOTjanstLogical.erbjudsPa",
        "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": "HVOTjanstLogical.erbjudsPa",
        "short": "erbjudsPa",
        "definition": "erbjudsPa",
        "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": "HVOTjanstLogical.erbjudsPa",
          "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": "TjanstToHVOService",
            "map": "HVOService.location(HVOLocation)"
          }
        ]
      },
      {
        "id": "HVOTjanstLogical.erbjudsAv",
        "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": "HVOTjanstLogical.erbjudsAv",
        "short": "erbjudsAv",
        "definition": "erbjudsAv",
        "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": "HVOTjanstLogical.erbjudsAv",
          "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": "TjanstToHVOService",
            "map": "HVOService.providedBy(HVOOrganizationalUnit)"
          }
        ]
      }
    ]
  },
  "differential": {
    "element": [
      {
        "id": "HVOTjanstLogical",
        "path": "HVOTjanstLogical",
        "short": "Tjänst",
        "definition": "Klassen tjänst håller information aktivitet som erbjuds för att tillgodose ett behov."
      },
      {
        "id": "HVOTjanstLogical.id",
        "path": "HVOTjanstLogical.id",
        "short": "id",
        "definition": "Angivelse av identifierare för tjänsten.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Identifier"
          }
        ],
        "mapping": [
          {
            "identity": "TjanstToHVOService",
            "map": "HVOService.identifier"
          }
        ]
      },
      {
        "id": "HVOTjanstLogical.typ",
        "path": "HVOTjanstLogical.typ",
        "short": "typ",
        "definition": "Angivelse av kod för typ av tjänst.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Coding"
          }
        ],
        "mapping": [
          {
            "identity": "TjanstToHVOService",
            "map": "HVOService.type"
          }
        ]
      },
      {
        "id": "HVOTjanstLogical.motesform",
        "path": "HVOTjanstLogical.motesform",
        "short": "mötesform",
        "definition": "Angivelse av kod för vilken form tjänstens möten erbjuds i. Exempel är videosamtal, fysisk träff eller chatt.",
        "min": 1,
        "max": "*",
        "type": [
          {
            "code": "Coding"
          }
        ],
        "mapping": [
          {
            "identity": "TjanstToHVOService",
            "map": "HVOService.characteristic"
          }
        ]
      },
      {
        "id": "HVOTjanstLogical.beskrivning",
        "path": "HVOTjanstLogical.beskrivning",
        "short": "beskrivning",
        "definition": "Textuell beskrivning av tjänst. Används som komplement för attributet typ i de fall en textuell beskrivning krävs.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "TjanstToHVOService",
            "map": "HVOService.comment"
          }
        ]
      },
      {
        "id": "HVOTjanstLogical.giltigFrom",
        "path": "HVOTjanstLogical.giltigFrom",
        "short": "giltigFrom",
        "definition": "Angivelse av den tidpunkt från och med vilken tjänsten erbjuds.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "time"
          }
        ],
        "mapping": [
          {
            "identity": "TjanstToHVOService",
            "map": "HVOService.extension[period].valuePeriod.start"
          }
        ]
      },
      {
        "id": "HVOTjanstLogical.giltigTom",
        "path": "HVOTjanstLogical.giltigTom",
        "short": "giltigTom",
        "definition": "Angivelse av den tidpunkt då en tjänst upphör att erbjudas. Ska ej anges när tidpunkt denna tidpunkt är okänd.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "time"
          }
        ],
        "mapping": [
          {
            "identity": "TjanstToHVOService",
            "map": "HVOService.extension[period].valuePeriod.end"
          }
        ]
      },
      {
        "id": "HVOTjanstLogical.har",
        "path": "HVOTjanstLogical.har",
        "short": "har",
        "definition": "har",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/hvo/StructureDefinition/HVOKontaktuppgiftLogical"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "TjanstToHVOService",
            "map": "HVOService.contact"
          }
        ]
      },
      {
        "id": "HVOTjanstLogical.erbjudsTill",
        "path": "HVOTjanstLogical.erbjudsTill",
        "short": "erbjuds till",
        "definition": "erbjuds till",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/hvo/StructureDefinition/HVOMalgruppLogical"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "TjanstToHVOService",
            "map": "HVOService.eligibility"
          }
        ]
      },
      {
        "id": "HVOTjanstLogical.finnsTillganglig",
        "path": "HVOTjanstLogical.finnsTillganglig",
        "short": "finns tillgänglig",
        "definition": "finns tillgänglig",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/hvo/StructureDefinition/HVOTillganglighetstidLogical"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "TjanstToHVOService",
            "map": "HVOService.availability.availableTime"
          }
        ]
      },
      {
        "id": "HVOTjanstLogical.harTillganglighetsavvikelse",
        "path": "HVOTjanstLogical.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": "TjanstToHVOService",
            "map": "HVOService.availability.notAvailableTime"
          }
        ]
      },
      {
        "id": "HVOTjanstLogical.harSarskilda",
        "path": "HVOTjanstLogical.harSarskilda",
        "short": "har särskilda",
        "definition": "har särskilda",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/hvo/StructureDefinition/HVOVillkorLogical"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "TjanstToHVOService",
            "map": "HVOService.eligibility"
          }
        ]
      },
      {
        "id": "HVOTjanstLogical.erbjudsPa",
        "path": "HVOTjanstLogical.erbjudsPa",
        "short": "erbjudsPa",
        "definition": "erbjudsPa",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/hvo/StructureDefinition/HVOPlatsLogical"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "TjanstToHVOService",
            "map": "HVOService.location(HVOLocation)"
          }
        ]
      },
      {
        "id": "HVOTjanstLogical.erbjudsAv",
        "path": "HVOTjanstLogical.erbjudsAv",
        "short": "erbjudsAv",
        "definition": "erbjudsAv",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/hvo/StructureDefinition/HVOOrganisatoriskEnhetLogical"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "TjanstToHVOService",
            "map": "HVOService.providedBy(HVOOrganizationalUnit)"
          }
        ]
      }
    ]
  }
}