Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
a3a8079
Fix the issue in retrieving the Casesheet Print Data for Cancer Scree…
vanitha1822 Jul 16, 2025
458af67
fix: add the column for NumberperWeek to store and fetch the data (#94)
vanitha1822 Jul 16, 2025
cd5cffb
Update version in pom.xml to 3.4.0
5Amogh Jul 21, 2025
16c3991
chore: add Lombok @Data to BenClinicalObservations (#97)
vanitha1822 Jul 21, 2025
b66035c
fix: add file path in cancer gynecological examination (#98)
vanitha1822 Jul 25, 2025
d878d4b
Fix the data sync issue (#93)
vanitha1822 Jul 30, 2025
2b7f4c3
fix: add functionality to save the file ID's uploaded from doctor scr…
vanitha1822 Jul 30, 2025
1aadead
story: amm-1668 task - 1754
5Amogh Jul 31, 2025
e50c0e9
Merge pull request #101 from PSMRI/amo-3.4
5Amogh Jul 31, 2025
ea84964
story: amm-1754 updated response including father name and phone no o…
5Amogh Aug 1, 2025
e1d6ece
Save the files uploaded from Doctor Screen (#100)
vanitha1822 Aug 1, 2025
690e358
fix: cherry-pick the commits from develop
vanitha1822 Aug 5, 2025
b384bc5
fix: cherry-pick commits from develop
vanitha1822 Jul 1, 2025
9571a35
Fix the Download Masters issue (#103)
vanitha1822 Aug 5, 2025
3d3ce58
fix: remove the validation (#105)
vanitha1822 Aug 6, 2025
4c85e25
fix: replace the old working code (#106)
vanitha1822 Aug 6, 2025
9c97e6d
Fix the datasync upload issue (#107)
vanitha1822 Aug 8, 2025
43df9cf
Fixing the datasync from local to central (#110)
vanitha1822 Aug 10, 2025
2828fe6
fix: remove the token for server authorization (#111)
vanitha1822 Aug 11, 2025
604bd64
Fix the datasync Demographics Issue (#112)
vanitha1822 Aug 14, 2025
62a5a18
Fix the token issue for Ben-gen id generation (#114)
vanitha1822 Aug 19, 2025
d592f6a
fix: replace authorization for local api call (#116)
vanitha1822 Aug 20, 2025
26bf74c
fix: add logs (#117)
vanitha1822 Aug 20, 2025
9f7fb1c
Fix the BenGen ID Issue (#118)
vanitha1822 Aug 22, 2025
18e89ea
Fix the DataSync with SyncFailureReason (#121)
vanitha1822 Sep 24, 2025
966c0dc
Update pom.xml
5Amogh Sep 25, 2025
f2a546f
Update pom.xml
5Amogh Sep 25, 2025
3f52227
Fix the partial datasync issue (#122)
vanitha1822 Sep 26, 2025
f232c1c
Fix Sync Issue to Ensure Full Completion (#123)
vanitha1822 Oct 2, 2025
3db94c9
fix: update van serial no (#124)
vanitha1822 Oct 3, 2025
d621130
fix: ui change (#125)
vanitha1822 Oct 3, 2025
f1efb4d
fix: Doctor signature was not coming in to ncd care visittype
snehar-nd Oct 6, 2025
5e5e078
fix: add the createby and createat
vishwab1 Oct 6, 2025
869c023
Merge pull request #126 from PSMRI/sn/3.5.1
vishwab1 Oct 6, 2025
f1ebcf4
Fix the BenChiefcomplaint issue (#127)
vanitha1822 Oct 7, 2025
e8f40d7
Update pom.xml (#128)
vanitha1822 Oct 9, 2025
b1e6a4a
fix: van serial no (#130)
vanitha1822 Oct 10, 2025
0c5481d
fix: aam-1896 prescribed quantity was not coming in the casesheet
snehar-nd Oct 14, 2025
12e1ddd
Merge pull request #131 from PSMRI/sn/3.5.1
snehar-nd Oct 15, 2025
5adeb8b
fix:add the response for save doctor data (#132)
vishwab1 Oct 17, 2025
f83cd43
API changes in Signature enhancement for Casesheet (#133)
vishwab1 Oct 30, 2025
c9f6a59
fix:update doctor data with sign
vishwab1 Oct 30, 2025
606c45d
Merge pull request #134 from PSMRI/vb/signature
vishwab1 Oct 30, 2025
0fd1bb5
fix: amm-1919 fix for update doctor data for higher refferal data
snehar-nd Oct 31, 2025
d81128f
Merge pull request #135 from PSMRI/sn/3.5.1
snehar-nd Oct 31, 2025
95475bd
fix: created date updation issue (#136)
vanitha1822 Nov 4, 2025
2709ed5
fix: amm-1927 http methods shown as options issue fix
5Amogh Nov 17, 2025
af8cbb1
Update regex handling for localhost in HttpInterceptor
5Amogh Nov 18, 2025
7d283fa
Enhance regex for localhost URL matching
5Amogh Nov 18, 2025
db20629
Fix the WASA Issue : IDOR Vulnerability (#137)
vanitha1822 Nov 19, 2025
ca047b8
Merge pull request #138 from PSMRI/amm-1927
5Amogh Nov 20, 2025
aa2d6fc
Role Based Broken Access Control Implementation : WASA (#139)
vanitha1822 Nov 27, 2025
ecba4b5
Merge pull request #140 from PSMRI/release-3.4.0
5Amogh Dec 3, 2025
e20c6d7
Merge pull request #141 from PSMRI/release-3.4.1
5Amogh Dec 3, 2025
2008dd5
Merge branch 'release-3.6.0' into release-3.5.0
5Amogh Dec 3, 2025
353827b
Merge pull request #142 from PSMRI/release-3.5.0
5Amogh Dec 3, 2025
ddc9588
Merge branch 'release-3.6.0' into release-3.6.1
5Amogh Dec 3, 2025
9db78a7
Merge pull request #143 from PSMRI/release-3.6.1
5Amogh Dec 3, 2025
da3b740
fix: test cases errors fixed
5Amogh Dec 4, 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
6 changes: 5 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.iemr.mmu</groupId>
<artifactId>mmu-api</artifactId>
<version>3.4.0</version>
<version>3.6.0</version>
<packaging>war</packaging>

<name>MMU-API</name>
Expand Down Expand Up @@ -64,6 +64,10 @@
<artifactId>slf4j-simple</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>co.elastic.logging</groupId>
<artifactId>logback-ecs-encoder</artifactId>
Expand Down
64 changes: 60 additions & 4 deletions src/main/java/com/iemr/mmu/controller/anc/ANCController.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,15 @@
*/
package com.iemr.mmu.controller.anc;

import java.util.ArrayList;
import java.util.HashMap;

Comment on lines +24 to +26
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Remove duplicate imports.

Lines 24-26 and 50-56 contain duplicate import statements for ArrayList, HashMap, List, Map, and Gson. This will cause compilation errors.

🐛 Proposed fix
-import java.util.ArrayList;
-import java.util.HashMap;
-
 import org.json.JSONObject;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.repository.query.Param;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.transaction.annotation.Transactional;
 
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestHeader;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 import com.google.gson.Gson;
 import com.google.gson.JsonElement;
 import com.google.gson.JsonObject;
 import com.google.gson.JsonParser;
 import com.iemr.mmu.service.anc.ANCService;
 import com.iemr.mmu.utils.response.OutputResponse;
 
 import io.swagger.v3.oas.annotations.Operation;
 
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import com.google.gson.Gson;
 import com.google.gson.JsonArray;

Also applies to: 50-56

🤖 Prompt for AI Agents
In @src/main/java/com/iemr/mmu/controller/anc/ANCController.java around lines 24
- 26, Remove the duplicate import declarations in ANCController.java: keep a
single set of imports for java.util.ArrayList, java.util.HashMap,
java.util.List, java.util.Map and com.google.gson.Gson and delete the redundant
repeated import block (the duplicates around lines 24-26 and 50-56). Ensure only
one import statement exists for each symbol (ArrayList, HashMap, List, Map,
Gson) so the file compiles without duplicate-import errors.

import org.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.repository.query.Param;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.transaction.annotation.Transactional;

import org.springframework.web.bind.annotation.PostMapping;
Expand All @@ -34,6 +38,7 @@
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
Expand All @@ -42,6 +47,13 @@

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

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.google.gson.Gson;
import com.google.gson.JsonArray;

/**
* @Objective Saving ANC data for Nurse and Doctor.
*/
Expand All @@ -59,6 +71,7 @@ public class ANCController {
*/
@Operation(summary = "Save ANC nurse data")
@PostMapping(value = { "/save/nurseData" })
@PreAuthorize("hasRole('NURSE')")
public String saveBenANCNurseData(@RequestBody String requestObj) {
OutputResponse response = new OutputResponse();
try {
Expand Down Expand Up @@ -91,6 +104,7 @@ public String saveBenANCNurseData(@RequestBody String requestObj) {
*/
@Operation(summary = "Save ANC doctor data")
@PostMapping(value = { "/save/doctorData" })
@PreAuthorize(" hasRole('DOCTOR')")
public String saveBenANCDoctorData(@RequestBody String requestObj,
@RequestHeader(value = "Authorization") String authorization) {
OutputResponse response = new OutputResponse();
Expand All @@ -99,7 +113,23 @@ public String saveBenANCDoctorData(@RequestBody String requestObj,
if (jsnOBJ != null) {
Long r = ancService.saveANCDoctorData(jsnOBJ, authorization);
if (r != null && r > 0) {
response.setResponse("Data saved successfully");
// Extract drug IDs from JsonObject
List<Long> prescribedDrugIDs = new ArrayList<>();
if (jsnOBJ.has("savedDrugIDs") && !jsnOBJ.get("savedDrugIDs").isJsonNull()) {
JsonArray drugIDsArray = jsnOBJ.getAsJsonArray("savedDrugIDs");
for (int j = 0; j < drugIDsArray.size(); j++) {
prescribedDrugIDs.add(drugIDsArray.get(j).getAsLong());
}
}

// Create response with message and IDs
Map<String, Object> responseData = new HashMap<>();
responseData.put("message", "Data saved successfully");
responseData.put("prescribedDrugIDs", prescribedDrugIDs);

Gson gson = new Gson();
String responseJson = gson.toJson(responseData);
response.setResponse(responseJson);
} else {
response.setError(5000, "Unable to save data");
}
Expand All @@ -116,6 +146,7 @@ public String saveBenANCDoctorData(@RequestBody String requestObj,

@Operation(summary = "Get beneficiary visit details from nurse ANC")
@PostMapping(value = { "/getBenVisitDetailsFrmNurseANC" })
@PreAuthorize("hasRole('NURSE') || hasRole('DOCTOR')")
@Transactional(rollbackFor = Exception.class)
public String getBenVisitDetailsFrmNurseANC(
@Param(value = "{\"benRegID\":\"Long\", \"visitCode\":\"Long\"}") @RequestBody String comingRequest) {
Expand Down Expand Up @@ -147,6 +178,7 @@ public String getBenVisitDetailsFrmNurseANC(
@Operation(summary = "Get beneficiary ANC care details from nurse ANC")
@PostMapping(value = { "/getBenANCDetailsFrmNurseANC" })
@Transactional(rollbackFor = Exception.class)
@PreAuthorize("hasRole('NURSE') || hasRole('DOCTOR')")
public String getBenANCDetailsFrmNurseANC(
@Param(value = "{\"benRegID\":\"Long\", \"visitCode\":\"Long\"}") @RequestBody String comingRequest) {
OutputResponse response = new OutputResponse();
Expand Down Expand Up @@ -178,7 +210,7 @@ public String getBenANCDetailsFrmNurseANC(
*/
@Operation(summary = "Get beneficiary ANC history details from nurse to doctor ")
@PostMapping(value = { "/getBenANCHistoryDetails" })

@PreAuthorize("hasRole('NURSE') || hasRole('DOCTOR')")
public String getBenANCHistoryDetails(
@Param(value = "{\"benRegID\":\"Long\", \"visitCode\":\"Long\"}") @RequestBody String comingRequest) {
OutputResponse response = new OutputResponse();
Expand Down Expand Up @@ -209,6 +241,7 @@ public String getBenANCHistoryDetails(
*/
@Operation(summary = "Get beneficiary ANC vital details from nurse ANC")
@PostMapping(value = { "/getBenANCVitalDetailsFrmNurseANC" })
@PreAuthorize("hasRole('NURSE') || hasRole('DOCTOR')")
public String getBenANCVitalDetailsFrmNurseANC(
@Param(value = "{\"benRegID\":\"Long\",\"visitCode\":\"Long\"}") @RequestBody String comingRequest) {
OutputResponse response = new OutputResponse();
Expand Down Expand Up @@ -240,7 +273,7 @@ public String getBenANCVitalDetailsFrmNurseANC(
*/
@Operation(summary = "Get beneficiary ANC examination details from nurse to doctor ")
@PostMapping(value = { "/getBenExaminationDetailsANC" })

@PreAuthorize("hasRole('NURSE') || hasRole('DOCTOR')")
public String getBenExaminationDetailsANC(
@Param(value = "{\"benRegID\":\"Long\",\"visitCode\":\"Long\"}") @RequestBody String comingRequest) {
OutputResponse response = new OutputResponse();
Expand Down Expand Up @@ -272,6 +305,7 @@ public String getBenExaminationDetailsANC(
@Operation(summary = "Get beneficiary doctor entered details")
@PostMapping(value = { "/getBenCaseRecordFromDoctorANC" })
@Transactional(rollbackFor = Exception.class)
@PreAuthorize("hasRole('NURSE') || hasRole('DOCTOR')")
public String getBenCaseRecordFromDoctorANC(
@Param(value = "{\"benRegID\":\"Long\",\"visitCode\":\"Long\"}") @RequestBody String comingRequest) {
OutputResponse response = new OutputResponse();
Expand All @@ -298,6 +332,7 @@ public String getBenCaseRecordFromDoctorANC(
@Operation(summary = "Check high risk pregnancy status for ANC beneficiary")
@PostMapping(value = { "/getHRPStatus" })
@Transactional(rollbackFor = Exception.class)
@PreAuthorize("hasRole('NURSE') || hasRole('DOCTOR')")
public String getHRPStatus(
@Param(value = "{\"benRegID\":\"Long\",\"visitCode\":\"Long\"}") @RequestBody String comingRequest) {
OutputResponse response = new OutputResponse();
Expand Down Expand Up @@ -326,6 +361,7 @@ public String getHRPStatus(

@Operation(summary = "Update ANC care data in doctor screen")
@PostMapping(value = { "/update/ANCScreen" })
@PreAuthorize("hasRole('NURSE') || hasRole('DOCTOR')")
public String updateANCCareNurse(@RequestBody String requestObj) {

OutputResponse response = new OutputResponse();
Expand Down Expand Up @@ -356,6 +392,7 @@ public String updateANCCareNurse(@RequestBody String requestObj) {
*/
@Operation(summary = "Update ANC history data in doctor screen")
@PostMapping(value = { "/update/historyScreen" })
@PreAuthorize("hasRole('NURSE') || hasRole('DOCTOR')")
public String updateANCHistoryNurse(@RequestBody String requestObj) {

OutputResponse response = new OutputResponse();
Expand Down Expand Up @@ -385,6 +422,7 @@ public String updateANCHistoryNurse(@RequestBody String requestObj) {
*/
@Operation(summary = "Update ANC vital data in doctor screen")
@PostMapping(value = { "/update/vitalScreen" })
@PreAuthorize("hasRole('NURSE') || hasRole('DOCTOR')")
public String updateANCVitalNurse(@RequestBody String requestObj) {

OutputResponse response = new OutputResponse();
Expand Down Expand Up @@ -415,6 +453,7 @@ public String updateANCVitalNurse(@RequestBody String requestObj) {
*/
@Operation(summary = "Update ANC examination data in doctor screen")
@PostMapping(value = { "/update/examinationScreen" })
@PreAuthorize("hasRole('NURSE') || hasRole('DOCTOR')")
public String updateANCExaminationNurse(@RequestBody String requestObj) {

OutputResponse response = new OutputResponse();
Expand Down Expand Up @@ -445,6 +484,7 @@ public String updateANCExaminationNurse(@RequestBody String requestObj) {
*/
@Operation(summary = "Update ANC doctor data")
@PostMapping(value = { "/update/doctorData" })
@PreAuthorize("hasRole('NURSE') || hasRole('DOCTOR')")
public String updateANCDoctorData(@RequestBody String requestObj,
@RequestHeader(value = "Authorization") String authorization) {

Expand All @@ -454,7 +494,23 @@ public String updateANCDoctorData(@RequestBody String requestObj,
try {
Long result = ancService.updateANCDoctorData(jsnOBJ, authorization);
if (null != result && result > 0) {
response.setResponse("Data updated successfully");
// Extract drug IDs from JsonObject
List<Long> prescribedDrugIDs = new ArrayList<>();
if (jsnOBJ.has("savedDrugIDs") && !jsnOBJ.get("savedDrugIDs").isJsonNull()) {
JsonArray drugIDsArray = jsnOBJ.getAsJsonArray("savedDrugIDs");
for (int j = 0; j < drugIDsArray.size(); j++) {
prescribedDrugIDs.add(drugIDsArray.get(j).getAsLong());
}
}

// Create response with message and IDs
Map<String, Object> responseData = new HashMap<>();
responseData.put("message", "Data updated successfully");
responseData.put("prescribedDrugIDs", prescribedDrugIDs);

Gson gson = new Gson();
String responseJson = gson.toJson(responseData);
response.setResponse(responseJson);
} else {
response.setError(500, "Unable to modify data");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.transaction.annotation.Transactional;

import org.springframework.web.bind.annotation.PostMapping;
Expand Down Expand Up @@ -67,6 +68,7 @@ public void setCancerScreeningServiceImpl(CSServiceImpl cSServiceImpl) {
*/
@Operation(summary = "Save cancer screening nurse data")
@PostMapping(value = { "/save/nurseData" })
@PreAuthorize("hasRole('NURSE')")
public String saveBenCancerScreeningNurseData(@RequestBody String requestObj,
@RequestHeader(value = "Authorization") String authorization) {
OutputResponse response = new OutputResponse();
Expand Down Expand Up @@ -106,6 +108,7 @@ else if (nurseDataSaveSuccessFlag == 2)
*/
@Operation(summary = "Save cancer screening doctor data")
@PostMapping(value = { "/save/doctorData" })
@PreAuthorize("hasRole('DOCTOR')")
public String saveBenCancerScreeningDoctorData(@RequestBody String requestObj,
@RequestHeader String authorization) {
OutputResponse response = new OutputResponse();
Expand All @@ -132,6 +135,7 @@ public String saveBenCancerScreeningDoctorData(@RequestBody String requestObj,

@Operation(summary = "Get beneficiary visit details from nurse screen")
@PostMapping(value = { "/getBenDataFrmNurseToDocVisitDetailsScreen" })
@PreAuthorize("hasRole('NURSE') || hasRole('DOCTOR')")
public String getBenDataFrmNurseScrnToDocScrnVisitDetails(
@ApiParam(value = "{\"benRegID\":\"Long\", \"visitCode\":\"Long\"}") @RequestBody String comingRequest) {
OutputResponse response = new OutputResponse();
Expand Down Expand Up @@ -161,6 +165,7 @@ public String getBenDataFrmNurseScrnToDocScrnVisitDetails(
*/
@Operation(summary = "Get beneficiary cancer history details from nurse screen")
@PostMapping(value = { "/getBenDataFrmNurseToDocHistoryScreen" })
@PreAuthorize("hasRole('NURSE') || hasRole('DOCTOR')")
public String getBenDataFrmNurseScrnToDocScrnHistory(
@ApiParam(value = "{\"benRegID\":\"Long\", \"visitCode\":\"Long\"}") @RequestBody String comingRequest) {
OutputResponse response = new OutputResponse();
Expand Down Expand Up @@ -189,6 +194,7 @@ public String getBenDataFrmNurseScrnToDocScrnHistory(
*/
@Operation(summary = "Get beneficiary vital details from nurse screen")
@PostMapping(value = { "/getBenDataFrmNurseToDocVitalScreen" })
@PreAuthorize("hasRole('NURSE') || hasRole('DOCTOR')")
public String getBenDataFrmNurseScrnToDocScrnVital(
@ApiParam(value = "{\"benRegID\":\"Long\", \"visitCode\":\"Long\"}") @RequestBody String comingRequest) {
OutputResponse response = new OutputResponse();
Expand Down Expand Up @@ -218,6 +224,7 @@ public String getBenDataFrmNurseScrnToDocScrnVital(
*/
@Operation(summary = "Get beneficiary examination details from nurse screen")
@PostMapping(value = { "/getBenDataFrmNurseToDocExaminationScreen" })
@PreAuthorize("hasRole('NURSE') || hasRole('DOCTOR')")
public String getBenDataFrmNurseScrnToDocScrnExamination(
@ApiParam(value = "{\"benRegID\":\"Long\", \"visitCode\":\"Long\"}") @RequestBody String comingRequest) {
OutputResponse response = new OutputResponse();
Expand Down Expand Up @@ -247,6 +254,7 @@ public String getBenDataFrmNurseScrnToDocScrnExamination(
*/
@Operation(summary = "Get beneficiary cancer family history")
@PostMapping(value = { "/getBenCancerFamilyHistory" })
@PreAuthorize("hasRole('NURSE') || hasRole('DOCTOR')")
public String getBenCancerFamilyHistory(
@ApiParam(value = "{\"benRegID\":\"Long\"}") @RequestBody String comingRequest) {
OutputResponse response = new OutputResponse();
Expand Down Expand Up @@ -278,6 +286,7 @@ public String getBenCancerFamilyHistory(
*/
@Operation(summary = "Get beneficiary cancer personal history")
@PostMapping(value = { "/getBenCancerPersonalHistory" })
@PreAuthorize("hasRole('NURSE') || hasRole('DOCTOR')")
public String getBenCancerPersonalHistory(
@ApiParam(value = "{\"benRegID\":\"Long\"}") @RequestBody String comingRequest) {
OutputResponse response = new OutputResponse();
Expand Down Expand Up @@ -309,6 +318,7 @@ public String getBenCancerPersonalHistory(
*/
@Operation(summary = "Get beneficiary cancer personal diet history")
@PostMapping(value = { "/getBenCancerPersonalDietHistory" })
@PreAuthorize("hasRole('NURSE') || hasRole('DOCTOR')")
public String getBenCancerPersonalDietHistory(
@ApiParam(value = "{\"benRegID\":\"Long\"}") @RequestBody String comingRequest) {
OutputResponse response = new OutputResponse();
Expand Down Expand Up @@ -340,6 +350,7 @@ public String getBenCancerPersonalDietHistory(
*/
@Operation(summary = "Get beneficiary cancer obstetric history")
@PostMapping(value = { "/getBenCancerObstetricHistory" })
@PreAuthorize("hasRole('NURSE') || hasRole('DOCTOR')")
public String getBenCancerObstetricHistory(
@ApiParam(value = "{\"benRegID\":\"Long\"}") @RequestBody String comingRequest) {
OutputResponse response = new OutputResponse();
Expand Down Expand Up @@ -370,6 +381,7 @@ public String getBenCancerObstetricHistory(
*/
@Operation(summary = "Get beneficiary doctor entered details")
@PostMapping(value = { "/getBenCaseRecordFromDoctorCS" })
@PreAuthorize("hasRole('NURSE') || hasRole('DOCTOR')")
@Transactional(rollbackFor = Exception.class)
public String getBenCaseRecordFromDoctorCS(
@ApiParam(value = "{\"benRegID\":\"Long\", \"visitCode\":\"Long\"}") @RequestBody String comingRequest) {
Expand All @@ -396,6 +408,7 @@ public String getBenCaseRecordFromDoctorCS(

@Operation(summary = "Update cancer screening history nurse data in doctor screen")
@PostMapping(value = { "/update/historyScreen" })
@PreAuthorize("hasRole('NURSE') || hasRole('DOCTOR')")
public String updateCSHistoryNurse(
@ApiParam(value = "{\"historyDetails\": {\"familyHistory\":{\"diseases\": [{\"beneficiaryRegID\":\"Long\", \"benVisitID\":\"Long\", "
+ "\"providerServiceMapID\":\"Integer\", \"cancerDiseaseType\":\"String\", \"otherDiseaseType\":\"String\", \"familyMemberList\":\"List\", "
Expand Down Expand Up @@ -440,6 +453,7 @@ public String updateCSHistoryNurse(
*/
@Operation(summary = "Update beneficiary vital detail")
@PostMapping(value = { "/update/vitalScreen" })
@PreAuthorize("hasRole('NURSE') || hasRole('DOCTOR')")
public String upodateBenVitalDetail(
@ApiParam(value = "{\"ID\": \"Long\", \"beneficiaryRegID\":\"Long\",\"benVisitID\":\"Long\","
+ "\"weight_Kg\":\"Double\", \"height_cm\":\"Double\", \"waistCircumference_cm\":\"Double\", \"bloodGlucose_Fasting\":\"Short\","
Expand Down Expand Up @@ -476,6 +490,7 @@ public String upodateBenVitalDetail(
*/
@Operation(summary = "Update beneficiary examination detail")
@PostMapping(value = { "/update/examinationScreen" })
@PreAuthorize("hasRole('NURSE') || hasRole('DOCTOR')")
public String upodateBenExaminationDetail(@RequestBody String requestObj) {

OutputResponse response = new OutputResponse();
Expand Down Expand Up @@ -505,6 +520,7 @@ public String upodateBenExaminationDetail(@RequestBody String requestObj) {
*/
@Operation(summary = "Update cancer diagnosis details by oncologist")
@PostMapping(value = { "/update/examinationScreen/diagnosis" })
@PreAuthorize("hasRole('NURSE') || hasRole('DOCTOR') || hasRole('ONCOLOGIST')")
public String updateCancerDiagnosisDetailsByOncologist(
@ApiParam(value = "{\"beneficiaryRegID\":\"Long\", \"benVisitID\":\"Long\", \"visitCode\":\"Long\", "
+ "\"provisionalDiagnosisOncologist\":\"String\", \"modifiedBy\":\"string\"}") @RequestBody String requestObj) {
Expand Down Expand Up @@ -536,6 +552,7 @@ public String updateCancerDiagnosisDetailsByOncologist(
*/
@Operation(summary = "Update cancer screening doctor data")
@PostMapping(value = { "/update/doctorData" })
@PreAuthorize("hasRole('NURSE') || hasRole('DOCTOR')")
public String updateCancerScreeningDoctorData(@RequestBody String requestObj) {

OutputResponse response = new OutputResponse();
Expand Down
Loading
Loading