gnumed-devel
[Top][All Lists]
Advanced

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

Re: [Gnumed-devel] Future encounters


From: Busser, Jim
Subject: Re: [Gnumed-devel] Future encounters
Date: Sun, 13 Nov 2011 00:04:41 +0000

On 2011-11-12, at 3:31 PM, Karsten Hilbert wrote:

> The value for the "Empty" column comes from
> 
>       gmEMRStructItems.py::cEncounter.has_clinical_data()
> 
> which is
> 
>       def has_clinical_data(self):
>               cmd = u"""
>                       select exists (
>                               select 1 from clin.v_pat_items where pk_patient 
> = %(pat)s and pk_encounter = %(enc)s
>                                       union all
>                               select 1 from blobs.v_doc_med where pk_patient 
> = %(pat)s and pk_encounter = %(enc)s
>                       )"""
>               args = {
>                       'pat': self._payload[self._idx['pk_patient']],
>                       'enc': self.pk_obj
>               }
>               rows, idx = gmPG2.run_ro_queries (
>                       queries = [{
>                               'cmd': cmd,
>                               'args': args
>                       }]
>               )
>               return rows[0][0]

Is that to say that non-empty requires something in a clin.clin_narrative row 
(which is where I had imagined the row containing the text of 'Purpose' would 
be stored).

-- Jim


reply via email to

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