Interface ISectionResourceSupplier

All Known Implementing Classes:

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.

See Also:
  • Method Details

    • fetchResourcesForSection

      @Nullable <T extends org.hl7.fhir.instance.model.api.IBaseResource> List<ISectionResourceSupplier.ResourceEntry> fetchResourcesForSection(IpsContext theIpsContext, IpsSectionContext<T> theSectionContext, 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.
      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 a list of resources to add to the given section, or null.