Table of Contents | ||||||||
---|---|---|---|---|---|---|---|---|
|
As of version OpenMRS v1.5 most objects/tables have a UUID property. This property is automatically filled in for every row and is 99.9% guaranteed to be unique across the universe. The primary reason for uuids is to support the Sync Module and allow for identifying objects that are identical across different OpenMRS installations.
The uuid value will be hexidecimal digits in the form of 8chars-4-4-4-12chars (e.g 0febc204-bca1-11de-913d-0010c6dffd0f). Depending on whether mysql or java generates these (see below), the uuid could be in version 1 or version 4 respectively.
The uuid can really be any unique string within the table, but to follow conventions, all of our uuids are hex 36 characters.
...
There have been issues with mysql on windows and not getting unique uuids [archive:1] . To find those duplicates, you can run this sql:
...
Also in OpenMRS 1.5 there came a number of base abstract classes to define common metadata on objects. One of these objects was the http://resources.openmrs.org/doc/org/openmrs/ OpenmrsObject. html OpenmrsObject.]. If an object extends this class and gets passed through an API method of the form of "save*(OpenmrsObject obj)", then the uuid property is automatically generated and saved along with the object. See API Save Handlers for more information about that magic.
...