{
  "resourceType": "StructureDefinition",
  "id": "SmartAL-Glintt-Patient",
  "url": "http://alticelabs.com/fhir/StructureDefinition/SmartAL-Glintt-Patient",
  "name": "SmartALGlinttPatient",
  "title": "SmartAL Glintt Patient",
  "status": "active",
  "description": "Patient resource as sent to Glintt. Correlated by SNS (Health Card) number.\n\nPatient and Practitioner resources are synced individually to Glintt (Group A),\nwhile Observations are sent as FHIR transaction Bundles (Group B).",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Patient",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Patient",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Patient.identifier",
        "path": "Patient.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open",
          "description": "Slice by identifier system",
          "ordered": false
        },
        "min": 2,
        "mustSupport": true
      },
      {
        "id": "Patient.identifier:altice",
        "path": "Patient.identifier",
        "sliceName": "altice",
        "short": "Altice business identifier (UUID)",
        "definition": "Server-generated UUID matching the HAPI resource ID. Glintt echoes this back in the async callback for correlation.",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Patient.identifier:altice.system",
        "path": "Patient.identifier.system",
        "min": 1,
        "fixedUri": "http://alticelabs.com/fhir/identifiers/patient"
      },
      {
        "id": "Patient.identifier:altice.value",
        "path": "Patient.identifier.value",
        "min": 1
      },
      {
        "id": "Patient.identifier:sns",
        "path": "Patient.identifier",
        "sliceName": "sns",
        "short": "Portuguese SNS (Health Card) number",
        "definition": "Primary correlation identifier with Glintt. Used in search-before-create pattern during Patient sync.",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Patient.identifier:sns.use",
        "path": "Patient.identifier.use",
        "fixedCode": "official"
      },
      {
        "id": "Patient.identifier:sns.type",
        "path": "Patient.identifier.type",
        "min": 1
      },
      {
        "id": "Patient.identifier:sns.type.coding",
        "path": "Patient.identifier.type.coding",
        "min": 1
      },
      {
        "id": "Patient.identifier:sns.type.coding.system",
        "path": "Patient.identifier.type.coding.system",
        "fixedUri": "http://terminology.hl7.org/CodeSystem/v2-0203"
      },
      {
        "id": "Patient.identifier:sns.type.coding.code",
        "path": "Patient.identifier.type.coding.code",
        "fixedCode": "HC"
      },
      {
        "id": "Patient.identifier:sns.system",
        "path": "Patient.identifier.system",
        "min": 1,
        "fixedUri": "https://spms.min-saude.pt"
      },
      {
        "id": "Patient.identifier:sns.value",
        "path": "Patient.identifier.value",
        "min": 1
      },
      {
        "id": "Patient.identifier:nif",
        "path": "Patient.identifier",
        "sliceName": "nif",
        "short": "Portuguese NIF (Tax ID)",
        "min": 0,
        "max": "1"
      },
      {
        "id": "Patient.identifier:nif.use",
        "path": "Patient.identifier.use",
        "fixedCode": "secondary"
      },
      {
        "id": "Patient.identifier:nif.type",
        "path": "Patient.identifier.type",
        "min": 1
      },
      {
        "id": "Patient.identifier:nif.type.coding",
        "path": "Patient.identifier.type.coding",
        "min": 1
      },
      {
        "id": "Patient.identifier:nif.type.coding.system",
        "path": "Patient.identifier.type.coding.system",
        "fixedUri": "http://terminology.hl7.org/CodeSystem/v2-0203"
      },
      {
        "id": "Patient.identifier:nif.type.coding.code",
        "path": "Patient.identifier.type.coding.code",
        "fixedCode": "TAX"
      },
      {
        "id": "Patient.identifier:nif.system",
        "path": "Patient.identifier.system",
        "min": 1,
        "fixedUri": "https://www.portaldasfinancas.gov.pt"
      },
      {
        "id": "Patient.identifier:nif.value",
        "path": "Patient.identifier.value",
        "min": 1
      },
      {
        "id": "Patient.identifier:cc",
        "path": "Patient.identifier",
        "sliceName": "cc",
        "short": "Portuguese Citizenship Card (CC)",
        "min": 0,
        "max": "1"
      },
      {
        "id": "Patient.identifier:cc.use",
        "path": "Patient.identifier.use",
        "fixedCode": "secondary"
      },
      {
        "id": "Patient.identifier:cc.type",
        "path": "Patient.identifier.type",
        "min": 1
      },
      {
        "id": "Patient.identifier:cc.type.coding",
        "path": "Patient.identifier.type.coding",
        "min": 1
      },
      {
        "id": "Patient.identifier:cc.type.coding.system",
        "path": "Patient.identifier.type.coding.system",
        "fixedUri": "http://terminology.hl7.org/CodeSystem/v2-0203"
      },
      {
        "id": "Patient.identifier:cc.type.coding.code",
        "path": "Patient.identifier.type.coding.code",
        "fixedCode": "CZ"
      },
      {
        "id": "Patient.identifier:cc.system",
        "path": "Patient.identifier.system",
        "min": 1,
        "fixedUri": "https://irn.justica.gov.pt"
      },
      {
        "id": "Patient.identifier:cc.value",
        "path": "Patient.identifier.value",
        "min": 1
      },
      {
        "id": "Patient.identifier:niss",
        "path": "Patient.identifier",
        "sliceName": "niss",
        "short": "Portuguese NISS (Social Security)",
        "min": 0,
        "max": "1"
      },
      {
        "id": "Patient.identifier:niss.use",
        "path": "Patient.identifier.use",
        "fixedCode": "secondary"
      },
      {
        "id": "Patient.identifier:niss.type",
        "path": "Patient.identifier.type",
        "min": 1
      },
      {
        "id": "Patient.identifier:niss.type.coding",
        "path": "Patient.identifier.type.coding",
        "min": 1
      },
      {
        "id": "Patient.identifier:niss.type.coding.system",
        "path": "Patient.identifier.type.coding.system",
        "fixedUri": "http://terminology.hl7.org/CodeSystem/v2-0203"
      },
      {
        "id": "Patient.identifier:niss.type.coding.code",
        "path": "Patient.identifier.type.coding.code",
        "fixedCode": "SB"
      },
      {
        "id": "Patient.identifier:niss.system",
        "path": "Patient.identifier.system",
        "min": 1,
        "fixedUri": "https://www.seg-social.pt"
      },
      {
        "id": "Patient.identifier:niss.value",
        "path": "Patient.identifier.value",
        "min": 1
      },
      {
        "id": "Patient.name",
        "path": "Patient.name",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.name.family",
        "path": "Patient.name.family",
        "min": 1
      },
      {
        "id": "Patient.name.given",
        "path": "Patient.name.given",
        "min": 1
      }
    ]
  }
}