Class BaseIpsGenerationStrategy

java.lang.Object
ca.uhn.fhir.jpa.ips.strategy.BaseIpsGenerationStrategy
All Implemented Interfaces:
IIpsGenerationStrategy
Direct Known Subclasses:
DefaultJpaIpsGenerationStrategy

public abstract class BaseIpsGenerationStrategy extends Object implements IIpsGenerationStrategy
  • Field Details

  • Constructor Details

  • Method Details

    • getBundleProfile

      Description copied from interface: IIpsGenerationStrategy
      This method returns the profile associated with the IPS document generated by this strategy. This URL will be added to generated IPS Bundles in Bundle.meta.profile, and can also be used to support the profile parameter on the $summary operation.
      Specified by:
      getBundleProfile in interface IIpsGenerationStrategy
    • getSections

      @Nonnull public final List<Section> getSections()
      Description copied from interface: IIpsGenerationStrategy
      This method should return a list of the sections to include in the generated IPS. Note that each section must have a unique value for the Section.getProfile() value.
      Specified by:
      getSections in interface IIpsGenerationStrategy
    • getSectionResourceSupplier

      @Nonnull public ISectionResourceSupplier getSectionResourceSupplier(@Nonnull Section theSection)
      Description copied from interface: IIpsGenerationStrategy
      Returns the resource supplier for the given section. The resource supplier is used to supply the resources which will be used for a given section.
      Specified by:
      getSectionResourceSupplier in interface IIpsGenerationStrategy
      Parameters:
      theSection - The section
    • addSection

      public void addSection(Section theSection, ISectionResourceSupplier theSectionResourceSupplier)
      This should be called once per section to add a section for inclusion in generated IPS documents. It should include a Section which contains static details about the section, and a ISectionResourceSupplier which is used to fetch resources for inclusion at runtime.
      Parameters:
      theSection - Contains static details about the section, such as the resource types it can contain, and a title.
      theSectionResourceSupplier - The strategy object which will be used to supply content for this section at runtime.
    • getNarrativePropertyFiles

      Description copied from interface: IIpsGenerationStrategy
      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 DEFAULT_IPS_NARRATIVES_PROPERTIES in order to fall back to the default templates for any sections you have not provided an explicit template for.

      Specified by:
      getNarrativePropertyFiles in interface IIpsGenerationStrategy
    • createAuthor

      public org.hl7.fhir.instance.model.api.IBaseResource createAuthor()
      Description copied from interface: IIpsGenerationStrategy
      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
      Specified by:
      createAuthor in interface IIpsGenerationStrategy
    • createTitle

      public String createTitle(IpsContext theContext)
      Description copied from interface: IIpsGenerationStrategy
      Create and return a title for the composition document.
      Specified by:
      createTitle in interface IIpsGenerationStrategy
      Parameters:
      theContext - The associated context for the specific IPS document being generated.
    • createConfidentiality

      public String createConfidentiality(IpsContext theIpsContext)
      Description copied from interface: IIpsGenerationStrategy
      Create and return a confidentiality code for the composition document. Must be a valid code for the element Composition.confidentiality
      Specified by:
      createConfidentiality in interface IIpsGenerationStrategy
      Parameters:
      theIpsContext - The associated context for the specific IPS document being generated.
    • massageResourceId

      public org.hl7.fhir.instance.model.api.IIdType massageResourceId(@Nullable IpsContext theIpsContext, @Nonnull org.hl7.fhir.instance.model.api.IBaseResource theResource)
      Description copied from interface: IIpsGenerationStrategy
      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 null to leave the resource ID as-is, or generate a placeholder UUID to replace it with.

      If you want to replace the native resource ID with a placeholder so as not to leak the server-generated IDs, the recommended way is to return IdType.newRandomUuid()

      Specified by:
      massageResourceId in interface IIpsGenerationStrategy
      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, or null to leave the existing ID intact, meaning that the server-assigned IDs will be used in the bundle.