Closed sarahmcdougall closed 1 year ago
St.:grey_question: |
Category | Percentage | Covered / Total |
---|---|---|---|
🟢 | Statements | 85.4% (+0.01% 🔼) |
2024/2370 |
🟡 | Branches | 73.97% | 1802/2436 |
🟢 | Functions | 87.5% | 357/408 |
🟢 | Lines | 85.7% (+0.01% 🔼) |
1953/2279 |
380 tests passing in 29 suites.
Report generated by 🧪jest coverage report action from 5e087d6322be13b3f331d22437005aec43742612
Can you add a test with 2 items in the reasonCode array, one with just a coding, and the other with a coding and the extension (with reference and path), for example
"reasonCode": [
{
"coding": [
{
"code": "Present",
"system": "http://hl7.org/fhir/us/davinci-deqm/CodeSystem/care-gap-reason",
"display": "Data Element is Present"
}
]
},
{
"coding": [
{
"code": "ValueInRange",
"system": "http://hl7.org/fhir/us/davinci-deqm/CodeSystem/care-gap-reason",
"display": "Value is within specified range"
}
],
"extension": [
{
"extension": [
{
"url": "reference",
"valueReference": {
"reference": "Patient/cfsb1681933662110"
}
},
{
"url": "path",
"valueString": "generalPractitioner"
}
],
"url": "http://hl7.org/fhir/us/davinci-deqm/StructureDefinition/reasonDetail"
}
]
}
]
Can you add a test with 2 items in the reasonCode array, one with just a coding, and the other with a coding and the extension (with reference and path), for example
Good suggestion, I added a test in https://github.com/projecttacoma/fqm-execution/pull/226/commits/5e087d6322be13b3f331d22437005aec43742612 to address this scenario
Summary
For care gaps, updates the
GuidanceResponse.reasonCode
to have thereasonDetail
extension on thereasonCode
itself rather than on thecoding
.New behavior
When running care gaps, the structure of the generated
GuidanceResponse
resources will be different if the reason contains a reference. Previously, the output would look like the following:The expected output should now have the following format:
See the
GuidanceResponse
attachment in this Jira issue to get an understanding of the updated structure. NOTE: it appears that there are several ways of attaching the extension (might be possible to attach it to thereasonCode.coding
as well as including it on the root ofreasonCode
). For now, we will use this approach, but the extension may change in the future.See the resource profile for Detailed Care Gap Guidance Response for more detail.
Code changes
src/gaps/GapsReportBuilder
—> Change thegenerateReasonCoding
function to now be namedgenerateReasonCode
. Now generates thereasonCode
rather than just thecoding
(which would then be added to thereasonCode
outside the function). UpdategenerateGuidanceResponse
function according to this change.test/unit/GapsInCareHelpers.test.ts
—> Updates unit test fixtures to have the extension defined on thereasonCode
elements rather than on thereasonCode
’scoding
’s. Also updates the function name fromgenerateReasonCoding
togenerateReasonCode
.Testing guidance
GuidanceResponse
structure against the output received from the main branch. The only difference should be the placement of thereasonDetail
extension (if present).