@Test public void testIsProviderCombomatch_onematch2(){ Consent consent = new Consent(); setConsentProvidersMatchData(consent); Set<String> selIsMadeToNpi = new HashSet<String>(); selIsMadeToNpi.add("1174858088"); Set<String> selIsMadeToOrgNpi = new HashSet<String>(); selIsMadeToOrgNpi.add("1902131865"); selIsMadeToNpi.addAll(selIsMadeToOrgNpi); consentDto.setProvidersPermittedToDisclose(selIsMadeToNpi); Set<String> selToDiscloseNpi = new HashSet<String>(); selToDiscloseNpi.add("1902131865"); Set<String> selToDiscloseOrgNpi = new HashSet<String>(); selToDiscloseOrgNpi.add("1346575297"); selToDiscloseNpi.addAll(selToDiscloseOrgNpi); consentDto.setProvidersDisclosureIsMadeTo(selToDiscloseNpi); boolean isProviderComboMatch = cst.isProviderComboMatch(consent, consentDto); assertEquals(isProviderComboMatch, true); }
public boolean isProviderComboMatch(Consent consent, ConsentDto consentDto) { boolean isContain = false; Set<String> selToDiscloseNpi = getDtoProviderToDiscloseToNpi(consentDto); Set<String> conToDiscloseNpi = getProviderToDiscloseToNpi(consent); Set<String> selToDiscloseNpiCopy = new HashSet<String>(selToDiscloseNpi); Set<String> conToDiscloseNpiCopy = new HashSet<String>(conToDiscloseNpi); selToDiscloseNpiCopy.retainAll(conToDiscloseNpiCopy); if (null != selToDiscloseNpiCopy && selToDiscloseNpiCopy.size() > 0) { Set<String> selIsMadeToNpi = getDtoProviderIsMadeToNpi(consentDto); Set<String> conIsMadeToNpi = getProviderIsMadeToNpi(consent); Set<String> selIsMadeToNpiCopy = new HashSet<String>(selIsMadeToNpi); Set<String> conIsMadeToNpiCopy = new HashSet<String>(conIsMadeToNpi); selIsMadeToNpiCopy.retainAll(conIsMadeToNpiCopy); if (null != selIsMadeToNpiCopy && selIsMadeToNpiCopy.size() > 0) { isContain = true; } } return isContain; }
ConsentHelper { public boolean isProviderComboMatch(Consent consent, ConsentDto consentDto) { boolean isContain = false; Set<String> selToDiscloseNpi = getDtoProviderToDiscloseToNpi(consentDto); Set<String> conToDiscloseNpi = getProviderToDiscloseToNpi(consent); Set<String> selToDiscloseNpiCopy = new HashSet<String>(selToDiscloseNpi); Set<String> conToDiscloseNpiCopy = new HashSet<String>(conToDiscloseNpi); selToDiscloseNpiCopy.retainAll(conToDiscloseNpiCopy); if (null != selToDiscloseNpiCopy && selToDiscloseNpiCopy.size() > 0) { Set<String> selIsMadeToNpi = getDtoProviderIsMadeToNpi(consentDto); Set<String> conIsMadeToNpi = getProviderIsMadeToNpi(consent); Set<String> selIsMadeToNpiCopy = new HashSet<String>(selIsMadeToNpi); Set<String> conIsMadeToNpiCopy = new HashSet<String>(conIsMadeToNpi); selIsMadeToNpiCopy.retainAll(conIsMadeToNpiCopy); if (null != selIsMadeToNpiCopy && selIsMadeToNpiCopy.size() > 0) { isContain = true; } } return isContain; } }
ConsentHelper { public boolean isProviderComboMatch(Consent consent, ConsentDto consentDto) { boolean isContain = false; Set<String> selToDiscloseNpi = getDtoProviderToDiscloseToNpi(consentDto); Set<String> conToDiscloseNpi = getProviderToDiscloseToNpi(consent); Set<String> selToDiscloseNpiCopy = new HashSet<String>(selToDiscloseNpi); Set<String> conToDiscloseNpiCopy = new HashSet<String>(conToDiscloseNpi); selToDiscloseNpiCopy.retainAll(conToDiscloseNpiCopy); if (null != selToDiscloseNpiCopy && selToDiscloseNpiCopy.size() > 0) { Set<String> selIsMadeToNpi = getDtoProviderIsMadeToNpi(consentDto); Set<String> conIsMadeToNpi = getProviderIsMadeToNpi(consent); Set<String> selIsMadeToNpiCopy = new HashSet<String>(selIsMadeToNpi); Set<String> conIsMadeToNpiCopy = new HashSet<String>(conIsMadeToNpi); selIsMadeToNpiCopy.retainAll(conIsMadeToNpiCopy); if (null != selIsMadeToNpiCopy && selIsMadeToNpiCopy.size() > 0) { isContain = true; } } return isContain; }  }
ConsentHelper { public boolean isProviderComboMatch(Consent consent, ConsentDto consentDto) { boolean isContain = false; Set<String> selToDiscloseNpi = getDtoProviderToDiscloseToNpi(consentDto); Set<String> conToDiscloseNpi = getProviderToDiscloseToNpi(consent); Set<String> selToDiscloseNpiCopy = new HashSet<String>(selToDiscloseNpi); Set<String> conToDiscloseNpiCopy = new HashSet<String>(conToDiscloseNpi); selToDiscloseNpiCopy.retainAll(conToDiscloseNpiCopy); if (null != selToDiscloseNpiCopy && selToDiscloseNpiCopy.size() > 0) { Set<String> selIsMadeToNpi = getDtoProviderIsMadeToNpi(consentDto); Set<String> conIsMadeToNpi = getProviderIsMadeToNpi(consent); Set<String> selIsMadeToNpiCopy = new HashSet<String>(selIsMadeToNpi); Set<String> conIsMadeToNpiCopy = new HashSet<String>(conIsMadeToNpi); selIsMadeToNpiCopy.retainAll(conIsMadeToNpiCopy); if (null != selIsMadeToNpiCopy && selIsMadeToNpiCopy.size() > 0) { isContain = true; } } return isContain; }  Date setDateAsEndOfDay(Date consentEnd); boolean isConsentTermOverlap(ConsentDto consentDto,
			Date conStartDate, Date conEndDate); Set<SpecificMedicalInfoDto> getDoNotShareClinicalConceptCodes(
			HashSet<String> icd9); boolean isPOUMatches(Set<String> selPOU,
			Set<ConsentShareForPurposeOfUseCode> conPOU); boolean isProviderComboMatch(Consent consent, ConsentDto consentDto); }
