Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
8fd8761
Merge pull request #34 from PSMRI/logout-check
srishtigrp78 Jun 2, 2025
11158f7
Merge pull request #35 from PSMRI/develop
srishtigrp78 Jun 23, 2025
0df3ef6
cti data chek nhm schedular
sac2kadam Jun 24, 2025
139c933
Add ? to the url and value to fetch values from env (#236)
vanitha1822 Jun 24, 2025
95399d5
Update the response format for video link (#238)
vanitha1822 Jun 24, 2025
57354a6
grievance scheduler added
sac2kadam Jun 27, 2025
5846036
Merge pull request #237 from PSMRI/datasync
vanitha1822 Jun 27, 2025
629c28b
Merge pull request #36 from PSMRI/develop
srishtigrp78 Jun 27, 2025
95be768
linking of subcategory to multiple files
Jun 27, 2025
eef6bb3
removed commented code
Jun 27, 2025
9a7c741
Add Security Check to Prevent User Enumeration (#240)
vishwab1 Jun 30, 2025
7be3796
removed commented code
Jun 30, 2025
a0a362f
fix:user enumeration (#242)
vishwab1 Jul 1, 2025
17007e4
Merge pull request #239 from srishtigrp78/feature/version/upgrade
drtechie Jul 2, 2025
2f902f8
fix: AMM-1677 - rendering only grievances who have consent (#244)
5Amogh Jul 2, 2025
46195c5
fix: AMM-1701 callcounter issue fix (#254)
5Amogh Jul 4, 2025
c8db225
fix: username or password error mesage shown with failed attempt (#265)
vishwab1 Jul 8, 2025
ae09714
dynamic from feature
SauravBizbRolly Jul 16, 2025
5ab6b7f
Merge remote-tracking branch 'upstream/develop' into feature_dynamic_…
SauravBizbRolly Jul 16, 2025
515f27c
dynamic from feature
SauravBizbRolly Jul 16, 2025
27cf841
dynamic from feature
SauravBizbRolly Jul 16, 2025
0e7b33b
dynamic from feature
SauravBizbRolly Jul 16, 2025
956e3ea
Merge branch '3.3.0' into master_dynamic_form
SauravBizbRolly Jul 16, 2025
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
14 changes: 9 additions & 5 deletions src/main/environment/common_ci.properties
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,14 @@ start-email-scheduler=true
cron-scheduler-email=0 0/1 * * * ? *

###cti data check with call detail report Scheduler
#Runs at everyday 12:10AM
start-ctidatacheck-scheduler=true
cron-scheduler-ctidatacheck=0 10 00 * * *

start-ctidatacheck-scheduler=@env.START_CTIDATACHECK_SCHEDULER@
cron-scheduler-ctidatacheck=0 00 02 * * *
##-------------------------------###cti data sync Scheduler configurations------------------------------------------------------
start-ctidatasync-scheduler=@env.START_CTIDATASYNC_SCHEDULER@
cron-scheduler-ctidatasync=0 30 01 * * ? *
##-----------------------------------------------#NHM data dashboard schedular----------------------------------------------------------------
start-nhmdashboard-scheduler=@env.START_NHMDASHBOARD_SCHEDULER@
cron-scheduler-nhmdashboard=0 30 0 * * ? *
### generate Beneficiary Config
genben-api= @env.BEN_GEN_API_URL@

Expand Down Expand Up @@ -175,7 +179,7 @@ springdoc.swagger-ui.enabled=false
isProduction=@env.IS_PRODUCTION@
grievanceAllocationRetryConfiguration=3

start-grievancedatasync-scheduler=true
start-grievancedatasync-scheduler=@env.START_GRIEVANCEDATASYNC_SCHEDULER@
cron-scheduler-grievancedatasync=0 0/2 * * * ?

captcha.secret-key=@env.CAPTCHA_SECRET_KEY@
Expand Down
13 changes: 9 additions & 4 deletions src/main/environment/common_docker.properties
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,14 @@ cron-scheduler-email=0 0/1 * * * ? *

###cti data check with call detail report Scheduler
#Runs at everyday 12:10AM
start-ctidatacheck-scheduler=true
cron-scheduler-ctidatacheck=0 10 00 * * *

start-ctidatacheck-scheduler=${START_CTIDATACHECK_SCHEDULER}
cron-scheduler-ctidatacheck=0 00 02 * * *
##-------------------------------###cti data sync Scheduler configurations------------------------------------------------------
start-ctidatasync-scheduler=${START_CTIDATASYNC_SCHEDULER}
cron-scheduler-ctidatasync=0 30 01 * * ? *
##-----------------------------------------------#NHM data dashboard schedular----------------------------------------------------------------
start-nhmdashboard-scheduler=${START_NHMDASHBOARD_SCHEDULER}
cron-scheduler-nhmdashboard=0 30 0 * * ? *
### generate Beneficiary Config
genben-api= ${BEN_GEN_API_URL}

Expand Down Expand Up @@ -171,7 +176,7 @@ springdoc.swagger-ui.enabled=false
isProduction=${IS_PRODUCTION}
grievanceAllocationRetryConfiguration=3

start-grievancedatasync-scheduler=false
start-grievancedatasync-scheduler=${START_GRIEVANCEDATASYNC_SCHEDULER}
cron-scheduler-grievancedatasync=0 0/2 * * * ?

captcha.secret-key=${CAPTCHA_SECRET_KEY}
Expand Down
8 changes: 4 additions & 4 deletions src/main/environment/common_example.properties
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ cron-scheduler-email=0 0/1 * * * ? *
##-------------------------------###cti data sync Scheduler configurations------------------------------------------------------

start-ctidatasync-scheduler=false
cron-scheduler-ctidatasync=0 0 2 */2 * ?
cron-scheduler-ctidatasync=0 30 01 * * ? *

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

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

##---------------------------------#### Registration schedular for Avni------------------------------------------------------------------------------

Expand Down Expand Up @@ -198,7 +198,7 @@ grievanceAllocationRetryConfiguration=3
logging.path=logs/
logging.file.name=logs/common-api.log

video-call-url=https://vc.piramalswasthya.org/
video-call-url=https://vc.piramalswasthya.org/?
jibri.output.path=/srv/jibri/recordings
video.recording.path=/srv/recordings

Expand Down
Original file line number Diff line number Diff line change
@@ -1,31 +1,97 @@
package com.iemr.common.controller.dynamicForm;

import com.iemr.common.data.dynamic_from.FormEntity;
import com.iemr.common.data.dynamic_from.ModuleEntity;
import com.iemr.common.dto.dynamicForm.FormTypeEntityDTO;
import com.iemr.common.dto.dynamicForm.ModuleEntityDTO;
import com.iemr.common.service.dynamicForm.FormTypeService;
import com.iemr.common.service.dynamicForm.ModuleService;
import com.iemr.common.dto.dynamicForm.FieldDTO;
import com.iemr.common.dto.dynamicForm.FormDTO;
import com.iemr.common.dto.dynamicForm.ModuleDTO;
import com.iemr.common.service.dynamicForm.FormMasterService;
import com.iemr.common.utils.response.ApiResponse;
import jakarta.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

@RequestMapping(value = "masterFrom")
import java.util.List;

@RequestMapping(value = "dynamicForm",headers = "Authorization")
@RestController
public class DynamicFormController {
@Autowired ModuleService moduleService;
@Autowired
private FormTypeService formTypeService;
private FormMasterService formMasterService;

@PostMapping(value = "createModule",headers = "Authorization")
public ResponseEntity<ApiResponse<?>> createModule(@Valid @RequestBody ModuleDTO moduleDTO) {
try {
Object result = formMasterService.createModule(moduleDTO);
return ResponseEntity.status(HttpStatus.OK)
.body(ApiResponse.success("Module created successfully", HttpStatus.OK.value(), result));
} catch (IllegalArgumentException e) {
return ResponseEntity.status(HttpStatus.BAD_REQUEST)
.body(ApiResponse.error("Invalid module data: " + e.getMessage(), HttpStatus.BAD_REQUEST.value(), null));
} catch (Exception e) {
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR)
.body(ApiResponse.error("Failed to create module", HttpStatus.INTERNAL_SERVER_ERROR.value(), null));
}
}

@PostMapping(value = "createForm",headers = "Authorization")
public ResponseEntity<ApiResponse<?>> createForm(@Valid @RequestBody FormDTO dto) {
try {
Object result = formMasterService.createForm(dto);
return ResponseEntity.status(HttpStatus.OK)
.body(ApiResponse.success("Form created successfully", HttpStatus.OK.value(), result));
} catch (Exception e) {
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR)
.body(ApiResponse.error("Failed to create form", HttpStatus.INTERNAL_SERVER_ERROR.value(), null));
}
}

@PostMapping(value = "createFields",headers = "Authorization")
public ResponseEntity<ApiResponse<?>> createField(@Valid @RequestBody List<FieldDTO> dto) {
try {
Object result = formMasterService.createField(dto);
return ResponseEntity.status(HttpStatus.OK)
.body(ApiResponse.success("Fields created successfully", HttpStatus.OK.value(), result));
} catch (Exception e) {
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR)
.body(ApiResponse.error("Failed to create fields", HttpStatus.INTERNAL_SERVER_ERROR.value(), null));
}
}

@PostMapping("/modules")
public ResponseEntity<ModuleEntity> createModule(@RequestBody ModuleEntityDTO module) {
return ResponseEntity.ok(moduleService.save(module));
@PostMapping(value = "field/update",headers = "Authorization")
public ResponseEntity<ApiResponse<?>> updateField(@Valid @RequestBody FieldDTO dto) {
try {
Object result = formMasterService.updateField(dto);
return ResponseEntity.status(HttpStatus.OK)
.body(ApiResponse.success("Field updated successfully", HttpStatus.OK.value(), result));
} catch (Exception e) {
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR)
.body(ApiResponse.error("Failed to update field", HttpStatus.INTERNAL_SERVER_ERROR.value(), null));
}
}

@PostMapping("/modules/{moduleId}/form-types")
public ResponseEntity<FormEntity> createFormType(@PathVariable Long moduleId, @RequestBody FormTypeEntityDTO formType) {
return ResponseEntity.ok(formTypeService.createFormType(moduleId, formType));
@DeleteMapping(value = "delete/{fieldId}/field",headers = "Authorization")
public ResponseEntity<ApiResponse<?>> deleteField(@PathVariable Long fieldId) {
try {
formMasterService.deleteField(fieldId);
return ResponseEntity.status(HttpStatus.OK)
.body(ApiResponse.success("Field deleted successfully", HttpStatus.OK.value(), null));
} catch (Exception e) {
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR)
.body(ApiResponse.error("Failed to delete field", HttpStatus.INTERNAL_SERVER_ERROR.value(), null));
}
}

@GetMapping(value = "form/{formId}/fields",headers = "Authorization")
public ResponseEntity<ApiResponse<?>> getStructuredForm(@PathVariable String formId) {
try {
Object result = formMasterService.getStructuredFormByFormId(formId);
return ResponseEntity.status(HttpStatus.OK)
.body(ApiResponse.success("Form structure fetched successfully", HttpStatus.OK.value(), result));
} catch (Exception e) {
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR)
.body(ApiResponse.error("Failed to fetch form structure", HttpStatus.INTERNAL_SERVER_ERROR.value(), null));
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,13 @@ public String sendSMS(
}
logger.debug("sendSMS sending response " + response);
logger.info("sendSMS sending response");
return response.toString();
String respStr = response.toString();
respStr = respStr.replace("\\u003d", "=")
.replace("\\u003c", "<")
.replace("\\u003e", ">")
.replace("\\u0026", "&");
return respStr;

}

}
Loading