Support Related Context Retrieves
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- javascript
- Área
- backend
Línea de trabajo
Comience con la ELM Retrieve context property y el FHIR modelinfo RelatedPerson contextRelationship que se muestran en el issue. Siga cómo el motor recibe modelinfo y los datos relacionados; se considera terminado cuando los retrieves contextuales pueden resolver el ID del paciente relacionado y evaluar registros en ese nuevo contexto.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Related Context Retrieves allow CQL queries to cross contexts (for example, into another patient's context). A classic example of this is provided in the CQL documentation (slightly modified below):
library MyLibrary version '0.0.1'
using FHIR version '4.0.1'
include FHIRHelpers version '4.0.1' called FHIRHelpers
codesystem "RoleCode": 'http://terminology.hl7.org/CodeSystem/v3-RoleCode'
valueset "Estimated Due Date Exam": 'TBD'
code "Mother Relationship": 'MTH' from "RoleCode"
context Patient
define "Mother": singleton from ([RelatedPerson: "Mother Relationship"])
define "Estimated Due Date Observations":
["Mother" -> "Observation": "Estimated Due Date Exam"]
In the above CQL, the Observation query should be done in the context of the mother's medical records (not the patient's context).
Most of the magic here is contained in the ELM and the FHIR modelinfo. Here is a snippet of the resulting ELM:
{
"name": "Estimated Due Date Observations",
"context": "Patient",
"accessLevel": "Public",
"expression": {
"dataType": "{http://hl7.org/fhir}Observation",
"templateId": "http://hl7.org/fhir/StructureDefinition/Observation",
"codeProperty": "code",
"codeComparator": "in",
"type": "Retrieve",
"codes": {
"name": "Estimated Due Date Exam",
"preserve": true,
"type": "ValueSetRef"
},
"context": {
"name": "Mother",
"type": "ExpressionRef"
}
}
}
The new property of interest is the context property in the Retrieve, which tells us to look at the Mother expression to get the context. The Mother expression is the standard ELM representation that results in a RelatedPerson:
{
"name": "Mother",
"context": "Patient",
"accessLevel": "Public",
"expression": {
"type": "SingletonFrom",
"operand": {
"dataType": "{http://hl7.org/fhir}RelatedPerson",
"templateId": "http://hl7.org/fhir/StructureDefinition/RelatedPerson",
"codeProperty": "relationship",
"codeComparator": "~",
"type": "Retrieve",
"codes": {
"type": "ToList",
"operand": {
"name": "Mother Relationship",
"type": "CodeRef"
}
}
}
}
}
Unfortunately, the ELM doesn't tell us how to get the mother's patient ID in order to establish a new context. For that, we must look at the RelatedPerson type in the FHIR modelinfo file:
<typeInfo xsi:type="ClassInfo" baseType="FHIR.DomainResource" namespace="FHIR" name="RelatedPerson" identifier="http://hl7.org/fhir/StructureDefinition/RelatedPerson" label="RelatedPerson" retrievable="true" primaryCodePath="relationship">
<!-- bunch of elements removed for brevity -->
<element name="patient" elementType="FHIR.Reference" description="The patient this person is related to" definition="The patient this person is related to."/>
<!-- bunch more elements removed for brevity -->
<contextRelationship context="Patient" relatedKeyElement="patient"/>
<!-- searches removed for brevity -->
</typeInfo>
Note that the contextRelationship indicates that the element of interest is patient -- from which we can get the mother's patient ID to do the necessary contextual retrieve.
Supporting this will be difficult, as it requires:
- That the CQL engine have access to the modelinfo file that was used to generate the ELM.
- That the CQL engine have access to the related data (e.g., of the mother, but without necessarily assuming the other data is a patient that should be individually evaluated).
- Lenguaje dominante
- JavaScript
- Estrellas
- 84
- Forks
- 39
- Merge medio
- 12 h 56 min
- PR fusionados (30 d)
- 2
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de cqframework/cql-execution
-
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
cqframework/cql-execution#398 ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
cqframework/cql-execution#397 ·
-
Offset-less DateTime literals and DateTime(...) drop the fractional part of the execution timezone offsetPosiblemente ocupada @bryantaustin13 la tomó hace 5 días. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 1/100
cqframework/cql-execution#395 ·
-
Issue with using type testing operation on FHIR primitivesPosiblemente ocupada @dehall la tomó hace 8 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 54/100
cqframework/cql-execution#391 · 1 asignado ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
cqframework/cql-execution#390 · 1 comentario ·
Todos los issues de cqframework/cql-execution
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
JimLiu/baoyu-design#23 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 2 días
-
Data Manager offers a one-click purge of the onboard tools registry, labelled "Tool execution data"Abiertodata-safety effort:low model:light plan planner:opus-5-5
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Docs: four cross-page links point at anchors that do not existPosiblemente ocupada @6t9xstar la tomó hoy. Abiertodifficulty:easy documentation good first issue hacktoberfest help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día