|
@ -892,13 +892,13 @@ public class PrescriptionInfoService extends BaseService {
|
|
|
Prescription prescription = prescriptionDao.findByCode(code);
|
|
|
List<PrescriptionInfo> prescriptionInfos = prescriptionInfoDao.findByPrescriptionCode(code);
|
|
|
//获取药品可拆标志
|
|
|
prescriptionInfos.forEach(info->{
|
|
|
List<Map<String,Object>> list = zyDictService.findDispDictByCode(prescription.getDoctor(),info.getDrugCode());
|
|
|
if(list!=null&&list.size()>0){
|
|
|
info.setDispPackUntuckFlag(Integer.valueOf(list.get(0).get("dispPackUntuckFlag").toString()));
|
|
|
info.setDispQuantityUntuckFlag(Integer.valueOf(list.get(0).get("dispQuantityUntuckFlag").toString()));
|
|
|
}
|
|
|
});
|
|
|
// prescriptionInfos.forEach(info->{
|
|
|
// List<Map<String,Object>> list = zyDictService.findDispDictByCode(prescription.getDoctor(),info.getDrugCode());
|
|
|
// if(list!=null&&list.size()>0){
|
|
|
// info.setDispPackUntuckFlag(Integer.valueOf(list.get(0).get("dispPackUntuckFlag").toString()));
|
|
|
// info.setDispQuantityUntuckFlag(Integer.valueOf(list.get(0).get("dispQuantityUntuckFlag").toString()));
|
|
|
// }
|
|
|
// });
|
|
|
PrescriptionReviewed reviewed = prescriptionReviewedDao.findByPrescriptionCode(code);
|
|
|
List<PrescriptionAdjust> prescriptionAdjusts = prescriptionAdjustDao.findByPrescriptionCodeOrderByIdDesc(code);
|
|
|
com.alibaba.fastjson.JSONObject rs = new com.alibaba.fastjson.JSONObject();
|
|
@ -1843,7 +1843,7 @@ public class PrescriptionInfoService extends BaseService {
|
|
|
return new JSONArray(rs);
|
|
|
}
|
|
|
|
|
|
public List<Map<String, Object>> getPhysicInfo(String code) {
|
|
|
public List<Map<String, Object>> getPhysicInfo(String code,String doctor) {
|
|
|
StringBuffer sql = new StringBuffer("SELECT " +
|
|
|
" t.min_dose AS minDose, " +
|
|
|
" t.physic_code AS physicCode, " +
|
|
@ -1855,9 +1855,19 @@ public class PrescriptionInfoService extends BaseService {
|
|
|
" t.pack_unit As packUnit, " +
|
|
|
" com3.`name` As packUnitName, " +
|
|
|
" pack_spec AS packSpec, " +
|
|
|
" subject_class AS subjectClass" +
|
|
|
" subject_class AS subjectClass," +
|
|
|
" d.dispQuantityUntuckFlag," +
|
|
|
" d.dispPackUntuckFlag" +
|
|
|
" FROM " +
|
|
|
" zy_iv_physic_dict t, " +
|
|
|
" (SELECT o.disp_quantity_untuck_flag dispQuantityUntuckFlag, " +
|
|
|
" o.disp_pack_untuck_flag dispPackUntuckFlag " +
|
|
|
" FROM " +
|
|
|
" wlyy_doctor_mapping h, " +
|
|
|
" zy_iv_org_physic_allot_dict o " +
|
|
|
" WHERE o.org_code = h.jw_doctor_hospital " +
|
|
|
" AND h.doctor_code = ? " +
|
|
|
" AND o.physic_code = ?) d, " +
|
|
|
" (SELECT code,name FROM zy_common_dict WHERE dict_name = 'IV_MEASURE_UNIT_DICT') com1, " +
|
|
|
" (SELECT code,name FROM zy_common_dict WHERE dict_name = 'IV_MEASURE_UNIT_DICT') com2, " +
|
|
|
" (SELECT code,name FROM zy_common_dict WHERE dict_name = 'IV_MEASURE_UNIT_DICT') com3 " +
|
|
@ -1866,7 +1876,7 @@ public class PrescriptionInfoService extends BaseService {
|
|
|
" AND com2.`code` = t.quantity_unit " +
|
|
|
" AND com3.`code` = t.pack_unit " +
|
|
|
" AND t.physic_code = ?");
|
|
|
List<Map<String, Object>> rs = jdbcTemplate.queryForList(sql.toString(),new Object[]{code});
|
|
|
List<Map<String, Object>> rs = jdbcTemplate.queryForList(sql.toString(),new Object[]{doctor,code,code});
|
|
|
return rs;
|
|
|
}
|
|
|
|