FHIR Validation in Android

154 Views Asked by At

I have a project in which I have to perform a a FHIR validation. I have implemented this functionality in a regular Java application using the hapi-fhir library with the Instance Validator and Schematron Validator. I am trying to do the same for android but I have concluded that hapi-fhir using a caching library (caffeine) which is not supported in android.

Is there any way I can implement this? Maybe bypass caffeine caching or something I can't think of?

Any suggestions can be very helpful!!

1

There are 1 best solutions below

0
On

My advice would definitely be to offload any StructureDefinition (i.e profile) validation to a server, e.g. by calling the $validate operation.

FHIR's native validation capabilities are really powerful, but they are by their nature very compute-intensive which is always going to be problematic on a mobile device.

For what it's worth, the approach I've seen people take generally is to hand-roll any validation rules on the device that are required for a good UI experience (e.g. mandatory fields and that kind of thing) but then to defer the complex structuredefinition rules until the data hits a server.