Class BulkExportMdmEidMatchOnlyResourceExpander

java.lang.Object
ca.uhn.fhir.jpa.bulk.export.svc.BulkExportMdmEidMatchOnlyResourceExpander
All Implemented Interfaces:
ca.uhn.fhir.mdm.svc.IBulkExportMdmEidMatchOnlyResourceExpander<JpaPid>, ca.uhn.fhir.mdm.svc.IBulkExportMdmResourceExpander<JpaPid>

public class BulkExportMdmEidMatchOnlyResourceExpander extends Object implements ca.uhn.fhir.mdm.svc.IBulkExportMdmEidMatchOnlyResourceExpander<JpaPid>
Implementation of IBulkExportMdmResourceExpander that handles bulk export resource expansion when MDM mode is Match-Only and Eid Systems defined in mdm rules.

This expander is used during bulk export operations to expand Group resources by resolving MDM matching resources for the members in the group. Resources are matched based on just eids rather than the full MDM golden resource relationships.

  • Constructor Details

  • Method Details

    • expandGroup

      public Set<JpaPid> expandGroup(String groupResourceId, RequestPartitionId requestPartitionId)
      Expands a Group resource and returns the Group members' resource persistent ids. The returned ids consists of group members + all MDM matched resources based on EID only.

      This method:

      1. Reads the specified Group resource
      2. Extracts all member entity references from the Group
      3. For each member, uses EID matching to find all resources that have the same EID as the member, using eid system specified in mdm rules
      4. Converts the expanded resource IDs to persistent IDs (PIDs)
      Specified by:
      expandGroup in interface ca.uhn.fhir.mdm.svc.IBulkExportMdmResourceExpander<JpaPid>
      Parameters:
      groupResourceId - The ID of the Group resource to expand
      requestPartitionId - The request partition ID
      Returns:
      A set of JpaPid objects representing all expanded resources
    • expandPatient

      public Set<String> expandPatient(String thePatientId, RequestPartitionId theRequestPartitionId)
      Expands a single patient ID to include all patients linked via EID matching.
      Specified by:
      expandPatient in interface ca.uhn.fhir.mdm.svc.IBulkExportMdmResourceExpander<JpaPid>
      Parameters:
      thePatientId - Patient ID to expand (e.g., "Patient/123")
      theRequestPartitionId - Partition context for the request
      Returns:
      Set of String patient IDs including the original patient and all EID-matched patients
    • annotateResource

      public void annotateResource(org.hl7.fhir.instance.model.api.IBaseResource resource)
      Specified by:
      annotateResource in interface ca.uhn.fhir.mdm.svc.IBulkExportMdmResourceExpander<JpaPid>