[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnumed-devel] vaccinations
From: |
Ian Haywood |
Subject: |
[Gnumed-devel] vaccinations |
Date: |
Sun, 25 Sep 2005 19:19:08 +1000 |
User-agent: |
Mozilla Thunderbird 1.0.6 (X11/20050912) |
I'm trying to get vaccinations working, I've run against this problem:
cClinicalRecord.add_vaccination () requires an episode, I've
added the neccessary parameters so cResizingSoapPanel.get_problem () can wind
its way to this function (it's worth it as most other middleware functions
will also need to know the episode)
However, with an unattached progress note, get_problem () returns None
Should we add to the default episode?
What if the progress note is then attached to another problem?
This leads into the broader question of when popup-generated clinical objects
get
committed to the backend.
IMHO popups should save their widgets to a dictionaries, held by
cResizingSoapPanel, which then commits the lot en masse to the middleware
on it's own save_data ()
EditArea2 would have four methods
load_from_dict () -- no need to override
save_to_dict () -- no need to override, unless special input sanity
checks wanted.
clin_obj2dict () -- class-method, overridden
dict2clin_obj () -- class-method, overridden
The last two need to be class methods as we don't want to actually
instantiate the popups in order to save them.
Ian
P.S.
short_err = self.__editarea.get_short_error()
long_err = self.__editarea.get_long_error()
if (short_err is None) and (long_err is None):
long_err = _(
'Unspecified error saving data in edit
area.\n\n'
'Programmer forgot to specify proper error\n'
'message in [%s].'
) % self.__editarea.__class__.__name__
if short_err is not None:
gmGuiHelpers.gm_beep_statustext(short_err, gmLog.lErr)
if long_err is not None:
gmGuiHelpers.gm_show_error(long_err, _('saving clinical
data'), gmLog.lErr)
For pity's sake Karsten, what exactly is wrong with using python exceptions!
signature.asc
Description: OpenPGP digital signature
- [Gnumed-devel] vaccinations,
Ian Haywood <=