Class NarrativeGeneratorTemplateUtils

java.lang.Object
ca.uhn.fhir.narrative2.NarrativeGeneratorTemplateUtils

An instance of this class is added to the Thymeleaf context as a variable with name "narrativeUtil" and can be accessed from narrative templates.
Since:
7.0.0
  • Field Details

  • Constructor Details

  • Method Details

    • bundleHasEntriesWithResourceType

      public boolean bundleHasEntriesWithResourceType(IBaseBundle theBaseBundle, String theResourceType)
      Given a Bundle as input, are any entries present with a given resource type
    • bundleHasEntriesWithCode

      public boolean bundleHasEntriesWithCode(IBaseBundle theBundle, String theResourceType, String theCodeSystem, String theCode)
      Returns if the bundle contains an entry resource whose `code` property contains a matching code system and code.
      Parameters:
      theBundle - the bundle to inspect
      theResourceType - the resource type to look for
      theCodeSystem - the code system to find
      theCode - the code to find
      Returns:
      returns true if bundle has a resource that with matching code/code system
    • bundleHasEntriesWithoutCode

      public boolean bundleHasEntriesWithoutCode(IBaseBundle theBundle, String theResourceType, String theCodeSystem, String theCode)
      Gets a boolean indicating if at least one bundle entry resource's `code` property does NOT contain the code system/code specified.
      Parameters:
      theBundle - the bundle to inspect
      theResourceType - the resource type to find
      theCodeSystem - the code system to find
      theCode - the code to find
      Returns:
      Returns true if one entry of resource type requested does not contain the specified code/system