{
  "resourceType": "StructureDefinition",
  "id": "SHCHealthCertificateSubject",
  "url": "https://electronichealth.se/fhir/shc/StructureDefinition/SHCHealthCertificateSubject",
  "version": "0.1",
  "name": "SHCHealthCertificateSubject",
  "status": "draft",
  "description": "This profile contains information about an individual person who is the subject of a health certificate.",
  "fhirVersion": "5.0.0",
  "mapping": [
    {
      "identity": "SHCHealthCertificateSubjectToSHCPersonLogical",
      "uri": "SHCPersonLogical"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "Patient",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Patient",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Patient.meta",
        "path": "Patient.meta",
        "mustSupport": true
      },
      {
        "id": "Patient.meta.security",
        "path": "Patient.meta.security",
        "short": "Code for protection status (privacy marking)",
        "mustSupport": true,
        "mapping": [
          {
            "identity": "SHCHealthCertificateSubjectToSHCPersonLogical",
            "map": "skyddadIdentitet"
          }
        ]
      },
      {
        "id": "Patient.identifier",
        "path": "Patient.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "description": "Slice identifier based on the system value to express different kinds of Swedish identifiers",
          "ordered": false,
          "rules": "open"
        },
        "short": "Person identifier (personal or coordination number)",
        "max": "1",
        "mustSupport": true,
        "mapping": [
          {
            "identity": "SHCHealthCertificateSubjectToSHCPersonLogical",
            "map": "id"
          }
        ]
      },
      {
        "id": "Patient.identifier.system",
        "path": "Patient.identifier.system",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.identifier.value",
        "path": "Patient.identifier.value",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.identifier:personalIdentityNumber",
        "path": "Patient.identifier",
        "sliceName": "personalIdentityNumber",
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Patient.identifier:personalIdentityNumber.system",
        "path": "Patient.identifier.system",
        "fixedUri": "http://electronichealth.se/identifier/personnummer"
      },
      {
        "id": "Patient.identifier:coordinationNumber",
        "path": "Patient.identifier",
        "sliceName": "coordinationNumber",
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Patient.identifier:coordinationNumber.system",
        "path": "Patient.identifier.system",
        "min": 1,
        "fixedUri": "http://electronichealth.se/identifier/samordningsnummer",
        "mustSupport": true
      },
      {
        "id": "Patient.identifier:coordinationNumber.value",
        "path": "Patient.identifier.value",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.name",
        "path": "Patient.name",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Patient.name.family",
        "path": "Patient.name.family",
        "short": "The person’s surname",
        "min": 1,
        "mustSupport": true,
        "mapping": [
          {
            "identity": "SHCHealthCertificateSubjectToSHCPersonLogical",
            "map": "efternamn"
          }
        ]
      },
      {
        "id": "Patient.name.given",
        "path": "Patient.name.given",
        "short": "The person’s first name",
        "min": 1,
        "max": "1",
        "mustSupport": true,
        "mapping": [
          {
            "identity": "SHCHealthCertificateSubjectToSHCPersonLogical",
            "map": "fornamn"
          }
        ]
      },
      {
        "id": "Patient.telecom",
        "path": "Patient.telecom",
        "mustSupport": true
      },
      {
        "id": "Patient.telecom.system",
        "path": "Patient.telecom.system",
        "min": 1,
        "mustSupport": true,
        "binding": {
          "strength": "required",
          "valueSet": "http://hl7.org/fhir/ValueSet/contact-point-system"
        }
      },
      {
        "id": "Patient.telecom.value",
        "path": "Patient.telecom.value",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.telecom.period",
        "path": "Patient.telecom.period",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.telecom.period.start",
        "path": "Patient.telecom.period.start",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.telecom.period.end",
        "path": "Patient.telecom.period.end",
        "mustSupport": true
      },
      {
        "id": "Patient.gender",
        "path": "Patient.gender",
        "short": "Code for the person’s administrative gender",
        "min": 1,
        "mustSupport": true,
        "mapping": [
          {
            "identity": "SHCHealthCertificateSubjectToSHCPersonLogical",
            "map": "kon"
          }
        ]
      },
      {
        "id": "Patient.birthDate",
        "path": "Patient.birthDate",
        "short": "The person’s date of birth",
        "min": 1,
        "mustSupport": true,
        "mapping": [
          {
            "identity": "SHCHealthCertificateSubjectToSHCPersonLogical",
            "map": "fodelsedatum"
          }
        ]
      },
      {
        "id": "Patient.address",
        "path": "Patient.address",
        "mustSupport": true
      },
      {
        "id": "Patient.address.line",
        "path": "Patient.address.line",
        "mustSupport": true
      },
      {
        "id": "Patient.address.city",
        "path": "Patient.address.city",
        "mustSupport": true
      },
      {
        "id": "Patient.address.postalCode",
        "path": "Patient.address.postalCode",
        "mustSupport": true
      },
      {
        "id": "Patient.address.country",
        "path": "Patient.address.country",
        "mustSupport": true
      },
      {
        "id": "Patient.address.period",
        "path": "Patient.address.period",
        "mustSupport": true
      },
      {
        "id": "Patient.address.period.start",
        "path": "Patient.address.period.start",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.address.period.end",
        "path": "Patient.address.period.end",
        "mustSupport": true
      }
    ]
  }
}