mekomsolutions / openmrs-module-initializer

The OpenMRS Initializer module is an API-only module that processes the content of the configuration folder when it is found inside OpenMRS' application data directory.
MIT License
23 stars 79 forks source link

Support domain for metadata sources #120

Open mseaton opened 3 years ago

mseaton commented 3 years ago

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.

mks-d commented 5 months ago

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

mseaton commented 5 months ago

This is still current AFAIK

mogoodrich commented 1 month ago

@mks-d @rbuisson this may be a blocker (though we could potentially work around) to getting the EMR API module installed as part of the reference app, and therefore to get the Ward app running in the Ref App. Is this something we could potentially prioritize? (I am starting to work on the other elements of getting EMR API running within the reference app now)