On this page:

5.2FHIR Storage (MongoDB) Module

 

The FHIR Storage (MongoDB) module is responsible for resource storage and retrieval. All resources are stored in a non-relational database and unlike the relational module, no indexes are created to help in finding them.

5.2.1Preparing for a New Installation

 

An external MongoDB instance should be created already. You will need the connection url and credential details for setting up the module.

You will also require a relational database with a user created. See the Platform Requirements page for information on supported database platforms.

5.2.2Creating the Module

 

When creating a FHIR Storage (MongoDB) module, you must first choose which version of FHIR it will support. Currently, only DSTU3 and R4 is supported.

5.2.3Configuration

 

Database Configuration

Once you have selected your module type, the first set of configuration options will be the relational database configuration itself. A complete reference of options is found on the Database configuration page.

Most importantly, you will need to configure the following properties:

Reference

The configuration options available for this module type are as follows:

5.2.4Setting up Custom Search Parameters

 

Custom search parameters can be configured using SearchParameter resources.

How to Create a SearchParameter

Create and store into MongoDB the a SearchParameter resource with status set to active.

Example:

{
     "resourceType" : "SearchParameter",
     "id" : "patient-identifier-example",
     "base" : ["Patient"],
     "type" : "token",
     "expression" : "Patient.identifier",
     "status" : "active",
     "code" : "identifier",
     "extension" : [
         {
            "url" : "https://smilecdr.com/fhir/ns/StructureDefinition/searchparameter-uplift-token",
            "extension" : [
               {
                  "url" : "https://smilecdr.com/fhir/ns/StructureDefinition/searchparameter-uplift-token-system",
                  "valueUri" : "http://smilecdr.com/alt_id"
               },
               {
            	   "url" : "https://smilecdr.com/fhir/ns/StructureDefinition/searchparameter-uplift-token-to-element",
            	   "valueCode" : "alt_id"
               }
             ]
         },
         {
            "url" : "https://smilecdr.com/fhir/ns/StructureDefinition/searchparameter-uplift-token",
            "extension" : [
               {
                  "url" : "https://smilecdr.com/fhir/ns/StructureDefinition/searchparameter-uplift-token-system",
            	  "valueUri" : "http://smilecdr.com/alt_id_2"
            	},
            	{
            	   "url" : "https://smilecdr.com/fhir/ns/StructureDefinition/searchparameter-uplift-token-to-element",
            	   "valueCode" : "alt_id_2"
            	}
            ]
         },
         {
            "url":"https://smilecdr.com/fhir/ns/StructureDefinition/searchparameter-uplift-token",
            "extension" : [
               {
                  "url" : "https://smilecdr.com/fhir/ns/StructureDefinition/searchparameter-uplift-token-system",
                  "valueUri" : "http://smilecdr.com/alt_id_3"
            	},
            	{
            	   "url" : "https://smilecdr.com/fhir/ns/StructureDefinition/searchparameter-uplift-token-to-element",
            	   "valueCode" : "alt_id_3"
            	}
            ]
         }
     ]
}

How to Disable a SearchParameter

SearchParameters can be disabled by updating the resource and setting the status to retire.