Commit aee12ce050bbf30f4b66fa8c8b9353ab6b0e9457
Exists in
master
Merge remote-tracking branch 'origin/master'
Showing 11 changed files
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/AntExRecordService.java
- platform-dal/src/main/java/com/lyms/platform/query/AntExRecordQuery.java
- platform-operate-api/src/main/java/com/lyms/hospitalapi/qinglongxian/QingLongXianHisService.java
- platform-operate-api/src/main/java/com/lyms/hospitalapi/v2/HisService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ApplyOrderFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PostReviewFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/AntExManagerResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyApplyOrderResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/SieveListResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/GrowthCountTask.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/AntExRecordService.java
View file @
aee12ce
| ... | ... | @@ -210,6 +210,8 @@ |
| 210 | 210 | antExRecordModel.setCheckTime(antEx.getCheckDate()); |
| 211 | 211 | antExRecordModel.setPid(antEx.getPid()); |
| 212 | 212 | antExRecordModel.setModified(new Date()); |
| 213 | + antExRecordModel.setBarCode(antEx.getBarCode()); | |
| 214 | + antExRecordModel.setNextCheckTime(antEx.getNextCheckTime()); | |
| 213 | 215 | Patients patients = patientsService.findOnePatientById(antEx.getParentId()); |
| 214 | 216 | if (null != patients) { |
| 215 | 217 | if (patients.getType() == 1) { |
| ... | ... | @@ -217,6 +219,14 @@ |
| 217 | 219 | } else { |
| 218 | 220 | antExRecordModel.setStatus(1); |
| 219 | 221 | } |
| 222 | + antExRecordModel.setAddressRegister(patients.getAddressRegister()); | |
| 223 | + antExRecordModel.setProvinceRegisterId(patients.getProvinceRegisterId()); | |
| 224 | + antExRecordModel.setCityRegisterId(patients.getCityRegisterId()); | |
| 225 | + antExRecordModel.setAreaRegisterId(patients.getAreaRegisterId()); | |
| 226 | + antExRecordModel.setStreetRegisterId(patients.getStreetRegisterId()); | |
| 227 | + antExRecordModel.setBuildDoctor(patients.getBookbuildingDoctor()); | |
| 228 | + antExRecordModel.setDueDate(patients.getDueDate()); | |
| 229 | + antExRecordModel.setPhone(patients.getPhone()); | |
| 220 | 230 | antExRecordModel.setBrith(patients.getBirth()); |
| 221 | 231 | antExRecordModel.setBuildTime(patients.getBookbuildingDate()); |
| 222 | 232 | antExRecordModel.setLastMenses(patients.getLastMenses()); |
| ... | ... | @@ -241,6 +251,8 @@ |
| 241 | 251 | antExRecordModel.setfId(antExChuModel.getId()); |
| 242 | 252 | antExRecordModel.setPid(antExChuModel.getPid()); |
| 243 | 253 | antExRecordModel.setModified(new Date()); |
| 254 | + antExRecordModel.setBarCode(antExChuModel.getBarCode()); | |
| 255 | + antExRecordModel.setNextCheckTime(antExChuModel.getNextCheckTime()); | |
| 244 | 256 | Patients patients = patientsService.findOnePatientById(antExChuModel.getParentId()); |
| 245 | 257 | if (null != patients) { |
| 246 | 258 | if (patients.getType() == 1) { |
| 247 | 259 | |
| 248 | 260 | |
| ... | ... | @@ -248,10 +260,18 @@ |
| 248 | 260 | } else { |
| 249 | 261 | antExRecordModel.setStatus(1); |
| 250 | 262 | } |
| 251 | - antExRecordModel.setLastMenses(patients.getLastMenses()); | |
| 252 | - antExRecordModel.setBuildTime(patients.getBookbuildingDate()); | |
| 263 | + antExRecordModel.setAddressRegister(patients.getAddressRegister()); | |
| 264 | + antExRecordModel.setProvinceRegisterId(patients.getProvinceRegisterId()); | |
| 265 | + antExRecordModel.setCityRegisterId(patients.getCityRegisterId()); | |
| 266 | + antExRecordModel.setAreaRegisterId(patients.getAreaRegisterId()); | |
| 267 | + antExRecordModel.setStreetRegisterId(patients.getStreetRegisterId()); | |
| 268 | + antExRecordModel.setBuildDoctor(patients.getBookbuildingDoctor()); | |
| 253 | 269 | antExRecordModel.setDueDate(patients.getDueDate()); |
| 270 | + antExRecordModel.setPhone(patients.getPhone()); | |
| 254 | 271 | antExRecordModel.setBrith(patients.getBirth()); |
| 272 | + antExRecordModel.setBuildTime(patients.getBookbuildingDate()); | |
| 273 | + antExRecordModel.setLastMenses(patients.getLastMenses()); | |
| 274 | + antExRecordModel.setDueDate(patients.getDueDate()); | |
| 255 | 275 | antExRecordModel.setName(patients.getUsername()); |
| 256 | 276 | antExRecordModel.sethScore(patients.getRiskScore()); |
| 257 | 277 | antExRecordModel.sethRisk(patients.getRiskFactorId()); |
platform-dal/src/main/java/com/lyms/platform/query/AntExRecordQuery.java
View file @
aee12ce
| ... | ... | @@ -223,6 +223,10 @@ |
| 223 | 223 | if (null != id) { |
| 224 | 224 | condition = condition.and("id", id, MongoOper.IS); |
| 225 | 225 | } |
| 226 | + | |
| 227 | + if (null != name) { | |
| 228 | + condition = condition.and("name", name, MongoOper.IS); | |
| 229 | + } | |
| 226 | 230 | if (StringUtils.isNotEmpty(levelId)) { |
| 227 | 231 | condition = condition.and("hLevel", levelId, MongoOper.IN); |
| 228 | 232 | } |
platform-operate-api/src/main/java/com/lyms/hospitalapi/qinglongxian/QingLongXianHisService.java
View file @
aee12ce
| ... | ... | @@ -48,12 +48,25 @@ |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | public List<Map<String,Object>> getPatientInfoList(String cardNo){ |
| 51 | + | |
| 52 | + String sql = "SELECT '门诊' SICKTYPE, T.BRID SICK_ID, T.XM NAME, CASE WHEN XB = '01' THEN '男' "+ | |
| 53 | + " WHEN XB = '02' THEN '女' ELSE '未知' END SEX, T.CSRQ BIRTHDATE, S.JZKH IC_CARD_ID, "+ | |
| 54 | + " N.JZID NULLAH_NUMBER, T.LXR ASSOCIATION_NAME, "+ | |
| 55 | + " CASE WHEN T.LXRDH IS NULL THEN T.JTDH "+ | |
| 56 | + " ELSE T.LXRDH END ASSOCIATION_PHONE "+ | |
| 57 | + " FROM GY_EPMI T "+ | |
| 58 | + " LEFT JOIN MZYKT_STATUS S "+ | |
| 59 | + " ON T.BRID = S.BRID "+ | |
| 60 | + " LEFT JOIN MZYS_JZXX_MAIN N "+ | |
| 61 | + " ON T.BRID = N.BRID "+ | |
| 62 | + " WHERE S.ZT = '1' and S.JZKH='"+cardNo+"' "; | |
| 51 | 63 | List<Map<String,Object>> result = new ArrayList<>(); |
| 52 | 64 | if (StringUtils.isNotBlank(cardNo)) { |
| 53 | 65 | Connection conn = ConnTools.makeHisConnection(); |
| 54 | 66 | QueryRunner queryRunner = new QueryRunner(); |
| 55 | 67 | try { |
| 56 | - List<XinlePregPatientinfo> list = queryRunner.query(conn, "select * from v_patientinfo where IC_CARD_ID = '"+cardNo+"'", new BeanListHandler<XinlePregPatientinfo>(XinlePregPatientinfo.class)); | |
| 68 | + // List<XinlePregPatientinfo> list = queryRunner.query(conn, "select * from v_patientinfo where IC_CARD_ID = '"+cardNo+"'", new BeanListHandler<XinlePregPatientinfo>(XinlePregPatientinfo.class)); | |
| 69 | + List<XinlePregPatientinfo> list = queryRunner.query(conn, sql, new BeanListHandler<XinlePregPatientinfo>(XinlePregPatientinfo.class)); | |
| 57 | 70 | if (list.size() > 0) { |
| 58 | 71 | for (XinlePregPatientinfo info:list) { |
| 59 | 72 | Map<String,Object> map = new HashMap<>(); |
platform-operate-api/src/main/java/com/lyms/hospitalapi/v2/HisService.java
View file @
aee12ce
| ... | ... | @@ -195,6 +195,12 @@ |
| 195 | 195 | return result; |
| 196 | 196 | } |
| 197 | 197 | |
| 198 | + /** | |
| 199 | + * 新乐读取孕妇基本信息his接口 | |
| 200 | + * v_preg_patientinfo为his提供的试图 | |
| 201 | + * @param cardNo | |
| 202 | + * @return | |
| 203 | + */ | |
| 198 | 204 | public Map<String,Object> getPatientInfo(String cardNo){ |
| 199 | 205 | Map<String,Object> map = new HashMap<>(); |
| 200 | 206 | if (StringUtils.isNotBlank(cardNo)) { |
| ... | ... | @@ -221,6 +227,12 @@ |
| 221 | 227 | return map; |
| 222 | 228 | } |
| 223 | 229 | |
| 230 | + /** | |
| 231 | + * 新乐读取孕妇基本信息his接口 | |
| 232 | + * v_preg_patientinfo为his提供的试图 | |
| 233 | + * @param cardNo | |
| 234 | + * @return | |
| 235 | + */ | |
| 224 | 236 | public List<Map<String,Object>> getPatientInfoList(String cardNo){ |
| 225 | 237 | List<Map<String,Object>> result = new ArrayList<>(); |
| 226 | 238 | if (StringUtils.isNotBlank(cardNo)) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ApplyOrderFacade.java
View file @
aee12ce
| ... | ... | @@ -83,7 +83,7 @@ |
| 83 | 83 | |
| 84 | 84 | String hospital = autoMatchFacade.getHospitalId(userId); |
| 85 | 85 | //表示区域的 |
| 86 | - if (StringUtils.isNotEmpty(groupsFacade.findByCurrentUserId(hospital))) { | |
| 86 | + if (StringUtils.isNotEmpty(groupsFacade.findByCurrentUserId(hospital))&&type==2) { | |
| 87 | 87 | String parentId = antenatalExaminationFacade.handHideBuild(referralApplyOrderAddRequest.getPid(), referralApplyOrderAddRequest.getParentId(), userId,-1); |
| 88 | 88 | if (StringUtils.isEmpty(parentId)) { |
| 89 | 89 | //打印日志 |
| 90 | 90 | |
| 91 | 91 | |
| 92 | 92 | |
| ... | ... | @@ -202,19 +202,23 @@ |
| 202 | 202 | } |
| 203 | 203 | referralApplyOrderModel.setDays(DateUtil.getBabyMonthAge1(babyModel.getBirth(), new Date())); |
| 204 | 204 | referralApplyOrderModel.setDueWeek(new Date()); |
| 205 | - Patients patients = patientsService.findOnePatientById(babyModel.getParentId()); | |
| 205 | + if(StringUtils.isNotEmpty(babyModel.getParentId())){ | |
| 206 | + Patients patients = patientsService.findOnePatientById(babyModel.getParentId()); | |
| 207 | + referralApplyOrderModel.setMname(patients.getUsername()); | |
| 208 | + referralApplyOrderModel.setPhone(patients.getPhone()); | |
| 209 | + referralApplyOrderModel.setmCardNo(patients.getCardNo()); | |
| 210 | + } | |
| 206 | 211 | referralApplyOrderModel.setParentId(babyModel.getId()); |
| 207 | - referralApplyOrderModel.setMname(patients.getUsername()); | |
| 208 | 212 | referralApplyOrderModel.setAge(DateUtil.getAge(babyModel.getBirth())); |
| 209 | 213 | referralApplyOrderModel.setBirth(babyModel.getBirth()); |
| 210 | 214 | referralApplyOrderModel.setDueDate(babyModel.getDueDate()); |
| 211 | 215 | referralApplyOrderModel.setName(babyModel.getName()); |
| 212 | - referralApplyOrderModel.setPhone(patients.getPhone()); | |
| 216 | + | |
| 213 | 217 | referralApplyOrderModel.setSex(babyModel.getSex()); |
| 214 | 218 | referralApplyOrderModel.setCardNo(babyModel.getCardNo()); |
| 215 | 219 | referralApplyOrderModel.setExpVip(babyModel.getExpVip()); |
| 216 | 220 | referralApplyOrderModel.setPid(babyModel.getPid()); |
| 217 | - referralApplyOrderModel.setmCardNo(patients.getCardNo()); | |
| 221 | + | |
| 218 | 222 | referralApplyOrderModel.setServiceType(ServiceTypeEnums.STANDARD_SERVICE.getId()); |
| 219 | 223 | List<String> diagnoseList = babyCheckFacade.getBabyLastDiagnose(babyModel.getPid()); |
| 220 | 224 | List lsit = new ArrayList(); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
aee12ce
| ... | ... | @@ -2161,7 +2161,6 @@ |
| 2161 | 2161 | babyQuery.setHospitalId(hospitalId); |
| 2162 | 2162 | |
| 2163 | 2163 | babyQuery.setYn(YnEnums.YES.getId()); |
| 2164 | - Date currentDate = DateUtil.formatDate(new Date()); | |
| 2165 | 2164 | |
| 2166 | 2165 | if (StringUtils.isNotEmpty(request.getBirth())) |
| 2167 | 2166 | { |
| 2168 | 2167 | |
| 2169 | 2168 | |
| ... | ... | @@ -2172,14 +2171,13 @@ |
| 2172 | 2171 | } |
| 2173 | 2172 | if (request.getMonthAgeStart() != null) |
| 2174 | 2173 | { |
| 2175 | - Date start = DateUtil.addMonth(currentDate, -request.getMonthAgeStart()); | |
| 2176 | - babyQuery.setCheckDateEnd(start); | |
| 2174 | + babyQuery.setCheckMonthStart(request.getMonthAgeStart()); | |
| 2177 | 2175 | } |
| 2178 | 2176 | if (request.getMonthAgeEnd() != null) |
| 2179 | 2177 | { |
| 2180 | - Date end = DateUtil.addDay(DateUtil.addMonth(currentDate, -request.getMonthAgeEnd() - 1), 1); | |
| 2181 | - babyQuery.setCheckDateStart(end); | |
| 2178 | + babyQuery.setCheckMonthEnd(request.getMonthAgeEnd()); | |
| 2182 | 2179 | } |
| 2180 | + | |
| 2183 | 2181 | List<BabyGrowthCountResult> result = new ArrayList<>(); |
| 2184 | 2182 | |
| 2185 | 2183 | Map<String,List<BabyGrowthCountResult>> mapItems = getCountGroupItemMaps(); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PostReviewFacade.java
View file @
aee12ce
| ... | ... | @@ -117,6 +117,8 @@ |
| 117 | 117 | postReviewModel.setYn(YnEnums.YES.getId()); |
| 118 | 118 | postReviewModel.setHospitalId(hospital); |
| 119 | 119 | Patients patients = patientsService.findOnePatientById(postReviewRequest.getParentId()); |
| 120 | + patients.setLastCheckEmployeeId(postReviewModel.getProdDoctor()); | |
| 121 | + patientsService.updatePatient(patients); | |
| 120 | 122 | if (StringUtils.isNotEmpty(postReviewRequest.getDueDate())) { |
| 121 | 123 | patients.setFmDate(DateUtil.parseYMD(postReviewRequest.getDueDate())); |
| 122 | 124 | patients.setType(3); |
| ... | ... | @@ -141,6 +143,7 @@ |
| 141 | 143 | patientsService.updatePatient(patients2); |
| 142 | 144 | } |
| 143 | 145 | |
| 146 | + patientsService.updatePatientOneCol(patients.getId(), com.lyms.platform.common.utils.StringUtils.isEmpty(postReviewRequest.getNextCheckTime()) == true ? null : DateUtil.parseYMD(postReviewRequest.getNextCheckTime())); | |
| 144 | 147 | |
| 145 | 148 | if (null != patients.getBuildType() && patients.getBuildType() == 3) { |
| 146 | 149 | ReferralApplyOrderQuery referralApplyOrderQuery = new ReferralApplyOrderQuery(); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/AntExManagerResult.java
View file @
aee12ce
| ... | ... | @@ -17,7 +17,9 @@ |
| 17 | 17 | * Created by Administrator on 2016/12/19 0019. |
| 18 | 18 | */ |
| 19 | 19 | public class AntExManagerResult { |
| 20 | + | |
| 20 | 21 | private String id; |
| 22 | + private String pid; | |
| 21 | 23 | private String parentId; |
| 22 | 24 | //产检日期 |
| 23 | 25 | private String checkTime; |
| ... | ... | @@ -57,6 +59,14 @@ |
| 57 | 59 | //产次 |
| 58 | 60 | private int cTimes=1; |
| 59 | 61 | |
| 62 | + public String getPid() { | |
| 63 | + return pid; | |
| 64 | + } | |
| 65 | + | |
| 66 | + public void setPid(String pid) { | |
| 67 | + this.pid = pid; | |
| 68 | + } | |
| 69 | + | |
| 60 | 70 | public int getcTimes() { |
| 61 | 71 | return cTimes; |
| 62 | 72 | } |
| ... | ... | @@ -90,6 +100,7 @@ |
| 90 | 100 | } |
| 91 | 101 | |
| 92 | 102 | public AntExManagerResult convertToResult(AntExRecordModel e) { |
| 103 | + setPid(e.getPid()); | |
| 93 | 104 | setParentId(e.getParentId()); |
| 94 | 105 | setId(e.getId()); |
| 95 | 106 | setCheckTime(DateUtil.getyyyy_MM_dd(e.getCheckTime())); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyApplyOrderResult.java
View file @
aee12ce
| ... | ... | @@ -155,7 +155,9 @@ |
| 155 | 155 | setName(referralApplyOrderModel.getName()); |
| 156 | 156 | setBabyId(referralApplyOrderModel.getParentId()); |
| 157 | 157 | setmName(referralApplyOrderModel.getMname()); |
| 158 | - setSex(SexEnum.getTextById(referralApplyOrderModel.getSex())); | |
| 158 | + if(null!=referralApplyOrderModel.getSex()){ | |
| 159 | + setSex(SexEnum.getTextById(referralApplyOrderModel.getSex())); | |
| 160 | + } | |
| 159 | 161 | setPhone(StringUtils.encryPhone(referralApplyOrderModel.getPhone())); |
| 160 | 162 | |
| 161 | 163 | setRealPhone(referralApplyOrderModel.getPhone()); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/SieveListResult.java
View file @
aee12ce
| ... | ... | @@ -23,6 +23,17 @@ |
| 23 | 23 | private String age; |
| 24 | 24 | //当前孕周 |
| 25 | 25 | private String cDueWeek; |
| 26 | + //当前孕周 | |
| 27 | + private String cDueWeek2; | |
| 28 | + | |
| 29 | + public String getcDueWeek2() { | |
| 30 | + return cDueWeek2; | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void setcDueWeek2(String cDueWeek2) { | |
| 34 | + this.cDueWeek2 = cDueWeek2; | |
| 35 | + } | |
| 36 | + | |
| 26 | 37 | //胎数 |
| 27 | 38 | private String tireNumber=SPIT; |
| 28 | 39 | |
| ... | ... | @@ -274,6 +285,13 @@ |
| 274 | 285 | if(null!=destModel.getLastMenses()){ |
| 275 | 286 | int days= DateUtil.daysBetween(destModel.getLastMenses(), new Date()); |
| 276 | 287 | this.cDueWeek= StringUtils.dueWeek(days); |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + int week = (days / 7); | |
| 292 | + String str = week + "周"; | |
| 293 | + int day = (days % 7); | |
| 294 | + this.cDueWeek2="孕" + str + (day > 0 ? "+" + day + "天" : ""); | |
| 277 | 295 | } |
| 278 | 296 | if(null!=destModel.getTireNumber()){ |
| 279 | 297 | setTireNumber(TaiShuEnums.getTitle(destModel.getTireNumber() + "")); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/GrowthCountTask.java
View file @
aee12ce
| 1 | 1 | package com.lyms.platform.operate.web.utils; |
| 2 | 2 | |
| 3 | 3 | import com.lyms.platform.biz.service.BabyCheckService; |
| 4 | +import com.lyms.platform.common.enums.YnEnums; | |
| 5 | +import com.lyms.platform.common.utils.DateUtil; | |
| 4 | 6 | import com.lyms.platform.common.utils.ExceptionUtils; |
| 7 | +import com.lyms.platform.common.utils.StringUtils; | |
| 5 | 8 | import com.lyms.platform.operate.web.result.BabyGrowthCountResult; |
| 6 | 9 | import com.lyms.platform.query.BabyCheckModelQuery; |
| 7 | 10 | import org.apache.commons.collections.CollectionUtils; |
| 8 | 11 | |
| 9 | 12 | |
| 10 | 13 | |
| 11 | 14 | |
| ... | ... | @@ -47,20 +50,30 @@ |
| 47 | 50 | @Override |
| 48 | 51 | public List<BabyGrowthCountResult> call() throws Exception { |
| 49 | 52 | |
| 53 | + | |
| 50 | 54 | if (CollectionUtils.isNotEmpty(growths)) |
| 51 | 55 | { |
| 52 | 56 | for(BabyGrowthCountResult grouwth : growths) |
| 53 | 57 | { |
| 58 | + BabyCheckModelQuery babyCheckModelQuery = new BabyCheckModelQuery(); | |
| 59 | + babyCheckModelQuery.setYn(YnEnums.YES.getId()); | |
| 60 | + babyCheckModelQuery.setHospitalId(babyQuery.getHospitalId()); | |
| 61 | + babyCheckModelQuery.setBirthStart(babyQuery.getBirthStart()); | |
| 62 | + babyCheckModelQuery.setBirthEnd(babyQuery.getBirthEnd()); | |
| 63 | + babyCheckModelQuery.setCheckMonthStart(babyQuery.getCheckMonthStart()); | |
| 64 | + babyCheckModelQuery.setCheckMonthEnd(babyQuery.getCheckMonthEnd()); | |
| 65 | + | |
| 66 | + | |
| 54 | 67 | if ("身长".equals(type)) |
| 55 | 68 | { |
| 56 | - babyQuery.setHeightEvaluate(grouwth.getEvaluate()); | |
| 69 | + babyCheckModelQuery.setHeightEvaluate(grouwth.getEvaluate()); | |
| 57 | 70 | } |
| 58 | 71 | else if ("体重".equals(type)) |
| 59 | 72 | { |
| 60 | - babyQuery.setWeightEvaluate(grouwth.getEvaluate()); | |
| 73 | + babyCheckModelQuery.setWeightEvaluate(grouwth.getEvaluate()); | |
| 61 | 74 | } |
| 62 | 75 | grouwth.setTypeName(type); |
| 63 | - int count = babyCheckService.queryBabyCheckCount(babyQuery); | |
| 76 | + int count = babyCheckService.queryBabyCheckCount(babyCheckModelQuery); | |
| 64 | 77 | grouwth.setCount(String.valueOf(count)); |
| 65 | 78 | } |
| 66 | 79 | } |