nmrs-nigeria / openmrs-module-nigeriaemr

NMRS NDR Extration Module for NigeriaMRS
1 stars 15 forks source link

Calculating partner_reporting_state, partner_reporting_lga_code from NDR END #131

Closed brightoibe closed 4 years ago

brightoibe commented 4 years ago

Hello Team, I feel that asking the state people to change each NMRS instance partner_reporting_lga_code as they deploy from one LGA to the other may not be user friendly. Am proposing that the individual xml files be named

DATIMID +"" +PEPFARID +""+TIMESTAMP.xml

NDR uses the DATIMID to calculate

partner_reporting_state partner_reporting_lga_code

for each facility. This will make configuration of each NMRS instance easier for our state teams.

wandechris commented 4 years ago

@ahmedsylvanus @caniekwe kindly advise

caniekwe commented 4 years ago

This process does not have any impact whatsoever on the data. Its just a file naming convention. Having the state and lga is also useful for tracking files and troubleshooting. I also do not think this will take any significant amount of effort considering that it is a one off step. @brightoibe can you provide scenarios how you think this will impact user experience?

brightoibe commented 4 years ago

Thank you @caniekwe for your comments. You may recall the recall the nightmare we went through to configure DATIMIDs on the global properties, "Upper Case, Lower Case",embedded spaces and even wrong DATIM IDs. Also remember that some IPs are operating in lots of LGA, meaning that for each you have to return there and configure an LGA and State Code for all the NMRS instances. @wandechris, @wonderfulguru1 and Team is it possible to explore the possibility of storing this coding system as a table (sql script) in the back-end. While the plugin reads the correct LGA and State from that table using DATIM ID and creates the files automatically to reduce human contact in the global properties as much as possible.

wandechris commented 4 years ago

@brightoibe is there a dictionary for this mapping?

cc @caniekwe @ahmedsylvanus

brightoibe commented 4 years ago

Thank you @wandechris . We can create a standard "facilities" table with state,lga and datim codes as sql file and preload into the NMRS database. When the plugin looks up your DATIM code on that table it will get your LGA and State Code automatically and use it to name all the XML files.

wandechris commented 4 years ago

@brightoibe I'm asking is there's any that exists today, that can be converted into the SQL

brightoibe commented 4 years ago

@wandechris Thank you. There is none. The site list I have is IHVN specific. The best place to get facility listing across IP is from the NDR facility list. If you dump the NDR site list in Excel, we can turn it into MySQL compatible SQL script and preload into all NMRS instances using the meta-data module. This will reduce the error of assigning wrong LGA code or State Code to a facility.

wandechris commented 4 years ago

@brightoibe this is addressed by this PR https://github.com/nmrs-nigeria/openmrs-module-nigeriaemr/pull/135

a table will be created in openmrs and statecode and lgacode will be retrieved using the already configured datimid

brightoibe commented 4 years ago

Thank you very much @wandechris and Team for the effort. This will save us a lot of stress. The issue can now be closed.

wandechris commented 4 years ago

@brightoibe kindly take some time to review the pr too :)