Commit 947dc83c747c4eb8b5cd162e8555ec9f5a05f8cc

Authored by baohanddd
1 parent a9256e3d4b

update assconfig table name

Showing 3 changed files with 172 additions and 16 deletions

platform-dal/src/main/java/com/lyms/platform/pojo/LisCrisisItem.java View file @ 947dc83
... ... @@ -29,6 +29,71 @@
29 29 private Integer status;
30 30 private String statusName;
31 31  
  32 + private String patientName;
  33 + private String cardNo;
  34 + private String phone;
  35 + private Integer serviceType;
  36 + private Integer serviceStatus;
  37 + //末次月经
  38 + private Date lastMenses;
  39 + private Integer week;
  40 +
  41 + public String getPatientName() {
  42 + return patientName;
  43 + }
  44 +
  45 + public void setPatientName(String patientName) {
  46 + this.patientName = patientName;
  47 + }
  48 +
  49 + public String getCardNo() {
  50 + return cardNo;
  51 + }
  52 +
  53 + public void setCardNo(String cardNo) {
  54 + this.cardNo = cardNo;
  55 + }
  56 +
  57 + public String getPhone() {
  58 + return phone;
  59 + }
  60 +
  61 + public void setPhone(String phone) {
  62 + this.phone = phone;
  63 + }
  64 +
  65 + public Integer getServiceType() {
  66 + return serviceType;
  67 + }
  68 +
  69 + public void setServiceType(Integer serviceType) {
  70 + this.serviceType = serviceType;
  71 + }
  72 +
  73 + public Integer getServiceStatus() {
  74 + return serviceStatus;
  75 + }
  76 +
  77 + public void setServiceStatus(Integer serviceStatus) {
  78 + this.serviceStatus = serviceStatus;
  79 + }
  80 +
  81 + public Date getLastMenses() {
  82 + return lastMenses;
  83 + }
  84 +
  85 + public void setLastMenses(Date lastMenses) {
  86 + this.lastMenses = lastMenses;
  87 + }
  88 +
  89 + public Integer getWeek() {
  90 + return week;
  91 + }
  92 +
  93 + public void setWeek(Integer week) {
  94 + this.week = week;
  95 + }
  96 +
32 97 public String getHospitalId() {
33 98 return hospitalId;
34 99 }
platform-dal/src/main/java/com/lyms/platform/query/LisCrisisItemQuery.java View file @ 947dc83
... ... @@ -26,6 +26,70 @@
26 26 private String applyDoctorName;
27 27 private Integer status;
28 28  
  29 + private String patientName;
  30 + private String cardNo;
  31 + private String phone;
  32 + private Integer serviceType;
  33 + private Integer serviceStatus;
  34 + private Integer startWeek;
  35 + private Integer endWeek;
  36 +
  37 + public String getPatientName() {
  38 + return patientName;
  39 + }
  40 +
  41 + public void setPatientName(String patientName) {
  42 + this.patientName = patientName;
  43 + }
  44 +
  45 + public String getCardNo() {
  46 + return cardNo;
  47 + }
  48 +
  49 + public void setCardNo(String cardNo) {
  50 + this.cardNo = cardNo;
  51 + }
  52 +
  53 + public String getPhone() {
  54 + return phone;
  55 + }
  56 +
  57 + public void setPhone(String phone) {
  58 + this.phone = phone;
  59 + }
  60 +
  61 + public Integer getServiceType() {
  62 + return serviceType;
  63 + }
  64 +
  65 + public void setServiceType(Integer serviceType) {
  66 + this.serviceType = serviceType;
  67 + }
  68 +
  69 + public Integer getServiceStatus() {
  70 + return serviceStatus;
  71 + }
  72 +
  73 + public void setServiceStatus(Integer serviceStatus) {
  74 + this.serviceStatus = serviceStatus;
  75 + }
  76 +
  77 + public Integer getStartWeek() {
  78 + return startWeek;
  79 + }
  80 +
  81 + public void setStartWeek(Integer startWeek) {
  82 + this.startWeek = startWeek;
  83 + }
  84 +
  85 + public Integer getEndWeek() {
  86 + return endWeek;
  87 + }
  88 +
  89 + public void setEndWeek(Integer endWeek) {
  90 + this.endWeek = endWeek;
  91 + }
  92 +
