Hi Rowan,

You're correct that this is pretty straightforward to do with AOP, although
you almost definitely need to take some kind of shortcut to make it perform
adequately to limit the patient-search-by-name method called frequently via
ajax.

(Though, what defines the patient's location and the user's location? For
the patient it could be an assigned location via a PersonAttribute, or it
could be "Any encounter ever". What about for the user?)

The Restrict By Role module does a more general version of this, but was
written back in the days of OpenMRS 1.2 or 1.3, and really should be retired
in favor of something more modern.

I think this is one of the most commonly requested OpenMRS features. It's
also a huge task to implement in a general way in core, but I think it would
be very valuable to write the module you're describing. Perhaps we can
organize a discussion or call among interested people to see if there's an
easy-to-implement approach that will solve the 90% use case.

I could imagine building ~ 5 different filters that cover many use cases,
and that can be individually enabled/disabled in a config page.

-Darius

On Thu, Aug 25, 2011 at 12:03 PM, Rowan Seymour <[email protected]>wrote:

> Something that's needed in Rwanda is a away to limit access to patient
> records by providers based on location. Seems like this would be pretty easy
> to do via aop. A very simple version would just check that the provider is
> from the same location. A more sophisticated version would allow providers
> to be assigned to patients from multiple locations. You could define which
> roles are subject to this location requirement and which aren't.
>
> I'm sure I've heard people discussing this before but I can't find any such
> modules in the repository... I'll put something together if there isn't
> something I'm missing here.
>
> Rowan
> ------------------------------
> Click here to 
> unsubscribe<[email protected]?body=SIGNOFF%20openmrs-devel-l>from 
> OpenMRS Developers' mailing list

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to 
[email protected] with "SIGNOFF openmrs-devel-l" in the  body (not 
the subject) of your e-mail.

[mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l]

Reply via email to