Package ca.uhn.fhir.jpa.ips.api
Interface ISectionResourceSupplier
- All Known Implementing Classes:
JpaSectionResourceSupplier
public interface ISectionResourceSupplier
This interface is invoked for each section of the IPS, and fetches/returns the
resources which will be included in the IPS document for that section. This
might be by performing a search in a local repository, but could also be
done by calling a remote repository, performing a calculation, making
JDBC database calls directly, etc.
Note that you only need to implement this interface directly if you want to
provide manual logic for gathering and preparing resources to include in
an IPS document. If your resources can be collected by querying a JPS
repository, you can use JpaSectionResourceSupplier
as the implementation of this interface, and
IJpaSectionSearchStrategy
becomes the class
that is used to define your searches.
- Since:
- 7.2.0
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
This enum specifies how an individualresource entry
that is returned byfetchResourcesForSection(IpsContext, IpsSectionContext, RequestDetails)
should be included in the resulting IPS document bundle.static class
This class is the return type forfetchResourcesForSection(IpsContext, IpsSectionContext, RequestDetails)
. -
Method Summary
Modifier and TypeMethodDescription<T extends org.hl7.fhir.instance.model.api.IBaseResource>
List<ISectionResourceSupplier.ResourceEntry> fetchResourcesForSection
(IpsContext theIpsContext, IpsSectionContext<T> theSectionContext, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) This method will be called once for each section context (section and resource type combination), and will be used to supply the resources to include in the given IPS section.
-
Method Details
-
fetchResourcesForSection
@Nullable <T extends org.hl7.fhir.instance.model.api.IBaseResource> List<ISectionResourceSupplier.ResourceEntry> fetchResourcesForSection(IpsContext theIpsContext, IpsSectionContext<T> theSectionContext, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) This method will be called once for each section context (section and resource type combination), and will be used to supply the resources to include in the given IPS section. This method can be used if you wish to fetch resources for a given section from a source other than the repository. This could mean fetching resources using a FHIR REST client to an external server, or could even mean fetching data directly from a database using JDBC or similar.- Parameters:
theIpsContext
- The IPS context, containing the identity of the patient whose IPS is being generated.theSectionContext
- The section context, containing the section name and resource type.theRequestDetails
- The RequestDetails object associated with the HTTP request associated with this generation.- Returns:
- Returns a list of resources to add to the given section, or
null
.
-