ConsentHelper { public boolean isProviderComboMatch(Consent consent, ConsentDto consentDto) { boolean isContain = false; Set<String> selToDiscloseNpi = getDtoProviderToDiscloseToNpi(consentDto); Set<String> conToDiscloseNpi = getProviderToDiscloseToNpi(consent); Set<String> selToDiscloseNpiCopy = new HashSet<String>(selToDiscloseNpi); Set<String> conToDiscloseNpiCopy = new HashSet<String>(conToDiscloseNpi); selToDiscloseNpiCopy.retainAll(conToDiscloseNpiCopy); if (null != selToDiscloseNpiCopy && selToDiscloseNpiCopy.size() > 0) { Set<String> selIsMadeToNpi = getDtoProviderIsMadeToNpi(consentDto); Set<String> conIsMadeToNpi = getProviderIsMadeToNpi(consent); Set<String> selIsMadeToNpiCopy = new HashSet<String>(selIsMadeToNpi); Set<String> conIsMadeToNpiCopy = new HashSet<String>(conIsMadeToNpi); selIsMadeToNpiCopy.retainAll(conIsMadeToNpiCopy); if (null != selIsMadeToNpiCopy && selIsMadeToNpiCopy.size() > 0) { isContain = true; } } return isContain; }  Date setDateAsEndOfDay(Date consentEnd); boolean isConsentTermOverlap(ConsentDto consentDto,
			Date conStartDate, Date conEndDate); Set<SpecificMedicalInfoDto> getDoNotShareClinicalConceptCodes(
			HashSet<String> icd9); boolean isPOUMatches(Set<String> selPOU,
			Set<ConsentShareForPurposeOfUseCode> conPOU); boolean isProviderComboMatch(Consent consent, ConsentDto consentDto);  }