|
@ -1,9 +1,11 @@
|
|
package com.yihu.jw.hospital.endpoint.healthCare;
|
|
package com.yihu.jw.hospital.endpoint.healthCare;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.yihu.jw.healthCare.service.HealthCareService;
|
|
import com.yihu.jw.healthCare.service.HealthCareService;
|
|
import com.yihu.jw.restmodel.web.ObjEnvelop;
|
|
import com.yihu.jw.restmodel.web.ObjEnvelop;
|
|
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
|
|
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
|
|
import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping;
|
|
import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping;
|
|
|
|
import com.yihu.jw.util.http.HttpClientUtil;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiParam;
|
|
import io.swagger.annotations.ApiParam;
|
|
@ -26,96 +28,243 @@ public class HealthCareEndPoint extends EnvelopRestEndpoint {
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private HealthCareService healthCareService;
|
|
private HealthCareService healthCareService;
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
private HttpClientUtil httpClientUtil;
|
|
|
|
public static String entranceHealthCareUrl = "http://172.16.100.240:10023/healthCare/";
|
|
|
|
|
|
@GetMapping(value = "doctorAuthentication")
|
|
@GetMapping(value = "doctorAuthentication")
|
|
@ApiOperation(value = "医师身份验证", notes = "医师身份验证")
|
|
@ApiOperation(value = "医师身份验证", notes = "医师身份验证")
|
|
public ObjEnvelop doctorAuthentication(@ApiParam(name = "doctorId", value = "医生id", required = true)
|
|
public ObjEnvelop doctorAuthentication(@ApiParam(name = "doctorId", value = "医生id", required = true)
|
|
@RequestParam(value = "doctorId",required = true) String doctorId)throws Exception{
|
|
|
|
return ObjEnvelop.getSuccess("ok",healthCareService.doctorAuthentication(doctorId));
|
|
|
|
|
|
@RequestParam(value = "doctorId",required = true) String doctorId){
|
|
|
|
try {
|
|
|
|
String url = entranceHealthCareUrl + "doctorAuthentication?doctorId="+doctorId;
|
|
|
|
String infoResponse = httpClientUtil.get(url,"GBK");
|
|
|
|
JSONObject jsonObject = JSONObject.parseObject(infoResponse);
|
|
|
|
if(jsonObject.getInteger("status")==200){
|
|
|
|
return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
|
|
|
|
}else {
|
|
|
|
return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
|
|
|
|
}
|
|
|
|
|
|
|
|
}catch (Exception e){
|
|
|
|
e.printStackTrace();
|
|
|
|
return failedObjEnvelopException(e);
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@GetMapping(value = "doctorFaceCheckInAddress")
|
|
@GetMapping(value = "doctorFaceCheckInAddress")
|
|
@ApiOperation(value = "医师人脸签到表单地址", notes = "医师人脸签到表单地址")
|
|
@ApiOperation(value = "医师人脸签到表单地址", notes = "医师人脸签到表单地址")
|
|
public ObjEnvelop doctorFaceCheckInAddress(@ApiParam(name = "doctorId", value = "医生id", required = true)
|
|
public ObjEnvelop doctorFaceCheckInAddress(@ApiParam(name = "doctorId", value = "医生id", required = true)
|
|
@RequestParam(value = "doctorId",required = true) String doctorId)throws Exception{
|
|
|
|
return ObjEnvelop.getSuccess("ok",healthCareService.doctorFaceCheckInAddress(doctorId));
|
|
|
|
|
|
@RequestParam(value = "doctorId",required = true) String doctorId){
|
|
|
|
try {
|
|
|
|
String url = entranceHealthCareUrl + "doctorFaceCheckInAddress?doctorId="+doctorId;
|
|
|
|
String infoResponse = httpClientUtil.get(url,"GBK");
|
|
|
|
JSONObject jsonObject = JSONObject.parseObject(infoResponse);
|
|
|
|
if(jsonObject.getInteger("status")==200){
|
|
|
|
return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
|
|
|
|
}else {
|
|
|
|
return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
|
|
|
|
}
|
|
|
|
}catch (Exception e){
|
|
|
|
e.printStackTrace();
|
|
|
|
return failedObjEnvelopException(e);
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@GetMapping(value = "doctorFaceCheckInData")
|
|
@GetMapping(value = "doctorFaceCheckInData")
|
|
@ApiOperation(value = "获取医师人脸签到数据", notes = "获取医师人脸签到数据")
|
|
@ApiOperation(value = "获取医师人脸签到数据", notes = "获取医师人脸签到数据")
|
|
public ObjEnvelop doctorFaceCheckInData(@ApiParam(name = "doctorId", value = "医生id", required = true)
|
|
public ObjEnvelop doctorFaceCheckInData(@ApiParam(name = "doctorId", value = "医生id", required = true)
|
|
@RequestParam(value = "doctorId",required = true) String doctorId)throws Exception{
|
|
|
|
return ObjEnvelop.getSuccess("ok",healthCareService.doctorFaceCheckInData(doctorId));
|
|
|
|
|
|
@RequestParam(value = "doctorId",required = true) String doctorId){
|
|
|
|
try {
|
|
|
|
String url = entranceHealthCareUrl + "doctorFaceCheckInData?doctorId="+doctorId;
|
|
|
|
String infoResponse = httpClientUtil.get(url,"GBK");
|
|
|
|
JSONObject jsonObject = JSONObject.parseObject(infoResponse);
|
|
|
|
if(jsonObject.getInteger("status")==200){
|
|
|
|
return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
|
|
|
|
}else {
|
|
|
|
return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
|
|
|
|
}
|
|
|
|
}catch (Exception e){
|
|
|
|
e.printStackTrace();
|
|
|
|
return failedObjEnvelopException(e);
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@PostMapping(value = "advanceWarning")
|
|
|
|
|
|
@GetMapping(value = "advanceWarning")
|
|
@ApiOperation(value = "事前提醒", notes = "事前提醒")
|
|
@ApiOperation(value = "事前提醒", notes = "事前提醒")
|
|
public ObjEnvelop advanceWarning(@ApiParam(name = "outpatientId", value = "门诊id", required = true)
|
|
public ObjEnvelop advanceWarning(@ApiParam(name = "outpatientId", value = "门诊id", required = true)
|
|
@RequestParam(value = "outpatientId",required = true) String outpatientId)throws Exception{
|
|
|
|
return ObjEnvelop.getSuccess("ok",healthCareService.advanceWarning(outpatientId));
|
|
|
|
|
|
@RequestParam(value = "outpatientId",required = true) String outpatientId){
|
|
|
|
try {
|
|
|
|
String url = entranceHealthCareUrl + "advanceWarning?outpatientId="+outpatientId;
|
|
|
|
String infoResponse = httpClientUtil.get(url,"GBK");
|
|
|
|
JSONObject jsonObject = JSONObject.parseObject(infoResponse);
|
|
|
|
if(jsonObject.getInteger("status")==200){
|
|
|
|
return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
|
|
|
|
}else {
|
|
|
|
return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
|
|
|
|
}
|
|
|
|
}catch (Exception e){
|
|
|
|
e.printStackTrace();
|
|
|
|
return failedObjEnvelopException(e);
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@PostMapping(value = "doctorPrescriptionUpload")
|
|
|
|
|
|
@GetMapping(value = "doctorPrescriptionUpload")
|
|
@ApiOperation(value = "医师开方上传", notes = "医师开方上传")
|
|
@ApiOperation(value = "医师开方上传", notes = "医师开方上传")
|
|
public ObjEnvelop doctorPrescriptionUpload(@ApiParam(name = "prescriptionId", value = "处方id", required = true)
|
|
public ObjEnvelop doctorPrescriptionUpload(@ApiParam(name = "prescriptionId", value = "处方id", required = true)
|
|
@RequestParam(value = "prescriptionId",required = true) String prescriptionId)throws Exception{
|
|
|
|
return ObjEnvelop.getSuccess("ok",healthCareService.doctorPrescriptionUpload(prescriptionId));
|
|
|
|
|
|
@RequestParam(value = "prescriptionId",required = true) String prescriptionId){
|
|
|
|
try {
|
|
|
|
String url = entranceHealthCareUrl + "doctorPrescriptionUpload?outpatientId="+prescriptionId;
|
|
|
|
String infoResponse = httpClientUtil.get(url,"GBK");
|
|
|
|
JSONObject jsonObject = JSONObject.parseObject(infoResponse);
|
|
|
|
if(jsonObject.getInteger("status")==200){
|
|
|
|
return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
|
|
|
|
}else {
|
|
|
|
return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
|
|
|
|
}
|
|
|
|
}catch (Exception e){
|
|
|
|
e.printStackTrace();
|
|
|
|
return failedObjEnvelopException(e);
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@PostMapping(value = "doctorPrescriptionUploadCancle")
|
|
|
|
|
|
@GetMapping(value = "doctorPrescriptionUploadCancle")
|
|
@ApiOperation(value = "医师开方上传取消", notes = "医师开方上传取消")
|
|
@ApiOperation(value = "医师开方上传取消", notes = "医师开方上传取消")
|
|
public ObjEnvelop doctorPrescriptionUploadCancle(@ApiParam(name = "prescriptionId", value = "处方id", required = true)
|
|
public ObjEnvelop doctorPrescriptionUploadCancle(@ApiParam(name = "prescriptionId", value = "处方id", required = true)
|
|
@RequestParam(value = "prescriptionId",required = true) String prescriptionId,
|
|
@RequestParam(value = "prescriptionId",required = true) String prescriptionId,
|
|
@ApiParam(name = "cancelReason",value="取消原因",required = true)
|
|
@ApiParam(name = "cancelReason",value="取消原因",required = true)
|
|
@RequestParam(value = "cancelReason",required = true) String cancelReason)throws Exception{
|
|
|
|
return ObjEnvelop.getSuccess("ok",healthCareService.doctorPrescriptionUploadCancle(prescriptionId,cancelReason));
|
|
|
|
|
|
@RequestParam(value = "cancelReason",required = true) String cancelReason){
|
|
|
|
try {
|
|
|
|
String url = entranceHealthCareUrl + "doctorPrescriptionUploadCancle?prescriptionId="+prescriptionId+"&cancelReason="+cancelReason;
|
|
|
|
String infoResponse = httpClientUtil.get(url,"GBK");
|
|
|
|
JSONObject jsonObject = JSONObject.parseObject(infoResponse);
|
|
|
|
if(jsonObject.getInteger("status")==200){
|
|
|
|
return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
|
|
|
|
}else {
|
|
|
|
return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
|
|
|
|
}
|
|
|
|
}catch (Exception e){
|
|
|
|
e.printStackTrace();
|
|
|
|
return failedObjEnvelopException(e);
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@GetMapping(value = "electronicPrescriptionReceiving")
|
|
@GetMapping(value = "electronicPrescriptionReceiving")
|
|
@ApiOperation(value = "电子处方订单接收", notes = "电子处方订单接收")
|
|
@ApiOperation(value = "电子处方订单接收", notes = "电子处方订单接收")
|
|
public ObjEnvelop electronicPrescriptionReceiving(@ApiParam(name = "outpatientId", value = "门诊id", required = true)
|
|
public ObjEnvelop electronicPrescriptionReceiving(@ApiParam(name = "outpatientId", value = "门诊id", required = true)
|
|
@RequestParam(value = "outpatientId",required = true) String outpatientId)throws Exception{
|
|
@RequestParam(value = "outpatientId",required = true) String outpatientId)throws Exception{
|
|
return ObjEnvelop.getSuccess("ok",healthCareService.electronicPrescriptionReceiving(outpatientId));
|
|
|
|
|
|
try {
|
|
|
|
String url = entranceHealthCareUrl + "electronicPrescriptionReceiving?outpatientId="+outpatientId;
|
|
|
|
String infoResponse = httpClientUtil.get(url,"GBK");
|
|
|
|
JSONObject jsonObject = JSONObject.parseObject(infoResponse);
|
|
|
|
if(jsonObject.getInteger("status")==200){
|
|
|
|
return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
|
|
|
|
}else {
|
|
|
|
return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
|
|
|
|
}
|
|
|
|
}catch (Exception e){
|
|
|
|
e.printStackTrace();
|
|
|
|
return failedObjEnvelopException(e);
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@PostMapping(value = "electronicPrescriptionCancle")
|
|
|
|
|
|
@GetMapping(value = "electronicPrescriptionCancle")
|
|
@ApiOperation(value = "电子处方订单取消", notes = "电子处方订单取消")
|
|
@ApiOperation(value = "电子处方订单取消", notes = "电子处方订单取消")
|
|
public ObjEnvelop electronicPrescriptionCancle(@ApiParam(name = "outpatientId", value = "门诊id", required = true)
|
|
public ObjEnvelop electronicPrescriptionCancle(@ApiParam(name = "outpatientId", value = "门诊id", required = true)
|
|
@RequestParam(value = "outpatientId",required = true) String outpatientId)throws Exception{
|
|
@RequestParam(value = "outpatientId",required = true) String outpatientId)throws Exception{
|
|
return ObjEnvelop.getSuccess("ok",healthCareService.electronicPrescriptionCancle(outpatientId));
|
|
|
|
|
|
try {
|
|
|
|
String url = entranceHealthCareUrl + "electronicPrescriptionCancle?outpatientId="+outpatientId;
|
|
|
|
String infoResponse = httpClientUtil.get(url,"GBK");
|
|
|
|
JSONObject jsonObject = JSONObject.parseObject(infoResponse);
|
|
|
|
if(jsonObject.getInteger("status")==200){
|
|
|
|
return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
|
|
|
|
}else {
|
|
|
|
return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
|
|
|
|
}
|
|
|
|
}catch (Exception e){
|
|
|
|
e.printStackTrace();
|
|
|
|
return failedObjEnvelopException(e);
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@GetMapping(value = "pharmacistReviewResults")
|
|
@GetMapping(value = "pharmacistReviewResults")
|
|
@ApiOperation(value = "获取处方流转平台药师审方结果", notes = "获取处方流转平台药师审方结果")
|
|
@ApiOperation(value = "获取处方流转平台药师审方结果", notes = "获取处方流转平台药师审方结果")
|
|
public ObjEnvelop pharmacistReviewResults(@ApiParam(name = "outpatientId", value = "门诊id", required = true)
|
|
public ObjEnvelop pharmacistReviewResults(@ApiParam(name = "outpatientId", value = "门诊id", required = true)
|
|
@RequestParam(value = "outpatientId",required = true) String outpatientId)throws Exception{
|
|
@RequestParam(value = "outpatientId",required = true) String outpatientId)throws Exception{
|
|
return ObjEnvelop.getSuccess("ok",healthCareService.pharmacistReviewResults(outpatientId));
|
|
|
|
|
|
try {
|
|
|
|
String url = entranceHealthCareUrl + "pharmacistReviewResults?outpatientId="+outpatientId;
|
|
|
|
String infoResponse = httpClientUtil.get(url,"GBK");
|
|
|
|
JSONObject jsonObject = JSONObject.parseObject(infoResponse);
|
|
|
|
if(jsonObject.getInteger("status")==200){
|
|
|
|
return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
|
|
|
|
}else {
|
|
|
|
return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
|
|
|
|
}
|
|
|
|
}catch (Exception e){
|
|
|
|
e.printStackTrace();
|
|
|
|
return failedObjEnvelopException(e);
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@PostMapping(value = "outpatientReminder")
|
|
|
|
|
|
@GetMapping(value = "outpatientReminder")
|
|
@ApiOperation(value = "门诊提醒", notes = "门诊提醒")
|
|
@ApiOperation(value = "门诊提醒", notes = "门诊提醒")
|
|
public ObjEnvelop outpatientReminder(@ApiParam(name = "outpatientId", value = "处方id", required = true)
|
|
public ObjEnvelop outpatientReminder(@ApiParam(name = "outpatientId", value = "处方id", required = true)
|
|
@RequestParam(value = "outpatientId",required = true) String outpatientId,
|
|
@RequestParam(value = "outpatientId",required = true) String outpatientId,
|
|
@ApiParam(name = "doctorCode",value="医保医生code",required = true)
|
|
@ApiParam(name = "doctorCode",value="医保医生code",required = true)
|
|
@RequestParam(value = "doctorCode",required = true) String doctorCode)throws Exception{
|
|
@RequestParam(value = "doctorCode",required = true) String doctorCode)throws Exception{
|
|
return ObjEnvelop.getSuccess("ok",healthCareService.outpatientReminder(outpatientId,doctorCode));
|
|
|
|
|
|
try {
|
|
|
|
String url = entranceHealthCareUrl + "outpatientReminder?outpatientId="+outpatientId+"&doctorCode="+doctorCode;
|
|
|
|
String infoResponse = httpClientUtil.get(url,"GBK");
|
|
|
|
JSONObject jsonObject = JSONObject.parseObject(infoResponse);
|
|
|
|
if(jsonObject.getInteger("status")==200){
|
|
|
|
return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
|
|
|
|
}else {
|
|
|
|
return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
|
|
|
|
}
|
|
|
|
}catch (Exception e){
|
|
|
|
e.printStackTrace();
|
|
|
|
return failedObjEnvelopException(e);
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@PostMapping(value = "outpatientEventReminder")
|
|
|
|
|
|
@GetMapping(value = "outpatientEventReminder")
|
|
@ApiOperation(value = "门诊事中提醒", notes = "门诊事中提醒")
|
|
@ApiOperation(value = "门诊事中提醒", notes = "门诊事中提醒")
|
|
public ObjEnvelop outpatientEventReminder(@ApiParam(name = "outpatientId", value = "处方id", required = true)
|
|
public ObjEnvelop outpatientEventReminder(@ApiParam(name = "outpatientId", value = "处方id", required = true)
|
|
@RequestParam(value = "outpatientId",required = true) String outpatientId,
|
|
@RequestParam(value = "outpatientId",required = true) String outpatientId,
|
|
@ApiParam(name = "doctorCode",value="医保医生code",required = true)
|
|
@ApiParam(name = "doctorCode",value="医保医生code",required = true)
|
|
@RequestParam(value = "doctorCode",required = true) String doctorCode)throws Exception{
|
|
@RequestParam(value = "doctorCode",required = true) String doctorCode)throws Exception{
|
|
return ObjEnvelop.getSuccess("ok",healthCareService.outpatientEventReminder(outpatientId,doctorCode));
|
|
|
|
|
|
try {
|
|
|
|
String url = entranceHealthCareUrl + "outpatientEventReminder?outpatientId="+outpatientId+"&doctorCode="+doctorCode;
|
|
|
|
String infoResponse = httpClientUtil.get(url,"GBK");
|
|
|
|
JSONObject jsonObject = JSONObject.parseObject(infoResponse);
|
|
|
|
if(jsonObject.getInteger("status")==200){
|
|
|
|
return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
|
|
|
|
}else {
|
|
|
|
return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
|
|
|
|
}
|
|
|
|
}catch (Exception e){
|
|
|
|
e.printStackTrace();
|
|
|
|
return failedObjEnvelopException(e);
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@GetMapping(value = "/getYlzToken")
|
|
@GetMapping(value = "/getYlzToken")
|
|
@ApiOperation(value = "获取医保accessToken", notes = "获取医保accessToken")
|
|
@ApiOperation(value = "获取医保accessToken", notes = "获取医保accessToken")
|
|
public ObjEnvelop getChargeDict()throws Exception{
|
|
public ObjEnvelop getChargeDict()throws Exception{
|
|
return ObjEnvelop.getSuccess("ok",healthCareService.getYlzToken());
|
|
|
|
|
|
try {
|
|
|
|
String url = entranceHealthCareUrl + "getYlzToken";
|
|
|
|
String infoResponse = httpClientUtil.get(url,"GBK");
|
|
|
|
JSONObject jsonObject = JSONObject.parseObject(infoResponse);
|
|
|
|
if(jsonObject.getInteger("status")==200){
|
|
|
|
return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
|
|
|
|
}else {
|
|
|
|
return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
|
|
|
|
}
|
|
|
|
}catch (Exception e){
|
|
|
|
e.printStackTrace();
|
|
|
|
return failedObjEnvelopException(e);
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -123,35 +272,95 @@ public class HealthCareEndPoint extends EnvelopRestEndpoint {
|
|
@ApiOperation(value = "渠道应用是否已授权", notes = "渠道应用是否已授权")
|
|
@ApiOperation(value = "渠道应用是否已授权", notes = "渠道应用是否已授权")
|
|
public ObjEnvelop authorized(@ApiParam(name = "patient", value = "患者id", required = true)
|
|
public ObjEnvelop authorized(@ApiParam(name = "patient", value = "患者id", required = true)
|
|
@RequestParam(value = "patient", required = true)String patient)throws Exception{
|
|
@RequestParam(value = "patient", required = true)String patient)throws Exception{
|
|
return ObjEnvelop.getSuccess("ok",healthCareService.authorized(patient));
|
|
|
|
|
|
try {
|
|
|
|
String url = entranceHealthCareUrl + "authorized?patient="+patient;
|
|
|
|
String infoResponse = httpClientUtil.get(url,"GBK");
|
|
|
|
JSONObject jsonObject = JSONObject.parseObject(infoResponse);
|
|
|
|
if(jsonObject.getInteger("status")==200){
|
|
|
|
return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
|
|
|
|
}else {
|
|
|
|
return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
|
|
|
|
}
|
|
|
|
}catch (Exception e){
|
|
|
|
e.printStackTrace();
|
|
|
|
return failedObjEnvelopException(e);
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@PostMapping(value = "/medicareOnline")
|
|
@PostMapping(value = "/medicareOnline")
|
|
@ApiOperation(value = "医保在线服务授权表单(H5表单/小程序)(N20.17.01.02)", notes = "医保在线服务授权表单(H5表单/小程序)(N20.17.01.02)")
|
|
@ApiOperation(value = "医保在线服务授权表单(H5表单/小程序)(N20.17.01.02)", notes = "医保在线服务授权表单(H5表单/小程序)(N20.17.01.02)")
|
|
public ObjEnvelop medicareOnline(@ApiParam(name = "patient", value = "患者id", required = true)
|
|
public ObjEnvelop medicareOnline(@ApiParam(name = "patient", value = "患者id", required = true)
|
|
@RequestParam(value = "patient", required = true)String patient)throws Exception{
|
|
@RequestParam(value = "patient", required = true)String patient)throws Exception{
|
|
return ObjEnvelop.getSuccess("ok",healthCareService.medicareOnline(patient));
|
|
|
|
|
|
try {
|
|
|
|
String url = entranceHealthCareUrl + "medicareOnline?patient="+patient;
|
|
|
|
String infoResponse = httpClientUtil.get(url,"GBK");
|
|
|
|
JSONObject jsonObject = JSONObject.parseObject(infoResponse);
|
|
|
|
if(jsonObject.getInteger("status")==200){
|
|
|
|
return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
|
|
|
|
}else {
|
|
|
|
return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
|
|
|
|
}
|
|
|
|
}catch (Exception e){
|
|
|
|
e.printStackTrace();
|
|
|
|
return failedObjEnvelopException(e);
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@PostMapping(value = "/register")
|
|
@PostMapping(value = "/register")
|
|
@ApiOperation(value = "2.5.1医保挂号(N20.17.04.01)", notes = "2.5.1医保挂号(N20.17.04.01)")
|
|
@ApiOperation(value = "2.5.1医保挂号(N20.17.04.01)", notes = "2.5.1医保挂号(N20.17.04.01)")
|
|
public ObjEnvelop register(@ApiParam(name = "outpatientId", value = "门诊id", required = true)
|
|
public ObjEnvelop register(@ApiParam(name = "outpatientId", value = "门诊id", required = true)
|
|
@RequestParam(value = "outpatientId", required = true)String outpatientId)throws Exception{
|
|
@RequestParam(value = "outpatientId", required = true)String outpatientId)throws Exception{
|
|
return ObjEnvelop.getSuccess("ok",healthCareService.register(outpatientId));
|
|
|
|
|
|
try {
|
|
|
|
String url = entranceHealthCareUrl + "register?outpatientId="+outpatientId;
|
|
|
|
String infoResponse = httpClientUtil.get(url,"GBK");
|
|
|
|
JSONObject jsonObject = JSONObject.parseObject(infoResponse);
|
|
|
|
if(jsonObject.getInteger("status")==200){
|
|
|
|
return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
|
|
|
|
}else {
|
|
|
|
return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
|
|
|
|
}
|
|
|
|
}catch (Exception e){
|
|
|
|
e.printStackTrace();
|
|
|
|
return failedObjEnvelopException(e);
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@PostMapping(value = "/registerBack")
|
|
@PostMapping(value = "/registerBack")
|
|
@ApiOperation(value = " 2.5.2医保挂号冲销(N20.17.04.02)", notes = " 2.5.2医保挂号冲销(N20.17.04.02)")
|
|
@ApiOperation(value = " 2.5.2医保挂号冲销(N20.17.04.02)", notes = " 2.5.2医保挂号冲销(N20.17.04.02)")
|
|
public ObjEnvelop registerBack(@ApiParam(name = "outpatientId", value = "门诊id", required = true)
|
|
public ObjEnvelop registerBack(@ApiParam(name = "outpatientId", value = "门诊id", required = true)
|
|
@RequestParam(value = "outpatientId", required = true)String outpatientId)throws Exception{
|
|
@RequestParam(value = "outpatientId", required = true)String outpatientId)throws Exception{
|
|
return ObjEnvelop.getSuccess("ok",healthCareService.registerBack(outpatientId));
|
|
|
|
|
|
try {
|
|
|
|
String url = entranceHealthCareUrl + "registerBack?outpatientId="+outpatientId;
|
|
|
|
String infoResponse = httpClientUtil.get(url,"GBK");
|
|
|
|
JSONObject jsonObject = JSONObject.parseObject(infoResponse);
|
|
|
|
if(jsonObject.getInteger("status")==200){
|
|
|
|
return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
|
|
|
|
}else {
|
|
|
|
return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
|
|
|
|
}
|
|
|
|
}catch (Exception e){
|
|
|
|
e.printStackTrace();
|
|
|
|
return failedObjEnvelopException(e);
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@PostMapping(value = "/feeDetailUpload")
|
|
@PostMapping(value = "/feeDetailUpload")
|
|
@ApiOperation(value = " 2.5.3医保费用明细上传(N20.17.04.03)", notes = " 2.5.3医保费用明细上传(N20.17.04.03)")
|
|
@ApiOperation(value = " 2.5.3医保费用明细上传(N20.17.04.03)", notes = " 2.5.3医保费用明细上传(N20.17.04.03)")
|
|
public ObjEnvelop feeDetailUpload(@ApiParam(name = "outpatientId", value = "门诊id", required = true)
|
|
public ObjEnvelop feeDetailUpload(@ApiParam(name = "outpatientId", value = "门诊id", required = true)
|
|
@RequestParam(value = "outpatientId", required = true)String outpatientId)throws Exception{
|
|
@RequestParam(value = "outpatientId", required = true)String outpatientId)throws Exception{
|
|
return ObjEnvelop.getSuccess("ok",healthCareService.feeDetailUpload(outpatientId));
|
|
|
|
|
|
try {
|
|
|
|
String url = entranceHealthCareUrl + "feeDetailUpload?outpatientId="+outpatientId;
|
|
|
|
String infoResponse = httpClientUtil.get(url,"GBK");
|
|
|
|
JSONObject jsonObject = JSONObject.parseObject(infoResponse);
|
|
|
|
if(jsonObject.getInteger("status")==200){
|
|
|
|
return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
|
|
|
|
}else {
|
|
|
|
return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
|
|
|
|
}
|
|
|
|
}catch (Exception e){
|
|
|
|
e.printStackTrace();
|
|
|
|
return failedObjEnvelopException(e);
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@PostMapping(value = "/feeDetailRefund")
|
|
@PostMapping(value = "/feeDetailRefund")
|
|
@ -160,42 +369,114 @@ public class HealthCareEndPoint extends EnvelopRestEndpoint {
|
|
@RequestParam(value = "outpatientId", required = false)String outpatientId,
|
|
@RequestParam(value = "outpatientId", required = false)String outpatientId,
|
|
@ApiParam(name = "remark", value = "作废原因", required = false)
|
|
@ApiParam(name = "remark", value = "作废原因", required = false)
|
|
@RequestParam(value = "remark", required = true)String remark)throws Exception{
|
|
@RequestParam(value = "remark", required = true)String remark)throws Exception{
|
|
return ObjEnvelop.getSuccess("ok",healthCareService.feeDetailRefund(outpatientId,remark));
|
|
|
|
|
|
try {
|
|
|
|
String url = entranceHealthCareUrl + "feeDetailRefund?outpatientId="+outpatientId+"&remark="+remark;
|
|
|
|
String infoResponse = httpClientUtil.get(url,"GBK");
|
|
|
|
JSONObject jsonObject = JSONObject.parseObject(infoResponse);
|
|
|
|
if(jsonObject.getInteger("status")==200){
|
|
|
|
return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
|
|
|
|
}else {
|
|
|
|
return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
|
|
|
|
}
|
|
|
|
}catch (Exception e){
|
|
|
|
e.printStackTrace();
|
|
|
|
return failedObjEnvelopException(e);
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@PostMapping(value = "/preSettlement")
|
|
@PostMapping(value = "/preSettlement")
|
|
@ApiOperation(value = " 2.5.5医保预结算服务(N20.17.04.05)", notes = " 2.5.5医保预结算服务(N20.17.04.05)")
|
|
@ApiOperation(value = " 2.5.5医保预结算服务(N20.17.04.05)", notes = " 2.5.5医保预结算服务(N20.17.04.05)")
|
|
public ObjEnvelop preSettlement(@ApiParam(name = "outpatientId", value = "门诊id", required = true)
|
|
public ObjEnvelop preSettlement(@ApiParam(name = "outpatientId", value = "门诊id", required = true)
|
|
@RequestParam(value = "outpatientId", required = false)String outpatientId)throws Exception{
|
|
@RequestParam(value = "outpatientId", required = false)String outpatientId)throws Exception{
|
|
return ObjEnvelop.getSuccess("ok",healthCareService.preSettlement(outpatientId));
|
|
|
|
|
|
try {
|
|
|
|
String url = entranceHealthCareUrl + "preSettlement?outpatientId="+outpatientId;
|
|
|
|
String infoResponse = httpClientUtil.get(url,"GBK");
|
|
|
|
JSONObject jsonObject = JSONObject.parseObject(infoResponse);
|
|
|
|
if(jsonObject.getInteger("status")==200){
|
|
|
|
return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
|
|
|
|
}else {
|
|
|
|
return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
|
|
|
|
}
|
|
|
|
}catch (Exception e){
|
|
|
|
e.printStackTrace();
|
|
|
|
return failedObjEnvelopException(e);
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@PostMapping(value = "/preSettlementRefund")
|
|
@PostMapping(value = "/preSettlementRefund")
|
|
@ApiOperation(value = " 2.5.6医保结算冲销服务(N20.17.04.06)", notes = " 2.5.6医保结算冲销服务(N20.17.04.06)")
|
|
@ApiOperation(value = " 2.5.6医保结算冲销服务(N20.17.04.06)", notes = " 2.5.6医保结算冲销服务(N20.17.04.06)")
|
|
public ObjEnvelop preSettlementRefund(@ApiParam(name = "outpatientId", value = "门诊id", required = true)
|
|
public ObjEnvelop preSettlementRefund(@ApiParam(name = "outpatientId", value = "门诊id", required = true)
|
|
@RequestParam(value = "outpatientId", required = false)String outpatientId)throws Exception{
|
|
@RequestParam(value = "outpatientId", required = false)String outpatientId)throws Exception{
|
|
return ObjEnvelop.getSuccess("ok",healthCareService.preSettlementRefund(outpatientId));
|
|
|
|
|
|
try {
|
|
|
|
String url = entranceHealthCareUrl + "preSettlementRefund?outpatientId="+outpatientId;
|
|
|
|
String infoResponse = httpClientUtil.get(url,"GBK");
|
|
|
|
JSONObject jsonObject = JSONObject.parseObject(infoResponse);
|
|
|
|
if(jsonObject.getInteger("status")==200){
|
|
|
|
return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
|
|
|
|
}else {
|
|
|
|
return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
|
|
|
|
}
|
|
|
|
}catch (Exception e){
|
|
|
|
e.printStackTrace();
|
|
|
|
return failedObjEnvelopException(e);
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@PostMapping(value = "/getSettlementResultUrl")
|
|
@PostMapping(value = "/getSettlementResultUrl")
|
|
@ApiOperation(value = " 2.5.7获取医保结算页面地址(N20.17.04.07)", notes = " 2.5.7获取医保结算页面地址(N20.17.04.07)")
|
|
@ApiOperation(value = " 2.5.7获取医保结算页面地址(N20.17.04.07)", notes = " 2.5.7获取医保结算页面地址(N20.17.04.07)")
|
|
public ObjEnvelop getSettlementResultUrl(@ApiParam(name = "outpatientId", value = "门诊id", required = true)
|
|
public ObjEnvelop getSettlementResultUrl(@ApiParam(name = "outpatientId", value = "门诊id", required = true)
|
|
@RequestParam(value = "outpatientId", required = false)String outpatientId)throws Exception{
|
|
@RequestParam(value = "outpatientId", required = false)String outpatientId)throws Exception{
|
|
return ObjEnvelop.getSuccess("ok",healthCareService.getSettlementResultUrl(outpatientId));
|
|
|
|
|
|
try {
|
|
|
|
String url = entranceHealthCareUrl + "getSettlementResultUrl?outpatientId="+outpatientId;
|
|
|
|
String infoResponse = httpClientUtil.get(url,"GBK");
|
|
|
|
JSONObject jsonObject = JSONObject.parseObject(infoResponse);
|
|
|
|
if(jsonObject.getInteger("status")==200){
|
|
|
|
return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
|
|
|
|
}else {
|
|
|
|
return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
|
|
|
|
}
|
|
|
|
}catch (Exception e){
|
|
|
|
e.printStackTrace();
|
|
|
|
return failedObjEnvelopException(e);
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@PostMapping(value = "/getSettlementResult")
|
|
@PostMapping(value = "/getSettlementResult")
|
|
@ApiOperation(value = " 2.5.8获取医保结算结果(N20.17.04.08)", notes = " 2.5.8获取医保结算结果(N20.17.04.08)")
|
|
@ApiOperation(value = " 2.5.8获取医保结算结果(N20.17.04.08)", notes = " 2.5.8获取医保结算结果(N20.17.04.08)")
|
|
public ObjEnvelop getSettlementResult(@ApiParam(name = "code", value = "结果回参", required = true)
|
|
public ObjEnvelop getSettlementResult(@ApiParam(name = "code", value = "结果回参", required = true)
|
|
@RequestParam(value = "code", required = false)String code)throws Exception{
|
|
@RequestParam(value = "code", required = false)String code)throws Exception{
|
|
return ObjEnvelop.getSuccess("ok",healthCareService.getSettlementResult(code));
|
|
|
|
|
|
try {
|
|
|
|
String url = entranceHealthCareUrl + "getSettlementResult?code="+code;
|
|
|
|
String infoResponse = httpClientUtil.get(url,"GBK");
|
|
|
|
JSONObject jsonObject = JSONObject.parseObject(infoResponse);
|
|
|
|
if(jsonObject.getInteger("status")==200){
|
|
|
|
return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
|
|
|
|
}else {
|
|
|
|
return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
|
|
|
|
}
|
|
|
|
}catch (Exception e){
|
|
|
|
e.printStackTrace();
|
|
|
|
return failedObjEnvelopException(e);
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@PostMapping(value = "/uploadMedicalHistory")
|
|
@PostMapping(value = "/uploadMedicalHistory")
|
|
@ApiOperation(value = " 2.7.1上传用户病史病情及医学报告(N20.17.06.01)", notes = " 2.7.1上传用户病史病情及医学报告(N20.17.06.01)")
|
|
@ApiOperation(value = " 2.7.1上传用户病史病情及医学报告(N20.17.06.01)", notes = " 2.7.1上传用户病史病情及医学报告(N20.17.06.01)")
|
|
public ObjEnvelop uploadMedicalHistory(@ApiParam(name = "outpatientId", value = "门诊id", required = true)
|
|
public ObjEnvelop uploadMedicalHistory(@ApiParam(name = "outpatientId", value = "门诊id", required = true)
|
|
@RequestParam(value = "outpatientId", required = false)String outpatientId)throws Exception{
|
|
@RequestParam(value = "outpatientId", required = false)String outpatientId)throws Exception{
|
|
return ObjEnvelop.getSuccess("ok",healthCareService.uploadMedicalHistory(outpatientId));
|
|
|
|
|
|
try {
|
|
|
|
String url = entranceHealthCareUrl + "uploadMedicalHistory?outpatientId="+outpatientId;
|
|
|
|
String infoResponse = httpClientUtil.get(url,"GBK");
|
|
|
|
JSONObject jsonObject = JSONObject.parseObject(infoResponse);
|
|
|
|
if(jsonObject.getInteger("status")==200){
|
|
|
|
return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
|
|
|
|
}else {
|
|
|
|
return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
|
|
|
|
}
|
|
|
|
}catch (Exception e){
|
|
|
|
e.printStackTrace();
|
|
|
|
return failedObjEnvelopException(e);
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@PostMapping(value = "/refundMedicalHistory")
|
|
@PostMapping(value = "/refundMedicalHistory")
|
|
@ -204,13 +485,37 @@ public class HealthCareEndPoint extends EnvelopRestEndpoint {
|
|
@RequestParam(value = "outpatientId", required = false)String outpatientId,
|
|
@RequestParam(value = "outpatientId", required = false)String outpatientId,
|
|
@ApiParam(name = "remark", value = "作废原因", required = false)
|
|
@ApiParam(name = "remark", value = "作废原因", required = false)
|
|
@RequestParam(value = "remark", required = false)String remark)throws Exception{
|
|
@RequestParam(value = "remark", required = false)String remark)throws Exception{
|
|
return ObjEnvelop.getSuccess("ok",healthCareService.refundMedicalHistory(outpatientId,remark));
|
|
|
|
|
|
try {
|
|
|
|
String url = entranceHealthCareUrl + "refundMedicalHistory?outpatientId="+outpatientId+"&remark="+remark;
|
|
|
|
String infoResponse = httpClientUtil.get(url,"GBK");
|
|
|
|
JSONObject jsonObject = JSONObject.parseObject(infoResponse);
|
|
|
|
if(jsonObject.getInteger("status")==200){
|
|
|
|
return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
|
|
|
|
}else {
|
|
|
|
return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
|
|
|
|
}
|
|
|
|
}catch (Exception e){
|
|
|
|
e.printStackTrace();
|
|
|
|
return failedObjEnvelopException(e);
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@PostMapping(value = "/uploadIcdProcess")
|
|
@PostMapping(value = "/uploadIcdProcess")
|
|
@ApiOperation(value = " 2.7.3获取问诊过程数据(N20.17.06.02)", notes = " 2.7.3获取问诊过程数据(N20.17.06.02)")
|
|
@ApiOperation(value = " 2.7.3获取问诊过程数据(N20.17.06.02)", notes = " 2.7.3获取问诊过程数据(N20.17.06.02)")
|
|
public ObjEnvelop uploadIcdProcess(@ApiParam(name = "outpatientId", value = "门诊id", required = false)
|
|
public ObjEnvelop uploadIcdProcess(@ApiParam(name = "outpatientId", value = "门诊id", required = false)
|
|
@RequestParam(value = "outpatientId", required = false)String outpatientId)throws Exception{
|
|
@RequestParam(value = "outpatientId", required = false)String outpatientId)throws Exception{
|
|
return ObjEnvelop.getSuccess("ok",healthCareService.uploadIcdProcess(outpatientId));
|
|
|
|
|
|
try {
|
|
|
|
String url = entranceHealthCareUrl + "uploadIcdProcess?outpatientId="+outpatientId;
|
|
|
|
String infoResponse = httpClientUtil.get(url,"GBK");
|
|
|
|
JSONObject jsonObject = JSONObject.parseObject(infoResponse);
|
|
|
|
if(jsonObject.getInteger("status")==200){
|
|
|
|
return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
|
|
|
|
}else {
|
|
|
|
return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
|
|
|
|
}
|
|
|
|
}catch (Exception e){
|
|
|
|
e.printStackTrace();
|
|
|
|
return failedObjEnvelopException(e);
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|