Interface IIpsGenerationStrategy

All Known Implementing Classes:
DefaultIpsGenerationStrategy

public interface IIpsGenerationStrategy
This interface is the primary configuration and strategy provider for the HAPI FHIR International Patient Summary (IPS) generator.

Note that this API will almost certainly change as more real-world experience is gained with the IPS generator.

  • Method Summary

    Modifier and Type
    Method
    Description
    org.hl7.fhir.instance.model.api.IBaseResource
    Create and return a new Organization resource representing.
    Create and return a confidentiality code for the composition document.
    createTitle(IpsContext theContext)
    Create and return a title for the composition document.
    Provides a list of configuration property files for the IPS narrative generator.
    Provides a registry which defines the various sections that will be included when generating an IPS.
    org.hl7.fhir.instance.model.api.IIdType
    massageResourceId(IpsContext theIpsContext, org.hl7.fhir.instance.model.api.IBaseResource theResource)
    This method is used to determine the resource ID to assign to a resource that will be added to the IPS document Bundle.
    void
    massageResourceSearch(IpsContext.IpsSectionContext theIpsSectionContext, ca.uhn.fhir.jpa.searchparam.SearchParameterMap theSearchParameterMap)
    This method can manipulate the SearchParameterMap that will be used to find candidate resources for the given IPS section.
    Set<ca.uhn.fhir.model.api.Include>
    Return a set of Include directives to be added to the resource search for resources to include for a given IPS section.
    boolean
    shouldInclude(IpsContext.IpsSectionContext theIpsSectionContext, org.hl7.fhir.instance.model.api.IBaseResource theCandidate)
    This method will be called for each found resource candidate for inclusion in the IPS document.
  • Method Details

    • getSectionRegistry

      Provides a registry which defines the various sections that will be included when generating an IPS. It can be subclassed and customized as needed in order to add, change, or remove sections.
    • getNarrativePropertyFiles

      Provides a list of configuration property files for the IPS narrative generator.

      Entries should be of the format classpath:path/to/file.properties

      If more than one file is provided, the files will be evaluated in order. Therefore you might choose to include a custom file, followed by DefaultIpsGenerationStrategy.DEFAULT_IPS_NARRATIVES_PROPERTIES in order to fall back to the default templates for any sections you have not provided an explicit template for.

    • createAuthor

      org.hl7.fhir.instance.model.api.IBaseResource createAuthor()
      Create and return a new Organization resource representing. the author of the IPS document. This method will be called once per IPS in order to
    • createTitle

      Create and return a title for the composition document.
      Parameters:
      theContext - The associated context for the specific IPS document being generated.
    • createConfidentiality

      Create and return a confidentiality code for the composition document. Must be a valid code for the element Composition.confidentiality
      Parameters:
      theIpsContext - The associated context for the specific IPS document being generated.
    • massageResourceId

      org.hl7.fhir.instance.model.api.IIdType massageResourceId(@Nullable IpsContext theIpsContext, @Nonnull org.hl7.fhir.instance.model.api.IBaseResource theResource)
      This method is used to determine the resource ID to assign to a resource that will be added to the IPS document Bundle. Implementations will probably either return the resource ID as-is, or generate a placeholder UUID to replace it with.
      Parameters:
      theIpsContext - The associated context for the specific IPS document being generated. Note that this will be null when massaging the ID of the subject (Patient) resource, but will be populated for all subsequent calls for a given IPS document generation.
      theResource - The resource to massage the resource ID for
      Returns:
      An ID to assign to the resource
    • massageResourceSearch

      void massageResourceSearch(IpsContext.IpsSectionContext theIpsSectionContext, ca.uhn.fhir.jpa.searchparam.SearchParameterMap theSearchParameterMap)
      This method can manipulate the SearchParameterMap that will be used to find candidate resources for the given IPS section. The map will already have a subject/patient parameter added to it. The map provided in theSearchParameterMap will contain a subject/patient reference, but no other parameters. This method can add other parameters.

      For example, for a Vital Signs section, the implementation might add a parameter indicating the parameter category=vital-signs.

      Parameters:
      theIpsSectionContext - The context, which indicates the IPS section and the resource type being searched for.
      theSearchParameterMap - The map to manipulate.
    • provideResourceSearchIncludes

      @Nonnull Set<ca.uhn.fhir.model.api.Include> provideResourceSearchIncludes(IpsContext.IpsSectionContext theIpsSectionContext)
      Return a set of Include directives to be added to the resource search for resources to include for a given IPS section. These include statements will be added to the same SearchParameterMap provided to massageResourceSearch(IpsContext.IpsSectionContext, SearchParameterMap). This is a separate method in order to make subclassing easier.
      Parameters:
      theIpsSectionContext - The context, which indicates the IPS section and the resource type being searched for.
    • shouldInclude

      boolean shouldInclude(IpsContext.IpsSectionContext theIpsSectionContext, org.hl7.fhir.instance.model.api.IBaseResource theCandidate)
      This method will be called for each found resource candidate for inclusion in the IPS document. The strategy can decide whether to include it or not.