{
  "resourceType": "StructureDefinition",
  "url": "https://unicas-fhir.sanidad.gob.es/StructureDefinition/UNICASProcedure",
  "name": "UNICASProcedure",
  "title": "Procedure Procedimiento Quirúrgico ÚNICAS",
  "status": "draft",
  "description": "Este profile define las restricciones del recurso Procedure para representar el registro de un procedimiento quirúrgico en el contexto del caso de uso de ÚNICAS.",
  "fhirVersion": "5.0.0",
  "kind": "resource",
  "abstract": false,
  "type": "Procedure",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Procedure",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Procedure.identifier",
        "path": "Procedure.identifier",
        "short": "Identificador único",
        "definition": "External Identifiers for this procedure. Business identifiers assigned to this procedure by the performer or other systems which remain constant as the resource is updated and is propagated from server to server.",
        "min": 1
      },
      {
        "id": "Procedure.identifier.system",
        "path": "Procedure.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:",
        "min": 1,
        "constraint": [
          {
            "key": "regcess-system",
            "severity": "warning",
            "human": "system debe comenzar por urn:regcess: seguido del identificador del sistema.",
            "expression": "matches('^urn:regcess:[A-Za-z0-9]+$')"
          }
        ]
      },
      {
        "id": "Procedure.identifier.value",
        "path": "Procedure.identifier.value",
        "short": "Identificador interno del sistema para el procedimiento quirúrgico",
        "definition": "Debe indicar el ID interno del sistema de origen utilizado para el procedimiento quirúrgico.",
        "min": 1
      },
      {
        "id": "Procedure.category",
        "path": "Procedure.category",
        "short": "Clasificación de procedimiento: antecedentes quirúrgicos",
        "definition": "Classification of the procedure. A code that classifies the procedure for searching, sorting and display purposes (e.g. \"Surgical Procedure\").",
        "binding": {
          "strength": "extensible",
          "description": "Value set de Tipos de informaciones para ÚNICAS",
          "valueSet": "https://unicas-fhir.sanidad.gob.es/ValueSet/TiposInformacionesUNICAS"
        }
      },
      {
        "id": "Procedure.category.coding.system",
        "path": "Procedure.category.coding.system",
        "short": "URL del SNOMED CT. Extensión para España del SNS",
        "definition": "Posible URL de terminología utilizada para indicar la clasificación de procedimiento y su descripción correspondiente:\r\n\r\n- SNOMED CT. Extensión para España del SNS: http://snomed.info/sct/900000001000122104"
      },
      {
        "id": "Procedure.category.coding.code",
        "path": "Procedure.category.coding.code",
        "short": "Código de la clasificación de procedimiento"
      },
      {
        "id": "Procedure.category.coding.display",
        "path": "Procedure.category.coding.display",
        "short": "Descripción de la clasificación de procedimiento",
        "definition": "Representation defined by the system. A representation of the meaning of the code in the system, following the rules of the system."
      },
      {
        "id": "Procedure.code",
        "path": "Procedure.code",
        "short": "Procedimiento quirúrgico",
        "definition": "Identification of the procedure. The specific procedure that is performed. Use text if the exact nature of the procedure cannot be coded (e.g. \"Laparoscopic Appendectomy\").",
        "min": 1,
        "binding": {
          "strength": "extensible",
          "description": "Value set de Procedimiento quirúrgico",
          "valueSet": "https://unicas-fhir.sanidad.gob.es/ValueSet/ProcedimientoQuirurgico"
        }
      },
      {
        "id": "Procedure.code.coding.system",
        "path": "Procedure.code.coding.system",
        "short": "URL del SNOMED CT. Extensión para España del SNS | OID del CIE-10-ES. Procedimientos",
        "definition": "Posibles URLs y/o OIDs de terminologías utilizadas para indicar el procedimiento quirúrgico y su descripción correspondiente:\r\n\n- SNOMED CT. Extensión para España del SNS con filtro aplicado al eje procedimiento: http://snomed.info/sct/900000001000122104\n- CIE-10-ES. Procedimientos: urn:oid:2.16.724.4.21.5.30",
        "min": 1
      },
      {
        "id": "Procedure.code.coding.code",
        "path": "Procedure.code.coding.code",
        "short": "Código del procedimento",
        "min": 1
      },
      {
        "id": "Procedure.code.coding.display",
        "path": "Procedure.code.coding.display",
        "short": "Descripción del procedimiento",
        "definition": "Representation defined by the system. A representation of the meaning of the code in the system, following the rules of the system.",
        "min": 1
      },
      {
        "id": "Procedure.code.text",
        "path": "Procedure.code.text",
        "short": "Descripción narrativa, registrada por el professional"
      },
      {
        "id": "Procedure.subject",
        "path": "Procedure.subject",
        "short": "Referencia al paciente",
        "definition": "Individual or entity the procedure was performed on. On whom or on what the procedure was performed. This is usually an individual human, but can also be performed on animals, groups of humans or animals, organizations or practitioners (for licensing), locations or devices (for safety inspections or regulatory authorizations).  If the actual focus of the procedure is different from the subject, the focus element specifies the actual focus of the procedure.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://unicas-fhir.sanidad.gob.es/StructureDefinition/UNICASPatient"
            ]
          }
        ]
      },
      {
        "id": "Procedure.subject.reference",
        "path": "Procedure.subject.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": "Procedure.subject.type",
        "path": "Procedure.subject.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).",
        "min": 1
      },
      {
        "id": "Procedure.subject.identifier",
        "path": "Procedure.subject.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.",
        "min": 1
      },
      {
        "id": "Procedure.subject.identifier.type",
        "path": "Procedure.subject.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": "Procedure.subject.identifier.type.coding.system",
        "path": "Procedure.subject.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": "Procedure.subject.identifier.type.coding.code",
        "path": "Procedure.subject.identifier.type.coding.code",
        "short": "Código del identificador"
      },
      {
        "id": "Procedure.subject.identifier.type.coding.display",
        "path": "Procedure.subject.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": "Procedure.subject.identifier.system",
        "path": "Procedure.subject.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": "Procedure.subject.identifier.value",
        "path": "Procedure.subject.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": "Procedure.subject.display",
        "path": "Procedure.subject.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": "Procedure.occurrence[x]",
        "path": "Procedure.occurrence[x]",
        "short": "Fecha de la intervención",
        "definition": "When the procedure occurred or is occurring. Estimated or actual date, date-time, period, or age when the procedure did occur or is occurring.  Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.",
        "min": 1,
        "type": [
          {
            "code": "dateTime"
          }
        ]
      },
      {
        "id": "Procedure.performer",
        "path": "Procedure.performer",
        "short": "Profesional sanitario",
        "definition": "Who performed the procedure and what they did. Indicates who or what performed the procedure and how they were involved."
      },
      {
        "id": "Procedure.performer.actor",
        "path": "Procedure.performer.actor",
        "short": "Referencia al profesional sanitario",
        "definition": "Who performed the procedure. Indicates who or what performed the procedure.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://unicas-fhir.sanidad.gob.es/StructureDefinition/UNICASPractitionerRole",
              "https://unicas-fhir.sanidad.gob.es/StructureDefinition/UNICASPractitioner",
              "https://unicas-fhir.sanidad.gob.es/StructureDefinition/UNICASOrganization"
            ]
          }
        ]
      },
      {
        "id": "Procedure.performer.actor.reference",
        "path": "Procedure.performer.actor.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]/Practitioner?identifier=[OID registro de DNI]|[Número DNI]"
      },
      {
        "id": "Procedure.performer.actor.type",
        "path": "Procedure.performer.actor.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).",
        "min": 1
      },
      {
        "id": "Procedure.performer.actor.identifier",
        "path": "Procedure.performer.actor.identifier",
        "short": "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": "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": 1
      },
      {
        "id": "Procedure.performer.actor.identifier.extension:numeroColegiadoProfesionalSanitario",
        "path": "Procedure.performer.actor.identifier.extension",
        "sliceName": "numeroColegiadoProfesionalSanitario",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://unicas-fhir.sanidad.gob.es/StructureDefinition/NumeroColegiadoProfesionalSanitario"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Procedure.performer.actor.identifier.type",
        "path": "Procedure.performer.actor.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": "Procedure.performer.actor.identifier.type.coding.system",
        "path": "Procedure.performer.actor.identifier.type.coding.system",
        "short": "URL del refset Tipos de documento para identificación personal de 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- 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"
      },
      {
        "id": "Procedure.performer.actor.identifier.type.coding.code",
        "path": "Procedure.performer.actor.identifier.type.coding.code",
        "short": "Código del identificador"
      },
      {
        "id": "Procedure.performer.actor.identifier.type.coding.display",
        "path": "Procedure.performer.actor.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": "Procedure.performer.actor.identifier.system",
        "path": "Procedure.performer.actor.identifier.system",
        "short": "OID registro de DNI",
        "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": "Procedure.performer.actor.identifier.value",
        "path": "Procedure.performer.actor.identifier.value",
        "short": "Número del DNI",
        "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": "Procedure.performer.actor.display",
        "path": "Procedure.performer.actor.display",
        "short": "Nombre completo del profesional sanitario",
        "definition": "Text alternative for the resource. Plain text narrative that identifies the resource in addition to the resource reference."
      }
    ]
  }
}