Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,13 @@ public void started() {
try {
// enable disable apps of in coreapps
ugandaEMRService.disableEnableAPPS();
DataImporter dataImporter = Context.getRegisteredComponent("dataImporter", DataImporter.class);

// install common metadata
ugandaEMRService.installCommonMetadata();
GlobalProperty initialiseMetaDataOnStart = administrationService.getGlobalPropertyObject("ugandaemr.initialiseMetadataOnStart");
if (initialiseMetaDataOnStart.getPropertyValue().equals("true")) {
DataImporter dataImporter = Context.getRegisteredComponent("dataImporter", DataImporter.class);

// initialise forms and concepts and other metadata like privileges, personal attribute types
importInternalMetaData(dataImporter);
for (Initializer initializer : ugandaEMRService.initialiseForms()) {
Expand All @@ -78,8 +82,9 @@ public void started() {
administrationService.saveGlobalProperty(initialiseMetaDataOnStart);
}

// install common metadata
ugandaEMRService.installCommonMetadata();
dataImporter.importData("metadata/appointment.xml");

dataImporter.importData("metadata/Programs.xml");

// initialise primary Identifier
ugandaEMRService.initializePrimaryIdentifierTypeMapping();
Expand Down Expand Up @@ -155,9 +160,7 @@ private void importInternalMetaData(DataImporter dataImporter) {
dataImporter.importData(metaDataFilePath + "concepts_and_drugs/Concept_Modifications.xml");
log.info("import to Concept Modifications Table Successful");

log.info("import of Drugs Starting");
dataImporter.importData(metaDataFilePath + "appointment.xml");
log.info("import of Drugs Successful");


log.info("import of ICD 11 concepts Starting");
dataImporter.importData(metaDataFilePath + "concepts_and_drugs/icd_11/icd_11_import_concept.xml");
Expand Down Expand Up @@ -235,9 +238,7 @@ private void importInternalMetaData(DataImporter dataImporter) {
dataImporter.importData(metaDataFilePath + "RelationshipTypes.xml");
log.info("UgandaEMR Relationship Types Imported");

log.info("Start import of Program related objects");
dataImporter.importData(metaDataFilePath + "Programs.xml");
log.info(" Program related objects Imported");


log.info("Start import of orderFrequencies related objects");
dataImporter.importData(metaDataFilePath + "order_frequency.xml");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ public void install() throws Exception {
install(LocationTags.SUPPORTIVE_SERVICE);
install(LocationTags.ADMISSION);
install(LocationTags.QUEUE_ROOM);
install(LocationTags.LOGIN_LOCATION);
install(LocationTags.VISIT_LOCATION);

log.info("Installing Organizations");
installLocation(LocationOrganization.PARENT);

log.info("Installing Departments");
installLocation(LocationDepartments.IPD);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ public String description() {

@Override
public String name() {
return Context.getLocationService().getLocationByUuid("629d78e9-93e5-43b0-ad8a-48313fd99117").getName();
String DEFAULT_HEALTH_CENTER_NAME = "Health Center Name";

org.openmrs.Location location = Context.getLocationService().getLocationByUuid("629d78e9-93e5-43b0-ad8a-48313fd99117");
String name = (location != null) ? location.getName() : DEFAULT_HEALTH_CENTER_NAME;

return name;
}

@Override
Expand Down
8 changes: 0 additions & 8 deletions api/src/main/resources/liquibase.xml
Original file line number Diff line number Diff line change
Expand Up @@ -697,14 +697,6 @@ VALUES
<comment> Updating family member's hiv unknown status concept id in obs table </comment>
<sql> UPDATE obs SET value_coded = 90001 where value_coded = 165165 and concept_id = 165275; </sql>
</changeSet>
<changeSet id="ugandaemr-20230413-1122" author="semujju">
<comment>
Change htmlformentry_html_form table to UTF-8 encoding
</comment>
<sql>
ALTER TABLE htmlformentry_html_form CONVERT TO CHARACTER SET UTF8;
</sql>
</changeSet>
<changeSet id="ugandaemr-20230425-1730" author="dbaluku">
<comment>
next gen reports uuids for exchange
Expand Down