@ -60,7 +60,6 @@ public class XBDAction extends BaseAction {
}
}
/ * *
* 获取云胶片的授权地址
*
@ -103,32 +102,6 @@ public class XBDAction extends BaseAction {
}
}
// /**
// * 获取该病人已归档可以翻拍的病历[红河]
// *
// * @param patientId 病人id
// * @return 可以翻拍的病历列表
// */
// @Action("getMedicalRecordList2")
// public Result getMedicalRecordList2(String patientId, Integer flagSh) {
// String realPatientId = getDecodeString(patientId);
// log.info("[病历]获取该病人已归档可以翻拍的病历 patientId={}", realPatientId);
// if (ObjectUtils.isEmpty(realPatientId)) {
// return Result.error(ResultEnum.PARAM_IS_DEFECT);
// }
// String resp = XBDHttpHelper.ExecMethodPost(XBDEnum.BLSM_Appointment_GetBA.Name, params -> {
// params.put("patientID", realPatientId);
// params.put("flagFP", 0);
// params.put("flagSH", flagSh);
// });
// if (ObjectUtils.isEmpty(resp)) {
// return Result.error(ResultEnum.INTERFACE_INVOKE_ERROR);
// }
// return Result.success(JsonHelper.parseArray(resp, MedicalRecord.class));
// }
/ * *
* 获取该病人需要翻拍病历干啥的列表 ( 用途 ) - > 直接绑定翻拍的病历类型
*
@ -183,17 +156,17 @@ public class XBDAction extends BaseAction {
payCasebook . setPhone ( phone ) ;
CasebookService casebookService = new CasebookService ( ) ;
if ( casebookService . isExit ( patientId , zyNum , String . valueOf ( getWay ) , useToName ) ) {
log . info ( "[病历复印]预约信息重复 patientId={}, treatNum={}, getWay={}, useToName={}" , patientId , zyNum , getWay , useToName ) ;
if ( casebookService . hasResInfo ( openId , patientId , zyNum , String . valueOf ( getWay ) , useToNo , useToName ) ) {
log . info ( "[病历复印]预约信息重复 patientId={}, treatNum={}, getWay={}, useToNo={}, useToN ame={}" , patientId , zyNum , getWay , useToNo , useToName ) ;
return Result . error ( ResultEnum . APPLY_REPEAT ) ;
}
long id = casebookService . addApply ( payCasebook , openId , patientId ) ; // 返回自增id
long id = casebookService . addRes Apply ( payCasebook , openId , patientId ) ; // 返回自增id
if ( id < = 0 ) {
log . info ( "[病历复印]预约信息存储失败 patientId={}, openId={}, patientId={}" , patientId , openId , patientId ) ;
return Result . error ( ResultEnum . SPECIFIED_QUESTIONED_USER_NOT_EXIST ) ;
}
String jsonString = XBDHttpHelper . ExecMethodPost ( XBDEnum . BLSM_Appointment_SetAppointment . NAME , params - > {
String respJson = XBDHttpHelper . ExecMethodPost ( XBDEnum . BLSM_Appointment_SetAppointment . NAME , params - > {
params . put ( "ZYNum" , zyNum ) ;
params . put ( "ApplyName" , applyName ) ;
params . put ( "UseToNo" , useToNo ) ;
@ -218,24 +191,29 @@ public class XBDAction extends BaseAction {
params . put ( "ApplicationImg" , applicationImg ) ;
} ) ;
if ( ObjectUtils . isEmpty ( jsonString ) ) {
return Result . error ( ResultEnum . ERROR ) ;
log . info ( "[病历复印]HIS预约返回 resp=[{}], id={}" , respJson , id ) ;
if ( ObjectUtils . isEmpty ( respJson ) ) {
return Result . error ( ResultEnum . INTERFACE_HIS_INVOKE_ERROR ) ;
}
JSONObject jsonObject = JsonHelper . parseObject ( jsonString ) ;
String applyId = jsonObject . getString ( "applyId" ) ;
JSONObject respJsonObj = JsonHelper . parseJsonObjByBracket ( respJson ) ;
if ( respJsonObj = = null ) {
return Result . error ( ResultEnum . INTERFACE_HIS_DATA_ERROR ) ;
}
String applyId = respJsonObj . getString ( "Ba_Borrow_No" ) ;
if ( ObjectUtils . isEmpty ( applyId ) ) {
return Result . error ( ResultEnum . ERROR ) ;
return Result . error ( ResultEnum . INTERFACE_HIS_DATA_ ERROR) ;
}
if ( ! casebookService . updateApplyIdById ( id , applyId ) ) {
log . error ( "[病历复印]记录applyId失败 id={}, applyId={}" , applyId , applyId ) ;
return Result . error ( ResultEnum . ERROR ) ;
}
return Result . success ( jsonObject ) ;
return Result . success ( respJsonObj ) ;
} catch ( Exception e ) {
log . error ( "[病历复印]预约失败 error:{}" , e . toString ( ) ) ;
return Result . error ( R esultEnum . ERROR ) ;
return Result . error ( e ) ;
}
}
@ -383,6 +361,30 @@ public class XBDAction extends BaseAction {
// params.put("delNote",delNote);
// });
// return Result.success(JsonHelper.parseObject(jsonString));
// }
// /**
// * 获取该病人已归档可以翻拍的病历[红河]
// *
// * @param patientId 病人id
// * @return 可以翻拍的病历列表
// */
// @Action("getMedicalRecordList2")
// public Result getMedicalRecordList2(String patientId, Integer flagSh) {
// String realPatientId = getDecodeString(patientId);
// log.info("[病历]获取该病人已归档可以翻拍的病历 patientId={}", realPatientId);
// if (ObjectUtils.isEmpty(realPatientId)) {
// return Result.error(ResultEnum.PARAM_IS_DEFECT);
// }
// String resp = XBDHttpHelper.ExecMethodPost(XBDEnum.BLSM_Appointment_GetBA.Name, params -> {
// params.put("patientID", realPatientId);
// params.put("flagFP", 0);
// params.put("flagSH", flagSh);
// });
// if (ObjectUtils.isEmpty(resp)) {
// return Result.error(ResultEnum.INTERFACE_INVOKE_ERROR);
// }
// return Result.success(JsonHelper.parseArray(resp, MedicalRecord.class));
// }
}