[Top][All Lists]

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

Re: [Gnumed-devel] Future encounters

From: Karsten Hilbert
Subject: Re: [Gnumed-devel] Future encounters
Date: Sun, 13 Nov 2011 00:31:42 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Sat, Nov 12, 2011 at 11:12:14PM +0000, Jim Busser wrote:

> Presently, it is possible in GNUmed to do
>       EMR > Create new encounter
> which adopts the default type yet is able to be considered (check-marked)
>       'empty'
> What criteria currently determine whether an encounter is 'empty'? I tried 
> string searching in the code for 'Empty' and while I traced this back to 
> I could not figure out how to trace the data columns (or interpreted values) 
> that determine the value of 'empty'.

The value for the "Empty" column comes from

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]

> Suppose someone creates an encounter into the future,
> setting its clin_when to a future date and time and
> inputting the Encounter type.

Nothing would happen to it until the auto-remove age comes
and it remained empty at which point it would get deleted.

> Maybe it is not a good idea… I only am not sure. Would
> inputting the future date make it non-empty?


> What about
> altering the type from the default value?


> What about inputting a Purpose? 


GPG key ID E4071346 @
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346

reply via email to

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