|
@ -152,14 +152,24 @@ public class PrescriptionInfoService extends BaseService {
|
|
|
Prescription prescription = prescriptionDao.findByCode(code);
|
|
|
List<PrescriptionInfo> prescriptionInfos = prescriptionInfoDao.findByPrescriptionCode(code);
|
|
|
JSONObject rs = new JSONObject();
|
|
|
rs.put("prescription",prescription);
|
|
|
rs.put("prescriptionInfos",prescriptionInfos);
|
|
|
if(prescription!=null&&StringUtils.isNotBlank(prescription.getPatient())){
|
|
|
Patient p = patientDao.findByCode(prescription.getPatient());
|
|
|
rs.put("patient",p);
|
|
|
}else{
|
|
|
rs.put("patient","");
|
|
|
}
|
|
|
if(prescription.getStatus()==10){
|
|
|
Long s = (prescription.getCreateTime().getTime()-new Date().getTime())/1000;
|
|
|
rs.put("time",s);
|
|
|
if(s>172800){
|
|
|
prescription.setStatus(-3);
|
|
|
prescriptionDao.save(prescription);
|
|
|
}
|
|
|
}else{
|
|
|
rs.put("time","");
|
|
|
}
|
|
|
rs.put("prescription",prescription);
|
|
|
rs.put("prescriptionInfos",prescriptionInfos);
|
|
|
return rs;
|
|
|
}
|
|
|
|