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. 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 <[email protected]> wrote: > > > Dear Joe > > > > On Sun, 7 Jun 2015 11:16:26 +0800 > > Joe Gene Q <[email protected]> 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 > > > >
