profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/rbuisson/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

Bahmni/bahmni-core 81

Core OpenMRS modules for Bahmni (including ERP & ELIS Atom Feed Clients)

openmrs/openmrs-eip 6

An EIP toolbox for OpenMRS: the OpenMRS Camel Component and a Spring Boot app to launch it.

globalhealthcoalition/bahmni-config-sanpedro 0

Bahmni configuration and metadata for the San Pedro Bahmni distribution

globalhealthcoalition/bahmni-config-villaverde 0

Bahmni configuration and metadata for the Villa Verde Bahmni distribution

globalhealthcoalition/bahmni-distro-sanpedro 0

A lightweight, ready-to-use Bahmni distribution for San Pedro de Macoris outpatient clinic to support standardized terminology, work processes, and reporting analytics. http://globalhealthcoalition.org/

globalhealthcoalition/bahmni-distro-villaverde 0

A lightweight, ready-to-use Bahmni distribution for Villa Verde outpatient clinic to support standardized terminology, work processes, and reporting analytics. http://globalhealthcoalition.org/

globalhealthcoalition/openmrs-config-sanpedro 0

openmrs-module-initializer configuration for the San Pedro Bahmni distribution

globalhealthcoalition/openmrs-config-villaverde 0

openmrs-module-initializer configuration for the Villa Verde Bahmni distribution

rbuisson/appliance-os 0

Ansible playbooks to package the operating system for the server appliance

rbuisson/bacteriology 0

OpenMRS module for bacteriology - Specimen, Culture, DST and Smear

push eventopenmrs/openmrs-contrib-ansible-docker-compose

Rafal Korytkowski

commit sha e66f40e4d9796228f6c00d09031d36df69d5a7cd

Migrate OCL qa to qa.v1 follow up fix

view details

push time in a day

push eventopenmrs/openmrs-contrib-ansible-docker-compose

Rafal Korytkowski

commit sha f881e9a7aceab63320dfb75e1b5ad93eeace49f8

Migrate OCL demo to demo.v1

view details

push time in a day

push eventopenmrs/openmrs-contrib-ansible-docker-compose

Rafal Korytkowski

commit sha 468b6e04b011929686ebd152c2b374334cf99061

Migrating OCL qa to qa.v1

view details

push time in a day

startedk3s-io/k3s

started time in 2 days

push eventmekomsolutions/eip-routes-odoo

wluyima

commit sha d22aa0cf34849407a496f19c5326f45bc6d391ad

Added better handling of units to not use odoo database id

view details

push time in 2 days

pull request commentmekomsolutions/openmrs-module-initializer

Issue 96: Support for OCL export ZIP file

Thanks @ibacher for the review. I have updated with master and changed the PR title and description. Thank you so much for the support.

suruchee

comment created time in 2 days

pull request commentmekomsolutions/openmrs-module-initializer

Issue 96

@suruchee The code looks fine to me. A couple of points:

  1. This PR is marked as a draft; if you want it to be merged, it should be unmarked as a draft.
  2. There's apparently a conflict between your branch and master. Could you please update your local branch to resolve the conflict?
  3. Please title this PR something descriptive, e.g., "Support for OCL export ZIP file"
  4. In the description for the PR it would be helpful to mention the OpenMRS ticket for it.

Once you've taken care of the above points, I'd ask Dmitri or someone with commit access to this repo to review this.

Thanks for your work on this!

suruchee

comment created time in 2 days

push eventopenmrs/openmrs-contrib-ansible-docker-compose

Rafal Korytkowski

commit sha f6d3afd2160afae3b65c602e133d6a25c6e51a0a

Change staging to staging.v1

view details

Rafal Korytkowski

commit sha 7439fe9b79dcf341bcf8750c0d5dd1e427d7a47c

Change staging2 to point to staging

view details

push time in 2 days

push eventmekomsolutions/eip-routes-odoo

wluyima

commit sha a2d4597560dfb5d27d022e30376a0e925f04a4e4

Changed from using odoo product id to internal ref

view details

push time in 2 days

push eventmekomsolutions/eip-routes-odoo

wluyima

commit sha 95ec2568c23aa7419d4f297e23a26bc1683c6d26

Updated existing drug order line when quantity units change

view details

push time in 3 days

push eventmekomsolutions/eip-routes-odoo

wluyima

commit sha e431847b11caae1df00e2f015ada72381c1ebcbf

