Commit cee88662f2b356c206f5e62c3df9047cf3390f2c

Authored by yangfei
1 parent 2b392d3308

听力诊断模块

Showing 8 changed files with 337 additions and 96 deletions

platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarBirth.java View file @ cee8866
... ... @@ -63,9 +63,9 @@
63 63 */
64 64 private BigDecimal apgarScoreTen;
65 65 /**
66   - * 胎儿窘迫 不详(单选) 1-选中
  66 + * apgar评分 不详(单选) 1-选中
67 67 */
68   - private Integer fetuEmbarras;
  68 + private Integer apgarUnknown;
69 69  
70 70 /**
71 71 * 产伤类型: 1=有 -1=无
72 72  
... ... @@ -379,12 +379,12 @@
379 379 this.tireNumber = tireNumber;
380 380 }
381 381  
382   - public Integer getFetuEmbarras() {
383   - return fetuEmbarras;
  382 + public Integer getApgarUnknown() {
  383 + return apgarUnknown;
384 384 }
385 385  
386   - public void setFetuEmbarras(Integer fetuEmbarras) {
387   - this.fetuEmbarras = fetuEmbarras;
  386 + public void setApgarUnknown(Integer apgarUnknown) {
  387 + this.apgarUnknown = apgarUnknown;
388 388 }
389 389  
390 390 public String getEarPoisonMap() {
platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarBirthQuery.java View file @ cee8866
... ... @@ -64,9 +64,9 @@
64 64 */
65 65 private BigDecimal apgarScoreTen;
66 66 /**
67   - * 胎儿窘迫 不详(单选) 1-选中
  67 + * apgar 不详(单选) 1-选中
68 68 */
69   - private Integer fetuEmbarras;
  69 + private Integer apgarUnknown;
70 70  
71 71 /**
72 72 * 产伤类型: 1=有 -1=无
... ... @@ -232,6 +232,14 @@
232 232 this.productNumber = productNumber;
233 233 }
234 234  
  235 + public Integer getApgarUnknown() {
  236 + return apgarUnknown;
  237 + }
  238 +
  239 + public void setApgarUnknown(Integer apgarUnknown) {
  240 + this.apgarUnknown = apgarUnknown;
  241 + }
  242 +
235 243 public BigDecimal getBirthWeight() {
236 244 return birthWeight;
237 245 }
... ... @@ -304,13 +312,6 @@
304 312 this.apgarScoreTen = apgarScoreTen;
305 313 }
306 314  
307   - public Integer getFetuEmbarras() {
308   - return fetuEmbarras;
309   - }
310   -
311   - public void setFetuEmbarras(Integer fetuEmbarras) {
312   - this.fetuEmbarras = fetuEmbarras;
313   - }
314 315  
315 316 public Integer getBirthInjuryType() {
316 317 return birthInjuryType;
platform-biz-service/src/main/java/com/lyms/platform/permission/model/PatientMarkHospitalQuery.java View file @ cee8866
... ... @@ -132,6 +132,14 @@
132 132 */
133 133 private Date hospitDate;
134 134 /**
  135 + * 住院开始时间
  136 + */
  137 + private Date hospitStartDate;
  138 + /**
  139 + * 住院结束时间
  140 + */
  141 + private Date hospitEndDate;
  142 + /**
135 143 * 住院类型(1-分娩住院、2-其他住院)
136 144 */
137 145 private Integer hospitType;
... ... @@ -139,6 +147,22 @@
139 147 * sql
140 148 */
141 149 private String sql;
  150 +
  151 + public Date getHospitStartDate() {
  152 + return hospitStartDate;
  153 + }
  154 +
  155 + public void setHospitStartDate(Date hospitStartDate) {
  156 + this.hospitStartDate = hospitStartDate;
  157 + }
  158 +
  159 + public Date getHospitEndDate() {
  160 + return hospitEndDate;
  161 + }
  162 +
  163 + public void setHospitEndDate(Date hospitEndDate) {
  164 + this.hospitEndDate = hospitEndDate;
  165 + }
