
Package ca.uhn.fhir.jpa.dao.index
Interface IJpaIdHelperService
- All Superinterfaces:
ca.uhn.fhir.jpa.api.svc.IIdHelperService
- All Known Implementing Classes:
JpaIdHelperService
This class is an analog to
IIdHelperService
but with additional JPA server methods
added.
JA 2022-02-17 - I moved these methods out of IdHelperService because I want to reuse
IdHelperService in storage-engine-neutral batch tasks such as bulk import. These methods
are all just being used by MDM, so they're JPA specific. I believe it should be possible
though to just replace all of these calls with equivalents from IdHelperService,
at which point this interface and its implementation could just go away.
All of the methods here aren't partition aware, so it's not great to use them
anyhow. The equivalents in IIdHelperService
are probably a bit more
clunky because you have to convert between Long
and
ResourcePersistentId
to use them,
but they also have caching and partition awareness so the tradeoff for that
extra effort is that they are better.-
Method Summary
Modifier and TypeMethodDescriptiongetPidOrNull
(org.hl7.fhir.instance.model.api.IBaseResource theResource) Deprecated.This method doesn't take a partition ID as input, so it is unsafe.getPidOrThrowException
(org.hl7.fhir.instance.model.api.IAnyResource theResource) getPidOrThrowException
(org.hl7.fhir.instance.model.api.IIdType theId) Deprecated.This method doesn't take a partition ID as input, so it is unsafe.getPidsOrThrowException
(List<org.hl7.fhir.instance.model.api.IIdType> theIds) Deprecated.This method doesn't take a partition ID as input, so it is unsafe.org.hl7.fhir.instance.model.api.IIdType
translatePidsToFhirResourceIds
(Set<Long> thePids) Given a set of PIDs, return a set of public FHIR Resource IDs.Methods inherited from interface ca.uhn.fhir.jpa.api.svc.IIdHelperService
addResolvedPidToForcedId, idRequiresForcedId, resolveResourceIdentity, resolveResourcePersistentIds, resolveResourcePersistentIds, resolveResourcePersistentIdsWithCache, resolveResourcePersistentIdsWithCache, translatePidIdToForcedId, translatePidIdToForcedIdWithCache, translatePidsToForcedIds
-
Method Details
-
getPidsOrThrowException
@Deprecated @Nonnull List<Long> getPidsOrThrowException(List<org.hl7.fhir.instance.model.api.IIdType> theIds) Deprecated.This method doesn't take a partition ID as input, so it is unsafe. It should be reworked to include the partition ID before any new use is incorporated -
getPidOrNull
Deprecated.This method doesn't take a partition ID as input, so it is unsafe. It should be reworked to include the partition ID before any new use is incorporated -
getPidOrThrowException
Deprecated.This method doesn't take a partition ID as input, so it is unsafe. It should be reworked to include the partition ID before any new use is incorporated -
getPidOrThrowException
@Nonnull Long getPidOrThrowException(@Nonnull org.hl7.fhir.instance.model.api.IAnyResource theResource) -
resourceIdFromPidOrThrowException
-
translatePidsToFhirResourceIds
Given a set of PIDs, return a set of public FHIR Resource IDs. This function will resolve a forced ID if it resolves, and if it fails to resolve to a forced it, will just return the pid Example: Let's say we have Patient/1(pid == 1), Patient/pat1 (pid == 2), Patient/3 (pid == 3), their pids would resolve as follows:[1,2,3] -> ["1","pat1","3"]
- Parameters:
thePids
- The Set of pids you would like to resolve to external FHIR Resource IDs.- Returns:
- A Set of strings representing the FHIR IDs of the pids.
-