dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #25472
monitoring orgunit changes
orgunits effectively have coded parameters, for example Type and Ownership.
A problem is that if these are changed (eg. change type to 'Health
Centre'), there is no simple way to know whether this orgunit has been
updated or not. This is important if you want to relay changes from the
dhis server to another system. And presumably affects our FRED
implementation.
Attached workaround uses an sql trigger to force an orgunit timestamp when
any of its group memberships change. This is obviously postgres specific
and would need to be translated for the likes of mysql.
This works like a charm, but is it the desired behaviour? Depends really
on how we choose to interpret lastUpdated. If it is, should we consider
dhis taking care of this itself.
If this is the wrong approach can anyone suggest another?
Bob
Attachment:
trigger.sql
Description: Binary data
Follow ups