Commit 9593f72c23d96ee9e17cfd6982323d7c0da0bff0
1 parent
5f42901bbb
Exists in
dev
产妇建档
Showing 5 changed files with 85 additions and 13 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/controller/MedicalRecordController.java
- 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/matnRehabPC/service/impl/MatnRehabServiceImpl.java
platform-biz-service/src/main/java/com/lyms/platform/permission/model/MedicalRecordVo.java
View file @
9593f72
| ... | ... | @@ -90,6 +90,17 @@ |
| 90 | 90 | // 建档标志 |
| 91 | 91 | private String patientsType; |
| 92 | 92 | |
| 93 | + // 哺乳方式 | |
| 94 | + private String feedType; | |
| 95 | + | |
| 96 | + public String getFeedType() { | |
| 97 | + return feedType; | |
| 98 | + } | |
| 99 | + | |
| 100 | + public void setFeedType(String feedType) { | |
| 101 | + this.feedType = feedType; | |
| 102 | + } | |
| 103 | + | |
| 93 | 104 | public String getPatientsType() { |
| 94 | 105 | return patientsType; |
| 95 | 106 | } |
platform-biz-service/src/main/resources/mainOrm/master/AppointmentMapper.xml
View file @
9593f72
| ... | ... | @@ -186,7 +186,8 @@ |
| 186 | 186 | mdtrt_tag as mdtrtTag, |
| 187 | 187 | height, |
| 188 | 188 | weight, |
| 189 | - patients_type as patientsType | |
| 189 | + patients_type as patientsType, | |
| 190 | + feed_type as feedType | |
| 190 | 191 | FROM medical_record |
| 191 | 192 | WHERE 1=1 |
| 192 | 193 | |
| ... | ... | @@ -288,9 +289,6 @@ |
| 288 | 289 | <if test="name != null and name != ''"> |
| 289 | 290 | NAME = #{name}, |
| 290 | 291 | </if> |
| 291 | - <if test="patientsType != null and patientsType != ''"> | |
| 292 | - patients_type = #{patientsType}, | |
| 293 | - </if> | |
| 294 | 292 | <if test="phone != null and phone != ''"> |
| 295 | 293 | PHONE = #{phone}, |
| 296 | 294 | </if> |
| ... | ... | @@ -340,8 +338,11 @@ |
| 340 | 338 | <if test="babyGender != null and babyGender != ''"> |
| 341 | 339 | BABY_GENDER = #{babyGender}, |
| 342 | 340 | </if> |
| 343 | - <if test="matnHistory != null and matnHistory != ''"> | |
| 344 | - MATN_HISTORY = #{matnHistory}, | |
| 341 | + <if test="feedType != null and feedType != ''"> | |
| 342 | + feed_type = #{feedType}, | |
| 343 | + </if> | |
| 344 | + <if test="patientsType != null and patientsType != ''"> | |
| 345 | + patients_type = #{patientsType}, | |
| 345 | 346 | </if> |
| 346 | 347 | |
| 347 | 348 | <!-- 时间戳更新 --> |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/MedicalRecordController.java
View file @
9593f72
| ... | ... | @@ -52,7 +52,7 @@ |
| 52 | 52 | |
| 53 | 53 | |
| 54 | 54 | /** |
| 55 | - * 病案单人信息查询 | |
| 55 | + * 产妇建档 | |
| 56 | 56 | * |
| 57 | 57 | * @return |
| 58 | 58 | */ |
| ... | ... | @@ -62,6 +62,20 @@ |
| 62 | 62 | public BaseResponse saveRecordOne(@Valid @RequestBody MedicalRecordVo medicalRecordVo , HttpServletRequest request) { |
| 63 | 63 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
| 64 | 64 | return medicalRecordFacade.saveRecordOne(medicalRecordVo,loginState.getId()); |
| 65 | + } | |
| 66 | + | |
| 67 | + | |
| 68 | + /** | |
| 69 | + * 建档修改 | |
| 70 | + * | |
| 71 | + * @return | |
| 72 | + */ | |
| 73 | + @RequestMapping(method = RequestMethod.POST, value = "/updateRecordOne") | |
| 74 | + @ResponseBody | |
| 75 | + @TokenRequired | |
| 76 | + public BaseResponse updateRecordOne(@Valid @RequestBody MedicalRecordVo medicalRecordVo , HttpServletRequest request) { | |
| 77 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
| 78 | + return medicalRecordFacade.updateRecordOne(medicalRecordVo,loginState.getId()); | |
| 65 | 79 | } |
| 66 | 80 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MedicalRecordFacade.java
View file @
9593f72
| ... | ... | @@ -47,7 +47,14 @@ |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | for (MedicalRecordVo recordVo : medicalRecordVoList) { |
| 50 | - if("0".equals(recordVo.getPatientsType())){ | |
| 50 | + PatientsQuery patientsQuery = new PatientsQuery(); | |
| 51 | + patientsQuery.setCardNo(medicalRecordVo.getCardNo()); | |
| 52 | + patientsQuery.setPhone(medicalRecordVo.getPhone()); | |
| 53 | + patientsQuery.setYn(1); | |
| 54 | + patientsQuery.setDesc("true"); | |
| 55 | + patientsQuery.setSort("created"); | |
| 56 | + List<Patients> patientsList = patientsService.queryPatient(patientsQuery); | |
| 57 | + if(CollectionUtils.isNotEmpty(patientsList)){ | |
| 51 | 58 | recordVo.setPatientsType("已建档"); |
| 52 | 59 | }else{ |
| 53 | 60 | recordVo.setPatientsType("未建档"); |
| 54 | 61 | |
| 55 | 62 | |
| ... | ... | @@ -82,14 +89,12 @@ |
| 82 | 89 | // 查建档 |
| 83 | 90 | PatientsQuery patientsQuery = new PatientsQuery(); |
| 84 | 91 | patientsQuery.setCardNo(medicalRecordVo.getCardNo()); |
| 85 | - patientsQuery.setPhone(medicalRecordVo.getPhone()); | |
| 86 | 92 | patientsQuery.setYn(1); |
| 87 | - patientsQuery.setType(3); | |
| 88 | 93 | patientsQuery.setDesc("true"); |
| 89 | 94 | patientsQuery.setSort("created"); |
| 90 | 95 | List<Patients> patientsList = patientsService.queryPatient(patientsQuery); |
| 91 | 96 | if(CollectionUtils.isNotEmpty(patientsList)){ |
| 92 | - return new BaseResponse().setErrormsg("该手机号已经存在产妇档案,请核实").setErrorcode(ErrorCodeConstants.SUCCESS); | |
| 97 | + return new BaseResponse().setErrormsg("该手机号已经存在档案,请核实").setErrorcode(ErrorCodeConstants.SUCCESS); | |
| 93 | 98 | } |
| 94 | 99 | |
| 95 | 100 | // 写个人信息 |
| ... | ... | @@ -133,6 +138,45 @@ |
| 133 | 138 | updateVo.setHeight(medicalRecordVo.getHeight()); |
| 134 | 139 | updateVo.setWeight(medicalRecordVo.getWeight()); |
| 135 | 140 | updateVo.setPatientsType("0"); |
| 141 | + appointmentService.updateMedicalRecord(updateVo); | |
| 142 | + return new BaseResponse().setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS); | |
| 143 | + } | |
| 144 | + | |
| 145 | + public BaseResponse updateRecordOne(MedicalRecordVo medicalRecordVo,Integer userId) { | |
| 146 | + // 查建档 | |
| 147 | + PatientsQuery patientsQuery = new PatientsQuery(); | |
| 148 | + patientsQuery.setCardNo(medicalRecordVo.getCardNo()); | |
| 149 | + patientsQuery.setYn(1); | |
| 150 | + patientsQuery.setDesc("true"); | |
| 151 | + patientsQuery.setSort("created"); | |
| 152 | + List<Patients> patientsList = patientsService.queryPatient(patientsQuery); | |
| 153 | + if(CollectionUtils.isEmpty(patientsList)){ | |
| 154 | + return new BaseResponse().setErrormsg("未查询到档案,请核实").setErrorcode(ErrorCodeConstants.SUCCESS); | |
| 155 | + } | |
| 156 | + | |
| 157 | + String id = patientsList.get(0).getId(); | |
| 158 | + | |
| 159 | + // 更新建档 | |
| 160 | + Patients patient=new Patients(); | |
| 161 | + patient.setFmHospital("2100002419"); | |
| 162 | + patient.setFmDate(DateUtil.parseYMD(medicalRecordVo.getDeliveryTime())); | |
| 163 | + patient.setYn(1); | |
| 164 | + patient.setType(3); | |
| 165 | + patient.setBuildType(2); | |
| 166 | + patient.setOperator(userId); | |
| 167 | + patient.setModified(new Date()); | |
| 168 | + patientsService.updatePatientOne(patient,id); | |
| 169 | + | |
| 170 | + // 更新诊断 | |
| 171 | + MedicalRecordVo updateVo = new MedicalRecordVo(); | |
| 172 | + updateVo.setModified(DateUtil.getyyyy_MM_dd_hms(new Date())); | |
| 173 | + updateVo.setCardNo(medicalRecordVo.getCardNo()); | |
| 174 | + updateVo.setMdtrtTag(medicalRecordVo.getMdtrtTag()); | |
| 175 | + updateVo.setMainDoctor(medicalRecordVo.getMainDoctor()); | |
| 176 | + updateVo.setHeight(medicalRecordVo.getHeight()); | |
| 177 | + updateVo.setWeight(medicalRecordVo.getWeight()); | |
| 178 | + updateVo.setPatientsType("0"); | |
| 179 | + updateVo.setFeedType(medicalRecordVo.getFeedType()); | |
| 136 | 180 | appointmentService.updateMedicalRecord(updateVo); |
| 137 | 181 | return new BaseResponse().setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS); |
| 138 | 182 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/matnRehabPC/service/impl/MatnRehabServiceImpl.java
View file @
9593f72
| ... | ... | @@ -49,7 +49,7 @@ |
| 49 | 49 | Patients patients = patientsList.get(0); |
| 50 | 50 | // 高危风险因素 |
| 51 | 51 | if(CollectionUtils.isNotEmpty(patients.getRiskFactorId())){ |
| 52 | - data.put("rRisk",patients.getRiskFactorId()); | |
| 52 | + data.put("riskFactor",patients.getRiskFactorId()); | |
| 53 | 53 | } |
| 54 | 54 | // 产后 |
| 55 | 55 | MedicalRecordVo medicalRecordVo = new MedicalRecordVo(); |
| ... | ... | @@ -60,7 +60,7 @@ |
| 60 | 60 | if(CollectionUtils.isNotEmpty(list)) { |
| 61 | 61 | MedicalRecordVo medicalRecordVo1 = list.get(0); |
| 62 | 62 | data.put("name", medicalRecordVo1.getName()); |
| 63 | - data.put("diagnosis", medicalRecordVo1.getMdtrtTag()); | |
| 63 | + data.put("mdtrtTag", medicalRecordVo1.getMdtrtTag()); | |
| 64 | 64 | data.put("cardNo", medicalRecordVo1.getCardNo()); |
| 65 | 65 | String age1 = medicalRecordVo1.getAge().substring(0, 8); |
| 66 | 66 | Date date = DateUtil.parseYYYYMMDD(age1); |
| ... | ... | @@ -70,6 +70,8 @@ |
| 70 | 70 | data.put("weight", medicalRecordVo1.getWeight()); |
| 71 | 71 | data.put("height", medicalRecordVo1.getHeight()); |
| 72 | 72 | data.put("deliveryDate", medicalRecordVo1.getDeliveryTime()); |
| 73 | + data.put("deliveryMode", medicalRecordVo1.getDeliveryType()); | |
| 74 | + data.put("feedType",medicalRecordVo1.getFeedType()); | |
| 73 | 75 | } |
| 74 | 76 | // 查询服务是否开通 |
| 75 | 77 | List<PatientService> patientServices = patientServiceService.getServiceListByParentId(patients.getId(),3); |