There is no book on “How to build a production ready FHIR application.” Every team and every architect has to work it out for themselves.
The 5 areas I highlight below are often missed until a project nears completion. If you haven’t explored each of these for your own app, you may be missing something fundamental.
1. Security Labels
It’s likely for a host of different reasons (access control, resource usage and management) that you might want to ‘tag’ resources or elements as they go into your FHIR server. Security labels are a good way to do this and the ds4p Implementation Guide is a great starting point.
Security labels: https://build.fhir.org/security-labels.html
The ds4p IG: https://build.fhir.org/ig/HL7/fhir-security-label-ds4p/toc.html
2. Running Data Analytics on FHIR
FHIR is NOT a database. You cannot run heavy or complicated queries on your FHIR server using the API. Yet the business may want to run just these sorts of queries as the data stored in FHIR accumulates. Here is how other applications achieve this.
https://darrendevitt.com/how-do-you-run-labor-intensive-queries-on-your-fhir-server-in-real-time/
3. Middleware — Intercept FHIR queries
You may need to intercept FHIR bundles and resources as they go in and out of your server. You might not realize this until your project is 70% complete. Take a look at Azure’s Health Data Services Toolkit for a working example of how to do this.
https://github.com/microsoft/azure-health-data-services-toolkit
4. Custom Operations
The FHIR API exposes a well documented set of resource types that applications can query or update. But you may want to build and expose a command or feature that updates multiple resources and resource types as part of a single action. A custom operation tailored to your use case.
https://hl7.org/fhir/R4/operations.html
5. Smart on FHIR
In classroom projects Smart on FHIR looks easy. In real-world production environments it’s not. Depending on your use case you may decide not to use Smart on FHIR at all, especially if you’re building a B2B app with no consumer use.
Smart on FHIR video: https://www.youtube.com/watch?v=AgIZBKNqQ4I
---