Customization by country

cfapress wrote on Wednesday, January 28, 2009:

What do other developers here think of adding a new global variable ‘country_code’?

The source of the information would come from the ISO 3166 list
http://www.iso.org/iso/country_codes.htm

A new database table would be created ‘country_codes’ which could include the 2-letter code, full-text name, and anything else country-specific.

Then the globals.php file would have a variable ‘country_code’ set that matched a value in the country_codes table. This would then become the standard country for user’s installation of OpenEMR.

Why is this important?

Well… it seems that OpenEMR is used in various places around the world. Not all countries use the same immunization lists, currencies, etc. Perhaps this could be a good way to programmatically exclude certain parts of the code depending on the country of installation.

Thoughts? Comments?

Jason

sunsetsystems wrote on Wednesday, January 28, 2009:

We already have $GLOBALS[‘phone_country_code’].  Will that do?

Rod
www.sunsetsystems.com

cfapress wrote on Wednesday, January 28, 2009:

The phone_country_code is a start. It’s a value that I could envision being a field in a ‘countries’ table. I guess I’m thinking of something more comprehensive. Perhaps my thoughts are too big?

jason

sunsetsystems wrote on Thursday, January 29, 2009:

Not too big at all.

However it appears that one of my clients will be sponsoring a “global parameters” interface that will include things like date and currency formats, metric units, etc.  It may be more flexible to not tie these to countries.  We’re still working on the details.

Rod
www.sunsetsystems.com