-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Eliminate warnings for missing fields #1656
Conversation
…meter refactor, fix logic for existence of practitioner
Co-Authored-By: Joel Biskie <84460447+jbiskie@users.noreply.github.com> Co-Authored-By: Jeremy Rosenfeld <10262289+JeremyIR@users.noreply.github.com>
Co-authored-by: tjohnson@flexion.us Co-authored-by: jrosenfeld@flexion.us
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
...iary/etor/ruleengine/transformation/custom/CopyOrcOrderProviderToObrOrderProviderTest.groovy
Outdated
Show resolved
Hide resolved
shared/src/main/java/gov/hhs/cdc/trustedintermediary/external/hapi/HapiHelper.java
Outdated
Show resolved
Hide resolved
PR Code Suggestions ✨Explore these optional code suggestions:
|
… check in getObr16ExtensionPractitioner
Co-authored-by: tjohnson7021 Co-authored-by: jeremyir
...termediary/etor/ruleengine/transformation/custom/CopyOrcOrderProviderToObrOrderProvider.java
Show resolved
Hide resolved
HapiHelper.setPID3_4Value(bundle, ""); // remove PID.3-4 | ||
HapiHelper.setPID3_5Value(bundle, ""); // remove PID.3-5 | ||
|
||
Identifier patientIdentifier = HapiHelper.getPID3Identifier(bundle); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can lines 20 to 24 be extracted to HapiHelper.setPID3_4Value
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactored.
// Need to set the value for extension to empty instead of removing the extension, | ||
// otherwise RS will set its own value in its place | ||
HapiHelper.setPID5_7ExtensionValue(bundle, null); | ||
HapiHelper.removePID5_7Value(bundle); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just want to confirm that RS is not adding a value in PID-5.7
if we completely remove it instead of setting it to null
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct. We noted the same behavior as the old comments indicated initially. We also need to null patient name use
so ReportStream doesn't do a secondary mapping. I went ahead and added a link in the PR description to some comments in the task.
@@ -235,18 +237,18 @@ class CopyOrcOrderProviderToObrOrderProviderTest extends Specification{ | |||
assert codingSystem == null || codingSystem[0]?.code == expectedIdentifierTypeCode | |||
} | |||
|
|||
Extension getObr16Extension(serviceRequest) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be useful to have getObr16Extension
and some of the functions in this test in HapiHelper
to be reused?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactored the OBR-16 and ORC-12 methods into HapiHelper
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
…scriptes/README.md
- This is based on if you're running TI in docker vs gradle
… can default to leaving it as a config change per user environment Co-authored-by: Sylvie <sschuresko@flexion.us> Co-authored-by: GilmoreA6 <james.gilmore@agile6.com> Co-authored-by: pluckyswan <96704946+pluckyswan@users.noreply.github.com>
- template update to rename variables - README update to reference where local set up of RS and TI are - update local variables to be lower case
* comment to start branch * getFieldsAnnotatedWithInstance helper method * todo comment deleted * injectIntoField overloaded method * injectIntoNonSingleton * access modifier protected to public * revert access modifier change * changes: added logger to HapiFhirResource in order to test a non-singleton class created HapiFhirResourceTest in order to test the changes to HapiFhirResource * Added implementors unit test to ApplicationContextTest * Minor refactoring on some AppContext injection methods * Make the skip flag on TestApplicationContext switchable from the test classes * Update ApplicationContext.java Remove unreachable if statement * Update TestApplicationContext.groovy Add additional line in coverage * Update TestApplicationContext.groovy Remove parameter from injectRegisteredImplementations * added unit tests to cover new code * Update ApplicationContextTest.groovy Added test case for unsupported injection classes * Update ApplicationContext.java Print an error message if the class implementation is not found * use return instead of System.err * refactoring - dry * thown(NullPointerException) -> noExceptionThrown() * added comments to indicate changes that will be deleted * deleted commented out code * reinstated comments for test case * deleted test changes: in HapiFhirResource and deleted file HapifhirResourceTest.groovy --------- Co-authored-by: Luis Pabon <turkeyfried@gmail.com> Co-authored-by: Luis Pabon <luis.pabon@agile6.com>
…lue, refactor PID-3.4 testing into discrete unit tests
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
c996bb6
to
cc2b9d6
Compare
Quality Gate passedIssues Measures |
Closing this PR in favor of #1664 due to unsigned commits in the branch. |
Description
This PR updates and/or removes unnecessary fields in our FHIR mappings that were causing warnings when sending messages.
Issue
#940
When an extension contains a URL but no value of any type, the message "Resource is missing required element: value" is printed in the log.
There were 3 "value-less" extensions remaining that were producing these warnings.
CX-5
(PID-3.5
in the v2 message) - transform:RemovePatientIdentifiers
XPN-7
(PID-5.7
in the v2 message) - transform:RemovePatientNameTypeCode
OBR-16
(occurs only whenORC-12
is blank - transform:CopyOrcOrderProviderToObrOrderProvider
This PR ensures that the "value-less" extensions do not get added during the TI transforms and does some additional cleanup of the transform output to ensure that the values being cleared by the transforms no longer exist in other places in the affected resource.
See the Areas of Concern comment in the issue for more details.
Testing instructions
ORC-12
andOBR-16
through RS and TI end to end (such as CA examples 7, 19, or 20). Review the transformed fhir and final HL7.CX.5
,XPN.7
, andOBR.16
)Checklist