Stream: tooling
Topic: Narrative generator
Dietrich Haag (May 12 2021 at 07:21):
Hey there!
I'm struggling to find a good way to generate all the narratives of a given bundle. It looks like the LH7-Validator (validator_cli.jar) should be able to do so with the "-narrative" option, but I always get an Error:
org.hl7.fhir.r5.model.Bundle cannot be cast to org.hl7.fhir.r5.model.DomainResource
My call looks like this:
-version 4.0.1 -recurse -no-extensible-binding-warnings Source.xml -narrative -output Target.narrative.xml
Could someone point me to my mistake here?
Are there any (better?) other approaches one could use to generate all narrative from a bundle?
Thanks for reading so far.
Grahame Grieve (May 12 2021 at 12:34):
It sounds like a bug, I've added it to my list. but I don't know of a better way other than to write java code
Ward Weistra (May 12 2021 at 13:50):
@Alexander Henket Don't you have a nice XSLT narrative generator?
Alexander Henket (May 12 2021 at 13:53):
I do: https://github.com/Nictiz/HL7-mappings/blob/master/ada_2_fhir/fhir/NarrativeGenerator.xsl
Doesn't do all resources/extensions/modifierExtensions. It skips resources it doesn't know and messages for them. I should probably message for unknown modifierExtensions but don't yet
Note the context of this: it is aimed at supporting narrative generation for a known set of resources/profiles. It was born out of inability to find a multi lingual narrative generation: this takes its labels from an externral multi lingual setup.
Supported is STU3 and XML only:
self::f:AllergyIntolerance | self::f:Appointment | self::f:CarePlan | self::f:CareTeam |
self::f:Composition | self::f:Condition | self::f:Consent | self::f:Coverage | self::f:Device | self::f:DeviceRequest |
self::f:DeviceUseStatement | self::f:DiagnosticReport | self::f:DocumentManifest | self::f:DocumentReference |
self::f:Encounter | self::f:EpisodeOfCare | self::f:Flag | self::f:Goal | self::f:Immunization |
self::f:ImmunizationRecommendation | self::f:List | self::f:Location | self::f:Media | self::f:Medication |
self::f:MedicationAdministration | self::f:MedicationDispense | self::f:MedicationRequest |
self::f:MedicationStatement | self::f:NutritionOrder | self::f:Observation |
self::f:Organization | self::f:Patient | self::f:Person | self::f:Practitioner | self::f:PractitionerRole |
self::f:Procedure | self::f:ProcedureRequest | self::f:Questionnaire | self::f:QuestionnaireResponse |
self::f:RelatedPerson | self::f:Slot | self::f:Specimen | self::f:Task
Grahame Grieve (May 14 2021 at 00:38):
fixed next release
Grahame Grieve (May 14 2021 at 00:38):
@Dietrich Haag
Dietrich Haag (May 17 2021 at 09:03):
@Alexander Henket
Thanks for the input. We need R4 here, so it's not applicable for us.
@Grahame Grieve
Thanks for fixing. Will have a look on it now.
Last updated: Apr 12 2022 at 19:14 UTC