Skip to content

Latest commit

 

History

History
41 lines (29 loc) · 2.33 KB

datafiltermappings.md

File metadata and controls

41 lines (29 loc) · 2.33 KB

Domain 'datafiltermappings'

The datafiltermappings subfolder contains CSV configuration files that help manage Data Filter entity to basis mappings. This domain differs from most other domains in the fact that each line of the CSV does not directly represent a flattened version of a database entity. Each line allows to configure a mapping between a Data Filter entity and a Data Filter basis in a table format. This is the reason why there is no UUID header for this domain.

This is a possible example of how the configuration subfolder may look like:

datafiltermappings/
  └── mappings.csv

The CSV configuration allows to either grant access to an entity through a basis or revoke access of an entity through a basis. Here is a sample CSV:

Void/Retire Entity UUID Entity class Basis UUID Basis class
3f8f0ab7-c240-4b68-8951-bb7020be01f6 org.openmrs.Role 787ec1bd-19a6-4577-9121-899588795737 org.openmrs.Program
TRUE 4604e928-96bf-4e2c-be08-cbbc40dd000c org.openmrs.Privilege a03e395c-b881-49b7-b6fc-983f6bddc7fc org.openmrs.Location

The above example shows how to

  1. Grant access to the Role UUID'd 3f8f0ab7-c240-4b68-8951-bb7020be01f6 on the basis of the Program UUID'd 787ec1bd-19a6-4577-9121-899588795737.
  2. Revoke access to the Privilege UUID'd 4604e928-96bf-4e2c-be08-cbbc40dd000 on the basis of the Location UUID'd a03e395c-b881-49b7-b6fc-983f6bddc7fc.

Entities and bases are referrenced to by their UUIDs, and their types are specified as their class name (eg. org.openmrs.Role).

Let us summarise the set of available headers.

Header Void/Retire

If true the entity access will be granted, if false or empty the the entity access will be revoked. This header is mandatory.

Header Entity UUID (mandatory)

The entity UUID.

Header Entity class (mandatory)

The entity class name.

Header Basis UUID (mandatory)

The basis UUID.

Header Basis class (mandatory)

The basis class name.

Further examples:

Please look at the test configuration folder for sample import files for all domains, see here.