Commit d0417716a48965405bb0886652687fe7326bae58
Exists in
master
and in
6 other branches
Merge remote-tracking branch 'origin/master'
Showing 17 changed files
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IBloodOxygenDao.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/BloodOxygenDaoImpl.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/BloodOxygenService.java
- platform-common/src/main/java/com/lyms/platform/common/enums/FmTypeEnums.java
- platform-dal/src/main/java/com/lyms/platform/beans/SerialIdEnum.java
- platform-dal/src/main/java/com/lyms/platform/pojo/BloodOxygenModel.java
- platform-dal/src/main/java/com/lyms/platform/query/BloodOxygenQuery.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/Test.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BloodOxygenController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/MatDeliverController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BloodOxygenFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BloodOxygenRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/ChildbirthManagerQueryModel.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/NewBabyManagerQueryModel.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/MatDeliverWorker.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/MaterDeliverWorker.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IBloodOxygenDao.java
View file @
d041771
1 | +package com.lyms.platform.biz.dal; | |
2 | + | |
3 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
4 | +import com.lyms.platform.pojo.BloodOxygenModel; | |
5 | + | |
6 | +import java.util.List; | |
7 | + | |
8 | +/** | |
9 | + * Created by Administrator on 2019-07-08. | |
10 | + */ | |
11 | +public interface IBloodOxygenDao { | |
12 | + void addBloodOxygen(BloodOxygenModel model); | |
13 | + public List<BloodOxygenModel> queryBloodOxygen(MongoQuery query); | |
14 | + | |
15 | + public int queryBloodOxygenCount(MongoQuery mongoQuery); | |
16 | +} |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/BloodOxygenDaoImpl.java
View file @
d041771
1 | +package com.lyms.platform.biz.dal.impl; | |
2 | + | |
3 | +import com.lyms.platform.biz.dal.IBloodOxygenDao; | |
4 | +import com.lyms.platform.common.dao.BaseMongoDAOImpl; | |
5 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
6 | +import com.lyms.platform.pojo.BloodOxygenModel; | |
7 | +import org.springframework.stereotype.Repository; | |
8 | + | |
9 | +import java.util.List; | |
10 | + | |
11 | +/** | |
12 | + * Created by Administrator on 2019-07-08. | |
13 | + */ | |
14 | +@Repository("bloodOxygenDao") | |
15 | +public class BloodOxygenDaoImpl extends BaseMongoDAOImpl<BloodOxygenModel> implements IBloodOxygenDao { | |
16 | + @Override | |
17 | + public void addBloodOxygen(BloodOxygenModel model) { | |
18 | + save(model); | |
19 | + } | |
20 | + | |
21 | + @Override | |
22 | + public List<BloodOxygenModel> queryBloodOxygen(MongoQuery query) { | |
23 | + return find(query.convertToMongoQuery()); | |
24 | + } | |
25 | + | |
26 | + @Override | |
27 | + public int queryBloodOxygenCount(MongoQuery mongoQuery) { | |
28 | + return (int) count(mongoQuery.convertToMongoQuery()); | |
29 | + } | |
30 | +} |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/BloodOxygenService.java
View file @
d041771
1 | +package com.lyms.platform.biz.service; | |
2 | + | |
3 | +import com.lyms.platform.biz.dal.IBloodOxygenDao; | |
4 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
5 | +import com.lyms.platform.pojo.BloodOxygenModel; | |
6 | +import com.lyms.platform.query.BloodOxygenQuery; | |
7 | +import org.apache.commons.lang.StringUtils; | |
8 | +import org.springframework.beans.factory.annotation.Autowired; | |
9 | +import org.springframework.data.domain.Sort; | |
10 | +import org.springframework.stereotype.Service; | |
11 | + | |
12 | +import java.util.List; | |
13 | + | |
14 | +/** | |
15 | + * Created by Administrator on 2019-07-08. | |
16 | + */ | |
17 | +@Service | |
18 | +public class BloodOxygenService { | |
19 | + | |
20 | + | |
21 | + @Autowired | |
22 | + private IBloodOxygenDao bloodOxygenDao; | |
23 | + | |
24 | + public void addBloodOxygen(BloodOxygenModel model) { | |
25 | + | |
26 | + bloodOxygenDao.addBloodOxygen(model); | |
27 | + } | |
28 | + | |
29 | + public List<BloodOxygenModel> queryBloodOxygen(BloodOxygenQuery bloodOxygenQuery) { | |
30 | + | |
31 | + MongoQuery query = bloodOxygenQuery.convertToQuery(); | |
32 | + if (StringUtils.isNotEmpty(bloodOxygenQuery.getNeed())) { | |
33 | + bloodOxygenQuery.mysqlBuild(bloodOxygenDao.queryBloodOxygenCount(bloodOxygenQuery.convertToQuery())); | |
34 | + query.start(bloodOxygenQuery.getOffset()).end(bloodOxygenQuery.getLimit()); | |
35 | + } | |
36 | + return bloodOxygenDao.queryBloodOxygen(query.addOrder(Sort.Direction.DESC, "created")); | |
37 | + } | |
38 | +} |
platform-common/src/main/java/com/lyms/platform/common/enums/FmTypeEnums.java
View file @
d041771
... | ... | @@ -196,9 +196,9 @@ |
196 | 196 | O3("产钳中位", "4"), |
197 | 197 | O4("臀位助产", "5"), |
198 | 198 | O5("臀位牵引", "6"), |
199 | - O6("胎吸", "7"), | |
200 | - O7("自由体位", "8"), | |
201 | - O8("臀牵引", "9"); | |
199 | + //O6("胎吸", "7"), | |
200 | + O7("自由体位", "8"); | |
201 | + // O8("臀牵引", "9"); | |
202 | 202 | |
203 | 203 | private FmScEnums(String name,String id) { |
204 | 204 | this.id = id; |
platform-dal/src/main/java/com/lyms/platform/beans/SerialIdEnum.java
View file @
d041771
... | ... | @@ -81,6 +81,7 @@ |
81 | 81 | PostpartumRecords("PostpartumRecords", 97521049991L), |
82 | 82 | QuestionModel("QuestionModel", 97521049991L), |
83 | 83 | HealthChargeModel("HealthChargeModel", 97221049991L), |
84 | + BloodOxygenModel("BloodOxygenModel", 97121049991L), | |
84 | 85 | ChargeRecordModel("ChargeRecordModel", 98221049991L), |
85 | 86 | TemporaryWeightModel("TemporaryWeightModel", 97531049591L), |
86 | 87 | TemporaryBloodModel("TemporaryBloodModel", 97541049591L), |
platform-dal/src/main/java/com/lyms/platform/pojo/BloodOxygenModel.java
View file @
d041771
1 | +package com.lyms.platform.pojo; | |
2 | + | |
3 | +import com.lyms.platform.beans.SerialIdEnum; | |
4 | +import com.lyms.platform.common.result.BaseModel; | |
5 | +import org.springframework.data.mongodb.core.mapping.Document; | |
6 | + | |
7 | +import java.util.Date; | |
8 | + | |
9 | +/** | |
10 | + * 血氧值 | |
11 | + * Created by Administrator on 2016/6/22. | |
12 | + */ | |
13 | +@Document(collection = "lyms_blood_oxygen") | |
14 | +public class BloodOxygenModel extends BaseModel { | |
15 | + | |
16 | + private static final long serialVersionUID = SerialIdEnum.BloodOxygenModel.getCid(); | |
17 | + | |
18 | + private String id; | |
19 | + | |
20 | + //血氧饱和度 | |
21 | + private String bloodOxygenSaturation; | |
22 | + | |
23 | + //脉搏 | |
24 | + private String pulse; | |
25 | + | |
26 | + //灌注指数 | |
27 | + private String perfusion; | |
28 | + | |
29 | + //血氧饱和度异常 | |
30 | + private String bloodOxygenSaturationExc; | |
31 | + | |
32 | + //脉搏异常 | |
33 | + private String pulseExc; | |
34 | + | |
35 | + //灌注指数异常 | |
36 | + private String perfusionExc; | |
37 | + | |
38 | + private String hospitalId; | |
39 | + | |
40 | + //孕妇档案id | |
41 | + private String patientId; | |
42 | + | |
43 | + private String pId; | |
44 | + | |
45 | + private Date created; | |
46 | + | |
47 | + private Date modified; | |
48 | + | |
49 | + public String getBloodOxygenSaturationExc() { | |
50 | + return bloodOxygenSaturationExc; | |
51 | + } | |
52 | + | |
53 | + public void setBloodOxygenSaturationExc(String bloodOxygenSaturationExc) { | |
54 | + this.bloodOxygenSaturationExc = bloodOxygenSaturationExc; | |
55 | + } | |
56 | + | |
57 | + public String getPulseExc() { | |
58 | + return pulseExc; | |
59 | + } | |
60 | + | |
61 | + public void setPulseExc(String pulseExc) { | |
62 | + this.pulseExc = pulseExc; | |
63 | + } | |
64 | + | |
65 | + public String getPerfusionExc() { | |
66 | + return perfusionExc; | |
67 | + } | |
68 | + | |
69 | + public void setPerfusionExc(String perfusionExc) { | |
70 | + this.perfusionExc = perfusionExc; | |
71 | + } | |
72 | + | |
73 | + public String getId() { | |
74 | + return id; | |
75 | + } | |
76 | + | |
77 | + public void setId(String id) { | |
78 | + this.id = id; | |
79 | + } | |
80 | + | |
81 | + public String getBloodOxygenSaturation() { | |
82 | + return bloodOxygenSaturation; | |
83 | + } | |
84 | + | |
85 | + public void setBloodOxygenSaturation(String bloodOxygenSaturation) { | |
86 | + this.bloodOxygenSaturation = bloodOxygenSaturation; | |
87 | + } | |
88 | + | |
89 | + public String getPulse() { | |
90 | + return pulse; | |
91 | + } | |
92 | + | |
93 | + public void setPulse(String pulse) { | |
94 | + this.pulse = pulse; | |
95 | + } | |
96 | + | |
97 | + public String getPerfusion() { | |
98 | + return perfusion; | |
99 | + } | |
100 | + | |
101 | + public void setPerfusion(String perfusion) { | |
102 | + this.perfusion = perfusion; | |
103 | + } | |
104 | + | |
105 | + public String getHospitalId() { | |
106 | + return hospitalId; | |
107 | + } | |
108 | + | |
109 | + public void setHospitalId(String hospitalId) { | |
110 | + this.hospitalId = hospitalId; | |
111 | + } | |
112 | + | |
113 | + public String getPatientId() { | |
114 | + return patientId; | |
115 | + } | |
116 | + | |
117 | + public void setPatientId(String patientId) { | |
118 | + this.patientId = patientId; | |
119 | + } | |
120 | + | |
121 | + public String getpId() { | |
122 | + return pId; | |
123 | + } | |
124 | + | |
125 | + public void setpId(String pId) { | |
126 | + this.pId = pId; | |
127 | + } | |
128 | + | |
129 | + public Date getCreated() { | |
130 | + return created; | |
131 | + } | |
132 | + | |
133 | + public void setCreated(Date created) { | |
134 | + this.created = created; | |
135 | + } | |
136 | + | |
137 | + public Date getModified() { | |
138 | + return modified; | |
139 | + } | |
140 | + | |
141 | + public void setModified(Date modified) { | |
142 | + this.modified = modified; | |
143 | + } | |
144 | + | |
145 | + @Override | |
146 | + public String toString() { | |
147 | + return "BloodOxygenModel{" + | |
148 | + "id='" + id + '\'' + | |
149 | + ", bloodOxygenSaturation='" + bloodOxygenSaturation + '\'' + | |
150 | + ", pulse='" + pulse + '\'' + | |
151 | + ", perfusion='" + perfusion + '\'' + | |
152 | + ", hospitalId='" + hospitalId + '\'' + | |
153 | + ", patientId='" + patientId + '\'' + | |
154 | + ", pId='" + pId + '\'' + | |
155 | + ", created=" + created + | |
156 | + ", modified=" + modified + | |
157 | + '}'; | |
158 | + } | |
159 | +} |
platform-dal/src/main/java/com/lyms/platform/query/BloodOxygenQuery.java
View file @
d041771
1 | +package com.lyms.platform.query; | |
2 | + | |
3 | +import com.lyms.platform.common.base.IConvertToNativeQuery; | |
4 | +import com.lyms.platform.common.dao.BaseQuery; | |
5 | +import com.lyms.platform.common.dao.operator.MongoCondition; | |
6 | +import com.lyms.platform.common.dao.operator.MongoOper; | |
7 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
8 | +import org.springframework.data.mongodb.core.query.Criteria; | |
9 | + | |
10 | +import java.util.Date; | |
11 | +import java.util.List; | |
12 | + | |
13 | +/** | |
14 | + * 新生儿筛查模型 | |
15 | + * Created by Administrator on 2018/8/27. | |
16 | + */ | |
17 | +public class BloodOxygenQuery extends BaseQuery implements IConvertToNativeQuery { | |
18 | + | |
19 | + private String id; | |
20 | + | |
21 | + | |
22 | + private String hospitalId; | |
23 | + | |
24 | + //孕妇档案id | |
25 | + private String patientId; | |
26 | + | |
27 | + private String pId; | |
28 | + | |
29 | + public MongoQuery convertToQuery() { | |
30 | + MongoCondition condition = MongoCondition.newInstance(); | |
31 | + | |
32 | + if(null != id){ | |
33 | + condition = condition.and("id", id, MongoOper.IS); | |
34 | + } | |
35 | + | |
36 | + if(null != hospitalId){ | |
37 | + condition = condition.and("hospitalId", hospitalId, MongoOper.IS); | |
38 | + } | |
39 | + | |
40 | + if(null != patientId){ | |
41 | + condition = condition.and("patientId", patientId, MongoOper.IS); | |
42 | + } | |
43 | + | |
44 | + if(null != pId){ | |
45 | + condition = condition.and("pId", pId, MongoOper.IS); | |
46 | + } | |
47 | + | |
48 | + return condition.toMongoQuery(); | |
49 | + } | |
50 | + | |
51 | + | |
52 | + public String getId() { | |
53 | + return id; | |
54 | + } | |
55 | + | |
56 | + public void setId(String id) { | |
57 | + this.id = id; | |
58 | + } | |
59 | + | |
60 | + public String getHospitalId() { | |
61 | + return hospitalId; | |
62 | + } | |
63 | + | |
64 | + public void setHospitalId(String hospitalId) { | |
65 | + this.hospitalId = hospitalId; | |
66 | + } | |
67 | + | |
68 | + public String getPatientId() { | |
69 | + return patientId; | |
70 | + } | |
71 | + | |
72 | + public void setPatientId(String patientId) { | |
73 | + this.patientId = patientId; | |
74 | + } | |
75 | + | |
76 | + public String getpId() { | |
77 | + return pId; | |
78 | + } | |
79 | + | |
80 | + public void setpId(String pId) { | |
81 | + this.pId = pId; | |
82 | + } | |
83 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/Test.java
View file @
d041771
... | ... | @@ -14,16 +14,21 @@ |
14 | 14 | private static org.apache.log4j.Logger log = Logger.getLogger("HTTP-INVOKE"); |
15 | 15 | |
16 | 16 | public static void main(String[] args) throws Exception { |
17 | + int MAXIMUM_CAPACITY = 1 << 30; | |
18 | + int n = 11 - 1; | |
19 | + n |= n >>> 1; | |
20 | + n |= n >>> 2; | |
21 | + n |= n >>> 4; | |
22 | + n |= n >>> 8; | |
23 | + n |= n >>> 16; | |
24 | + int a = (n < 0) ? 1 : (n >= MAXIMUM_CAPACITY) ? MAXIMUM_CAPACITY : n + 1; | |
25 | + System.out.println(a); | |
17 | 26 | |
18 | - Map map = new HashMap(); | |
19 | - map.put("111", "bbb"); | |
20 | - System.out.println(map); | |
27 | + LinkedHashMap map = new LinkedHashMap<>(); | |
21 | 28 | |
22 | - int h = 0; | |
23 | - Object key = "111"; | |
24 | - int hash = (key == null) ? 0 : (h = key.hashCode()) ^ (h >>> 16); | |
25 | - int i = (16 - 1) & hash; | |
26 | - System.out.print(i); | |
29 | + map.put("a","A"); | |
30 | + map.put("b","B"); | |
31 | + map.put("c","C"); | |
27 | 32 | } |
28 | 33 | |
29 | 34 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BloodOxygenController.java
View file @
d041771
1 | +package com.lyms.platform.operate.web.controller; | |
2 | + | |
3 | + | |
4 | +import com.lyms.platform.common.annotation.TokenRequired; | |
5 | +import com.lyms.platform.common.base.BaseController; | |
6 | +import com.lyms.platform.common.result.BaseObjectResponse; | |
7 | +import com.lyms.platform.common.result.BaseResponse; | |
8 | +import com.lyms.platform.operate.web.facade.BabyNutritionFacade; | |
9 | +import com.lyms.platform.operate.web.facade.BloodOxygenFacade; | |
10 | +import com.lyms.platform.operate.web.request.BabyNutritionRequest; | |
11 | +import com.lyms.platform.operate.web.request.BabyNutritionSettleRequest; | |
12 | +import com.lyms.platform.operate.web.request.BloodOxygenRequest; | |
13 | +import org.springframework.beans.factory.annotation.Autowired; | |
14 | +import org.springframework.stereotype.Controller; | |
15 | +import org.springframework.web.bind.annotation.*; | |
16 | + | |
17 | +import javax.servlet.http.HttpServletRequest; | |
18 | +import javax.servlet.http.HttpServletResponse; | |
19 | +import javax.validation.Valid; | |
20 | +import java.util.Calendar; | |
21 | +import java.util.Date; | |
22 | + | |
23 | + | |
24 | +/** | |
25 | + * 血氧 | |
26 | + */ | |
27 | +@Controller | |
28 | +public class BloodOxygenController extends BaseController { | |
29 | + | |
30 | + | |
31 | + @Autowired | |
32 | + private BloodOxygenFacade bloodOxygenFacade; | |
33 | + | |
34 | + | |
35 | + /** | |
36 | + * 添加血氧 | |
37 | + * | |
38 | + * @param request | |
39 | + * @return | |
40 | + */ | |
41 | + @RequestMapping(method = RequestMethod.POST, value = "/addBloodOxygen") | |
42 | + @ResponseBody | |
43 | + public BaseResponse addBloodOxygen(@Valid @RequestBody BloodOxygenRequest request, | |
44 | + HttpServletRequest httpServletRequest) { | |
45 | + | |
46 | + return bloodOxygenFacade.addBloodOxygen(request); | |
47 | + } | |
48 | + | |
49 | + | |
50 | + /** | |
51 | + * 获取血氧记录 | |
52 | + * @param patientId | |
53 | + * @param httpServletRequest | |
54 | + * @return | |
55 | + */ | |
56 | + @RequestMapping(method = RequestMethod.GET, value = "/getBloodOxygen") | |
57 | + @ResponseBody | |
58 | + public BaseResponse getBloodOxygen(@RequestParam(required = true)String patientId ,HttpServletRequest httpServletRequest) { | |
59 | + | |
60 | + return bloodOxygenFacade.getBloodOxygen(patientId); | |
61 | + } | |
62 | + | |
63 | + | |
64 | + | |
65 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/MatDeliverController.java
View file @
d041771
... | ... | @@ -352,6 +352,9 @@ |
352 | 352 | @RequestMapping(value = "newBabyManagerExcel", method = RequestMethod.POST) |
353 | 353 | public void newBabyManagerExcel(HttpServletRequest httpServletRequest, @RequestBody NewBabyManagerRequest newBabyManagerRequest, HttpServletResponse httpServletResponse) { |
354 | 354 | try { |
355 | + | |
356 | + String hospitalId = autoMatchFacade.getHospitalId(getUserId(httpServletRequest)); | |
357 | + | |
355 | 358 | newBabyManagerRequest.setOperatorId(((LoginContext) httpServletRequest.getAttribute("loginContext")).getId()); |
356 | 359 | newBabyManagerRequest.setExcel(true); |
357 | 360 | // 这里返回的结果必然是这个泛型,之所以query返回的结果集没有用泛型是为了更好的传递数据 |
... | ... | @@ -388,6 +391,11 @@ |
388 | 391 | } |
389 | 392 | } |
390 | 393 | |
394 | + if ("2100001635".equals(hospitalId)) | |
395 | + { | |
396 | + map.put("mphone",newBabyManagerQueryModel.getNoEphone()); | |
397 | + } | |
398 | + | |
391 | 399 | Integer deformity = newBabyManagerQueryModel.getDeformity(); |
392 | 400 | map.put("jx", deformity == null ? "" : (deformity == 1 ? "是" : "否")); |
393 | 401 | |
... | ... | @@ -466,6 +474,7 @@ |
466 | 474 | header.put("cc", "产次"); |
467 | 475 | header.put("ts", "胎数"); |
468 | 476 | header.put("dueType", "分娩方式"); |
477 | + header.put("operationCause", "手术原因"); | |
469 | 478 | header.put("fmWeek", "分娩孕周"); |
470 | 479 | header.put("jx", "外观是否正常"); |
471 | 480 | header.put("deliverDoctor", "接生医生"); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BloodOxygenFacade.java
View file @
d041771
1 | +package com.lyms.platform.operate.web.facade; | |
2 | + | |
3 | +import com.lyms.platform.biz.service.BloodOxygenService; | |
4 | +import com.lyms.platform.biz.service.PatientsService; | |
5 | +import com.lyms.platform.common.constants.ErrorCodeConstants; | |
6 | +import com.lyms.platform.common.result.BaseObjectResponse; | |
7 | +import com.lyms.platform.common.result.BaseResponse; | |
8 | +import com.lyms.platform.common.utils.DateUtil; | |
9 | +import com.lyms.platform.common.utils.JsonUtil; | |
10 | +import com.lyms.platform.common.utils.StringUtils; | |
11 | +import com.lyms.platform.operate.web.request.BloodOxygenRequest; | |
12 | +import com.lyms.platform.permission.dao.master.MasterLisMapper; | |
13 | +import com.lyms.platform.permission.model.LisReportItemModel; | |
14 | +import com.lyms.platform.permission.model.LisReportModel; | |
15 | +import com.lyms.platform.pojo.BloodOxygenModel; | |
16 | +import com.lyms.platform.pojo.Patients; | |
17 | +import com.lyms.platform.query.BloodOxygenQuery; | |
18 | +import org.apache.commons.collections.CollectionUtils; | |
19 | +import org.springframework.beans.factory.annotation.Autowired; | |
20 | +import org.springframework.stereotype.Component; | |
21 | + | |
22 | +import java.util.*; | |
23 | + | |
24 | +/** | |
25 | + * Created by Administrator on 2019-07-08. | |
26 | + */ | |
27 | +@Component | |
28 | +public class BloodOxygenFacade { | |
29 | + | |
30 | + @Autowired | |
31 | + private PatientsService patientsService; | |
32 | + | |
33 | + @Autowired | |
34 | + private MasterLisMapper masterLisMapper; | |
35 | + | |
36 | + @Autowired | |
37 | + private BloodOxygenService bloodOxygenService; | |
38 | + | |
39 | + public BaseResponse addBloodOxygen(BloodOxygenRequest request) { | |
40 | + | |
41 | + if (StringUtils.isNotEmpty(request.getPatientId())) | |
42 | + { | |
43 | + Patients patient = patientsService.findOnePatientById(request.getPatientId()); | |
44 | + if (patient != null) | |
45 | + { | |
46 | + BloodOxygenModel model = request.convertToDataModel(); | |
47 | + model.setModified(new Date()); | |
48 | + model.setCreated(new Date()); | |
49 | + request.setHospitalId(patient.getHospitalId()); | |
50 | + request.setpId(patient.getPid()); | |
51 | + bloodOxygenService.addBloodOxygen(model); | |
52 | + | |
53 | + LisReportModel lisModel = new LisReportModel(); | |
54 | + String uuid = StringUtils.uuid(); | |
55 | + lisModel.setType("血氧"); | |
56 | + lisModel.setLisId(uuid); | |
57 | + lisModel.setSex("女"); | |
58 | + lisModel.setCheckTime(new Date()); | |
59 | + lisModel.setApplyTime(new Date()); | |
60 | + lisModel.setPublishTime(new Date()); | |
61 | + lisModel.setModified(new Date()); | |
62 | + lisModel.setCreated(new Date()); | |
63 | + lisModel.setStatus(0); | |
64 | + lisModel.setName(patient.getUsername()); | |
65 | + lisModel.setAge(DateUtil.getAge(patient.getBirth()) + ""); | |
66 | + lisModel.setHospitalId(patient.getHospitalId()); | |
67 | + lisModel.setVcCardNo(patient.getVcCardNo()); | |
68 | + lisModel.setPhone(patient.getPhone()); | |
69 | + lisModel.setTitle("孕妇期血氧监测报告"); | |
70 | + | |
71 | + List<LisReportItemModel> items = new ArrayList<>(); | |
72 | + LisReportItemModel item1 = new LisReportItemModel(); | |
73 | + item1.setHospitalId(patient.getHospitalId()); | |
74 | + item1.setCharResult(request.getBloodOxygenSaturation()); | |
75 | + item1.setLisId(uuid); | |
76 | + item1.setName("血氧饱和度"); | |
77 | + item1.setPrintOrder("1"); | |
78 | + item1.setUnit("%"); | |
79 | + item1.setResultFlag(request.getBloodOxygenSaturationExc()); | |
80 | + item1.setRef("94%~100%"); | |
81 | + | |
82 | + LisReportItemModel item2 = new LisReportItemModel(); | |
83 | + item2.setHospitalId(patient.getHospitalId()); | |
84 | + item2.setCharResult(request.getPulse()); | |
85 | + item2.setLisId(uuid); | |
86 | + item2.setName("脉搏率"); | |
87 | + item2.setPrintOrder("2"); | |
88 | + item2.setUnit("BPM"); | |
89 | + item2.setResultFlag(request.getPulseExc()); | |
90 | + | |
91 | + LisReportItemModel item3 = new LisReportItemModel(); | |
92 | + item3.setHospitalId(patient.getHospitalId()); | |
93 | + item3.setCharResult(request.getPerfusion()); | |
94 | + item3.setLisId(uuid); | |
95 | + item3.setName("灌注指数"); | |
96 | + item3.setPrintOrder("3"); | |
97 | + item3.setUnit("%"); | |
98 | + item3.setResultFlag(request.getPerfusionExc()); | |
99 | + | |
100 | + items.add(item1); | |
101 | + items.add(item2); | |
102 | + items.add(item3); | |
103 | + | |
104 | + lisModel.setItemJson(JsonUtil.array2JsonString(items)); | |
105 | + masterLisMapper.saveLisData(lisModel); | |
106 | + } | |
107 | + } | |
108 | + | |
109 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
110 | + } | |
111 | + | |
112 | + public BaseResponse getBloodOxygen(String patientId) { | |
113 | + | |
114 | + List<Map> datas = new ArrayList<>(); | |
115 | + BloodOxygenQuery query = new BloodOxygenQuery(); | |
116 | + query.setPatientId(patientId); | |
117 | + List<BloodOxygenModel> list = bloodOxygenService.queryBloodOxygen(query); | |
118 | + if (CollectionUtils.isNotEmpty(list)) | |
119 | + { | |
120 | + for (BloodOxygenModel model : list) | |
121 | + { | |
122 | + Map map = new HashMap(); | |
123 | + map.put("created",DateUtil.getyyyy_MM_dd(model.getCreated())); | |
124 | + map.put("bloodOxygenSaturation",model.getBloodOxygenSaturation()); | |
125 | + map.put("pulse",model.getPulse()); | |
126 | + map.put("perfusion",model.getPerfusion()); | |
127 | + map.put("id",model.getId()); | |
128 | + datas.add(map); | |
129 | + } | |
130 | + } | |
131 | + return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(datas); | |
132 | + } | |
133 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java
View file @
d041771
1 | 1 | package com.lyms.platform.operate.web.facade; |
2 | 2 | |
3 | -import com.alibaba.fastjson.JSONObject; | |
4 | 3 | import com.lyms.hospitalapi.lcdcf.LcdcfFmService; |
5 | 4 | import com.lyms.hospitalapi.lcdcf.LcdcfHisModel; |
6 | 5 | import com.lyms.hospitalapi.lcdcf.LcdcfHisService; |
... | ... | @@ -34,7 +33,6 @@ |
34 | 33 | import org.apache.commons.collections.map.HashedMap; |
35 | 34 | import org.apache.commons.lang.StringUtils; |
36 | 35 | import org.apache.commons.lang.math.NumberUtils; |
37 | -import org.joda.time.format.ISODateTimeFormat; | |
38 | 36 | import org.slf4j.Logger; |
39 | 37 | import org.slf4j.LoggerFactory; |
40 | 38 | import org.springframework.beans.factory.annotation.Autowired; |
... | ... | @@ -54,8 +52,6 @@ |
54 | 52 | import javax.servlet.http.HttpServletResponse; |
55 | 53 | import java.io.IOException; |
56 | 54 | import java.math.BigDecimal; |
57 | -import java.math.BigInteger; | |
58 | -import java.net.InetSocketAddress; | |
59 | 55 | import java.sql.Connection; |
60 | 56 | import java.sql.PreparedStatement; |
61 | 57 | import java.sql.ResultSet; |
... | ... | @@ -2556,6 +2552,8 @@ |
2556 | 2552 | //newBabyManagerQueryModel.setBirthYMD(DateUtil.getyyyy_MM_dd(babyModel.getBirth())); |
2557 | 2553 | // newBabyManagerQueryModel.setBirthHM(new SimpleDateFormat("HH:mm").format(babyModel.getBirth())); |
2558 | 2554 | newBabyManagerQueryModel.setMphone(DefenceUtils.getPhone(babyModel.getMphone())); |
2555 | + | |
2556 | + newBabyManagerQueryModel.setNoEphone(babyModel.getMphone()); | |
2559 | 2557 | newBabyManagerQueryModel.setBirthDays(DateUtil.getDays(babyModel.getBirth(), new Date())); |
2560 | 2558 | newBabyManagerQueryModel.setBabyId(babyModel.getId()); |
2561 | 2559 | String deliverDoctor = ""; |
... | ... | @@ -2574,6 +2572,8 @@ |
2574 | 2572 | |
2575 | 2573 | newBabyManagerQueryModel.setGravidity(maternalDeliverModel.getGravidity()); |
2576 | 2574 | newBabyManagerQueryModel.setDueCount(maternalDeliverModel.getDueCount()); |
2575 | + | |
2576 | + newBabyManagerQueryModel.setOperationCause(maternalDeliverModel.getOperationCause()); | |
2577 | 2577 | |
2578 | 2578 | |
2579 | 2579 | newBabyManagerQueryModel.setFmWeek(maternalDeliverModel.getDueWeek()); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BloodOxygenRequest.java
View file @
d041771
1 | +package com.lyms.platform.operate.web.request; | |
2 | + | |
3 | +import com.lyms.platform.common.base.IBasicRequestConvert; | |
4 | +import com.lyms.platform.pojo.BloodOxygenModel; | |
5 | + | |
6 | +import java.util.Date; | |
7 | + | |
8 | +/** | |
9 | + * Created by Administrator on 2019-07-08. | |
10 | + */ | |
11 | +public class BloodOxygenRequest implements IBasicRequestConvert<BloodOxygenModel> { | |
12 | + | |
13 | + private String id; | |
14 | + | |
15 | + //血氧饱和度 | |
16 | + private String bloodOxygenSaturation; | |
17 | + | |
18 | + //血氧饱和度异常 | |
19 | + private String bloodOxygenSaturationExc; | |
20 | + | |
21 | + //脉搏 | |
22 | + private String pulse; | |
23 | + | |
24 | + //脉搏异常 | |
25 | + private String pulseExc; | |
26 | + | |
27 | + //灌注指数 | |
28 | + private String perfusion; | |
29 | + | |
30 | + //灌注指数异常 | |
31 | + private String perfusionExc; | |
32 | + | |
33 | + private String hospitalId; | |
34 | + | |
35 | + //孕妇档案id | |
36 | + private String patientId; | |
37 | + | |
38 | + private String pId; | |
39 | + | |
40 | + private Date created; | |
41 | + | |
42 | + private Date modified; | |
43 | + | |
44 | + @Override | |
45 | + public BloodOxygenModel convertToDataModel() { | |
46 | + BloodOxygenModel model = new BloodOxygenModel(); | |
47 | + model.setBloodOxygenSaturation(bloodOxygenSaturation); | |
48 | + model.setPulse(pulse); | |
49 | + model.setPerfusion(perfusion); | |
50 | + | |
51 | + model.setBloodOxygenSaturationExc(bloodOxygenSaturationExc); | |
52 | + model.setPulseExc(pulseExc); | |
53 | + model.setPerfusionExc(perfusionExc); | |
54 | + | |
55 | + model.setHospitalId(hospitalId); | |
56 | + model.setId(id); | |
57 | + model.setpId(pId); | |
58 | + model.setPatientId(patientId); | |
59 | + return model; | |
60 | + } | |
61 | + | |
62 | + public String getId() { | |
63 | + return id; | |
64 | + } | |
65 | + | |
66 | + public void setId(String id) { | |
67 | + this.id = id; | |
68 | + } | |
69 | + | |
70 | + public String getBloodOxygenSaturation() { | |
71 | + return bloodOxygenSaturation; | |
72 | + } | |
73 | + | |
74 | + public void setBloodOxygenSaturation(String bloodOxygenSaturation) { | |
75 | + this.bloodOxygenSaturation = bloodOxygenSaturation; | |
76 | + } | |
77 | + | |
78 | + public String getPulse() { | |
79 | + return pulse; | |
80 | + } | |
81 | + | |
82 | + public void setPulse(String pulse) { | |
83 | + this.pulse = pulse; | |
84 | + } | |
85 | + | |
86 | + public String getPerfusion() { | |
87 | + return perfusion; | |
88 | + } | |
89 | + | |
90 | + public void setPerfusion(String perfusion) { | |
91 | + this.perfusion = perfusion; | |
92 | + } | |
93 | + | |
94 | + public String getHospitalId() { | |
95 | + return hospitalId; | |
96 | + } | |
97 | + | |
98 | + public void setHospitalId(String hospitalId) { | |
99 | + this.hospitalId = hospitalId; | |
100 | + } | |
101 | + | |
102 | + public String getPatientId() { | |
103 | + return patientId; | |
104 | + } | |
105 | + | |
106 | + public void setPatientId(String patientId) { | |
107 | + this.patientId = patientId; | |
108 | + } | |
109 | + | |
110 | + public String getpId() { | |
111 | + return pId; | |
112 | + } | |
113 | + | |
114 | + public void setpId(String pId) { | |
115 | + this.pId = pId; | |
116 | + } | |
117 | + | |
118 | + public Date getCreated() { | |
119 | + return created; | |
120 | + } | |
121 | + | |
122 | + public void setCreated(Date created) { | |
123 | + this.created = created; | |
124 | + } | |
125 | + | |
126 | + public Date getModified() { | |
127 | + return modified; | |
128 | + } | |
129 | + | |
130 | + public void setModified(Date modified) { | |
131 | + this.modified = modified; | |
132 | + } | |
133 | + | |
134 | + public String getBloodOxygenSaturationExc() { | |
135 | + return bloodOxygenSaturationExc; | |
136 | + } | |
137 | + | |
138 | + public void setBloodOxygenSaturationExc(String bloodOxygenSaturationExc) { | |
139 | + this.bloodOxygenSaturationExc = bloodOxygenSaturationExc; | |
140 | + } | |
141 | + | |
142 | + public String getPulseExc() { | |
143 | + return pulseExc; | |
144 | + } | |
145 | + | |
146 | + public void setPulseExc(String pulseExc) { | |
147 | + this.pulseExc = pulseExc; | |
148 | + } | |
149 | + | |
150 | + public String getPerfusionExc() { | |
151 | + return perfusionExc; | |
152 | + } | |
153 | + | |
154 | + public void setPerfusionExc(String perfusionExc) { | |
155 | + this.perfusionExc = perfusionExc; | |
156 | + } | |
157 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/ChildbirthManagerQueryModel.java
View file @
d041771
... | ... | @@ -428,6 +428,26 @@ |
428 | 428 | private String gcStatus;//观察状态(0:正在观察;1:观察完成) |
429 | 429 | private String recordsNum;//记录条数 |
430 | 430 | |
431 | + private String totalTwoCxl;//阴道分娩产后2小时总出血量 | |
432 | + | |
433 | + private String babyQX; //新生儿去向 1.病房 2.NICU 3.转院 4.其他 | |
434 | + | |
435 | + public String getBabyQX() { | |
436 | + return babyQX; | |
437 | + } | |
438 | + | |
439 | + public void setBabyQX(String babyQX) { | |
440 | + this.babyQX = babyQX; | |
441 | + } | |
442 | + | |
443 | + public String getTotalTwoCxl() { | |
444 | + return totalTwoCxl; | |
445 | + } | |
446 | + | |
447 | + public void setTotalTwoCxl(String totalTwoCxl) { | |
448 | + this.totalTwoCxl = totalTwoCxl; | |
449 | + } | |
450 | + | |
431 | 451 | public String getGcStatus() { |
432 | 452 | return gcStatus; |
433 | 453 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/NewBabyManagerQueryModel.java
View file @
d041771
... | ... | @@ -131,6 +131,8 @@ |
131 | 131 | */ |
132 | 132 | private String mphone; |
133 | 133 | |
134 | + private String noEphone; | |
135 | + | |
134 | 136 | /** |
135 | 137 | * @auther HuJiaqi |
136 | 138 | * @createTime 2016年12月08日 10时57分 |
... | ... | @@ -150,6 +152,26 @@ |
150 | 152 | private Integer gravidity;//孕次 |
151 | 153 | //窒息分钟 |
152 | 154 | private String asphyxiaM; |
155 | + | |
156 | + //手术原因 | |
157 | + private String operationCause; | |
158 | + | |
159 | + | |
160 | + public String getNoEphone() { | |
161 | + return noEphone; | |
162 | + } | |
163 | + | |
164 | + public void setNoEphone(String noEphone) { | |
165 | + this.noEphone = noEphone; | |
166 | + } | |
167 | + | |
168 | + public String getOperationCause() { | |
169 | + return operationCause; | |
170 | + } | |
171 | + | |
172 | + public void setOperationCause(String operationCause) { | |
173 | + this.operationCause = operationCause; | |
174 | + } | |
153 | 175 | |
154 | 176 | public String getAsphyxiaM() { |
155 | 177 | return asphyxiaM; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/MatDeliverWorker.java
View file @
d041771
... | ... | @@ -170,7 +170,7 @@ |
170 | 170 | map.put("deliveryMode3", reslult3); |
171 | 171 | map.put("deliveryMode4", reslult4); |
172 | 172 | map.put("deliveryMode5", reslult5); |
173 | - map.put("thloseBloodL", queryModel.getThloseBloodL() == null ? "" : String.valueOf(queryModel.getThloseBloodL())); | |
173 | + map.put("thloseBloodL", queryModel.getTotalTwoCxl() == null ? "" : String.valueOf(queryModel.getTotalTwoCxl())); | |
174 | 174 | map.put("sex", queryModel.getSex()); |
175 | 175 | map.put("height", queryModel.getBabyHeight()); |
176 | 176 | int nu = 0; |
... | ... | @@ -253,7 +253,7 @@ |
253 | 253 | } |
254 | 254 | map.put("department1", department1); |
255 | 255 | map.put("department2", department2); |
256 | - map.put("remark", patients.getMremark() == null ? "" : patients.getMremark());//备注42列 | |
256 | + map.put("remark", queryModel.getBabyQX());//备注42列 | |
257 | 257 | } |
258 | 258 | |
259 | 259 | /** |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/MaterDeliverWorker.java
View file @
d041771
... | ... | @@ -3,28 +3,20 @@ |
3 | 3 | import com.lyms.platform.biz.service.*; |
4 | 4 | import com.lyms.platform.common.enums.*; |
5 | 5 | import com.lyms.platform.common.utils.*; |
6 | -import com.lyms.platform.common.utils.StringUtils; | |
7 | 6 | import com.lyms.platform.operate.web.request.MatDeliverAddRequest; |
8 | -import com.lyms.platform.operate.web.result.AntExManagerResult; | |
9 | 7 | import com.lyms.platform.operate.web.result.ChildbirthManagerQueryModel; |
10 | 8 | import com.lyms.platform.operate.web.utils.CommonsHelper; |
11 | -import com.lyms.platform.permission.model.Organization; | |
12 | -import com.lyms.platform.permission.model.Users; | |
13 | 9 | import com.lyms.platform.permission.service.OrganizationService; |
14 | 10 | import com.lyms.platform.permission.service.UsersService; |
15 | 11 | import com.lyms.platform.pojo.*; |
16 | -import com.lyms.platform.query.AntExRecordQuery; | |
17 | 12 | import com.lyms.platform.query.BabyModelQuery; |
18 | 13 | import com.lyms.platform.query.PostpartumRecordsQuery; |
19 | 14 | import com.lyms.platform.query.RecordsQuery; |
20 | 15 | import org.apache.commons.collections.CollectionUtils; |
21 | 16 | import org.apache.commons.collections.MapUtils; |
22 | -import org.apache.commons.lang.*; | |
23 | -import org.apache.commons.lang.math.NumberUtils; | |
24 | -import org.springframework.beans.factory.annotation.Autowired; | |
25 | 17 | |
18 | + | |
26 | 19 | import java.text.SimpleDateFormat; |
27 | -import java.util.ArrayList; | |
28 | 20 | import java.util.LinkedList; |
29 | 21 | import java.util.List; |
30 | 22 | import java.util.Map; |
... | ... | @@ -434,6 +426,25 @@ |
434 | 426 | childbirthManagerQueryModel.setOhloseBloodL(maternalDeliverModel.getoHloseBloodL()); |
435 | 427 | childbirthManagerQueryModel.setThloseBloodL(maternalDeliverModel.gettHloseBloodL()); |
436 | 428 | childbirthManagerQueryModel.setRhloseBloodL(maternalDeliverModel.getrHloseBloodL()); |
429 | + | |
430 | + childbirthManagerQueryModel.setTotalTwoCxl(maternalDeliverModel.getTotalTwoCxl()); | |
431 | + | |
432 | + List<MaternalDeliverModel.Baby> babies = maternalDeliverModel.getBaby(); | |
433 | + String babyQx = ""; | |
434 | + if (babies != null) | |
435 | + { | |
436 | + for (MaternalDeliverModel.Baby baby : babies) | |
437 | + { | |
438 | + //babyQX; //新生儿去向 1.病房 2.NICU 3.转院 4.其他 | |
439 | + if (baby != null && baby.getBabyQX() != null) | |
440 | + { | |
441 | + babyQx = "1".equals(baby.getBabyQX()) ? "病房" : ("2".equals(baby.getBabyQX()) ? "NICU" : "3".equals(baby.getBabyQX()) ? "转院" : baby.getOtherInfo() == null ? "" :baby.getOtherInfo()); | |
442 | + } | |
443 | + } | |
444 | + } | |
445 | + | |
446 | + childbirthManagerQueryModel.setBabyQX(babyQx); | |
447 | + | |
437 | 448 | |
438 | 449 | // 胎盘娩出方式,胎盘大小,胎盘重量,脐带长度,脐带是否异常,脐带异常类型 |
439 | 450 | if (initQuery.contains("tpmcType") || initQuery.contains("tpSize") || initQuery.contains("tpWeight") || initQuery.contains("umbilicalCordLength") || initQuery.contains("umbilicalCordEx") || initQuery.contains("umbilicalCordExType")) { |