|
@ -126,6 +126,7 @@ import jxl.write.*;
|
|
|
import net.sf.json.JSONArray;
|
|
|
import net.sf.json.JSONObject;
|
|
|
import net.sf.json.xml.XMLSerializer;
|
|
|
import org.apache.commons.collections.ArrayStack;
|
|
|
import org.apache.commons.collections.map.HashedMap;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.http.NameValuePair;
|
|
@ -15441,6 +15442,52 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
public List<Map<String,Object>> getPrescriptionExpressageLog(String outpatientId) throws Exception {
|
|
|
List<Map<String,Object>> result = new ArrayList<>();
|
|
|
List<WlyyPrescriptionDO> prescriptionDOs = new ArrayStack();
|
|
|
prescriptionDOs = prescriptionDao.findByOutpatientId(outpatientId);
|
|
|
if (prescriptionDOs.size()>0){
|
|
|
for (WlyyPrescriptionDO prescriptionDOTmp : prescriptionDOs) {
|
|
|
Map<String,Object> objTmp = new HashMap<>();
|
|
|
//处方基本信息
|
|
|
objTmp.put("outpatientId",outpatientId);
|
|
|
objTmp.put("realOrder",prescriptionDOTmp.getRealOrder());
|
|
|
objTmp.put("originRealOrder",prescriptionDOTmp.getOriginRealOrder());
|
|
|
objTmp.put("admNo",prescriptionDOTmp.getAdmNo());
|
|
|
objTmp.put("serialNo",prescriptionDOTmp.getSerialNo());
|
|
|
objTmp.put("originSerialNo",prescriptionDOTmp.getOriginSerialNo());
|
|
|
objTmp.put("patientName",prescriptionDOTmp.getPatientName());
|
|
|
objTmp.put("doctorName",prescriptionDOTmp.getDoctorName());
|
|
|
|
|
|
//药品信息
|
|
|
List<WlyyPrescriptionInfoVO> infoVOs = new ArrayList<>();
|
|
|
System.out.println("=====PrescriptionId======" + prescriptionDOTmp.getId());
|
|
|
convertToModels(prescriptionInfoDao.findByPrescriptionId(prescriptionDOTmp.getId(), 1), infoVOs, WlyyPrescriptionInfoVO.class);
|
|
|
objTmp.put("infoVOs",infoVOs);
|
|
|
//物流信息
|
|
|
List<WlyyPrescriptionExpressageDO> expressageDOs = prescriptionExpressageDao.findByOutpatientId(outpatientId);
|
|
|
if (expressageDOs != null && expressageDOs.size() > 0) {
|
|
|
objTmp.put("expressage",convertToModel(expressageDOs.get(0), WlyyPrescriptionExpressageVO.class));
|
|
|
objTmp.put("oneselfPickupFlg",expressageDOs.get(0).getOneselfPickupFlg());
|
|
|
} else {
|
|
|
objTmp.put("expressage",null);
|
|
|
objTmp.put("oneselfPickupFlg",null);
|
|
|
}
|
|
|
|
|
|
List<WlyyPrescriptionExpressageLogDO> expressageLogDOs = prescriptionExpressageLogDao.queryByOutpatientIdOrderByCreateTimeDesc(outpatientId);
|
|
|
List<WlyyPrescriptionExpressageLogVO> expressageLogVOs = new ArrayList<>();
|
|
|
if (expressageLogDOs != null && expressageLogDOs.size() > 0) {
|
|
|
convertToModels(expressageLogDOs, expressageLogVOs, WlyyPrescriptionExpressageLogVO.class);
|
|
|
}
|
|
|
objTmp.put("expressageLogs",expressageLogVOs);
|
|
|
result.add(objTmp);
|
|
|
}
|
|
|
}else{
|
|
|
throw new Exception("无门诊处方记录。");
|
|
|
}
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
/* public List<Map<String,Object>> selectSettlementInfo(String medicareState,String condition,String startDate,String endDate){
|
|
|
String sql = ""
|
|
|
}*/
|