Browse Source

Merge branch 'dev' of trick9191/patient-co-management into dev

trick9191 8 years ago
parent
commit
d1c69ae67f

+ 3 - 3
common/common-entity/src/main/java/com/yihu/wlyy/entity/patient/prescription/Prescription.java

@ -85,7 +85,7 @@ public class Prescription extends IdEntity {
    private String jwRegisterFee; //基卫-诊金
    private String prescribeReason; //开方失败/成功原因
    private String prescribeTime ;//开方失败、成功时间
    private Date prescribeTime ;//开方失败、成功时间
    @Column(name = "code", unique = true, nullable = false)
    public String getCode() {
@ -634,11 +634,11 @@ public class Prescription extends IdEntity {
        this.prescribeReason = prescribeReason;
    }
    public String getPrescribeTime() {
    public Date getPrescribeTime() {
        return prescribeTime;
    }
    public void setPrescribeTime(String prescribeTime) {
    public void setPrescribeTime(Date prescribeTime) {
        this.prescribeTime = prescribeTime;
    }
}

+ 8 - 4
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionInfoService.java

@ -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){