Stream: dotnet
Topic: Conditional References - Validation
Stephen Lloyd (Jun 05 2018 at 16:07):
Hi,
I'm just wondering if a)I've misunderstood something or b) there's something amiss with the validator output? I have a conditional reference to a resource that exists (and is searchable using these values) but I get an error from the validator when try to validate the transaction bundle with only this entry in it:
<AllergyIntolerance>
<clinicalStatus value="resolved" />
<verificationStatus value="confirmed" />
<type value="allergy" />
<category value="food" />
<patient>
<reference value="Patient?identifier=https://project/patientIDs|4" />
</patient>
<assertedDate value="2017-10-25T23:00:00Z" />
</AllergyIntolerance>
response is Error - Invalid with the following reason:
"text": "Encountered an unparseable reference (Patient?identifier=https://project/patientIDs|4)"
This however seems to have worked fine (existing resource referenced correctly) in the Vonk test server, is there a parsing error that anyone happens to know about in the validator is is my understanding at fault?
Thanks,
Stephen
Stephen Lloyd (Jun 05 2018 at 16:18):
This seems to validate if I URL encode the | character but that fails at the Bundle upload stage with "The search criteria matched no entries"
Ewout Kramer (Jun 06 2018 at 15:15):
Hi Stephen, I think this is a bug in the validator - I can fully imagine I have not considered that I could encounter these conditional references in the wild. Can you please file a bug report here: https://github.com/ewoutkramer/fhir-net-api/issues ?
Stephen Lloyd (Jun 06 2018 at 15:38):
Hi Ewout,
Thanks for the response and I will do as requested.
Regards Stephen
Christiaan Knaap (Jun 12 2018 at 04:35):
Happy to see Vonk sorted this out.
For anyone trying this on a local instance of Vonk, a little warning: Vonk also has an option to validate every resource that is created or updated (Validation.ValidateIncomingResources in the appsettings). If this is set to true, this case will be rejected by the Vonk as well, since it uses the same validator.
On the public vonk.fire.ly, this setting is set to false, hence everything is fine.
Last updated: Apr 12 2022 at 19:14 UTC