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-950: Add LastVisit and EditVisit require an EndDate #177

Merged
merged 1 commit into from
Feb 17, 2020

Conversation

reagan-meant
Copy link
Contributor

@reagan-meant reagan-meant commented Jan 23, 2020

https://issues.openmrs.org/browse/RA-950
I did the following
1.Enabled adding a past visit with a start date but no end date
2.But disabled adding a past visit with a start date but no end date if this would overlap with another existing visit
3.Enabled editing a closed visit and remove its end date
4.But disabled editing a closed visit and remove its end date if this would overlap with another existing visit
Other changes are in core-apps openmrs/openmrs-module-coreapps#275

Date actualStopDate = stopDatetime;
if (stopDatetime == null){
stopDatetime = new Date();
}
Copy link
Member

Choose a reason for hiding this comment

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

Is this just to avoid a null pointer exception on line 792? If so, I would just add a null check there, that is:

if (if stopDatetime != null && stopDatetime.after(new Date())) {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanx @mogoodrich I have adjusted

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.

LGTM

@dkayiwa dkayiwa merged commit 3c30a3f into openmrs:master Feb 17, 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.

3 participants