Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import org.springframework.data.repository.query.Param;
import org.springframework.transaction.annotation.Transactional;

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
Expand Down Expand Up @@ -80,7 +81,7 @@ public void setGeneralOPDServiceImpl(GeneralOPDServiceImpl generalOPDServiceImpl
*/
@Operation(summary = "Save general OPD data collected by nurse")
@PostMapping(value = { "/save/nurseData" })
public String saveBenGenOPDNurseData(@RequestBody String requestObj,
public ResponseEntity<String> saveBenGenOPDNurseData(@RequestBody String requestObj,
@RequestHeader(value = "Authorization") String Authorization) throws Exception {
OutputResponse response = new OutputResponse();

Expand All @@ -91,7 +92,7 @@ public String saveBenGenOPDNurseData(@RequestBody String requestObj,
jsnOBJ = jsnElmnt.getAsJsonObject();

try {
logger.info("Request object for GeneralOPD nurse data saving :" + requestObj);
logger.info("Request received for GeneralOPD nurse data saving");

if (jsnOBJ != null) {
String genOPDRes = generalOPDServiceImpl.saveNurseData(jsnOBJ, Authorization);
Expand All @@ -105,7 +106,7 @@ public String saveBenGenOPDNurseData(@RequestBody String requestObj,
response.setError(5000, e.getMessage());
}
}
return response.toString();
return response.toStringWithHttpStatus();
}

/**
Expand Down