-
Notifications
You must be signed in to change notification settings - Fork 9
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
Update PID 3.4 #1095
Update PID 3.4 #1095
Conversation
} | ||
|
||
try { | ||
Bundle bundle = (Bundle) resource.getUnderlyingResource(); |
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.
This would be the only check that would trigger an exception as the HapiHelper::updatePatientIdentifierValue
does not throw any exceptions. So, I will add the ability to throw exceptions if the bundle is missing the patient resource or the organization/id can't be found.
} | ||
} | ||
|
||
def "handle empty bundle gracefully"() { |
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.
This test will change once exceptions are thrown
noExceptionThrown() | ||
} | ||
|
||
def "should not perform updates if no organizations are present in the 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.
Same with this unit test, it will change once exceptions are thrown
noExceptionThrown() | ||
} | ||
|
||
def "should handle patients without assigners"() { |
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.
Same. It will change once exceptions are thrown
org -> { | ||
boolean matches = | ||
("Organization/" + org.getId()).equals(assigner.getReference()); | ||
LOGGER.logInfo( |
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 tried using LOGGER.logDebug() here but it was not working
Quality Gate passedIssues Measures |
|
||
try { | ||
Bundle bundle = (Bundle) resource.getUnderlyingResource(); | ||
String newValue = args.get("newValue"); |
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.
There should not be a new value for this transformation. This is the description as it's in the spreadsheet: "Strip content from Patient Identifier (PID-3). Remove PID-3.4 and PID-3.5"
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.
the value can be: newValue = " "
* updated. | ||
* @param newValue the new value to which the identifier type code should be set. | ||
*/ | ||
public static void updateOrganizationIdentifierValue(Bundle bundle, String newValue) { |
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 think I will end up moving this logic into the transform method of the transformation class. This will only leave helper methods in the HapiHelper class.
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 will use FHIR path for checking, if it exists, then I will proceed to update the value
Closed as #1069 is working on this. |
Transformation: Update PID 3.4
PR is still work in progress.
Issue
#1024
Checklist