142 166  
143 167 public String getSql() {
144 168 return sql;
platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarBirth.xml View file @ cee8866
... ... @@ -44,12 +44,13 @@
44 44 <result column="outside_response" property="outsideResponse" jdbcType="INTEGER"/>
45 45 <result column="baby_patient_id" property="babyPatientId" jdbcType="VARCHAR"/>
46 46 <result column="baby_ear_id" property="babyEarId" jdbcType="VARCHAR" />
  47 + <result column="apgar_unknown" property="apgarUnknown" jdbcType="INTEGER" />
47 48 </resultMap>
48 49  
49 50  
50 51 <insert id="addBabyPatientExtendEarBirth"
51 52 parameterType="com.lyms.platform.permission.model.BabyPatientExtendEarBirth">
52   -insert into baby_patient_extend_ear_birth (id,fetu_number,product_number,birth_weight,tire_number,parturition_type,birth_defect_type,birth_defect_desc,fetu_embarras_type,apgar_score_one,apgar_score_five,apgar_score_ten,birth_injury_type,birth_injury_position,amniotic_fluid_type,abnormal_parturition_type,abnormal_parturition_position,deformity_type,deformity_position,birth_infection_type,birth_infection_cause,birth_course_disease,birth_ill_type,birth_ill_cause,birth_ill_disease,head_trauma_history,head_trauma_desc,ear_poison_type,ear_poison_map,tympanitis_type,tympanitis_desc,nicu_type,nicu_cause,nicu_continued_date,respirator_type,respirator_continued_date,respirator_continued_date_unit,outside_response,baby_patient_id,baby_ear_id) values (#{id},#{fetuNumber},#{productNumber},#{birthWeight},#{tireNumber},#{parturitionType},#{birthDefectType},#{birthDefectDesc},#{fetuEmbarrasType},#{apgarScoreOne},#{apgarScoreFive},#{apgarScoreTen},#{birthInjuryType},#{birthInjuryPosition},#{amnioticFluidType},#{abnormalParturitionType},#{abnormalParturitionPosition},#{deformityType},#{deformityPosition},#{birthInfectionType},#{birthInfectionCause},#{birthCourseDisease},#{birthIllType},#{birthIllCause},#{birthIllDisease},#{headTraumaHistory},#{headTraumaDesc},#{earPoisonType},#{earPoisonMap},#{tympanitisType},#{tympanitisDesc},#{nicuType},#{nicuCause},#{nicuContinuedDate},#{respiratorType},#{respiratorContinuedDate},#{respiratorContinuedDateUnit},#{outsideResponse},#{babyPatientId},#{babyEarId})
  53 +insert into baby_patient_extend_ear_birth (id,fetu_number,product_number,birth_weight,tire_number,parturition_type,birth_defect_type,birth_defect_desc,fetu_embarras_type,apgar_score_one,apgar_score_five,apgar_score_ten,birth_injury_type,birth_injury_position,amniotic_fluid_type,abnormal_parturition_type,abnormal_parturition_position,deformity_type,deformity_position,birth_infection_type,birth_infection_cause,birth_course_disease,birth_ill_type,birth_ill_cause,birth_ill_disease,head_trauma_history,head_trauma_desc,ear_poison_type,ear_poison_map,tympanitis_type,tympanitis_desc,nicu_type,nicu_cause,nicu_continued_date,respirator_type,respirator_continued_date,respirator_continued_date_unit,outside_response,baby_patient_id,baby_ear_id,apgar_unknown) values (#{id},#{fetuNumber},#{productNumber},#{birthWeight},#{tireNumber},#{parturitionType},#{birthDefectType},#{birthDefectDesc},#{fetuEmbarrasType},#{apgarScoreOne},#{apgarScoreFive},#{apgarScoreTen},#{birthInjuryType},#{birthInjuryPosition},#{amnioticFluidType},#{abnormalParturitionType},#{abnormalParturitionPosition},#{deformityType},#{deformityPosition},#{birthInfectionType},#{birthInfectionCause},#{birthCourseDisease},#{birthIllType},#{birthIllCause},#{birthIllDisease},#{headTraumaHistory},#{headTraumaDesc},#{earPoisonType},#{earPoisonMap},#{tympanitisType},#{tympanitisDesc},#{nicuType},#{nicuCause},#{nicuContinuedDate},#{respiratorType},#{respiratorContinuedDate},#{respiratorContinuedDateUnit},#{outsideResponse},#{babyPatientId},#{babyEarId},#{apgarUnknown})
53 54 </insert>
54 55  
55 56  
... ... @@ -174,6 +175,9 @@
174 175 <if test="babyEarId != null and babyEarId != ''">
175 176 baby_ear_id = #{babyEarId,jdbcType=VARCHAR},
176 177 </if>
  178 + <if test="apgarUnknown != null">
  179 + apgar_unknown = #{apgarUnknown,jdbcType=INTEGER},
  180 + </if>
177 181 </set>
178 182 where id = #{id,jdbcType=VARCHAR}
179 183 </update>
... ... @@ -186,7 +190,7 @@
186 190  
187 191 <select id="getBabyPatientExtendEarBirth" resultMap="BabyPatientExtendEarBirthResultMap"
188 192 parameterType="java.lang.String">
189   -select id,fetu_number,product_number,birth_weight,tire_number,parturition_type,birth_defect_type,birth_defect_desc,fetu_embarras_type,apgar_score_one,apgar_score_five,apgar_score_ten,birth_injury_type,birth_injury_position,amniotic_fluid_type,abnormal_parturition_type,abnormal_parturition_position,deformity_type,deformity_position,birth_infection_type,birth_infection_cause,birth_course_disease,birth_ill_type,birth_ill_cause,birth_ill_disease,head_trauma_history,head_trauma_desc,ear_poison_type,ear_poison_map,tympanitis_type,tympanitis_desc,nicu_type,nicu_cause,nicu_continued_date,respirator_type,respirator_continued_date,respirator_continued_date_unit,outside_response,baby_patient_id,baby_ear_id
  193 +select id,fetu_number,product_number,birth_weight,tire_number,parturition_type,birth_defect_type,birth_defect_desc,fetu_embarras_type,apgar_score_one,apgar_score_five,apgar_score_ten,birth_injury_type,birth_injury_position,amniotic_fluid_type,abnormal_parturition_type,abnormal_parturition_position,deformity_type,deformity_position,birth_infection_type,birth_infection_cause,birth_course_disease,birth_ill_type,birth_ill_cause,birth_ill_disease,head_trauma_history,head_trauma_desc,ear_poison_type,ear_poison_map,tympanitis_type,tympanitis_desc,nicu_type,nicu_cause,nicu_continued_date,respirator_type,respirator_continued_date,respirator_continued_date_unit,outside_response,baby_patient_id,baby_ear_id,apgar_unknown
190 194 from baby_patient_extend_ear_birth where id = #{id,jdbcType=VARCHAR}
191 195 </select>
192 196  
... ... @@ -331,7 +335,7 @@
331 335 <select id="queryBabyPatientExtendEarBirth" resultMap="BabyPatientExtendEarBirthResultMap"
332 336 parameterType="com.lyms.platform.permission.model.BabyPatientExtendEarBirthQuery">
333 337 select
334   - id,fetu_number,product_number,birth_weight,tire_number,parturition_type,birth_defect_type,birth_defect_desc,fetu_embarras_type,apgar_score_one,apgar_score_five,apgar_score_ten,birth_injury_type,birth_injury_position,amniotic_fluid_type,abnormal_parturition_type,abnormal_parturition_position,deformity_type,deformity_position,birth_infection_type,birth_infection_cause,birth_course_disease,birth_ill_type,birth_ill_cause,birth_ill_disease,head_trauma_history,head_trauma_desc,ear_poison_type,ear_poison_map,tympanitis_type,tympanitis_desc,nicu_type,nicu_cause,nicu_continued_date,respirator_type,respirator_continued_date,respirator_continued_date_unit,outside_response,baby_patient_id,baby_ear_id
  338 + id,fetu_number,product_number,birth_weight,tire_number,parturition_type,birth_defect_type,birth_defect_desc,fetu_embarras_type,apgar_score_one,apgar_score_five,apgar_score_ten,birth_injury_type,birth_injury_position,amniotic_fluid_type,abnormal_parturition_type,abnormal_parturition_position,deformity_type,deformity_position,birth_infection_type,birth_infection_cause,birth_course_disease,birth_ill_type,birth_ill_cause,birth_ill_disease,head_trauma_history,head_trauma_desc,ear_poison_type,ear_poison_map,tympanitis_type,tympanitis_desc,nicu_type,nicu_cause,nicu_continued_date,respirator_type,respirator_continued_date,respirator_continued_date_unit,outside_response,baby_patient_id,baby_ear_id,apgar_unknown
335 339 from baby_patient_extend_ear_birth
336 340 <include refid="BabyPatientExtendEarBirthCondition"/>
337 341 <include refid="orderAndLimit"/>
platform-biz-service/src/main/resources/mainOrm/master/PatientMarkHospital.xml View file @ cee8866
... ... @@ -255,6 +255,18 @@
255 255 <if test="hospitDate != null">
256 256 and hospit_date = #{hospitDate,jdbcType=TIMESTAMP}
257 257 </if>
  258 + <if test="hospitStartDate != null">
  259 + AND
  260 + <![CDATA[
  261 + DATEDIFF(#{hospitStartDate},hospit_date)<=0
  262 + ]]>
  263 + </if>
  264 + <if test="hospitEndDate != null">
  265 + AND
  266 + <![CDATA[
  267 + DATEDIFF(#{hospitEndDate},hospit_date)>=0
  268 + ]]>
  269 + </if>
258 270 <if test="hospitType != null">
259 271 and hospit_type = #{hospitType,jdbcType=INTEGER}
260 272 </if>
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientMarkHospitalController.java View file @ cee8866
... ... @@ -41,7 +41,8 @@
41 41  
42 42  
43 43 /**
44   - * 预约住院提醒列表
  44 + * 预约住院提统计
  45 + *
45 46 * @param request
46 47 * @return
47 48 */
48 49  
49 50  
... ... @@ -51,11 +52,65 @@
51 52 public BaseResponse reportHospit(PatientMarkRequest patientMarkRequest
52 53 , HttpServletRequest request) {
53 54 LoginContext loginState = (LoginContext) request.getAttribute("loginContext");
54   - return patientMarkHospFacade.reportHospit(patientMarkRequest,loginState.getId());
  55 + return patientMarkHospFacade.reportHospit(patientMarkRequest, loginState.getId());
55 56 }
56 57  
57 58 /**
  59 + * 回院提统计
  60 + * @param request
  61 + * @return
  62 + */
  63 + @RequestMapping(value = "/reportBackHospit", method = {RequestMethod.POST, RequestMethod.GET})
  64 + @ResponseBody
  65 + @TokenRequired
  66 + public BaseResponse reportBackHospit(PatientMarkRequest patientMarkRequest
  67 + , HttpServletRequest request) {
  68 + LoginContext loginState = (LoginContext) request.getAttribute("loginContext");
  69 + return patientMarkHospFacade.reportBackHospit(patientMarkRequest, loginState.getId());
  70 + }
  71 + /**
  72 + * 住院提统计
  73 + * @param request
  74 + * @return
  75 + */
  76 + @RequestMapping(value = "/reportInHospit", method = {RequestMethod.POST, RequestMethod.GET})
  77 + @ResponseBody
  78 + @TokenRequired
  79 + public BaseResponse reportInHospit(PatientMarkRequest patientMarkRequest
  80 + , HttpServletRequest request) {
  81 + LoginContext loginState = (LoginContext) request.getAttribute("loginContext");
  82 + return patientMarkHospFacade.reportInHospit(patientMarkRequest, loginState.getId());
  83 + }
  84 + /**
  85 + * 实际住院提统计
  86 + * @param request
  87 + * @return
  88 + */
  89 + @RequestMapping(value = "/reportRealityHospit", method = {RequestMethod.POST, RequestMethod.GET})
  90 + @ResponseBody
  91 + @TokenRequired
  92 + public BaseResponse reportRealityHospit(PatientMarkRequest patientMarkRequest
  93 + , HttpServletRequest request) {
  94 + LoginContext loginState = (LoginContext) request.getAttribute("loginContext");
  95 + return patientMarkHospFacade.reportRealityHospit(patientMarkRequest, loginState.getId());
  96 + }
  97 + /**
  98 + * 预约失败住院提统计
  99 + * @param request
  100 + * @return
  101 + */
  102 + @RequestMapping(value = "/reportFailureHospit", method = {RequestMethod.POST, RequestMethod.GET})
  103 + @ResponseBody
  104 + @TokenRequired
  105 + public BaseResponse reportFailureHospit(PatientMarkRequest patientMarkRequest
  106 + , HttpServletRequest request) {
  107 + LoginContext loginState = (LoginContext) request.getAttribute("loginContext");
  108 + return patientMarkHospFacade.reportFailureHospit(patientMarkRequest, loginState.getId());
  109 + }
  110 +
  111 + /**
58 112 * 预约住院提醒列表
  113 + *
59 114 * @param request
60 115 * @return
61 116 */
... ... @@ -65,7 +120,7 @@
65 120 public BaseResponse list(PatientMarkRequest patientMarkRequest
66 121 , HttpServletRequest request) {
67 122 LoginContext loginState = (LoginContext) request.getAttribute("loginContext");
68   - return patientMarkHospFacade.getPatientMarkHospital(patientMarkRequest,loginState.getId());
  123 + return patientMarkHospFacade.getPatientMarkHospital(patientMarkRequest, loginState.getId());
69 124 }
70 125  
71 126  
72 127  
... ... @@ -81,9 +136,9 @@
81 136 @TokenRequired
82 137 public BaseResponse create(PatientMarkHospital patientMarkHospital, HttpServletRequest request) {
83 138 LoginContext loginState = (LoginContext) request.getAttribute("loginContext");
84   - if(StringUtils.isNotEmpty(patientMarkHospital.getId())){
  139 + if (StringUtils.isNotEmpty(patientMarkHospital.getId())) {
85 140 return patientMarkHospFacade.updatePatientMarkHospital(patientMarkHospital, 1, loginState.getId());
86   - }else{
  141 + } else {
87 142 return patientMarkHospFacade.addPatientMarkHospital(patientMarkHospital, loginState.getId());
88 143 }
89 144 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyEarFacade.java View file @ cee8866
... ... @@ -856,8 +856,8 @@
856 856 JSONObject historyJson = JSONObject.parseObject(babyPatientExtendEarFamily.getBadLifeHistory());
857 857 StringBuffer historyStr = new StringBuffer("");
858 858 if (historyJson.containsKey("yesOrNo")) {
859   - int yesOrNo = historyJson.getIntValue("yesOrNo");
860   - if (yesOrNo == 1) {
  859 + Integer yesOrNo = historyJson.getInteger("yesOrNo");
  860 + if (yesOrNo!=null && yesOrNo == 1) {
861 861 historyStr.append("有,");
862 862 if (historyJson.containsKey("yinJiu")) {
863 863 boolean yinJiu = historyJson.getBoolean("yinJiu");
... ... @@ -927,7 +927,7 @@
927 927 if (fz) {
928 928 historyStr.append("风疹");
929 929 if (historyJson.containsKey("fzSelected")) {
930   - int fzSelected = historyJson.getIntValue("fzSelected");
  930 + int fzSelected = historyJson.getInteger("fzSelected");
931 931 historyStr.append("(孕" + fzSelected + "周),");
932 932 }
933 933 }
... ... @@ -937,7 +937,7 @@
937 937 if (gxc) {
938 938 historyStr.append("弓形虫");
939 939 if (historyJson.containsKey("gxcSelected")) {
940   - int gxcSelected = historyJson.getIntValue("gxcSelected");
  940 + int gxcSelected = historyJson.getInteger("gxcSelected");
941 941 historyStr.append("(孕" + gxcSelected + "周),");
942 942 }
943 943 }
... ... @@ -948,7 +948,7 @@
948 948 if (jxbbd) {
949 949 historyStr.append("巨细胞病毒");
950 950 if (historyJson.containsKey("jxbbdSelected")) {
951   - int jxbbdSelected = historyJson.getIntValue("jxbbdSelected");
  951 + int jxbbdSelected = historyJson.getInteger("jxbbdSelected");
952 952 historyStr.append("(孕" + jxbbdSelected + "周),");
953 953 }
954 954 }
... ... @@ -958,7 +958,7 @@
958 958 if (pz) {
959 959 historyStr.append("疱疹");
960 960 if (historyJson.containsKey("pzSelected")) {
961   - int pzSelected = historyJson.getIntValue("pzSelected");
  961 + int pzSelected = historyJson.getInteger("pzSelected");
962 962 historyStr.append("(孕" + pzSelected + "周),");
963 963 }
964 964 }
... ... @@ -994,7 +994,7 @@
994 994 if (lb) {
995 995 historyStr.append("淋病");
996 996 if (historyJson.containsKey("lbSelected")) {
997   - int lbSelected = historyJson.getIntValue("lbSelected");
  997 + int lbSelected = historyJson.getInteger("lbSelected");
998 998 historyStr.append("(孕" + lbSelected + "周),");
999 999 }
1000 1000 }
... ... @@ -1004,7 +1004,7 @@
1004 1004 if (gxc) {
1005 1005 historyStr.append("弓形虫");
1006 1006 if (historyJson.containsKey("gxcSelected")) {
1007   - int gxcSelected = historyJson.getIntValue("gxcSelected");
  1007 + int gxcSelected = historyJson.getInteger("gxcSelected");
1008 1008 historyStr.append("(孕" + gxcSelected + "周),");
1009 1009 }
1010 1010 }
... ... @@ -1015,7 +1015,7 @@
1015 1015 if (md) {
1016 1016 historyStr.append("梅毒");
1017 1017 if (historyJson.containsKey("mdSelected")) {
1018   - int mdSelected = historyJson.getIntValue("mdSelected");
  1018 + int mdSelected = historyJson.getInteger("mdSelected");
1019 1019 historyStr.append("(孕" + mdSelected + "周),");
1020 1020 }
1021 1021 }
... ... @@ -1025,7 +1025,7 @@
1025 1025 if (jrsz) {
1026 1026 historyStr.append("尖锐湿疹");
1027 1027 if (historyJson.containsKey("jrszSelected")) {
1028   - int jrszSelected = historyJson.getIntValue("jrszSelected");
  1028 + int jrszSelected = historyJson.getInteger("jrszSelected");
1029 1029 historyStr.append("(孕" + jrszSelected + "周),");
1030 1030 }
1031 1031 }
1032 1032  
... ... @@ -1058,12 +1058,14 @@
1058 1058 JSONObject historyJson = JSONObject.parseObject(babyPatientExtendEarMother.getRadiationHistoryType());
1059 1059 StringBuffer historyStr = new StringBuffer("");
1060 1060 if (historyJson.containsKey("yesOrNo")) {
1061   - int yesOrNo = historyJson.getIntValue("yesOrNo");
1062   - if (yesOrNo == 1) {
1063   - historyStr.append("有,");
  1061 + Integer yesOrNo = historyJson.getInteger("yesOrNo");
  1062 + if (yesOrNo!=null && yesOrNo == 1) {
  1063 + historyStr.append("有");
1064 1064 if (historyJson.containsKey("other")) {
1065   - int other = historyJson.getIntValue("other");
1066   - historyStr.append("(孕" + other + "周)");
  1065 + Integer other = historyJson.getInteger("other");
  1066 + if(other!=null){
  1067 + historyStr.append("(孕" + other + "周)");
  1068 + }
1067 1069 }
1068 1070 }
1069 1071 }
... ... @@ -1073,8 +1075,8 @@
1073 1075 if (StringUtils.isNotEmpty(babyPatientExtendEarMother.getDrugAppName())) {
1074 1076 JSONObject historyJson = JSONObject.parseObject(babyPatientExtendEarMother.getDrugAppName());
1075 1077 if (historyJson.containsKey("yesOrNo")) {
1076   - int yesOrNo = historyJson.getIntValue("yesOrNo");
1077   - if (1 == yesOrNo) {
  1078 + Integer yesOrNo = historyJson.getInteger("yesOrNo");
  1079 + if (yesOrNo!=null && yesOrNo == 1) {
1078 1080 historyJson.put("yesOrNo", "有");
1079 1081 } else {
1080 1082 historyJson.put("yesOrNo", "无");
... ... @@ -1086,8 +1088,8 @@
1086 1088 if (StringUtils.isNotEmpty(babyPatientExtendEarMother.getAbortionHistoryType())) {
1087 1089 JSONObject historyJson = JSONObject.parseObject(babyPatientExtendEarMother.getAbortionHistoryType());
1088 1090 if (historyJson.containsKey("yesOrNo")) {
1089   - int yesOrNo = historyJson.getIntValue("yesOrNo");
1090   - if (1 == yesOrNo) {
  1091 + Integer yesOrNo = historyJson.getInteger("yesOrNo");
  1092 + if (yesOrNo!=null && yesOrNo == 1) {
1091 1093 historyJson.put("yesOrNo", "有");
1092 1094 } else {
1093 1095 historyJson.put("yesOrNo", "无");
... ... @@ -1104,8 +1106,8 @@
1104 1106 if (StringUtils.isNotEmpty(babyPatientExtendEarMother.getHarmfulSubstanceType())) {
1105 1107 JSONObject historyJson = JSONObject.parseObject(babyPatientExtendEarMother.getHarmfulSubstanceType());
1106 1108 if (historyJson.containsKey("yesOrNo")) {
1107   - int yesOrNo = historyJson.getIntValue("yesOrNo");
1108   - if (1 == yesOrNo) {
  1109 + Integer yesOrNo = historyJson.getInteger("yesOrNo");
  1110 + if (yesOrNo!=null && yesOrNo == 1) {
1109 1111 historyJson.put("yesOrNo", "有");
1110 1112 } else {
1111 1113 historyJson.put("yesOrNo", "无");
... ... @@ -1119,8 +1121,8 @@
1119 1121  
1120 1122 JSONObject historyJson = JSONObject.parseObject(babyPatientExtendEarMother.getBadLifeHistoryType());
1121 1123 if (historyJson.containsKey("yesOrNo")) {
1122   - int yesOrNo = historyJson.getIntValue("yesOrNo");
1123   - if (1 == yesOrNo) {
  1124 + Integer yesOrNo = historyJson.getInteger("yesOrNo");
  1125 + if (yesOrNo!=null && yesOrNo == 1) {
1124 1126 historyStr.append("有,");
1125 1127 }
1126 1128 }
... ... @@ -1157,8 +1159,8 @@
1157 1159  
1158 1160 JSONObject historyJson = JSONObject.parseObject(babyPatientExtendEarMother.getMedicalHistoryType());
1159 1161 if (historyJson.containsKey("yesOrNo")) {
1160   - int yesOrNo = historyJson.getIntValue("yesOrNo");
1161   - if (1 == yesOrNo) {
  1162 + Integer yesOrNo = historyJson.getInteger("yesOrNo");
  1163 + if (yesOrNo!=null && yesOrNo == 1) {
1162 1164 historyStr.append("有,");
1163 1165 }
1164 1166 }
... ... @@ -1211,8 +1213,8 @@
1211 1213  
1212 1214 JSONObject historyJson = JSONObject.parseObject(babyPatientExtendEarMother.getBnormalPregnancyHistoryType());
1213 1215 if (historyJson.containsKey("yesOrNo")) {
1214   - int yesOrNo = historyJson.getIntValue("yesOrNo");
1215   - if (1 == yesOrNo) {
  1216 + Integer yesOrNo = historyJson.getInteger("yesOrNo");
  1217 + if (yesOrNo!=null && yesOrNo == 1) {
1216 1218 historyStr.append("有,");
1217 1219 }
1218 1220 }
... ... @@ -1299,7 +1301,7 @@
1299 1301 if (babyPatientExtendEarBirth.getBirthInjuryType() != null) {
1300 1302 if (babyPatientExtendEarBirth.getBirthInjuryType() == 1) {//有
1301 1303 birthInjuryType = "有";
1302   - if (StringUtils.isNotEmpty(babyPatientExtendEarBirth.getBirthDefectDesc())) {
  1304 + if (StringUtils.isNotEmpty(babyPatientExtendEarBirth.getBirthInjuryPosition())) {
1303 1305 birthInjuryType = "有," + babyPatientExtendEarBirth.getBirthInjuryPosition();
1304 1306 }
1305 1307 }
1306 1308  
1307 1309  
... ... @@ -1342,11 +1344,13 @@
1342 1344 }
1343 1345 babyEarBirthView.setFetuEmbarras(fetuStr);
1344 1346  
1345   - String apgarScore = "";
1346 1347 if (babyPatientExtendEarBirth.getApgarScoreOne() != null && babyPatientExtendEarBirth.getApgarScoreFive() != null && babyPatientExtendEarBirth.getApgarScoreTen() != null) {
1347   - apgarScore = babyPatientExtendEarBirth.getApgarScoreOne() + UnitConstants.FEN + " - " + babyPatientExtendEarBirth.getApgarScoreFive() + UnitConstants.FEN + " - " + babyPatientExtendEarBirth.getApgarScoreTen() + UnitConstants.FEN;
  1348 + String apgarScore = babyPatientExtendEarBirth.getApgarScoreOne() + UnitConstants.FEN + " - " + babyPatientExtendEarBirth.getApgarScoreFive() + UnitConstants.FEN + " - " + babyPatientExtendEarBirth.getApgarScoreTen() + UnitConstants.FEN;
  1349 + babyEarBirthView.setApgarScore(apgarScore);
  1350 + }else if(babyPatientExtendEarBirth.getApgarUnknown()!=null&&babyPatientExtendEarBirth.getApgarUnknown()==1){
  1351 + babyEarBirthView.setApgarScore("不详");
1348 1352 }
1349   - babyEarBirthView.setApgarScore(apgarScore);
  1353 +
1350 1354  
1351 1355 String deformity = "";
1352 1356 if (babyPatientExtendEarBirth.getDeformityType() != null && babyPatientExtendEarBirth.getDeformityType() == 1) {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientMarkHospServiceFacade.java View file @ cee8866
... ... @@ -48,24 +48,26 @@
48 48  
49 49 /**
50 50 * 住院预约统计
  51 + *
51 52 * @param patientMarkRequest
52 53 * @param id
53 54 * @return
54 55 */
55   - public BaseResponse reportHospit(PatientMarkRequest patientMarkRequest, Integer id){
  56 + public BaseResponse reportHospit(PatientMarkRequest patientMarkRequest, Integer id) {
56 57 PatientMarkHospitalQuery query = new PatientMarkHospitalQuery();
  58 + query.setMakeStartDate(patientMarkRequest.getMakeStartDate());
  59 + query.setMakeEndDate(patientMarkRequest.getMakeEndDate());
57 60 //根据用户id获取医院ID
58 61 String hospitalId = autoMatchFacade.getHospitalId(id);
59   - PatientMarkHospitalQuery patientMarkHospQuery = new PatientMarkHospitalQuery();
60   - patientMarkHospQuery.setHospitalId(hospitalId);
  62 + query.setHospitalId(hospitalId);
61 63 PatientsQuery patientsQuery = new PatientsQuery();
62   - List<Patients> patientses = setPatientIds(patientMarkRequest,patientsQuery,hospitalId);
  64 + List<Patients> patientses = setPatientIds(patientMarkRequest, patientsQuery, hospitalId);
63 65 if (CollectionUtils.isNotEmpty(patientses)) {
64 66 List<String> parentIds = new LinkedList<>();
65 67 for (Patients pa : patientses) {
66 68 parentIds.add(pa.getId());
67 69 }
68   - patientMarkHospQuery.setPatientIds((String[]) parentIds.toArray(new String[parentIds.size()]));
  70 + query.setPatientIds((String[]) parentIds.toArray(new String[parentIds.size()]));
69 71 } else if (null != patientMarkRequest.getcDueWeekStart() || null != patientMarkRequest.getcDueWeekEnd()) {
70 72 return new BaseListResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
71 73 }
72 74  
... ... @@ -79,10 +81,10 @@
79 81 //列数据
80 82 List<String> legendData = new ArrayList<>();
81 83 List<Map<String, Object>> serData = new ArrayList<>();
82   - Map<String,Integer> otherMap = new HashedMap();
83   - otherMap.put("count",count);
  84 + Map<String, Integer> otherMap = new HashedMap();
  85 + otherMap.put("count", count);
84 86  
85   - for(ReportMakeHosptail rm:reportMakeHosptails){
  87 + for (ReportMakeHosptail rm : reportMakeHosptails) {
86 88 Map<String, Object> map = new HashedMap();
87 89 Users users = usersService.getUsers(Integer.parseInt(rm.getDoctorId()));
88 90 if (users != null) {
... ... @@ -91,8 +93,8 @@
91 93 rm.setDoctorName("产检医生");
92 94 }
93 95 legendData.add(rm.getDoctorName());
94   - map.put("value",rm.getNum());
95   - map.put("name",rm.getDoctorName());
  96 + map.put("value", rm.getNum());
  97 + map.put("name", rm.getDoctorName());
96 98 serData.add(map);
97 99 }
98 100 PieReportModel pieReportModel = new PieReportModel();
99 101  
100 102  
101 103  
... ... @@ -108,17 +110,20 @@
108 110  
109 111 /**
110 112 * 回院预约统计
  113 + *
111 114 * @param patientMarkRequest
112 115 * @param id
113 116 * @return
114 117 */
115   - public BaseListResponse reportBackHospit(PatientMarkRequest patientMarkRequest, Integer id){
  118 + public BaseResponse reportBackHospit(PatientMarkRequest patientMarkRequest, Integer id) {
116 119 //根据用户id获取医院ID
117 120 String hospitalId = autoMatchFacade.getHospitalId(id);
118 121 PatientMarkHospitalQuery patientMarkHospQuery = new PatientMarkHospitalQuery();
119 122 patientMarkHospQuery.setHospitalId(hospitalId);
  123 + patientMarkHospQuery.setBackStartDate(patientMarkRequest.getMakeStartDate());
  124 + patientMarkHospQuery.setBackEndDate(patientMarkRequest.getMakeEndDate());
120 125 PatientsQuery patientsQuery = new PatientsQuery();
121   - List<Patients> patientses = setPatientIds(patientMarkRequest,patientsQuery,hospitalId);
  126 + List<Patients> patientses = setPatientIds(patientMarkRequest, patientsQuery, hospitalId);
122 127 if (CollectionUtils.isNotEmpty(patientses)) {
123 128 List<String> parentIds = new LinkedList<>();
124 129 for (Patients pa : patientses) {
125 130  
126 131  
127 132  
128 133  
129 134  
130 135  
131 136  
132 137  
133 138  
... ... @@ -136,33 +141,68 @@
136 141 patientMarkHospQuery.setBackStatus(1);
137 142 //回院待提醒数
138 143 int waitCount = patientMarkHospitalService.queryPatientMarkHospitalCount(patientMarkHospQuery);
139   - for(ReportMakeHosptail rm:reportMakeHosptails){
  144 + //列数据
  145 + List<String> legendData = new ArrayList<>();
  146 + List<Map<String, Object>> serData = new ArrayList<>();
  147 + Map<String, Integer> otherMap = new HashedMap();
  148 + otherMap.put("count", count);
  149 + otherMap.put("waitCount", waitCount);
  150 +
  151 + int succNum = 0;
  152 + int errNum = 0;
  153 +
  154 + for (ReportMakeHosptail rm : reportMakeHosptails) {
  155 + legendData.add(rm.getDoctorName());
140 156 Users users = usersService.getUsers(Integer.parseInt(rm.getDoctorId()));
141 157 if (users != null) {
142 158 rm.setDoctorName(users.getName());
143 159 } else {
144 160 rm.setDoctorName("产检医生");
145 161 }
146   - rm.setSuccOccupCompar(rm.getNum()/rm.getSuccNum());
  162 + succNum += rm.getSuccNum();
  163 + errNum += rm.getErrNum();
147 164 }
148   - return new BaseListResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(reportMakeHosptails);
149   - }
150 165  
  166 + legendData.add("回院提醒成功总数");
  167 + legendData.add("回院提醒失败总数");
  168 + Map<String, Object> map = new HashedMap();
  169 + map.put("value", succNum);
  170 + map.put("name", "回院提醒成功总数");
  171 + serData.add(map);
  172 + map = new HashedMap();
  173 + map.put("value", errNum);
  174 + map.put("name", "回院提醒失败总数");
  175 + serData.add(map);
151 176  
  177 + PieReportModel pieReportModel = new PieReportModel();
  178 + pieReportModel.setLegendData(legendData);
  179 + pieReportModel.setSeriesData(serData);
  180 + pieReportModel.setData(reportMakeHosptails);
  181 + pieReportModel.setOtherMap(otherMap);
  182 + BaseResponse result = new BaseResponse();
  183 + result.setObject(pieReportModel);
  184 + result.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
  185 + return result;
  186 + }
152 187  
  188 +
153 189 /**
154 190 * 住院提醒统计
  191 + *
155 192 * @param patientMarkRequest
156 193 * @param id
157 194 * @return
158 195 */
159   - public BaseListResponse reportInHospit(PatientMarkRequest patientMarkRequest, Integer id){
  196 + public BaseResponse reportInHospit(PatientMarkRequest patientMarkRequest, Integer id) {
160 197 //根据用户id获取医院ID
161 198 String hospitalId = autoMatchFacade.getHospitalId(id);
162 199 PatientMarkHospitalQuery patientMarkHospQuery = new PatientMarkHospitalQuery();
163 200 patientMarkHospQuery.setHospitalId(hospitalId);
  201 + patientMarkHospQuery.setInHospitStartDate(patientMarkRequest.getMakeStartDate());
  202 + patientMarkHospQuery.setInHospitEndDate(patientMarkRequest.getMakeEndDate());
  203 +
164 204 PatientsQuery patientsQuery = new PatientsQuery();
165   - List<Patients> patientses = setPatientIds(patientMarkRequest,patientsQuery,hospitalId);
  205 + List<Patients> patientses = setPatientIds(patientMarkRequest, patientsQuery, hospitalId);
166 206 if (CollectionUtils.isNotEmpty(patientses)) {
167 207 List<String> parentIds = new LinkedList<>();
168 208 for (Patients pa : patientses) {
169 209  
170 210  
171 211  
172 212  
173 213  
174 214  
... ... @@ -181,30 +221,65 @@
181 221 patientMarkHospQuery.setInHospitStatus(1);
182 222 //待住院提醒总数
183 223 int waitCount = patientMarkHospitalService.queryPatientMarkHospitalCount(patientMarkHospQuery);
184   - for(ReportMakeHosptail rm:reportMakeHosptails){
  224 + //列数据
  225 + List<String> legendData = new ArrayList<>();
  226 + List<Map<String, Object>> serData = new ArrayList<>();
  227 + Map<String, Integer> otherMap = new HashedMap();
  228 + otherMap.put("count", count);
  229 + otherMap.put("waitCount", waitCount);
  230 +
  231 + int succNum = 0;
  232 + int errNum = 0;
  233 + for (ReportMakeHosptail rm : reportMakeHosptails) {
185 234 Users users = usersService.getUsers(Integer.parseInt(rm.getDoctorId()));
186 235 if (users != null) {
187 236 rm.setDoctorName(users.getName());
188 237 } else {
189 238 rm.setDoctorName("产检医生");
190 239 }
  240 + succNum += rm.getSuccNum();
  241 + errNum += rm.getErrNum();
191 242 }
192   - return new BaseListResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(reportMakeHosptails);
  243 + legendData.add("成功住院预约数量");
  244 + legendData.add("失败预约住院数量");
  245 + Map<String, Object> map = new HashedMap();
  246 + map.put("value", succNum);
  247 + map.put("name", "回院提醒成功总数");
  248 + serData.add(map);
  249 + map = new HashedMap();
  250 + map.put("value", errNum);
  251 + map.put("name", "回院提醒失败总数");
  252 + serData.add(map);
  253 +
  254 +
  255 + PieReportModel pieReportModel = new PieReportModel();
  256 + pieReportModel.setLegendData(legendData);
  257 + pieReportModel.setSeriesData(serData);
  258 + pieReportModel.setData(reportMakeHosptails);
  259 + pieReportModel.setOtherMap(otherMap);
  260 + BaseResponse result = new BaseResponse();
  261 + result.setObject(pieReportModel);
  262 + result.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
  263 + return result;
193 264 }
194 265  
195 266 /**
196 267 * 实际住院统计
  268 + *
197 269 * @param patientMarkRequest
198 270 * @param id
199 271 * @return
200 272 */
201   - public BaseListResponse reportRealityHospit(PatientMarkRequest patientMarkRequest, Integer id){
  273 + public BaseResponse reportRealityHospit(PatientMarkRequest patientMarkRequest, Integer id) {
202 274 //根据用户id获取医院ID
203 275 String hospitalId = autoMatchFacade.getHospitalId(id);
204 276 PatientMarkHospitalQuery patientMarkHospQuery = new PatientMarkHospitalQuery();
  277 + patientMarkHospQuery.setHospitStartDate(patientMarkRequest.getMakeStartDate());
  278 + patientMarkHospQuery.setHospitEndDate(patientMarkRequest.getMakeEndDate());
  279 +
205 280 patientMarkHospQuery.setHospitalId(hospitalId);
206 281 PatientsQuery patientsQuery = new PatientsQuery();
207   - List<Patients> patientses = setPatientIds(patientMarkRequest,patientsQuery,hospitalId);
  282 + List<Patients> patientses = setPatientIds(patientMarkRequest, patientsQuery, hospitalId);
208 283 if (CollectionUtils.isNotEmpty(patientses)) {
209 284 List<String> parentIds = new LinkedList<>();
210 285 for (Patients pa : patientses) {
211 286  
212 287  
213 288  
214 289  
215 290  
216 291  
217 292  
... ... @@ -214,32 +289,58 @@
214 289 } else if (null != patientMarkRequest.getcDueWeekStart() || null != patientMarkRequest.getcDueWeekEnd()) {
215 290 return new BaseListResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
216 291 }
217   -
  292 + //列数据
  293 + List<String> legendData = new ArrayList<>();
  294 + List<Map<String, Object>> serData = new ArrayList<>();
  295 + int num = 0;
  296 + int succNum = 0;
218 297 //实际住院统计数据
219 298 List<ReportMakeHosptail> reportMakeHosptails = patientMarkHospitalService.reportRealityByInDoctor(patientMarkHospQuery);
220   - for(ReportMakeHosptail rm:reportMakeHosptails){
  299 + for (ReportMakeHosptail rm : reportMakeHosptails) {
221 300 Users users = usersService.getUsers(Integer.parseInt(rm.getDoctorId()));
222 301 if (users != null) {
223 302 rm.setDoctorName(users.getName());
224 303 } else {
225 304 rm.setDoctorName("产检医生");
226 305 }
  306 + succNum += rm.getSuccNum();
  307 + num += rm.getNum();
227 308 }
228   - return new BaseListResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(reportMakeHosptails);
  309 + legendData.add("住院提醒成功总数");
  310 + legendData.add("实际住院总数");
  311 + Map<String, Object> map = new HashedMap();
  312 + map.put("value", succNum);
  313 + map.put("name", "实际住院总数");
  314 + serData.add(map);
  315 + map = new HashedMap();
  316 + map.put("value", num);
  317 + map.put("name", "住院提醒成功总数");
  318 + serData.add(map);
  319 +
  320 + PieReportModel pieReportModel = new PieReportModel();
  321 + pieReportModel.setLegendData(legendData);
  322 + pieReportModel.setSeriesData(serData);
  323 + pieReportModel.setData(reportMakeHosptails);
  324 + BaseResponse result = new BaseResponse();
  325 + result.setObject(pieReportModel);
  326 + result.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
  327 + return result;
229 328 }
  329 +
230 330 /**
231 331 * 预约失败统计
  332 + *
232 333 * @param patientMarkRequest
233 334 * @param id
234 335 * @return
235 336 */
236   - public BaseListResponse reportFailureHospit(PatientMarkRequest patientMarkRequest, Integer id){
  337 + public BaseResponse reportFailureHospit(PatientMarkRequest patientMarkRequest, Integer id) {
237 338 //根据用户id获取医院ID
238 339 String hospitalId = autoMatchFacade.getHospitalId(id);
239 340 PatientMarkHospitalQuery patientMarkHospQuery = new PatientMarkHospitalQuery();
240 341 patientMarkHospQuery.setHospitalId(hospitalId);
241 342 PatientsQuery patientsQuery = new PatientsQuery();
242   - List<Patients> patientses = setPatientIds(patientMarkRequest,patientsQuery,hospitalId);
  343 + List<Patients> patientses = setPatientIds(patientMarkRequest, patientsQuery, hospitalId);
243 344 if (CollectionUtils.isNotEmpty(patientses)) {
244 345 List<String> parentIds = new LinkedList<>();
245 346 for (Patients pa : patientses) {
246 347  
247 348  
... ... @@ -250,12 +351,53 @@
250 351 return new BaseListResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
251 352 }
252 353  
  354 + //列数据
  355 + List<String> legendData = new ArrayList<>();
  356 + List<Map<String, Object>> serData = new ArrayList<>();
  357 + int noPhoneNum = 0;
  358 + int indeterNum = 0;
  359 + int otherHospNum = 0;
  360 + int otherNum = 0;
253 361 //提醒失败统计数据
254 362 List<ReportFailureHosptail> reportMakeHosptails = patientMarkHospitalService.reportFailure(patientMarkHospQuery);
255   - return new BaseListResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(reportMakeHosptails);
  363 + for (ReportFailureHosptail rf : reportMakeHosptails) {
  364 + noPhoneNum += rf.getNoPhoneNum();
  365 + indeterNum += rf.getIndeterNum();
  366 + otherHospNum += rf.getOtherHospNum();
  367 + otherNum += rf.getOtherNum();
  368 + }
  369 + legendData.add("电话无人接听");
  370 + legendData.add("暂时不确定");
  371 + legendData.add("他院已办理");
  372 + legendData.add("其他");
  373 + Map<String, Object> map = new HashedMap();
  374 + map.put("value", noPhoneNum);
  375 + map.put("name", "电话无人接听");
  376 + serData.add(map);
  377 + map = new HashedMap();
  378 + map.put("value", indeterNum);
  379 + map.put("name", "暂时不确定");
  380 + serData.add(map);
  381 + map = new HashedMap();
  382 + map.put("value", otherHospNum);
  383 + map.put("name", "他院已办理");
  384 + serData.add(map);
  385 + map = new HashedMap();
  386 + map.put("value", otherNum);
  387 + map.put("name", "其他");
  388 + serData.add(map);
  389 +
  390 + PieReportModel pieReportModel = new PieReportModel();
  391 + pieReportModel.setLegendData(legendData);
  392 + pieReportModel.setSeriesData(serData);
  393 + pieReportModel.setData(reportMakeHosptails);
  394 + BaseResponse result = new BaseResponse();
  395 + result.setObject(pieReportModel);
  396 + result.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
  397 + return result;
256 398 }
257 399  
258   - public List<Patients> setPatientIds(PatientMarkRequest patientMarkRequest,PatientsQuery patientsQuery,String hospitalId){
  400 + public List<Patients> setPatientIds(PatientMarkRequest patientMarkRequest, PatientsQuery patientsQuery, String hospitalId) {
259 401 //根据查询号、当前孕周进行查询
260 402 if (null != patientMarkRequest.getcDueWeekStart() || null != patientMarkRequest.getcDueWeekEnd()) {
261 403 if (null != patientMarkRequest.getcDueWeekStart()) {
262 404  
... ... @@ -266,13 +408,12 @@
266 408 }
267 409 patientsQuery.setHospitalId(hospitalId);
268 410 return patientsService.queryPatient1(patientsQuery, "modpatientsQueryified");
269   - }else{
  411 + } else {
270 412 return null;
271 413 }
272 414 }
273 415  
274 416  
275   -
276 417 /**
277 418 * 初始化接口
278 419 *
... ... @@ -388,7 +529,7 @@
388 529 markHospitalLog.setMarkeDate(ps.getInHospitDate());
389 530 markHospitalLog.setMarkeType(3);
390 531 // ps.setHospitStatus(1);
391   - if(ps.getHospitStatus()==null){
  532 + if (ps.getHospitStatus() == null) {
392 533 ps.setHospitStatus(1);
393 534 }
394 535 ps.setInHospitDoctor(String.valueOf(id));
... ... @@ -438,7 +579,7 @@
438 579 result.setBackResult(ps.getBackResult());
439 580 if (ps.getBackResult() != null) {
440 581 result.setBackResultStr(ps.getBackResult() == 1 ? "成功" : "失败");
441   - }else{
  582 + } else {
442 583 result.setBackResultStr("--");
443 584 }
444 585 if (ps.getBackDoctor() != null) {
445 586  
... ... @@ -463,10 +604,10 @@
463 604 if (ps.getInHospitResult() != null) {
464 605 result.setInHospitResult(ps.getInHospitResult());
465 606 result.setInHospitResultStr(ps.getInHospitResult() == 1 ? "成功" : "失败");
466   - }else{
  607 + } else {
467 608 result.setInHospitResultStr("--");
468 609 }
469   - if(ps.getInHospitDoctor()!=null){
  610 + if (ps.getInHospitDoctor() != null) {
470 611 Users users = usersService.getUsers(Integer.parseInt(ps.getInHospitDoctor()));
471 612 if (users != null) {
472 613 result.setInHospitDoctor(users.getName());
473 614  
474 615  
475 616  
... ... @@ -486,21 +627,21 @@
486 627 if (ps.getHospitStatus() != null) {
487 628 result.setHospitStatus(ps.getHospitStatus());
488 629 result.setHospitStatusStr(ps.getHospitStatus() == 1 ? "待住院" : "已住院");
489   - }else{
  630 + } else {
490 631 result.setHospitStatusStr("--");
491 632 }
492   - if(ps.getHospitDate()!=null){
  633 + if (ps.getHospitDate() != null) {
493 634 result.setHospitDate(DateUtil.getyyyy_MM_dd(ps.getHospitDate()));
494 635 }
495 636 if (ps.getHospitType() != null) {
496 637 result.setHospitTypeStr(ps.getHospitType() == 1 ? "分娩住院" : "其他住院");
497   - }else{
  638 + } else {
498 639 result.setHospitTypeStr("--");
499 640 }
500 641 result.setHospitType(ps.getHospitType());
501 642 result.setMakeInHospitDate(DateUtil.getyyyy_MM_dd(ps.getMakeInHospitDate()));
502 643 result.setMakeDate(DateUtil.getyyyy_MM_dd(ps.getMakeDate()));
503   - if(ps.getMakeDoctor()!=null){
  644 + if (ps.getMakeDoctor() != null) {
504 645 Users users = usersService.getUsers(Integer.parseInt(ps.getMakeDoctor()));
505 646 if (users != null) {
506 647 result.setMakeDoctor(users.getName());
... ... @@ -528,7 +669,7 @@
528 669 PatientMarkHospitalQuery patientMarkHospQuery = new PatientMarkHospitalQuery();
529 670 patientMarkHospQuery.setHospitalId(hospitalId);
530 671 PatientsQuery patientsQuery = new PatientsQuery();
531   - List<Patients> patientses = setPatientIds(patientMarkRequest,patientsQuery,hospitalId);
  672 + List<Patients> patientses = setPatientIds(patientMarkRequest, patientsQuery, hospitalId);
532 673 if (CollectionUtils.isNotEmpty(patientses)) {
533 674 List<String> parentIds = new LinkedList<>();
534 675 for (Patients pa : patientses) {
... ... @@ -593,7 +734,7 @@
593 734  
594 735 List<PatientMarkHospital> patientMarkHospitals = patientMarkHospitalService.queryPatientMarkHospital(patientMarkHospQuery);
595 736 for (PatientMarkHospital ps : patientMarkHospitals) {
596   - if (ps.getHospitType()!=null && ps.getHospitType() == 1) {//分娩住院跳过
  737 + if (ps.getHospitType() != null && ps.getHospitType() == 1) {//分娩住院跳过
597 738 continue;
598 739 }
599 740 synUpdateHisData(ps);