
Package ca.uhn.fhir.jpa.ips.strategy
Class BaseIpsGenerationStrategy
java.lang.Object
ca.uhn.fhir.jpa.ips.strategy.BaseIpsGenerationStrategy
- All Implemented Interfaces:
IIpsGenerationStrategy
- Direct Known Subclasses:
DefaultJpaIpsGenerationStrategy
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSection(Section theSection, ISectionResourceSupplier theSectionResourceSupplier) This should be called once per section to add a section for inclusion in generated IPS documents.org.hl7.fhir.instance.model.api.IBaseResourceCreate and return a newOrganizationresource representing.createConfidentiality(IpsContext theIpsContext) Create and return a confidentiality code for the composition document.createTitle(IpsContext theContext) Create and return a title for the composition document.This method returns the profile associated with the IPS document generated by this strategy.Provides a list of configuration property files for the IPS narrative generator.getSectionResourceSupplier(Section theSection) Returns the resource supplier for the given section.This method should return a list of the sections to include in the generated IPS.org.hl7.fhir.instance.model.api.IIdTypemassageResourceId(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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ca.uhn.fhir.jpa.ips.api.IIpsGenerationStrategy
fetchPatient, fetchPatient, initialize, postManipulateIpsBundle
-
Field Details
-
DEFAULT_IPS_NARRATIVES_PROPERTIES
- See Also:
-
-
Constructor Details
-
BaseIpsGenerationStrategy
public BaseIpsGenerationStrategy()Constructor
-
-
Method Details
-
getBundleProfile
Description copied from interface:IIpsGenerationStrategyThis method returns the profile associated with the IPS document generated by this strategy. This URL will be added to generated IPS Bundles inBundle.meta.profile, and can also be used to support theprofileparameter on the$summaryoperation.- Specified by:
getBundleProfilein interfaceIIpsGenerationStrategy
-
getSections
Description copied from interface:IIpsGenerationStrategyThis method should return a list of the sections to include in the generated IPS. Note that each section must have a unique value for theSection.getProfile()value.- Specified by:
getSectionsin interfaceIIpsGenerationStrategy
-
getSectionResourceSupplier
Description copied from interface:IIpsGenerationStrategyReturns 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:
getSectionResourceSupplierin interfaceIIpsGenerationStrategy- Parameters:
theSection- The section
-
addSection
This should be called once per section to add a section for inclusion in generated IPS documents. It should include aSectionwhich contains static details about the section, and aISectionResourceSupplierwhich 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:IIpsGenerationStrategyProvides a list of configuration property files for the IPS narrative generator.Entries should be of the format
classpath:path/to/file.propertiesIf 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_PROPERTIESin order to fall back to the default templates for any sections you have not provided an explicit template for.- Specified by:
getNarrativePropertyFilesin interfaceIIpsGenerationStrategy
-
createAuthor
Description copied from interface:IIpsGenerationStrategyCreate and return a newOrganizationresource representing. the author of the IPS document. This method will be called once per IPS in order to- Specified by:
createAuthorin interfaceIIpsGenerationStrategy
-
createTitle
Description copied from interface:IIpsGenerationStrategyCreate and return a title for the composition document.- Specified by:
createTitlein interfaceIIpsGenerationStrategy- Parameters:
theContext- The associated context for the specific IPS document being generated.
-
createConfidentiality
Description copied from interface:IIpsGenerationStrategyCreate and return a confidentiality code for the composition document. Must be a valid code for the elementComposition.confidentiality- Specified by:
createConfidentialityin interfaceIIpsGenerationStrategy- 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:IIpsGenerationStrategyThis 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 returnnullto 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:
massageResourceIdin interfaceIIpsGenerationStrategy- Parameters:
theIpsContext- The associated context for the specific IPS document being generated. Note that this will benullwhen 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
nullto leave the existing ID intact, meaning that the server-assigned IDs will be used in the bundle.
-