29 93 public String getId() {
30 94 return id;
31 95 }
... ... @@ -120,7 +184,6 @@
120 184 if (null != id) {
121 185 condition = condition.and("id", new ObjectId(id), MongoOper.IS);
122 186 }
123   -
124 187 if (null != name) {
125 188 condition = condition.and("name", name, MongoOper.IS);
126 189 }
... ... @@ -133,7 +196,6 @@
133 196 if(null!=classify){
134 197 condition=condition.and("classify",classify,MongoOper.IS);
135 198 }
136   -
137 199 if(null!=classifyName){
138 200 condition=condition.and("classifyName",classifyName,MongoOper.IS);
139 201 }
... ... @@ -148,6 +210,28 @@
148 210 }
149 211 if(null!=status){
150 212 condition=condition.and("status",status,MongoOper.IS);
  213 + }
  214 +
  215 + if(null!=patientName){
  216 + condition=condition.and("patientName",patientName,MongoOper.IS);
  217 + }
  218 + if(null!=cardNo){
  219 + condition=condition.and("cardNo",cardNo,MongoOper.IS);
  220 + }
  221 + if(null!=phone){
  222 + condition=condition.and("phone",phone,MongoOper.IS);
  223 + }
  224 + if(null!=serviceType){
  225 + condition=condition.and("serviceType",serviceType,MongoOper.IS);
  226 + }
  227 + if(null!=serviceStatus){
  228 + condition=condition.and("serviceStatus",serviceStatus,MongoOper.IS);
  229 + }
  230 + if(null!=startWeek){
  231 + condition=condition.and("week",startWeek,MongoOper.GTE);
  232 + }
  233 + if(null!=endWeek){
  234 + condition=condition.and("week",endWeek,MongoOper.LTE);
151 235 }
152 236  
153 237 return condition.toMongoQuery();
platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdfyHisService.java View file @ 947dc83
... ... @@ -5,10 +5,8 @@
5 5 import com.lyms.platform.biz.service.LisCrisisItemService;
6 6 import com.lyms.platform.biz.service.LisReportService;
7 7 import com.lyms.platform.biz.service.PatientsService;
8   -import com.lyms.platform.pojo.AssayConfig;
9   -import com.lyms.platform.pojo.LisCrisisItem;
10   -import com.lyms.platform.pojo.LisReport;
11   -import com.lyms.platform.pojo.LisReportItem;
  8 +import com.lyms.platform.common.utils.DateUtil;
  9 +import com.lyms.platform.pojo.*;
12 10 import com.lyms.platform.query.LisReportQuery;
13 11 import com.lyms.platform.query.PatientsQuery;
14 12 import org.apache.commons.dbutils.DbUtils;
15 13  
... ... @@ -72,13 +70,30 @@
72 70  
73 71 for (LisReport report:list) {
74 72 patientsQuery.setVcCardNo(report.getVcCardNo());
75   - int count = patientsService.queryPatientCount(patientsQuery);
  73 + List<Patients> patientsList = patientsService.queryPatient(patientsQuery);
76 74  
77 75 LisReportQuery lisReportQuery = new LisReportQuery();
78 76 lisReportQuery.setVcCardNo(report.getVcCardNo());
79 77 lisReportQuery.setHospitalId(""+hospitalId);
80 78 int reportCount = lisReportService.queryLisReportCount(lisReportQuery);
81   - if (count > 0 && reportCount == 0) {
  79 + if (patientsList != null && patientsList.size() > 0 && reportCount == 0) {
  80 + Patients patients = patientsList.get(0);
  81 + LisCrisisItem crisisItem = new LisCrisisItem();
  82 + crisisItem.setPhone(patients.getPhone());
  83 + crisisItem.setCardNo(patients.getCardNo());
  84 + crisisItem.setPatientName(patients.getUsername());
  85 + crisisItem.setServiceType(patients.getServiceType());
  86 + crisisItem.setServiceStatus(patients.getServiceStatus());
  87 + crisisItem.setLastMenses(patients.getLastMenses());
  88 + crisisItem.setWeek(DateUtil.getWeek(patients.getLastMenses(), report.getPublishTime()));
  89 + crisisItem.setPublishTime(report.getPublishTime());
  90 + crisisItem.setAge(report.getAge());
  91 + crisisItem.setApplyDoctorCode(report.getApplyDoctorCode());
  92 + crisisItem.setApplyDoctorName(report.getApplyDoctorName());
  93 + crisisItem.setHospitalId(hospitalId + "");
  94 + crisisItem.setStatus(1);
  95 + crisisItem.setStatusName("待处理");
  96 +
82 97 List<LisReportItem> itemList = queryRunner.query(conn, subSql+report.getHospitalId()+"'", new BeanListHandler<LisReportItem>(LisReportItem.class));
83 98 if (itemList.size() > 0) {
84 99 report.setId(hospitalId + ":" + report.getHospitalId());
85 100  
... ... @@ -89,13 +104,7 @@
89 104 // crisis init
90 105 for (LisReportItem item:itemList) {
91 106 if (item.getFlag() != null) {
92   - LisCrisisItem crisisItem = new LisCrisisItem();
93   - crisisItem.setHospitalId(hospitalId + "");
94 107 crisisItem.setId(report.getId() + ":" + item.getCode());
95   - crisisItem.setPublishTime(report.getPublishTime());
96   - crisisItem.setAge(report.getAge());
97   - crisisItem.setApplyDoctorCode(report.getApplyDoctorCode());
98   - crisisItem.setApplyDoctorName(report.getApplyDoctorName());
99 108 AssayConfig assayConfig = assayConfigMap.get(item.getCode());
100 109 if (assayConfig != null) {
101 110 crisisItem.setClassify(assayConfig.getClassify());
... ... @@ -106,8 +115,6 @@
106 115 crisisItem.setItemName(item.getName());
107 116 crisisItem.setRef(item.getRef());
108 117 crisisItem.setResult(item.getResult());
109   - crisisItem.setStatus(1);
110   - crisisItem.setStatusName("待处理");
111 118 crisisItem.setUnit(item.getUnit());
112 119 lisCrisisItemService.addLisCrisisItem(crisisItem);
113 120 }