Support Related Context Retrieves
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- javascript
- Ambito
- backend
Direzione di ricerca
Inizia con la ELM Retrieve context property e il FHIR modelinfo RelatedPerson contextRelationship mostrati nell’issue. Segui il modo in cui il motore riceve modelinfo e i dati correlati; il lavoro è completato quando i retrieves contestuali possono risolvere l’ID del paziente correlato e valutare i record nel nuovo contesto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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).
- Lingua principale
- JavaScript
- Stelle
- 84
- Fork
- 39
- Merge medio
- 16h 23m
- PR unite (30g)
- 3
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di cqframework/cql-execution
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
cqframework/cql-execution#397 ·
I maintainer di solito rispondono entro 1 giorno
-
Offset-less DateTime literals and DateTime(...) drop the fractional part of the execution timezone offsetForse già presa @bryantaustin13 l’ha presa 2 giorni fa. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 1/100
cqframework/cql-execution#395 ·
I maintainer di solito rispondono entro 1 giorno
-
Issue with using type testing operation on FHIR primitivesForse già presa @dehall l’ha presa 5 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 54/100
cqframework/cql-execution#391 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
cqframework/cql-execution#390 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Modulo is not implemented for Quantity arguments (always returns null)Forse già presa @pradeeppeddineni l’ha presa 3 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
cqframework/cql-execution#386 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di cqframework/cql-execution
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Graphify-Labs/graphify#4860 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
CommandCodeAI/command-code#1088 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
CanadaHonk/porffor#426 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
RIT-Software-Engineering/RIT-SE-Senior-Project#546 ·
I maintainer di solito rispondono entro 1 giorno