|
|
@ -47,17 +47,19 @@ public class ExportService implements IExportService{ |
|
|
|
Map<String,String> textMap = new HashMap(); |
|
|
|
Map<String,String> radio = new HashMap(); |
|
|
|
Map<String,String> multiple = new HashMap(); |
|
|
|
//查询患者年龄
|
|
|
|
//基本信息查询患者年龄
|
|
|
|
FirstAid firstAid = firstAidDao.selectByPrimaryKey(param.getFirstAidId()); |
|
|
|
if (ObjectUtil.isNotNull(firstAid)) { |
|
|
|
textMap.put("age",String.valueOf(firstAid.getAge())); |
|
|
|
textMap.put("CJBL-NAME",firstAid.getName()); |
|
|
|
textMap.put("CJBL-SEX",firstAid.getGender()==1?"男":"女"); |
|
|
|
} |
|
|
|
//当前时间
|
|
|
|
long currentTime = System.currentTimeMillis(); |
|
|
|
List<String> currentTimeGroup = timeGroup(currentTime); |
|
|
|
textMap.put("year",currentTimeGroup.get(0)); |
|
|
|
textMap.put("month",currentTimeGroup.get(1)); |
|
|
|
textMap.put("day",currentTimeGroup.get(2)); |
|
|
|
// long currentTime = System.currentTimeMillis();
|
|
|
|
// List<String> currentTimeGroup = timeGroup(currentTime);
|
|
|
|
// textMap.put("year",currentTimeGroup.get(0));
|
|
|
|
// textMap.put("month",currentTimeGroup.get(1));
|
|
|
|
// textMap.put("day",currentTimeGroup.get(2));
|
|
|
|
|
|
|
|
List<QuestionnaireVo.QuestionnaireInfo> codeAndAnswer = firstAidRecordDao.queryCodeAndAnswer(param.getFirstAidId()); |
|
|
|
HashMap<String,String> codeAndAnswerMap = new HashMap<>(codeAndAnswer.size()); |
|
|
@ -71,19 +73,33 @@ public class ExportService implements IExportService{ |
|
|
|
} |
|
|
|
} |
|
|
|
//单选code
|
|
|
|
for (String radioCode : Constant.RADIO_CODE) { |
|
|
|
if (questionnaireInfo.getCode().equals(radioCode)) { |
|
|
|
radio.put(questionnaireInfo.getCode(),questionnaireInfo.getAnswer()); |
|
|
|
} |
|
|
|
} |
|
|
|
// for (String radioCode : Constant.RADIO_CODE) {
|
|
|
|
// if (questionnaireInfo.getCode().equals(radioCode)) {
|
|
|
|
// radio.put(questionnaireInfo.getCode(),questionnaireInfo.getAnswer());
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
//时间code
|
|
|
|
for (String timeCode : Constant.TIME_CODE) { |
|
|
|
if (questionnaireInfo.getCode().equals(timeCode)) { |
|
|
|
List<String> timeGroup = timeGroup(Long.parseLong(questionnaireInfo.getAnswer())); |
|
|
|
textMap.put(questionnaireInfo.getCode()+"-h",String.valueOf(timeGroup.get(3))); |
|
|
|
textMap.put(questionnaireInfo.getCode()+"-m",String.valueOf(timeGroup.get(4))); |
|
|
|
textMap.put(questionnaireInfo.getCode()+"-y",timeGroup.get(0)); |
|
|
|
textMap.put(questionnaireInfo.getCode()+"-m",timeGroup.get(1)); |
|
|
|
textMap.put(questionnaireInfo.getCode()+"-d",timeGroup.get(2)); |
|
|
|
textMap.put(questionnaireInfo.getCode()+"-h",timeGroup.get(3)); |
|
|
|
textMap.put(questionnaireInfo.getCode()+"-m",timeGroup.get(4)); |
|
|
|
} |
|
|
|
} |
|
|
|
//来院方式特殊处理
|
|
|
|
if ("JBXX-LYFS".equals(questionnaireInfo.getCode())) { |
|
|
|
if ("本院急救车".equals(questionnaireInfo.getAnswer())) { |
|
|
|
radio.put(questionnaireInfo.getCode(),"本地120"); |
|
|
|
}else if ("网络协作医院".equals(questionnaireInfo.getAnswer()) || "非网络协作医院".equals(questionnaireInfo.getAnswer())) { |
|
|
|
radio.put(questionnaireInfo.getCode(),"外院转入"); |
|
|
|
}else { |
|
|
|
radio.put(questionnaireInfo.getCode(),questionnaireInfo.getAnswer()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -91,7 +107,7 @@ public class ExportService implements IExportService{ |
|
|
|
//静脉溶栓开始时间
|
|
|
|
String jmrssj = codeAndAnswerMap.get("JMRSSJ"); |
|
|
|
String arriveHospitalTime = codeAndAnswerMap.get("JBXX-DYSJ"); |
|
|
|
String fbsj = codeAndAnswerMap.get("JBXX-FBSJ"); |
|
|
|
String fbsj = codeAndAnswerMap.get("JBXX-FBTime"); |
|
|
|
if (StrUtil.isNotBlank(jmrssj) && StrUtil.isNotBlank(arriveHospitalTime)) { |
|
|
|
long DNT = (Long.parseLong(jmrssj)-Long.parseLong(arriveHospitalTime))/1000/60; |
|
|
|
textMap.put("DNT",String.valueOf(DNT)); |
|
|
|