Support Related Context Retrieves
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript
- Lĩnh vực
- backend
Hướng nghiên cứu
Bắt đầu với ELM Retrieve context property và FHIR modelinfo RelatedPerson contextRelationship được thể hiện trong issue. Theo dõi cách engine nhận modelinfo và dữ liệu liên quan; hoàn thành khi các contextual retrieves có thể phân giải ID của bệnh nhân liên quan và đánh giá các bản ghi trong context mới đó.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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).
- Ngôn ngữ chính
- JavaScript
- Star
- 84
- Fork
- 41
- Merge trung bình
- 12 giờ 56 phút
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của cqframework/cql-execution
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
cqframework/cql-execution#398 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
cqframework/cql-execution#397 ·
-
Offset-less DateTime literals and DateTime(...) drop the fractional part of the execution timezone offsetCó thể đã có người làm @bryantaustin13 đã nhận 5 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 1/100
cqframework/cql-execution#395 ·
-
Issue with using type testing operation on FHIR primitivesCó thể đã có người làm @dehall đã nhận 8 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 54/100
cqframework/cql-execution#391 · 1 người được giao ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
cqframework/cql-execution#390 · 1 bình luận ·
Tất cả issue của cqframework/cql-execution
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
jellyfin/jellyfin-desktop#1290 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
zilliztech/memsearch#832 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
sindresorhus/serialize-error#120 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
sindresorhus/slugify#83 ·