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
- Grant access to the
Role
UUID'd3f8f0ab7-c240-4b68-8951-bb7020be01f6
on the basis of theProgram
UUID'd787ec1bd-19a6-4577-9121-899588795737
. - Revoke access to the
Privilege
UUID'd4604e928-96bf-4e2c-be08-cbbc40dd000
on the basis of theLocation
UUID'da03e395c-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.
If true
the entity access will be granted, if false
or empty the the entity access will be revoked. This header is mandatory.
The entity UUID.
The entity class name.
The basis UUID.
The basis class name.
Please look at the test configuration folder for sample import files for all domains, see here.