I am new to the FHIR world and I am trying to solve healthcare problems in my local region.
In my use case, I have following two requirements
- For Resource
I have to use most of the resources as it is from FHIR R4.
ex - Encounter, MedicationRequest etc
I have to create a profile for some resources. (put some constraints on existing resource for my use case)
ex - Observation
I have to create an extension for some resources. (add new property to resource for my use case)
Ex - Patient
- For Code System
I have to use Snomed CT International.
I have to use couple of national extensions of snomed CT listed here (https://mlds.ihtsdotools.org/#/viewReleases#section-IN)
ex - SnomedCT_IndiaAYUSHExtensionRF2_PRODUCTION_IN1000189_20220615T120000Z.zip etc
I have to create my own code system extension for local terminology.
Now I have confusion around how I can do the resource schema validation and code system or terminology validation as it includes my custom resource and my custom code system extension.
I was exploring the hapi-fhir library and I read about the FhirInstanceValidator for validation from the article (https://hapifhir.io/hapi-fhir/docs/validation/introduction.html). It says it can do validation of the official FHIR definition. What does it mean by official definition and can it be used for my use case where I have my custom resource and custom code system extension ?
I have also gone through the code examples from article (https://hapifhir.io/hapi-fhir/docs/validation/instance_validator.html). Particularly from 13.2.4Validating Using Packages. Can this be used for my validation purpose? It is not clear from this example what and how I need to supply so that It can do validation of custom schema and code system both.
Note -
- I am not using hapi-fhir-jpa-server, I just want to use the hapi-fhir library for resource validation purposes.
- I am not looking into Schema/Schematron Validation as it is advised by hapi-fhir that it's a legacy feature and might be deprecated with future releases.