|
@ -132,51 +132,12 @@ public class PrescriptionInfoService extends BaseService {
|
|
|
for(int i=0;i<pres.size();i++){
|
|
|
com.alibaba.fastjson.JSONObject r = (com.alibaba.fastjson.JSONObject) pres.get(i);
|
|
|
r.put("reviewedState",presCheckState(r.getString("code")));
|
|
|
r.put("patientName",p.getName());
|
|
|
r.put("patient",p.getCode());
|
|
|
}
|
|
|
return pres;
|
|
|
// //基卫接口
|
|
|
// List<Map<String,Object>> prescriptions = new ArrayList<>();
|
|
|
// Map<String,Object> p1 = new HashMap<>();
|
|
|
// p1.put("code","2");
|
|
|
// p1.put("hospital","3502050100");
|
|
|
// p1.put("hospitalName","海沧区嵩屿街道社区卫生服务中心");
|
|
|
// p1.put("doctor","hxmD201703150222");
|
|
|
// p1.put("doctorName","黄小陌(全科)");
|
|
|
// p1.put("adminTeamId","643");
|
|
|
// p1.put("prescriptionType","门诊");
|
|
|
// p1.put("date","2017-08-08 10:10:10");
|
|
|
// p1.put("patient","37c0657335f94ed38eeced22dbed8011");
|
|
|
// p1.put("patientName","花生");
|
|
|
// if(StringUtils.isNotBlank((String)p1.get("code"))){
|
|
|
// String sql = "SELECT p.status FROM wlyy_prescription p WHERE p.parent_code='2'";
|
|
|
// List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
|
|
|
// if(list!=null&&list.size()>0){
|
|
|
// int state = (Integer) (list.get(0).get("status"));
|
|
|
// p1.put("status",state);
|
|
|
// }
|
|
|
// }
|
|
|
//
|
|
|
// List<PrescriptionInfo> prescriptionInfos = new ArrayList<>();
|
|
|
// PrescriptionInfo info1 = new PrescriptionInfo();
|
|
|
// info1.setCode("2017080700001");
|
|
|
// info1.setPrescriptionCode("201708070001");
|
|
|
// info1.setDel(1);
|
|
|
// info1.setDrugCode("A1");
|
|
|
// info1.setDrugName("A药品");
|
|
|
// prescriptionInfos.add(info1);
|
|
|
//
|
|
|
// List<PrescriptionDiagnosis> diagnosises = new ArrayList<>();
|
|
|
// PrescriptionDiagnosis diagnosis = new PrescriptionDiagnosis();
|
|
|
// diagnosis.setCode("1");
|
|
|
// diagnosis.setName("糖尿病");
|
|
|
// diagnosises.add(diagnosis);
|
|
|
//
|
|
|
// p1.put("prescriptionDt",diagnosises);
|
|
|
// p1.put("prescriptionInfo",prescriptionInfos);
|
|
|
//
|
|
|
// prescriptions.add(p1);
|
|
|
|
|
|
}else{
|
|
|
Patient p = patientDao.findByCode(patient);
|
|
|
StringBuffer sqlBuffer = new StringBuffer("SELECT p.code,p.create_time AS date,p.status,p.hospital_name As hospitalName FROM wlyy_prescription p " +
|
|
|
"WHERE p.patient=?");
|
|
|
List<Object> params = new ArrayList<>();
|
|
@ -202,6 +163,8 @@ public class PrescriptionInfoService extends BaseService {
|
|
|
//通过缓存查找药品和疾病
|
|
|
for(Map<String,Object> map :rs){
|
|
|
String code = (String)map.get("code");
|
|
|
map.put("patient",p.getCode());
|
|
|
map.put("patientName",p.getName());
|
|
|
map.put("prescriptionInfo",prescriptionDiagnosisService.getPrescriptionInfo(code));
|
|
|
map.put("prescriptionDt", prescriptionDiagnosisService.getPrescriptionDiagnosis(code));
|
|
|
}
|
|
@ -1015,4 +978,11 @@ public class PrescriptionInfoService extends BaseService {
|
|
|
return "1";
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
public JSONArray getRateList(){
|
|
|
StringBuffer sql = new StringBuffer("SELECT * from zy_common_dict WHERE dict_name = 'IV_RECIPE_FREQUENCY_DICT'");
|
|
|
List<Map<String,Object>> rs = jdbcTemplate.queryForList(sql.toString());
|
|
|
return new JSONArray(rs);
|
|
|
}
|
|
|
}
|