gnumed-devel
[Top][All Lists]
Advanced

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

Re: [Gnumed-devel] soap widget moving to main trunk


From: Karsten Hilbert
Subject: Re: [Gnumed-devel] soap widget moving to main trunk
Date: Thu, 9 Dec 2004 20:00:28 +0100
User-agent: Mutt/1.3.22.1i

Carlos,

it'll take me a few more days to go on with moving soap2 to
the main trunk. Meanwhile you could start working on the soap
importer if you wish. I think it should work roughly like
this:

- in __init__ do: self.__pat = gmPatient.gmCurrentPatient()
- have method import_soap(data=None)
- "data" is list of dicts
- each dict has the keys:
   'soap'
   'types'
   'text'
   'data'

'soap'
 - use this for clin_narrative.soap_cat

'types'
 - a list of strings
 - the strings must be found in clin_item_type.type
 - strings not found in clin_item_type.type are ignored during
   import and the user is warned about that

'text'
 - the narrative for clin_narrative.narrative
 - use as is for importing
 - look for substrings of the form [:...:] and remember them
 - later on we can transform the [:...:] to something more readable

'data'
 - this is a dictionary with additional data
 - the keys to this dictionary are the "..." parts of the [:...:]
   found in 'text' (see above)
 - the values will be dicts themselves with the keys
   'type' and 'data'
 - 'type': the type of 'data' such as 'allergy', 'vaccination'
 - 'type' is set by the popup widgets inside gmSoapInput
 - 'data' is a dict of fields depending on 'type'

The soap importer should work through the list of dicts one by
one. The dicts in the list are INDEPENDANT of each other. Each
dict is then taken apart. A clin_narrative row is created via
self.__pat.get_clinical_record().add_clin_narrative(). Then,
all the "embedded" keys for the additional data are parsed out.
The additional data is then looked up and imported
appropriately depending on its 'type' using the business
classes. Additional data that does not have a key in 'text' is
alerted to the user. The same is done for keys in 'text' that
have no entry in the additional data. The most likely reason
for this to happen is the user manually editing the [:...:]
embedded strings in 'text' while still in the soap input
widget.

Does that make sense to you ?

I'd be delighted to see this happening. We are moving
forward ! :-)

Thanks and take care,

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346




reply via email to

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