{
  "resourceType": "StructureDefinition",
  "url": "http://electronichealth.se/fhir/StructureDefinition/NLLPowAttConsent",
  "name": "NLLPowAttConsent",
  "status": "draft",
  "description": "OLD! Togs fram innan fullmakter pausades i NLL 1.0. Represents a power of attorney between a patient and another person (related person or in its practtice) or care organization for e.g. purchase of medication or access to the medication list.",
  "fhirVersion": "4.0.0",
  "mapping": [
    {
      "identity": "EHM",
      "name": "eHälsomyndighetens informationsmodell"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "Consent",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Consent",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Consent.extension",
        "path": "Consent.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Consent.extension:registeringOrganization",
        "path": "Consent.extension",
        "sliceName": "registeringOrganization",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://electronichealth.se/fhir/StructureDefinition/organizationRef"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "EHM",
            "map": "Fullmakt.registrerandeOrganisatoriskEnhet"
          }
        ]
      },
      {
        "id": "Consent.extension:documentType",
        "path": "Consent.extension",
        "sliceName": "documentType",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://electronichealth.se/fhir/StructureDefinition/DocumentType"
            ]
          }
        ],
        "binding": {
          "strength": "required",
          "valueSet": "http://electronichealth.se/fhir/ValueSet/DocumentTypes"
        },
        "mapping": [
          {
            "identity": "EHM",
            "map": "UnderlagTyp"
          }
        ]
      },
      {
        "id": "Consent.extension:submittedBy",
        "path": "Consent.extension",
        "sliceName": "submittedBy",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://electronichealth.se/fhir/StructureDefinition/TypeOfSubmitter"
            ]
          }
        ],
        "binding": {
          "strength": "required",
          "valueSet": "http://electronichealth.se/fhir/ValueSet/pow-att-submitter-type"
        },
        "mapping": [
          {
            "identity": "EHM",
            "map": "InlämnadAvRollTyp"
          }
        ]
      },
      {
        "id": "Consent.extension:consentingDelegate",
        "path": "Consent.extension",
        "sliceName": "consentingDelegate",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://electronichealth.se/fhir/StructureDefinition/ConsentingPart"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "EHM",
            "map": "Fullmaktsgivare",
            "comment": "Fullmaktsgivare samt FullmaktsgivareRollTyp"
          }
        ]
      },
      {
        "id": "Consent.extension:consentingParty",
        "path": "Consent.extension",
        "sliceName": "consentingParty",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://electronichealth.se/fhir/StructureDefinition/ConsentingPart"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "EHM",
            "map": "Fullmaktstagare"
          }
        ]
      },
      {
        "id": "Consent.identifier",
        "path": "Consent.identifier",
        "mustSupport": true
      },
      {
        "id": "Consent.status",
        "path": "Consent.status",
        "short": "proposed | active | inactive",
        "definition": "Indicates the current state of this consent. Supported states are: proposed, active, inactive",
        "mustSupport": true,
        "mapping": [
          {
            "identity": "EHM",
            "map": "Fullmakt.status"
          }
        ]
      },
      {
        "id": "Consent.category",
        "path": "Consent.category",
        "binding": {
          "strength": "required",
          "valueSet": "http://electronichealth.se/fhir/ValueSet/pow-att-types"
        },
        "mapping": [
          {
            "identity": "EHM",
            "map": "FullmaktTyp"
          }
        ]
      },
      {
        "id": "Consent.category.coding.system",
        "path": "Consent.category.coding.system",
        "fixedUri": "http://electronichealth.se/fhir/ValueSet/pow-att-types",
        "binding": {
          "strength": "required",
          "description": "Type of power of attorney"
        }
      },
      {
        "id": "Consent.patient",
        "path": "Consent.patient",
        "mustSupport": true,
        "mapping": [
          {
            "identity": "EHM",
            "map": "patientRef"
          }
        ]
      },
      {
        "id": "Consent.dateTime",
        "path": "Consent.dateTime",
        "mustSupport": true,
        "mapping": [
          {
            "identity": "EHM",
            "map": "Fullmakt.giltigFrom giltigTom"
          }
        ]
      },
      {
        "id": "Consent.provision.dataPeriod",
        "path": "Consent.provision.dataPeriod",
        "mustSupport": true
      }
    ]
  }
}