|
@@ -354,9 +354,9 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
|
|
|
String fideCode = analyzeVO.getBehospitalCode().substring(0, analyzeVO.getBehospitalCode().indexOf("_"));
|
|
|
// 化验
|
|
|
- List<MedLisResult> medLisResultList = getMedLisResultList(hospitalId,fideCode,behospitalInfoList.get(0));
|
|
|
+ List<MedLisResult> medLisResultList = getMedLisResultList(hospitalId, fideCode, behospitalInfoList.get(0));
|
|
|
// 辅检
|
|
|
- List<MedPacsResult> medPacsResultList = getMedPacsResultList(hospitalId,fideCode,behospitalInfoList.get(0));
|
|
|
+ List<MedPacsResult> medPacsResultList = getMedPacsResultList(hospitalId, fideCode, behospitalInfoList.get(0));
|
|
|
|
|
|
// 会诊记录
|
|
|
addDataWithKey("会诊", recMap, medrecVoList,
|
|
@@ -426,7 +426,14 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
}
|
|
|
|
|
|
private List<MedLisResult> getMedLisResultList(Long hospitalId, String fideCode, BehospitalInfo behospitalInfo) {
|
|
|
- if (behospitalInfo.getBehospitalDate() == null) {
|
|
|
+ String behospitalDate = null, leaveHospitalDate = null;
|
|
|
+ try {
|
|
|
+ behospitalDate = DateUtil.format(behospitalInfo.getBehospitalDate(), DateUtil.DATE_TIME_FORMAT);
|
|
|
+ leaveHospitalDate = DateUtil.format(behospitalInfo.getLeaveHospitalDate(), DateUtil.DATE_TIME_FORMAT);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error(e.getMessage(), e);
|
|
|
+ }
|
|
|
+ if (StringUtil.isBlank(behospitalDate)) {
|
|
|
return null;
|
|
|
}
|
|
|
List<MedLisResult> medLisResultList = null;
|
|
@@ -434,14 +441,22 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
medLisInfoQe.eq("is_deleted", IsDeleteEnum.N.getKey());
|
|
|
medLisInfoQe.eq("hospital_id", hospitalId);
|
|
|
medLisInfoQe.eq("behospital_code", fideCode);
|
|
|
- medLisInfoQe.ge("check_date", behospitalInfo.getBehospitalDate());
|
|
|
- medLisInfoQe.le(
|
|
|
- StringUtil.isNotBlank(behospitalInfo.getIsPlacefile())
|
|
|
- && behospitalInfo.getIsPlacefile().equals("1")
|
|
|
- && behospitalInfo.getLeaveHospitalDate() != null,
|
|
|
- "check_date",
|
|
|
- behospitalInfo.getLeaveHospitalDate()
|
|
|
+ medLisInfoQe.isNotNull("check_date");
|
|
|
+ medLisInfoQe.apply("check_date!=''");
|
|
|
+ medLisInfoQe.apply(
|
|
|
+ "date_format (check_date,'%Y-%m-%d %H:%i:%s') >= date_format('"
|
|
|
+ + behospitalDate
|
|
|
+ + "','%Y-%m-%d %H:%i:%s')"
|
|
|
);
|
|
|
+ if (StringUtil.isNotBlank(behospitalInfo.getIsPlacefile())
|
|
|
+ && behospitalInfo.getIsPlacefile().equals("1")
|
|
|
+ && StringUtil.isNotBlank(leaveHospitalDate)) {
|
|
|
+ medLisInfoQe.apply(
|
|
|
+ "date_format (check_date,'%Y-%m-%d %H:%i:%s') <= date_format('"
|
|
|
+ + leaveHospitalDate
|
|
|
+ + "','%Y-%m-%d %H:%i:%s')"
|
|
|
+ );
|
|
|
+ }
|
|
|
List<MedLisInfo> medLisInfoList = medLisInfoFacade.list(medLisInfoQe);
|
|
|
if (ListUtil.isNotEmpty(medLisInfoList)) {
|
|
|
medLisResultList = medLisResultFacade.list(new QueryWrapper<MedLisResult>()
|
|
@@ -455,7 +470,14 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
}
|
|
|
|
|
|
private List<MedPacsResult> getMedPacsResultList(Long hospitalId, String fideCode, BehospitalInfo behospitalInfo) {
|
|
|
- if (behospitalInfo.getBehospitalDate() == null) {
|
|
|
+ String behospitalDate = null, leaveHospitalDate = null;
|
|
|
+ try {
|
|
|
+ behospitalDate = DateUtil.format(behospitalInfo.getBehospitalDate(), DateUtil.DATE_TIME_FORMAT);
|
|
|
+ leaveHospitalDate = DateUtil.format(behospitalInfo.getLeaveHospitalDate(), DateUtil.DATE_TIME_FORMAT);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error(e.getMessage(), e);
|
|
|
+ }
|
|
|
+ if (StringUtil.isBlank(behospitalDate)) {
|
|
|
return null;
|
|
|
}
|
|
|
List<MedPacsResult> medPacsResultList = null;
|
|
@@ -463,14 +485,22 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
medPacsInfoQe.eq("is_deleted", IsDeleteEnum.N.getKey());
|
|
|
medPacsInfoQe.eq("hospital_id", hospitalId);
|
|
|
medPacsInfoQe.eq("behospital_code", fideCode);
|
|
|
- medPacsInfoQe.ge("check_date", behospitalInfo.getBehospitalDate());
|
|
|
- medPacsInfoQe.le(
|
|
|
- StringUtil.isNotBlank(behospitalInfo.getIsPlacefile())
|
|
|
- && behospitalInfo.getIsPlacefile().equals("1")
|
|
|
- && behospitalInfo.getLeaveHospitalDate() != null,
|
|
|
- "check_date",
|
|
|
- behospitalInfo.getLeaveHospitalDate()
|
|
|
+ medPacsInfoQe.isNotNull("check_date");
|
|
|
+ medPacsInfoQe.apply("check_date!=''");
|
|
|
+ medPacsInfoQe.apply(
|
|
|
+ "date_format (check_date,'%Y-%m-%d %H:%i:%s') >= date_format('"
|
|
|
+ + behospitalDate
|
|
|
+ + "','%Y-%m-%d %H:%i:%s')"
|
|
|
);
|
|
|
+ if (StringUtil.isNotBlank(behospitalInfo.getIsPlacefile())
|
|
|
+ && behospitalInfo.getIsPlacefile().equals("1")
|
|
|
+ && StringUtil.isNotBlank(leaveHospitalDate)) {
|
|
|
+ medPacsInfoQe.apply(
|
|
|
+ "date_format (check_date,'%Y-%m-%d %H:%i:%s') <= date_format('"
|
|
|
+ + leaveHospitalDate
|
|
|
+ + "','%Y-%m-%d %H:%i:%s')"
|
|
|
+ );
|
|
|
+ }
|
|
|
List<MedPacsInfo> medPacsInfoList = medPacsInfoFacade.list(medPacsInfoQe);
|
|
|
if (ListUtil.isNotEmpty(medPacsInfoList)) {
|
|
|
medPacsResultList = medPacsResultFacade.list(new QueryWrapper<MedPacsResult>()
|