clinical_quality_language icon indicating copy to clipboard operation
clinical_quality_language copied to clipboard

Unable to read narrative xhtml from a resource

Open adamzkover opened this issue 2 years ago • 2 comments

Running the CQL in the VS Code plugin, the error message is: Could not resolve data provider for package 'org.hl7.fhir.utilities.xhtml'.

Sample repository based on content-ig-walkthrough: https://github.com/felleskatalogen/content-ig-walkthrough/commit/5501e9f07174f29fda1c7a9e07c0b94a5b477e71

adamzkover avatar Apr 26 '23 16:04 adamzkover

Hey @adamzkover what command on which file exactly did you get your error ?

ddieppois avatar Oct 27 '23 14:10 ddieppois

Hi @ddieppois,

In the example repository above there is one Observation that has Narrative, it is in file observation-mom-without-anaemia-hb.json. Reading it is in ANCRecommendationA2.cql with this function:

define function narrativeOfObservation(O FHIR.Observation):
  if O.text is null then
    ''
  else
    O.text.div

The complete output (with some of the directory path removed) from running the CQL file in the VSCode plugin is:

Executing CQL...
CQL path: /Users/.../content-ig-walkthrough-resource-narrative/input/cql
Data path: /Users/.../content-ig-walkthrough-resource-narrative/input/tests/ANCRecommendationA2
Terminology path: /Users/.../content-ig-walkthrough-resource-narrative/input/vocabulary/valueset

Evaluation logs:
11:46:42.643 [pool-2-thread-1] INFO  ca.uhn.fhir.context.FhirContext - Creating new FHIR context for FHIR version [R4]
11:46:42.741 [pool-2-thread-1] WARN  o.o.c.c.e.e.terminology.BundleTerminologyProvider - Codes expanded without a terminology server, some results may not be correct.
11:46:42.741 [pool-2-thread-1] WARN  o.o.c.c.e.e.terminology.BundleTerminologyProvider - Codes expanded without a terminology server, some results may not be correct.
Could not resolve data provider for package 'org.hl7.fhir.utilities.xhtml'.
elapsed: 0.105 seconds

Having O.text in the else branch gives a Narrative, but I did not find a way to get the text or markup from the Narrative.

adamzkover avatar Jan 03 '24 10:01 adamzkover