[Top][All Lists]

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

Re: [Gnumed-devel] schema changes requested

From: Ian Haywood
Subject: Re: [Gnumed-devel] schema changes requested
Date: Tue, 06 Dec 2005 09:42:09 +1100
User-agent: Debian Thunderbird 1.0.7 (X11/20051017)

from gnumed/server/sql/gmclinical.sql
    592 create table clin.form_instances (
    593         pk serial primary key,
    594         fk_form_def integer
    595                 not null
    596                 references form_defs(pk)
    597                 on update cascade
    598                 on delete restrict,
    599         form_name text not null
    600 ) inherits (clin.clin_root_item);
    602 -- FIXME: remove clin_root_item, not audited, lnk_form_instance2episode

Not sure where we're going with this.
Karsten, let me pose my question more concretely: currently I'm writing a lab 
request widget.
from gmLabWidgets (in my checked out version):

    877         def SaveNewBusiness (self, dtd):
    878                 emr = gmPerson.gmCurrentPatient.get_emr ()
    879                 req = emr.add_lab_request (lab=dtd['lab'][1], 
    880                 if not req:
    881                         return (False, _('unable to create lab 
    882                 req['narrative'] = dtd['request'] + '\n\n' + 
    883                 req['fk_requestor'] = _whoami.get_staff_identity ()
    884                 r = req.save_payload ()
    885                 if r[0]:
    886                         return (True, req)
    887                 else:
    888                         return r
    889         SaveNewBusiness = classmethod (SaveNewBusiness)

so we put the data in clin.lab_request via the business layer, no problems 
there (I assume).
Presumably, when we print you what the same data saved again in forms_data. Why?
(when we can put lab_request.pk_audit in form_instances to ensure the data 
matches the form)

When we re-edit the data (which your not going to do very often for a lab 
request I admit)
which do we draw from: lab_request or form_data?


reply via email to

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