FHIR Chat · Validating against empty elements · dotnet

Stream: dotnet

Topic: Validating against empty elements


view this post on Zulip Richard Kavanagh (Jun 16 2020 at 13:45):

When using the C# FHIR API to validate against profiles, we get good results.
The validation processes do not seem to pick up the case where an element is present but not populated. This is not allowed in FHIR but does not seem to flag an error.
Does the C# FHIR API library allow for the detection of this?

Thanks

view this post on Zulip Marco Visser (Jun 16 2020 at 14:59):

Hi Richard, I will investigate this. I thought we solved this problem already..

view this post on Zulip Marco Visser (Jun 16 2020 at 15:26):

In the Parse phase we have permissive parsing set to true, which is the default. Setting this setting to false, you will see the errors about empty string values:

  string json = "a FHIR JSON resource";
  var resource = FhirJsonNode.Parse(json, null, new FhirJsonParsingSettings { PermissiveParsing = false });

view this post on Zulip Brian Postlethwaite (Jun 16 2020 at 23:12):

To my mind this is a validation issue not a parsing issue.


Last updated: Apr 12 2022 at 19:14 UTC