{
  "resourceType": "StructureDefinition",
  "url": "http://example.org/fhir/StructureDefinition/PacienteBDAC",
  "version": "0.0",
  "name": "PacienteBDAC",
  "title": "Paciente BDAC",
  "status": "retired",
  "publisher": "Benito Berenguer",
  "description": "Paciente arquetipo BDAC",
  "copyright": "Indra - Minsait",
  "fhirVersion": "3.0.1",
  "mapping": [
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "cda",
      "uri": "http://hl7.org/v3/cda",
      "name": "CDA (R2)"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/w5",
      "name": "W5 Mapping"
    },
    {
      "identity": "v2",
      "uri": "http://hl7.org/v2",
      "name": "HL7 v2 Mapping"
    },
    {
      "identity": "loinc",
      "uri": "http://loinc.org",
      "name": "LOINC code for the element"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "Patient",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Patient",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Patient.extension",
        "path": "Patient.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Patient.extension:Nacionalidad",
        "path": "Patient.extension",
        "sliceName": "Nacionalidad",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://example.org/fhir/StructureDefinition/Nacionalidad"
          }
        ]
      },
      {
        "id": "Patient.extension:DatosAdscripcion",
        "path": "Patient.extension",
        "sliceName": "DatosAdscripcion",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://example.org/fhir/StructureDefinition/CentroReferencia"
          }
        ]
      },
      {
        "id": "Patient.extension:DatosAdscripcion.extension:CSReferencia",
        "path": "Patient.extension.extension",
        "sliceName": "CSReferencia",
        "min": 1
      },
      {
        "id": "Patient.extension:DatosAdscripcion.extension:HospitalReferencia",
        "path": "Patient.extension.extension",
        "sliceName": "HospitalReferencia",
        "min": 1
      },
      {
        "id": "Patient.extension:PersonalSanitario",
        "path": "Patient.extension",
        "sliceName": "PersonalSanitario",
        "min": 1,
        "max": "2",
        "type": [
          {
            "code": "Extension",
            "profile": "http://example.org/fhir/StructureDefinition/PersonalSanitario"
          }
        ]
      },
      {
        "id": "Patient.extension:Cobertura",
        "path": "Patient.extension",
        "sliceName": "Cobertura",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://example.org/fhir/StructureDefinition/Cobertura"
          }
        ]
      },
      {
        "id": "Patient.extension:Farmacia",
        "path": "Patient.extension",
        "sliceName": "Farmacia",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://example.org/fhir/StructureDefinition/EligibilityRequest"
          }
        ]
      },
      {
        "id": "Patient.identifier",
        "path": "Patient.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        },
        "short": "Agrupador de identificadores",
        "definition": "Agrupador para los diferentes identificadores de un paciente"
      },
      {
        "id": "Patient.identifier:SIPAuto",
        "path": "Patient.identifier",
        "sliceName": "SIPAuto",
        "short": "SIP",
        "definition": "SIP Auto del paciente. Obligatorio",
        "comment": "10 caracteres numéricos (0-9) asignados secuencialmente, estos dígitos están basados en una secuencia de generación automática que comenzando por un número cualquiera, se va incrementando de 3 en 3.",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Patient.identifier:SIPAuto.system",
        "path": "Patient.identifier.system",
        "definition": "Valores definidos en la tabla TES_IDENT",
        "type": [
          {
            "code": "uri",
            "profile": "hn:TES_IDENT"
          }
        ]
      },
      {
        "id": "Patient.identifier:NIF",
        "path": "Patient.identifier",
        "sliceName": "NIF",
        "short": "NIF del paciente",
        "max": "1"
      },
      {
        "id": "Patient.identifier:pasaporte",
        "path": "Patient.identifier",
        "sliceName": "pasaporte",
        "short": "Pasaporte del paciente",
        "definition": "ºAn identifier for this patient.",
        "max": "1"
      },
      {
        "id": "Patient.identifier:sliceIdentifier",
        "path": "Patient.identifier",
        "sliceName": "sliceIdentifier",
        "short": "NIE",
        "definition": "ID fiscal del paciente no español",
        "max": "1"
      },
      {
        "id": "Patient.identifier:SIPSNS",
        "path": "Patient.identifier",
        "sliceName": "SIPSNS",
        "short": "SIPSNS",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Patient.name.extension",
        "path": "Patient.name.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Patient.name.extension:SegundoApellido",
        "path": "Patient.name.extension",
        "sliceName": "SegundoApellido",
        "short": "Segundo apellido",
        "type": [
          {
            "code": "Extension",
            "profile": "http://example.org/fhir/StructureDefinition/Apellido2"
          }
        ]
      },
      {
        "id": "Patient.name.family",
        "path": "Patient.name.family",
        "short": "Primer apellido",
        "min": 1
      },
      {
        "id": "Patient.name.given",
        "path": "Patient.name.given",
        "short": "Nombre del paciente",
        "min": 1
      },
      {
        "id": "Patient.telecom",
        "path": "Patient.telecom",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Patient.telecom:Fijo1",
        "path": "Patient.telecom",
        "sliceName": "Fijo1",
        "max": "3"
      },
      {
        "id": "Patient.telecom:Fijo1.use",
        "path": "Patient.telecom.use",
        "short": "home | work | temp | old | SMS",
        "binding": {
          "strength": "required",
          "valueSetReference": {
            "reference": "http://caso_uso_telefonos.com"
          }
        }
      },
      {
        "id": "Patient.telecom:Movil1",
        "path": "Patient.telecom",
        "sliceName": "Movil1",
        "max": "3"
      },
      {
        "id": "Patient.telecom:Movil1.use",
        "path": "Patient.telecom.use",
        "binding": {
          "strength": "required",
          "valueSetReference": {
            "reference": "http://caso_uso_telefonos.com"
          }
        }
      },
      {
        "id": "Patient.telecom:email",
        "path": "Patient.telecom",
        "sliceName": "email",
        "max": "2"
      },
      {
        "id": "Patient.telecom:email.use",
        "path": "Patient.telecom.use",
        "binding": {
          "strength": "required",
          "valueSetReference": {
            "reference": "http://caso_uso_emails.com"
          }
        }
      },
      {
        "id": "Patient.gender",
        "path": "Patient.gender",
        "definition": "Sexo del paciente.",
        "min": 1
      },
      {
        "id": "Patient.birthDate",
        "path": "Patient.birthDate",
        "short": "Fecha de nacimiento",
        "min": 1
      },
      {
        "id": "Patient.address",
        "path": "Patient.address",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "country"
            }
          ],
          "description": "Discrimina si la direccion es española o no",
          "rules": "open"
        }
      },
      {
        "id": "Patient.address.extension",
        "path": "Patient.address.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Patient.address.extension:Extension",
        "path": "Patient.address.extension",
        "sliceName": "Extension",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://example.org/fhir/StructureDefinition/Direccion"
          }
        ]
      },
      {
        "id": "Patient.address.extension:Extension.extension:TipoVia",
        "path": "Patient.address.extension.extension",
        "sliceName": "TipoVia",
        "max": "1"
      },
      {
        "id": "Patient.address.extension:Extension.extension:TipoVia.value[x]:valueString",
        "path": "Patient.address.extension.extension.valueString",
        "sliceName": "valueString",
        "type": [
          {
            "code": "string"
          }
        ]
      },
      {
        "id": "Patient.address.use",
        "path": "Patient.address.use",
        "definition": "Habitual | temporal | trabajo",
        "min": 1
      },
      {
        "id": "Patient.address.type",
        "path": "Patient.address.type",
        "definition": "Distingue entre direccion fisica o postal (o ambas)",
        "min": 1
      },
      {
        "id": "Patient.address.line",
        "path": "Patient.address.line",
        "short": "Nombre de la calle",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Patient.address.city",
        "path": "Patient.address.city",
        "type": [
          {
            "code": "string",
            "profile": "hn:TES_MUNICIPIO"
          }
        ]
      },
      {
        "id": "Patient.address.country",
        "path": "Patient.address.country",
        "type": [
          {
            "code": "string",
            "profile": "hn:TES_PAIS"
          }
        ]
      },
      {
        "id": "Patient.address:sliceAddress",
        "path": "Patient.address",
        "sliceName": "sliceAddress",
        "max": "1"
      },
      {
        "id": "Patient.address:sliceAddress2",
        "path": "Patient.address",
        "sliceName": "sliceAddress2",
        "max": "1"
      }
    ]
  }
}