Commit 46ee72669d80e3946c53d2eb69bc02fd55be45b4

Authored by wtt
1 parent 2cbbf515fc

update

Showing 4 changed files with 99 additions and 3 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java View file @ 46ee726
... ... @@ -2746,7 +2746,7 @@
2746 2746 List <MaternalDeliverModel> mlist = maternalDeliverModelList.subList(i, end);
2747 2747 Callable c = new MaterDeliverWorker(organizationService, usersService,
2748 2748 babyService,antExService, basicConfigService, childbirthManagerRequest.getInitQuery(),
2749   - mlist, patientsMap, postpartumRecordsService, recordsService, childbirthManagerRequest.getShowDetail(),mongoTemplate);
  2749 + mlist, patientsMap, postpartumRecordsService, recordsService, childbirthManagerRequest.getShowDetail(),mongoTemplate,childbirthManagerRequest.isExcel());
2750 2750 Future f = commonThreadPool.submit(c);
2751 2751 if (f != null) {
2752 2752 futures.add(f);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/ChildbirthManagerRequest.java View file @ 46ee726
... ... @@ -565,6 +565,14 @@
565 565 initQueryMap.put("fmHospital", "分娩机构");
566 566 initQueryMap.put("gcStatus", "产后观察");
567 567 initQueryMap.put("recordsNum", "记录条数");
  568 +
  569 + initQueryMap.put("yyzyfmHospitalId", "预约住院分娩医院");
  570 + initQueryMap.put("czWeek", "初诊孕周");
  571 + initQueryMap.put("hivkt", "艾滋病检测结果");
  572 + initQueryMap.put("syjg", "梅毒检测结果");
  573 + initQueryMap.put("ygbmky", "乙肝检测结果");
  574 +
  575 +
568 576 initQueryMap.put("maternalDeliverId", "");
569 577 initQueryMap.put("patientId", "");
570 578 initQueryMap.put("pid", "");
... ... @@ -702,6 +710,11 @@
702 710 areaQueryMap.put("maternalDeliverId", "");
703 711 areaQueryMap.put("patientId", "");
704 712 areaQueryMap.put("pid", "");
  713 + areaQueryMap.put("yyzyfmHospitalId", "预约住院分娩医院");
  714 + areaQueryMap.put("czWeek", "初诊孕周");
  715 + areaQueryMap.put("hivkt", "艾滋病检测结果");
  716 + areaQueryMap.put("syjg", "梅毒检测结果");
  717 + areaQueryMap.put("ygbmky", "乙肝检测结果");
705 718  
706 719  
707 720 this.initQueryMap = initQueryMap;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/ChildbirthManagerQueryModel.java View file @ 46ee726
... ... @@ -11,6 +11,10 @@
11 11 */
12 12 public class ChildbirthManagerQueryModel {
13 13  
  14 + //预约住院分娩医院(滦平定制)
  15 + private String yyzyfmHospitalId;
  16 +
  17 +
14 18 /*承德定制*/
15 19 //初诊孕周
16 20 private String czWeek;
... ... @@ -950,6 +954,14 @@
950 954  
951 955 public String getTpWeight() {
952 956 return tpWeight;
  957 + }
  958 +
  959 + public String getYyzyfmHospitalId() {
  960 + return yyzyfmHospitalId;
  961 + }
  962 +
  963 + public void setYyzyfmHospitalId(String yyzyfmHospitalId) {
  964 + this.yyzyfmHospitalId = yyzyfmHospitalId;
953 965 }
954 966  
955 967 public void setTpWeight(String tpWeight) {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/MaterDeliverWorker.java View file @ 46ee726
... ... @@ -48,11 +48,12 @@
48 48 private RecordsService recordsService;
49 49 private int showDetail;
50 50 private MongoTemplate mongoTemplate;
  51 + private boolean isExcel;
51 52  
52 53 public MaterDeliverWorker(OrganizationService organizationService,UsersService usersService,
53 54 BabyService babyService,AntenatalExaminationService antExService,BasicConfigService basicConfigService,String initQuery,
54 55 List<MaternalDeliverModel> maternalDeliverModelList,Map<String, Patients> patientsMap,
55   - PostpartumRecordsService postpartumRecordsService,RecordsService recordsService,int showDetail,MongoTemplate mongoTemplate) {
  56 + PostpartumRecordsService postpartumRecordsService,RecordsService recordsService,int showDetail,MongoTemplate mongoTemplate,boolean isExcel) {
56 57 this.maternalDeliverModelList = maternalDeliverModelList;
57 58 this.patientsMap = patientsMap;
58 59 this.organizationService = organizationService;
... ... @@ -65,6 +66,7 @@
65 66 this.recordsService = recordsService;
66 67 this.showDetail = showDetail;
67 68 this.mongoTemplate = mongoTemplate;
  69 + this.isExcel = isExcel;
68 70 }
69 71  
70 72 @Override
... ... @@ -133,7 +135,76 @@
133 135 }
134 136 childbirthManagerQueryModel.setHandDueWeek(handDueWeek);
135 137  
136   - // 分娩孕周
  138 + //区域妇幼管理--分挽管理---导出:增加建挡孕周、初诊孕周、艾梅乙结果,区域妇幼管理--分挽管理---列表及导出
  139 + if(isExcel){
  140 + //列预约住院分娩医院(来自建档)
  141 + if("2".equals(patients.getIsYyzyfmHospital()) && StringUtils.isNotEmpty(patients.getYyzyfmHospitalId())){
  142 + String organizationName = organizationService.getOrganizationName(patients.getYyzyfmHospitalId());
  143 + if(org.apache.commons.lang.StringUtils.isNotEmpty(organizationName)){
  144 + childbirthManagerQueryModel.setYyzyfmHospitalId(organizationName);
  145 + }
  146 + }
  147 +
  148 + AntExChuQuery antExChuQuery = new AntExChuQuery();
  149 + antExChuQuery.setYn(YnEnums.YES.getId());
  150 + antExChuQuery.setParentId(patients.getId());
  151 + List <AntExChuModel> antExChuModels = antExService.queryAntExChu(antExChuQuery);//初诊记录
  152 + if(CollectionUtils.isNotEmpty(antExChuModels)){
  153 + AntExChuModel antExChuModel = antExChuModels.get(0);
  154 + if (antExChuModel !=null) {
  155 + String czWeek = "";
  156 + try {
  157 + if (antExChuModel.getCreated().getTime() - patients.getDueDate().getTime() > 0 && patients.getBuildType() == 2) {
  158 + czWeek = "已分娩";
  159 + } else {
  160 + int days = DateUtil.daysBetween(patients.getLastMenses(), antExChuModel.getCreated());
  161 + if (days > 7 * 42 - 1) {
  162 + czWeek = "已分娩";
  163 + } else {
  164 + String week = (days / 7) + "";
  165 + int day = (days % 7);
  166 + czWeek = "孕" + week + "周" + (day > 0 ? "+" + day + "天" : "");
  167 + }
  168 + }
  169 + } catch (Exception e) {
  170 + // 什么都不干
  171 + }
  172 + childbirthManagerQueryModel.setCzWeek(czWeek);//初诊孕周
  173 + if(StringUtils.isNotEmpty(antExChuModel.getHivktValue())){ // 艾滋病检测结果
  174 + childbirthManagerQueryModel.setHivkt(antExChuModel.getHivktValue());
  175 + }else{
  176 + String str = "";
  177 + if("yang".equals(antExChuModel.getHivkt())){
  178 + str = "阳性";
  179 + }else if("yin".equals(antExChuModel.getHivkt())){
  180 + str = "阴性";
  181 + }
  182 + childbirthManagerQueryModel.setHivkt(str);
  183 + }
  184 +
  185 + if(StringUtils.isNotEmpty(antExChuModel.getSyjgValue())){ // 梅毒检测结果
  186 + childbirthManagerQueryModel.setSyjg(antExChuModel.getSyjgValue());
  187 + }else{
  188 + String str = "";
  189 + if("yang".equals(antExChuModel.getSyjg())){
  190 + str = "阳性";
  191 + }else if("yin".equals(antExChuModel.getSyjg())){
  192 + str = "阴性";
  193 + }
  194 + childbirthManagerQueryModel.setSyjg(str);
  195 + }
  196 +
  197 + if(StringUtils.isNotEmpty(antExChuModel.getYgbmkyValue())){ // 乙肝检测结果 (乙肝表面抗原)
  198 + childbirthManagerQueryModel.setYgbmky(antExChuModel.getYgbmkyValue());
  199 + }else{
  200 + childbirthManagerQueryModel.setYgbmky(antExChuModel.getYgbmky());
  201 + }
  202 +
  203 + }
  204 + }
  205 + }
  206 +
  207 +
137 208  
138 209 //建档孕周
139 210 String dueWeek = "";