health-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Health-dev] Group Access Permission Rule: How to filter by Patient


From: Luis Falcon
Subject: Re: [Health-dev] Group Access Permission Rule: How to filter by Patient Status = Hospitalized
Date: Fri, 12 Jun 2015 07:32:01 +0100

Hi Chris / Joe / team
On Thu, 11 Jun 2015 21:31:38 -0700
Chris <address@hidden> wrote:

> Hiya,
> 
> I just pushed a commit to add the searcher.
> 
> http://hg.savannah.gnu.org/hgweb/health/rev/f49b62f22358
> 
> To make it work, the domain value/operand must be True.
> 
Excellent work, Chris !


Best,
Luis
> View only hospitalized patients:
> 
> [('patient_status', '=', True)]
> 
> However, I haven't added smart handling of the value and there is no
> robust pre-validation on the value anyways. The code ignores the
> operator ('=', 'like', etc.), consequently, these will return
> non-hospitalized patients:
> 
> [('patient_status', 'like', 'True')]
> [('patient_status', '=', False)]
> ...etc.
> 
> Hopefully that commit will fix it! Thanks for reporting!
> 
> -C
> 
> PS: @Luis: I added the bug report. =-)
> 
> On 06/10/15, Joe Gene Q wrote:
> > Thank you very much Luis!
> > 
> > Joe Gene
> > 
> > On Wed, Jun 10, 2015 at 3:52 AM, Luis Falcon <address@hidden> wrote:
> > 
> > > Dear Joe
> > >
> > > On Sun, 7 Jun 2015 11:16:26 +0800
> > > Joe Gene Q <address@hidden> wrote:
> > >
> > > > Dear GNU Health Community,
> > > >
> > > > I would like to request for help for the following filter I
> > > > would like to create:
> > > >
> > > > I would like to create a rule to filter only patients whose
> > > > status = 'hospitalized'
> > > >
> > > > I tried the following domain rule below, and got an error
> > > > message:
> > > >
> > > > Health Nursing -> Groups -> Access Permissions -> Record Rules
> > > >
> > > > Model: Patient Related Information
> > > > Domain [('patient_status','like','hospitalized')]
> > > >
> > > > Error Message: " Missing Search Function on field "patient
> > > > status"
> > > >
> > > Sorry for the late response.
> > > The hospitalization status - at patient model level - is a
> > > function. In order to be able to search, we need to add a
> > > searcher.
> > >
> > > I will create a task to add a searcher to the function.
> > >
> > > BTW, we have made the hospitalization status a boolean, so no more
> > > chars :)
> > >
> > > Thanks for your feedback on this !
> > > Luis
> > > > Would truly appreciate your help in making this filter work.
> > > >
> > >
> > > >
> > > > Thank you in advance and regards,
> > > >
> > > > Joe Gene Quesada
> > > > Your GNU Health Partner from the Philippines
> > >
> > >
> 
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]