profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/bharatak/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.

bharatak/bahmni-lite 3

A lighter version of Bahmni EMR as a Docker Image.

bharatak/AngularJS-Jasmine-Karma 0

Basics of using jasmine as a testing framework to test angular apps with karma/grunt

bharatak/bahmni-core 0

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

bharatak/bahmni-docker 0

docker containers for bahmni

bharatak/bahmni-gauge 0

Bahmni Automation Test Suite using Gauge Framework

bharatak/bahmni-idea-plugin 0

Prototype of intellij plugin for Bahmni

bharatak/bahmni-package 0

Repository of bahmni deployment and RPMs

bharatak/bharatak.github.io 0

Build a Jekyll blog in minutes, without touching the command line.

push eventopenmrs/openmrs-module-oauth2login

Ian

commit sha 611fe5ff60365d912760dcf05a55188ba0c2529c

Travis -> GitHub Actions Feel free to revert, but see https://talk.openmrs.org/t/ci-within-openmrs-bamboo-vs-travis-vs-github-actions-vs-azure-pipelines/31252/6

view details

push time in 3 days

delete branch openmrs/openmrs-esm-login

delete branch : updates

delete time in 3 days

delete branch openmrs/openmrs-esm-login

delete branch : fix-nav

delete time in 3 days

delete branch openmrs/openmrs-esm-login

delete branch : config-4

delete time in 3 days

delete branch openmrs/openmrs-esm-login

delete branch : babel-eslint

delete time in 3 days

delete branch openmrs/openmrs-esm-login

delete branch : MF-52-config-skel

delete time in 3 days

delete branch openmrs/openmrs-esm-login

delete branch : deps

delete time in 3 days

delete branch openmrs/openmrs-esm-login

delete branch : no-loc-found

delete time in 3 days

delete branch openmrs/openmrs-esm-login

delete branch : hotfix/login

delete time in 3 days

delete branch openmrs/openmrs-esm-login

delete branch : feature/new-app-shell

delete time in 3 days

push eventopenmrs/openmrs-esm-login

Florian Rappl

commit sha 4aa32b2874391325ebfdd8bddde40a1f44765a3c

Merged with local changes

view details

Florian Rappl

commit sha d0d0db160183bdb8c399454c828a7e235a7122e1

Improved the login screen (enter)

view details

push time in 3 days

push eventopenmrs/openmrs-esm-login

Manuel Römer

commit sha 0473416d4ded7f7d6c12a1cc1da3411bf84c8413

Added .editorconfig and prettier. (#105)

view details

push time in 5 days

PR merged openmrs/openmrs-esm-login

Added .editorconfig and added/ran prettier.

The repository was missing the .editorconfig and prettier configuration files which made any commit on my machine fail due styling issues found in the pre-commit hook. I simply copied the files/config from the patient-registration repo here.

⚠ Feel free to abandon this PR if these changes are undesired or if they come at a bad time (e.g. due to merge conflicts with other open PRs).

+531 -645

0 comment

26 changed files

manuelroemer

pr closed time in 5 days

PR opened openmrs/openmrs-esm-login

Added .editorconfig and added/ran prettier.

The repository was missing the .editorconfig and prettier configuration files which made any commit on my machine fail due styling issues found in the pre-commit hook. I simply copied the files/config from the patient-registration repo here.

⚠ Feel free to abandon this PR if these changes are undesired or if they come at a bad time (e.g. due to merge conflicts with other open PRs).

+531 -645

0 comment

26 changed files

pr created time in 5 days

issue openedopenmrs/openmrs-module-oauth2login

Build Application

Hi

Can you please indicate in the document on how to build this, also if possible please provide requirements or configuration to build this. I'm having trouble building the source code.

Thanks in advance

Non-resolvable parent POM for org.openmrs.module:oauth2login:1.0.0-SNAPSHOT: Could not transfer artifact org.openmrs.maven.parents:maven-parent-openmrs-module:pom:1.1.1 from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [openmrs-repo (http://mavenrepo.openmrs.org/nexus/content/repositories/public, default, releases+snapshots)] and 'parent.relativePath' points at wrong local POM @ org.openmrs.module:oauth2login:1.0.0-SNAPSHOT,

created time in 5 days

pull request commentopenmrs/openmrs-module-datafilter

FILTER-7: Upgrade to OpenMRS 2.4.

So does it mean the module no longer supports 2.3.x versions? I suggest we should tag master before merging this PR

icrc-psousa

comment created time in 9 days

Pull request review commentopenmrs/openmrs-module-datafilter

FILTER-7: Upgrade to OpenMRS 2.4.

 import org.openmrs.module.datafilter.registration.HibernateFilterRegistration; import org.openmrs.util.OpenmrsClassLoader; import org.powermock.api.mockito.PowerMockito;+import org.powermock.core.classloader.annotations.PowerMockIgnore; import org.powermock.core.classloader.annotations.PrepareForTest; import org.powermock.modules.junit4.PowerMockRunner; import org.w3c.dom.Document;  @RunWith(PowerMockRunner.class)+@PowerMockIgnore({ "org.xml.*" })

Yes, not sure if it's the right thing to do but, tried that with org.openmrs.module.datafilter.Util. The exception occurs on this Util class, here: Transformer transformer = transformerFactory.newTransformer(new StreamSource(xslt)); But, then got some null pointer exceptions as there's a lot of things statically initialized on that class.

icrc-psousa

comment created time in 9 days

Pull request review commentopenmrs/openmrs-module-datafilter

FILTER-7: Upgrade to OpenMRS 2.4.

 public void doFilter_shouldAlwaysResetTheFiltersOnTheCurrentThread() throws Exce 		ThreadLocal areFiltersSet = new ThreadLocal(); 		areFiltersSet.set(true); 		Whitebox.setInternalState(DataFilterSessionContext.class, "areFiltersSet", areFiltersSet);+		// FIXE: No idea why the bellow assert is failing 		assertNotNull(((ThreadLocal) Whitebox.getInternalState(DataFilterSessionContext.class, "areFiltersSet")).get());

Thanks @wluyima, the change of behaviour regarding the final field would explain the issue. I've updated the pull request with the annotations above and, it's now working as expected. Thanks for your analisis.

icrc-psousa

comment created time in 10 days

PR opened openmrs/openmrs-module-dhisconnector

DCM-14: Create quarterly picker in run reports

Issue

DCM-14: Support quarterly period type in run reports

Approach

  • Extended the switch case in the run reports js file to catch the period type quarterly
  • Created a new function to initialize the quarterly year picker and quarter selector
  • Created a new function to handle the changes of the above two elements

Screenshots

image

+82 -0

0 comment

2 changed files

pr created time in 10 days

push eventopenmrs/openmrs-module-dhisconnector

Heshan Andrews

commit sha b5a5bf44c823d6b40412bd32ec8cd702d5ed2194

DCM-33: Support Quarterly Period type in automation (#26)

view details

push time in 10 days

PR merged openmrs/openmrs-module-dhisconnector

Reviewers
DCM-33 - Support Quarterly Period Type in Automation

Issue

DCM-33 Support Quarterly Period Type in Automation

Approach

  • Updated the function src/main/java/org/openmrs/module/dhisconnector/api/impl/DHISConnectorServiceImpl.java:transformToDHISPeriod
  • Appended another else if block to the existing if else to catch the Quarterly Type
  • Compared the current start date with the quarterly boundary dates to find the correct quarter.
  • Created a function to get the quarter number for a given date.
  • Configured it to return a period in the format of yyyyQn where n is the quarter number.
+38 -1

0 comment

2 changed files

Gravewalker666

pr closed time in 10 days

Pull request review commentopenmrs/openmrs-module-dhisconnector

DCM-33 - Support Quarterly Period Type in Automation

 public String transformToDHISPeriod(Calendar startDate, Calendar endDate, String 			if (lastRun == null || !(lastRan.get(Calendar.YEAR) + "S" + getHalfYearApril(lastRan)) 					.equals(endDate.get(Calendar.YEAR) + "S" + getHalfYearApril(endDate))) 				period = startDate.get(Calendar.YEAR) + "S" + getHalfYearApril(startDate);+		} else if (ReportingPeriodType.Quarterly.name().equals(periodType)) {+			// Set the correct start date of the last Quarterly period+			if (startDate.get(Calendar.MONTH) < Calendar.APRIL) {+				startDate.add(Calendar.YEAR, -1);+				startDate.set(Calendar.MONTH, Calendar.OCTOBER);+			} else if (startDate.get(Calendar.MONTH) < Calendar.JULY) {+				startDate.set(Calendar.MONTH, Calendar.JANUARY);+			} else if (startDate.get(Calendar.MONTH) < Calendar.OCTOBER) {+				startDate.set(Calendar.MONTH, Calendar.APRIL);+			} else {+				startDate.set(Calendar.MONTH, Calendar.JULY);+			}+			startDate.set(Calendar.DAY_OF_MONTH, 1);+			setBasicsStartsAndEnds(startDate, endDate);+			// set the end date to the last day of the current period+			endDate.add(Calendar.MONTH, 2);+			endDate.set(Calendar.DAY_OF_MONTH, endDate.getActualMaximum(Calendar.DAY_OF_MONTH));+			if (lastRan == null || !(lastRan.get(Calendar.YEAR) + "Q" + getQuarterNumber(lastRan))+					.equals(endDate.get(Calendar.YEAR) + "Q" + getQuarterNumber(endDate)))

Resolved with the commit ec7e220 Please review

Gravewalker666

comment created time in 10 days

Pull request review commentopenmrs/openmrs-module-dhisconnector

DCM-33 - Update the function to Support Quarterly Period Type in Automation

 public String transformToDHISPeriod(Calendar startDate, Calendar endDate, String 			if (lastRun == null || !(lastRan.get(Calendar.YEAR) + "S" + getHalfYearApril(lastRan)) 					.equals(endDate.get(Calendar.YEAR) + "S" + getHalfYearApril(endDate))) 				period = startDate.get(Calendar.YEAR) + "S" + getHalfYearApril(startDate);+		} else if (ReportingPeriodType.Quarterly.name().equals(periodType)) {+			// Set the correct start date of the last Quarterly period+			if (startDate.get(Calendar.MONTH) < Calendar.APRIL) {+				startDate.add(Calendar.YEAR, -1);+				startDate.set(Calendar.MONTH, Calendar.OCTOBER);+			} else if (startDate.get(Calendar.MONTH) < Calendar.JULY) {+				startDate.set(Calendar.MONTH, Calendar.JANUARY);+			} else if (startDate.get(Calendar.MONTH) < Calendar.OCTOBER) {+				startDate.set(Calendar.MONTH, Calendar.APRIL);+			} else {+				startDate.set(Calendar.MONTH, Calendar.JULY);+			}+			startDate.set(Calendar.DAY_OF_MONTH, 1);+			setBasicsStartsAndEnds(startDate, endDate);+			// set the end date to the last day of the current period+			endDate.add(Calendar.MONTH, 2);+			endDate.set(Calendar.DAY_OF_MONTH, endDate.getActualMaximum(Calendar.DAY_OF_MONTH));+			if (lastRan == null || !(lastRan.get(Calendar.YEAR) + "Q" + getQuarterNumber(lastRan))+					.equals(endDate.get(Calendar.YEAR) + "Q" + getQuarterNumber(endDate)))

Alright, Thanks 🤗 Will do

Gravewalker666

comment created time in 10 days

Pull request review commentopenmrs/openmrs-module-dhisconnector

DCM-33 - Update the function to Support Quarterly Period Type in Automation

 public String transformToDHISPeriod(Calendar startDate, Calendar endDate, String 			if (lastRun == null || !(lastRan.get(Calendar.YEAR) + "S" + getHalfYearApril(lastRan)) 					.equals(endDate.get(Calendar.YEAR) + "S" + getHalfYearApril(endDate))) 				period = startDate.get(Calendar.YEAR) + "S" + getHalfYearApril(startDate);+		} else if (ReportingPeriodType.Quarterly.name().equals(periodType)) {+			// Set the correct start date of the last Quarterly period+			if (startDate.get(Calendar.MONTH) < Calendar.APRIL) {+				startDate.add(Calendar.YEAR, -1);+				startDate.set(Calendar.MONTH, Calendar.OCTOBER);+			} else if (startDate.get(Calendar.MONTH) < Calendar.JULY) {+				startDate.set(Calendar.MONTH, Calendar.JANUARY);+			} else if (startDate.get(Calendar.MONTH) < Calendar.OCTOBER) {+				startDate.set(Calendar.MONTH, Calendar.APRIL);+			} else {+				startDate.set(Calendar.MONTH, Calendar.JULY);+			}+			startDate.set(Calendar.DAY_OF_MONTH, 1);+			setBasicsStartsAndEnds(startDate, endDate);+			// set the end date to the last day of the current period+			endDate.add(Calendar.MONTH, 2);+			endDate.set(Calendar.DAY_OF_MONTH, endDate.getActualMaximum(Calendar.DAY_OF_MONTH));+			if (lastRan == null || !(lastRan.get(Calendar.YEAR) + "Q" + getQuarterNumber(lastRan))+					.equals(endDate.get(Calendar.YEAR) + "Q" + getQuarterNumber(endDate)))

I agree with @HerbertYiga, Maintainability-wise, it's always good to use braces.

Gravewalker666

comment created time in 10 days

Pull request review commentopenmrs/openmrs-module-dhisconnector

DCM-33 - Update the function to Support Quarterly Period Type in Automation

 public String transformToDHISPeriod(Calendar startDate, Calendar endDate, String 			if (lastRun == null || !(lastRan.get(Calendar.YEAR) + "S" + getHalfYearApril(lastRan)) 					.equals(endDate.get(Calendar.YEAR) + "S" + getHalfYearApril(endDate))) 				period = startDate.get(Calendar.YEAR) + "S" + getHalfYearApril(startDate);+		} else if (ReportingPeriodType.Quarterly.name().equals(periodType)) {+			// Set the correct start date of the last Quarterly period+			if (startDate.get(Calendar.MONTH) < Calendar.APRIL) {+				startDate.add(Calendar.YEAR, -1);+				startDate.set(Calendar.MONTH, Calendar.OCTOBER);+			} else if (startDate.get(Calendar.MONTH) < Calendar.JULY) {+				startDate.set(Calendar.MONTH, Calendar.JANUARY);+			} else if (startDate.get(Calendar.MONTH) < Calendar.OCTOBER) {+				startDate.set(Calendar.MONTH, Calendar.APRIL);+			} else {+				startDate.set(Calendar.MONTH, Calendar.JULY);+			}+			startDate.set(Calendar.DAY_OF_MONTH, 1);+			setBasicsStartsAndEnds(startDate, endDate);+			// set the end date to the last day of the current period+			endDate.add(Calendar.MONTH, 2);+			endDate.set(Calendar.DAY_OF_MONTH, endDate.getActualMaximum(Calendar.DAY_OF_MONTH));+			if (lastRan == null || !(lastRan.get(Calendar.YEAR) + "Q" + getQuarterNumber(lastRan))+					.equals(endDate.get(Calendar.YEAR) + "Q" + getQuarterNumber(endDate)))

@HerbertYiga are you still reviewing the PR? 🙂 It'll be great if you can merge this one if there aren't any other issues, cuz we are holding a release for this PR and the next one (which I've already worked on and pushed into different branch in my forked repo) to be merged. 😊

Gravewalker666

comment created time in 10 days

Pull request review commentopenmrs/openmrs-module-datafilter

FILTER-7: Upgrade to OpenMRS 2.4.

 public void doFilter_shouldAlwaysResetTheFiltersOnTheCurrentThread() throws Exce 		ThreadLocal areFiltersSet = new ThreadLocal(); 		areFiltersSet.set(true); 		Whitebox.setInternalState(DataFilterSessionContext.class, "areFiltersSet", areFiltersSet);+		// FIXE: No idea why the bellow assert is failing 		assertNotNull(((ThreadLocal) Whitebox.getInternalState(DataFilterSessionContext.class, "areFiltersSet")).get());

Alternatively, just add these annotations to the test class, that way the final field is not yet initialized until we do so in the test method (I think this is an easier fix and more elegant)

@RunWith(PowerMockRunner.class)
@PrepareForTest(DataFilterSessionContext.class)
icrc-psousa

comment created time in 11 days

Pull request review commentopenmrs/openmrs-module-datafilter

FILTER-7: Upgrade to OpenMRS 2.4.

 public void doFilter_shouldAlwaysResetTheFiltersOnTheCurrentThread() throws Exce 		ThreadLocal areFiltersSet = new ThreadLocal(); 		areFiltersSet.set(true); 		Whitebox.setInternalState(DataFilterSessionContext.class, "areFiltersSet", areFiltersSet);+		// FIXE: No idea why the bellow assert is failing 		assertNotNull(((ThreadLocal) Whitebox.getInternalState(DataFilterSessionContext.class, "areFiltersSet")).get());

It means that failing assertion line needs to instead check that the value of the thread local is set to true.

icrc-psousa

comment created time in 11 days

Pull request review commentopenmrs/openmrs-module-datafilter

FILTER-7: Upgrade to OpenMRS 2.4.

 public void doFilter_shouldAlwaysResetTheFiltersOnTheCurrentThread() throws Exce 		ThreadLocal areFiltersSet = new ThreadLocal(); 		areFiltersSet.set(true); 		Whitebox.setInternalState(DataFilterSessionContext.class, "areFiltersSet", areFiltersSet);+		// FIXE: No idea why the bellow assert is failing 		assertNotNull(((ThreadLocal) Whitebox.getInternalState(DataFilterSessionContext.class, "areFiltersSet")).get());

I believe something changed in powermock so that they don't allow setting the value of a final field, which makes sense if you think about it, so the value of the thread local is is null since that's what it got initialized to, I don't know why it was possible in older versions to change the value of final field.

Anyways, with that said I think you need to update the test by replacing the line(s) that sets a new value for the field in the test since it's final and instead just set the value of the thread local instance to true

icrc-psousa

comment created time in 11 days

Pull request review commentopenmrs/openmrs-module-datafilter

FILTER-7: Upgrade to OpenMRS 2.4.

 public void doFilter_shouldAlwaysResetTheFiltersOnTheCurrentThread() throws Exce 		ThreadLocal areFiltersSet = new ThreadLocal(); 		areFiltersSet.set(true); 		Whitebox.setInternalState(DataFilterSessionContext.class, "areFiltersSet", areFiltersSet);+		// FIXE: No idea why the bellow assert is failing 		assertNotNull(((ThreadLocal) Whitebox.getInternalState(DataFilterSessionContext.class, "areFiltersSet")).get());

Try this,

  • Temporarily comment out that offending line
  • Add a break point in DataFilterSessionContext.reset method where it clears the thread local and inspect the state of the thread local before it's cleared.
icrc-psousa

comment created time in 11 days

Pull request review commentopenmrs/openmrs-module-datafilter

FILTER-7: Upgrade to OpenMRS 2.4.

 import org.openmrs.module.datafilter.registration.HibernateFilterRegistration; import org.openmrs.util.OpenmrsClassLoader; import org.powermock.api.mockito.PowerMockito;+import org.powermock.core.classloader.annotations.PowerMockIgnore; import org.powermock.core.classloader.annotations.PrepareForTest; import org.powermock.modules.junit4.PowerMockRunner; import org.w3c.dom.Document;  @RunWith(PowerMockRunner.class)+@PowerMockIgnore({ "org.xml.*" })

FYI SuppressStaticInitializationFor takes fully qualified classnames

icrc-psousa

comment created time in 11 days