Closed elsaperelli closed 8 months ago
St.:grey_question: |
Category | Percentage | Covered / Total |
---|---|---|---|
π’ | Statements | 86.37% | 2369/2743 |
π‘ | Branches | 73.68% (+0% πΌ) |
2197/2982 |
π’ | Functions | 88.89% | 424/477 |
π’ | Lines | 86.7% | 2289/2640 |
449 tests passing in 31 suites.
Report generated by π§ͺjest coverage report action from 8f0c58d32c44e523fd912386602e688568051318
patient compartment definition
This all made sense to me until I looked at the compartment definiton for a patient...it looks like Task
is included? It was in the compartmentdefinition-patient.json
in deqm-test-server
, but didn't have any params so it was not added to PatientParameters.ts
. But now I am confused because https://build.fhir.org/compartmentdefinition-patient.json.html shows Task not only included in the definition but it also has two params, "patient" and "focus". This leads me to believe that this PR's fix is actually not correct, and that the correct solution is parsing this seemingly new patient compartment definition? Maybe we can also ask @hossenlopp about this.
patient compartment definition
This all made sense to me until I looked at the compartment definiton for a patient...it looks like
Task
is included? It was in thecompartmentdefinition-patient.json
indeqm-test-server
, but didn't have any params so it was not added toPatientParameters.ts
. But now I am confused because https://build.fhir.org/compartmentdefinition-patient.json.html shows Task not only included in the definition but it also has two params, "patient" and "focus". This leads me to believe that this PR's fix is actually not correct, and that the correct solution is parsing this seemingly new patient compartment definition? Maybe we can also ask @hossenlopp about this.
Update: It seems like Task
was not in the patient compartment definition in R4 (hence why it wasn't in deqm-test-server
or PatientParameters.ts
) but it is in R5...so perhaps an update to the compartment definition and parsing needs to be done.
Looks like our version of the compartment definition in deqm-test-server is from 2019, so it makes sense that recent versions have additional resources. Not sure if we want to take the jump to R5 yet, but I did notice a version from 2022 that we might be able to use to get us up to date? https://hl7.org/fhir/R4B/compartmentdefinition-patient.json.html
Summary
We found an issue when running
dataRequirements
with CMS68. It will error out with the Task resource on CMS68 since the Task resource type is in the compartment definition, but does not have any search parameters so it is not included inPatientParameters.ts
(the file that is a result of running theparseCompartmentDefiniton.js
script in thedeqm-test-server
repo). Now, runningdataRequirements
on this measure no longer errors out.New behavior
Now, we only do a
.forEach
on the indexed content of PatientParameters for a resourceType if that resourceType exists in PatientParameters.Code changes
DataRequirementsHelpers.ts
- skips adding an extension to a data requirement whose resourceType is not inPatientParameters.ts
.Testing guidance
npm run check
npm run test:integration
QUESTION: Should we be adding an extension to dataRequirements whose resourceType is not in
PatientParameters.ts
? I tried looking into the spec forfhirQueryPattern
but wasn't sure...