Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contained Observations with more than one note will crash the publisher #915

Open
JohnMoehrke opened this issue Jun 26, 2024 · 1 comment
Labels
Approved Change has been reviewed and accepted and can now be applied to the templates bug Something isn't working

Comments

@JohnMoehrke
Copy link
Contributor

I had reported this in chat.
https://chat.fhir.org/#narrow/stream/179252-IG-creation/topic/IG.20publisher.201.2E6.2E11.20crash

When an Observation is contained (e.g. DiagnosticReport containing the Observation)
And when the Observation has more than one .note (e.g. note.text)
Then the IG publisher will crash

Note multiple notes does not crash the publisher when they are not contained.

Generating Narratives                                                                                (00:00.003 / 00:52.650, 521Mb)
gen narratives                                                                                       (00:00.003 / 00:52.653, 521Mb)
narrative for C:\Users\john.moehrke\git\testMed\fsh-generated\resources\ImplementationGuide-johnmoehrke.testmed.example : johnmoehrke.testmed.example (00:00.002 / 00:52.656, 521Mb)
narrative for C:\Users\john.moehrke\git\testMed\fsh-generated\resources\DiagnosticReport-ex-labReport-2 : ex-labReport-2 (00:00.105 / 00:52.761, 527Mb)
Exception in thread "main" java.lang.Error: Access single value, but value count is 2
        at org.hl7.fhir.r5.renderers.utils.ElementWrappers$PropertyWrapperMetaElement.value(ElementWrappers.java:382)
        at org.hl7.fhir.r5.renderers.DiagnosticReportRenderer.addObservationToTable(DiagnosticReportRenderer.java:464)
        at org.hl7.fhir.r5.renderers.DiagnosticReportRenderer.addObservationToTable(DiagnosticReportRenderer.java:346)
        at org.hl7.fhir.r5.renderers.DiagnosticReportRenderer.buildObservationsTable(DiagnosticReportRenderer.java:239)
        at org.hl7.fhir.r5.renderers.DiagnosticReportRenderer.render(DiagnosticReportRenderer.java:123)
        at org.hl7.fhir.r5.renderers.ResourceRenderer.render(ResourceRenderer.java:121)
        at org.hl7.fhir.igtools.publisher.Publisher.generateNarratives(Publisher.java:2166)
        at org.hl7.fhir.igtools.publisher.Publisher.loadConformance(Publisher.java:5552)
        at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:1188)
        at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:1027)
        at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:12946)
Press any key to continue . . .
@JohnMoehrke
Copy link
Contributor Author

can be reproduced with testMed IG
https://github.com/JohnMoehrke/testMed

The following instance is found in that github, with the second .note commented out to allow the build to succeed.

Instance: ex-labTest-3
InstanceOf: Observation
Usage: #inline

  • status = #final
  • category[+] = http://terminology.hl7.org/CodeSystem/observation-category#laboratory
  • code.text = "Parasitology Remark(s)"
  • valueString = "MODERATE WBC'S SEEN"
  • effectiveDateTime = 1995-08-03T14:49:00Z
  • performer = Reference(Organization/in-Organization)
  • subject = Reference(Patient/ex-patient)
  • note[+].text = "Hello"
    //* note[+].text = "world"
    // Two notes here will crash the publisher

@lmckenzi lmckenzi added bug Something isn't working Approved Change has been reviewed and accepted and can now be applied to the templates labels Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved Change has been reviewed and accepted and can now be applied to the templates bug Something isn't working
Projects
Development

No branches or pull requests

2 participants