Page tree
Skip to end of metadata
Go to start of metadata

Background

This module provides a mechanism for filtering persistent data, there are several benefits to this for instance, out of the box, this module supports metadata driven access control to patient records and their clinical data with the initial implementation being restricted access to their Visits, Encounters and Observations by Location or any other metadata data like Programs. We envision adding filtering of other patient clinical data like Orders, EncounterDiagnoses, Appointments, etc.

We also envision a scenario where another module can leverage this module's functionality to limit access by some other criteria e.g. Program or Role based access.

With that said, we hope to strip the location-based functionality out of this module leaving it as a very thin lightweight and reusable module purely for data filtering and move the functionality to the existing Location based access module.

Architectural Overview

Requirements

Developer Guide

User Guide

Download

Installation

NOTE

To guarantee proper functionality of OpenMRS, it's highly recommended to install the module by stopping OpenMRS, drop the omod file in the module repository and start OpenMRS again, this also applies to uninstall it, you need to stop OpenMRS, remove the omod from the local module repository and start OpenMRS.

Configuration

  • Set the value for the global property named datafilter.personAttributeTypeUuids, it should be a comma separated list of uuids for the person attribute types to use as the basis for filtering,
    The format property of the matching person attribute type(s) MUST match valid java class names and should match values in the basis_type column in the datafilter_user_basis_map table. E.g. if you want to add location based filtering, you would filter by Location meaning the format of the person attribute type with the uuid to set for the global property would be org.openmrs.Location.
  • Every patient in the database should be assigned a person attribute type that ties them to a location, the attribute type should be the one that was set in above.
  • Assign users to a location by adding entries for them in the datafilter_user_basis_map table, the user_id column is the database id of the user, the basis_id column is the id of the Object to filter on e.g. a location Id in case you are filtering by location. The basis_type column value should be a fully qualified java class name of the objects to filter on, e.g. in case of location based filtering it would org.openmrs.Location.
  • No labels