Skip to content

Commit 629c28b

Browse files
authored
Merge pull request #36 from PSMRI/develop
latest pull
2 parents 11158f7 + 5846036 commit 629c28b

6 files changed

Lines changed: 50 additions & 31 deletions

File tree

src/main/environment/common_ci.properties

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,14 @@ start-email-scheduler=true
5454
cron-scheduler-email=0 0/1 * * * ? *
5555

5656
###cti data check with call detail report Scheduler
57-
#Runs at everyday 12:10AM
58-
start-ctidatacheck-scheduler=true
59-
cron-scheduler-ctidatacheck=0 10 00 * * *
60-
57+
start-ctidatacheck-scheduler=@env.START_CTIDATACHECK_SCHEDULER@
58+
cron-scheduler-ctidatacheck=0 00 02 * * *
59+
##-------------------------------###cti data sync Scheduler configurations------------------------------------------------------
60+
start-ctidatasync-scheduler=@env.START_CTIDATASYNC_SCHEDULER@
61+
cron-scheduler-ctidatasync=0 30 01 * * ? *
62+
##-----------------------------------------------#NHM data dashboard schedular----------------------------------------------------------------
63+
start-nhmdashboard-scheduler=@env.START_NHMDASHBOARD_SCHEDULER@
64+
cron-scheduler-nhmdashboard=0 30 0 * * ? *
6165
### generate Beneficiary Config
6266
genben-api= @env.BEN_GEN_API_URL@
6367

@@ -170,7 +174,7 @@ springdoc.swagger-ui.enabled=false
170174
isProduction=@env.IS_PRODUCTION@
171175
grievanceAllocationRetryConfiguration=3
172176

173-
start-grievancedatasync-scheduler=true
177+
start-grievancedatasync-scheduler=@env.START_GRIEVANCEDATASYNC_SCHEDULER@
174178
cron-scheduler-grievancedatasync=0 0/2 * * * ?
175179

176180
captcha.secret-key=@env.CAPTCHA_SECRET_KEY@

src/main/environment/common_docker.properties

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,14 @@ cron-scheduler-email=0 0/1 * * * ? *
5555

5656
###cti data check with call detail report Scheduler
5757
#Runs at everyday 12:10AM
58-
start-ctidatacheck-scheduler=true
59-
cron-scheduler-ctidatacheck=0 10 00 * * *
60-
58+
start-ctidatacheck-scheduler=${START_CTIDATACHECK_SCHEDULER}
59+
cron-scheduler-ctidatacheck=0 00 02 * * *
60+
##-------------------------------###cti data sync Scheduler configurations------------------------------------------------------
61+
start-ctidatasync-scheduler=${START_CTIDATASYNC_SCHEDULER}
62+
cron-scheduler-ctidatasync=0 30 01 * * ? *
63+
##-----------------------------------------------#NHM data dashboard schedular----------------------------------------------------------------
64+
start-nhmdashboard-scheduler=${START_NHMDASHBOARD_SCHEDULER}
65+
cron-scheduler-nhmdashboard=0 30 0 * * ? *
6166
### generate Beneficiary Config
6267
genben-api= ${BEN_GEN_API_URL}
6368

@@ -171,7 +176,7 @@ springdoc.swagger-ui.enabled=false
171176
isProduction=${IS_PRODUCTION}
172177
grievanceAllocationRetryConfiguration=3
173178

174-
start-grievancedatasync-scheduler=false
179+
start-grievancedatasync-scheduler=${START_GRIEVANCEDATASYNC_SCHEDULER}
175180
cron-scheduler-grievancedatasync=0 0/2 * * * ?
176181

177182
captcha.secret-key=${CAPTCHA_SECRET_KEY}

src/main/environment/common_example.properties

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,13 @@ cron-scheduler-email=0 0/1 * * * ? *
6464
##-------------------------------###cti data sync Scheduler configurations------------------------------------------------------
6565

6666
start-ctidatasync-scheduler=false
67-
cron-scheduler-ctidatasync=0 0 2 */2 * ?
67+
cron-scheduler-ctidatasync=0 30 01 * * ? *
6868

6969
##-------------------------------###cti data check with call detail report Scheduler------------------------------------------------------
7070

7171
#Runs at everyday 12:10AM
72-
start-ctidatacheck-scheduler=true
73-
cron-scheduler-ctidatacheck=0 10 00 * * *
72+
start-ctidatacheck-scheduler=false
73+
cron-scheduler-ctidatacheck=0 00 02 * * *
7474

7575
##---------------------------------#### Registration schedular for Avni------------------------------------------------------------------------------
7676

@@ -198,7 +198,7 @@ grievanceAllocationRetryConfiguration=3
198198
logging.path=logs/
199199
logging.file.name=logs/common-api.log
200200

201-
video-call-url=https://vc.piramalswasthya.org/
201+
video-call-url=https://vc.piramalswasthya.org/?
202202
jibri.output.path=/srv/jibri/recordings
203203
video.recording.path=/srv/recordings
204204

