|
@ -355,14 +355,15 @@ public class PrescriptionInfoService extends BaseService {
|
|
|
return 1;
|
|
|
}
|
|
|
|
|
|
public void upLoadPrescriotionState(String state,Prescription p,PrescriptionReviewed reviewed)throws Exception{
|
|
|
//审核通过
|
|
|
public int upLoadPrescriotionState(String state,Prescription p,PrescriptionReviewed reviewed)throws Exception{
|
|
|
//医生审核通过,发起开方及预结算
|
|
|
if("1".equals(state)){
|
|
|
String rs = jwPrescriptionService.saveRecipe(p.getCode());
|
|
|
com.alibaba.fastjson.JSONObject respone = com.alibaba.fastjson.JSONObject.parseObject(rs);
|
|
|
int st = respone.getInteger("status");
|
|
|
com.alibaba.fastjson.JSONObject data = respone.getJSONObject("data");
|
|
|
String code = data.getString("CODE");
|
|
|
com.alibaba.fastjson.JSONObject byRefParaData = (com.alibaba.fastjson.JSONObject)data.getJSONObject("byRefParaData");
|
|
|
if(st==200&&"1".equals(code)&&data.getJSONArray("returnData").size()>0){
|
|
|
//开方成功返回遗嘱号
|
|
|
com.alibaba.fastjson.JSONArray returnDatas = data.getJSONArray("returnData");
|
|
@ -370,13 +371,16 @@ public class PrescriptionInfoService extends BaseService {
|
|
|
p.setVisitNo(returnData.getString("VISIT_NO"));
|
|
|
p.setRecipeNo(returnData.getString("RECIPE_NO"));
|
|
|
prescriptionDao.save(p);
|
|
|
return 1;
|
|
|
}else{
|
|
|
p.setStatus(PrescriptionLog.PrescriptionLogStatus.add_error.getValue());
|
|
|
reviewed.setStatus(-1);
|
|
|
p.setPrescribeReason((String)byRefParaData.get("errorMsg"));
|
|
|
p.setPrescribeTime(new Date());
|
|
|
prescriptionDao.save(p);
|
|
|
prescriptionReviewedDao.save(reviewed);
|
|
|
return 0;
|
|
|
}
|
|
|
}
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
public JSONArray getDoctorPrescription(Integer teamCode,String state,String diseases,String startDate,String endDate,String nameKeyword,String patient,Integer page,Integer size){
|