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