Ian Haywood wrote:
> kwargs['patient_id'] = self.check_encounter_sanity
> (kwargs['episode_id'], kwargs['encounter_id']) # if an error, exception goes
> straight to be caller, we don't need to handle
This could be folded into cBusinessClass too.
> if type(allg_type) != types.IntType:
> kwargs['allg_type'] = gmPG.run_ro_query ('select id from
> clin._enum_allergy_type where value=%s', kwargs['allg_type'])[0][0]
An INSERT rule could catch this.
CASE WHEN allg_type ~ '[0-9]+' THEN allg_type::integer ELSE (select id from
clin._enum_allergy_type where value=allg_type) END
Ian
_______________________________________________
Gnumed-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnumed-devel