opensrp / opensrp-server

OpenSRP backend
https://smartregister.atlassian.net/wiki/display/Documentation/OpenSRP+Developer%27s+Guide
Other
24 stars 37 forks source link

Address format for Client #25

Closed maimoonak closed 9 years ago

maimoonak commented 9 years ago

Parent #9 I was just wondering what should be the address fields available for Client? Trying finding out a standard international format it seems that it is not possible to map every address on a single predefined format across the world. Below are few fields we can restrict to fill in and other fields are open for each site as addressFields Map.

For standardization we can provide an enum with few values like HOUSE_NUMBER, STREET, REGION, LOCALITY, SECTOR, AREA,
MUNICIPALITY, VILLAGE, TOWN, COUNTY, DISTRICT, CITY, but it would be choice of site developer to choose the fields he want to keep in.

Do you think that this approach would work for all addresses? Is there any better way we can handle it? We can also leave everything open by making address a Map...

@mberg , @djazayeri , @alihabib , @ndisha , @raihan-mpower , @julkarnain , @sohelsarder , @jayantchaudhari7 , @gigix , @cagulas , @dimasciput , @raufdesu , @kercobo , @wahid-nwr , @MuhammadSafwan

maimoonak commented 9 years ago

OpenMRS has table address with fields as specified below
address1, address2, address3, address4, address5, address6, county_district, city_village, state_province, country, postal_code, latitude, longitude, start_date, end_date

All address data has to fit in following fields. These fields can be mapped to our address scheme as described above.

OpenSRPOpenMRS
addressTypeaddress6
startDate start_date
endDateend_date
latitudelatitude
longitudelongitude
postalCodepostal_code
statestate_province
countrycountry
addressFields (Customizable)
HOUSE_NUMBER / HOUSE / HOUSE_NO / UNIT / UNIT_NUMBER / UNIT_NOaddress1
STREET / STREET_NUMBER / LANEaddress2
SECTOR / AREA address3
SUB_DISTRICT / MUNICIPALITY / TOWN / LOCALITY / REGIONaddress4
Everything else with concatenated key-val pair address5
COUNTY / DISTRICT county_district
CITY / VILLAGE city_village

All sites are requested to post their addressing scheme on this ticket. Also how you find it mapping with addressing proposed in table above.

@mberg , @djazayeri , @alihabib , @ndisha , @raihan-mpower , @julkarnain , @sohelsarder , @jayantchaudhari7 , @gigix , @cagulas , @dimasciput , @raufdesu , @kercobo , @wahid-nwr , @MuhammadSafwan , @santoshtawde

maimoonak commented 9 years ago
MATT`s RESPONSE via EMAIL:

I think keeping with openmrs defaults makes sense as we want to link to clinical systems in the future.

One thing that would be nice to support is if the district could tie into a specified location hierarchy. We will want this data to feed into tools like dhis2 for example.

Only other comment is it might be helpful to have the ability to link to head of household in the address. We can do that though maybe in the relationship. I'm just wondering in the case where head of household is not registered in openmrs. Also hhid would be good especially for research sites. We can probably use and address field for that thoigh. This would actually be an important question to bounce of the science team to review as its more about content and less technical. Maybe just forward this email to some of the science team so it also captures my thoughts.

maimoonak commented 9 years ago
ALI`s RESPONSE via EMAIL:

The Address Hierarchy Module does what you are asking about.

maimoonak commented 9 years ago

This is done and implemented and committed to master. The documentation is here https://smartregister.atlassian.net/wiki/display/Documentation/OpenSRP+Person+Address+Scheme . If there is any change required we would open a new issue with exact changes required.

The address hierarchy module would be handled on openmrs side and not needed for this revision since we are just pushing data from OpenSRP.

The district mapping with predefined locations would be handled on client side and @raihan-mpower can provide input about how it would be achieved. @ndisha would coordinate on this with respective teams and if final product matches the requirements