Always call the patient handler when processing an order, discontinue order route should not attempt to remove a non existent line

view details

push time in 3 days

push eventmekomsolutions/openmrs-module-initializer

mks-d

commit sha 63c0eed3442fe1568e094f4d639d9d587e2693ae

[#84] Validator to throw when no config dir is specified.

view details

push time in 4 days

Pull request review commentmekomsolutions/openmrs-module-initializer

Throw an IllegalArgumentException if location is specified with a nonexistent parent

 public void load_shouldLoadAccordingToCsvFiles() { 			Location loc = ls.getLocationByUuid("cbaaaab4-d960-4ae9-9b6a-8983fbd947b6"); 			Assert.assertThat(loc.getRetired(), is(true)); 		}+		// Verify that location with an invalid parent isn't created

@mks-d I've added this to test loading from csv

icrc-psousa

comment created time in 4 days

Pull request review commentmekomsolutions/openmrs-module-initializer

Throw an IllegalArgumentException if location is specified with a nonexistent parent

 public Location fill(Location loc, CsvLine line) throws IllegalArgumentException 		loc.setParentLocation(null); 		String parentId = line.getString(HEADER_PARENT, ""); 		if (!StringUtils.isEmpty(parentId)) {-			loc.setParentLocation(Utils.fetchLocation(parentId, locationService));+			Location parentLocation = Utils.fetchLocation(parentId, locationService);+			if (parentLocation != null) {+				loc.setParentLocation(parentLocation);+			} else {+				throw new IllegalArgumentException(+				        "Specified parent location with id '" + parentId + "' for '" + loc.getName() + "' not found ");

Updated exception message

icrc-psousa

comment created time in 4 days

Pull request review commentmekomsolutions/openmrs-module-commonreports

C2C-72: MSPP 'New episodes of disease' report

     "report.opdconsult.active" : "true",     "report.opdconsult.diagnosisQuestion.concept" : "95312123-e0c2-466d-b6b1-cb6e990d0d65",     "report.opdconsult.diagnosesList.concept" : "b3ea209f-9979-481b-9c64-b6dd883c75bf",-    "report.opdconsult.referredTo.concept" : "96408258-000b-424e-af1a-403919332938"+    "report.opdconsult.referredTo.concept" : "96408258-000b-424e-af1a-403919332938",+    "report.newEpisodesOfDiseases.conceptSet" : "c1ee4e1a-96d5-4cb1-82d1-95e367cfee20",

This is more definitive, thanks @rbuisson. I'll add the change to this effect.

Ruhanga

comment created time in 4 days

Pull request review commentmekomsolutions/openmrs-module-initializer

Throw an IllegalArgumentException if location is specified with a nonexistent parent

 public Location fill(Location loc, CsvLine line) throws IllegalArgumentException 		loc.setParentLocation(null); 		String parentId = line.getString(HEADER_PARENT, ""); 		if (!StringUtils.isEmpty(parentId)) {-			loc.setParentLocation(Utils.fetchLocation(parentId, locationService));+			Location parentLocation = Utils.fetchLocation(parentId, locationService);+			if (parentLocation != null) {+				loc.setParentLocation(parentLocation);+			} else {+				throw new IllegalArgumentException(+				        "Specified parent location with id '" + parentId + "' for '" + loc.getName() + "' not found ");
"The parent location for '" + loc.getName() + "' referenced by '" + parentId + "' does not point to any known location."
icrc-psousa

comment created time in 9 days

Pull request review commentmekomsolutions/openmrs-module-commonreports

C2C-72: MSPP 'New episodes of disease' report

     "report.opdconsult.active" : "true",     "report.opdconsult.diagnosisQuestion.concept" : "95312123-e0c2-466d-b6b1-cb6e990d0d65",     "report.opdconsult.diagnosesList.concept" : "b3ea209f-9979-481b-9c64-b6dd883c75bf",-    "report.opdconsult.referredTo.concept" : "96408258-000b-424e-af1a-403919332938"+    "report.opdconsult.referredTo.concept" : "96408258-000b-424e-af1a-403919332938",+    "report.newEpisodesOfDiseases.conceptSet" : "c1ee4e1a-96d5-4cb1-82d1-95e367cfee20",

Ok, thanks.

Ruhanga

comment created time in 5 days

Pull request review commentmekomsolutions/openmrs-module-commonreports

C2C-72: MSPP 'New episodes of disease' report

+package org.openmrs.module.commonreports.reports;++import java.io.File;+import java.sql.Connection;+import java.sql.SQLException;+import java.util.Iterator;+import java.util.List;+import org.dbunit.DatabaseUnitException;+import org.dbunit.DatabaseUnitRuntimeException;+import org.dbunit.database.DatabaseConfig;+import org.dbunit.database.DatabaseConnection;+import org.dbunit.database.IDatabaseConnection;+import org.dbunit.dataset.IDataSet;+import org.dbunit.ext.mysql.MySqlDataTypeFactory;+import org.dbunit.operation.DatabaseOperation;+import org.junit.Assert;+import org.junit.Before;+import org.junit.Test;+import org.openmrs.api.ConceptService;+import org.openmrs.module.commonreports.reports.BaseModuleContextSensitiveMysqlBackedTest;+import org.openmrs.module.commonreports.reports.NewEpisodesOfDiseasesReportManager;+import org.openmrs.module.initializer.Domain;+import org.openmrs.module.initializer.api.InitializerService;+import org.openmrs.module.initializer.api.loaders.Loader;+import org.openmrs.module.reporting.common.DateUtil;+import org.openmrs.module.reporting.dataset.DataSetRow;+import org.openmrs.module.reporting.evaluation.EvaluationContext;+import org.openmrs.module.reporting.report.ReportData;+import org.openmrs.module.reporting.report.ReportDesign;+import org.openmrs.module.reporting.report.definition.ReportDefinition;+import org.openmrs.module.reporting.report.definition.service.ReportDefinitionService;+import org.openmrs.module.reporting.report.manager.ReportManagerUtil;+import org.openmrs.module.reporting.report.service.ReportService;+import org.springframework.beans.factory.annotation.Autowired;+import org.springframework.beans.factory.annotation.Qualifier;+import liquibase.Liquibase;+import liquibase.database.Database;+import liquibase.database.DatabaseFactory;+import liquibase.database.jvm.JdbcConnection;+import liquibase.resource.ClassLoaderResourceAccessor;++import static java.math.BigDecimal.ONE;+import static org.junit.Assert.assertEquals;+import static org.junit.Assert.assertNull;+import static org.junit.Assert.assertTrue;++public class NewEpisodesOfDiseasesReportManagerTest extends BaseModuleContextSensitiveMysqlBackedTest {+	+	public NewEpisodesOfDiseasesReportManagerTest() throws SQLException {+		super();+	}+	+	@Autowired+	private InitializerService iniz;+	+	@Autowired+	private ReportService rs;+	+	@Autowired+	private ReportDefinitionService rds;+	+	@Autowired+	@Qualifier("conceptService")+	private ConceptService cs;+	+	@Autowired+	private NewEpisodesOfDiseasesReportManager manager;+	+	@Override+	public void executeDataSet(IDataSet dataset) {+		try {+			Connection connection = getConnection();+			IDatabaseConnection dbUnitConn = setupDatabaseConnection(connection);+			DatabaseOperation.REFRESH.execute(dbUnitConn, dataset);+		}+		catch (Exception e) {+			throw new DatabaseUnitRuntimeException(e);+		}+	}+	+	private IDatabaseConnection setupDatabaseConnection(Connection connection) throws DatabaseUnitException {+		IDatabaseConnection dbUnitConn = new DatabaseConnection(connection);+		+		DatabaseConfig config = dbUnitConn.getConfig();+		config.setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new MySqlDataTypeFactory());+		+		return dbUnitConn;+	}+	+	@Before+	public void setUp() throws Exception {+		updateDatabase("org/openmrs/module/commonreports/liquibase/test-liquibase.xml");+		executeDataSet("org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.0.xml");+		executeDataSet("org/openmrs/module/commonreports/include/NewEpisodesOfDiseasesTestDataset.xml");+		+		String path = getClass().getClassLoader().getResource("testAppDataDir").getPath() + File.separator;+		System.setProperty("OPENMRS_APPLICATION_DATA_DIRECTORY", path);+		+		for (Loader loader : iniz.getLoaders()) {+			if (loader.getDomainName().equals(Domain.JSON_KEY_VALUES.getName())) {+				loader.load();+			}+		}+	}+	+	@Test+	public void setupReport_shouldCreateExcelTemplateDesign() throws Exception {+		// setup+		+		// replay+		ReportManagerUtil.setupReport(manager);+		+		// verif+		List<ReportDesign> designs = rs.getAllReportDesigns(false);+		Assert.assertEquals(1, rs.getAllReportDesigns(false).size());+		+		ReportDesign design = designs.get(0);+		Assert.assertEquals("7688966e-fca5-4fde-abab-1b46a87a1185", design.getUuid());+		Assert.assertEquals(NewEpisodesOfDiseasesReportManager.REPEATING_SECTION,+		    design.getProperties().get("repeatingSections"));+		Assert.assertEquals(1, design.getResources().size());+		+		ReportDefinition def = design.getReportDefinition();+		Assert.assertEquals("8b787bdc-c852-481c-b6fa-6683ec7e30d8", def.getUuid());+	}+	+	@Test+	public void testReport() throws Exception {+		// setup+		EvaluationContext context = new EvaluationContext();+		context.addParameterValue("startDate", DateUtil.parseDate("2008-08-01", "yyyy-MM-dd"));+		context.addParameterValue("endDate", DateUtil.parseDate("2009-09-30", "yyyy-MM-dd"));+		boolean malariaVerified = false;+		boolean feverVerified = false;+		boolean diabetesVerified = false;+		+		// replay+		ReportDefinition rd = manager.constructReportDefinition();+		ReportData data = rds.evaluate(rd, context);+		+		// verify+		for (Iterator<DataSetRow> itr = data.getDataSets().get(rd.getName()).iterator(); itr.hasNext();) {+			DataSetRow row = itr.next();+			if (row.getColumnValue("Maladies/Symptomes").equals("MALARIA")) {+				assertEquals(ONE, row.getColumnValue("F_25-49"));+				assertEquals(ONE, row.getColumnValue("M_1-4"));+				assertEquals(ONE, row.getColumnValue("M_Total"));+				assertEquals(ONE, row.getColumnValue("F_Total"));+				malariaVerified = true;+			}+			if (row.getColumnValue("Maladies/Symptomes").equals("FEVER")) {+				assertEquals(ONE, row.getColumnValue("M_1-4"));+				assertEquals(ONE, row.getColumnValue("M_Total"));+				assertNull(row.getColumnValue("F_Total"));+				feverVerified = true;+			}+			if (row.getColumnValue("Maladies/Symptomes").equals("DIABETES")) {+				assertEquals(ONE, row.getColumnValue("M_1-4"));+				assertEquals(ONE, row.getColumnValue("M_Total"));+				assertNull(row.getColumnValue("F_Total"));+				diabetesVerified = true;+			}+		}+		assertTrue(malariaVerified && feverVerified && diabetesVerified);+	}+	+	private void updateDatabase(String filename) throws Exception {+		Liquibase liquibase = getLiquibase(filename);+		liquibase.update("Modify column datatype to longblob on reporting_report_design_resource table");+		liquibase.getDatabase().getConnection().commit();+	}+	+	private Liquibase getLiquibase(String filename) throws Exception {+		Database liquibaseConnection = DatabaseFactory.getInstance()+		        .findCorrectDatabaseImplementation(new JdbcConnection(getConnection()));+		+		liquibaseConnection.setDatabaseChangeLogTableName("LIQUIBASECHANGELOG");+		liquibaseConnection.setDatabaseChangeLogLockTableName("LIQUIBASECHANGELOGLOCK");+		+		return new Liquibase(filename, new ClassLoaderResourceAccessor(getClass().getClassLoader()), liquibaseConnection);+	}

In tests, the tables are built from their hibernate Entity's mappings whilst at runtime, liquibase changesets are used. To test the design resource - the report template, I had to simulate an identical reporting_report_design_resource table to that at runtime.

Ruhanga

comment created time in 5 days

Pull request review commentmekomsolutions/openmrs-module-commonreports

C2C-72: MSPP 'New episodes of disease' report

     "report.opdconsult.active" : "true",     "report.opdconsult.diagnosisQuestion.concept" : "95312123-e0c2-466d-b6b1-cb6e990d0d65",     "report.opdconsult.diagnosesList.concept" : "b3ea209f-9979-481b-9c64-b6dd883c75bf",-    "report.opdconsult.referredTo.concept" : "96408258-000b-424e-af1a-403919332938"+    "report.opdconsult.referredTo.concept" : "96408258-000b-424e-af1a-403919332938",+    "report.newEpisodesOfDiseases.conceptSet" : "c1ee4e1a-96d5-4cb1-82d1-95e367cfee20",+    "report.newEpisodesOfDiseases.question.concept" : "95312123-e0c2-466d-b6b1-cb6e990d0d65",

Just to confirm, this question concept will likely hold 2 answers in our case

I'd prefer to have a question(s) concept set, meaning a configurable set containing questions to report on.

Ruhanga

comment created time in 5 days

Pull request review commentmekomsolutions/openmrs-module-commonreports

C2C-72: MSPP 'New episodes of disease' report

+package org.openmrs.module.commonreports.reports;++import java.sql.Connection;+import java.sql.SQLException;+import java.time.ZoneId;+import java.util.TimeZone;++import org.dbunit.DatabaseUnitException;+import org.dbunit.DatabaseUnitRuntimeException;+import org.dbunit.database.DatabaseConfig;+import org.dbunit.database.DatabaseConnection;+import org.dbunit.database.IDatabaseConnection;+import org.dbunit.dataset.IDataSet;+import org.dbunit.ext.mysql.MySqlDataTypeFactory;+import org.dbunit.operation.DatabaseOperation;+import org.hibernate.dialect.MySQLDialect;+import org.junit.AfterClass;+import org.junit.BeforeClass;+import org.openmrs.test.BaseModuleContextSensitiveTest;+import com.wix.mysql.EmbeddedMysql;+import com.wix.mysql.config.Charset;+import com.wix.mysql.config.MysqldConfig;+import com.wix.mysql.config.SchemaConfig;++import static com.wix.mysql.distribution.Version.v5_6_latest;++public abstract class BaseModuleContextSensitiveMysqlBackedTest extends BaseModuleContextSensitiveTest {+	+	public BaseModuleContextSensitiveMysqlBackedTest() throws SQLException {+		super();+	}+	+	private static EmbeddedMysql embeddedMysql;+	+	private static String databaseUrl = "jdbc:mysql://localhost:3344/openmrs?autoReconnect=true&sessionVariables=default_storage_engine%3DInnoDB&useUnicode=true&characterEncoding=UTF-8";+	+	private static String databaseUsername = "test";+	+	private static String databaseUserPasswword = "password";+	+	private static String databaseDialect = MySQLDialect.class.getName();+	+	private static String databaseDriver = "com.mysql.jdbc.Driver";+	+	@Override+	public void executeDataSet(IDataSet dataset) {+		try {+			Connection connection = getConnection();+			IDatabaseConnection dbUnitConn = setupDatabaseConnection(connection);+			DatabaseOperation.REFRESH.execute(dbUnitConn, dataset);+		}+		catch (Exception e) {+			throw new DatabaseUnitRuntimeException(e);+		}+	}+	+	private IDatabaseConnection setupDatabaseConnection(Connection connection) throws DatabaseUnitException {+		IDatabaseConnection dbUnitConn = new DatabaseConnection(connection);+		+		DatabaseConfig config = dbUnitConn.getConfig();+		config.setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new MySqlDataTypeFactory());+		+		return dbUnitConn;+	}+	+	@BeforeClass+	public static void setupMySqlDb() {+		MysqldConfig config = MysqldConfig.aMysqldConfig(v5_6_latest).withPort(3344).withCharset(Charset.UTF8)+		        .withTimeZone(TimeZone.getTimeZone(ZoneId.of("UTC"))).withUser(databaseUsername, databaseUserPasswword)+		        .build();+		+		SchemaConfig schemaConfig = SchemaConfig.aSchemaConfig("openmrs").build();+		+		embeddedMysql = EmbeddedMysql.anEmbeddedMysql(config).addSchema(schemaConfig).start();

I believe some of the SQL syntax used in the report queries were not supported in H2

Correct @rbuisson, some correct SQL syntax is not supported on H2.

Ruhanga

comment created time in 5 days

push eventmekomsolutions/eip-routes-odoo

wluyima

commit sha 9152f0aaf7482af243beec75e1f8ab5f9d684240

Replaced the use of odoo identifier type to store odoo id with ref field

view details

push time in 6 days

push eventmekomsolutions/eip-routes-odoo

wluyima

commit sha 50a01936639a50a35f710bdc107166842307a484

Fixed broken routes and removed save identifier route

view details

push time in 6 days

PR opened mekomsolutions/openmrs-config-c2c

C2c lb
+143 -141

0 comment

2 changed files

pr created time in 6 days