Stream: IG creation
Topic: Communication.payload.content[x]: string issue
Sarah Gaunt (Jan 23 2020 at 06:23):
I'm having a problem with a Communication inside a Bundle. When the exact same Communication is standalone, I get no errors, but when it's contained inside the Bundle I get the following:
Exception in thread "main" java.lang.Error: Not the right type for Communication.payload.content[x]: string at org.hl7.fhir.r5.model.Communication$CommunicationPayloadComponent.setContent(Communication.java:163) at org.hl7.fhir.convertors.conv40_50.Communication.convertCommunicationPayloadComponent(Communication.java:235) at org.hl7.fhir.convertors.conv40_50.Communication.convertCommunication(Communication.java:111) at org.hl7.fhir.convertors.VersionConvertor_40_50.convertResource(VersionConvertor_40_50.java:3327) at org.hl7.fhir.convertors.conv40_50.Bundle.convertBundleEntryComponent(Bundle.java:175) at org.hl7.fhir.convertors.conv40_50.Bundle.convertBundle(Bundle.java:79) at org.hl7.fhir.convertors.VersionConvertor_40_50.convertResource(VersionConvertor_40_50.java:3305) at org.hl7.fhir.igtools.publisher.Publisher.convertFromElement(Publisher.java:4487) at org.hl7.fhir.igtools.publisher.Publisher.load(Publisher.java:3793) at org.hl7.fhir.igtools.publisher.Publisher.loadConformance(Publisher.java:3310) at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:776) at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:663) at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:6893)
If I delete the <contentString> element, it builds.
It's valid to have Communication.payload.content as a string - the profile restricts content to string ( https://github.com/HL7/case-reporting/blob/master/source/resources/structuredefinition/rr-communication.xml).
The xml in the Bundle.Communication is:
<payload id="reportability-response-summary"> <contentString value="Your organization electronically submitted an initial case report to determine if reporting to public health is needed for a patient. 'Zika virus disease (disorder)' is reportable to 'State Department of Health'. An initial case report was sent to 'State Department of Health'. Additional information may be required for this report." /> </payload>
I've tried replacing the long string with "TEST" to see if there were maybe weird characters in there, but that also crashed.
So strange that it works fine in the standalone Communication but not in the Bundle. Cannot figure out what I'm doing wrong...
Sarah Gaunt (Jan 23 2020 at 06:29):
Hmmmm... I just had a thought and checked the R5 version of Communication - it does NOT have string as an option.
@Grahame Grieve - any ideas here? Seems that when the Communication is inside a Bundle it's being checked as if it were an R5 resource.
(This is an R4 IG).
Grahame Grieve (Jan 24 2020 at 05:27):
I think that this will be fixed next release
Sarah Gaunt (Jan 24 2020 at 05:32):
Ok thanks... Any eta on next release?
Grahame Grieve (Jan 24 2020 at 05:37):
maybe very early tomorrow morning?
Sarah Gaunt (Jan 24 2020 at 05:41):
Ok sounds great, thanks.
Grahame Grieve (Jan 24 2020 at 05:55):
maybe tonight...
Sarah Gaunt (Jan 24 2020 at 06:32):
Ok, will keep an eye out to test...
Sarah Gaunt (Jan 24 2020 at 23:21):
Thanks @Grahame Grieve - it's not crashing anymore...
Sarah Gaunt (Jan 25 2020 at 00:28):
@Grahame Grieve not sure what to do - I'm ready to just remove this Bundle example from the IG because I keep running into problems with it. There isn't a specific profile in the IG for this bundle, so it's not like I'd get a warning or anything. The issue is that I'd really like to be able to have a nice example for implementers.
I'm geting a bunch of slicing errors now on a Document Bundle in this collection Bundle - but no errors on either the standalone Compositition or standalone Document Bundle (the one in the Bundle is just a copy and paste from the one that doesn't error as standalone).
This is one of the errors - the matching profile is clearly there with the correct fullUrl and meta.profile:
Unable to find matching profile for Bundle/bundle-eicr-document-zika among choices: http://hl7.org/fhir/us/ecr/StructureDefinition/eicr-document-bundle
and another - there is definitely an entry with that meta.profile:
Problem evaluating slicing expression for element in profile http://hl7.org/fhir/us/ecr/StructureDefinition/eicr-composition path resource.section[2].entry[0] (fhirPath = true and resolve().conformsTo('http://hl7.org/fhir/us/ecr/StructureDefinition/eicr-condition')): null
Grahame Grieve (Jan 26 2020 at 10:53):
wooah that was a hard one to nail down. Fixed next release
Sarah Gaunt (Jan 27 2020 at 02:24):
Thank you! (Sorry it was hard...)
Sarah Gaunt (Jan 27 2020 at 23:36):
Just tested this - all good. Thanks again!
Last updated: Apr 12 2022 at 19:14 UTC