0

How can I add validation for my extensions to a resource in Spark? Typical use case: I have a look up table of values against which the extension value need to be checked against.

I assume validating each extension in a Other resource is suffice or is there hooks in spark to validate 'Other' resource?

frosty
  • 2,421
  • 6
  • 26
  • 47

1 Answers1

1

There are multiple types of validation, some of which are currently present in the .NET library. Most of these are around validating the instances against the generic "core" definitions in the specifications of the resources, so these will not be able to validate your specific "look up tables". You can read more about these validations right here: http://ewoutkramer.github.io/fhir-net-api/validation.html

What you want to do is introduce your own "look up tables", which we call "ValueSets" in FHIR. What you'd need to do is create your own valueset, and combine this with a "profile". David Hay has written about this here: http://fhirblog.com/2014/03/11/profiles-and-valuesets-in-fhir/

Now, once you have done this, you need the .NET library to validate your instance against the profile. This is work in progress but we expect to add this functionality to the next version of the .NET NuGet package, which will arrive somewhere late august or early september.

Ewout Kramer
  • 984
  • 6
  • 9