[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnumed-devel] clinical record and VOs
From: |
Carlos Moro |
Subject: |
Re: [Gnumed-devel] clinical record and VOs |
Date: |
Mon, 19 Apr 2004 01:04:02 +0200 |
User-agent: |
KMail/1.6 |
Hi,
On Sunday 18 April 2004 20:42, Karsten Hilbert wrote:
> > static cClinItemFactory.list_item_types() -> [ 'vaccination',
> > 'lab_request' ... etc]
> > static cClinItemFactory.createClinicalItem(item_type, aPKey, **kwargs)
> This sounds sensible but I'd love to see a clear use case
> first. Use cases always make it easier for me to understand
> what I really mean :-)
def get_lab_request(self, pk=None, req_id=None, lab=None):
...
req = gmPathLab.cLabRequest(aPKey=pk, req_id=req_id, lab=lab)
replaced by -> req =
cClinItemFactory.createClinicalItem('lab_request', aPKey=pk, req_id=req_id,
lab=lab)
#-----------------------
def get_lab_results(self):
...
self.__db_cache['lab
results'].append(gmPathLab.cLabResult(aPKey=row[0]))
replaceb by -> self.__db_cache['lab_results'].
append(cClinItemFactory.createClinicalItem('lab_results', aPKey=row[0])
...
.Then, cClinItemFactory.createClinicalItem, according item_type param, would
instantiate and return the adecuate object..
...although i'm not really sure if we gain much advantage comparing ordinary
construction method... just an idea... O:)
Regards,
Carlos