{
  "resourceType": "StructureDefinition",
  "id": "NPPRMedarbetareLogical",
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-type-characteristics",
      "valueCode": "can-be-target"
    }
  ],
  "url": "http://electronichealth.se/fhir/NPPR/StructureDefinition/NPPRMedarbetareLogical",
  "name": "NPPRMedarbetareLogical",
  "title": "Medarbetare",
  "status": "active",
  "description": "Klassen medarbetare håller information om en yrkesutövare som har överenskommelse om att arbeta i en organisation. Ett exempel på medarbetare är en legitimerad läkare anställd med befattningen distriktsläkare på Pajala hälsocentral i Region Norrbotten.",
  "fhirVersion": "5.0.0",
  "mapping": [
    {
      "identity": "MedarbetareToNPPRPractitionerRole",
      "uri": "NPPRPractitionerRole"
    }
  ],
  "kind": "logical",
  "abstract": false,
  "type": "http://electronichealth.se/fhir/NPPR/StructureDefinition/NPPRMedarbetareLogical",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Base",
  "derivation": "specialization",
  "snapshot": {
    "element": [
      {
        "id": "NPPRMedarbetareLogical",
        "path": "NPPRMedarbetareLogical",
        "short": "Medarbetare",
        "definition": "Klassen medarbetare håller information om en yrkesutövare som har överenskommelse om att arbeta i en organisation. Ett exempel på medarbetare är en legitimerad läkare anställd med befattningen distriktsläkare på Pajala hälsocentral i Region Norrbotten.",
        "min": 0,
        "max": "*",
        "base": {
          "path": "NPPRMedarbetareLogical",
          "min": 0,
          "max": "*"
        },
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "NPPRMedarbetareLogical.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": "NPPRMedarbetareLogical.id",
        "short": "id",
        "definition": "Angivelse av identifierare för en yrkesutövare i dess uppdrag eller anställning för en organisation.",
        "comment": "The rules of the identifier.type  determine if a check digit is part of the ID value or sent separately, such as through the checkDigit extension.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "NPPRMedarbetareLogical.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": "MedarbetareToNPPRPractitionerRole",
            "map": "NPPRPractitionerRole.identifier"
          }
        ]
      },
      {
        "id": "NPPRMedarbetareLogical.befattning",
        "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": "NPPRMedarbetareLogical.befattning",
        "short": "befattning",
        "definition": "Kod för den befattning en person har i ett visst uppdrag i en organisation. En befattning avser ställning i en verksamhet som innebär vissa befogenheter och ett visst ansvar.",
        "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": "NPPRMedarbetareLogical.befattning",
          "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": "MedarbetareToNPPRPractitionerRole",
            "map": "NPPRPractitionerRole.code"
          }
        ]
      },
      {
        "id": "NPPRMedarbetareLogical.titel",
        "path": "NPPRMedarbetareLogical.titel",
        "short": "titel",
        "definition": "Textuell angivelse av befattning eller yrke. Anges som komplement till attributet befattning då kod saknas eller när det finns behov av att komplettera befattningskoden med en alternativ text.",
        "comment": "Note that FHIR strings SHALL NOT exceed 1,048,576 (1024*1024) characters in size",
        "min": 0,
        "max": "1",
        "base": {
          "path": "NPPRMedarbetareLogical.titel",
          "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"
          }
        ]
      },
      {
        "id": "NPPRMedarbetareLogical.har2",
        "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": "NPPRMedarbetareLogical.har2",
        "short": "har2",
        "definition": "har2",
        "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": "NPPRMedarbetareLogical.har2",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/NPPR/StructureDefinition/NPPRKontaktuppgiftLogical"
            ]
          }
        ],
        "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": "MedarbetareToNPPRPractitionerRole",
            "map": "NPPRPractitionerRole.contact"
          }
        ]
      },
      {
        "id": "NPPRMedarbetareLogical.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": "NPPRMedarbetareLogical.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": "NPPRMedarbetareLogical.har",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/NPPR/StructureDefinition/NPPRUppdragLogical"
            ]
          }
        ],
        "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": "MedarbetareToNPPRPractitionerRole",
            "map": "NPPRPractitionerRole.healthcareService(NPPRCommission)"
          }
        ]
      },
      {
        "id": "NPPRMedarbetareLogical.antarRollen",
        "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": "NPPRMedarbetareLogical.antarRollen",
        "short": "antar rollen",
        "definition": "antar rollen",
        "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": "NPPRMedarbetareLogical.antarRollen",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/NPPR/StructureDefinition/NPPRYrkesutovareLogical"
            ]
          }
        ],
        "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": "MedarbetareToNPPRPractitionerRole",
            "map": "NPPRPractitionerRole.practitioner(NPPRPractitioner)"
          }
        ]
      }
    ]
  },
  "differential": {
    "element": [
      {
        "id": "NPPRMedarbetareLogical",
        "path": "NPPRMedarbetareLogical",
        "short": "Medarbetare",
        "definition": "Klassen medarbetare håller information om en yrkesutövare som har överenskommelse om att arbeta i en organisation. Ett exempel på medarbetare är en legitimerad läkare anställd med befattningen distriktsläkare på Pajala hälsocentral i Region Norrbotten."
      },
      {
        "id": "NPPRMedarbetareLogical.id",
        "path": "NPPRMedarbetareLogical.id",
        "short": "id",
        "definition": "Angivelse av identifierare för en yrkesutövare i dess uppdrag eller anställning för en organisation.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Identifier"
          }
        ],
        "mapping": [
          {
            "identity": "MedarbetareToNPPRPractitionerRole",
            "map": "NPPRPractitionerRole.identifier"
          }
        ]
      },
      {
        "id": "NPPRMedarbetareLogical.befattning",
        "path": "NPPRMedarbetareLogical.befattning",
        "short": "befattning",
        "definition": "Kod för den befattning en person har i ett visst uppdrag i en organisation. En befattning avser ställning i en verksamhet som innebär vissa befogenheter och ett visst ansvar.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Coding"
          }
        ],
        "mapping": [
          {
            "identity": "MedarbetareToNPPRPractitionerRole",
            "map": "NPPRPractitionerRole.code"
          }
        ]
      },
      {
        "id": "NPPRMedarbetareLogical.titel",
        "path": "NPPRMedarbetareLogical.titel",
        "short": "titel",
        "definition": "Textuell angivelse av befattning eller yrke. Anges som komplement till attributet befattning då kod saknas eller när det finns behov av att komplettera befattningskoden med en alternativ text.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ]
      },
      {
        "id": "NPPRMedarbetareLogical.har2",
        "path": "NPPRMedarbetareLogical.har2",
        "short": "har2",
        "definition": "har2",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/NPPR/StructureDefinition/NPPRKontaktuppgiftLogical"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "MedarbetareToNPPRPractitionerRole",
            "map": "NPPRPractitionerRole.contact"
          }
        ]
      },
      {
        "id": "NPPRMedarbetareLogical.har",
        "path": "NPPRMedarbetareLogical.har",
        "short": "har",
        "definition": "har",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/NPPR/StructureDefinition/NPPRUppdragLogical"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "MedarbetareToNPPRPractitionerRole",
            "map": "NPPRPractitionerRole.healthcareService(NPPRCommission)"
          }
        ]
      },
      {
        "id": "NPPRMedarbetareLogical.antarRollen",
        "path": "NPPRMedarbetareLogical.antarRollen",
        "short": "antar rollen",
        "definition": "antar rollen",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/NPPR/StructureDefinition/NPPRYrkesutovareLogical"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "MedarbetareToNPPRPractitionerRole",
            "map": "NPPRPractitionerRole.practitioner(NPPRPractitioner)"
          }
        ]
      }
    ]
  }
}