Package org.hl7.fhir.r4.utils
Class NarrativeGenerator
java.lang.Object
org.hl7.fhir.r4.utils.NarrativeGenerator
- All Implemented Interfaces:
INarrativeGenerator
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
static interface
static interface
static interface
class
static class
static class
class
class
class
-
Constructor Summary
ConstructorDescriptionNarrativeGenerator
(String prefix, String basePath, IWorkerContext context) NarrativeGenerator
(String prefix, String basePath, IWorkerContext context, NarrativeGenerator.IReferenceResolver resolver) -
Method Summary
Modifier and TypeMethodDescriptionstatic String
describeSystem
(String system) static String
displayContactPoint
(ContactPoint contact) static String
displayHumanName
(HumanName name) static String
gen
(CodeableConcept code) generate
(Element er, boolean showCodeDetails, NarrativeGenerator.ITypeParser parser) boolean
boolean
generate
(DomainResource r, Set<String> outputTracker) generate
(NarrativeGenerator.ResourceContext rcontext, Element er, boolean showCodeDetails, NarrativeGenerator.ITypeParser parser) boolean
generate
(NarrativeGenerator.ResourceContext rcontext, CapabilityStatement conf) boolean
generate
(NarrativeGenerator.ResourceContext rcontext, CodeSystem cs, boolean header, String lang) This generate is optimised for the FHIR build process itself in as much as it generates hyperlinks in the narrative that are only going to be correct for the purposes of the build.boolean
generate
(NarrativeGenerator.ResourceContext rcontext, CompartmentDefinition cpd) boolean
generate
(NarrativeGenerator.ResourceContext rcontext, ConceptMap cm) boolean
generate
(NarrativeGenerator.ResourceContext rcontext, DomainResource r, Set<String> outputTracker) boolean
generate
(NarrativeGenerator.ResourceContext rcontext, ImplementationGuide ig) boolean
generate
(NarrativeGenerator.ResourceContext rcontext, OperationDefinition opd) boolean
generate
(NarrativeGenerator.ResourceContext rcontext, OperationOutcome op) This generate is optimised for the build tool in that it tracks the source extension.boolean
generate
(NarrativeGenerator.ResourceContext rcontext, StructureDefinition sd, Set<String> outputTracker) boolean
generate
(NarrativeGenerator.ResourceContext rcontext, ValueSet vs, boolean header) This generate is optimised for the FHIR build process itself in as much as it generates hyperlinks in the narrative that are only going to be correct for the purposes of the build.void
generate
(NarrativeGenerator.ResourceContext rcontext, ValueSet vs, ValueSet src, boolean header) generate
(NarrativeGenerator.ResourceContext rcontext, Element doc) org.hl7.fhir.utilities.xhtml.XhtmlNode
generateDiagnosticReport
(org.hl7.fhir.r4.utils.NarrativeGenerator.ResourceWrapper dr) org.hl7.fhir.utilities.xhtml.XhtmlNode
int
getNarrative
(Element er) getPkp()
org.hl7.fhir.utilities.TerminologyServiceOptions
boolean
boolean
isPretty()
org.hl7.fhir.utilities.xhtml.XhtmlNode
renderBundle
(Element element) org.hl7.fhir.utilities.xhtml.XhtmlNode
void
renderCSDetailsLink
(org.hl7.fhir.utilities.xhtml.XhtmlNode tr, String url) void
setCanonicalUrlsAsLinks
(boolean canonicalUrlsAsLinks) void
setCorePath
(String corePath) void
setDefinitionsTarget
(String definitionsTarget) void
setDestDir
(String destDir) setHeaderLevelContext
(int headerLevelContext) setLiquidServices
(NarrativeGenerator.ILiquidTemplateProvider templateProvider, FHIRPathEngine.IEvaluationContext services) setPretty
(boolean pretty) setSnomedEdition
(String snomedEdition) void
setTerminologyServiceOptions
(org.hl7.fhir.utilities.TerminologyServiceOptions terminologyServiceOptions) setTooCostlyNoteEmpty
(String tooCostlyNoteEmpty) setTooCostlyNoteNotEmpty
(String tooCostlyNoteNotEmpty)
-
Constructor Details
-
NarrativeGenerator
-
NarrativeGenerator
public NarrativeGenerator(String prefix, String basePath, IWorkerContext context, NarrativeGenerator.IReferenceResolver resolver)
-
-
Method Details
-
generate
public boolean generate(Bundle b, boolean evenIfAlreadyHasNarrative, Set<String> outputTracker) throws EOperationOutcome, org.hl7.fhir.exceptions.FHIRException, IOException - Throws:
EOperationOutcome
org.hl7.fhir.exceptions.FHIRException
IOException
-
generate
public boolean generate(DomainResource r, Set<String> outputTracker) throws EOperationOutcome, org.hl7.fhir.exceptions.FHIRException, IOException - Throws:
EOperationOutcome
org.hl7.fhir.exceptions.FHIRException
IOException
-
generate
public boolean generate(NarrativeGenerator.ResourceContext rcontext, DomainResource r, Set<String> outputTracker) throws EOperationOutcome, org.hl7.fhir.exceptions.FHIRException, IOException - Throws:
EOperationOutcome
org.hl7.fhir.exceptions.FHIRException
IOException
-
setLiquidServices
public NarrativeGenerator setLiquidServices(NarrativeGenerator.ILiquidTemplateProvider templateProvider, FHIRPathEngine.IEvaluationContext services) -
parseType
public Base parseType(String xml, String type) throws IOException, org.hl7.fhir.exceptions.FHIRException - Throws:
IOException
org.hl7.fhir.exceptions.FHIRException
-
getRenderingMaps
-
getHeaderLevelContext
-
setHeaderLevelContext
-
getTooCostlyNoteEmpty
-
setTooCostlyNoteEmpty
-
getTooCostlyNoteNotEmpty
-
setTooCostlyNoteNotEmpty
-
generate
- Throws:
IOException
org.hl7.fhir.exceptions.FHIRException
-
generate
public String generate(NarrativeGenerator.ResourceContext rcontext, Element doc) throws IOException, org.hl7.fhir.exceptions.FHIRException - Throws:
IOException
org.hl7.fhir.exceptions.FHIRException
-
generate
public String generate(Element er, boolean showCodeDetails, NarrativeGenerator.ITypeParser parser) throws IOException, org.hl7.fhir.exceptions.FHIRException - Throws:
IOException
org.hl7.fhir.exceptions.FHIRException
-
generate
public String generate(NarrativeGenerator.ResourceContext rcontext, Element er, boolean showCodeDetails, NarrativeGenerator.ITypeParser parser) throws IOException, org.hl7.fhir.exceptions.FHIRException - Throws:
IOException
org.hl7.fhir.exceptions.FHIRException
-
displayPeriod
-
describeSystem
-
displayCodeableConcept
-
displayRange
-
displayHumanName
-
displayContactPoint
-
generate
public boolean generate(NarrativeGenerator.ResourceContext rcontext, ConceptMap cm) throws org.hl7.fhir.exceptions.FHIRFormatError, org.hl7.fhir.exceptions.DefinitionException, IOException - Throws:
org.hl7.fhir.exceptions.FHIRFormatError
org.hl7.fhir.exceptions.DefinitionException
IOException
-
renderCSDetailsLink
-
getNarrative
-
generate
public boolean generate(NarrativeGenerator.ResourceContext rcontext, CodeSystem cs, boolean header, String lang) throws org.hl7.fhir.exceptions.FHIRFormatError, org.hl7.fhir.exceptions.DefinitionException, IOException This generate is optimised for the FHIR build process itself in as much as it generates hyperlinks in the narrative that are only going to be correct for the purposes of the build. This is to be reviewed in the future.- Parameters:
vs
-codeSystems
-- Throws:
IOException
org.hl7.fhir.exceptions.DefinitionException
org.hl7.fhir.exceptions.FHIRFormatError
Exception
-
generate
public boolean generate(NarrativeGenerator.ResourceContext rcontext, ValueSet vs, boolean header) throws org.hl7.fhir.exceptions.FHIRException, IOException This generate is optimised for the FHIR build process itself in as much as it generates hyperlinks in the narrative that are only going to be correct for the purposes of the build. This is to be reviewed in the future.- Parameters:
vs
-codeSystems
-- Throws:
org.hl7.fhir.exceptions.FHIRException
IOException
Exception
-
generate
public void generate(NarrativeGenerator.ResourceContext rcontext, ValueSet vs, ValueSet src, boolean header) throws org.hl7.fhir.exceptions.FHIRException, IOException - Throws:
org.hl7.fhir.exceptions.FHIRException
IOException
-
sctLink
-
generate
public boolean generate(NarrativeGenerator.ResourceContext rcontext, OperationOutcome op) throws org.hl7.fhir.exceptions.DefinitionException This generate is optimised for the build tool in that it tracks the source extension. But it can be used for any other use.- Parameters:
vs
-codeSystems
-- Throws:
org.hl7.fhir.exceptions.DefinitionException
Exception
-
genType
- Throws:
org.hl7.fhir.exceptions.DefinitionException
-
gen
-
gen
-
generate
public boolean generate(NarrativeGenerator.ResourceContext rcontext, StructureDefinition sd, Set<String> outputTracker) throws EOperationOutcome, org.hl7.fhir.exceptions.FHIRException, IOException - Throws:
EOperationOutcome
org.hl7.fhir.exceptions.FHIRException
IOException
-
generate
public boolean generate(NarrativeGenerator.ResourceContext rcontext, ImplementationGuide ig) throws EOperationOutcome, org.hl7.fhir.exceptions.FHIRException, IOException - Throws:
EOperationOutcome
org.hl7.fhir.exceptions.FHIRException
IOException
-
generate
public boolean generate(NarrativeGenerator.ResourceContext rcontext, OperationDefinition opd) throws EOperationOutcome, org.hl7.fhir.exceptions.FHIRException, IOException - Throws:
EOperationOutcome
org.hl7.fhir.exceptions.FHIRException
IOException
-
generate
-
generate
public boolean generate(NarrativeGenerator.ResourceContext rcontext, CapabilityStatement conf) throws org.hl7.fhir.exceptions.FHIRFormatError, org.hl7.fhir.exceptions.DefinitionException, IOException - Throws:
org.hl7.fhir.exceptions.FHIRFormatError
org.hl7.fhir.exceptions.DefinitionException
IOException
-
generateDocumentNarrative
-
generateDiagnosticReport
public org.hl7.fhir.utilities.xhtml.XhtmlNode generateDiagnosticReport(org.hl7.fhir.r4.utils.NarrativeGenerator.ResourceWrapper dr) -
renderBundle
public org.hl7.fhir.utilities.xhtml.XhtmlNode renderBundle(Bundle b) throws org.hl7.fhir.exceptions.FHIRException - Throws:
org.hl7.fhir.exceptions.FHIRException
-
renderBundle
public org.hl7.fhir.utilities.xhtml.XhtmlNode renderBundle(Element element) throws org.hl7.fhir.exceptions.FHIRException - Throws:
org.hl7.fhir.exceptions.FHIRException
-
getDefinitionsTarget
-
setDefinitionsTarget
-
getCorePath
-
setCorePath
-
getDestDir
-
setDestDir
-
getPkp
-
setPkp
-
isPretty
-
setPretty
-
isCanonicalUrlsAsLinks
-
setCanonicalUrlsAsLinks
- Specified by:
setCanonicalUrlsAsLinks
in interfaceINarrativeGenerator
-
getSnomedEdition
-
setSnomedEdition
-
getTerminologyServiceOptions
-
setTerminologyServiceOptions
public void setTerminologyServiceOptions(org.hl7.fhir.utilities.TerminologyServiceOptions terminologyServiceOptions)
-