-
Notifications
You must be signed in to change notification settings - Fork 49
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
Fix DD-20 Jira task. Also adds proper error handling for >1 periodSta… #287
Conversation
…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."); |
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
…x to api changes.
Master's currently throwing a runtime exception so just adding this here.
} | ||
else if (Strings.isNullOrEmpty(practitioner)) { | ||
|
||
// Setting periodStart, periodEnd, and subject to lists to check if multiple have been supplied. |
There was a problem hiding this comment.
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.
…rt/periodEnd arguments being passed into the $care-gaps operation.