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

Fix DD-20 Jira task. Also adds proper error handling for >1 periodSta… #287

Merged

Conversation

workcartersmith
Copy link
Contributor

…rt/periodEnd arguments being passed into the $care-gaps operation.

…rt/periodEnd arguments being passed into the $care-gaps operation.
throw new IllegalArgumentException("Only one periodEnd argument can be supplied.");

if (subject.size() > 1 || subject.size() <= 0)
throw new IllegalArgumentException("You must supply subject argument.");

Choose a reason for hiding this comment

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

Can we move all this into the careGapParamaterValidation method as they are part of validation?

if (_subject.startsWith("Patient/")) {
resolvePatientGapBundleForMeasures(_periodStart, _periodEnd, _subject, topic, status, returnParams, measures, "return", organization);
} else if (_subject.startsWith("Group/")) {
returnParams.setId((status == null ? "all-gaps" : status) + "-" + _subject.replace("/", "_") + "-report");

Choose a reason for hiding this comment

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

Not related to this work, but the new API doesn't allow a null status (1..*).

Might as well fix it while we're at it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

}
else if (Strings.isNullOrEmpty(practitioner)) {

// Setting periodStart, periodEnd, and subject to lists to check if multiple have been supplied.
Copy link

Choose a reason for hiding this comment

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

Could we move this all in careGapsParameterValidation as well?

This all looks proximate and should be contained within the same method.

@rob-reynolds rob-reynolds merged commit 5571a17 into master Jun 21, 2021
@rob-reynolds rob-reynolds deleted the care-gaps-dd20-fix-periodStart-periodEnd-subject-multiples branch June 21, 2021 20:46
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.

None yet

2 participants