Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RA-1704: Improved Program Status widget state sorting. #299

Merged
merged 41 commits into from
Mar 19, 2020

Conversation

kml27
Copy link
Contributor

@kml27 kml27 commented Mar 6, 2020

JIRA Ticket: https://issues.openmrs.org/browse/RA-1704

Provides new program workflow state sort logic for ProgramStatus/Enrollment widget.

Observed:
Previously, states were only sorted by start date. This resulted in randomly incorrect order of states when the states were started on the same day, but one ended after the other and also when multiple states were started and ended on the same day.

Expected:
States displayed in the order the patient was entered into them.

Fix:
Sort by start date, those with the same start date then sorted by end date, those with the same end date then sorted by created date.

This also provides a jest/karma/angular/phantomjs test to prevent regression.

Additional changes:

… to 1.6.1 to get $httpBackend.flush() fix, changes to use a proper promise chain for test
@kml27 kml27 requested a review from mogoodrich March 9, 2020 22:11
Copy link
Member

@mogoodrich mogoodrich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd good with this, but would be good for @mks-d to review. Also, once it's merged we will need to may sure on the PIH end we test things a bit.

@mks-d mks-d self-requested a review March 12, 2020 14:30
kml27 and others added 15 commits March 12, 2020 09:18
…orkflows in the same program), adding logic for angular fallback orderby index, re-order expected order test states
…or not both null and ordering when state1 endDate is null, new order of states in test
* RA-1724 : Fix NPE/undefined error in obsgraph dashboard widget when some concept do not have associated obs

* RA-1724  : Adding null check
…r obsgraph.

* Added optional filter encounter type parameter for obsgraph

* Added support for multiple encounter types in obsGraph
@mks-d mks-d changed the title RA-1704 : improved programstatus state sort order RA-1704: Improved Program Status widget state sorting. Mar 12, 2020
@mks-d mks-d changed the title RA-1704: Improved Program Status widget state sorting. RA-1704: Improved Program Status widget state sorting. Mar 19, 2020
@mks-d mks-d merged commit 73b2d61 into openmrs:master Mar 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants