<StructureDefinition xmlns="http://hl7.org/fhir">
  <url value="https://unicas-fhir.sanidad.gob.es/StructureDefinition/UNICASImmunization" />
  <name value="UNICASImmunization" />
  <title value="Immunization Inmunización ÚNICAS" />
  <status value="draft" />
  <description value="Este profile define las restricciones del recurso Immunization para representar el registro de una inmunización en el contexto del caso de uso de ÚNICAS." />
  <fhirVersion value="5.0.0" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Immunization" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Immunization" />
  <derivation value="constraint" />
  <differential>
    <element id="Immunization.identifier">
      <path value="Immunization.identifier" />
      <short value="Identificador único" />
      <definition value="Business identifier. A unique identifier assigned to this immunization record." />
      <min value="1" />
    </element>
    <element id="Immunization.identifier.system">
      <path value="Immunization.identifier.system" />
      <short value="Sistema para identificar el origen" />
      <definition value="Formato: urn:regcess:[CódigoREGCESS]&#xD;&#xA;Debe incluir el código REGCESS después de urn:regcess:" />
      <min value="1" />
      <constraint>
        <key value="regcess-system" />
        <severity value="warning" />
        <human value="system debe comenzar por urn:regcess: seguido del identificador del sistema." />
        <expression value="matches('^urn:regcess:[A-Za-z0-9]+$')" />
      </constraint>
    </element>
    <element id="Immunization.identifier.value">
      <path value="Immunization.identifier.value" />
      <short value="Identificador interno del sistema para la inmunización" />
      <definition value="Debe indicar el ID interno del sistema de origen utilizado para la inmunización." />
      <min value="1" />
    </element>
    <element id="Immunization.vaccineCode">
      <path value="Immunization.vaccineCode" />
      <short value="Vacuna (producto)" />
      <definition value="Vaccine administered. Vaccine that was administered or was to be administered." />
      <binding>
        <strength value="extensible" />
        <description value="Value set de Vacunas" />
        <valueSet value="https://unicas-fhir.sanidad.gob.es/ValueSet/Vacunas" />
      </binding>
    </element>
    <element id="Immunization.vaccineCode.coding.system">
      <path value="Immunization.vaccineCode.coding.system" />
      <short value="OID del catálogo Sistema de Información en Vacunaciones e Inmunizaciones (SIVIAN)" />
      <definition value="Posible OID de catálogo utilizado para indicar la vacuna y su descripción correspondiente:&#xD;&#xA;&#xD;&#xA;- Catálogo de Sistema de Información en Vacunaciones e Inmunizaciones (SIVAIN): urn:oid:2.16.724.4.21.5.13" />
      <min value="1" />
    </element>
    <element id="Immunization.vaccineCode.coding.code">
      <path value="Immunization.vaccineCode.coding.code" />
      <short value="Código de la vacuna" />
      <min value="1" />
    </element>
    <element id="Immunization.vaccineCode.coding.display">
      <path value="Immunization.vaccineCode.coding.display" />
      <short value="Descripción de la vacuna" />
      <definition value="Representation defined by the system. A representation of the meaning of the code in the system, following the rules of the system." />
      <min value="1" />
    </element>
    <element id="Immunization.vaccineCode.text">
      <path value="Immunization.vaccineCode.text" />
      <short value="Nombre comercial de la vacuna" />
      <definition value="Plain text representation of the concept. A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user." />
    </element>
    <element id="Immunization.lotNumber">
      <path value="Immunization.lotNumber" />
      <short value="Número de lote de la vacuna" />
      <definition value="Vaccine lot number. Lot number of the  vaccine product." />
    </element>
    <element id="Immunization.expirationDate">
      <path value="Immunization.expirationDate" />
      <short value="Fecha de caducidad" />
      <definition value="Vaccine expiration date. Date vaccine batch expires." />
    </element>
    <element id="Immunization.patient">
      <path value="Immunization.patient" />
      <short value="Referencia al paciente" />
      <definition value="Who was immunized. The patient who either received or did not receive the immunization." />
      <type>
        <code value="Reference" />
        <targetProfile value="https://unicas-fhir.sanidad.gob.es/StructureDefinition/UNICASPatient" />
      </type>
    </element>
    <element id="Immunization.patient.reference">
      <path value="Immunization.patient.reference" />
      <short value="Referencia recurso FHIR. Identificador de la referencia del recurso FHIR asociado cuando exista/creamos un recurso en el mismo servidor FHIR" />
      <definition value="Formato: [base]/Patient?identifier=[OID registro de número de CIP-SNS]|[Número CIP-SNS]" />
    </element>
    <element id="Immunization.patient.type">
      <path value="Immunization.patient.type" />
      <short value="Tipo de recurso FHIR" />
      <definition value="Type the reference refers to (e.g. &quot;Patient&quot;) - 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.&#xD;&#xA;&#xD;&#xA;The 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. &quot;Patient&quot; 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 value="1" />
    </element>
    <element id="Immunization.patient.identifier">
      <path value="Immunization.patient.identifier" />
      <short value="Identificador de paciente CIP-SNS. Cuando no tengamos recurso Patient, se debera informar el identificador de paciente mediante CIP-SNS" />
      <definition value="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 value="1" />
    </element>
    <element id="Immunization.patient.identifier.type">
      <path value="Immunization.patient.identifier.type" />
      <short value="Tipos de documentos de identificación para persona ÚNICAS" />
      <definition value="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 value="extensible" />
        <description value="Value set de Tipos de documentos de identificación para persona ÚNICAS" />
        <valueSet value="https://unicas-fhir.sanidad.gob.es/ValueSet/TiposDocumentosIdentificacionPersona" />
      </binding>
    </element>
    <element id="Immunization.patient.identifier.type.coding.system">
      <path value="Immunization.patient.identifier.type.coding.system" />
      <short value="URL del SNOMED CT. Extensión para España del SNS" />
      <definition value="Posible URL de terminología utilizada para indicar el tipo de documentos de identificación y su descripción correspondiente:&#xD;&#xA;&#xD;&#xA;- SNOMED CT. Extensión para España del SNS: http://snomed.info/sct/900000001000122104" />
    </element>
    <element id="Immunization.patient.identifier.type.coding.code">
      <path value="Immunization.patient.identifier.type.coding.code" />
      <short value="Código del identificador" />
    </element>
    <element id="Immunization.patient.identifier.type.coding.display">
      <path value="Immunization.patient.identifier.type.coding.display" />
      <short value="Decripción del identificador" />
      <definition value="Representation defined by the system. A representation of the meaning of the code in the system, following the rules of the system." />
    </element>
    <element id="Immunization.patient.identifier.system">
      <path value="Immunization.patient.identifier.system" />
      <short value="OID registro de número de CIP-SNS" />
      <definition value="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." />
    </element>
    <element id="Immunization.patient.identifier.value">
      <path value="Immunization.patient.identifier.value" />
      <short value="Número CIP-SNS" />
      <definition value="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." />
    </element>
    <element id="Immunization.patient.display">
      <path value="Immunization.patient.display" />
      <short value="Nombre completo del paciente" />
      <definition value="Text alternative for the resource. Plain text narrative that identifies the resource in addition to the resource reference." />
    </element>
    <element id="Immunization.encounter">
      <path value="Immunization.encounter" />
      <short value="Referencia a la interacción clínica" />
      <definition value="Encounter immunization was part of. The visit or admission or other contact between patient and health care provider the immunization was performed as part of." />
      <type>
        <code value="Reference" />
        <targetProfile value="https://unicas-fhir.sanidad.gob.es/StructureDefinition/UNICASEncounter" />
      </type>
    </element>
    <element id="Immunization.encounter.reference">
      <path value="Immunization.encounter.reference" />
      <short value="Referencia recurso FHIR" />
      <definition value="Formato: [base]/Encounter?identifier=urn:regcess:[CódigoREGCESS]|[Id interno del sistema para la interacción clínica]" />
    </element>
    <element id="Immunization.encounter.type">
      <path value="Immunization.encounter.type" />
      <short value="Tipo de recurso FHIR" />
      <definition value="Type the reference refers to (e.g. &quot;Patient&quot;) - 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.&#xD;&#xA;&#xD;&#xA;The 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. &quot;Patient&quot; 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)." />
    </element>
    <element id="Immunization.encounter.identifier">
      <path value="Immunization.encounter.identifier" />
      <short value="Identificador del recurso FHIR" />
      <definition value="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." />
    </element>
    <element id="Immunization.encounter.identifier.system">
      <path value="Immunization.encounter.identifier.system" />
      <short value="Sistema para identificar el origen" />
      <definition value="Formato: urn:regcess:[CódigoREGCESS]&#xD;&#xA;Debe incluir el código REGCESS después de urn:regcess:" />
    </element>
    <element id="Immunization.encounter.identifier.value">
      <path value="Immunization.encounter.identifier.value" />
      <short value="Identificador interno del sistema para la interacción clínica" />
      <definition value="Debe indicar el ID interno del sistema de origen utilizado para la interacción clínica" />
    </element>
    <element id="Immunization.occurrence[x]">
      <path value="Immunization.occurrence[x]" />
      <short value="Fecha de administración" />
      <definition value="Vaccine administration date. Date vaccine administered or was to be administered." />
      <type>
        <code value="dateTime" />
      </type>
    </element>
    <element id="Immunization.site">
      <path value="Immunization.site" />
      <short value="Localización anatómica de administración" />
      <binding>
        <strength value="extensible" />
        <description value="Value set de Localizaciones anatómicas de administración" />
        <valueSet value="https://unicas-fhir.sanidad.gob.es/ValueSet/LocalizacionesAnatomicas" />
      </binding>
    </element>
    <element id="Immunization.site.coding.system">
      <path value="Immunization.site.coding.system" />
      <short value="OID del catálogo Sistema de Información en Vacunaciones e Inmunizaciones (SIVIAN)" />
      <definition value="Posible OID de catálogo utilizado para indicar la localización anatómica de administración y su descripción correspondiente:&#xD;&#xA;&#xD;&#xA;- Catálogo de Sistema de Información en Vacunaciones e Inmunizaciones (SIVAIN): urn:oid:2.16.724.4.21.5.13" />
    </element>
    <element id="Immunization.site.coding.code">
      <path value="Immunization.site.coding.code" />
      <short value="Código del localización anatómica de administración" />
    </element>
    <element id="Immunization.site.coding.display">
      <path value="Immunization.site.coding.display" />
      <short value="Descripción del localización anatómica de administración" />
      <definition value="Representation defined by the system. A representation of the meaning of the code in the system, following the rules of the system." />
    </element>
    <element id="Immunization.route">
      <path value="Immunization.route" />
      <short value="Vía de administración" />
      <definition value="How vaccine entered body. The path by which the vaccine product is taken into the body." />
      <binding>
        <strength value="extensible" />
        <description value="Value set de Vias de administración vacunación" />
        <valueSet value="https://unicas-fhir.sanidad.gob.es/ValueSet/ViasAdministracionVacunacion" />
      </binding>
    </element>
    <element id="Immunization.route.coding.system">
      <path value="Immunization.route.coding.system" />
      <short value="OID del catálogo Sistema de Información en Vacunaciones e Inmunizaciones (SIVIAN)" />
      <definition value="Posible OID de catálogo utilizado para indicar la vía de administración y su descripción correspondiente:&#xD;&#xA;&#xD;&#xA;- Catálogo de Sistema de Información en Vacunaciones e Inmunizaciones (SIVAIN): urn:oid:2.16.724.4.21.5.13" />
    </element>
    <element id="Immunization.route.coding.code">
      <path value="Immunization.route.coding.code" />
      <short value="Código de la vía de administración" />
    </element>
    <element id="Immunization.route.coding.display">
      <path value="Immunization.route.coding.display" />
      <short value="Descripción de la vía de administración" />
      <definition value="Representation defined by the system. A representation of the meaning of the code in the system, following the rules of the system." />
    </element>
    <element id="Immunization.doseQuantity">
      <path value="Immunization.doseQuantity" />
      <short value="Dosis administrada" />
      <definition value="Amount of vaccine administered. The quantity of vaccine product that was administered." />
      <min value="1" />
    </element>
    <element id="Immunization.doseQuantity.value">
      <path value="Immunization.doseQuantity.value" />
      <short value="Número de dosis" />
      <definition value="Numerical value (with implicit precision). The value of the measured amount. The value includes an implicit precision in the presentation of the value." />
    </element>
    <element id="Immunization.doseQuantity.unit">
      <path value="Immunization.doseQuantity.unit" />
      <short value="Unidad de dosis" />
      <definition value="Unit representation. A human-readable form of the unit." />
    </element>
    <element id="Immunization.doseQuantity.system">
      <path value="Immunization.doseQuantity.system" />
      <short value="URL del catálogo UCUM" />
      <definition value="- Unified Code for Units of Measure (UCUM): http://unitsofmeasure.org" />
    </element>
    <element id="Immunization.doseQuantity.code">
      <path value="Immunization.doseQuantity.code" />
      <short value="Código de la unidad de la dosis" />
      <definition value="Coded form of the unit. A computer processable form of the unit in some unit representation system." />
    </element>
    <element id="Immunization.performer">
      <path value="Immunization.performer" />
      <short value="Profesional sanitario" />
      <definition value="Who performed event. Indicates who performed the immunization event." />
      <min value="1" />
    </element>
    <element id="Immunization.performer.actor">
      <path value="Immunization.performer.actor" />
      <short value="Referencia al profesional sanitario" />
      <definition value="Individual or organization who was performing. The practitioner or organization who performed the action." />
      <type>
        <code value="Reference" />
        <targetProfile value="https://unicas-fhir.sanidad.gob.es/StructureDefinition/UNICASPractitionerRole" />
        <targetProfile value="https://unicas-fhir.sanidad.gob.es/StructureDefinition/UNICASPractitioner" />
        <targetProfile value="https://unicas-fhir.sanidad.gob.es/StructureDefinition/UNICASOrganization" />
      </type>
    </element>
    <element id="Immunization.performer.actor.reference">
      <path value="Immunization.performer.actor.reference" />
      <short value="Referencia recurso FHIR. Identificador de la referencia del recurso FHIR asociado cuando exista/creamos un recurso en el mismo servidor FHIR" />
      <definition value="Formato: [base]/Practitioner?identifier=[OID registro de DNI]|[Número DNI]" />
    </element>
    <element id="Immunization.performer.actor.type">
      <path value="Immunization.performer.actor.type" />
      <short value="Tipo de recurso FHIR" />
      <definition value="Type the reference refers to (e.g. &quot;Patient&quot;) - 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.&#xA;&#xA;The 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. &quot;Patient&quot; 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 value="1" />
    </element>
    <element id="Immunization.performer.actor.identifier">
      <path value="Immunization.performer.actor.identifier" />
      <short value="Identificadores del profesional sanitario. Cuando no tengamos recurso Practitioner, se debera informar el identificador del profesional sanitario mediante DNI como dato mínimo. Adicionalmente, se puede informar el número colegiado del profesional sanitario como dato recomendado" />
      <definition value="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 value="1" />
    </element>
    <element id="Immunization.performer.actor.identifier.extension:numeroColegiadoProfesionalSanitario">
      <path value="Immunization.performer.actor.identifier.extension" />
      <sliceName value="numeroColegiadoProfesionalSanitario" />
      <type>
        <code value="Extension" />
        <profile value="https://unicas-fhir.sanidad.gob.es/StructureDefinition/NumeroColegiadoProfesionalSanitario" />
      </type>
      <isModifier value="false" />
    </element>
    <element id="Immunization.performer.actor.identifier.type">
      <path value="Immunization.performer.actor.identifier.type" />
      <short value="Tipos de documentos de identificación para persona ÚNICAS" />
      <definition value="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 value="extensible" />
        <description value="Value set de Tipos de documentos de identificación para persona ÚNICAS" />
        <valueSet value="https://unicas-fhir.sanidad.gob.es/ValueSet/TiposDocumentosIdentificacionPersona" />
      </binding>
    </element>
    <element id="Immunization.performer.actor.identifier.type.coding.system">
      <path value="Immunization.performer.actor.identifier.type.coding.system" />
      <short value="URL del refset Tipos de documento para identificación personal de SNOMED CT. Extensión para España del SNS" />
      <definition value="Posible URL de terminología utilizada para indicar el tipo de documentos de identificación y su descripción correspondiente:&#xD;&#xA;&#xD;&#xA;- Refset Tipos de documento para identificación personal del SNOMED CT. Extensión para España del SNS: http://snomed.info/sct/900000001000122104?fhir_vs-refset/900000251000122107" />
    </element>
    <element id="Immunization.performer.actor.identifier.type.coding.code">
      <path value="Immunization.performer.actor.identifier.type.coding.code" />
      <short value="Código del identificador" />
    </element>
    <element id="Immunization.performer.actor.identifier.type.coding.display">
      <path value="Immunization.performer.actor.identifier.type.coding.display" />
      <short value="Decripción del identificador" />
      <definition value="Representation defined by the system. A representation of the meaning of the code in the system, following the rules of the system." />
    </element>
    <element id="Immunization.performer.actor.identifier.system">
      <path value="Immunization.performer.actor.identifier.system" />
      <short value="OID registro de DNI" />
      <definition value="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." />
    </element>
    <element id="Immunization.performer.actor.identifier.value">
      <path value="Immunization.performer.actor.identifier.value" />
      <short value="Número del DNI" />
      <definition value="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." />
    </element>
    <element id="Immunization.performer.actor.display">
      <path value="Immunization.performer.actor.display" />
      <short value="Nombre completo del profesional sanitario" />
      <definition value="Text alternative for the resource. Plain text narrative that identifies the resource in addition to the resource reference." />
    </element>
    <element id="Immunization.reason">
      <path value="Immunization.reason" />
      <short value="Motivo de la vacunación" />
      <definition value="Why immunization occurred. Describes why the immunization occurred in coded or textual form, or Indicates another resource (Condition, Observation or DiagnosticReport) whose existence justifies this immunization." />
      <min value="1" />
      <binding>
        <strength value="extensible" />
        <description value="Value set de Motivos de vacunación" />
        <valueSet value="https://unicas-fhir.sanidad.gob.es/ValueSet/MotivosVacunacion" />
      </binding>
    </element>
    <element id="Immunization.reason.concept">
      <path value="Immunization.reason.concept" />
      <short value="Motivo de la vacunación" />
      <definition value="Reference to a concept (by class). A reference to a concept - e.g. the information is identified by its general class to the degree of precision found in the terminology." />
    </element>
    <element id="Immunization.reason.concept.coding.system">
      <path value="Immunization.reason.concept.coding.system" />
      <short value="OID del catálogo Sistema de Información en Vacunaciones e Inmunizaciones (SIVIAN)" />
      <definition value="Posible OID de catálogo utilizado para indicar el motivo de la vacunación y su descripción correspondiente:&#xD;&#xA;&#xD;&#xA;- Catálogo de Sistema de Información en Vacunaciones e Inmunizaciones (SIVAIN): urn:oid:2.16.724.4.21.5.13" />
      <min value="1" />
    </element>
    <element id="Immunization.reason.concept.coding.code">
      <path value="Immunization.reason.concept.coding.code" />
      <short value="Código del motivo de la vacunación" />
      <min value="1" />
    </element>
    <element id="Immunization.reason.concept.coding.display">
      <path value="Immunization.reason.concept.coding.display" />
      <short value="Descripción del motivo de la vacunación" />
      <definition value="Representation defined by the system. A representation of the meaning of the code in the system, following the rules of the system." />
      <min value="1" />
    </element>
  </differential>
</StructureDefinition>