Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Handle HAPI FHIR's MDM service in HAPI JDBC mode #1216

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LJNIC
Copy link
Contributor

@LJNIC LJNIC commented Oct 15, 2024

Description of what I changed

We use HAPI-FHIR's MDM service to help deduplicate and handle patients (and other resources) from multiple healthcare systems. Essentially, every MDM tracked resource gets a "golden" version, which can have a link to multiple "source" resources. For ease in our own analysis, we've forked this project to add support for MDM (only with the HAPI JDBC mode) in the following ways:

  • Only retrieve the golden version of MDM-configured resources
    • Additionally include the source resources' identifiers in the result (so source patients can be referred to during analysis)
  • For all references to MDM-configured resources, replace their source FHIR id with the golden version's FHIR id

With the default parameters there should be no change to the pipeline. However, I've made an additional change:

  • Changed the JDBC mode to use the FHIR id rather than the database primary key.

This is a breaking change and might require a flag? There are probably other things to clean up and more tests to add, but I am mostly opening this to see if these changes would be welcome.

E2E test

TESTED:
Tests were done with ~150k patients, where roughly half were golden resources.

  • Ran with default parameters and ensured all resources regardless of Golden status were fetched, and that resource mapping was not attempted.
  • Ran with Patient,Location,Practitioner,PractitionerRole,Organization as MDM resources set mapToGoldenResources to true and manually checked some resources to ensure they were all golden, and that their source versions were mapped in other resources.

Checklist: I completed these to help reviewers :)

  • I have read and will follow the review process.

  • I am familiar with Google Style Guides for the language I have coded in.

  • My IDE is configured to follow the Google code styles.

  • I have added tests to cover my changes. (If you refactored existing code that was well tested you do not have to add tests)

  • I ran mvn clean package right before creating this pull request and added all formatting changes to my commit.

  • All new and existing tests passed.

  • My pull request is based on the latest changes of the master branch.

@bashir2
Copy link
Collaborator

bashir2 commented Oct 24, 2024

Thanks @LJNIC for adding this feature and sorry that I have not managed to get to reviewing it yet. If you are available, please feel free to join the OHS dev. call. this week (on Thu. Oct. 24th) to discuss the implications of this change (as you said it needs to be gated by a flag; we should also see how it can be supported in other ingestion modes). If not, I'll try to take a deeper look and provide some feedback here by early next week.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants