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
Core OpenMRS modules for Bahmni (including ERP & ELIS Atom Feed Clients)
docker containers for bahmni
Bahmni Automation Test Suite using Gauge Framework
Prototype of intellij plugin for Bahmni
Repository of bahmni deployment and RPMs
Build a Jekyll blog in minutes, without touching the command line.
push eventopenmrs/openmrs-module-oauth2login
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
push time in 3 days
push eventopenmrs/openmrs-esm-login
commit sha 4aa32b2874391325ebfdd8bddde40a1f44765a3c
Merged with local changes
commit sha d0d0db160183bdb8c399454c828a7e235a7122e1
Improved the login screen (enter)
push time in 3 days
push eventopenmrs/openmrs-esm-login
commit sha 0473416d4ded7f7d6c12a1cc1da3411bf84c8413
Added .editorconfig and prettier. (#105)
push time in 5 days
PR merged openmrs/openmrs-esm-login
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).
pr closed time in 5 days
PR opened openmrs/openmrs-esm-login
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).
pr created time in 5 days
issue openedopenmrs/openmrs-module-oauth2login
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
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.
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.
comment created time in 10 days
PR opened openmrs/openmrs-module-dhisconnector
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
pr created time in 10 days
push eventopenmrs/openmrs-module-dhisconnector
commit sha b5a5bf44c823d6b40412bd32ec8cd702d5ed2194
DCM-33: Support Quarterly Period type in automation (#26)
push time in 10 days
PR merged openmrs/openmrs-module-dhisconnector
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 existingif else
to catch theQuarterly 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.
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
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
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.
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. 😊
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)
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.
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
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.
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
comment created time in 11 days