{
  "resourceType": "StructureDefinition",
  "url": "https://unicas-fhir.sanidad.gob.es/StructureDefinition/UNICASPatient",
  "name": "UNICASPatient",
  "title": "Patient Paciente ÚNICAS",
  "status": "draft",
  "description": "Este profile define las restricciones del recurso Patient para representar el paciente en el contexto del caso de uso de ÚNICAS.\r\n\r\nEn el contexto de ÚNICAS, el identificador que debe utilizarse para referenciar y buscar al paciente debe de ser el CIPSNS. Además, el paciente puede albergar de forma opcional otros identificadores que formarán parte de su información core, como por ejemplo el CIP autonómico o el DNI.\r\n\r\nSe muestran a continuación los valores que tomarían los atributos de `Patient.identifier` para estos casos:\r\n\r\n---\r\n\r\n**Para el CIPSNS:**\r\n\r\n- **Type**: corresponde con el tipo de código de identificación personal en el Sistema Nacional de Salud (System: `http://snomed.info/sct/900000001000122104` y Code: `1551000122105`)\r\n- **Value**: corresponde con el identificador CIPSNS de paciente\r\n- **System**: corresponde con el valor `urn:oid:2.16.724.4.40`\r\n\r\n---\r\n\r\n**Para el CIP-AUT:**\r\n\r\n- **Type**: corresponde con el tipo de código de identificación del paciente en la comunidad autónoma (System: `http://snomed.info/sct/900000001000122104` y Code: `1571000122102`)\r\n- **Value**: corresponde con el identificador CIP-AUT de paciente\r\n- **System**: corresponde con un valor de la siguiente tabla, según sea la Comunidad Autónoma del CIP-AUT:\r\n  - ANDALUCIA: urn:cite:80724000049\r\n  - ARAGON: urn:cite:80724000106\r\n  - ASTURIAS: urn:cite:80724000056\r\n  - ILLES BALEARS: urn:cite:80724000148\r\n  - CANARIAS: urn:cite:80724000122\r\n  - CANTABRIA: urn:cite:80724000064\r\n  - CASTILLA Y LEON: urn:cite:80724000171\r\n  - CASTILLA LA MANCHA: urn:cite:80724000114\r\n  - CATALUÑA: urn:cite:80724000015\r\n  - COMUNITAT VALENCIANA: urn:cite:80724000098\r\n  - EXTREMADURA: urn:cite:80724000130\r\n  - GALICIA: urn:cite:80724000031\r\n  - MADRID: urn:cite:80724000163\r\n  - MURCIA: urn:cite:80724000080\r\n  - NAVARRA: urn:cite:80724000155\r\n  - PAIS VASCO: urn:cite:80724000023\r\n  - LA RIOJA: urn:cite:80724000072\r\n  - CEUTA: urn:cite:80724000189\r\n  - MELILLA: urn:cite:80724000197\r\n\r\n---\r\n\r\n**Para el DNI:**\r\n\r\n- **Type**: corresponde con el tipo del documento nacional de identidad (System: `http://snomed.info/sct/900000001000122104?fhir_vs-refset/900000251000122107` y Code: `22851000122109`)\r\n- **Value**: corresponde con el valor del DNI\r\n- **System**: corresponde con el valor `urn:oid:1.3.6.1.4.1.19126.3`",
  "fhirVersion": "5.0.0",
  "kind": "resource",
  "abstract": false,
  "type": "Patient",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Patient",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Patient.extension:edadPaciente",
        "path": "Patient.extension",
        "sliceName": "edadPaciente",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://unicas-fhir.sanidad.gob.es/StructureDefinition/EdadPaciente"
            ]
          }
        ]
      },
      {
        "id": "Patient.extension:estadoEnrolamientoPaciente",
        "path": "Patient.extension",
        "sliceName": "estadoEnrolamientoPaciente",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://unicas-fhir.sanidad.gob.es/StructureDefinition/EstadoEnrolamientoPaciente"
            ]
          }
        ]
      },
      {
        "id": "Patient.extension:momento-unicas",
        "path": "Patient.extension",
        "sliceName": "momentoUNICASPaciente",
        "definition": "Momento ÚNICAS en el que se encuentra el paciente. Este dato nunca debe generarse como parte de la instancia por parte de los sistemas de información, pero sí será devuelto y gestionado por el NA cuando se realice la consulta de datos de un paciente.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://unicas-fhir.sanidad.gob.es/StructureDefinition/MomentosUnicas"
            ]
          }
        ]
      },
      {
        "id": "Patient.extension:nodoAltaUnicas",
        "path": "Patient.extension",
        "sliceName": "nodoAltaUnicas",
        "definition": "Nodo autonómico que realiza el enrolamiento del paciente. Este dato nunca debe generarse como parte de la instancia por parte de los sistemas de información, pero sí será devuelto y gestionado por el NA cuando se realice la consulta de datos de un paciente.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://unicas-fhir.sanidad.gob.es/StructureDefinition/NodoCCAA"
            ]
          }
        ]
      },
      {
        "id": "Patient.extension:nodoInscripcionUnicas",
        "path": "Patient.extension",
        "sliceName": "nodoInscripcionUnicas",
        "definition": "Nodos autonómicos donde el paciente está inscrito. Este dato nunca debe generarse como parte de la instancia por parte de los sistemas de información, pero sí será devuelto y gestionado por el NA cuando se realice la consulta de datos de un paciente.",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://unicas-fhir.sanidad.gob.es/StructureDefinition/NodoCCAA"
            ]
          }
        ]
      },
      {
        "id": "Patient.identifier",
        "path": "Patient.identifier",
        "short": "Identificadores del paciente (Pueden ser documento nacional de identidad, pasaporte, tarjeta de identidad de extranjero, número de historia clínica, número de afiliación a la Seguridad Social, código de identificación del paciente en la comunidad autónoma, código de identificación personal en el Sistema Nacional de Salud, código de identificación personal europeo)",
        "min": 1
      },
      {
        "id": "Patient.identifier.type",
        "path": "Patient.identifier.type",
        "short": "Tipos de documentos de identificación para persona ÚNICAS",
        "definition": "Description of identifier. A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.",
        "binding": {
          "strength": "extensible",
          "description": "Value set de Tipos de documentos de identificación para persona ÚNICAS",
          "valueSet": "https://unicas-fhir.sanidad.gob.es/ValueSet/TiposDocumentosIdentificacionPersona"
        }
      },
      {
        "id": "Patient.identifier.type.coding.system",
        "path": "Patient.identifier.type.coding.system",
        "short": "URL del refset Tipos de documento para identificación personal de SNOMED CT. Extensión para España del SNS | URL del SNOMED CT. Extensión para España del SNS",
        "definition": "Identity of the terminology system. The identification of the code system that defines the meaning of the symbol in the code."
      },
      {
        "id": "Patient.identifier.type.coding.code",
        "path": "Patient.identifier.type.coding.code",
        "short": "Código del identificador"
      },
      {
        "id": "Patient.identifier.type.coding.display",
        "path": "Patient.identifier.type.coding.display",
        "short": "Decripción del identificador",
        "definition": "Representation defined by the system. A representation of the meaning of the code in the system, following the rules of the system."
      },
      {
        "id": "Patient.identifier.system",
        "path": "Patient.identifier.system",
        "short": "OID registro según el tipo de documento de identificación",
        "definition": "The namespace for the identifier value. Establishes the namespace for the value - that is, an absolute URL that describes a set values that are unique.",
        "min": 1
      },
      {
        "id": "Patient.identifier.value",
        "path": "Patient.identifier.value",
        "short": "Código según el tipo de documento de identificación",
        "definition": "The value that is unique. The portion of the identifier typically relevant to the user and which is unique within the context of the system.",
        "min": 1
      },
      {
        "id": "Patient.name",
        "path": "Patient.name",
        "min": 1
      },
      {
        "id": "Patient.name.text",
        "path": "Patient.name.text",
        "short": "Nombre completo del paciente",
        "definition": "Text representation of the full name. Specifies the entire name as it should be displayed e.g. on an application UI. This may be provided instead of or as well as the specific parts."
      },
      {
        "id": "Patient.name.family",
        "path": "Patient.name.family",
        "short": "Apellidos del paciente",
        "definition": "Family name (often called 'Surname'). The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.",
        "min": 1
      },
      {
        "id": "Patient.name.family.extension",
        "path": "Patient.name.family.extension",
        "min": 1
      },
      {
        "id": "Patient.name.family.extension:primerApellido",
        "path": "Patient.name.family.extension",
        "sliceName": "primerApellido",
        "short": "Primer apellido del paciente",
        "definition": "Portion of family name derived from father. The portion of the family name that is derived from the person's father.",
        "min": 1,
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/humanname-fathers-family"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Patient.name.family.extension:segundoApellido",
        "path": "Patient.name.family.extension",
        "sliceName": "segundoApellido",
        "short": "Segundo apellido del paciente",
        "definition": "Portion of family name derived from mother. The portion of the family name that is derived from the person's mother.",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/humanname-mothers-family"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Patient.name.given",
        "path": "Patient.name.given",
        "short": "Nombre del paciente",
        "definition": "Given names (not always 'first'). Includes middle names",
        "min": 1
      },
      {
        "id": "Patient.telecom",
        "path": "Patient.telecom",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            },
            {
              "type": "value",
              "path": "use"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Patient.telecom:Telefono",
        "path": "Patient.telecom",
        "sliceName": "Telefono",
        "short": "Teléfono móvil de contacto",
        "definition": "A contact detail for the individual. A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.",
        "fixedContactPoint": {
          "system": "phone",
          "use": "mobile"
        }
      },
      {
        "id": "Patient.telecom:Telefono.system",
        "path": "Patient.telecom.system",
        "short": "phone",
        "definition": "Telecommunications form for contact point - what communications system is required to make use of the contact (phone | fax | email | pager | url | sms | other)."
      },
      {
        "id": "Patient.telecom:Telefono.value",
        "path": "Patient.telecom.value",
        "short": "Número de teléfono móvil"
      },
      {
        "id": "Patient.telecom:OtroTelefonos",
        "path": "Patient.telecom",
        "sliceName": "OtroTelefonos",
        "short": "Otro teléfonos",
        "definition": "A contact detail for the individual. A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.",
        "fixedContactPoint": {
          "system": "phone",
          "use": "home"
        }
      },
      {
        "id": "Patient.telecom:OtroTelefonos.system",
        "path": "Patient.telecom.system",
        "short": "phone",
        "definition": "Telecommunications form for contact point - what communications system is required to make use of the contact (phone | fax | email | pager | url | sms | other)."
      },
      {
        "id": "Patient.telecom:OtroTelefonos.value",
        "path": "Patient.telecom.value",
        "short": "Número de teléfono"
      },
      {
        "id": "Patient.telecom:CorreoElectronico",
        "path": "Patient.telecom",
        "sliceName": "CorreoElectronico",
        "short": "Correo electrónico",
        "definition": "A contact detail for the individual. A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.",
        "fixedContactPoint": {
          "system": "email"
        }
      },
      {
        "id": "Patient.telecom:CorreoElectronico.system",
        "path": "Patient.telecom.system",
        "short": "email",
        "definition": "Telecommunications form for contact point - what communications system is required to make use of the contact (phone | fax | email | pager | url | sms | other)."
      },
      {
        "id": "Patient.telecom:CorreoElectronico.value",
        "path": "Patient.telecom.value",
        "short": "Dirección de correo electrónico"
      },
      {
        "id": "Patient.gender",
        "path": "Patient.gender",
        "short": "Sexo asignado al nacer",
        "definition": "Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes. (male | female | other | unknown)",
        "min": 1
      },
      {
        "id": "Patient.birthDate",
        "path": "Patient.birthDate",
        "short": "Fecha de nacimiento del paciente",
        "min": 1
      },
      {
        "id": "Patient.deceased[x]",
        "path": "Patient.deceased[x]",
        "short": "Fallecido/a"
      },
      {
        "id": "Patient.address",
        "path": "Patient.address",
        "short": "Domicilio del paciente",
        "min": 0
      },
      {
        "id": "Patient.address.extension",
        "path": "Patient.address.extension",
        "min": 0
      },
      {
        "id": "Patient.address.extension:provincia",
        "path": "Patient.address.extension",
        "sliceName": "provincia",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://unicas-fhir.sanidad.gob.es/StructureDefinition/Provincia"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Patient.address.line",
        "path": "Patient.address.line",
        "short": "Tipo de vía, Nombre de vía, Número de vía, Piso, Letra del paciente",
        "definition": "Street name, number, direction & P.O. Box etc. This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information.",
        "min": 0
      },
      {
        "id": "Patient.address.city",
        "path": "Patient.address.city",
        "short": "Ciudad",
        "min": 0
      },
      {
        "id": "Patient.address.district",
        "path": "Patient.address.district",
        "short": "Municipio en la dirección",
        "min": 0
      },
      {
        "id": "Patient.address.state",
        "path": "Patient.address.state",
        "short": "Comunidad Autónoma",
        "definition": "Sub-unit of country (abbreviations ok). Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (e.g. US 2 letter state codes).",
        "min": 0
      },
      {
        "id": "Patient.address.postalCode",
        "path": "Patient.address.postalCode",
        "short": "Código postal",
        "definition": "Postal code for area. A postal code designating a region defined by the postal service",
        "min": 0
      },
      {
        "id": "Patient.address.country",
        "path": "Patient.address.country",
        "short": "País",
        "definition": "Country - a nation as commonly understood or generally accepted. (e.g. may be ISO 3166 2 or 3 letter code)",
        "min": 0
      },
      {
        "id": "Patient.contact",
        "path": "Patient.contact",
        "short": "Persona de contacto del paciente"
      },
      {
        "id": "Patient.contact.relationship",
        "path": "Patient.contact.relationship",
        "short": "Tipo de relación de la persona contacto con el paciente",
        "definition": "The kind of relationship. The nature of the relationship between the patient and the contact person.",
        "binding": {
          "strength": "extensible",
          "description": "Value set de Tipos de relaciones entre el paciente y su persona de contacto en ÚNICAS",
          "valueSet": "https://unicas-fhir.sanidad.gob.es/ValueSet/TiposRelacionesPersonaContacto"
        }
      },
      {
        "id": "Patient.contact.relationship.coding.system",
        "path": "Patient.contact.relationship.coding.system",
        "short": "URL del SNOMED CT. Extensión para España del SNS",
        "definition": "Posible URL de terminología utilizada para indicar el tipo de relación de la persona contacto con el paciente y su descripción correspondiente:\r\n\r\n- SNOMED CT. Extensión para España del SNS: http://snomed.info/sct/900000001000122104"
      },
      {
        "id": "Patient.contact.relationship.coding.code",
        "path": "Patient.contact.relationship.coding.code",
        "short": "Código del tipo de relación entre el paciente y su persona de contacto"
      },
      {
        "id": "Patient.contact.relationship.coding.display",
        "path": "Patient.contact.relationship.coding.display",
        "short": "Descripción del tipo de relación entre el paciente y su persona de contacto",
        "definition": "Representation defined by the system. A representation of the meaning of the code in the system, following the rules of the system."
      },
      {
        "id": "Patient.contact.name.text",
        "path": "Patient.contact.name.text",
        "short": "Nombre completo de la persona contacto",
        "definition": "Text representation of the full name. Specifies the entire name as it should be displayed e.g. on an application UI. This may be provided instead of or as well as the specific parts."
      },
      {
        "id": "Patient.contact.name.family",
        "path": "Patient.contact.name.family",
        "short": "Apellidos de la persona contacto",
        "definition": "Family name (often called 'Surname'). The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father."
      },
      {
        "id": "Patient.contact.name.family.extension:primerApellido",
        "path": "Patient.contact.name.family.extension",
        "sliceName": "primerApellido",
        "short": "Primer apellido de la persona contacto",
        "definition": "Portion of family name derived from father. The portion of the family name that is derived from the person's father.",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/humanname-fathers-family"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Patient.contact.name.family.extension:segundoApellido",
        "path": "Patient.contact.name.family.extension",
        "sliceName": "segundoApellido",
        "short": "Segundo apellido de la persona contacto",
        "definition": "Portion of family name derived from mother. The portion of the family name that is derived from the person's mother.",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/humanname-mothers-family"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Patient.contact.name.given",
        "path": "Patient.contact.name.given",
        "short": "Nombre de la persona contacto",
        "definition": "Given names (not always 'first'). Includes middle names"
      },
      {
        "id": "Patient.contact.telecom",
        "path": "Patient.contact.telecom",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Patient.contact.telecom:Telefono",
        "path": "Patient.contact.telecom",
        "sliceName": "Telefono",
        "short": "Teléfonos de contacto",
        "definition": "A contact detail for the person. A contact detail for the person, e.g. a telephone number or an email address."
      },
      {
        "id": "Patient.contact.telecom:Telefono.system",
        "path": "Patient.contact.telecom.system",
        "short": "phone",
        "definition": "Telecommunications form for contact point - what communications system is required to make use of the contact (phone | fax | email | pager | url | sms | other).",
        "fixedCode": "phone"
      },
      {
        "id": "Patient.contact.telecom:Telefono.value",
        "path": "Patient.contact.telecom.value",
        "short": "Número de teléfono"
      },
      {
        "id": "Patient.contact.telecom:CorreoElectronico",
        "path": "Patient.contact.telecom",
        "sliceName": "CorreoElectronico",
        "short": "Correo electrónico de contacto"
      },
      {
        "id": "Patient.contact.telecom:CorreoElectronico.system",
        "path": "Patient.contact.telecom.system",
        "short": "email",
        "definition": "Telecommunications form for contact point - what communications system is required to make use of the contact (phone | fax | email | pager | url | sms | other).",
        "fixedCode": "email"
      },
      {
        "id": "Patient.contact.telecom:CorreoElectronico.value",
        "path": "Patient.contact.telecom.value",
        "short": "Dirección de correo electrónico de contacto"
      },
      {
        "id": "Patient.managingOrganization",
        "path": "Patient.managingOrganization",
        "short": "Referencia al centro de atención primaria",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://unicas-fhir.sanidad.gob.es/StructureDefinition/UNICASOrganization"
            ]
          }
        ]
      },
      {
        "id": "Patient.managingOrganization.reference",
        "path": "Patient.managingOrganization.reference",
        "short": "Referencia recurso FHIR. Identificador de la referencia del recurso FHIR asociado cuando exista/creamos un recurso en el mismo servidor FHIR",
        "definition": "Formato: [base]/Organization?identifier=[OID registro de número de REGCESS]|[Código REGCESS de la institución]"
      },
      {
        "id": "Patient.managingOrganization.type",
        "path": "Patient.managingOrganization.type",
        "short": "Tipo de recurso FHIR",
        "definition": "Type the reference refers to (e.g. \"Patient\") - must be a resource in resources. The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources).",
        "min": 1
      },
      {
        "id": "Patient.managingOrganization.identifier",
        "path": "Patient.managingOrganization.identifier",
        "short": "Identificador del centro de atención primaria. Cuando no tengamos recurso Organization, se debera informar el identificador de institución mediante código REGCESS",
        "definition": "Logical reference, when literal reference is not known. An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.",
        "min": 1
      },
      {
        "id": "Patient.managingOrganization.identifier.system",
        "path": "Patient.managingOrganization.identifier.system",
        "short": "OID registro de número de REGCESS",
        "definition": "The namespace for the identifier value. Establishes the namespace for the value - that is, an absolute URL that describes a set values that are unique."
      },
      {
        "id": "Patient.managingOrganization.identifier.value",
        "path": "Patient.managingOrganization.identifier.value",
        "short": "Código REGCESS",
        "definition": "The value that is unique. The portion of the identifier typically relevant to the user and which is unique within the context of the system."
      },
      {
        "id": "Patient.managingOrganization.display",
        "path": "Patient.managingOrganization.display",
        "short": "Nombre completo del centro de atención primaria",
        "definition": "Text alternative for the resource. Plain text narrative that identifies the resource in addition to the resource reference."
      }
    ]
  }
}