{
  "resourceType": "StructureDefinition",
  "url": "https://unicas-fhir.sanidad.gob.es/StructureDefinition/UNICASPrescripcionesHospitalarias",
  "name": "UNICASBundlePrescripcionesHospitalarias",
  "title": "Bundle Prescripciones Hospitalarias ÚNICAS",
  "status": "draft",
  "description": "Este profile define las restricciones del recurso Bundle para representar el mensaje de registro de prescripciones en el contexto del caso de uso de ÚNICAS.",
  "fhirVersion": "5.0.0",
  "kind": "resource",
  "abstract": false,
  "type": "Bundle",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Bundle",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Bundle.identifier",
        "path": "Bundle.identifier",
        "short": "Identificador único",
        "definition": "Persistent identifier for the bundle. A persistent identifier for the bundle that won't change as a bundle is copied from server to server.",
        "min": 1
      },
      {
        "id": "Bundle.identifier.type",
        "path": "Bundle.identifier.type",
        "short": "Tipo de informe/información ÚNICAS",
        "definition": "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": "extensible",
          "description": "Value set de Tipos de informes para ÚNICAS",
          "valueSet": "https://unicas-fhir.sanidad.gob.es/ValueSet/TiposInformesUNICAS"
        }
      },
      {
        "id": "Bundle.identifier.type.coding",
        "path": "Bundle.identifier.type.coding",
        "patternCoding": {
          "system": "http://snomed.info/sct/900000001000122104",
          "code": "440545006",
          "display": "registro de prescripción"
        }
      },
      {
        "id": "Bundle.identifier.type.coding.system",
        "path": "Bundle.identifier.type.coding.system",
        "short": "URL del refset Documentos del CMDIC | URL del SNOMED CT. Extensión para España del SNS",
        "definition": "Identity of the terminology system. The identification of the code system that defines the meaning of the symbol in the code."
      },
      {
        "id": "Bundle.identifier.type.coding.code",
        "path": "Bundle.identifier.type.coding.code",
        "short": "Código del tipo de informe/información ÚNICAS"
      },
      {
        "id": "Bundle.identifier.type.coding.display",
        "path": "Bundle.identifier.type.coding.display",
        "short": "Descripción del tipo de informe/información ÚNICAS",
        "definition": "Representation defined by the system. A representation of the meaning of the code in the system, following the rules of the system."
      },
      {
        "id": "Bundle.identifier.system",
        "path": "Bundle.identifier.system",
        "short": "Sistema de identificador",
        "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": "Bundle.identifier.value",
        "path": "Bundle.identifier.value",
        "short": "Valor de identificador",
        "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": "Bundle.type",
        "path": "Bundle.type",
        "patternCode": "transaction"
      },
      {
        "id": "Bundle.timestamp",
        "path": "Bundle.timestamp",
        "short": "Fecha y hora de envío del mensaje en el Nodo Autonómico (Effective Time)",
        "definition": "When the bundle was assembled. The date/time that the bundle was assembled - i.e. when the resources were placed in the bundle.",
        "min": 1
      },
      {
        "id": "Bundle.entry",
        "path": "Bundle.entry",
        "slicing": {
          "discriminator": [
            {
              "type": "profile",
              "path": "resource"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "Bundle.entry:EncounterInteraccionClinica",
        "path": "Bundle.entry",
        "sliceName": "EncounterInteraccionClinica",
        "short": "Registro de la interacción clínica",
        "min": 1
      },
      {
        "id": "Bundle.entry:EncounterInteraccionClinica.fullUrl",
        "path": "Bundle.entry.fullUrl",
        "min": 1
      },
      {
        "id": "Bundle.entry:EncounterInteraccionClinica.resource",
        "path": "Bundle.entry.resource",
        "short": "Referencia al registro de la interacción clínica",
        "min": 1,
        "type": [
          {
            "code": "Encounter",
            "profile": [
              "https://unicas-fhir.sanidad.gob.es/StructureDefinition/UNICASEncounter"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:EncounterInteraccionClinica.resource.subject.identifier.type",
        "path": "Bundle.entry.resource.subject.identifier.type",
        "binding": {
          "strength": "extensible",
          "description": "Value set de Tipos de documentos de identificación para persona ÚNICAS",
          "valueSet": "https://unicas-fhir.sanidad.gob.es/ValueSet/TiposDocumentosIdentificacionPersona"
        }
      },
      {
        "id": "Bundle.entry:EncounterInteraccionClinica.resource.participant.actor.identifier.type",
        "path": "Bundle.entry.resource.participant.actor.identifier.type",
        "binding": {
          "strength": "extensible",
          "description": "Value set de Tipos de documentos de identificación para persona ÚNICAS",
          "valueSet": "https://unicas-fhir.sanidad.gob.es/ValueSet/TiposDocumentosIdentificacionPersona"
        }
      },
      {
        "id": "Bundle.entry:EncounterInteraccionClinica.request",
        "path": "Bundle.entry.request",
        "short": "Información de ejecución",
        "definition": "Additional execution information (transaction/batch/history). Additional information about how this entry should be processed as part of a transaction or batch. For history, it shows how the entry was processed to create the version contained in the entry.",
        "min": 1
      },
      {
        "id": "Bundle.entry:EncounterInteraccionClinica.request.method",
        "path": "Bundle.entry.request.method",
        "short": "Método de interacción",
        "definition": "In a transaction or batch, this is the HTTP action to be executed for this entry. In a history bundle, this indicates the HTTP action that occurred (GET | HEAD | POST | PUT | DELETE | PATCH)."
      },
      {
        "id": "Bundle.entry:EncounterInteraccionClinica.request.url",
        "path": "Bundle.entry.request.url",
        "short": "URL de este entry, relativa a la raíz",
        "definition": "Formato de actualización condicional: [base]/Encounter?identifier=urn:regcess:[CódigoREGCESS]|[Id interno del sistema para la interacción clínica]"
      },
      {
        "id": "Bundle.entry:MedicationMedicaciones",
        "path": "Bundle.entry",
        "sliceName": "MedicationMedicaciones",
        "short": "Registro de medicamentos",
        "definition": "Entry in the bundle - will have a resource or information. An entry in a bundle resource - will either contain a resource or information about a resource (transactions and history only)."
      },
      {
        "id": "Bundle.entry:MedicationMedicaciones.fullUrl",
        "path": "Bundle.entry.fullUrl",
        "min": 1
      },
      {
        "id": "Bundle.entry:MedicationMedicaciones.resource",
        "path": "Bundle.entry.resource",
        "short": "Referencia al registro de medicamento",
        "definition": "Definition of a Medication. This resource is primarily used for the identification and definition of a medication, including ingredients, for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use.",
        "min": 1,
        "type": [
          {
            "code": "Medication",
            "profile": [
              "https://unicas-fhir.sanidad.gob.es/StructureDefinition/UNICASMedication"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:MedicationMedicaciones.request",
        "path": "Bundle.entry.request",
        "short": "Información de ejecución",
        "definition": "Additional execution information (transaction/batch/history). Additional information about how this entry should be processed as part of a transaction or batch. For history, it shows how the entry was processed to create the version contained in the entry.",
        "min": 1
      },
      {
        "id": "Bundle.entry:MedicationMedicaciones.request.method",
        "path": "Bundle.entry.request.method",
        "short": "Método de interacción",
        "definition": "In a transaction or batch, this is the HTTP action to be executed for this entry. In a history bundle, this indicates the HTTP action that occurred (GET | HEAD | POST | PUT | DELETE | PATCH)."
      },
      {
        "id": "Bundle.entry:MedicationMedicaciones.request.url",
        "path": "Bundle.entry.request.url",
        "short": "URL de este entry, relativa a la raíz",
        "definition": "Formato de actualización condicional: [base]/Medication?code=[URL del SNOMED CT. Extensión para España del SNS o urn:oid del ATC o DCSA]|[Código del fármaco]"
      },
      {
        "id": "Bundle.entry:AdministrationPrescripciones",
        "path": "Bundle.entry",
        "sliceName": "AdministrationPrescripciones",
        "short": "Registro de los consumos de medicamentos en el hospital",
        "definition": "Entry in the bundle - will have a resource or information. An entry in a bundle resource - will either contain a resource or information about a resource (transactions and history only).",
        "min": 1
      },
      {
        "id": "Bundle.entry:AdministrationPrescripciones.fullUrl",
        "path": "Bundle.entry.fullUrl",
        "min": 1
      },
      {
        "id": "Bundle.entry:AdministrationPrescripciones.resource",
        "path": "Bundle.entry.resource",
        "short": "Referencia al registro del consumo de medicamento en el hospital",
        "definition": "Administration of medication to a patient. Describes the event of a patient consuming or otherwise being administered a medication.  This may be as simple as swallowing a tablet or it may be a long running infusion.  Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner.",
        "min": 1,
        "type": [
          {
            "code": "MedicationAdministration",
            "profile": [
              "https://unicas-fhir.sanidad.gob.es/StructureDefinition/UNICASMedicationAdministration"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:AdministrationPrescripciones.resource.subject.identifier.type",
        "path": "Bundle.entry.resource.subject.identifier.type",
        "binding": {
          "strength": "extensible",
          "description": "Value set de Tipos de documentos de identificación para persona ÚNICAS",
          "valueSet": "https://unicas-fhir.sanidad.gob.es/ValueSet/TiposDocumentosIdentificacionPersona"
        }
      },
      {
        "id": "Bundle.entry:AdministrationPrescripciones.resource.performer.actor.reference.identifier.type",
        "path": "Bundle.entry.resource.performer.actor.reference.identifier.type",
        "binding": {
          "strength": "extensible",
          "description": "Value set de Tipos de documentos de identificación para persona ÚNICAS",
          "valueSet": "https://unicas-fhir.sanidad.gob.es/ValueSet/TiposDocumentosIdentificacionPersona"
        }
      },
      {
        "id": "Bundle.entry:AdministrationPrescripciones.request",
        "path": "Bundle.entry.request",
        "short": "Información de ejecución",
        "definition": "Additional execution information (transaction/batch/history). Additional information about how this entry should be processed as part of a transaction or batch. For history, it shows how the entry was processed to create the version contained in the entry.",
        "min": 1
      },
      {
        "id": "Bundle.entry:AdministrationPrescripciones.request.method",
        "path": "Bundle.entry.request.method",
        "short": "Método de interacción",
        "definition": "In a transaction or batch, this is the HTTP action to be executed for this entry. In a history bundle, this indicates the HTTP action that occurred (GET | HEAD | POST | PUT | DELETE | PATCH)."
      },
      {
        "id": "Bundle.entry:AdministrationPrescripciones.request.url",
        "path": "Bundle.entry.request.url",
        "short": "URL de este entry, relativa a la raíz",
        "definition": "Formato de actualización condicional: [base]/MedicationAdministration?identifier=urn:regcess:[CódigoREGCESS]|[Id interno del sistema para el consumo de medicamento en el hospital]"
      },
      {
        "id": "Bundle.entry:StatmentPrescripciones",
        "path": "Bundle.entry",
        "sliceName": "StatmentPrescripciones",
        "short": "Registro de las medicaciones inyectadas durante el hospital",
        "definition": "Entry in the bundle - will have a resource or information. An entry in a bundle resource - will either contain a resource or information about a resource (transactions and history only)."
      },
      {
        "id": "Bundle.entry:StatmentPrescripciones.fullUrl",
        "path": "Bundle.entry.fullUrl",
        "min": 1
      },
      {
        "id": "Bundle.entry:StatmentPrescripciones.resource",
        "path": "Bundle.entry.resource",
        "short": "Referencia al registro de la medicación inyectada durante el hospital",
        "min": 1,
        "type": [
          {
            "code": "MedicationStatement",
            "profile": [
              "https://unicas-fhir.sanidad.gob.es/StructureDefinition/UNICASMedicationStatement"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:StatmentPrescripciones.resource.subject.identifier.type",
        "path": "Bundle.entry.resource.subject.identifier.type",
        "binding": {
          "strength": "extensible",
          "description": "Value set de Tipos de documentos de identificación para persona ÚNICAS",
          "valueSet": "https://unicas-fhir.sanidad.gob.es/ValueSet/TiposDocumentosIdentificacionPersona"
        }
      },
      {
        "id": "Bundle.entry:StatmentPrescripciones.resource.informationSource.identifier.type",
        "path": "Bundle.entry.resource.informationSource.identifier.type",
        "binding": {
          "strength": "extensible",
          "description": "Value set de Tipos de documentos de identificación para persona ÚNICAS",
          "valueSet": "https://unicas-fhir.sanidad.gob.es/ValueSet/TiposDocumentosIdentificacionPersona"
        }
      },
      {
        "id": "Bundle.entry:StatmentPrescripciones.request",
        "path": "Bundle.entry.request",
        "short": "Información de ejecución",
        "definition": "Additional execution information (transaction/batch/history). Additional information about how this entry should be processed as part of a transaction or batch. For history, it shows how the entry was processed to create the version contained in the entry.",
        "min": 1
      },
      {
        "id": "Bundle.entry:StatmentPrescripciones.request.method",
        "path": "Bundle.entry.request.method",
        "short": "Método de interacción",
        "definition": "In a transaction or batch, this is the HTTP action to be executed for this entry. In a history bundle, this indicates the HTTP action that occurred (GET | HEAD | POST | PUT | DELETE | PATCH)."
      },
      {
        "id": "Bundle.entry:StatmentPrescripciones.request.url",
        "path": "Bundle.entry.request.url",
        "short": "URL de este entry, relativa a la raíz",
        "definition": "Formato de actualización condicional: [base]/MedicationStatement?identifier=urn:regcess:[CódigoREGCESS]|[Id interno del sistema para el registro de la medicación inyectada durante el hospital]"
      }
    ]
  }
}