Re: [Dhis2-devs] Generating Facility Codes for a Facility Registry in Sierra Leone

2015-11-24 Thread Bob Jolliffe
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 Leitner wrote: > Hi all, > We are looking at using DHIS2 to manage facilities for a

Re: [Dhis2-devs] Generating Facility Codes for a Facility Registry in Sierra Leone

2015-11-24 Thread Carl Leitner
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 Leitner wrote: > > Hi all, > We are

[Dhis2-devs] Generating Facility Codes for a Facility Registry in Sierra Leone

2015-11-24 Thread Carl Leitner
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