There are two main approaches to implementing FHIR servers.
One way to build a FHIR server is to separate the FHIR interface from the database model. In this approach, the data mapping between the database tables and FHIR resources needs to be created and maintained.
The other approach is to store the FHIR resources directly as documents. This way, the main elements of a FHIR server can be stored and retrieved without the complexity of creating or maintaining the mapping between FHIR and the custom data model.