onaio / fhir-tooling

A command line utility to support FHIR Core content authoring
Other
2 stars 1 forks source link

Add support for validation of FHIR resources #13

Closed ndegwamartin closed 1 year ago

ndegwamartin commented 1 year ago

Overview We can explore adding validation support to the FHIR Core Tooling by making use of HAPI FHIR resource validation strategies here.

This type of validation will ensure resources for example that are extracted via structure maps conform to the basic FHIR validation rules. Note, the validation here is outside of the IG/Profiles validation. This can be added in a future iteration.

Also note, an official HAPI FHIR validator exists but we also want to add similar support to efsity for eventual integration to CI https://confluence.hl7.org/display/FHIR/Using+the+FHIR+Validator

Implementation spec.

  1. Add a new sub command validateFhir to efsity.

Sample commands :

fct validateFhir -i /path/to/resources/file/or/folder  

Input

Output

Documentation

Future Extensions

Resources:

pld commented 1 year ago

can we import the underlying HAPI validator library and call it more or less directly?

ndegwamartin commented 1 year ago

can we import the underlying HAPI validator library and call it more or less directly?

we should already have the required classes available via the HAPI FHIR library e.g. the Instance Validator sample here https://hapifhir.io/hapi-fhir/docs/validation/instance_validator.html