Commit cf715a283b83f3af31559e0fe385fd7f8e0c2b87

Authored by gengxiaokai
1 parent 04cef5c0f1

秦皇岛冠新公卫接口

Showing 3 changed files with 138 additions and 4 deletions

platform-dal/src/main/java/com/lyms/platform/query/MatDeliverQuery.java View file @ cf715a2
... ... @@ -39,7 +39,25 @@
39 39 private Date createdTimeStart;
40 40 private Date createdTimeEnd;
41 41  
  42 + private Date modifiedStart;
  43 + private Date modifiedEnd;
42 44  
  45 + public Date getModifiedStart() {
  46 + return modifiedStart;
  47 + }
  48 +
  49 + public void setModifiedStart(Date modifiedStart) {
  50 + this.modifiedStart = modifiedStart;
  51 + }
  52 +
  53 + public Date getModifiedEnd() {
  54 + return modifiedEnd;
  55 + }
  56 +
  57 + public void setModifiedEnd(Date modifiedEnd) {
  58 + this.modifiedEnd = modifiedEnd;
  59 + }
  60 +
43 61 private boolean neEnd;
44 62 /**
45 63 * 出血量:
... ... @@ -272,6 +290,14 @@
272 290 c = c.where("created").gte(createdTimeStart).lte(createdTimeEnd);
273 291 }else{
274 292 c = Criteria.where("created").gte(createdTimeStart).lte(createdTimeEnd);
  293 + }
  294 + isAddStart = Boolean.TRUE;
  295 + }
  296 + if(null != modifiedStart && null != modifiedEnd){
  297 + if(null != c){
  298 + c = c.where("modified").gte(modifiedStart).lte(modifiedEnd);
  299 + }else{
  300 + c = Criteria.where("modified").gte(modifiedStart).lte(modifiedEnd);
275 301 }
276 302 isAddStart = Boolean.TRUE;
277 303 }
platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdJbgwInterface.java View file @ cf715a2
... ... @@ -2,6 +2,7 @@
2 2  
3 3 import com.lyms.platform.biz.service.AntenatalExaminationService;
4 4 import com.lyms.platform.biz.service.BasicConfigService;
  5 +import com.lyms.platform.biz.service.MatDeliverService;
5 6 import com.lyms.platform.biz.service.PatientsService;
6 7 import com.lyms.platform.common.enums.YnEnums;
7 8 import com.lyms.platform.common.utils.DateUtil;
8 9  
9 10  
... ... @@ -13,14 +14,13 @@
13 14 import com.lyms.platform.permission.model.Users;
14 15 import com.lyms.platform.permission.service.OrganizationService;
15 16 import com.lyms.platform.permission.service.UsersService;
16   -import com.lyms.platform.pojo.AntExChuModel;
17   -import com.lyms.platform.pojo.AntenatalExaminationModel;
18   -import com.lyms.platform.pojo.BasicConfig;
19   -import com.lyms.platform.pojo.Patients;
  17 +import com.lyms.platform.pojo.*;
20 18 import com.lyms.platform.query.AntExChuQuery;
21 19 import com.lyms.platform.query.AntExQuery;
  20 +import com.lyms.platform.query.MatDeliverQuery;
22 21 import com.lyms.platform.query.PatientsQuery;
23 22 import org.apache.commons.collections.MapUtils;
  23 +import org.apache.commons.lang.StringUtils;
24 24 import org.springframework.beans.factory.annotation.Autowired;
25 25 import org.springframework.data.domain.Sort;
26 26 import org.springframework.stereotype.Service;
... ... @@ -48,6 +48,8 @@
48 48 private AntenatalExaminationService antExService;
49 49 @Autowired
50 50 private UsersService usersService;
  51 + @Autowired
  52 + private MatDeliverService matDeliverService;
51 53  
52 54 /**
53 55 *孕产登记
... ... @@ -395,6 +397,102 @@
395 397  
396 398 return mList;
397 399 }
  400 +
  401 +
  402 + /**
  403 + * 分娩
  404 + * @param startDate
  405 + * @param endDate
  406 + * @return
  407 + */
  408 + public List<Map<String,String>> getFm(String startDate,String endDate){
  409 +
  410 + MatDeliverQuery deliverQuery = new MatDeliverQuery();
  411 + deliverQuery.setModifiedStart(DateUtil.parseYMDHMS(startDate));
  412 + deliverQuery.setModifiedEnd(DateUtil.parseYMDHMS(endDate));
  413 + List<MaternalDeliverModel> list = matDeliverService.query(deliverQuery);
  414 + if(list != null && list.size() > 0){
  415 + for(MaternalDeliverModel data : list) {
  416 + Patients patients = patientsService.findOnePatientById(data.getParentId());
  417 + try {
  418 + String cDueWeek = data.getDueWeek();
  419 + int week = Integer.parseInt(cDueWeek.substring(1, cDueWeek.indexOf("周")));
  420 + int day = Integer.parseInt(cDueWeek.substring(cDueWeek.indexOf("+") + 1, cDueWeek.indexOf("天")));
  421 + Map<String,String> map = new HashMap<String,String>();
  422 + map.put("MATERNALCHILDBIRTHID",data.getId());
  423 + map.put("MATERNALINFOID",patients.getId());
  424 + map.put("NAME",patients.getUsername());
  425 + String fmHospital = "";
  426 +
  427 + if (StringUtils.isNotEmpty(data.getFmHospital())) {
  428 + if (com.lyms.platform.common.utils.StringUtils.isNum(data.getFmHospital())) {
  429 + Organization organization = organizationService.getOrganization(Integer.parseInt(data.getFmHospital()));
  430 + if (organization != null && organization.getYn() == YnEnums.YES.getId()) {
  431 + fmHospital = organization.getName();
  432 + }
  433 + } else {
  434 + fmHospital = data.getFmHospital();
  435 + }
  436 +
  437 + }
  438 + map.put("LABORPLACEVALUE",fmHospital);
  439 + if(data.getDeliveryMode() != null){
  440 + Map m = JsonUtil.str2Obj(data.getDeliveryMode(), Map.class);
  441 + Object b = m.get("fmfs");
  442 + if(b != null){
  443 + if("顺产".equals(b.toString())){
  444 + map.put("LABORWAY","1");
  445 + }else if("剖宫产".equals(b.toString())){
  446 + map.put("LABORWAY","2");
  447 + }
  448 +
  449 + }
  450 + }
  451 + map.put("LABORTIME",data.getDueDate());
  452 + map.put("GESTTEEKS",String.valueOf(week));
  453 + map.put("GESTDAYS",String.valueOf(day));
  454 + if(data.getPerinealCondition() != null){
  455 + if("full".equals(data.getPerinealCondition())){
  456 + map.put("PERINEUMSITUATION","1");
  457 + }
  458 + if("split".equals(data.getPerinealCondition())){
  459 + map.put("PERINEUMSITUATION","2");
  460 + }
  461 + }
  462 +
  463 + if(data.getTireNumber().toString() != null){
  464 + if(1 == data.getTireNumber()){
  465 + map.put("BABYFETUSCOUNTS","1");
  466 + } else if(2 == data.getTireNumber()){
  467 + map.put("BABYFETUSCOUNTS","2");
  468 + } else{
  469 + map.put("BABYFETUSCOUNTS","3");
  470 + }
  471 + }
  472 + /*if(data.getMaternalInfo() != null){
  473 + if("1".equals(data.getMaternalInfo())){
  474 +
  475 + }
  476 + }*/
  477 + map.put("ORGCODE",patients.getHospitalId());
  478 + String hospital = "";
  479 + if (org.apache.commons.lang.StringUtils.isNotEmpty(patients.getHospitalId())) {
  480 + Organization organization = organizationService.getOrganization(Integer.parseInt(patients.getHospitalId()));
  481 + if (organization != null && organization.getYn() == YnEnums.YES.getId()) {
  482 + hospital = organization.getName();
  483 + }
  484 + }
  485 + map.put("ORGNAME",hospital);
  486 +
  487 + } catch (Exception e) {
  488 + e.printStackTrace();
  489 + continue;
  490 + }
  491 + }
  492 + }
  493 + return null;
  494 + }
  495 +
398 496  
399 497  
400 498  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/QhdJbgwController.java View file @ cf715a2
... ... @@ -54,6 +54,16 @@
54 54 }
55 55  
56 56  
  57 + @RequestMapping(method = RequestMethod.POST,value = "/qhd/fm")
  58 + @ResponseBody
  59 + public List<Map<String,String>> qhdFenMian(@RequestBody Map<String,String> map){
  60 + if(StringUtils.isNotEmpty(map.get("startDate")) && StringUtils.isNotEmpty(map.get("endDate"))){
  61 + return qhdJbgwInterface.getFuZhen(map.get("startDate"), map.get("endDate"));
  62 + }
  63 + return null;
  64 + }
  65 +
  66 +
57 67  
58 68 @RequestMapping(value = "/qhd/chuzhen")
59 69 @ResponseBody