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
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,7 @@ mvnw.cmd
# Properties
src/main/environment/admin_local.properties

node_modules
node_modules

# Logs
logs/
163 changes: 0 additions & 163 deletions logs/admin-api.log.json

This file was deleted.

Binary file removed logs/admin-api.log.json.2025-06-13.gz
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,234 @@
/*
* AMRIT – Accessible Medical Records via Integrated Technology
* Integrated EHR (Electronic Health Records) Solution
*
* Copyright (C) "Piramal Swasthya Management and Research Institute"
*
* This file is part of AMRIT.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
package com.iemr.admin.controller.employeemaster;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.iemr.admin.data.employeemaster.AshaSupervisorMapping;
import com.iemr.admin.data.employeemaster.M_UserServiceRoleMapping2;
import com.iemr.admin.data.store.M_Facility;
import com.iemr.admin.repo.employeemaster.EmployeeMasterRepo;
import com.iemr.admin.repository.store.MainStoreRepo;
import com.iemr.admin.service.employeemaster.AshaSupervisorMappingService;
import com.iemr.admin.utils.mapper.InputMapper;
import com.iemr.admin.utils.response.OutputResponse;

import io.swagger.v3.oas.annotations.Operation;

@RestController
public class AshaSupervisorMappingController {

private Logger logger = LoggerFactory.getLogger(this.getClass().getSimpleName());

@Autowired

Check warning on line 52 in src/main/java/com/iemr/admin/controller/employeemaster/AshaSupervisorMappingController.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this field injection and use constructor injection instead.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Admin-API&issues=AZ0BMqqZmjzjByUrfX8A&open=AZ0BMqqZmjzjByUrfX8A&pullRequest=125
private AshaSupervisorMappingService ashaSupervisorMappingService;

@Autowired

Check warning on line 55 in src/main/java/com/iemr/admin/controller/employeemaster/AshaSupervisorMappingController.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this field injection and use constructor injection instead.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Admin-API&issues=AZ0BMqqZmjzjByUrfX8B&open=AZ0BMqqZmjzjByUrfX8B&pullRequest=125
private EmployeeMasterRepo employeeMasterRepo;

@Autowired

Check warning on line 58 in src/main/java/com/iemr/admin/controller/employeemaster/AshaSupervisorMappingController.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this field injection and use constructor injection instead.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Admin-API&issues=AZ0BMqqZmjzjByUrfX8C&open=AZ0BMqqZmjzjByUrfX8C&pullRequest=125
private MainStoreRepo mainStoreRepo;

@Operation(summary = "Get ASHA users by facility IDs")
@RequestMapping(value = "/userFacilityMapping/getAshasByFacility", headers = "Authorization", method = {

Check warning on line 62 in src/main/java/com/iemr/admin/controller/employeemaster/AshaSupervisorMappingController.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Replace "@RequestMapping(method = RequestMethod.POST)" with "@PostMapping"

See more on https://sonarcloud.io/project/issues?id=PSMRI_Admin-API&issues=AZ0BMqqZmjzjByUrfX8D&open=AZ0BMqqZmjzjByUrfX8D&pullRequest=125
RequestMethod.POST }, produces = { "application/json" })
public String getAshasByFacility(@RequestBody String request) {
OutputResponse response = new OutputResponse();
try {
AshaSupervisorMapping reqObj = InputMapper.gson().fromJson(request, AshaSupervisorMapping.class);
List<Integer> facilityIDs = reqObj.getFacilityIDs();
if (facilityIDs == null || facilityIDs.isEmpty()) {
if (reqObj.getFacilityID() != null) {

Check warning on line 70 in src/main/java/com/iemr/admin/controller/employeemaster/AshaSupervisorMappingController.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Merge this if statement with the enclosing one.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Admin-API&issues=AZ0BMqqZmjzjByUrfX79&open=AZ0BMqqZmjzjByUrfX79&pullRequest=125
facilityIDs = Arrays.asList(reqObj.getFacilityID());
}
}
ArrayList<M_UserServiceRoleMapping2> ashaUsers = ashaSupervisorMappingService
.getAshasByFacility(facilityIDs);
response.setResponse(ashaUsers.toString());
} catch (Exception e) {
logger.error("Unexpected error:", e);

Check failure on line 78 in src/main/java/com/iemr/admin/controller/employeemaster/AshaSupervisorMappingController.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "Unexpected error:" 7 times.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Admin-API&issues=AZ0BMqqZmjzjByUrfX7-&open=AZ0BMqqZmjzjByUrfX7-&pullRequest=125
response.setError(e);
}
return response.toString();
}

@Operation(summary = "Save ASHA supervisor mappings")
@RequestMapping(value = "/userFacilityMapping/ashaSupervisorMapping/save", headers = "Authorization", method = {

Check warning on line 85 in src/main/java/com/iemr/admin/controller/employeemaster/AshaSupervisorMappingController.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Replace "@RequestMapping(method = RequestMethod.POST)" with "@PostMapping"

See more on https://sonarcloud.io/project/issues?id=PSMRI_Admin-API&issues=AZ0BMqqZmjzjByUrfX8E&open=AZ0BMqqZmjzjByUrfX8E&pullRequest=125
RequestMethod.POST }, produces = { "application/json" })
public String saveAshaSupervisorMapping(@RequestBody String request) {
OutputResponse response = new OutputResponse();
try {
AshaSupervisorMapping[] reqArray = InputMapper.gson().fromJson(request, AshaSupervisorMapping[].class);
List<AshaSupervisorMapping> mappings = Arrays.asList(reqArray);
ArrayList<AshaSupervisorMapping> savedMappings = ashaSupervisorMappingService
.saveAshaSupervisorMappings(mappings);
response.setResponse(savedMappings.toString());
} catch (Exception e) {
logger.error("Unexpected error:", e);
response.setError(e);
}
return response.toString();
}

@Operation(summary = "Get supervisor mappings by facility ID")
@RequestMapping(value = "/userFacilityMapping/ashaSupervisorMapping/getByFacility", headers = "Authorization", method = {

Check warning on line 103 in src/main/java/com/iemr/admin/controller/employeemaster/AshaSupervisorMappingController.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Replace "@RequestMapping(method = RequestMethod.POST)" with "@PostMapping"

See more on https://sonarcloud.io/project/issues?id=PSMRI_Admin-API&issues=AZ0BMqqZmjzjByUrfX8F&open=AZ0BMqqZmjzjByUrfX8F&pullRequest=125
RequestMethod.POST }, produces = { "application/json" })
public String getSupervisorMappingByFacility(@RequestBody String request) {
OutputResponse response = new OutputResponse();
try {
AshaSupervisorMapping reqObj = InputMapper.gson().fromJson(request, AshaSupervisorMapping.class);
ArrayList<AshaSupervisorMapping> mappings = ashaSupervisorMappingService
.getSupervisorMappingByFacility(reqObj.getFacilityID());
response.setResponse(mappings.toString());
} catch (Exception e) {
logger.error("Unexpected error:", e);
response.setError(e);
}
return response.toString();
}

@Operation(summary = "Delete ASHA supervisor mappings by supervisor and facility IDs")
@RequestMapping(value = "/userFacilityMapping/ashaSupervisorMapping/delete", headers = "Authorization", method = {

Check warning on line 120 in src/main/java/com/iemr/admin/controller/employeemaster/AshaSupervisorMappingController.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Replace "@RequestMapping(method = RequestMethod.POST)" with "@PostMapping"

See more on https://sonarcloud.io/project/issues?id=PSMRI_Admin-API&issues=AZ0BMqqZmjzjByUrfX8G&open=AZ0BMqqZmjzjByUrfX8G&pullRequest=125
RequestMethod.POST }, produces = { "application/json" })
public String deleteAshaSupervisorMapping(@RequestBody String request) {
OutputResponse response = new OutputResponse();
try {
AshaSupervisorMapping reqObj = InputMapper.gson().fromJson(request, AshaSupervisorMapping.class);
Integer supervisorUserID = reqObj.getSupervisorUserID();
List<Integer> facilityIDs = reqObj.getFacilityIDs();
if (supervisorUserID != null && facilityIDs != null && !facilityIDs.isEmpty()) {
ashaSupervisorMappingService.deleteBySupervisorAndFacilities(supervisorUserID, facilityIDs, "Admin");

Check failure on line 129 in src/main/java/com/iemr/admin/controller/employeemaster/AshaSupervisorMappingController.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "Admin" 3 times.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Admin-API&issues=AZ0BMqqZmjzjByUrfX7_&open=AZ0BMqqZmjzjByUrfX7_&pullRequest=125
response.setResponse("Deleted successfully");
} else {
response.setError(5000, "supervisorUserID and facilityIDs are required");
}
} catch (Exception e) {
logger.error("Unexpected error:", e);
response.setError(e);
}
return response.toString();
}

@Operation(summary = "Atomically delete old and save new ASHA supervisor mappings (Fix 7)")
@RequestMapping(value = "/userFacilityMapping/ashaSupervisorMapping/updateAtomically", headers = "Authorization", method = {

Check warning on line 142 in src/main/java/com/iemr/admin/controller/employeemaster/AshaSupervisorMappingController.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Replace "@RequestMapping(method = RequestMethod.POST)" with "@PostMapping"

See more on https://sonarcloud.io/project/issues?id=PSMRI_Admin-API&issues=AZ0BMqqZmjzjByUrfX8H&open=AZ0BMqqZmjzjByUrfX8H&pullRequest=125
RequestMethod.POST }, produces = { "application/json" })
public String updateAshaSupervisorMappingAtomically(@RequestBody String request) {
OutputResponse response = new OutputResponse();
try {
com.google.gson.JsonObject reqObj = InputMapper.gson().fromJson(request, com.google.gson.JsonObject.class);
Integer supervisorUserID = reqObj.get("supervisorUserID").getAsInt();
String modifiedBy = reqObj.has("modifiedBy") ? reqObj.get("modifiedBy").getAsString() : "Admin";
List<Integer> facilityIDs = new ArrayList<>();
if (reqObj.has("facilityIDs")) {
for (com.google.gson.JsonElement el : reqObj.getAsJsonArray("facilityIDs")) {
facilityIDs.add(el.getAsInt());
}
}
List<AshaSupervisorMapping> newMappings = new ArrayList<>();
if (reqObj.has("newMappings")) {
AshaSupervisorMapping[] arr = InputMapper.gson().fromJson(
reqObj.getAsJsonArray("newMappings").toString(), AshaSupervisorMapping[].class);
newMappings = Arrays.asList(arr);
}
ArrayList<AshaSupervisorMapping> saved = ashaSupervisorMappingService
.updateAshaMappingsAtomically(supervisorUserID, facilityIDs, newMappings, modifiedBy);
response.setResponse(saved.toString());
} catch (Exception e) {
logger.error("Unexpected error:", e);
response.setError(e);
}
return response.toString();
}

@Operation(summary = "Restore soft-deleted ASHA supervisor mappings by IDs")
@RequestMapping(value = "/userFacilityMapping/ashaSupervisorMapping/restore", headers = "Authorization", method = {

Check warning on line 173 in src/main/java/com/iemr/admin/controller/employeemaster/AshaSupervisorMappingController.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Replace "@RequestMapping(method = RequestMethod.POST)" with "@PostMapping"

See more on https://sonarcloud.io/project/issues?id=PSMRI_Admin-API&issues=AZ0BMqqZmjzjByUrfX8I&open=AZ0BMqqZmjzjByUrfX8I&pullRequest=125
RequestMethod.POST }, produces = { "application/json" })
public String restoreAshaSupervisorMapping(@RequestBody String request) {
OutputResponse response = new OutputResponse();
try {
AshaSupervisorMapping reqObj = InputMapper.gson().fromJson(request, AshaSupervisorMapping.class);
List<Long> ids = reqObj.getIds();
if (ids != null && !ids.isEmpty()) {
ashaSupervisorMappingService.restoreMappings(ids, "Admin");
response.setResponse("Restored successfully");
} else {
response.setError(5000, "ids are required");
}
} catch (Exception e) {
logger.error("Unexpected error:", e);
response.setError(e);
}
return response.toString();
}

@Operation(summary = "Get facility details by USR mapping ID")
@RequestMapping(value = "/userFacilityMapping/getFacilityByMappingID", headers = "Authorization", method = {

Check warning on line 194 in src/main/java/com/iemr/admin/controller/employeemaster/AshaSupervisorMappingController.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Replace "@RequestMapping(method = RequestMethod.POST)" with "@PostMapping"

See more on https://sonarcloud.io/project/issues?id=PSMRI_Admin-API&issues=AZ0BMqqZmjzjByUrfX8K&open=AZ0BMqqZmjzjByUrfX8K&pullRequest=125
RequestMethod.POST }, produces = { "application/json" })
public String getFacilityByMappingID(@RequestBody String request) {

Check failure on line 196 in src/main/java/com/iemr/admin/controller/employeemaster/AshaSupervisorMappingController.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Refactor this method to reduce its Cognitive Complexity from 22 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Admin-API&issues=AZ0BMqqZmjzjByUrfX8J&open=AZ0BMqqZmjzjByUrfX8J&pullRequest=125
OutputResponse response = new OutputResponse();
try {
M_UserServiceRoleMapping2 reqObj = InputMapper.gson().fromJson(request, M_UserServiceRoleMapping2.class);
Integer mappingID = reqObj.getuSRMappingID();
if (mappingID != null) {
M_UserServiceRoleMapping2 mapping = employeeMasterRepo.findById(mappingID).orElse(null);
// Skip if mapping is soft-deleted or has no facility
if (mapping != null && Boolean.TRUE.equals(mapping.getDeleted())) {
mapping = null;
}
if (mapping != null && mapping.getFacilityID() != null) {
// Use deleted filter to exclude soft-deleted facilities
M_Facility facility = mainStoreRepo.findByFacilityIDAndDeleted(mapping.getFacilityID(), false);
StringBuilder json = new StringBuilder("{");
json.append("\"facilityID\": ").append(mapping.getFacilityID());
if (facility != null) {
json.append(", \"facilityName\": \"").append(facility.getFacilityName() != null ? facility.getFacilityName() : "").append("\"");
json.append(", \"facilityTypeID\": ").append(facility.getFacilityTypeID());
json.append(", \"ruralUrban\": \"").append(facility.getRuralUrban() != null ? facility.getRuralUrban() : "").append("\"");
} else {
// Facility was deleted β€” return null so frontend knows
json = new StringBuilder("{\"facilityID\": null, \"facilityDeleted\": true");
}
json.append("}");
response.setResponse(json.toString());
} else {
response.setResponse("{\"facilityID\": null}");
}
} else {
response.setResponse("{\"facilityID\": null}");
}
} catch (Exception e) {
logger.error("Unexpected error:", e);
response.setError(e);
}
return response.toString();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1804,12 +1804,15 @@ public String UserRoleMappings(@RequestBody String userRoleMapping, HttpServletR
resDataMap1.setUserID(employeeMaster.get(x).getUserID());
resDataMap1.setProviderServiceMapID(previl.getProviderServiceMapID());
resDataMap1.setWorkingLocationID(previl.getWorkingLocationID());
resDataMap1.setStateID(previl.getStateID());
resDataMap1.setDistrictID(previl.getDistrictID());
resDataMap1.setCreatedBy(employeeMaster.get(x).getCreatedBy());
resDataMap1.setServiceProviderID(employeeMaster.get(x).getServiceProviderID());
resDataMap1.setBlockID(previl.getBlockID());
resDataMap1.setBlockName(previl.getBlockName());
resDataMap1.setVillageID(previl.getVillageID());
resDataMap1.setVillageName(previl.getVillageName());
resDataMap1.setFacilityID(previl.getFacilityID());
resList1.add(resDataMap1);

}
Expand Down Expand Up @@ -1845,16 +1848,32 @@ public String updateUserRoleMapping(@RequestBody String updateUserRoleMapping, H

M_UserServiceRoleMapping2 usrRole = employeeMasterInter.getDataUsrId(pre.getuSRMappingID());

// Fix 1/3: cascade asha_supervisor_mapping BEFORE modifying entity to avoid JPA L1 cache issue
if (usrRole != null && usrRole.getUserID() != null) {
boolean roleChanged = pre.getRoleID() != null && usrRole.getRoleID() != null
&& !usrRole.getRoleID().equals(pre.getRoleID());
boolean facilityChanged = usrRole.getFacilityID() != null && pre.getFacilityID() != null
&& !usrRole.getFacilityID().equals(pre.getFacilityID());
if (roleChanged || facilityChanged) {
logger.info("Fix1/3: cascading asha_supervisor_mapping for userID={}, roleChanged={}, facilityChanged={}",
usrRole.getUserID(), roleChanged, facilityChanged);
employeeMasterInter.cascadeDeleteAshaMappingsForUser(usrRole.getUserID());
}
}

usrRole.setUserID(pre.getUserID());
usrRole.setRoleID(pre.getRoleID());
usrRole.setAgentPassword(pre.getAgentPassword());
usrRole.setProviderServiceMapID(pre.getProviderServiceMapID());
usrRole.setWorkingLocationID(pre.getWorkingLocationID());
usrRole.setStateID(pre.getStateID());
usrRole.setDistrictID(pre.getDistrictID());
usrRole.setModifiedBy(pre.getModifiedBy());
usrRole.setBlockID(pre.getBlockID());
usrRole.setBlockName(pre.getBlockName());
usrRole.setVillageID(pre.getVillageID());
usrRole.setVillageName(pre.getVillageName());
usrRole.setFacilityID(pre.getFacilityID());

if (pre.getTeleConsultation() != null) {
usrRole.setTeleConsultation(pre.getTeleConsultation());
Expand Down Expand Up @@ -1897,6 +1916,17 @@ public String deleteUserRoleMapping(@RequestBody String deletedUserRoleMapping,

M_UserServiceRoleMapping2 usrRole = employeeMasterInter.getDataUsrId(pre.getuSRMappingID());

// Fix 2: cascade asha_supervisor_mapping BEFORE setDeleted() to avoid JPA L1 cache issue.
// After setDeleted(true), findById() in saveRoleMappingeditedData hits the L1 cache
// returning the already-modified entity, so the "old vs new deleted" check always fails.
// For ASHA Supervisor with multiple facilities: only delete mappings for this facilityID
if (Boolean.TRUE.equals(pre.getDeleted()) && !Boolean.TRUE.equals(usrRole.getDeleted())
&& usrRole.getUserID() != null) {
logger.info("Fix2: cascading asha_supervisor_mapping soft-delete for userID={}, uSRMappingID={}",
usrRole.getUserID(), pre.getuSRMappingID());
employeeMasterInter.cascadeDeleteAshaMappingsForDeactivation(usrRole);
}

usrRole.setDeleted(pre.getDeleted());

M_UserServiceRoleMapping2 savedata = employeeMasterInter.saveRoleMappingeditedData(usrRole,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@
import org.springframework.web.bind.annotation.RestController;

import com.iemr.admin.data.facilitytype.M_facilitytype;
import com.iemr.admin.data.store.M_Facility;
import com.iemr.admin.data.store.M_FacilityLevel;
import com.iemr.admin.repository.store.MainStoreRepo;
import com.iemr.admin.service.facilitytype.M_facilitytypeInter;
import com.iemr.admin.utils.mapper.InputMapper;
import com.iemr.admin.utils.response.OutputResponse;
Expand All @@ -49,6 +51,9 @@
@Autowired
private M_facilitytypeInter m_facilitytypeInter;

@Autowired

Check warning on line 54 in src/main/java/com/iemr/admin/controller/facilitytype/FacilitytypeController.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this field injection and use constructor injection instead.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Admin-API&issues=AZ0BMqsmmjzjByUrfX8O&open=AZ0BMqsmmjzjByUrfX8O&pullRequest=125
private MainStoreRepo mainStoreRepo;

@Operation(summary = "Get facility")
@RequestMapping(value = "/getFacility", headers = "Authorization", method = { RequestMethod.POST }, produces = {
"application/json" })
Expand Down Expand Up @@ -115,7 +120,15 @@
M_facilitytype allFacilityData = m_facilitytypeInter
.editAllFicilityData(facilityDetails.getFacilityTypeID());

allFacilityData.setFacilityTypeDesc(facilityDetails.getFacilityTypeDesc());
if (facilityDetails.getFacilityTypeName() != null) {
allFacilityData.setFacilityTypeName(facilityDetails.getFacilityTypeName());
}
if (facilityDetails.getRuralUrban() != null) {
allFacilityData.setRuralUrban(facilityDetails.getRuralUrban());
}
if (facilityDetails.getFacilityTypeDesc() != null) {
allFacilityData.setFacilityTypeDesc(facilityDetails.getFacilityTypeDesc());
}
allFacilityData.setModifiedBy(facilityDetails.getModifiedBy());

M_facilitytype saveFacilityData = m_facilitytypeInter.updateFacilityData(allFacilityData);
Expand Down Expand Up @@ -145,6 +158,16 @@

M_facilitytype allFacilityData = m_facilitytypeInter
.editAllFicilityData(facilityDetails.getFacilityTypeID());

// Block deactivation if facility type is in use by active facilities
if (Boolean.TRUE.equals(facilityDetails.getDeleted())) {
List<M_Facility> activeFacilities = mainStoreRepo
.findByFacilityTypeIDAndDeletedFalse(facilityDetails.getFacilityTypeID());
if (activeFacilities != null && !activeFacilities.isEmpty()) {
throw new Exception("Cannot deactivate: facility type is in use by " + activeFacilities.size() + " active facilities");

Check warning on line 167 in src/main/java/com/iemr/admin/controller/facilitytype/FacilitytypeController.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Replace generic exceptions with specific library exceptions or a custom exception.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Admin-API&issues=AZ0BMqsmmjzjByUrfX8N&open=AZ0BMqsmmjzjByUrfX8N&pullRequest=125
}
}

allFacilityData.setDeleted(facilityDetails.getDeleted());

M_facilitytype saveFacilityData = m_facilitytypeInter.updateFacilityData(allFacilityData);
Expand Down
Loading
Loading