health-dev
[Top][All Lists]
Advanced

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

Re: [Health-dev] [Health] Patient filter for nursing


From: Luis Falcon
Subject: Re: [Health-dev] [Health] Patient filter for nursing
Date: Tue, 7 Oct 2014 18:36:41 +0100

Dear Joe 
On Wed, 8 Oct 2014 00:22:25 +0800
Joe Gene Quesada <address@hidden> wrote:

> Dear Luis,
> 
> Thank you for your reply. I'm still staring at the health_inpatient
> module code, and figuring out how to write a searcher definition. I
> haven't found an example that I can follow.
> 
You might want to take a look at function field for retrieving the
person PUID for the Health Professional 
http://hg.savannah.gnu.org/hgweb/health/file/f1e9fe6963ad/tryton/health/health.py#l1162

and it's corresponding searcher method
http://hg.savannah.gnu.org/hgweb/health/file/f1e9fe6963ad/tryton/health/health.py#l1175

Hope it helps ! 

All the best,
> Will see you in Kyoto soon.
> 
> Best regards,
> 
> Joe Gene
> 
> On Tue, Oct 7, 2014 at 8:35 PM, Luis Falcon <address@hidden> wrote:
> 
> > Dear Joe
> >
> > On Tue, 7 Oct 2014 09:26:55 +0800
> > Joe Gene Quesada <address@hidden> wrote:
> >
> > > Hi Emilien,
> > >
> > > I have made some progress in this issue.
> > >
> > > First, I have figured out how to write a proper domain rule.
> > >
> > > I used the following model for the record rules I tested below:
> > >
> > > Model Description: Patient related information
> > > Model Name: gnuhealth.patient
> > >
> > > Domain statements that worked under record rules of the above
> > > model: [('diet_info', 'like', 'sugar')]
> > > [('puid', 'like', '%2014%')]
> > > [('lastname', 'like', '%')]
> > >
> > > The domain statements above filter the patient data that match the
> > > rules.
> > >
> > > The domain statement that is still not working:
> > > [('patient_status', 'like', 'hospitalized')]
> > >
> > > There is now a Tryton error message box that pops up on the client
> > > with the following message:
> > > Missing search function on field "patient_status"
> > >
> > It looks like you are missing the searcher definition on the
> > function field.
> >
> > Let me know if you solved it.
> >
> > PS: I'm flying to Japan tomorrow. Since you're assisting to the
> > Kyoto conference, we can see it there :) Please bring your laptop.
> >
> > PS2: I'm moving this thread to health-dev , dedicated to
> > development. Please in the next reply, write to health-dev only.
> >
> > All the best,
> > Luis
> >
> > > I have attached some screenshots to clarify this.
> >
> > >
> > > Thank you,
> > >
> > > Joe Gene Quesada
> > >
> > >
> > >
> > > On Tue, Oct 7, 2014 at 12:00 AM, <address@hidden> wrote:
> > >
> > > > Send Health mailing list submissions to
> > > >         address@hidden
> > > >
> > > > To subscribe or unsubscribe via the World Wide Web, visit
> > > >         https://lists.gnu.org/mailman/listinfo/health
> > > > or, via email, send a message with subject or body 'help' to
> > > >         address@hidden
> > > >
> > > > You can reach the person managing the list at
> > > >         address@hidden
> > > >
> > > > When replying, please edit your Subject line so it is more
> > > > specific than "Re: Contents of Health digest..."
> > > >
> > > >
> > > > Today's Topics:
> > > >
> > > >    1. Re: Patient filter for nursing (Emilien Klein)
> > > >
> > > >
> > > > ----------------------------------------------------------------------
> > > >
> > > > Message: 1
> > > > Date: Mon, 6 Oct 2014 07:15:57 +0200
> > > > From: Emilien Klein <address@hidden>
> > > > To: General GNU Health discussion and help <address@hidden>
> > > > Subject: Re: [Health] Patient filter for nursing
> > > > Message-ID:
> > > >         <CANqxmqHD2kp7C4MQ-c3RQbYTzton7oR9mGwAX7qb7Ht7=
> > > > address@hidden>
> > > > Content-Type: text/plain; charset="utf-8"
> > > >
> > > > Hi Jose,
> > > >
> > > > Le 5 oct. 2014 07:33, "Jose Eugenio Quesada"
> > > > <address@hidden> a ?crit
> > > > :
> > > > >
> > > > > Hello GNU Health friends,
> > > > >
> > > > > I'm from the Philippines working on a project to implement GNU
> > > > > Health in
> > > > a local city government hospital.
> > > > >
> > > > > My question has to do with limiting the list of patients that
> > > > > a nurse
> > > > assigned to the maternity ward can view.
> > > > >
> > > > > I would like to set the filter using the Tryton client adding
> > > > > a rule to a
> > > > new group that I called "Health Nursing Maternity"
> > > > >
> > > > > The new rule should limit a nurse that is assigned to "Health
> > > > > Nursing
> > > > Maternity" to be able to view records of patients whose patient
> > > > status = 'hospitalized', and whose inpatient registration type =
> > > > 'maternity.
> > > > >
> > > > > I created two rules that used Patient Admission History
> > > > > model, and
> > > > Patient related information model.
> > > > >
> > > > > Inside of the Patient Admission History rule, I added the
> > > > > following
> > > > domain:
> > > > > [('gnuhealth_inpatient_registration.admission_type', '=',
> > > > > 'maternity')]
> > > > >
> > > > > Inside of the Patient related information model, I added the
> > > > > following
> > > > domain:
> > > > > [('gnuhealth_patient.patient_status', '=', 'hospitalized')]
> > > > >
> > > > > When I then log in as a nurse assigned to the group "Health
> > > > > Nursing
> > > > Maternity", I get a python error complaining about
> > > > gnuhealth_patient
> > > >
> > > > Please paste this specific error in the email.
> > > >
> > > > >
> > > > > Would appreciate help and guidance on how to properly
> > > > > configure these
> > > > kinds of filters in GNU Health.
> > > > >
> > > > > Thank you in advance,
> > > > >
> > > > > Joe Gene Quesada
> > > > -------------- next part --------------
> > > > An HTML attachment was scrubbed...
> > > > URL: <
> > > >
> > http://lists.gnu.org/archive/html/health/attachments/20141006/6f0884aa/attachment.html
> > > > >
> > > >
> > > > ------------------------------
> > > >
> > > > _______________________________________________
> > > > Health mailing list
> > > > address@hidden
> > > > https://lists.gnu.org/mailman/listinfo/health
> > > >
> > > >
> > > > End of Health Digest, Vol 39, Issue 6
> > > > *************************************
> > > >
> >
> >
> >
> > --
> > Dr. Luis Falcon
> > GNU Health
> > Freedom and Equity in Healthcare
> > http://health.gnu.org
> >
> >




reply via email to

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