<StructureDefinition xmlns="http://hl7.org/fhir">
  <url value="https://unicas-fhir.sanidad.gob.es/StructureDefinition/UNICASEncounter" />
  <name value="UNICASEncounter" />
  <title value="Encounter Interacción Clínica ÚNICAS" />
  <status value="draft" />
  <description value="Este profile define las restricciones del recurso Encounter para representar el registro de la interacción clínica en el contexto del caso de uso de ÚNICAS." />
  <fhirVersion value="5.0.0" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Encounter" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Encounter" />
  <derivation value="constraint" />
  <differential>
    <element id="Encounter.text">
      <path value="Encounter.text" />
      <short value="Descripción del episodio" />
      <definition value="Indica la descripción del episodio registrada en el sistema de información identificado.&#xD;&#xA;&#xD;&#xA;Descriptivo del diagnóstico en el momento de crearlo o modificarlo para:&#xD;&#xA;- Consultas externas.&#xD;&#xA;- Hospitalización a domicilio.&#xD;&#xA;- Hospital día.&#xD;&#xA;- Urgencias.&#xD;&#xA;&#xD;&#xA;Para las Hospitalizaciones si son programadas:&#xD;&#xA;- Desde el momento en que estén planificadas, el descriptivo del procedimiento principal por el que se programaron&#xD;&#xA;- Sí se produce algún cambio en el procedimiento principal desde la admisión hasta el alta, este se trasladará a la narrativa&#xD;&#xA;&#xD;&#xA;Para las no programadas:&#xD;&#xA;- Mientras no exista diagnóstico principal se utilizará el motivo de ingreso (chief complaint)&#xD;&#xA;- Desde el momento que se registre o modifique el diagnóstico principal se utilizará este." />
    </element>
    <element id="Encounter.identifier">
      <path value="Encounter.identifier" />
      <short value="Identificador único" />
      <min value="1" />
    </element>
    <element id="Encounter.identifier.system">
      <path value="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:" />
      <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="Encounter.identifier.value">
      <path value="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" />
      <min value="1" />
    </element>
    <element id="Encounter.class">
      <path value="Encounter.class" />
      <short value="Tipo de actividad ÚNICAS" />
      <definition value="Classification of patient encounter context - e.g. Inpatient, outpatient. Concepts representing classification of patient encounter such as ambulatory (outpatient), inpatient, emergency, home health or others due to local variations." />
      <min value="1" />
      <binding>
        <strength value="required" />
        <description value="Value set de Actividades ÚNICAS" />
        <valueSet value="https://unicas-fhir.sanidad.gob.es/ValueSet/ActividadesUNICAS" />
      </binding>
    </element>
    <element id="Encounter.class.coding.system">
      <path value="Encounter.class.coding.system" />
      <short value="URL del Code system de Actividades ÚNICAS" />
      <definition value="Posible URL de codesystem utilizado para indicar la actividad ÚNICAS y su descripción correspondiente:&#xD;&#xA;&#xD;&#xA;- Code system de Actividades ÚNICAS: https://unicas-fhir.sanidad.gob.es/CodeSystem/CodigosActividadesUNICAS" />
    </element>
    <element id="Encounter.class.coding.code">
      <path value="Encounter.class.coding.code" />
      <short value="Código de la actividad ÚNICAS" />
    </element>
    <element id="Encounter.class.coding.display">
      <path value="Encounter.class.coding.display" />
      <short value="Descripción de la actividad ÚNICAS" />
      <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="Encounter.serviceType">
      <path value="Encounter.serviceType" />
      <short value="Tipo de servicio" />
      <definition value="Specific type of service. Broad categorization of the service that is to be provided (e.g. cardiology)." />
    </element>
    <element id="Encounter.serviceType.concept">
      <path value="Encounter.serviceType.concept" />
      <short value="Tipo de Servicio" />
      <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." />
      <binding>
        <strength value="required" />
        <description value="Value set de Tipos de servicios asistenciales para ÚNICAS" />
        <valueSet value="https://unicas-fhir.sanidad.gob.es/ValueSet/TiposServicios" />
      </binding>
    </element>
    <element id="Encounter.serviceType.concept.coding.system">
      <path value="Encounter.serviceType.concept.coding.system" />
      <short value="OID del catálogo de clasificación de Servicios" />
      <definition value="Posible OID de catálogo utilizado para indicar la clasificación de servicio y su descripción correspondiente:&#xD;&#xA;&#xD;&#xA;- Catálogo de clasificación de Servicios: urn:oid:2.16.724.4.21.5.9" />
    </element>
    <element id="Encounter.serviceType.concept.coding.code">
      <path value="Encounter.serviceType.concept.coding.code" />
      <short value="Código del servicio asistencial para ÚNICAS" />
    </element>
    <element id="Encounter.serviceType.concept.coding.display">
      <path value="Encounter.serviceType.concept.coding.display" />
      <short value="Descripción del servicio asistencial para ÚNICAS" />
      <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="Encounter.subject">
      <path value="Encounter.subject" />
      <short value="Referencia al paciente" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://unicas-fhir.sanidad.gob.es/StructureDefinition/UNICASPatient" />
      </type>
    </element>
    <element id="Encounter.subject.reference">
      <path value="Encounter.subject.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="Encounter.subject.type">
      <path value="Encounter.subject.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="Encounter.subject.identifier">
      <path value="Encounter.subject.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="Encounter.subject.identifier.type">
      <path value="Encounter.subject.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="Encounter.subject.identifier.type.coding.system">
      <path value="Encounter.subject.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="Encounter.subject.identifier.type.coding.code">
      <path value="Encounter.subject.identifier.type.coding.code" />
      <short value="Código del identificador" />
    </element>
    <element id="Encounter.subject.identifier.type.coding.display">
      <path value="Encounter.subject.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="Encounter.subject.identifier.system">
      <path value="Encounter.subject.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="Encounter.subject.identifier.value">
      <path value="Encounter.subject.identifier.value" />
      <short value="Número 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="Encounter.subject.display">
      <path value="Encounter.subject.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="Encounter.serviceProvider">
      <path value="Encounter.serviceProvider" />
      <short value="Referencia a la institución (Servicio Funcional)" />
      <definition value="The organization (facility) responsible for this encounter. The organization that is primarily responsible for this Encounter's services. This MAY be the same as the organization on the Patient record, however it could be different, such as if the actor performing the services was from an external organization (which may be billed seperately) for an external consultation.  Refer to the colonoscopy example on the Encounter examples tab." />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://unicas-fhir.sanidad.gob.es/StructureDefinition/UNICASOrganization" />
      </type>
    </element>
    <element id="Encounter.serviceProvider.reference">
      <path value="Encounter.serviceProvider.reference" />
      <short value="Referencia recurso FHIR" />
      <definition value="Formato: [base]/Organization?identifier=[OID registro de número de REGCESS]|[Código REGCESS de la institución]" />
    </element>
    <element id="Encounter.serviceProvider.type">
      <path value="Encounter.serviceProvider.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="Encounter.serviceProvider.identifier">
      <path value="Encounter.serviceProvider.identifier" />
      <short value="Identificador de la institución. Cuando no tengamos recurso Organization, se debera informar el identificador de institución mediante código REGCESS" />
      <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="Encounter.serviceProvider.identifier.system">
      <path value="Encounter.serviceProvider.identifier.system" />
      <short value="OID registro de número de REGCESS" />
      <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="Encounter.serviceProvider.identifier.value">
      <path value="Encounter.serviceProvider.identifier.value" />
      <short value="Código REGCESS" />
      <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="Encounter.serviceProvider.display">
      <path value="Encounter.serviceProvider.display" />
      <short value="Nombre completo de la institución" />
      <definition value="Text alternative for the resource. Plain text narrative that identifies the resource in addition to the resource reference." />
    </element>
    <element id="Encounter.participant">
      <path value="Encounter.participant" />
      <short value="Profesional sanitario" />
      <definition value="List of participants involved in the encounter. The list of people responsible for providing the service." />
      <min value="1" />
    </element>
    <element id="Encounter.participant.type">
      <path value="Encounter.participant.type" />
      <short value="Tipo de profesional que atiende al paciente" />
    </element>
    <element id="Encounter.participant.type.coding.system">
      <path value="Encounter.participant.type.coding.system" />
      <short value="OID del codesystem ParticipationType" />
      <definition value="Posible URL de codesystem utilizado para indicar el tipo de profesional y su descripción correspondiente:&#xD;&#xA;&#xD;&#xA;- Code system ParticipationType: http://terminology.hl7.org/CodeSystem/v3-ParticipationType" />
    </element>
    <element id="Encounter.participant.type.coding.code">
      <path value="Encounter.participant.type.coding.code" />
      <short value="Código del tipo de profesional: PPRF" />
    </element>
    <element id="Encounter.participant.type.coding.display">
      <path value="Encounter.participant.type.coding.display" />
      <short value="Descripción del tipo de profesional: primary performer" />
      <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="Encounter.participant.actor">
      <path value="Encounter.participant.actor" />
      <short value="Referencia al profesional sanitario" />
      <definition value="The individual, device, or service participating in the encounter. Person involved in the encounter, the patient/group is also included here to indicate that the patient was actually participating in the encounter. Not including the patient here covers use cases such as a case meeting between practitioners about a patient - non contact times." />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://unicas-fhir.sanidad.gob.es/StructureDefinition/UNICASPractitionerRole" />
        <targetProfile value="https://unicas-fhir.sanidad.gob.es/StructureDefinition/UNICASPractitioner" />
      </type>
    </element>
    <element id="Encounter.participant.actor.reference">
      <path value="Encounter.participant.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="Encounter.participant.actor.type">
      <path value="Encounter.participant.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="Encounter.participant.actor.identifier">
      <path value="Encounter.participant.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="Encounter.participant.actor.identifier.extension:numeroColegiadoProfesionalSanitario">
      <path value="Encounter.participant.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="Encounter.participant.actor.identifier.type">
      <path value="Encounter.participant.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="Encounter.participant.actor.identifier.type.coding.system">
      <path value="Encounter.participant.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="Encounter.participant.actor.identifier.type.coding.code">
      <path value="Encounter.participant.actor.identifier.type.coding.code" />
      <short value="Código del identificador" />
    </element>
    <element id="Encounter.participant.actor.identifier.type.coding.display">
      <path value="Encounter.participant.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="Encounter.participant.actor.identifier.system">
      <path value="Encounter.participant.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="Encounter.participant.actor.identifier.value">
      <path value="Encounter.participant.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="Encounter.participant.actor.display">
      <path value="Encounter.participant.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="Encounter.appointment">
      <path value="Encounter.appointment" />
      <short value="Referencia a la cita programada" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://unicas-fhir.sanidad.gob.es/StructureDefinition/UNICASAppointment" />
      </type>
    </element>
    <element id="Encounter.appointment.reference">
      <path value="Encounter.appointment.reference" />
      <short value="Referencia recurso FHIR" />
      <definition value="Formato: [base]/Appointment?identifier=urn:regcess:[CódigoREGCESS]|[Id interno del sistema para la cita programada]" />
    </element>
    <element id="Encounter.appointment.type">
      <path value="Encounter.appointment.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)." />
    </element>
    <element id="Encounter.appointment.identifier">
      <path value="Encounter.appointment.identifier" />
      <short value="Identificador de 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="Encounter.appointment.identifier.system">
      <path value="Encounter.appointment.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="Encounter.appointment.identifier.value">
      <path value="Encounter.appointment.identifier.value" />
      <short value="Identificador interno del sistema para la cita programada" />
      <definition value="Debe indicar el ID interno del sistema de origen utilizado para la cita programada." />
    </element>
    <element id="Encounter.plannedStartDate">
      <path value="Encounter.plannedStartDate" />
      <short value="Fecha de inicio de la interacción clínica" />
      <min value="1" />
    </element>
    <element id="Encounter.plannedEndDate">
      <path value="Encounter.plannedEndDate" />
      <short value="Fecha de fin de la interacción clínica" />
    </element>
    <element id="Encounter.reason">
      <path value="Encounter.reason" />
      <short value="Motivo de cita" />
    </element>
    <element id="Encounter.reason.value.concept">
      <path value="Encounter.reason.value.concept" />
      <short value="Motivo de cita" />
      <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." />
      <binding>
        <strength value="extensible" />
        <description value="Value set de Motivos de la cita" />
        <valueSet value="https://unicas-fhir.sanidad.gob.es/ValueSet/MotivosCita" />
      </binding>
    </element>
    <element id="Encounter.reason.value.concept.coding.system">
      <path value="Encounter.reason.value.concept.coding.system" />
      <short value="URL del SNOMED CT. Extensión para España del SNS | OID del CIE-10-ES. Diagnósticos | OID del ORPHA" />
      <definition value="Posibles URLs y/o OIDs de terminologías utilizadas para indicar el motivo de la cita y su descripción correspondiente:&#xD;&#xA;&#xA;- SNOMED CT. Extensión para España del SNS con filtro eje hallazgo: http://snomed.info/sct/900000001000122104&#xA;- CIE-10-ES. Diagnósticos: urn:oid:2.16.724.4.21.5.29&#xA;- ORPHA: urn:oid:2.16.724.4.21.5.22" />
    </element>
    <element id="Encounter.reason.value.concept.coding.code">
      <path value="Encounter.reason.value.concept.coding.code" />
      <short value="Código del motivo de la cita" />
    </element>
    <element id="Encounter.reason.value.concept.coding.display">
      <path value="Encounter.reason.value.concept.coding.display" />
      <short value="Descripción del motivo de la cita" />
      <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="Encounter.diagnosis">
      <path value="Encounter.diagnosis" />
      <short value="Diagnósticos (Diagnóstico principal y/o secundarios asociados a la interacción clínica)" />
    </element>
    <element id="Encounter.diagnosis.condition">
      <path value="Encounter.diagnosis.condition" />
      <short value="Referencia al diagnóstico" />
      <definition value="The diagnosis relevant to the encounter. The coded diagnosis or a reference to a Condition (with other resources referenced in the evidence.detail), the use property will indicate the purpose of this specific diagnosis." />
      <type>
        <code value="CodeableReference" />
        <targetProfile value="https://unicas-fhir.sanidad.gob.es/StructureDefinition/UNICASConditionDiagnostico" />
      </type>
    </element>
    <element id="Encounter.diagnosis.condition.reference">
      <path value="Encounter.diagnosis.condition.reference" />
      <short value="Referencia al diagnóstico" />
      <definition value="Reference to a resource (by instance). A reference to a resource the provides exact details about the information being referenced." />
    </element>
    <element id="Encounter.diagnosis.condition.reference.reference">
      <path value="Encounter.diagnosis.condition.reference.reference" />
      <short value="Referencia recurso FHIR" />
      <definition value="Formato: [base]/Condition?identifier=urn:regcess:[CódigoREGCESS]|[Id interno del sistema para el diagnóstico]" />
    </element>
    <element id="Encounter.diagnosis.condition.reference.type">
      <path value="Encounter.diagnosis.condition.reference.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="Encounter.diagnosis.condition.reference.identifier">
      <path value="Encounter.diagnosis.condition.reference.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="Encounter.diagnosis.condition.reference.identifier.system">
      <path value="Encounter.diagnosis.condition.reference.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="Encounter.diagnosis.condition.reference.identifier.value">
      <path value="Encounter.diagnosis.condition.reference.identifier.value" />
      <short value="Identificador interno del sistema para el diagnóstico" />
      <definition value="Debe indicar el ID interno del sistema de origen utilizado para el diagnóstico." />
    </element>
    <element id="Encounter.diagnosis.use">
      <path value="Encounter.diagnosis.use" />
      <short value="Uso del diagnóstico en función de su registro" />
    </element>
    <element id="Encounter.admission.admitSource">
      <path value="Encounter.admission.admitSource" />
      <short value="Procedencia de la interacción clínica" />
      <binding>
        <strength value="extensible" />
        <description value="Value set de Procedencia de la interacción clínica (Encounter)" />
        <valueSet value="https://unicas-fhir.sanidad.gob.es/ValueSet/ProcedenciaInteraccionClinica" />
      </binding>
    </element>
    <element id="Encounter.admission.dischargeDisposition">
      <path value="Encounter.admission.dischargeDisposition" />
      <short value="Tipo de alta de la interacción clínica" />
      <binding>
        <strength value="extensible" />
        <description value="Value set de Tipo de alta de la interacción clínica (Encounter)" />
        <valueSet value="https://unicas-fhir.sanidad.gob.es/ValueSet/TipoAltaInteraccionClinica" />
      </binding>
    </element>
  </differential>
</StructureDefinition>