gnumed-devel
[Top][All Lists]
Advanced

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

Re: [Gnumed-devel] Validation of data within widgits


From: Karsten Hilbert
Subject: Re: [Gnumed-devel] Validation of data within widgits
Date: Tue, 20 Jul 2004 09:28:10 +0200
User-agent: Mutt/1.3.22.1i

> I noticed that within the server sql directory is one called 
> country.specific, but do all of these serve ONLY to insert specific 
> parameters (specific valid values) pertinent to the country?
Some also add tables useful in that country only, such as for
storing German insurance card data.

> Is there anywhere an overview description of how it is proposed to do 
> "schema localization" if it involves a plan to do achieve or support 
> anything beyond the above?
No.

> For example it would be nice to be able to require Canadian postal 
> codes to satisfy A9A 9A9 and for other countries' postal codes to 
> satisfy something else.
That could be done by a locale-dependant sequence of

    drop table zips drop constraint zip_template;
    add table zips add contraint zip_template on value check(...);

with a regex check on the zips.value.

However, you'd loose the ability to record the zip of that odd
patient from the US ...

> Is it desirable to have these be postgres constraints
Not really, see above.

> and could they be achieved by calling/running "accessory" 
> sql files as part of database creation?
Yes, even after creation.

> Or must such statements be 
> tightly coupled to (or immediately follow) the lines that originally 
> create the tables?
No.

> Or is there a better way, for example if the gui were to validate based 
> on resources (reference files or tables) in the client directory?
The GUI would validate the zip for compliance with the Canada
template then alert the user (statusbar or something, not
popup) if it doesn't comply but the country IS Canada. It is
technically possible to go so far as to record locale specific
templates. Gettext can be (ab)used for that, too, as we do
with date/time formatting in some places.

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]