Skip to content

Commit

Permalink
AMM-1005 | API for downloading the master data for lab module (#109)
Browse files Browse the repository at this point in the history
* adding changes for downloading the master data for lab module

* adding changes suggested by code rabbit

---------

Co-authored-by: SR20290919 <SR20290919@APL-PG02PW8B>
  • Loading branch information
srishtigrp78 and SR20290919 authored Dec 11, 2024
1 parent d684cb0 commit c0f27fe
Show file tree
Hide file tree
Showing 5 changed files with 544 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -160,5 +160,35 @@ public String getLabResultForVisitCode(@RequestBody String requestOBJ) {
}
return response.toString();
}

@CrossOrigin
@Operation(summary = "Get procedure component mapped master data")
@PostMapping(value = { "/get/fetchProcCompMapMasterData" })
public String getProcedureComponentMappedMasterData(@RequestBody String requestOBJ) {
OutputResponse response = new OutputResponse();
try {
logger.info("Request obj to fetch procedure component mapped master data ");
JsonObject jsnOBJ = new JsonObject();
JsonElement jsnElement = JsonParser.parseString(requestOBJ);
jsnOBJ = jsnElement.getAsJsonObject();

if (jsnOBJ != null && !jsnOBJ.isJsonNull() && jsnOBJ.has("providerServiceMapID")) {

String s = labTechnicianServiceImpl.getProcedureComponentMappedMasterData(
jsnOBJ.get("providerServiceMapID").getAsLong());
if (s != null)
response.setResponse(s);
else
response.setError(5000, "Error in fetching procedure component mapped master data");
} else {
response.setError(5000, "Invalid request");
}
} catch (Exception e) {
logger.error("Error while fetching procedure component mapped master data:" + e);
response.setError(5000, "Error while fetching procedure component mapped master data");
}
return response.toString();
}


}
Loading

0 comments on commit c0f27fe

Please sign in to comment.