dhis2-devs team mailing list archive
Mailing list archive
Generating Facility Codes for a Facility Registry in Sierra Leone
We are looking at using DHIS2 to manage facilities for a Facility Registry in Sierra Leone. One of the requirements is that they have a facility code that combines:
an sub-code to indicate the region the facility is in
an incremental counter of the region
These codes don’t need to be immediately available. On a routine basis (e.g. nightly) the facility list will be sent to the InterLinked Registry / OpenInfoMan for wider sharing for example with mHero.
I don’t think that there is anything to automatically generate codes codes for facilities in DHIS2 using rules like the above. I am looking for some suggestions. A couple of (half-baked) ideas include:
create a DHIS2 Web App to create new facilities with the logic implemented above
create a script that runs on a cron job that will look for any facilities without a code and modify their records to add the code based on the rules above
I think the second possibilities would be the simplest to implement.