Skip to content
Merged
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 @@ -53,7 +53,7 @@ public class DiagnosticOrder {
@Column(name = "error_message", columnDefinition = "TEXT")
private String errorMessage;

@Column(name = "reason_to_close", columnDefinition = "TEXT")
@Column(name = "reason_for_refusal", columnDefinition = "TEXT")
private String reasonToClose;

@Column(name = "push_response_json", columnDefinition = "LONGTEXT")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,27 +146,27 @@ private void checkIncentive(TBConfirmedCase entity){
|| "Longer Regimen (18–24 Months)".equalsIgnoreCase(regimen);

if (Boolean.TRUE.equals(entity.getTreatmentCompleted())
&& entity.getExpectedTreatmentCompletionDate() != null) {
&& entity.getFollowUpDate() != null) {


if (isDrTb) {
if("Shorter Regimen (9–12 Months)".equalsIgnoreCase(regimen)){
if(isEligibleForIncentive(entity.getTreatmentStartDate(),entity.getExpectedTreatmentCompletionDate(),9)){
if ("cured".equalsIgnoreCase(entity.getTreatmentOutcome())) {
incentiveLogicService.incentiveForTbFollowUpIsDrTb(
entity.getBenId(),
Timestamp.valueOf(entity.getExpectedTreatmentCompletionDate().atStartOfDay()),
Timestamp.valueOf(entity.getExpectedTreatmentCompletionDate().atStartOfDay()),
Timestamp.valueOf(entity.getFollowUpDate().atStartOfDay()),
Timestamp.valueOf(entity.getFollowUpDate().atStartOfDay()),
entity.getUserId()
);
}

}else if("Longer Regimen (18–24 Months)".equalsIgnoreCase(regimen)){
if(isEligibleForIncentive(entity.getTreatmentStartDate(),entity.getExpectedTreatmentCompletionDate(),18)) {
if ("cured".equalsIgnoreCase(entity.getTreatmentOutcome())) {

incentiveLogicService.incentiveForTbFollowUpIsDrTb(
entity.getBenId(),
Timestamp.valueOf(entity.getExpectedTreatmentCompletionDate().atStartOfDay()),
Timestamp.valueOf(entity.getExpectedTreatmentCompletionDate().atStartOfDay()),
Timestamp.valueOf(entity.getFollowUpDate().atStartOfDay()),
Timestamp.valueOf(entity.getFollowUpDate().atStartOfDay()),
entity.getUserId()
);
}
Expand All @@ -175,8 +175,8 @@ private void checkIncentive(TBConfirmedCase entity){
} else {
incentiveLogicService.incentiveForTbFollowUp(
entity.getBenId(),
Timestamp.valueOf(entity.getExpectedTreatmentCompletionDate().atStartOfDay()),
Timestamp.valueOf(entity.getExpectedTreatmentCompletionDate().atStartOfDay()),
Timestamp.valueOf(entity.getFollowUpDate().atStartOfDay()),
Timestamp.valueOf(entity.getFollowUpDate().atStartOfDay()),
entity.getUserId()
);

Expand Down
Loading