Stream: dotnet
Topic: Possible to turn of validation when running FhirClient
Jon-Vidar Schneider (Mar 08 2019 at 10:44):
We are quering an existing DSTU2-service that returns a bundle with encounter, some of the encounters have some invalid data. When using versjon 0.94.0 of the API we got the response, but now with version 1.1.3 of the API we get an exception. ("Element 'period' must have child elements and/or a value attribute (at line 1, 1916)"} Is it possible to turn off validation when running the following: _fhirClient.Search<dstu2::Hl7.Fhir.Model.Encounter>(searchParams);
Looking at fiddler we get a 200-response from the server.
The correct approach would be to fix the error on the server, but the company doing the development can't fix this at the moment.
Tried looked at ParserSettings to see if I could turn off validation, but could not find anything.
Kenneth Myhra (Mar 08 2019 at 10:59):
If I remember correctly setting ParserSettings.PermissiveParsing to true should make it fall back to the old behavior
Jon-Vidar Schneider (Mar 08 2019 at 11:02):
Thanks, that seems to work better. Though I tested that earlier, but I guess not :)
Last updated: Apr 12 2022 at 19:14 UTC