-
Notifications
You must be signed in to change notification settings - Fork 5
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
PEPPER-1364 . Additional PHI Manifest changes #2931
Conversation
int age = DateTimeUtil.calculateAgeInYears(dateOfBirth); | ||
boolean hasCompletedPediatricConsentAddendum = participant.hasCompletedActivity(CONSENT_ADDENDUM_PEDIATRICS_ACTIVITY_CODE); | ||
|
||
if (hasCompletedPediatricConsentAddendum) { | ||
if (age >= 7) { | ||
if (age >= 7 || participantStatus.equalsIgnoreCase(CONSENT_SUSPENDED)) { |
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.
agedup participants should fall into this >7 age for sure any way but explicitly checking for CONSENT_SUSPENDED will help just incase DOB isn't in ES DSM document.
Doesnt hurt to include in OR , hence added
if (StringUtils.isBlank(dateOfMajority) || DateTimeUtil.isAdult(dateOfMajority)) { | ||
return (Boolean)getAdultParticipantConsentedToTumorAnswer(participant, ddpInstanceDto.getStudyGuid()) | ||
String participantStatus = participant.getStatus().orElse(""); | ||
if (StringUtils.isBlank(dateOfMajority) || participant.hasCompletedActivity(CONSENT_ACTIVITY_CODE)) { |
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.
explicitly checking for SELF CONSENT will make sure aged-up and self enrolled fall into this category
} | ||
} | ||
|
||
private static boolean isPediatricValidForPHI(ElasticSearchParticipantDto participant, String dateOfBirth, String participantStatus) { | ||
int age = DateTimeUtil.calculateAgeInYears(dateOfBirth); | ||
boolean hasCompletedPediatricConsentAddendum = participant.hasCompletedActivity(CONSENT_ADDENDUM_PEDIATRICS_ACTIVITY_CODE); |
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.
Might be an edge case in existing code base ... if child was enrolled when < 7 and after few years current age will be > 7.. and the child might not have this question: SOMATIC_ASSENT_ADDENDUM_QUESTION_STABLE_ID answered ! (Need to test this scenario later & might need to fix it) .
PEPPER-1364
Add functionality to let aged-up participants who are in lost to followup (not self consented yet) be included in PHI manifest download.