Skip to content

Commit 2f902f8

Browse files
authored
fix: AMM-1677 - rendering only grievances who have consent (#244)
1 parent 17007e4 commit 2f902f8

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

src/main/java/com/iemr/common/dto/grivance/GrievanceWorklistDTO.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,14 @@ public class GrievanceWorklistDTO implements Serializable {
3939
private String age;
4040
private Boolean retryNeeded;
4141
private Integer callCounter;
42-
private Timestamp lastCall;
42+
private Timestamp lastCall;
43+
private Boolean beneficiaryConsent;
4344

4445
public GrievanceWorklistDTO(String complaintID,Long grievanceId, String subjectOfComplaint, String complaint,
4546
Long beneficiaryRegID, Integer providerServiceMapID,String primaryNumber,String severety,String state,
4647
Integer userId, Boolean deleted, String createdBy, Timestamp createdDate, Timestamp lastModDate,
4748
Boolean isCompleted,String firstName, String lastName, String gender, String district, Long beneficiaryID, String age,
48-
Boolean retryNeeded, Integer callCounter, Timestamp lastCall) {
49+
Boolean retryNeeded, Integer callCounter, Timestamp lastCall, Boolean beneficiaryConsent) {
4950
super();
5051
this.complaintID = complaintID;
5152
this.grievanceId = grievanceId;
@@ -71,6 +72,7 @@ public GrievanceWorklistDTO(String complaintID,Long grievanceId, String subjectO
7172
this.retryNeeded = retryNeeded;
7273
this.callCounter = callCounter;
7374
this.lastCall = lastCall;
75+
this.beneficiaryConsent = beneficiaryConsent;
7476
}
7577

7678

src/main/java/com/iemr/common/service/grievance/GrievanceHandlingServiceImpl.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ public List<GrievanceWorklistDTO> getFormattedGrievanceData(String request) thro
296296

297297
// Loop through the worklist data and format the response
298298
for (Object[] row : worklistData) {
299-
if (row == null || row.length < 22)
299+
if (row == null || row.length < 24)
300300
{
301301
logger.warn("invalid row data received");
302302
continue;
@@ -334,7 +334,8 @@ public List<GrievanceWorklistDTO> getFormattedGrievanceData(String request) thro
334334
ageFormatted,
335335
(Boolean) row[21], // retryNeeded
336336
(Integer) row[22], // callCounter
337-
(Timestamp) row[13] //lastCall
337+
(Timestamp) row[13], // lastCall
338+
(Boolean) row[23] //beneficiaryConsent
338339

339340
);
340341

0 commit comments

Comments
 (0)