Demographics country/state lists

geovasilakos wrote on Wednesday, March 07, 2012:

Hi,

I have a question about country and state lists in Demographics. I imported my countrys’ states at geo_zone_reference database table but I get the same (USA) list at the demographics. Then I found that I could edit this list from Administration -> Lists -> States. I can add new states but I can’t delete just a state, only the whole list. I also tried to edit the Demographics Layout  (Administration -> Layouts -> Demographics) but I can only set a list box to get generated from an existing list and not from a table (for example the geo_zone_reference table). Is it possible for those lists to get generated from the geo_zone_reference and geo_country_reference database tables according to their associations? For example, select a country from the list and the associated states get loaded.

bradymiller wrote on Thursday, March 08, 2012:

Hi,

Never really figured out why that table is in OpenEMR and it looks like the only script that uses that database table is here:
controllers/C_InsuranceCompany.class.php

If wanted, should be able to incorporate this by developing a “widget” for it in library/options.inc.php (which can then be sued in the LAyouts choices) but will require development (and possibly updating of the geo_zone_reference table).

For the Administration->Lists, please note that you can delete an entry by blanking out the ID and Title (then when save it, the entry will be deleted).

-brady