Re: [Dhis2-devs] Generating Facility Codes for a Facility Registry in Sierra Leone
Second approach sounds most painless to me. A 3rd approach (shooting from the hip) is to create a postgres trigger function to generate codes on insert. On 24 November 2015 at 15:27, Carl Leitnerwrote: > Hi all, > 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. > > > Cheers, > -carl > > > ___ > Mailing list: https://launchpad.net/~dhis2-devs > Post to : dhis2-devs@lists.launchpad.net > Unsubscribe : https://launchpad.net/~dhis2-devs > More help : https://help.launchpad.net/ListHelp > ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] Generating Facility Codes for a Facility Registry in Sierra Leone
Hi All, Just to clarify this code would be used as a way for a human to refer to the facility. On the back end, we would still very much make use of the UUID as an unchanging ID. Cheers, -carl > On Nov 24, 2015, at 10:27 AM, Carl Leitnerwrote: > > Hi all, > 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. > > > Cheers, > -carl > ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
[Dhis2-devs] Generating Facility Codes for a Facility Registry in Sierra Leone
Hi all, 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. Cheers, -carl ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp