diff --git a/platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarFollowUp.xml b/platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarFollowUp.xml
index cf130f2..c8eb6be 100644
--- a/platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarFollowUp.xml
+++ b/platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarFollowUp.xml
@@ -192,7 +192,7 @@ select id,baby_id,follow_time,follow_addr,mark_time,mark_result,mark_detail,foll
and mark_time = #{markTime,jdbcType=TIMESTAMP}
- and mark_result = #{markResult,jdbcType=VARCHAR}
+ and mark_result like concat("%",#{markResult},"%")
and mark_detail = #{markDetail,jdbcType=VARCHAR}
@@ -309,6 +309,7 @@ select id,baby_id,follow_time,follow_addr,mark_time,mark_result,mark_detail,foll
and ifdel = 0
+ order by follow_time
\ No newline at end of file
diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/FollowUpController.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/FollowUpController.java
index 3c437b3..acb8fe1 100644
--- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/FollowUpController.java
+++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/FollowUpController.java
@@ -61,7 +61,7 @@ public class FollowUpController extends BaseController {
private BabyPatientExtendEarBabyService earBabyService;
/**
- * 根据babyId获取随访记录
+ * 根据babyId获取随访列表
*
* @param babyId 随访记录id
* @return
@@ -108,7 +108,7 @@ public class FollowUpController extends BaseController {
}
/**
- * 编辑:获取随访记录详情
+ * 获取随访记录详情
*
* @param fuId 随访记录id
* @return
@@ -205,6 +205,9 @@ public class FollowUpController extends BaseController {
if(followUp.getNextTime()!=null){
fuResult.setNextTime(DateUtil.getyyyy_MM_dd(followUp.getNextTime()));
+ //根据babyId查询档案信息
+ BabyModel babyModel = babyService.getOneBabyById(followUp.getBabyId());
+ fuResult.setNextTimeMouseAge(DateUtil.getBabyMonthAge(babyModel.getBirth(), followUp.getNextTime()));
}
if(followUp.getIfclose()!=null){
fuResult.setIfclose(followUp.getIfclose());
@@ -275,7 +278,7 @@ public class FollowUpController extends BaseController {
//确诊结果
if (fur.getMarkResult() != null) {
- query.setMarkResult(String.valueOf(fur.getMarkResult()));
+ query.setMarkResult(","+fur.getMarkResult()+",");
}
//医院ID 集合。本院、外院、全部...
diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HearDiagnManageController.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HearDiagnManageController.java
index 752c5ca..b5c23c2 100644
--- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HearDiagnManageController.java
+++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HearDiagnManageController.java
@@ -334,27 +334,48 @@ public class HearDiagnManageController extends BaseController {
if (hdReq.getConfirmEndTime() != null) {//确诊结束时间
query.setConfirmEndTime(hdReq.getConfirmEndTime());
}
+
+ BabyPatientExtendEarBabyQuery babyQuery = new BabyPatientExtendEarBabyQuery();
+ babyQuery.setQueryNo(hdReq.getKeyWord());
+ babyQuery.setBirthStart(hdReq.getBirthStartTime());
+ babyQuery.setBirthEnd(hdReq.getBirthEndTime());
+ babyQuery.setHospitalId(hospitalId);
+ List models = earBabyService.queryBabyPatientExtendEarBaby(babyQuery);
+
+ List babyIds = new ArrayList<>();
+ if (CollectionUtils.isEmpty(models) && (StringUtils.isNotEmpty(hdReq.getKeyWord()) || hdReq.getBirthStartTime() != null || hdReq.getBirthEndTime() != null)) {
+ return new BaseListResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
+ }
+
+ if (CollectionUtils.isNotEmpty(models)) {
+ for (BabyPatientExtendEarBaby pa : models) {
+ babyIds.add(pa.getBabyPatientId());
+ }
+ query.setBabyIds(babyIds.toArray(new String[babyIds.size()]));
+ }
+
+
//设置确诊
query.setIsconfirm(1);
query.setIfdel(0);
- if (hdReq.getConfirmDegree() != null) {//模糊查询确诊结果
+ if (hdReq.getConfirmResult() != null) {//模糊查询确诊结果
List cfList = new ArrayList<>();
- if (hdReq.getConfirmDegree() == 1) {//轻度
+ if (hdReq.getConfirmResult() == 1) {//轻度
cfList.add(",1,");
cfList.add(",2,");
cfList.add(",3,");
- } else if (hdReq.getConfirmDegree() == 2) {//中度
+ } else if (hdReq.getConfirmResult() == 2) {//中度
cfList.add(",4,");
cfList.add(",5,");
cfList.add(",6,");
- } else if (hdReq.getConfirmDegree() == 3) {//重度
+ } else if (hdReq.getConfirmResult() == 3) {//重度
cfList.add(",7,");
cfList.add(",8,");
cfList.add(",9,");
cfList.add(",10,");
cfList.add(",11,");
cfList.add(",12,");
- } else if (hdReq.getConfirmDegree() == 4) {//极重度
+ } else if (hdReq.getConfirmResult() == 4) {//极重度
cfList.add(",13,");
cfList.add(",14,");
cfList.add(",15,");
@@ -459,19 +480,21 @@ public class HearDiagnManageController extends BaseController {
if (loginState == null) {
return new BaseResponse().setErrorcode(ErrorCodeConstants.TOKEN_EXPIRE).setErrormsg("请重新登录");
}
-//当前登录人医院Id
+ //当前登录人医院Id
String hospitalId = autoMatchFacade.getHospitalId(loginState.getId());
List babyIds = new ArrayList<>();
BabyPatientExtendEarScreenQuery screenQuery = new BabyPatientExtendEarScreenQuery();
+
BabyPatientExtendEarBabyQuery babyQuery = new BabyPatientExtendEarBabyQuery();
babyQuery.setQueryNo(model.getKeyWord());
babyQuery.setBirthStart(model.getBirthStartTime());
babyQuery.setBirthEnd(model.getBirthEndTime());
babyQuery.setHospitalId(hospitalId);
List models = earBabyService.queryBabyPatientExtendEarBaby(babyQuery);
- if (CollectionUtils.isEmpty(models) && (StringUtils.isNotEmpty(model.getKeyWord()) || model.getBirthStartTime() == null || model.getBirthEndTime() == null)) {
+
+ if (CollectionUtils.isEmpty(models) && (StringUtils.isNotEmpty(model.getKeyWord()) || model.getBirthStartTime() != null || model.getBirthEndTime() != null)) {
return new BaseListResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
}
@@ -482,7 +505,6 @@ public class HearDiagnManageController extends BaseController {
screenQuery.setBabyIds(babyIds.toArray(new String[babyIds.size()]));
}
-
//听筛开始时间
if (model.getSecrStartTime() != null) {
screenQuery.setScreenStartDate(model.getSecrStartTime());
@@ -890,26 +912,24 @@ public class HearDiagnManageController extends BaseController {
babyQuery.setBirthStart(end);
}
+
babyQuery.setHospitalId(hospitalId);
babyQuery.setNoEnable("0");
- List babyModels = earBabyService.queryBabyPatientExtendEarBaby(babyQuery);
List babyIds = new ArrayList<>();
- for (BabyPatientExtendEarBaby babyModel : babyModels) {
- babyIds.add(babyModel.getBabyPatientId());
+ //如果查询号不为空,根据查询号查询儿童档案表,获取儿童档案Id
+ if (StringUtils.isNotEmpty(model.getKeyWord())) {//关键字:姓名、联系方式、就诊卡 查询babyId
+ babyQuery.setQueryNo(model.getKeyWord());
+ babyQuery.setHospitalId(hospitalId);
}
+ List babyModels = earBabyService.queryBabyPatientExtendEarBaby(babyQuery);
-//根据儿童条件查询如果为空
- if (CollectionUtils.isEmpty(babyIds) && (model.getMonthAgeStart() != null || model.getMonthAgeEnd() != null || StringUtils.isNotEmpty(model.getKeyWord()) || model.getBirthStartTime() != null || model.getBirthEndTime() != null)) {
- BaseListResponse result = new BaseListResponse();
- result.setData(new ArrayList());
- result.setErrorcode(0);
- return result;
+ for (BabyPatientExtendEarBaby babyModel : babyModels) {
+ babyIds.add(babyModel.getBabyPatientId());
}
-
//查询儿童听筛记录
BabyPatientExtendEarScreenQuery screenQuery = new BabyPatientExtendEarScreenQuery();
//检测医生ID
@@ -918,6 +938,14 @@ public class HearDiagnManageController extends BaseController {
}
screenQuery.setCheckHospitalId(hospitalId);
+ //根据儿童条件查询如果为空
+ if (CollectionUtils.isEmpty(babyIds) && (model.getMonthAgeStart() != null || model.getMonthAgeEnd() != null || StringUtils.isNotEmpty(model.getKeyWord()) || model.getBirthStartTime() != null || model.getBirthEndTime() != null)) {
+ BaseListResponse result = new BaseListResponse();
+ result.setData(new ArrayList());
+ result.setErrorcode(0);
+ return result;
+ }
+
//查询全部数据
List earScreens = screenService.queryBabyPatientExtendEarScreen(screenQuery);
Map screenMap = new HashMap<>();
@@ -927,6 +955,15 @@ public class HearDiagnManageController extends BaseController {
}
}
+ //听筛医生不为空
+ if (CollectionUtils.isEmpty(earScreens)&&model.getDiagnDoctorId() != null) {
+ BaseListResponse result = new BaseListResponse();
+ result.setData(new ArrayList());
+ result.setErrorcode(0);
+ return result;
+ }
+
+
//要返回的数据
List hdmResult = new ArrayList<>();
@@ -942,6 +979,13 @@ public class HearDiagnManageController extends BaseController {
hdm.setBirthday(com.lyms.platform.common.utils.StringUtils.emptyDeal(DateUtil.getyyyy_MM_dd(ear.getBirth())));
hdm.setSex(com.lyms.platform.common.utils.StringUtils.emptyDeal(SexEnum.getTextById(ear.getSex())));
BabyPatientExtendEarScreen es = screenMap.get(ear.getBabyPatientId());
+
+ if(es==null){
+ if (model.getDiagnDoctorId() != null) {//筛查医生查询条件不为空,没找到则跳过
+ continue;
+ }
+ }
+
if (es != null) {
hdm.setId(es.getId());
String docotorId = es.getCheckDoctorId();
diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/FollowUpOneResult.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/FollowUpOneResult.java
index 9b689d5..bdebba5 100644
--- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/FollowUpOneResult.java
+++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/FollowUpOneResult.java
@@ -120,6 +120,18 @@ public class FollowUpOneResult {
* 当前月龄
*/
private String cMonthAge;
+ /**
+ * 下次随访月龄
+ */
+ private String nextTimeMouseAge;
+
+ public String getNextTimeMouseAge() {
+ return nextTimeMouseAge;
+ }
+
+ public void setNextTimeMouseAge(String nextTimeMouseAge) {
+ this.nextTimeMouseAge = nextTimeMouseAge;
+ }
public String getVerdict() {
return verdict;