openmrs-module-initializer icon indicating copy to clipboard operation
openmrs-module-initializer copied to clipboard

Support domain for metadata sources

Open mseaton opened this issue 4 years ago • 3 comments

Currently, there is a domain for metadatatermmappings, which allow recording terms within a metadata source. However, there is no mechanism for creating that metadatasource that the terms refer to. This leads to errors upon startup and loading terms that depend on a given source, as there is no way to ensure that sources created in other modules are available.

Likely this requires adding a new entry to Domain.java, and new MetadataSourceCsvParser, MetadataSourceLineProcessor, and MetadataSourceLoader to the existing org.openmrs.module.api.mdm package, adding relevant unit tests, and updating the README to reflect this addition.

This is most immediately pertinent to anyone who wishes to use Initializer to add the emrapi mapping terms, as the EMR API module activator adds in the necessary source if it does not exist, but does not necessarily load before Initializer runs (as Initializer is not aware of it). The same would be true for any other metadata sources, but this is the primary use case that led to this ticket.

mseaton avatar May 28 '21 15:05 mseaton

@mseaton is this still current or we can close this issue?

mks-d avatar Jun 28 '24 13:06 mks-d

This is still current AFAIK

mseaton avatar Jun 28 '24 14:06 mseaton