Commit 86e8df3bd42b8b0eab6eb8c1d332e52f2d34924a
1 parent
75fd384bea
Exists in
master
and in
7 other branches
原型又改了!建档管理
Showing 6 changed files with 60 additions and 74 deletions
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/DischargeAbstractFacade.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/request/ChildbirthManagerRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/NewBabyManagerRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/PatientManagerRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PatientManagerQueryModel.java
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/DischargeAbstractFacade.java
View file @
86e8df3
... | ... | @@ -9,6 +9,7 @@ |
9 | 9 | import com.lyms.platform.operate.web.request.DischargeAbstractQueryRequest; |
10 | 10 | import com.lyms.platform.operate.web.request.DischargeAbstractSaveRequest; |
11 | 11 | import com.lyms.platform.operate.web.result.*; |
12 | +import com.lyms.platform.permission.service.UsersService; | |
12 | 13 | import com.lyms.platform.pojo.DischargeAbstractBabyModel; |
13 | 14 | import com.lyms.platform.pojo.DischargeAbstractMotherModel; |
14 | 15 | import com.lyms.platform.pojo.Patients; |
... | ... | @@ -53,6 +54,9 @@ |
53 | 54 | @Autowired |
54 | 55 | private AntenatalExaminationFacade antenatalExaminationFacade; |
55 | 56 | |
57 | + @Autowired | |
58 | + private UsersService usersService; | |
59 | + | |
56 | 60 | public DischargeAbstractSaveResult save(DischargeAbstractSaveRequest dischargeAbstractSaveRequest) { |
57 | 61 | |
58 | 62 | DischargeAbstractSaveResult dischargeAbstractSaveResult = new DischargeAbstractSaveResult(); |
... | ... | @@ -180,6 +184,11 @@ |
180 | 184 | DischargeAbstractMotherQueryModel dischargeAbstractMotherQueryModel = new DischargeAbstractMotherQueryModel(); |
181 | 185 | BeanUtils.copy(dischargeAbstractMotherModelList.get(0), dischargeAbstractMotherQueryModel); |
182 | 186 | dischargeAbstractMotherQueryModel.setLeaveHospitalDate(DateUtil.getyyyy_MM_dd(dischargeAbstractMotherModelList.get(0).getLeaveHospitalDate())); |
187 | + try { | |
188 | + dischargeAbstractMotherQueryModel.setInputMan(usersService.getUsers(Integer.valueOf(dischargeAbstractMotherModelList.get(0).getInputMan())).getName()); | |
189 | + } catch (Exception e) { | |
190 | + // 跳过 | |
191 | + } | |
183 | 192 | dischargeAbstractQueryResult.setDischargeAbstractMotherQueryModel(dischargeAbstractMotherQueryModel); |
184 | 193 | |
185 | 194 | // 查询孩子信息 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java
View file @
86e8df3
... | ... | @@ -768,7 +768,7 @@ |
768 | 768 | usersQuery.setName(patientManagerRequest.getBookbuildingDoctor()); |
769 | 769 | usersQuery.setYn(YnEnums.YES.getId()); |
770 | 770 | List<Users> usersList = usersService.queryUsers(usersQuery); |
771 | - if(CollectionUtils.isNotEmpty(usersList)){ | |
771 | + if (CollectionUtils.isNotEmpty(usersList)) { | |
772 | 772 | List<String> bookbuildingDoctorList = new ArrayList<>(); |
773 | 773 | for (Users users : usersList) { |
774 | 774 | bookbuildingDoctorList.add(users.getId().toString()); |
775 | 775 | |
776 | 776 | |
777 | 777 | |
... | ... | @@ -796,26 +796,24 @@ |
796 | 796 | PatientManagerQueryModel patientManagerQueryModel = new PatientManagerQueryModel(); |
797 | 797 | BeanUtils.copy(patients, patientManagerQueryModel); |
798 | 798 | patientManagerQueryModel.setAge(DateUtil.getAge(patients.getBirth())); |
799 | - switch (patients.getBuildType()) { | |
800 | - case 0: | |
801 | - patientManagerQueryModel.setServiceType("未分娩建档"); | |
802 | - break; | |
803 | - case 1: | |
804 | - patientManagerQueryModel.setServiceType("儿童建档时建档"); | |
805 | - break; | |
806 | - case 2: | |
807 | - patientManagerQueryModel.setServiceType("自动分娩类型"); | |
808 | - break; | |
809 | - case 3: | |
810 | - patientManagerQueryModel.setServiceType("转诊自动建档"); | |
811 | - break; | |
812 | - default: | |
813 | - patientManagerQueryModel.setServiceType(""); | |
799 | + String dueWeek = ""; | |
800 | + try { | |
801 | + if (patients.getBookbuildingDate().getTime() - patients.getDueDate().getTime() > 0 && patients.getBuildType() == 2) { | |
802 | + dueWeek = "已分娩"; | |
803 | + } else { | |
804 | + int days = DateUtil.daysBetween(patients.getLastMenses(), patients.getBookbuildingDate()); | |
805 | + String week = (days / 7) + ""; | |
806 | + int day = (days % 7); | |
807 | + dueWeek = "孕" + week + "周" + (day > 0 ? "+" + day + "天" : ""); | |
808 | + } | |
809 | + } catch (Exception e) { | |
810 | + // 什么都不干 | |
814 | 811 | } |
812 | + patientManagerQueryModel.setBuildWeek(dueWeek); | |
815 | 813 | patientManagerQueryModel.setBookbuildingDoctor(StringUtils.isEmpty(patients.getBookbuildingDoctor()) ? "" : usersService.getUsers(Integer.valueOf(patients.getBookbuildingDoctor())).getName()); |
816 | 814 | patientManagerQueryModel.setBookbuildingDate(DateUtil.getyyyy_MM_dd(patients.getBookbuildingDate())); |
815 | + patientManagerQueryModel.setAddress(CommonsHelper.getResidence(patients.getProvinceId(), patients.getCityId(), patients.getAreaId(), patients.getStreetId(), patients.getAddress(), basicConfigService)); | |
817 | 816 | patientManagerQueryModel.setAddressRegister(CommonsHelper.getResidence(patients.getProvinceRegisterId(), patients.getCityRegisterId(), patients.getAreaRegisterId(), patients.getStreetRegisterId(), patients.getAddressRegister(), basicConfigService)); |
818 | - patientManagerQueryModel.setHusbandAddressRegister(CommonsHelper.getResidence(patients.getHprovinceRegisterId(), patients.getHcityRegisterId(), patients.getHareaRegisterId(), patients.getHstreetRegisterId(), patients.getHaddressRegister(), basicConfigService)); | |
819 | 817 | patientManagerQueryModelList.add(patientManagerQueryModel); |
820 | 818 | } |
821 | 819 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/ChildbirthManagerRequest.java
View file @
86e8df3
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/NewBabyManagerRequest.java
View file @
86e8df3
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/PatientManagerRequest.java
View file @
86e8df3
... | ... | @@ -34,7 +34,7 @@ |
34 | 34 | private String provinceId; |
35 | 35 | private String cityId; |
36 | 36 | private String areaId; |
37 | - | |
37 | + | |
38 | 38 | /** |
39 | 39 | * @auther HuJiaqi |
40 | 40 | * @createTime 2016年12月22日 11时12分 |
... | ... | @@ -55,8 +55,6 @@ |
55 | 55 | * @discription 查询号 |
56 | 56 | */ |
57 | 57 | private String queryNo; |
58 | - | |
59 | - // 条码号暂时不管 | |
60 | 58 | |
61 | 59 | public String getProvinceRegisterId() { |
62 | 60 | return provinceRegisterId; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PatientManagerQueryModel.java
View file @
86e8df3
... | ... | @@ -13,69 +13,62 @@ |
13 | 13 | * @discription 姓名 |
14 | 14 | */ |
15 | 15 | private String username; |
16 | - | |
16 | + | |
17 | 17 | /** |
18 | 18 | * @auther HuJiaqi |
19 | 19 | * @createTime 2016年12月20日 14时42分 |
20 | 20 | * @discription 年龄 |
21 | 21 | */ |
22 | 22 | private Integer age; |
23 | - | |
23 | + | |
24 | 24 | /** |
25 | 25 | * @auther HuJiaqi |
26 | - * @createTime 2016年12月20日 14时42分 | |
27 | - * @discription 联系电话 | |
26 | + * @createTime 2016年12月23日 09时54分 | |
27 | + * @discription 建档孕周 | |
28 | 28 | */ |
29 | - private String phone; | |
30 | - | |
29 | + private String buildWeek; | |
30 | + | |
31 | 31 | /** |
32 | 32 | * @auther HuJiaqi |
33 | 33 | * @createTime 2016年12月20日 14时42分 |
34 | - * @discription 证件号码 | |
34 | + * @discription 联系电话 | |
35 | 35 | */ |
36 | - private String cardNo; | |
37 | - | |
36 | + private String phone; | |
37 | + | |
38 | 38 | /** |
39 | 39 | * @auther HuJiaqi |
40 | 40 | * @createTime 2016年12月20日 14时42分 |
41 | - * @discription 户口所在地 | |
41 | + * @discription 丈夫姓名 | |
42 | 42 | */ |
43 | - private String addressRegister; | |
44 | - | |
43 | + private String husbandName; | |
44 | + | |
45 | 45 | /** |
46 | 46 | * @auther HuJiaqi |
47 | 47 | * @createTime 2016年12月20日 14时42分 |
48 | - * @discription 丈夫姓名 | |
48 | + * @discription 居住地 | |
49 | 49 | */ |
50 | - private String husbandName; | |
51 | - | |
50 | + private String address; | |
51 | + | |
52 | 52 | /** |
53 | 53 | * @auther HuJiaqi |
54 | 54 | * @createTime 2016年12月20日 14时42分 |
55 | - * @discription 丈夫户口所在地 | |
55 | + * @discription 户口所在地 | |
56 | 56 | */ |
57 | - private String husbandAddressRegister; | |
58 | - | |
57 | + private String addressRegister; | |
58 | + | |
59 | 59 | /** |
60 | 60 | * @auther HuJiaqi |
61 | 61 | * @createTime 2016年12月20日 14时43分 |
62 | 62 | * @discription 建档时间 |
63 | 63 | */ |
64 | 64 | private String bookbuildingDate; |
65 | - | |
65 | + | |
66 | 66 | /** |
67 | 67 | * @auther HuJiaqi |
68 | 68 | * @createTime 2016年12月20日 14时43分 |
69 | 69 | * @discription 建档医生 |
70 | 70 | */ |
71 | 71 | private String bookbuildingDoctor; |
72 | - | |
73 | - /** | |
74 | - * @auther HuJiaqi | |
75 | - * @createTime 2016年12月20日 14时43分 | |
76 | - * @discription 服务类型 | |
77 | - */ | |
78 | - private String serviceType; | |
79 | 72 | |
80 | 73 | public String getUsername() { |
81 | 74 | return username; |
... | ... | @@ -93,6 +86,14 @@ |
93 | 86 | this.age = age; |
94 | 87 | } |
95 | 88 | |
89 | + public String getBuildWeek() { | |
90 | + return buildWeek; | |
91 | + } | |
92 | + | |
93 | + public void setBuildWeek(String buildWeek) { | |
94 | + this.buildWeek = buildWeek; | |
95 | + } | |
96 | + | |
96 | 97 | public String getPhone() { |
97 | 98 | return phone; |
98 | 99 | } |
... | ... | @@ -101,14 +102,6 @@ |
101 | 102 | this.phone = phone; |
102 | 103 | } |
103 | 104 | |
104 | - public String getCardNo() { | |
105 | - return cardNo; | |
106 | - } | |
107 | - | |
108 | - public void setCardNo(String cardNo) { | |
109 | - this.cardNo = cardNo; | |
110 | - } | |
111 | - | |
112 | 105 | public String getHusbandName() { |
113 | 106 | return husbandName; |
114 | 107 | } |
... | ... | @@ -117,6 +110,14 @@ |
117 | 110 | this.husbandName = husbandName; |
118 | 111 | } |
119 | 112 | |
113 | + public String getAddress() { | |
114 | + return address; | |
115 | + } | |
116 | + | |
117 | + public void setAddress(String address) { | |
118 | + this.address = address; | |
119 | + } | |
120 | + | |
120 | 121 | public String getAddressRegister() { |
121 | 122 | return addressRegister; |
122 | 123 | } |
... | ... | @@ -125,14 +126,6 @@ |
125 | 126 | this.addressRegister = addressRegister; |
126 | 127 | } |
127 | 128 | |
128 | - public String getHusbandAddressRegister() { | |
129 | - return husbandAddressRegister; | |
130 | - } | |
131 | - | |
132 | - public void setHusbandAddressRegister(String husbandAddressRegister) { | |
133 | - this.husbandAddressRegister = husbandAddressRegister; | |
134 | - } | |
135 | - | |
136 | 129 | public String getBookbuildingDate() { |
137 | 130 | return bookbuildingDate; |
138 | 131 | } |
... | ... | @@ -147,14 +140,6 @@ |
147 | 140 | |
148 | 141 | public void setBookbuildingDoctor(String bookbuildingDoctor) { |
149 | 142 | this.bookbuildingDoctor = bookbuildingDoctor; |
150 | - } | |
151 | - | |
152 | - public String getServiceType() { | |
153 | - return serviceType; | |
154 | - } | |
155 | - | |
156 | - public void setServiceType(String serviceType) { | |
157 | - this.serviceType = serviceType; | |
158 | 143 | } |
159 | 144 | } |