src/main/java/com/iemr/common/controller/sms/SMSController.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,13 @@ public String sendSMS(
207207
}
208208
logger.debug("sendSMS sending response " + response);
209209
logger.info("sendSMS sending response");
210-
return response.toString();
210+
String respStr = response.toString();
211+
respStr = respStr.replace("\\u003d", "=")
212+
.replace("\\u003c", "<")
213+
.replace("\\u003e", ">")
214+
.replace("\\u0026", "&");
215+
return respStr;
216+
211217
}
212218

213219
}

src/main/java/com/iemr/common/service/sms/SMSServiceImpl.java

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -194,15 +194,15 @@ public String getSMSTemplates(SMSRequest smsRequest) throws Exception {
194194

195195
@Override
196196
public String updateSMSTemplate(UpdateSMSRequest smsRequest) throws Exception {
197-
SMSTemplate smsTemplate = null;
198-
SMSTemplate request = smsMapper.updateRequestToSMSTemplate(smsRequest);
199-
int updateCount = smsTemplateRepository.updateSMSTemplate(request.getSmsTemplateID(), request.getDeleted());
200-
if (updateCount > 0) {
201-
smsTemplate = smsTemplateRepository.findBySmsTemplateID(request.getSmsTemplateID());
202-
} else {
203-
throw new Exception("Failed to update the result");
204-
}
205-
return OutputMapper.gsonWithoutExposeRestriction().toJson(smsMapper.smsTemplateToResponse(smsTemplate));
197+
SMSTemplate smsTemplate = null;
198+
SMSTemplate request = smsMapper.updateRequestToSMSTemplate(smsRequest);
199+
int updateCount = smsTemplateRepository.updateSMSTemplate(request.getSmsTemplateID(), request.getDeleted());
200+
if (updateCount > 0) {
201+
smsTemplate = smsTemplateRepository.findBySmsTemplateID(request.getSmsTemplateID());
202+
} else {
203+
throw new Exception("Failed to update the result");
204+
}
205+
return OutputMapper.gsonWithoutExposeRestriction().toJson(smsMapper.smsTemplateToResponse(smsTemplate));
206206
}
207207

208208
@Override
@@ -347,18 +347,17 @@ public SMSNotification prepareVideoCallSMS(SMSRequest request, VideoCallParamete
347347
sms.setPhoneNo(request.getFacilityPhoneNo());
348348
}
349349
}
350-
351350
sms.setSms(smsToSend);
352-
return smsNotification.save(sms);
351+
return smsNotification.save(sms);
353352
}
354353

355354

356355
public String getVideoCallData(String methodName, VideoCallParameters videoCall) throws Exception {
357356
String variableValue = "";
358357
switch (methodName.toLowerCase()) {
359358
case "videoconsultationlink":
360-
variableValue = videoCall.getMeetingLink() != null ? videoCall.getMeetingLink() : "";
361-
break;
359+
variableValue = videoCall.getMeetingLink() != null ? videoCall.getMeetingLink() : "";
360+
break;
362361
case "consultationdate":
363362
if (videoCall.getDateOfCall() != null) {
364363
SimpleDateFormat inputFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@@ -377,7 +376,6 @@ public String getVideoCallData(String methodName, VideoCallParameters videoCall)
377376
variableValue = result != null ? result.toString() : "";
378377
break;
379378
}
380-
381379
return variableValue.trim();
382380
}
383381

src/main/java/com/iemr/common/service/videocall/VideoCallServiceImpl.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,23 @@ public class VideoCallServiceImpl implements VideoCallService {
3333
@Autowired
3434
private VideoCallMapper videoCallMapper;
3535

36-
@Value("${video-call-url}")
3736
private String meetingLink;
3837

3938
private boolean isLinkSent = false;
4039
private String consultationStatus = "Not Initiated";
40+
41+
@Value("${video-call-url}")
4142
private String jitsiLink;
43+
4244
public VideoCallServiceImpl() {
4345
// this.jitsiLink = ConfigProperties.getPropertyByName("video-call-url");
4446
// logger.info("Jitsi Link fetched: " + this.jitsiLink);
4547
}
4648

4749
@Override
4850
public String generateMeetingLink() {
49-
meetingLink=jitsiLink+RandomStringUtils.randomAlphanumeric(8);
51+
logger.info("Jitsi Link: " + jitsiLink);
52+
meetingLink=jitsiLink+"m="+RandomStringUtils.randomAlphanumeric(8);
5053
logger.info("Meeting link: " + meetingLink);
5154
return meetingLink;
5255
}
@@ -72,7 +75,10 @@ public String sendMeetingLink(VideoCallRequest request) throws Exception {
7275
response.setResponse(responseData.toJson());
7376

7477
return OutputMapper.gsonWithoutExposeRestriction()
75-
.toJson(response);
78+
.toJson(response) .replace("\\u003d", "=")
79+
.replace("\\u003c", "<")
80+
.replace("\\u003e", ">")
81+
.replace("\\u0026", "&");
7682
}
7783

7884
@Override

0 commit comments

Comments
 (0)