Summary Table
Categories |
Total Count |
PII |
0 |
URL |
0 |
DNS |
0 |
EKL |
0 |
IP |
0 |
PORT |
0 |
VsID |
0 |
CF |
0 |
AI |
0 |
VPD |
0 |
PL |
0 |
Other |
0 |
File Content
package gov.va.med.ars.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import gov.va.med.ars.model.response.CSTATResponse;
import gov.va.med.ars.service.ICstatGeneratorService;
import net.minidev.json.JSONObject;
@RestController
@RequestMapping("/api/ca/277CA/cstat")
public class CstatGenerationController {
@Autowired
ICstatGeneratorService cstatService;
@GetMapping("/claimDetail")
public ResponseEntity<?> getAllClaimDetails() throws Exception {
try {
CSTATResponse cstatResponse = cstatService.buildCSTAT(2047L);
JSONObject claimDetail = new JSONObject();
claimDetail.put("CSTAT Generated", cstatResponse.getIsGenerated());
if (!cstatResponse.getIsGenerated()) {
return new ResponseEntity<>("No CSTAT generated", HttpStatus.NOT_FOUND);
} else
return new ResponseEntity<>(claimDetail, HttpStatus.OK);
} catch (Exception e) {
throw e;
}
}
}