{
  "resourceType": "StructureDefinition",
  "id": "HVOPersonrollLogical",
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-type-characteristics",
      "valueCode": "can-be-target"
    }
  ],
  "url": "http://electronichealth.se/fhir/hvo/StructureDefinition/HVOPersonrollLogical",
  "name": "HVOPersonrollLogical",
  "title": "Personroll",
  "status": "draft",
  "description": "Klassen personroll håller information om en roll för en viss person.",
  "fhirVersion": "5.0.0",
  "mapping": [
    {
      "identity": "PersonrollToHVOPractitionerRole",
      "uri": "HVOPractitionerRole"
    }
  ],
  "kind": "logical",
  "abstract": false,
  "type": "http://electronichealth.se/fhir/hvo/StructureDefinition/HVOPersonrollLogical",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Base",
  "derivation": "specialization",
  "differential": {
    "element": [
      {
        "id": "HVOPersonrollLogical",
        "path": "HVOPersonrollLogical",
        "short": "Personroll",
        "definition": "Klassen personroll håller information om en roll för en viss person."
      },
      {
        "id": "HVOPersonrollLogical.kod",
        "path": "HVOPersonrollLogical.kod",
        "short": "kod",
        "definition": "Angivelse av kod för personrollen.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Coding"
          }
        ],
        "mapping": [
          {
            "identity": "PersonrollToHVOPractitionerRole",
            "map": "HVOPractitionerRole.code"
          }
        ]
      },
      {
        "id": "HVOPersonrollLogical.giltigFrom",
        "path": "HVOPersonrollLogical.giltigFrom",
        "short": "giltigFrom",
        "definition": "Angivelse av den tidpunkt från och med vilken en viss person har rollen.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "time"
          }
        ],
        "mapping": [
          {
            "identity": "PersonrollToHVOPractitionerRole",
            "map": "HVOPractitionerRole.period.start"
          }
        ]
      },
      {
        "id": "HVOPersonrollLogical.giltigTom",
        "path": "HVOPersonrollLogical.giltigTom",
        "short": "giltigTom",
        "definition": "Angivelse av den tidpunkt då en viss person upphör att ha rollen. Ska ej anges om denna tidpunkt är okänd.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "time"
          }
        ],
        "mapping": [
          {
            "identity": "PersonrollToHVOPractitionerRole",
            "map": "HVOPractitionerRole.period.end"
          }
        ]
      },
      {
        "id": "HVOPersonrollLogical.har",
        "path": "HVOPersonrollLogical.har",
        "short": "har",
        "definition": "har",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/hvo/StructureDefinition/HVOKontaktuppgiftLogical"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "PersonrollToHVOPractitionerRole",
            "map": "HVOPractitionerRole.contact"
          }
        ]
      },
      {
        "id": "HVOPersonrollLogical.tillhor",
        "path": "HVOPersonrollLogical.tillhor",
        "short": "tillhor",
        "definition": "tillhor",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/hvo/StructureDefinition/HVOOrganisationLogical",
              "http://electronichealth.se/fhir/hvo/StructureDefinition/HVOOrganisatoriskEnhetLogical"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "PersonrollToHVOPractitionerRole",
            "map": "HVOPractitionerRole.organization(HVOOrganization or HVOOrganizationalUnit)"
          }
        ]
      },
      {
        "id": "HVOPersonrollLogical.antar",
        "path": "HVOPersonrollLogical.antar",
        "short": "antar",
        "definition": "antar",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/hvo/StructureDefinition/HVOPersonLogical"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "PersonrollToHVOPractitionerRole",
            "map": "HVOPractitionerRole.practitioner(HVOPractitioner)"
          }
        ]
      }
    ]
  }
}