The Initializer module is an API-only module that processes the content of the configuration folder when it is found inside OpenMRS' application data directory:
. ├── modules/ ├── openmrs.war ├── openmrs-runtime.properties ├── ... └── configuration/
The configuration folder is subdivided into domain subfolders:
configuration/
├── addresshierarchy/
├── appointmentsspecialities/
├── appointmentsservicesdefinitions/
├── attributetypes/
├── bahmniforms/
├── conceptclasses/
├── concepts/
├── datafiltermappings/
├── drugs/
├── encountertypes/
├── globalproperties/
├── idgen/
├── jsonkeyvalues/
├── locations/
├── messageproperties/
├── metadatasetmembers/
├── metadatasets/
├── metadatasharing/
├── metadatatermmappings/
├── patientidentifiertypes/
├── personattributetypes/
├── privileges/
├── programs/
├── programworkflows/
├── programworkflowstates/
└── roles/
Each domain-specific subfolder contains the metadata and configuration information that is relevant to the subfolder's domain. Although several file types are supported for providing metadata, CSV files are the preferred format and all domain should aim at being covered through parsing CSV files.
- This module allows to preload an OpenMRS installation with maintained and versioned metadata.
- CSV files are the preferred format, however a number of metadata domains rely on other file formats. See the list below for details.
- Initializer processes all configuration files upon starting up.
- Initializer produces a checksum file for each processed file. A file will never be processed again until its checksum has changed.
- Each line of those CSV files represents an OpenMRS object to be created, edited or retired.
- Each line of those CSV files follows the WYSIWYG principle.
We suggest to go through the following before looking at specific import domains:
This is the list of currently supported domains in respect to their loading order:
- Message properties key-values (.properties files)
- Generic JSON key-values (JSON files)
- Metadata Sharing packages (ZIP files)
- Patient identifier types (CSV files)
- Privileges (CSV files)
- Encounter Types (CSV files)
- Roles (CSV files)
- Global properties (XML files)
- Attribute types (CSV files)
- Locations (CSV files)
- Bahmni Forms (JSON Files)
- Concept classes (CSV files)
- Concepts (CSV files)
- Programs (CSV files)
- Programs worklows (CSV files)
- Programs worklow states (CSV files)
- Person attribute types (CSV files)
- Identifier sources (CSV files)
- Drugs (CSV files)
- Order Frequencies (CSV files)
- Order Types (CSV files)
- Bahmni Appointments Specialities (CSV files)
- Bahmni Appointments Service Definitions (CSV files)
- Data Filter entity-basis mappings (CSV files)
- Metadata Sets (CSV files)
- Metadata Set Members (CSV files)
- Metadata Term Mappings (CSV files)
Build the master branch and install the built OMOD to your OpenMRS instance:
git clone https://github.com/mekomsolutions/openmrs-module-initializer/tree/master
cd openmrs-module-initializer
mvn clean package
- OpenMRS Core 2.1.1 (required)
- ID Gen 4.3 (compatible)
- Metadata Sharing 1.2.2 (compatible)
- Metadata Mapping 1.3.4 (compatible)
- Bahmni Appointments 1.2-beta (compatible)
- Data Filter 1.0.0 (compatible)
- Bahmni I.e Apps 1.0.0 (compatible)
Initializer enables to achieve the OpenMRS backend equivalent of Bahmni Config for Bahmni Apps. It facilitates the deployment of implementation-specific configurations without writing any code, by just filling the configuration folder with the needed metadata and in accordance to Initializer's available implementations.
Find us on OpenMRS Talk: sign up, start a conversation and ping us with the mention @MekomSolutions
in your message. Or find us on the Initializer OpenMRS Slack channel.
- Support for conditional loading of domains based on the runtime availability of OpenMRS modules.
- Bulk creation and edition of programs provided through CSV files in configuration/programs.
- Bulk creation and edition of program workflows provided through CSV files in configuration/programworkflows.
- Bulk creation and edition of program workflow states provided through CSV files in configuration/programworkflowstates.
- Bulk creation and edition of privileges provided through CSV files in configuration/privileges.
- Bulk creation and edition of roles provided through CSV files in configuration/roles.
- Bulk creation and edition of metadata terms mappings provided through CSV files in configuration/metadatatermmappings.
- Bulk creation and edition of encounter types provided through CSV files in configuration/encountertypes.
- Bulk creation and edition of Bahmni appointments specialities provided through CSV files in configuration/appointmentsspecialities.
- Bulk access management of Data Filter entity to basis mappings provided through CSV files in configuration/datafiltermappings.
- Bulk creation and edition of attribute types provided through CSV files in configuration/attributetypes.
- Support location attributes.
- Bulk creation and edition of patient identifier types provided through CSV files in configuration/patientidentifiertypes.
- Bulk creation and edition of metadata terms mappings provided through CSV files in configuration/metadatasets.
- Bulk creation and edition of metadata terms mappings provided through CSV files in configuration/metadatasetmembers.
- Bulk creation and edition of bahmni forms provided JSON files in configuration/bahmniforms
- Support concept attributes.
- Bulk creation and edition of drugs provided through CSV files in configuration/locations.
- Loads i18n messages files from configuration/addresshierarchy and configuration/messageproperties.
- Bulk creation and edition of concepts provided through CSV files in configuration/concepts.
This covers: basic concepts, concepts with nested members or answers and concepts with multiple mappings. - Bulk creation and edition of drugs provided through CSV files in configuration/drugs.
- Overrides global properties provided through XML configuration files in configuration/globalproperties.
- Modifies (retire) or create identifier sources through CSV files in configuration/idgen.
- Exposes runtime key-values configuration parameters through JSON files in configuration/jsonkeyvalues.
- Bulk creation and edition of person attribute types provided through CSV files in configuration/personattributetypes.
- Imports MDS packages provided as .zip files in configuration/metadatasharing.
- Bulk creation and edition of order frequencies provided through CSV files in configuration/orderfrequencies.