Skip to content

Commit

Permalink
TIBQ_patch
Browse files Browse the repository at this point in the history
  • Loading branch information
smirnovaae committed Nov 1, 2024
1 parent 1719071 commit 5273419
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,9 @@ private void loadEobRequests(ContractData contractData) throws InterruptedExcept
if (contractData.getJob().hasJobBeenCancelled()) {
return;
}

if (contractData.getJob().getUntil() != null) {
return;
}
// Verify that the number of benes requested matches the number expected from the database and fail
// immediately if the two do not match
ProgressTracker progressTracker = jobProgressService.getStatus(jobUuid);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,9 @@ void verifyTrackedJobProgress(Job job) {
if (ignoredContracts.contains(job.getContractNumber())) {
return;
}

if (job.getUntil() != null) {
return;
}
// Number in database
int expectedPatients = progressTracker.getPatientsExpected();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -519,13 +519,7 @@ public boolean isCoverageAvailable(Job job, ContractDTO contract) throws Interru
@Override
public int numberOfBeneficiariesToProcess(Job job, ContractDTO contract) {

// ZonedDateTime time;
// //Centene and Humana support
// if (job.getContractNumber().equals("S4802") || job.getContractNumber().equals("Z1001"))
// time = job.getSince().atZoneSameInstant(AB2D_ZONE).plusMonths(1);
// else if (job.getContractNumber().equals("S5884"))
// time = job.getSince().atZoneSameInstant(AB2D_ZONE).plusMonths(2);
ZonedDateTime time = getEndDateTime();
ZonedDateTime endTime = (job.getUntil() != null) ? job.getUntil().atZoneSameInstant(AB2D_ZONE).plusMonths(1) : getEndDateTime();

if (contract == null) {
throw new CoverageDriverException("cannot retrieve metadata for job missing contract");
Expand All @@ -534,7 +528,7 @@ public int numberOfBeneficiariesToProcess(Job job, ContractDTO contract) {
ZonedDateTime startDateTime = getStartDateTime(contract);

List<CoveragePeriod> periodsToReport = new ArrayList<>();
while (startDateTime.isBefore(time)) {
while (startDateTime.isBefore(endTime)) {
CoveragePeriod periodToReport =
coverageService.getCoveragePeriod(mapping.map(contract), startDateTime.getMonthValue(), startDateTime.getYear());
periodsToReport.add(periodToReport);
Expand All @@ -555,7 +549,7 @@ public int numberOfBeneficiariesToProcess(Job job, ContractDTO contract) {
@Trace(metricName = "EnrollmentLoadFromDB", dispatcher = true)
@Override
public CoveragePagingResult pageCoverage(Job job, ContractDTO contract) {
ZonedDateTime now = getEndDateTime();
ZonedDateTime endTime = (job.getUntil() != null) ? job.getUntil().atZoneSameInstant(AB2D_ZONE).plusMonths(1) : getEndDateTime();

if (contract == null) {
throw new CoverageDriverException("cannot retrieve metadata for job missing contract");
Expand All @@ -565,7 +559,7 @@ public CoveragePagingResult pageCoverage(Job job, ContractDTO contract) {

try {
// Check that all coverage periods necessary are present before beginning to page
while (startDateTime.isBefore(now)) {
while (startDateTime.isBefore(endTime)) {
// Will throw exception if it doesn't exist
coverageService.getCoveragePeriod(mapping.map(contract), startDateTime.getMonthValue(), startDateTime.getYear());
startDateTime = startDateTime.plusMonths(1);
Expand Down

0 comments on commit 5273419

Please sign in to comment.