Package ca.uhn.fhir.narrative2
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 Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
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.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.boolean
bundleHasEntriesWithResourceType
(IBaseBundle theBaseBundle, String theResourceType) Given a Bundle as input, are any entries present with a given resource type
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
NarrativeGeneratorTemplateUtils
public NarrativeGeneratorTemplateUtils()
-
-
Method Details
-
bundleHasEntriesWithResourceType
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 inspecttheResourceType
- the resource type to look fortheCodeSystem
- the code system to findtheCode
- 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 inspecttheResourceType
- the resource type to findtheCodeSystem
- the code system to findtheCode
- the code to find- Returns:
- Returns true if one entry of resource type requested does not contain the specified code/system
-