On this page:

5.9Multitenancy

 
This is an experimental feature! It is not yet recommended for production use!
This page will be improved as the feature stabilizes.

Smile CDR supports a multitenant architecture where a single database instance is used to serve multiple distinct pools of resources. Each pool (a "tenant" in this architecture) has a unique identifier (a "tenant ID"), and is considered to be a separate set of resources.

Typically, a multitenant architecture is used when there are business reasons for keeping data separate. This might include having multiple customers, who should not see each other's data, or different source systems where it is advantageous to not mix data sources together.

Security rules may be used to permit users to access only the individual tenant(s) they are allowed to see.

Enabling Multitenancy

To enable multitenancy, a list of tenants must be provided to the persistence module.

Using Multitenancy

If a FHIR Endpoint has been created for a multitenant-enabled Persistence module, the tenant ID is added to the base URL for that endpoint.

For example, a request to read the Patient resource with ID 123 for tenant ACME becomes: http://myserver.com:8000/ACME/Patient/1