gnumed-devel
[Top][All Lists]
Advanced

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

Re: [Gnumed-devel] 'Add' of a new encounter - failure to update pop-up a


From: Karsten Hilbert
Subject: Re: [Gnumed-devel] 'Add' of a new encounter - failure to update pop-up and also how to undo?
Date: Thu, 24 Oct 2013 12:02:06 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Oct 24, 2013 at 11:53:13AM +0200, Karsten Hilbert wrote:

> > Anyhow, after clicking the wrong button ('Add'),
> > what I observed was despite that I knew right away
> > it was a mistake -- and so clicked the Cancel button -- it
> > was too late.
> 
> An encounter being created is a legacy which ought
> to be fixed eventually.

Actually, no, the reason the encounter is being created
is because edit areas do not currently allow for pre-
seeding fields short of being provided with an existing
business object being edited.

In this case we want to pre-set the encounter type:

        #--------------------
        def new():
                cfg_db = gmCfg.cCfgSQL()
                enc_type = cfg_db.get2 (
                        option = u'encounter.default_type',
                        workplace = 
gmPraxis.gmCurrentPraxisBranch().active_workplace,
                        bias = u'user'
                )
                if enc_type is None:
                        enc_type = 
gmEMRStructItems.get_most_commonly_used_encounter_type()
                if enc_type is None:
                        enc_type = u'in surgery'
                enc = gmEMRStructItems.create_encounter(fk_patient = 
patient.ID, enc_type = enc_type)
                return edit_encounter(parent = parent, encounter = enc)

hence the pre-creation.

Karsten
-- 
GPG key ID E4071346 @ gpg-keyserver.de
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346



reply via email to

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