Open jack-h-wang opened 5 months ago
Hey team! Please add your planning poker estimate with Zenhub @adegolier @arnejduranovic @brick-green @david-navapbc @jack-h-wang @jalbinson @JFisk42 @mkalish @thetaurean
TODO: The two AC should be split up. Verify we don't already have have a ticket for 2nd AC. For first AC, probably just wait for a more concrete use-case to appear so the ticket is more defined with AC.
Second AC is part of this ticket: https://github.com/CDCgov/prime-reportstream/issues/14117
User Story
As a developer, I want to understand library behavior, so that logical tests function as expected.
Description/Use Case
The HAPI FHIR library implements the
bundle.equalsDeep(x)
andbundle.equalsShallow(x)
methods that test equality of a FHIR bundle against another object. It appears the methods will often return false for bundles that are logically equal, but differ in that bundles created with the same input may have differing UUIDs or creation timestamps. This renders the methods unusable for any practical purpose. We should document why this behavior occurs and determine if changes to the library are needed.Many instances where we compare bundles for equality currently instead use the CompareFhirData class, which is designed to take these differences into account.
We should also consider if the bundle enhancements we add to FHIR bundles in
HL7toFhirTranslator.translate
adjust them in a way that makes these methods unworkable.Risks/Impacts/Considerations
Dev Notes
FhirTransformer.checkForEquality
currently relies on theequalsDeep
method.FhirConverterTests.test getContentFromHL7 alternate profile
documents a use ofequalsDeep
that was expected to be true, but always returns false.equalsShallow
also does not work for this test. It should be noted the bundles in this test receive bundle enhancements.Acceptance Criteria
bundle.equalsDeep(x)
andbundle.equalsShallow(x)
methods are understood and current uses of the methods in code are evaluated.