Commit bcbadb9243bbca7e407cf6fd3cf7dd2d7888ad69
1 parent
99af85af5a
Exists in
master
and in
6 other branches
微量元素
Showing 5 changed files with 124 additions and 186 deletions
- platform-dal/src/main/java/com/lyms/platform/pojo/MicroelementModel.java
- platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/MicroelementController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/HealthChargeFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MicroelementFacade.java
platform-dal/src/main/java/com/lyms/platform/pojo/MicroelementModel.java
View file @
bcbadb9
... | ... | @@ -40,6 +40,10 @@ |
40 | 40 | |
41 | 41 | private List<Microelement> microelements; |
42 | 42 | |
43 | + private String numberCode; | |
44 | + | |
45 | + | |
46 | + | |
43 | 47 | public static class Microelement implements Serializable { |
44 | 48 | |
45 | 49 | private static final long serialVersionUID = SerialIdEnum.Microelement.getCid(); |
... | ... | @@ -106,6 +110,14 @@ |
106 | 110 | public void setRefValue(String refValue) { |
107 | 111 | this.refValue = refValue; |
108 | 112 | } |
113 | + } | |
114 | + | |
115 | + public String getNumberCode() { | |
116 | + return numberCode; | |
117 | + } | |
118 | + | |
119 | + public void setNumberCode(String numberCode) { | |
120 | + this.numberCode = numberCode; | |
109 | 121 | } |
110 | 122 | |
111 | 123 | public String getId() { |
platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
View file @
bcbadb9
... | ... | @@ -364,6 +364,18 @@ |
364 | 364 | |
365 | 365 | private String lowerHairOgrId; |
366 | 366 | |
367 | + | |
368 | + //条码号 | |
369 | + private String numberCode; | |
370 | + | |
371 | + public String getNumberCode() { | |
372 | + return numberCode; | |
373 | + } | |
374 | + | |
375 | + public void setNumberCode(String numberCode) { | |
376 | + this.numberCode = numberCode; | |
377 | + } | |
378 | + | |
367 | 379 | public String getLowerHairOgrId() { |
368 | 380 | return lowerHairOgrId; |
369 | 381 | } |
... | ... | @@ -451,6 +463,9 @@ |
451 | 463 | } |
452 | 464 | if (null != pcensusTypeId) { |
453 | 465 | condition = condition.and("pcensusTypeId", pcensusTypeId, MongoOper.IS); |
466 | + } | |
467 | + if (null != numberCode) { | |
468 | + condition = condition.and("numberCode", numberCode, MongoOper.IS); | |
454 | 469 | } |
455 | 470 | if (null != serviceTypeIsExist) { |
456 | 471 | condition = condition.and("serviceType", serviceTypeIsExist, MongoOper.EXISTS); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/MicroelementController.java
View file @
bcbadb9
... | ... | @@ -5,11 +5,13 @@ |
5 | 5 | import com.lyms.platform.common.result.BaseResponse; |
6 | 6 | import com.lyms.platform.operate.web.facade.MicroelementFacade; |
7 | 7 | import com.lyms.platform.operate.web.request.AmniocentesisQueryRequest; |
8 | +import com.lyms.platform.pojo.MicroelementModel; | |
8 | 9 | import org.springframework.beans.factory.annotation.Autowired; |
9 | 10 | import org.springframework.stereotype.Controller; |
10 | 11 | import org.springframework.web.bind.annotation.*; |
11 | 12 | |
12 | 13 | import javax.servlet.http.HttpServletRequest; |
14 | +import javax.servlet.http.HttpServletResponse; | |
13 | 15 | |
14 | 16 | |
15 | 17 | /** |
16 | 18 | |
17 | 19 | |
18 | 20 | |
19 | 21 | |
20 | 22 | |
... | ... | @@ -24,29 +26,45 @@ |
24 | 26 | @Autowired |
25 | 27 | private MicroelementFacade microelementFacade; |
26 | 28 | |
29 | + /** | |
30 | + * 添加微量元素 | |
31 | + * @param request | |
32 | + * @param microelementModel | |
33 | + * @return | |
34 | + */ | |
35 | + @TokenRequired | |
36 | + @ResponseBody | |
37 | + @RequestMapping(value = "/saveMicroelement", method = RequestMethod.POST) | |
38 | + public BaseResponse saveMicroelement(HttpServletRequest request, | |
39 | + @RequestBody MicroelementModel microelementModel) { | |
27 | 40 | |
41 | + return microelementFacade.saveMicroelement(microelementModel, getUserId(request)); | |
42 | + | |
43 | + } | |
44 | + | |
45 | + | |
28 | 46 | /** |
29 | - * 查询羊穿基本信息,没有羊穿基本信息 | |
30 | - * 就从孕妇建档中查询建档基本信息回填 | |
47 | + * 微量元素报告 | |
31 | 48 | * @param request |
32 | - * @param cardNo | |
33 | - * @param vcCardNo | |
49 | + * @param httpServletResponse | |
50 | + * @param type | |
51 | + * @param id | |
34 | 52 | * @return |
35 | -// */ | |
36 | -// @TokenRequired | |
37 | -// @ResponseBody | |
38 | -// @RequestMapping(value = "/queryAmniocentesisInfo", method = RequestMethod.GET) | |
39 | -// public BaseResponse queryAmniocentesisInfo(HttpServletRequest request, | |
40 | -// @RequestParam(required = false) String cardNo, | |
41 | -// @RequestParam(required = false) String vcCardNo) { | |
42 | -// | |
43 | -// return amniocentesisFacade.queryAmniocentesisInfo(cardNo,vcCardNo,getUserId(request)); | |
44 | -// | |
45 | -// } | |
53 | + */ | |
54 | + @ResponseBody | |
55 | + @RequestMapping(method = RequestMethod.GET, value = "/queryMicroelementReport/{type}/{doctorId}/{id}") | |
56 | + @TokenRequired | |
57 | + public BaseResponse queryMicroelementReport(HttpServletRequest request, HttpServletResponse httpServletResponse, | |
58 | + @PathVariable Integer type, | |
59 | + @PathVariable String doctorId, | |
60 | + @PathVariable String id) | |
61 | + { | |
62 | + return microelementFacade.queryMicroelementReport(type,doctorId,id,getUserId(request)); | |
63 | + } | |
46 | 64 | |
47 | 65 | |
48 | 66 | /** |
49 | - * 列表 | |
67 | + * 微量元素列表 | |
50 | 68 | * @param request |
51 | 69 | * @return |
52 | 70 | */ |
53 | 71 | |
54 | 72 | |
... | ... | @@ -58,177 +76,13 @@ |
58 | 76 | @RequestParam(required = false) Integer weekStart, |
59 | 77 | @RequestParam(required = false) Integer weekEnd, |
60 | 78 | @RequestParam(required = false) Integer age, |
61 | - @RequestParam(required = false) Integer page, | |
62 | - @RequestParam(required = false) Integer limit, | |
79 | + @RequestParam(required = false) Integer type, | |
80 | + @RequestParam(required = true) Integer page, | |
81 | + @RequestParam(required = true) Integer limit, | |
63 | 82 | @RequestParam(required = false) String vcCardNo) { |
64 | 83 | |
65 | - return microelementFacade.querymicroelementList(queryNo,weekStart,weekEnd,age,vcCardNo,page,limit ,getUserId(request)); | |
84 | + return microelementFacade.querymicroelementList(queryNo,weekStart,weekEnd,age,vcCardNo,type,page,limit ,getUserId(request)); | |
66 | 85 | |
67 | 86 | } |
68 | - | |
69 | - | |
70 | -// /** | |
71 | -// * 导出列表 | |
72 | -// * @param request | |
73 | -// * @param httpServletResponse | |
74 | -// * @param amniocentesisQueryRequest | |
75 | -// */ | |
76 | -// @RequestMapping(method = RequestMethod.GET, value = "/exportAmniocentesisList") | |
77 | -// @TokenRequired | |
78 | -// public void exportAmniocentesisList(HttpServletRequest request, HttpServletResponse httpServletResponse, | |
79 | -// @Valid AmniocentesisQueryRequest amniocentesisQueryRequest) | |
80 | -// { | |
81 | -// amniocentesisFacade.exportAmniocentesisList(amniocentesisQueryRequest,getUserId(request), httpServletResponse); | |
82 | -// } | |
83 | -// | |
84 | -// | |
85 | -// /** | |
86 | -// * 查看页面接口 | |
87 | -// * @param request | |
88 | -// * @param id | |
89 | -// * @return | |
90 | -// */ | |
91 | -// @TokenRequired | |
92 | -// @ResponseBody | |
93 | -// @RequestMapping(value = "/queryAmniocentesisView", method = RequestMethod.GET) | |
94 | -// public BaseResponse queryAmniocentesisView(HttpServletRequest request, | |
95 | -// @RequestParam(required = true) String id) { | |
96 | -// | |
97 | -// return amniocentesisFacade.queryAmniocentesisView(id, getUserId(request)); | |
98 | -// | |
99 | -// } | |
100 | -// | |
101 | -// | |
102 | -// /** | |
103 | -// * 保存和修改 | |
104 | -// * @param request | |
105 | -// * @param amniocentesisInfoRequest | |
106 | -// * @return | |
107 | -// */ | |
108 | -// @TokenRequired | |
109 | -// @ResponseBody | |
110 | -// @RequestMapping(value = "/saveOrUpdateAmnioInfo", method = RequestMethod.POST) | |
111 | -// public BaseResponse saveOrUpdateAmnioInfo(HttpServletRequest request, | |
112 | -// @RequestBody AmniocentesisInfoRequest amniocentesisInfoRequest) { | |
113 | -// | |
114 | -// return amniocentesisFacade.saveOrUpdateAmniocentesisInfo(amniocentesisInfoRequest, getUserId(request)); | |
115 | -// | |
116 | -// } | |
117 | -// | |
118 | -// | |
119 | -// | |
120 | -// | |
121 | -// /** | |
122 | -// * 根据id查询数据 | |
123 | -// * @param request | |
124 | -// * @param id | |
125 | -// * @return | |
126 | -// */ | |
127 | -// @TokenRequired | |
128 | -// @ResponseBody | |
129 | -// @RequestMapping(value = "/queryAmniocentesisInfoById", method = RequestMethod.GET) | |
130 | -// public BaseResponse queryAmniocentesisInfoById(HttpServletRequest request, | |
131 | -// @RequestParam(required = true) String id) { | |
132 | -// return amniocentesisFacade.queryAmniocentesisInfoById(id, getUserId(request)); | |
133 | -// | |
134 | -// } | |
135 | -// | |
136 | -// | |
137 | -// /** | |
138 | -// * 添加羊穿记录手术 | |
139 | -// * @param request | |
140 | -// * @param amnioRecordRequest | |
141 | -// * @return | |
142 | -// */ | |
143 | -// @TokenRequired | |
144 | -// @ResponseBody | |
145 | -// @RequestMapping(value = "/saveOrUpdateAmnioRecord", method = RequestMethod.POST) | |
146 | -// public BaseResponse saveOrUpdateAmnioRecord(HttpServletRequest request, | |
147 | -// @RequestBody AmnioRecordRequest amnioRecordRequest) { | |
148 | -// return amniocentesisFacade.saveOrUpdateAmnioRecord(amnioRecordRequest, getUserId(request)); | |
149 | -// | |
150 | -// } | |
151 | -// | |
152 | -// | |
153 | -// /** | |
154 | -// * 手术记录查看页面接口 | |
155 | -// * @param request | |
156 | -// * @param id | |
157 | -// * @return | |
158 | -// */ | |
159 | -// @TokenRequired | |
160 | -// @ResponseBody | |
161 | -// @RequestMapping(value = "/queryAmnioRecordView", method = RequestMethod.GET) | |
162 | -// public BaseResponse queryAmnioRecordView(HttpServletRequest request, | |
163 | -// @RequestParam(required = true) String id) { | |
164 | -// return amniocentesisFacade.queryAmnioRecordView(id, getUserId(request)); | |
165 | -// | |
166 | -// } | |
167 | -// | |
168 | -// | |
169 | -// /** | |
170 | -// * 根据id查询手术记录详情 | |
171 | -// * @param request | |
172 | -// * @param id | |
173 | -// * @return | |
174 | -// */ | |
175 | -// @TokenRequired | |
176 | -// @ResponseBody | |
177 | -// @RequestMapping(value = "/queryAmnioRecordById", method = RequestMethod.GET) | |
178 | -// public BaseResponse queryAmnioRecordById(HttpServletRequest request, | |
179 | -// @RequestParam(required = true) String id) { | |
180 | -// return amniocentesisFacade.queryAmnioRecordById(id, getUserId(request)); | |
181 | -// | |
182 | -// } | |
183 | -// | |
184 | -// | |
185 | -// | |
186 | -// /** | |
187 | -// * 添加羊穿结果 | |
188 | -// * @param request | |
189 | -// * @param amnioResultRequest | |
190 | -// * @return | |
191 | -// */ | |
192 | -// @TokenRequired | |
193 | -// @ResponseBody | |
194 | -// @RequestMapping(value = "/saveOrUpdateAmnioResult", method = RequestMethod.POST) | |
195 | -// public BaseResponse saveOrUpdateAmnioResult(HttpServletRequest request, | |
196 | -// @RequestBody AmnioResultRequest amnioResultRequest) { | |
197 | -// return amniocentesisFacade.saveOrUpdateAmnioResult(amnioResultRequest, getUserId(request)); | |
198 | -// | |
199 | -// } | |
200 | -// | |
201 | -// /** | |
202 | -// * 查看羊穿结果 | |
203 | -// * @param request | |
204 | -// * @param id | |
205 | -// * @return | |
206 | -// */ | |
207 | -// @TokenRequired | |
208 | -// @ResponseBody | |
209 | -// @RequestMapping(value = "/queryAmnioResultView", method = RequestMethod.GET) | |
210 | -// public BaseResponse queryAmnioResultView(HttpServletRequest request, | |
211 | -// @RequestParam(required = true) String id) { | |
212 | -// return amniocentesisFacade.queryAmnioResultView(id, getUserId(request)); | |
213 | -// | |
214 | -// } | |
215 | -// | |
216 | -// | |
217 | -// /** | |
218 | -// * 根据id查询结果 | |
219 | -// * @param request | |
220 | -// * @param id | |
221 | -// * @return | |
222 | -// */ | |
223 | -// @TokenRequired | |
224 | -// @ResponseBody | |
225 | -// @RequestMapping(value = "/queryAmnioResultById", method = RequestMethod.GET) | |
226 | -// public BaseResponse queryAmnioResultById(HttpServletRequest request, | |
227 | -// @RequestParam(required = true) String id) { | |
228 | -// return amniocentesisFacade.queryAmnioResultById(id, getUserId(request)); | |
229 | -// | |
230 | -// } | |
231 | - | |
232 | - | |
233 | 87 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/HealthChargeFacade.java
View file @
bcbadb9
... | ... | @@ -57,7 +57,7 @@ |
57 | 57 | * 新增字段:报表解读人 孕妇/儿童 |
58 | 58 | * |
59 | 59 | * @param hospitalId 医院id |
60 | - * @param healthType 打印类型 1体重 2 血糖 3 血压 4妊高症 4-儿童膳食 6体成分分析 | |
60 | + * @param healthType 打印类型 1体重 2 血糖 3 血压 4妊高症 4-儿童膳食 6体成分分析 7 孕期微量元素 | |
61 | 61 | * @param foreignId 档案id (院内建档或者临时档案id)孕妇/儿童 |
62 | 62 | * @param type 打印报告类别 1普通报告 2高危报告(暂时不用) |
63 | 63 | * @param source 档案来源类型 1院内建档 2零时建档 (暂时不用) |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MicroelementFacade.java
View file @
bcbadb9
... | ... | @@ -5,7 +5,9 @@ |
5 | 5 | import com.lyms.platform.biz.service.PatientsService; |
6 | 6 | import com.lyms.platform.common.constants.ErrorCodeConstants; |
7 | 7 | import com.lyms.platform.common.dao.BaseQuery; |
8 | +import com.lyms.platform.common.enums.YnEnums; | |
8 | 9 | import com.lyms.platform.common.result.BaseListResponse; |
10 | +import com.lyms.platform.common.result.BaseObjectResponse; | |
9 | 11 | import com.lyms.platform.common.result.BaseResponse; |
10 | 12 | import com.lyms.platform.common.utils.DateUtil; |
11 | 13 | import com.lyms.platform.permission.model.PatientService; |
12 | 14 | |
13 | 15 | |
... | ... | @@ -33,10 +35,14 @@ |
33 | 35 | @Autowired |
34 | 36 | private MicroelementService microelementService; |
35 | 37 | |
38 | + | |
36 | 39 | @Autowired |
40 | + private HealthChargeFacade healthChargeFacade; | |
41 | + | |
42 | + @Autowired | |
37 | 43 | private PatientsService patientsService; |
38 | 44 | |
39 | - public BaseResponse querymicroelementList(String queryNo, Integer weekStart, Integer weekEnd, Integer age, String vcCardNo, Integer page, Integer limit, Integer userId) { | |
45 | + public BaseResponse querymicroelementList(String queryNo, Integer weekStart, Integer weekEnd, Integer age, String vcCardNo,Integer type ,Integer page, Integer limit, Integer userId) { | |
40 | 46 | |
41 | 47 | |
42 | 48 | List dataList = new ArrayList(); |
... | ... | @@ -98,6 +104,7 @@ |
98 | 104 | data.put("phone",patients.getPhone()); |
99 | 105 | data.put("vcCardNo",patients.getVcCardNo()); |
100 | 106 | data.put("cardNo",patients.getCardNo()); |
107 | + data.put("microelements", model.getMicroelements()); | |
101 | 108 | data.put("age", DateUtil.getAge(patients.getBirth(), model.getCreated())); |
102 | 109 | data.put("week", DateUtil.getWeekDesc(patients.getLastMenses(), model.getCreated())); |
103 | 110 | data.put("created", DateUtil.getyyyy_MM_dd(model.getCreated())); |
... | ... | @@ -107,6 +114,56 @@ |
107 | 114 | } |
108 | 115 | return new BaseListResponse().setData(dataList). |
109 | 116 | setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setPageInfo(query.getPageInfo()); |
117 | + } | |
118 | + | |
119 | + public BaseResponse queryMicroelementReport(Integer type,String doctorId, String id, Integer userId) { | |
120 | + Map data = new HashMap(); | |
121 | + | |
122 | + String hospitalId = autoMatchFacade.getHospitalId(userId); | |
123 | + | |
124 | + MicroelementQuery query = new MicroelementQuery(); | |
125 | + query.setType(type); | |
126 | + query.setId(id); | |
127 | + MicroelementModel model = microelementService.queryOneMicroelement(query); | |
128 | + if (model != null) | |
129 | + { | |
130 | + Patients pat = patientsService.findOnePatientById(model.getPatientId()); | |
131 | + data.put("userName",pat.getUsername()); | |
132 | + data.put("age", DateUtil.getAge(pat.getBirth(), model.getCreated())); | |
133 | + data.put("week", DateUtil.getWeekDesc(pat.getLastMenses(), model.getCreated())); | |
134 | + data.put("microelements", model.getMicroelements()); | |
135 | + data.put("created", DateUtil.getyyyy_MM_dd(model.getCreated())); | |
136 | + } | |
137 | + | |
138 | + healthChargeFacade.addHealthCharge(hospitalId, 7, model.getPatientId(), 1, 1, userId, doctorId, false); | |
139 | + return new BaseObjectResponse().setData(data). | |
140 | + setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
141 | + } | |
142 | + | |
143 | + public BaseResponse saveMicroelement(MicroelementModel microelementModel, Integer userId) { | |
144 | + String hospitalId = autoMatchFacade.getHospitalId(userId); | |
145 | + PatientsQuery patientsQuery = new PatientsQuery(); | |
146 | + patientsQuery.setYn(YnEnums.YES.getId()); | |
147 | + patientsQuery.setHospitalId(hospitalId); | |
148 | + patientsQuery.setType(1); | |
149 | + patientsQuery.setNumberCode(microelementModel.getNumberCode()); | |
150 | + List<Patients> patients = patientsService.queryPatient(patientsQuery); | |
151 | + if (CollectionUtils.isNotEmpty(patients)) | |
152 | + { | |
153 | + Patients pat = patients.get(0); | |
154 | + microelementModel.setHospitalId(hospitalId); | |
155 | + microelementModel.setPatientId(pat.getId()); | |
156 | + microelementModel.setPid(pat.getPid()); | |
157 | + microelementModel.setBirthday(pat.getBirth()); | |
158 | + microelementModel.setLastMenses(pat.getLastMenses()); | |
159 | + microelementModel.setType(0); | |
160 | + microelementModel.setCreated(new Date()); | |
161 | + microelementModel.setModified(new Date()); | |
162 | + microelementService.add(microelementModel); | |
163 | + } | |
164 | + | |
165 | + return new BaseResponse(). | |
166 | + setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
110 | 167 | } |
111 | 168 | } |