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

TIBQ_patch #1413

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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 @@ -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
Loading