Commit e7a675a3cb3d648d2f70bf6ff1db3acbf4242cbc
1 parent
9dfe93bbd8
Exists in
dev
产妇建档
Showing 6 changed files with 115 additions and 16 deletions
- platform-biz-service/src/main/java/com/lyms/platform/permission/model/MedicalRecordVo.java
- platform-biz-service/src/main/resources/mainOrm/master/AppointmentMapper.xml
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MedicalRecordFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientServiceFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/QuanChanResult.java
platform-biz-service/src/main/java/com/lyms/platform/permission/model/MedicalRecordVo.java
View file @
e7a675a
| ... | ... | @@ -77,6 +77,58 @@ |
| 77 | 77 | /** 创建时间 */ |
| 78 | 78 | private String created; |
| 79 | 79 | |
| 80 | + private String height; | |
| 81 | + | |
| 82 | + private String weight; | |
| 83 | + | |
| 84 | + // 诊断标签 | |
| 85 | + private String mdtrtTag; | |
| 86 | + | |
| 87 | + // 主管医生 | |
| 88 | + private String mainDoctor; | |
| 89 | + | |
| 90 | + // 建档标志 | |
| 91 | + private String patientsType; | |
| 92 | + | |
| 93 | + public String getPatientsType() { | |
| 94 | + return patientsType; | |
| 95 | + } | |
| 96 | + | |
| 97 | + public void setPatientsType(String patientsType) { | |
| 98 | + this.patientsType = patientsType; | |
| 99 | + } | |
| 100 | + | |
| 101 | + public String getMdtrtTag() { | |
| 102 | + return mdtrtTag; | |
| 103 | + } | |
| 104 | + | |
| 105 | + public void setMdtrtTag(String mdtrtTag) { | |
| 106 | + this.mdtrtTag = mdtrtTag; | |
| 107 | + } | |
| 108 | + | |
| 109 | + public String getMainDoctor() { | |
| 110 | + return mainDoctor; | |
| 111 | + } | |
| 112 | + | |
| 113 | + public void setMainDoctor(String mainDoctor) { | |
| 114 | + this.mainDoctor = mainDoctor; | |
| 115 | + } | |
| 116 | + | |
| 117 | + public String getHeight() { | |
| 118 | + return height; | |
| 119 | + } | |
| 120 | + | |
| 121 | + public void setHeight(String height) { | |
| 122 | + this.height = height; | |
| 123 | + } | |
| 124 | + | |
| 125 | + public String getWeight() { | |
| 126 | + return weight; | |
| 127 | + } | |
| 128 | + | |
| 129 | + public void setWeight(String weight) { | |
| 130 | + this.weight = weight; | |
| 131 | + } | |
| 80 | 132 | |
| 81 | 133 | public String getBabyWeight() { |
| 82 | 134 | return babyWeight; |
platform-biz-service/src/main/resources/mainOrm/master/AppointmentMapper.xml
View file @
e7a675a
| ... | ... | @@ -303,17 +303,17 @@ |
| 303 | 303 | <if test="department != null and department != ''"> |
| 304 | 304 | DEPARTMENT = #{department}, |
| 305 | 305 | </if> |
| 306 | - <if test="diagnosis != null and diagnosis != ''"> | |
| 307 | - DIAGNOSIS = #{diagnosis}, | |
| 306 | + <if test="mdtrtTag != null and mdtrtTag != ''"> | |
| 307 | + mdtrt_tag = #{mdtrtTag}, | |
| 308 | 308 | </if> |
| 309 | - <if test="diagnosisCode != null and diagnosisCode != ''"> | |
| 310 | - DIAGNOSIS_CODE = #{diagnosisCode}, | |
| 309 | + <if test="mainDoctor != null and mainDoctor != ''"> | |
| 310 | + main_doctor = #{mainDoctor}, | |
| 311 | 311 | </if> |
| 312 | - <if test="operation != null and operation != ''"> | |
| 313 | - OPERATION = #{operation}, | |
| 312 | + <if test="weight != null and weight != ''"> | |
| 313 | + weight = #{weight}, | |
| 314 | 314 | </if> |
| 315 | - <if test="operationCode != null and operationCode != ''"> | |
| 316 | - OPERATION_CODE = #{operationCode}, | |
| 315 | + <if test="height != null and height != ''"> | |
| 316 | + height = #{height}, | |
| 317 | 317 | </if> |
| 318 | 318 | <if test="medicine != null and medicine != ''"> |
| 319 | 319 | MEDICINE = #{medicine}, |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MedicalRecordFacade.java
View file @
e7a675a
| ... | ... | @@ -45,6 +45,14 @@ |
| 45 | 45 | if(CollectionUtils.isEmpty(medicalRecordVoList)){ |
| 46 | 46 | return new BaseListResponse().setData(medicalRecordVoList).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("未查询到有效数据"); |
| 47 | 47 | } |
| 48 | + | |
| 49 | + for (MedicalRecordVo recordVo : medicalRecordVoList) { | |
| 50 | + if("0".equals(recordVo.getPatientsType())){ | |
| 51 | + recordVo.setPatientsType("已建档"); | |
| 52 | + }else{ | |
| 53 | + recordVo.setPatientsType("为建档"); | |
| 54 | + } | |
| 55 | + } | |
| 48 | 56 | PageInfo pageInfo = new PageInfo(); |
| 49 | 57 | pageInfo.setCount(medicalRecordVo.getCount()); |
| 50 | 58 | pageInfo.setPage(medicalRecordVo.getPage()); |
| ... | ... | @@ -61,7 +69,12 @@ |
| 61 | 69 | if(CollectionUtils.isEmpty(medicalRecordVoList)){ |
| 62 | 70 | return new BaseListResponse().setData(medicalRecordVoList).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("未查询到有效数据"); |
| 63 | 71 | } |
| 64 | - return new BaseObjectResponse().setData(medicalRecordVoList.get(0)).setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS); | |
| 72 | + MedicalRecordVo recordVo = medicalRecordVoList.get(0); | |
| 73 | + String age1 = recordVo.getAge().substring(0,8); | |
| 74 | + Date date = DateUtil.parseYYYYMMDD(age1); | |
| 75 | + int age = DateUtil.getYearSpace(new Date(),date); | |
| 76 | + recordVo.setAge(String.valueOf(age)); | |
| 77 | + return new BaseObjectResponse().setData(recordVo).setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS); | |
| 65 | 78 | } |
| 66 | 79 | |
| 67 | 80 | |
| ... | ... | @@ -112,11 +125,15 @@ |
| 112 | 125 | patientsService.addPatient(patient); |
| 113 | 126 | |
| 114 | 127 | // 更新诊断 |
| 115 | - MedicalRecordVo insertVo = new MedicalRecordVo(); | |
| 116 | - insertVo.setModified(DateUtil.getyyyy_MM_dd_hms(new Date())); | |
| 117 | - insertVo.setCardNo(medicalRecordVo.getCardNo()); | |
| 118 | - insertVo.setDiagnosis(medicalRecordVo.getDiagnosis()); | |
| 119 | - appointmentService.updateMedicalRecord(insertVo); | |
| 128 | + MedicalRecordVo updateVo = new MedicalRecordVo(); | |
| 129 | + updateVo.setModified(DateUtil.getyyyy_MM_dd_hms(new Date())); | |
| 130 | + updateVo.setCardNo(medicalRecordVo.getCardNo()); | |
| 131 | + updateVo.setMdtrtTag(medicalRecordVo.getMdtrtTag()); | |
| 132 | + updateVo.setMainDoctor(medicalRecordVo.getMainDoctor()); | |
| 133 | + updateVo.setHeight(medicalRecordVo.getHeight()); | |
| 134 | + updateVo.setWeight(medicalRecordVo.getWeight()); | |
| 135 | + updateVo.setPatientsType("0"); | |
| 136 | + appointmentService.updateMedicalRecord(updateVo); | |
| 120 | 137 | return new BaseResponse().setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS); |
| 121 | 138 | } |
| 122 | 139 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java
View file @
e7a675a
| ... | ... | @@ -822,7 +822,7 @@ |
| 822 | 822 | data = convertToQuanPatient(patientses, userId, hospital); |
| 823 | 823 | //处理全部产妇 |
| 824 | 824 | } else if (type == 3) { |
| 825 | - data = convertToQuanCPatient(patientses, userId, hospital); | |
| 825 | + data = convertToQuanCPatient(patientses, userId, hospital,type); | |
| 826 | 826 | } |
| 827 | 827 | } |
| 828 | 828 | // if (StringUtils.isNotEmpty(hospital)) { |
| ... | ... | @@ -2190,7 +2190,7 @@ |
| 2190 | 2190 | * @param patientses 符合条件的产妇 |
| 2191 | 2191 | * @return |
| 2192 | 2192 | */ |
| 2193 | - private List convertToQuanCPatient(List <Patients> patientses, Integer userId, String hospital) { | |
| 2193 | + private List convertToQuanCPatient(List <Patients> patientses, Integer userId, String hospital,Integer type) { | |
| 2194 | 2194 | List <QuanChanResult> data = new ArrayList <>(); |
| 2195 | 2195 | |
| 2196 | 2196 | int batchSize = 4; |
| ... | ... | @@ -2222,6 +2222,22 @@ |
| 2222 | 2222 | result.setRealPhone(StringUtils.encryPhone(result.getRealPhone())); |
| 2223 | 2223 | } |
| 2224 | 2224 | } |
| 2225 | + | |
| 2226 | + if(CollectionUtils.isNotEmpty(data) && hospital.equals("2100002419") && type == 3){ | |
| 2227 | + for(QuanChanResult result: data){ | |
| 2228 | + MedicalRecordVo medicalRecordVo = new MedicalRecordVo(); | |
| 2229 | + medicalRecordVo.setCardNo(result.getCardNo()); | |
| 2230 | + List<MedicalRecordVo> queryList = appointmentService.queryList(medicalRecordVo); | |
| 2231 | + if(CollectionUtils.isNotEmpty(queryList)){ | |
| 2232 | + if(StringUtils.isNotEmpty(queryList.get(0).getMdtrtTag())){ | |
| 2233 | + result.setMdtrtTag(queryList.get(0).getMdtrtTag()); | |
| 2234 | + } | |
| 2235 | + } | |
| 2236 | + } | |
| 2237 | + } | |
| 2238 | + | |
| 2239 | + | |
| 2240 | + | |
| 2225 | 2241 | return data; |
| 2226 | 2242 | } |
| 2227 | 2243 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientServiceFacade.java
View file @
e7a675a
| ... | ... | @@ -733,6 +733,9 @@ |
| 733 | 733 | } |
| 734 | 734 | |
| 735 | 735 | Date lastMenses = patients.getLastMenses(); |
| 736 | + if(patients.getLastMenses() == null){ | |
| 737 | + lastMenses = patients.getFmDate(); | |
| 738 | + } | |
| 736 | 739 | Integer serviceWeek = pser.getServiceWeek(); |
| 737 | 740 | Integer doctorService = pser.getDoctorWeek(); |
| 738 | 741 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/QuanChanResult.java
View file @
e7a675a
| ... | ... | @@ -130,6 +130,17 @@ |
| 130 | 130 | //领劵社区 |
| 131 | 131 | private String couponCommunity; |
| 132 | 132 | |
| 133 | + // 诊断标签 | |
| 134 | + private String mdtrtTag; | |
| 135 | + | |
| 136 | + public String getMdtrtTag() { | |
| 137 | + return mdtrtTag; | |
| 138 | + } | |
| 139 | + | |
| 140 | + public void setMdtrtTag(String mdtrtTag) { | |
| 141 | + this.mdtrtTag = mdtrtTag; | |
| 142 | + } | |
| 143 | + | |
| 133 | 144 | public String getLiveType() { |
| 134 | 145 | return liveType; |
| 135 | 146 | } |