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

wip #1331

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

wip #1331

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,8 @@ public int countBeneficiariesByPeriods(List<Integer> coveragePeriodIds, String c
NamedParameterJdbcTemplate template = new NamedParameterJdbcTemplate(dataSource);
//If OptOut is enabled, count beneficiaries who agreed to share their data
String query = (propertiesService.isToggleOn("OptOutOn", false)) ? SELECT_DISTINCT_OPTOUT_COVERAGE_BY_PERIOD_COUNT : SELECT_DISTINCT_COVERAGE_BY_PERIOD_COUNT;

log.error("SELECT_DISTINCT_OPTOUT_COVERAGE_BY_PERIOD_COUNT " + query);
log.error("DISTINCT_OPTOUT_COVERAGE_BY_PERIOD_COUNT " + parameters);
return template.queryForList(query, parameters, Integer.class)
.stream().findFirst().orElseThrow(() -> new RuntimeException("no coverage information found for any " +
"of the coverage periods provided"));
Expand Down Expand Up @@ -602,10 +603,16 @@ private List<CoverageMembership> queryCoverageMembership(CoveragePagingRequest p
NamedParameterJdbcTemplate template = new NamedParameterJdbcTemplate(dataSource);
if (pageCursor.isPresent()) {
String queryWithCursor = (isOptOutOn) ? SELECT_OPTOUT_COVERAGE_WITH_CURSOR : SELECT_COVERAGE_WITH_CURSOR;
log.error("SELECT_OPTOUT_COVERAGE_WITH_CURSOR " + queryWithCursor);
log.error("SELECT_OPTOUT_COVERAGE_WITH_CURSOR PARAM " + sqlParameterSource);
log.error("SELECT_OPTOUT_COVERAGE_WITH_CURSOR_VALUE " + pageCursor);
enrollment = template.query(queryWithCursor, sqlParameterSource,
CoverageServiceRepository::asMembership);
} else {
String queryWithoutCursor = (isOptOutOn) ? SELECT_OPTOUT_COVERAGE_WITHOUT_CURSOR : SELECT_COVERAGE_WITHOUT_CURSOR;
log.error("SELECT_OPTOUT_COVERAGE_WITHOUT_CURSOR " + queryWithoutCursor);
log.error("SELECT_OPTOUT_COVERAGE_WITHOUT_CURSOR PARAM " + sqlParameterSource);
log.error("SELECT_OPTOUT_COVERAGE_WITHOUT_CURSOR_VALUE " + pageCursor);
enrollment = template.query(queryWithoutCursor, sqlParameterSource,
CoverageServiceRepository::asMembership);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ public List<JobOutput> process(Job job) {
ContractDTO contract = contractWorkerClient.getContractByContractNumber(contractNumber);
int numBenes = coverageDriver.numberOfBeneficiariesToProcess(job, contract);
jobChannelService.sendUpdate(job.getJobUuid(), JobMeasure.PATIENTS_EXPECTED, numBenes);
log.error("jobChannelService.sendUpdate(job.getJobUuid(), JobMeasure.PATIENTS_EXPECTED, numBenes) " + numBenes);
log.info("Contract [{}] has [{}] Patients", contractNumber, numBenes);

// Create the aggregator
Expand Down Expand Up @@ -238,7 +239,7 @@ private void loadEobRequests(ContractData contractData) throws InterruptedExcept
current = coverageDriver.pageCoverage(current.getNextRequest().get());
loadRequestBatch(contractData, current, searchConfig.getNumberBenesPerBatch());
jobChannelService.sendUpdate(jobUuid, JobMeasure.PATIENT_REQUEST_QUEUED, current.size());

log.error("sendUpdate(jobUuid, JobMeasure.PATIENT_REQUEST_QUEUED, current.size() " + current.size());
processFinishedRequests(contractData);
}
if (contractData.getJob().hasJobBeenCancelled()) {
Expand Down