CDCgov / prime-reportstream

ReportStream is a public intermediary tool for delivery of data between different parts of the healthcare ecosystem.
https://reportstream.cdc.gov
Creative Commons Zero v1.0 Universal
70 stars 39 forks source link

Investigate FHIR bundle equality methods and bundle enhancements #14072

Open jack-h-wang opened 5 months ago

jack-h-wang commented 5 months ago

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) and bundle.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

Acceptance Criteria

Andrey-Glazkv commented 3 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

arnejduranovic commented 1 month ago

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.

arnejduranovic commented 1 month ago

Second AC is part of this ticket: https://github.com/CDCgov/prime-reportstream/issues/14117