{
  "resourceType": "StructureDefinition",
  "url": "https://unicas-fhir.sanidad.gob.es/StructureDefinition/UNICASTask",
  "name": "UNICASTask",
  "title": "Task Tarea ÚNICAS",
  "status": "draft",
  "description": "Este profile define las restricciones del recurso Task para representar el registro de tarea en el proceso de ÚNICAS.",
  "fhirVersion": "5.0.0",
  "kind": "resource",
  "abstract": false,
  "type": "Task",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Task",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Task.contained",
        "path": "Task.contained",
        "type": [
          {
            "code": "Resource",
            "profile": [
              "https://unicas-fhir.sanidad.gob.es/StructureDefinition/UNICASPractitionerRole"
            ]
          }
        ]
      },
      {
        "id": "Task.identifier",
        "path": "Task.identifier",
        "short": "Identificador único",
        "definition": "Task Instance Identifier. The business identifier for this task."
      },
      {
        "id": "Task.identifier.system",
        "path": "Task.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."
      },
      {
        "id": "Task.identifier.value",
        "path": "Task.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."
      },
      {
        "id": "Task.status",
        "path": "Task.status",
        "short": "draft | requested | received | accepted | rejected | ready | cancelled | in-progress | on-hold | failed | complete | entered-in-error"
      },
      {
        "id": "Task.code",
        "path": "Task.code",
        "short": "Tipo de evento ÚNICAS",
        "definition": "Task Type. A name or code (or both) briefly describing what the task involves."
      },
      {
        "id": "Task.for",
        "path": "Task.for",
        "short": "Referencia al paciente",
        "definition": "Beneficiary of the Task. The entity who benefits from the performance of the service specified in the task (e.g., the patient).",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://unicas-fhir.sanidad.gob.es/StructureDefinition/UNICASPatient"
            ]
          }
        ]
      },
      {
        "id": "Task.for.reference",
        "path": "Task.for.reference",
        "short": "Referencia recurso FHIR. Identificador de la referencia del recurso FHIR asociado cuando exista/creamos un recurso en el mismo servidor FHIR",
        "definition": "Formato: [base]/Patient?identifier=[OID registro de número de CIP-SNS]|[Número CIP-SNS]"
      },
      {
        "id": "Task.for.type",
        "path": "Task.for.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.\r\n\r\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": "Task.for.identifier",
        "path": "Task.for.identifier",
        "short": "Identificador de paciente CIP-SNS. Cuando no tengamos recurso Patient, se debera informar el identificador de paciente mediante CIP-SNS",
        "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": "Task.for.identifier.type",
        "path": "Task.for.identifier.type",
        "short": "Tipos de documentos de identificación para persona Ú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 documentos de identificación para persona ÚNICAS",
          "valueSet": "https://unicas-fhir.sanidad.gob.es/ValueSet/TiposDocumentosIdentificacionPersona"
        }
      },
      {
        "id": "Task.for.identifier.type.coding.system",
        "path": "Task.for.identifier.type.coding.system",
        "short": "URL del SNOMED CT. Extensión para España del SNS",
        "definition": "Posible URL de terminología utilizada para indicar el tipo de documentos de identificación y su descripción correspondiente:\r\n\r\n- SNOMED CT. Extensión para España del SNS: http://snomed.info/sct/900000001000122104"
      },
      {
        "id": "Task.for.identifier.type.coding.code",
        "path": "Task.for.identifier.type.coding.code",
        "short": "Código del identificador"
      },
      {
        "id": "Task.for.identifier.type.coding.display",
        "path": "Task.for.identifier.type.coding.display",
        "short": "Decripción del identificador",
        "definition": "Representation defined by the system. A representation of the meaning of the code in the system, following the rules of the system."
      },
      {
        "id": "Task.for.identifier.system",
        "path": "Task.for.identifier.system",
        "short": "OID registro de número de CIP-SNS",
        "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": "Task.for.identifier.value",
        "path": "Task.for.identifier.value",
        "short": "Número CIP-SNS",
        "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": "Task.for.display",
        "path": "Task.for.display",
        "short": "Nombre completo del paciente",
        "definition": "Text alternative for the resource. Plain text narrative that identifies the resource in addition to the resource reference."
      },
      {
        "id": "Task.encounter",
        "path": "Task.encounter",
        "short": "Referencia a la interacción clínica",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://unicas-fhir.sanidad.gob.es/StructureDefinition/UNICASEncounter"
            ]
          }
        ]
      },
      {
        "id": "Task.encounter.reference",
        "path": "Task.encounter.reference",
        "short": "Referencia recurso FHIR",
        "definition": "Formato: [base]/Encounter?identifier=urn:regcess:[CódigoREGCESS]|[Id interno del sistema para la interacción clínica]"
      },
      {
        "id": "Task.encounter.type",
        "path": "Task.encounter.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.\r\n\r\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": "Task.encounter.identifier",
        "path": "Task.encounter.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": "Task.encounter.identifier.system",
        "path": "Task.encounter.identifier.system",
        "short": "Sistema para identificar el origen",
        "definition": "Formato: urn:regcess:[CódigoREGCESS]\r\nDebe incluir el código REGCESS después de urn:regcess:"
      },
      {
        "id": "Task.encounter.identifier.value",
        "path": "Task.encounter.identifier.value",
        "short": "Identificador interno del sistema para la interacción clínica",
        "definition": "Debe indicar el ID interno del sistema de origen utilizado para la interacción clínica."
      },
      {
        "id": "Task.requester",
        "path": "Task.requester",
        "short": "Referencia al autor o Institución que solicita la ejecución de la tarea",
        "definition": "Who is asking for task to be done. The creator of the task.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://unicas-fhir.sanidad.gob.es/StructureDefinition/UNICASOrganization",
              "https://unicas-fhir.sanidad.gob.es/StructureDefinition/UNICASPractitionerRole",
              "https://unicas-fhir.sanidad.gob.es/StructureDefinition/UNICASPractitioner",
              "https://unicas-fhir.sanidad.gob.es/StructureDefinition/UNICASPatient"
            ]
          }
        ]
      },
      {
        "id": "Task.requester.reference",
        "path": "Task.requester.reference",
        "short": "Referencia recurso FHIR",
        "definition": "Literal reference, Relative, internal or absolute URL. A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
      },
      {
        "id": "Task.requester.type",
        "path": "Task.requester.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.\r\n\r\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": "Task.requester.identifier",
        "path": "Task.requester.identifier",
        "short": "Identificador del autor o Institución que solicita la ejecución de la tarea",
        "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": "Task.requester.display",
        "path": "Task.requester.display",
        "short": "Nombre del autor o Institución que solicita la ejecución de la tarea",
        "definition": "Text alternative for the resource. Plain text narrative that identifies the resource in addition to the resource reference."
      },
      {
        "id": "Task.requestedPerformer",
        "path": "Task.requestedPerformer",
        "short": "Autor o Institución específico que debe realizar la tarea",
        "definition": "Who should perform Task. The kind of participant or specific participant that should perform the task.",
        "type": [
          {
            "code": "CodeableReference",
            "targetProfile": [
              "https://unicas-fhir.sanidad.gob.es/StructureDefinition/UNICASOrganization",
              "https://unicas-fhir.sanidad.gob.es/StructureDefinition/UNICASPractitionerRole",
              "https://unicas-fhir.sanidad.gob.es/StructureDefinition/UNICASPractitioner",
              "https://unicas-fhir.sanidad.gob.es/StructureDefinition/UNICASPatient"
            ]
          }
        ]
      },
      {
        "id": "Task.requestedPerformer.reference",
        "path": "Task.requestedPerformer.reference",
        "short": "Referencia al autor o Institución específico que debe realizar la tarea",
        "definition": "Reference to a resource (by instance). A reference to a resource the provides exact details about the information being referenced."
      },
      {
        "id": "Task.requestedPerformer.reference.reference",
        "path": "Task.requestedPerformer.reference.reference",
        "short": "Referencia recurso FHIR",
        "definition": "Literal reference, Relative, internal or absolute URL. A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
      },
      {
        "id": "Task.requestedPerformer.reference.type",
        "path": "Task.requestedPerformer.reference.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.\r\n\r\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": "Task.requestedPerformer.reference.identifier",
        "path": "Task.requestedPerformer.reference.identifier",
        "short": "Identificador del autor o Institución específico que debe realizar la tarea",
        "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": "Task.requestedPerformer.reference.display",
        "path": "Task.requestedPerformer.reference.display",
        "short": "Nombre del autor o Institución específico que debe realizar la tarea",
        "definition": "Text alternative for the resource. Plain text narrative that identifies the resource in addition to the resource reference."
      },
      {
        "id": "Task.input",
        "path": "Task.input",
        "short": "Entrada para realizar la tarea",
        "definition": "Information used to perform task. Additional information that may be needed in the execution of the task."
      },
      {
        "id": "Task.input.type",
        "path": "Task.input.type",
        "short": "Tipo de actividad ÚNICAS",
        "definition": "Label for the input. A code or description indicating how the input is intended to be used as part of the task execution.",
        "binding": {
          "strength": "example",
          "description": "Value set de Actividades ÚNICAS",
          "valueSet": "https://unicas-fhir.sanidad.gob.es/ValueSet/ActividadesUNICAS"
        }
      },
      {
        "id": "Task.input.value[x]",
        "path": "Task.input.value[x]",
        "short": "Tipo de informe/información ÚNICAS",
        "definition": "Content to use in performing the task. The value of the input parameter as a basic type.",
        "binding": {
          "strength": "example",
          "description": "Value set de Tipos de informes para ÚNICAS",
          "valueSet": "https://unicas-fhir.sanidad.gob.es/ValueSet/TiposInformesUNICAS"
        }
      },
      {
        "id": "Task.output",
        "path": "Task.output",
        "short": "Resultado generado como parte de la tarea",
        "definition": "Information produced as part of task. Outputs produced by the Task."
      },
      {
        "id": "Task.output.type",
        "path": "Task.output.type",
        "binding": {
          "strength": "example",
          "description": "Value set de Actividades ÚNICAS",
          "valueSet": "https://unicas-fhir.sanidad.gob.es/ValueSet/ActividadesUNICAS"
        }
      }
    ]
  }
}