Wiki Spaces

Documentation
Projects
Resources

Get Help from Others

Q&A: Ask OpenMRS
Discussion: OpenMRS Talk
Real-Time: IRC Chat | Slack

Documentation

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: a clarifying note on the one-to-one relationships in the relational diagram

...

Gliffy Diagram
nameMetadata Mapping Table Design

Note that in this diagram, the one-to-one mapping between metadata_source and openmrs_metadata, for example, indicates an inheritance in object design terms: MetadataSource inherits the fields of OpenmrsMetadata. In the database schema, this relationship will be implemented so that the relation metadata_source, for example, includes all the columns of openmrs_metadata.

Notes on data model design

...

  • metadata_source is used to define a unique source (authority) for each namespace of metadata terms.
    • name should be fully qualified and universally unique.
  • metadata_term_mapping table provides both the term and its mapping to local metadata.
    • code should be unique within the given source.
    • metadata_class refers to the Java class for the metadata.
    • metadata_reference is a unique reference to the metadata within the class (e.g., uuid)
  • metadata_set is used to define relating grouping of metadata similar to what OpenMRS has traditionally done within global properties and similar to FHIR's ValueSet for metadata terms.
    • sort_weight is used to optionally give members of a metadata set a reliable sequence.

...