{
  "resourceType": "StructureDefinition",
  "id": "poc-lis-patient",
  "url": "http://poc-lis.cens.cl/fhir/StructureDefinition/PocLisPatient",
  "name": "PocLisPatient",
  "status": "draft",
  "fhirVersion": "4.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/fivews",
      "name": "FiveWs Pattern 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:Prevision",
        "path": "Patient.extension",
        "sliceName": "Prevision",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://poc-lis.cens.cl/fhir/StructureDefinition/PrevisionMinsalDecreto643"
            ]
          }
        ]
      },
      {
        "id": "Patient.identifier",
        "path": "Patient.identifier",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Patient.identifier.type",
        "path": "Patient.identifier.type",
        "min": 1,
        "binding": {
          "strength": "required",
          "description": "Tipo de Identificación",
          "valueSet": "http://cens.cl/fhir/ValueSet/PocLisTipoIdentificacionHcc"
        }
      },
      {
        "id": "Patient.identifier.type.coding",
        "path": "Patient.identifier.type.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Patient.identifier.system",
        "path": "Patient.identifier.system",
        "fixedUri": "http://minsal.cl/Identificacion"
      },
      {
        "id": "Patient.identifier.value",
        "path": "Patient.identifier.value",
        "min": 1,
        "maxLength": 30
      },
      {
        "id": "Patient.active",
        "path": "Patient.active",
        "max": "0"
      },
      {
        "id": "Patient.name.family.extension",
        "path": "Patient.name.family.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Patient.name.family.extension:Apellido_Paterno",
        "path": "Patient.name.family.extension",
        "sliceName": "Apellido_Paterno",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/humanname-fathers-family"
            ]
          }
        ]
      },
      {
        "id": "Patient.name.family.extension:Apellido_Paterno.value[x]",
        "path": "Patient.name.family.extension.value[x]",
        "maxLength": 50
      },
      {
        "id": "Patient.name.family.extension:Apellido_Materno",
        "path": "Patient.name.family.extension",
        "sliceName": "Apellido_Materno",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/humanname-mothers-family"
            ]
          }
        ]
      },
      {
        "id": "Patient.name.family.extension:Apellido_Materno.value[x]",
        "path": "Patient.name.family.extension.value[x]",
        "maxLength": 50
      },
      {
        "id": "Patient.name.given",
        "path": "Patient.name.given",
        "maxLength": 50
      },
      {
        "id": "Patient.telecom",
        "path": "Patient.telecom",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Patient.telecom.system",
        "path": "Patient.telecom.system",
        "fixedCode": "phone"
      },
      {
        "id": "Patient.telecom.value",
        "path": "Patient.telecom.value",
        "maxLength": 20
      },
      {
        "id": "Patient.deceased[x]",
        "path": "Patient.deceased[x]",
        "max": "0"
      },
      {
        "id": "Patient.address",
        "path": "Patient.address",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Patient.address.extension",
        "path": "Patient.address.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Patient.address.extension:ComunasMinsalDecreto643",
        "path": "Patient.address.extension",
        "sliceName": "ComunasMinsalDecreto643",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://poc-lis.cens.cl/fhir/StructureDefinition/ComunasMinsalDecreto643"
            ]
          }
        ]
      },
      {
        "id": "Patient.address.extension:ComunasMinsalDecreto643.value[x]",
        "path": "Patient.address.extension.value[x]",
        "maxLength": 20
      },
      {
        "id": "Patient.address.text",
        "path": "Patient.address.text",
        "maxLength": 150
      },
      {
        "id": "Patient.maritalStatus",
        "path": "Patient.maritalStatus",
        "max": "0"
      },
      {
        "id": "Patient.multipleBirth[x]",
        "path": "Patient.multipleBirth[x]",
        "max": "0"
      },
      {
        "id": "Patient.photo",
        "path": "Patient.photo",
        "max": "0"
      },
      {
        "id": "Patient.contact",
        "path": "Patient.contact",
        "max": "0"
      },
      {
        "id": "Patient.communication",
        "path": "Patient.communication",
        "max": "0"
      },
      {
        "id": "Patient.generalPractitioner",
        "path": "Patient.generalPractitioner",
        "max": "0"
      },
      {
        "id": "Patient.managingOrganization",
        "path": "Patient.managingOrganization",
        "max": "0"
      },
      {
        "id": "Patient.link",
        "path": "Patient.link",
        "max": "0"
      }
    ]
  }
}