<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="SESCAMPatient" />
  <url value="https://sescam.jccm.es/fhir/ig/core/StructureDefinition/SESCAMPatient" />
  <name value="SESCAMPatient" />
  <title value="Patient (SESCAM)" />
  <status value="draft" />
  <description value="Perfil del Paciente SESCAM, derivado del perfil EU Core Patient" />
  <fhirVersion value="5.0.0" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Patient" />
  <baseDefinition value="http://hl7.eu/fhir/base-r5/StructureDefinition/patient-eu-core" />
  <derivation value="constraint" />
  <differential>
    <element id="Patient.identifier">
      <path value="Patient.identifier" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="type" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.identifier:nif">
      <path value="Patient.identifier" />
      <sliceName value="nif" />
      <short value="NIF/NIE (identificador fiscal en España)" />
      <min value="0" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.identifier:nif.type">
      <path value="Patient.identifier.type" />
      <patternCodeableConcept>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/v2-0203" />
          <code value="NNESP" />
        </coding>
      </patternCodeableConcept>
    </element>
    <element id="Patient.identifier:nass">
      <path value="Patient.identifier" />
      <sliceName value="nass" />
      <short value="Número de afiliación a la Seguridad Social" />
      <min value="0" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.identifier:nass.type">
      <path value="Patient.identifier.type" />
      <patternCodeableConcept>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/v2-0203" />
          <code value="SS" />
        </coding>
      </patternCodeableConcept>
    </element>
    <element id="Patient.identifier:cipSns">
      <path value="Patient.identifier" />
      <sliceName value="cipSns" />
      <short value="Código de identificación personal único del SNS" />
      <min value="0" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.identifier:cipSns.use">
      <path value="Patient.identifier.use" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.identifier:cipSns.type">
      <path value="Patient.identifier.type" />
      <patternCodeableConcept>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/v2-0203" />
          <code value="HC" />
        </coding>
      </patternCodeableConcept>
    </element>
    <element id="Patient.identifier:nhc">
      <path value="Patient.identifier" />
      <sliceName value="nhc" />
      <short value="Número de historia clínica" />
      <min value="0" />
      <max value="*" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.identifier:nhc.type">
      <path value="Patient.identifier.type" />
      <patternCodeableConcept>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/v2-0203" />
          <code value="MR" />
        </coding>
      </patternCodeableConcept>
    </element>
    <element id="Patient.name">
      <path value="Patient.name" />
      <type>
        <code value="HumanName" />
        <profile value="https://sescam.jccm.es/fhir/ig/core/StructureDefinition/humanname-eu-sescam" />
      </type>
    </element>
  </differential>
</StructureDefinition>