|
@ -135,7 +135,7 @@ public class PrescriptionInfoService extends BaseService {
|
|
if ("1".equals(type)) {
|
|
if ("1".equals(type)) {
|
|
Patient p = patientDao.findByCode(patient);
|
|
Patient p = patientDao.findByCode(patient);
|
|
|
|
|
|
String rp = jwPrescriptionService.getLastRecipe(p.getSsc(), null, null, null);
|
|
|
|
|
|
String rp = jwPrescriptionService.getLastRecipe(p.getSsc(), null, startDate, endDate);
|
|
com.alibaba.fastjson.JSONArray pres = presModeAdapter.modeToPrescription(rp);
|
|
com.alibaba.fastjson.JSONArray pres = presModeAdapter.modeToPrescription(rp);
|
|
|
|
|
|
for (int i = 0; i < pres.size(); i++) {
|
|
for (int i = 0; i < pres.size(); i++) {
|
|
@ -179,8 +179,37 @@ public class PrescriptionInfoService extends BaseService {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//过滤病症
|
|
|
|
if(StringUtils.isNotBlank(diagnosisCode)&&!"0".equals(diagnosisCode)){
|
|
|
|
Iterator iterator = pres.iterator();
|
|
|
|
while (iterator.hasNext()) {
|
|
|
|
com.alibaba.fastjson.JSONObject r = (com.alibaba.fastjson.JSONObject) iterator.next();
|
|
|
|
String dis = gxy;
|
|
|
|
if("1".equals(diagnosisCode)){
|
|
|
|
dis = gxy;
|
|
|
|
}else if("2".equals(diagnosisCode)){
|
|
|
|
dis = tnb;
|
|
|
|
}
|
|
|
|
|
|
|
|
com.alibaba.fastjson.JSONArray des = (com.alibaba.fastjson.JSONArray) r.getJSONArray("prescriptionDt");
|
|
|
|
boolean flag = false;
|
|
|
|
for (int i = 0; i < des.size(); i++) {
|
|
|
|
PrescriptionDiagnosis ds = des.getObject(i, PrescriptionDiagnosis.class);
|
|
|
|
//如果含有选择病症,标记为true
|
|
|
|
if (dis.equals(ds.getHealthProblem())) {
|
|
|
|
//含有选择的病症
|
|
|
|
flag = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//如果未含有选择的病症,则删除
|
|
|
|
if (!flag){
|
|
|
|
iterator.remove();
|
|
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
return pres;
|
|
return pres;
|
|
} else {
|
|
} else {
|
|
Patient p = patientDao.findByCode(patient);
|
|
Patient p = patientDao.findByCode(patient);
|