<StructureDefinition xmlns="http://hl7.org/fhir">
  <url value="https://unicas-fhir.sanidad.gob.es/StructureDefinition/UNICASOrganization" />
  <name value="UNICASOrganization" />
  <title value="Organization Institución ÚNICAS" />
  <status value="draft" />
  <description value="Este profile define las restricciones del recurso Organization para representar la institución o centro sanitario dentro del contexto del caso de uso de ÚNICAS." />
  <fhirVersion value="5.0.0" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Organization" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Organization" />
  <derivation value="constraint" />
  <differential>
    <element id="Organization.extension">
      <path value="Organization.extension" />
      <min value="1" />
    </element>
    <element id="Organization.extension:nodoCCAA">
      <path value="Organization.extension" />
      <sliceName value="nodoCCAA" />
      <min value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://unicas-fhir.sanidad.gob.es/StructureDefinition/NodoCCAA" />
      </type>
    </element>
    <element id="Organization.identifier">
      <path value="Organization.identifier" />
      <slicing>
        <discriminator>
          <type value="position" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <short value="Identificadores de centro" />
      <definition value="Se identifica la organización usando diferentes centros" />
      <min value="1" />
    </element>
    <element id="Organization.identifier:CodigoREGCESS">
      <path value="Organization.identifier" />
      <sliceName value="CodigoREGCESS" />
      <short value="Identificador del centro REGCESS" />
      <definition value="Identifies this organization  across multiple systems. Identifier for the organization that is used to identify the organization across multiple disparate systems." />
      <min value="1" />
      <fixedIdentifier>
        <system value="urn:oid:2.16.724.4.21.5.10" />
      </fixedIdentifier>
    </element>
    <element id="Organization.identifier:CodigoREGCESS.system">
      <path value="Organization.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." />
      <min value="1" />
    </element>
    <element id="Organization.identifier:CodigoREGCESS.value">
      <path value="Organization.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." />
      <min value="1" />
    </element>
    <element id="Organization.identifier:CodigoCentroAutonomico">
      <path value="Organization.identifier" />
      <sliceName value="CodigoCentroAutonomico" />
      <short value="Identificador del centro autonómico" />
      <definition value="Identifies this organization  across multiple systems. Identifier for the organization that is used to identify the organization across multiple disparate systems." />
    </element>
    <element id="Organization.identifier:CodigoCentroAutonomico.system">
      <path value="Organization.identifier.system" />
      <short value="OID registro de catálogo del centro autonómico" />
      <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="Organization.identifier:CodigoCentroAutonomico.value">
      <path value="Organization.identifier.value" />
      <short value="Código del centro autonómico" />
      <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="Organization.identifier:CodigoEntidadSanitaria">
      <path value="Organization.identifier" />
      <sliceName value="CodigoEntidadSanitaria" />
      <short value="Identificador de la entidad sanitaria autonómica" />
      <definition value="Identifies this organization  across multiple systems. Identifier for the organization that is used to identify the organization across multiple disparate systems." />
    </element>
    <element id="Organization.identifier:CodigoEntidadSanitaria.system">
      <path value="Organization.identifier.system" />
      <short value="OID registro de catálogo de entidad sanitaria autonómica" />
      <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="Organization.identifier:CodigoEntidadSanitaria.value">
      <path value="Organization.identifier.value" />
      <short value="Código de la entidad sanitaria autonómica" />
      <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="Organization.identifier:CodigoUnidadSanitaria">
      <path value="Organization.identifier" />
      <sliceName value="CodigoUnidadSanitaria" />
      <short value="Identificador de la unidad sanitaria autonómica" />
      <definition value="Identifies this organization  across multiple systems. Identifier for the organization that is used to identify the organization across multiple disparate systems." />
    </element>
    <element id="Organization.identifier:CodigoUnidadSanitaria.system">
      <path value="Organization.identifier.system" />
      <short value="OID registro de catálogo de unidad sanitaria autonómica" />
      <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="Organization.identifier:CodigoUnidadSanitaria.value">
      <path value="Organization.identifier.value" />
      <short value="Código de la unidad sanitaria autonómica" />
      <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="Organization.name">
      <path value="Organization.name" />
      <short value="Denominación del centro (Nombre usado por el centro)" />
      <definition value="Name used for the organization. A name associated with the organization." />
      <min value="1" />
    </element>
    <element id="Organization.contact">
      <path value="Organization.contact" />
      <min value="1" />
    </element>
    <element id="Organization.contact.telecom">
      <path value="Organization.contact.telecom" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="system" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="Organization.contact.telecom:Telefono">
      <path value="Organization.contact.telecom" />
      <sliceName value="Telefono" />
      <short value="Teléfono de contacto" />
      <definition value="Contact details (e.g.phone/fax/url). The contact details application for the purpose defined." />
    </element>
    <element id="Organization.contact.telecom:Telefono.system">
      <path value="Organization.contact.telecom.system" />
      <short value="phone" />
      <definition value="Telecommunications form for contact point - what communications system is required to make use of the contact (phone | fax | email | pager | url | sms | other)." />
      <fixedCode value="phone" />
    </element>
    <element id="Organization.contact.telecom:Telefono.value">
      <path value="Organization.contact.telecom.value" />
      <short value="Número de teléfono" />
    </element>
    <element id="Organization.contact.telecom:CorreoElectronico">
      <path value="Organization.contact.telecom" />
      <sliceName value="CorreoElectronico" />
      <short value="Correo electrónico" />
      <definition value="Contact details (e.g.phone/fax/url). The contact details application for the purpose defined." />
    </element>
    <element id="Organization.contact.telecom:CorreoElectronico.system">
      <path value="Organization.contact.telecom.system" />
      <short value="email" />
      <definition value="Telecommunications form for contact point - what communications system is required to make use of the contact (phone | fax | email | pager | url | sms | other)." />
      <fixedCode value="email" />
    </element>
    <element id="Organization.contact.telecom:CorreoElectronico.value">
      <path value="Organization.contact.telecom.value" />
      <short value="Dirección de correo electrónico" />
    </element>
    <element id="Organization.contact.telecom:WebIntranet">
      <path value="Organization.contact.telecom" />
      <sliceName value="WebIntranet" />
      <short value="Dirección de la página web o intranet del centro" />
      <definition value="Contact details (e.g.phone/fax/url). The contact details application for the purpose defined." />
    </element>
    <element id="Organization.contact.telecom:WebIntranet.system">
      <path value="Organization.contact.telecom.system" />
      <short value="pager" />
      <definition value="Telecommunications form for contact point - what communications system is required to make use of the contact (phone | fax | email | pager | url | sms | other)." />
      <fixedCode value="pager" />
    </element>
    <element id="Organization.contact.telecom:WebIntranet.value">
      <path value="Organization.contact.telecom.value" />
      <short value="Dirección de web o intranet" />
    </element>
    <element id="Organization.contact.address">
      <path value="Organization.contact.address" />
      <short value="Dirección del centro" />
      <min value="1" />
    </element>
    <element id="Organization.contact.address.extension">
      <path value="Organization.contact.address.extension" />
      <min value="1" />
    </element>
    <element id="Organization.contact.address.extension:provincia">
      <path value="Organization.contact.address.extension" />
      <sliceName value="provincia" />
      <min value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://unicas-fhir.sanidad.gob.es/StructureDefinition/Provincia" />
      </type>
      <isModifier value="false" />
    </element>
    <element id="Organization.contact.address.line">
      <path value="Organization.contact.address.line" />
      <short value="Tipo de vía, nombre de la vía, número de la vía, piso, letra" />
      <definition value="Street name, number, direction &amp; P.O. Box etc. This component contains the house number, apartment number, street name, street direction,  P.O. Box number, delivery hints, and similar address information." />
      <min value="1" />
    </element>
    <element id="Organization.contact.address.city">
      <path value="Organization.contact.address.city" />
      <short value="Ciudad" />
      <min value="1" />
    </element>
    <element id="Organization.contact.address.district">
      <path value="Organization.contact.address.district" />
      <short value="Municipio en la dirección" />
      <min value="1" />
    </element>
    <element id="Organization.contact.address.state">
      <path value="Organization.contact.address.state" />
      <short value="Comunidad Autónoma" />
      <definition value="Sub-unit of country (abbreviations ok). Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (e.g. US 2 letter state codes)." />
      <min value="1" />
    </element>
    <element id="Organization.contact.address.postalCode">
      <path value="Organization.contact.address.postalCode" />
      <short value="Código postal" />
      <definition value="Postal code for area. A postal code designating a region defined by the postal service" />
      <min value="1" />
    </element>
    <element id="Organization.contact.address.country">
      <path value="Organization.contact.address.country" />
      <short value="País" />
      <definition value="Country - a nation as commonly understood or generally accepted. (e.g. may be ISO 3166 2 or 3 letter code)" />
      <min value="1" />
    </element>
    <element id="Organization.endpoint">
      <path value="Organization.endpoint" />
      <short value="Referencia al sistema de información" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://unicas-fhir.sanidad.gob.es/StructureDefinition/UNICASEndpoint" />
      </type>
    </element>
    <element id="Organization.endpoint.reference">
      <path value="Organization.endpoint.reference" />
      <short value="Referencia recurso FHIR" />
      <definition value="Formato: [base]/Endpoint?identifier=urn:regcess:[CódigoREGCESS]|[Id interno del sistema para el sistema de información]" />
    </element>
    <element id="Organization.endpoint.type">
      <path value="Organization.endpoint.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="Organization.endpoint.identifier">
      <path value="Organization.endpoint.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="Organization.endpoint.identifier.system">
      <path value="Organization.endpoint.identifier.system" />
      <short value="Sistema para identificar el origen" />
      <definition value="Formato: urn:regcess:[CódigoREGCESS] Debe incluir el código REGCESS después de urn:regcess:" />
    </element>
    <element id="Organization.endpoint.identifier.value">
      <path value="Organization.endpoint.identifier.value" />
      <short value="Identificador interno del sistema para el sistema de información" />
      <definition value="Debe indicar el ID interno del sistema de origen utilizado para el sistema de información." />
    </element>
    <element id="Organization.endpoint.display">
      <path value="Organization.endpoint.display" />
      <short value="Nombre del sistema de información" />
      <definition value="Text alternative for the resource. Plain text narrative that identifies the resource in addition to the resource reference." />
    </element>
  </differential>
</StructureDefinition>