{
  "resourceType": "StructureDefinition",
  "id": "SHCIntygLogical",
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-type-characteristics",
      "valueCode": "can-be-target"
    }
  ],
  "url": "http://electronichealth.se/fhir/shc/StructureDefinition/SHCIntygLogical",
  "name": "SHCIntygLogical",
  "title": "Intyg",
  "status": "draft",
  "description": "Klassen intyg håller information ett utfärdat intyg. ",
  "fhirVersion": "5.0.0",
  "mapping": [
    {
      "identity": "IntygToSHCQuestionnaireResponse",
      "uri": "SHCQuestionnaireResponse"
    }
  ],
  "kind": "logical",
  "abstract": false,
  "type": "http://electronichealth.se/fhir/shc/StructureDefinition/SHCIntygLogical",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Base",
  "derivation": "specialization",
  "differential": {
    "element": [
      {
        "id": "SHCIntygLogical",
        "path": "SHCIntygLogical",
        "short": "Intyg",
        "definition": "Klassen intyg håller information ett utfärdat intyg. "
      },
      {
        "id": "SHCIntygLogical.id",
        "path": "SHCIntygLogical.id",
        "short": "id",
        "definition": "identifierare som tilldelats ett intyg av utföraren och/eller andra system. Dessa identifierare förblir konstanta när resursen uppdateras och sprids från server till server",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Identifier"
          }
        ],
        "mapping": [
          {
            "identity": "IntygToSHCQuestionnaireResponse",
            "map": "SHCQuestionnaireResponse.identifier"
          }
        ]
      },
      {
        "id": "SHCIntygLogical.utfardandetidpunkt",
        "path": "SHCIntygLogical.utfardandetidpunkt",
        "short": "utfärdandetidpunkt",
        "definition": "den tidpunkt ett intyg utfärdas",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "time"
          }
        ],
        "mapping": [
          {
            "identity": "IntygToSHCQuestionnaireResponse",
            "map": "SHCQuestionnaireResponse.authored"
          }
        ]
      },
      {
        "id": "SHCIntygLogical.status",
        "path": "SHCIntygLogical.status",
        "short": "status",
        "definition": "kod för aktuellt status för intyget (t.ex. påbörjad, slutförd, stoppad)",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Coding"
          }
        ],
        "mapping": [
          {
            "identity": "IntygToSHCQuestionnaireResponse",
            "map": "SHCQuestionnaireResponse.status"
          }
        ]
      },
      {
        "id": "SHCIntygLogical.bestammerUtformningAv",
        "path": "SHCIntygLogical.bestammerUtformningAv",
        "short": "bestämmer utformning av",
        "definition": "bestämmer utformning av",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/shc/StructureDefinition/SHCIntygsformularLogical"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "IntygToSHCQuestionnaireResponse",
            "map": ""
          }
        ]
      },
      {
        "id": "SHCIntygLogical.delAv",
        "path": "SHCIntygLogical.delAv",
        "short": "del av",
        "definition": "del av",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/shc/StructureDefinition/SHCUnderskriftLogical"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "IntygToSHCQuestionnaireResponse",
            "map": "SHCQuestionnaireResponse.extension[signature]"
          }
        ]
      },
      {
        "id": "SHCIntygLogical.finnsI",
        "path": "SHCIntygLogical.finnsI",
        "short": "finns i",
        "definition": "finns i",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/shc/StructureDefinition/SHCSvarLogical"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "IntygToSHCQuestionnaireResponse",
            "map": "SHCQuestionnaireResponse.item[answer]"
          }
        ]
      },
      {
        "id": "SHCIntygLogical.finnsI2",
        "path": "SHCIntygLogical.finnsI2",
        "short": "finns i2",
        "definition": "finns i2",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/shc/StructureDefinition/SHCSektionIUtfardatIntygLogical"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "IntygToSHCQuestionnaireResponse",
            "map": "SHCQuestionnaireResponse.item[section]"
          }
        ]
      },
      {
        "id": "SHCIntygLogical.arUppgiftslamnare",
        "path": "SHCIntygLogical.arUppgiftslamnare",
        "short": "är uppgiftslämnare",
        "definition": "är uppgiftslämnare",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/shc/StructureDefinition/SHCPersonLogical",
              "http://electronichealth.se/fhir/shc/StructureDefinition/SHCHalsoOchSjukvardspersonalLogical",
              "http://electronichealth.se/fhir/shc/StructureDefinition/SHCAnnanPersonLogical"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "IntygToSHCQuestionnaireResponse",
            "map": "SHCQuestionnaireResponse.source(SHCMedicalCertificateSubject or SHCPractitioner or SHC or SHCRelatedPerson)"
          }
        ]
      },
      {
        "id": "SHCIntygLogical.harRollenIntygsperson",
        "path": "SHCIntygLogical.harRollenIntygsperson",
        "short": "har rollen intygsperson",
        "definition": "har rollen intygsperson",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/shc/StructureDefinition/SHCPersonLogical"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "IntygToSHCQuestionnaireResponse",
            "map": "SHCQuestionnaireResponse.subject(SHCMedicalCertificateSubject)"
          }
        ]
      },
      {
        "id": "SHCIntygLogical.harIntygsutfardare",
        "path": "SHCIntygLogical.harIntygsutfardare",
        "short": "har intygsutfärdare",
        "definition": "har intygsutfärdare",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/shc/StructureDefinition/SHCHalsoOchSjukvardspersonalLogical"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "IntygToSHCQuestionnaireResponse",
            "map": "SHCQuestionnaireResponse.author(SHCPractitioner)"
          }
        ]
      }
    ]
  }
}