1、整理代码

2、病案首页增加住院号节点
master
leijx 5 years ago
parent a52230abe0
commit b5fde8deea

@ -1,26 +1,14 @@
package com.ann.demo.controller; package com.ann.demo.controller;
import com.ann.demo.entity.constant.InterfaceName; import com.ann.demo.entity.constant.InterfaceName;
import com.ann.demo.entity.interfaceEntity.ArchiveMaster;
import com.ann.demo.service.AnalysisService; import com.ann.demo.service.AnalysisService;
import com.ann.demo.service.UserService;
import com.ann.demo.utils.PinYinUtils;
import com.ann.demo.utils.XMLUtils;
import org.apache.cxf.endpoint.Client; import org.apache.cxf.endpoint.Client;
import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory; import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpRequest;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import java.io.File;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects; import java.util.Objects;
import java.util.concurrent.*; import java.util.concurrent.*;
@ -35,8 +23,6 @@ public class TestController {
@Autowired @Autowired
AnalysisService analysisService; AnalysisService analysisService;
@Autowired
UserService userService;
@RequestMapping("/demo") @RequestMapping("/demo")
public String aa() { public String aa() {
@ -119,7 +105,7 @@ public class TestController {
@RequestMapping("/dd") @RequestMapping("/dd")
public String dd() { public String dd() {
analysisService.delete(); //analysisService.delete();
return "不要生气了!!!"; return "不要生气了!!!";
} }

@ -10,36 +10,36 @@ import java.util.*;
*/ */
public class AliasName { public class AliasName {
public static final String USER = "用户字典"; // public static final String USER = "用户字典";
//
public static final String DEPARTMENT = "科室字典"; // public static final String DEPARTMENT = "科室字典";
//
// 超声报告 // // 超声报告
public static final String ULTRASONIC_REPORT = "57"; // public static final String ULTRASONIC_REPORT = "57";
//
// 病理检查报告单 // // 病理检查报告单
public static final String PATHOLOGY_REPORT = "52"; // public static final String PATHOLOGY_REPORT = "52";
//
// 放射诊断报告单 54 // // 放射诊断报告单 54
public static final String RADIATION_REPORT = "54"; // public static final String RADIATION_REPORT = "54";
//
// 心电图报告单 59 // // 心电图报告单 59
public static final String EKG_REPORT = "59"; // public static final String EKG_REPORT = "59";
//
// 入院记录 // // 入院记录
public static final String ADMISSION_RECORD = "9"; // public static final String ADMISSION_RECORD = "9";
//
// 出院记录 // // 出院记录
public static final String DISCHARGE_RECORD = "113"; // public static final String DISCHARGE_RECORD = "113";
//
// 转科记录 // // 转科记录
public static final String TRANSFER_RECORD = "114"; // public static final String TRANSFER_RECORD = "114";
//
// 取消入院 // // 取消入院
public static final String CANCELLATION_DISCHARGE = "115"; // public static final String CANCELLATION_DISCHARGE = "115";
//
// 患者更新 // // 患者更新
public static final String PATIENT_UPDATE = "124"; // public static final String PATIENT_UPDATE = "124";
// 手麻 // 手麻
public static final String HANDNUMBNESS_REPORT = "117"; public static final String HANDNUMBNESS_REPORT = "117";
@ -48,65 +48,65 @@ public class AliasName {
public static final String ICU_REPORT = "121"; public static final String ICU_REPORT = "121";
// 其他类型 目前来说 是手麻系统的其他三个 // 其他类型 目前来说 是手麻系统的其他三个
public static final String OTHER = "18"; // public static final String OTHER = "18";
// 检查申请单 // 检查申请单
public static final String PARAMETER_EXAMAPPLY = "119"; // public static final String PARAMETER_EXAMAPPLY = "119";
// 输血单 // 输血单
public static final String BLOODAPPLY_REPORT = "120"; public static final String BLOODAPPLY_REPORT = "120";
// PET/CT报告单 // PET/CT报告单
public static final String PETCT_REPORT = "60"; // public static final String PETCT_REPORT = "60";
// 检验申请单 // 检验申请单
public static final String PARAMETER_INSPECTIONAPPLY = "118"; // public static final String PARAMETER_INSPECTIONAPPLY = "118";
// 检验报告
public static final String INSPECTION_REPORT = "10";
// 扫描文件 // // 检验报告
public static final String SCANNING_FILE = "30"; // public static final String INSPECTION_REPORT = "10";
//
// // 扫描文件
// public static final String SCANNING_FILE = "30";
// 护理、医生 // 护理、医生
public static final Map<String, String> DOCTOR_MAP; // public static final Map<String, String> DOCTOR_MAP;
public static final Map<String, String> NURSE_MAP; // public static final Map<String, String> NURSE_MAP;
// 病案首页 // 病案首页
public static final String MEDICAL_RECORD_HOMEPAGE = "3"; public static final String MEDICAL_RECORD_HOMEPAGE = "3";
// 20191021 申请单变更状态 // 20191021 申请单变更状态
public static final String EXAM_APPLY_STATE_CHANGE = "31"; // public static final String EXAM_APPLY_STATE_CHANGE = "31";
static { // static {
DOCTOR_MAP = new HashMap<String, String>(); // DOCTOR_MAP = new HashMap<String, String>();
DOCTOR_MAP.put("入院记录", "9"); // DOCTOR_MAP.put("入院记录", "9");
DOCTOR_MAP.put("病程记录", "11"); // DOCTOR_MAP.put("病程记录", "11");
DOCTOR_MAP.put("术前文书", "12"); // DOCTOR_MAP.put("术前文书", "12");
DOCTOR_MAP.put("手术资料", "13"); // DOCTOR_MAP.put("手术资料", "13");
DOCTOR_MAP.put("讨论记录", "14"); // DOCTOR_MAP.put("讨论记录", "14");
DOCTOR_MAP.put("会诊记录", "15"); // DOCTOR_MAP.put("会诊记录", "15");
DOCTOR_MAP.put("出院记录", "113"); // DOCTOR_MAP.put("出院记录", "113");
DOCTOR_MAP.put("死亡记录", "17"); // DOCTOR_MAP.put("死亡记录", "17");
DOCTOR_MAP.put("VTE文书", "23"); // DOCTOR_MAP.put("VTE文书", "23");
DOCTOR_MAP.put("其他记录", "18"); // DOCTOR_MAP.put("其他记录", "18");
DOCTOR_MAP.put("医护共用", "19"); // DOCTOR_MAP.put("医护共用", "19");
DOCTOR_MAP.put("知情同意", "20"); // DOCTOR_MAP.put("知情同意", "20");
DOCTOR_MAP.put("疾病危重", "21"); // DOCTOR_MAP.put("疾病危重", "21");
DOCTOR_MAP.put("VTE记录", "22"); // DOCTOR_MAP.put("VTE记录", "22");
DOCTOR_MAP.put("病案首页", "3"); // DOCTOR_MAP.put("病案首页", "3");
DOCTOR_MAP.put("病历文书", ""); // DOCTOR_MAP.put("病历文书", "");
//
NURSE_MAP = new HashMap<String, String>(); // NURSE_MAP = new HashMap<String, String>();
NURSE_MAP.put("首次护理记录", "7"); // NURSE_MAP.put("首次护理记录", "7");
NURSE_MAP.put("护理文书", "6"); // NURSE_MAP.put("护理文书", "6");
NURSE_MAP.put("专科单护理", "24"); // NURSE_MAP.put("专科单护理", "24");
NURSE_MAP.put("知情文件", "8"); // NURSE_MAP.put("知情文件", "8");
NURSE_MAP.put("体温单", "5"); // NURSE_MAP.put("体温单", "5");
NURSE_MAP.put("护理记录", "2"); // NURSE_MAP.put("护理记录", "2");
NURSE_MAP.put("评估单", "4"); // NURSE_MAP.put("评估单", "4");
NURSE_MAP.put("病历护理文书", ""); // NURSE_MAP.put("病历护理文书", "");
} // }
} }

@ -1,41 +0,0 @@
package com.ann.demo.entity.interfaceEntity;
import lombok.Data;
import java.util.Date;
/**
* @Author: LeiJiaXin
* @Date: 2019/9/10 10:04
*/
@Data
public class EMRData {
// 2019-9-28 新增id
private String applyId;
private Date xmlCreateTime;
private String inpNo;
private String visitId;
private String patientId;
// 病历文书
private String type;
private String reportAddress;
private String lastModifyTime;
private String commitTime;
// 知情同意
private String subType;
// 知情同意下面的类型
private String detailType;
//排序的时间
private String captionDateTime;
}

@ -1,50 +0,0 @@
package com.ann.demo.entity.interfaceEntity;
import lombok.Data;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
/**
*
*
* @Author: LeiJiaXin
* @Date: 2019/8/22 15:42
*/
@Data
@Table
@Entity
public class ExamApply {
@Id
private String applyId;
private Date xmlCreateTime;
private String inpNo;
private String visitId;
private String patientId;
private Date authorReportTime;
private String result;
private Integer isValid = 0;
/**
*
*/
private String reportType;
/**
* 2019-10-21 E F
*/
private String isOpen = "0";
}

@ -1,39 +0,0 @@
package com.ann.demo.entity.interfaceEntity;
import lombok.Data;
import javax.persistence.Entity;
import java.util.Date;
/**
*
*
* @Author: LeiJiaXin
* @Date: 2019/12/23 15:42
*/
@Data
public class InspectionApply {
private String applyId;
private Date xmlCreateTime;
private String inpNo;
private String visitId;
private String patientId;
private Date authorReportTime;
private String result;
private Integer isValid = 0;
/**
* 2019-10-21 E F
*/
private String isOpen;
}

@ -47,7 +47,7 @@ public class MessageLog {
/** /**
* 0 1 * 0 1
*/ */
private Integer result; private Integer result = 0;
/** /**
* json * json

@ -1,97 +0,0 @@
package com.ann.demo.entity.interfaceEntity;
import lombok.Data;
/**
* @Description
* @Date 2019/6/24 21:58
* @Created by ljx
*/
@Data
public class UltrasonicReport {
/*
*
* */
private String id;
/*
*
* */
private String inpNo;
/*
*
* */
private String checkReportId;
/**
*
*/
private String applyId;
/**
*
*/
private String visitId;
/**
*
*/
private String name;
/*检查报告医师(文档创作者)*/
/**
*
*/
private String authorReportTime;
/**
*
*/
private String assignedAuthorId;
/**
*
*/
private String assignedPersonName;
/* 审核医师签名 */
/**
* Id
*/
private String examineId;
/**
*
*/
private String examineAssignedPersonName;
/**
*
*/
private String reportAddress;
@Override
public String toString() {
return "UltrasonicReport{" +
"id='" + id + '\'' +
", inpNo='" + inpNo + '\'' +
", checkReportId='" + checkReportId + '\'' +
", applyId='" + applyId + '\'' +
", visitId='" + visitId + '\'' +
", name='" + name + '\'' +
", authorReportTime='" + authorReportTime + '\'' +
", assignedAuthorId='" + assignedAuthorId + '\'' +
", assignedPersonName='" + assignedPersonName + '\'' +
", examineId='" + examineId + '\'' +
", examineAssignedPersonName='" + examineAssignedPersonName + '\'' +
'}';
}
}

@ -60,12 +60,6 @@ public class CommonTable {
@Column(name = "sex") @Column(name = "sex")
private String YZY008; private String YZY008;
/**
* 8
*/
@Column(name = "home_addr")
private String YZY075;
/** /**
* 14 * 14
*/ */
@ -116,7 +110,7 @@ public class CommonTable {
* 103 * 103
*/ */
@Column(name = "attending") @Column(name = "attending")
private String YZY055; private String YZY054;
/** /**
@ -128,12 +122,18 @@ public class CommonTable {
///////////////////////////////// /////////////////////////////////
/**
*
*/
@Column(name = "home_addr")
private String AAC010;
/** /**
* *
*/ */
@Id @Id
@Column(name = "inpatient_no", length = 30) @Column(name = "inpatient_no", length = 30)
private String inpatient_no; private String YZY175;
/** /**
* *
@ -147,4 +147,10 @@ public class CommonTable {
@Column(name = "main_dis_thing") @Column(name = "main_dis_thing")
private String main_dis_thing; private String main_dis_thing;
/**
*
*/
@Column(name = "main_diag_code")
private String mainDiagCode;
} }

@ -45,7 +45,13 @@ public class CommonTable1 {
* 7 * 7
*/ */
@Column(name = "pay_type") @Column(name = "pay_type")
private String YZY074; private String YZY158;
/**
* 8
*/
@Column(name = "addr")
private String YZY075;
/** /**
@ -59,7 +65,7 @@ public class CommonTable1 {
* 10 * 10
*/ */
@Column(name = "job") @Column(name = "job")
private String YZY016; private String YZY156;
/** /**
* 11 * 11
@ -96,7 +102,7 @@ public class CommonTable1 {
* 17 * 17
*/ */
@Column(name = "country") @Column(name = "country")
private String AAC161; private String YZY013;
/** /**
* 18 * 18
@ -105,16 +111,14 @@ public class CommonTable1 {
private String YZY076; private String YZY076;
/** /**
* 23 * 23
*/ */
@Column(name = "relation") @Column(name = "relation")
private String YZY026; private String YZY157;
/** /**
* 24 * 24
*/ */
@Column(name = "home_tel") @Column(name = "telphone")
private String YZY079; private String YZY079;
/** /**
@ -136,22 +140,22 @@ public class CommonTable1 {
private String YZY080; private String YZY080;
/** /**
* 64 ------------- 1.2.3. * 64 ------------- 1.2.3.
*/ */
@Column(name = "admiss_thing") @Column(name = "admiss_thing")
private String YZY111; private String YZY111;
/** // /**
* 72 (() // * 72 门((急)诊诊断编码
*/ // */
@Column(name = "clinic_diag") // @Column(name = "clinic_diag")
private String YZY113; // private String YZY113;
//
/** // /**
* 73(() // * 73门((急)诊诊断
*/ // */
@Column(name = "clinic_name") // @Column(name = "clinic_name")
private String YZY114; // private String YZY114;
/** /**
@ -161,17 +165,17 @@ public class CommonTable1 {
private String YZY046; private String YZY046;
/** /**
* 75 0.1.2.3.4. * 75 0.1.2.3.4.
*/ */
@Column(name = "emit_pathology") @Column(name = "emit_pathology")
private String YZY089; private String YZY161;
/** /**
* 76 * 76
*/ */
@Column(name = "blood_type") @Column(name = "blood_type")
private String YZY090; private String YZY162;
/** /**
* 77 * 77
@ -184,7 +188,7 @@ public class CommonTable1 {
* 84 Rh 1.2.3 * 84 Rh 1.2.3
*/ */
@Column(name = "RH") @Column(name = "RH")
private String YZY096; private String YZY163;
/** /**
* 94 * 94
@ -221,11 +225,11 @@ public class CommonTable1 {
* 101 * 101
*/ */
@Column(name = "coding") @Column(name = "coding")
private String YZY061; private String YZY062;
/** /**
* 102 * 102
*/ */
@Column(name = "dis_ward") @Column(name = "dis_ward")
private String YZY039; private String YZY039;
@ -237,7 +241,7 @@ public class CommonTable1 {
private String YZY056; private String YZY056;
/** /**
* 105 * 105
*/ */
@Column(name = "dept_director") @Column(name = "dept_director")
private String YZY050; private String YZY050;
@ -278,9 +282,10 @@ public class CommonTable1 {
/** /**
* 1.2.3. * 1.2.3.
* YZY064
*/ */
@Column(name = "quality") @Column(name = "quality")
private String YZY064; private String YZY063;
/** /**
@ -288,6 +293,7 @@ public class CommonTable1 {
*/ */
@Column(name = "refresher") @Column(name = "refresher")
private String YZY058; private String YZY058;
/** /**
* *
*/ */
@ -295,4 +301,272 @@ public class CommonTable1 {
private String YZY060; private String YZY060;
/**
*
*/
@Column(name = "total_charge")
private String AKC264;
/**
* -9-
*/
@Column(name = "charge_34")
private String YZY132;
/**
* -10-
*/
@Column(name = "charge_14")
private String YZY134;
/**
* -10-
*/
@Column(name = "charge_19")
private String YZY135;
/**
* 西-13-
*/
@Column(name = "charge_37")
private String YZY152;
/**
* -(1)
*/
@Column(name = "charge_10")
private String YZY123;
/**
* -(2)
*/
@Column(name = "charge_25")
private String YZY124;
/**
* -(3)
*/
@Column(name = "charge_02")
private String YZY125;
/**
* -(4)
*/
@Column(name = "charge_20")
private String YZY126;
/**
* -(5)
*/
@Column(name = "charge_29")
private String YZY127;
/**
* -(6)
*/
@Column(name = "charge_30")
private String YZY128;
/**
* -(7)
*/
@Column(name = "charge_31")
private String YZY129;
/**
* -(8)
*/
@Column(name = "charge_32")
private String YZY130;
/**
* -(9)
*/
@Column(name = "charge_33")
private String YZY131;
/**
* -(11)
*/
@Column(name = "charge_36")
private String YZY136;
/**
* -(12)
*/
@Column(name = "charge_38")
private String YZY137;
/**
* 西-西(13)
*/
@Column(name = "charge_03")
private String YZY138;
/**
* -(14)
*/
@Column(name = "charge_04")
private String YZY153;
/**
* -(15)
*/
@Column(name = "charge_05")
private String YZY154;
/**
* -(16)
*/
@Column(name = "charge_09")
private String YZY139;
/**
* -(17)
*/
@Column(name = "charge_39")
private String YZY140;
/**
* -(18)
*/
@Column(name = "charge_40")
private String YZY141;
/**
* -(19)
*/
@Column(name = "charge_41")
private String YZY142;
/**
* -(20)
*/
@Column(name = "charge_42")
private String YZY143;
/**
* -(21)
*/
@Column(name = "charge_43")
private String YZY144;
/**
* -(22)
*/
@Column(name = "charge_44")
private String YZY145;
/**
* -(23)
*/
@Column(name = "charge_45")
private String YZY146;
/**
* -(24)
*/
@Column(name = "other")
private String YZY155;
/**
*
*/
@Column(name = "charge_22")
private String YZY122;
/**
*
*/
@Column(name = "craniocerebral_starttime")
private String YZY081;
/**
*
*/
@Column(name = "craniocerebral_endtime")
private String YZY082;
/**
*
*/
@Column(name = "dis_type")
private String YZY171;
/**
* 31
*/
@Column(name = "is_hospitalization")
private String YZY164;
/**
* 31
*/
@Column(name = "hospitalization_objective")
private String YZY099;
/**
*
*/
@Column(name = "responsible_nurse")
private String YZY103;
// 2020-8-31 新增以下节点
/**
*
*/
@Column(name = "is_medical_record_path")
private String YZY165;
/**
*
*/
@Column(name = "radiotherapy_type")
private String YZY166;
/**
*
*/
@Column(name = "radiotherapy_device")
private String YZY167;
/**
*
*/
@Column(name = "chemotherapy_type")
private String YZY168;
/**
*
*/
@Column(name = "chemotherapy_method")
private String YZY169;
/**
*
*/
@Column(name = "case_type")
private String YZY170;
/**
* 1
*/
@Column(name = "change_dept1")
private String YZY172;
/**
* 2
*/
@Column(name = "change_dept2")
private String YZY173;
/**
* 3
*/
@Column(name = "change_dept3")
private String YZY174;
} }

@ -4,7 +4,6 @@ import com.ann.demo.entity.normalEntity.ids.DiagDetailIds;
import lombok.Data; import lombok.Data;
import javax.persistence.*; import javax.persistence.*;
import java.io.Serializable;
import java.util.Date; import java.util.Date;
/** /**
@ -25,7 +24,7 @@ public class DiagDetail {
private String masterId; private String masterId;
/** /**
* ICD * ID ICD
* */ * */
@Id @Id
@Column(name = "diag_code", length = 50) @Column(name = "diag_code", length = 50)
@ -47,7 +46,7 @@ public class DiagDetail {
private Integer YZY201; private Integer YZY201;
/** /**
* *
* */ * */
@Column(name = "diag_name") @Column(name = "diag_name")
private String AKC185; private String AKC185;

@ -4,7 +4,6 @@ import com.ann.demo.entity.normalEntity.ids.OperDetailIds;
import lombok.Data; import lombok.Data;
import javax.persistence.*; import javax.persistence.*;
import java.io.Serializable;
import java.util.Date; import java.util.Date;
/** /**
@ -25,26 +24,26 @@ public class OperDetail {
private String masterId; private String masterId;
/** /**
* *
*/ */
@Column(name = "operate_no") @Column(name = "operate_no")
private Integer YZY201; private Integer YZY201;
/** /**
* *
*/ */
@Id @Id
@Column(name = "operateCode") @Column(name = "operateCode")
private String YZY207; private String YZY207;
/** /**
* *
*/ */
@Column(name = "operateName") @Column(name = "operateName")
private String YZY208; private String YZY208;
/** /**
* *
*/ */
@Column(name = "operateDate") @Column(name = "operateDate")
private Date YZY209; private Date YZY209;
@ -56,7 +55,7 @@ public class OperDetail {
private String YZY227; private String YZY227;
/** /**
* *
*/ */
@Column(name = "operator") @Column(name = "operator")
private String YZY215; private String YZY215;
@ -80,7 +79,7 @@ public class OperDetail {
private String assistant_3; private String assistant_3;
/** /**
* *
*/ */
@Column(name = "cut") @Column(name = "cut")
private String YZY210; private String YZY210;
@ -89,13 +88,13 @@ public class OperDetail {
* *
*/ */
@Column(name = "anaesthesia_type") @Column(name = "anaesthesia_type")
private String YZY216; private String YZY217;
/** /**
* *
*/ */
@Column(name = "anaesthesia_name") @Column(name = "anaesthesia_name")
private String YZY223; private String YZY224;
/** /**
* *
@ -123,10 +122,10 @@ public class OperDetail {
private String OPERATION_SCALE; private String OPERATION_SCALE;
/** /**
* *
*/ */
@Column(name = "chossurg") @Column(name = "chossurg")
private String ChosSurg; private String YZY229;
/** /**
* *

@ -23,94 +23,11 @@ public class OtherData {
*/ */
private String YZY078; private String YZY078;
/**
* 21
*/
private String AAC010;
/** /**
* 22 * 22
*/ */
private String YZY024; private String YZY024;
/**
* 28
*/
private String AKC264;
/**
* 29 -9-
*/
@Column(name = "lcwlzlf")
private String YZY132;
/**
* 30 -10-
*/
@Column(name = "mzf")
private String YZY134;
/**
* 31 -10-
*/
@Column(name = "ssf")
private String YZY135;
/**
* 32 西-13-
*/
@Column(name = "kjywfy")
private String YZY152;
/**
* 33 -(1)
*/
@Column(name = "ybylfwf1")
private String YZY123;
/**
* 34 -(2)
*/
@Column(name = "ybylfwf2")
private String YZY124;
/**
* 35 -(3)
*/
@Column(name = "hlf")
private String YZY125;
/**
* 36 -(4)
*/
@Column(name = "qtfy")
private String YZY126;
/**
* 37 -(5)
*/
@Column(name = "blzdf")
private String YZY127;
/**
* 38 -(6)
*/
@Column(name = "syszdf")
private String YZY128;
/**
* 39 -(7)
*/
@Column(name = "yxxzdf")
private String YZY129;
/**
* 40 -(8)
*/
@Column(name = "lczdxmf")
private String YZY130;
// /** // /**
// * 41 治疗类-非手术治疗项目费(9)-2 // * 41 治疗类-非手术治疗项目费(9)-2
@ -119,12 +36,6 @@ public class OtherData {
// private String YZY132; // private String YZY132;
/**
* 42 -(9)
*/
@Column(name = "fsszlxmf")
private String YZY131;
/** /**
* 43 -(10) * 43 -(10)
*/ */
@ -132,146 +43,58 @@ public class OtherData {
private String YZY133; private String YZY133;
/** /**
* 44 -(11) * 61
*/
@Column(name = "kff")
private String YZY136;
/**
* 45 -(12)
*/ */
@Column(name = "zyzlf") @Column(name = "operate_name")
private String YZY137; private String YZY105;
/**
* 46 西-西(13)
*/
@Column(name = "xyf")
private String YZY138;
/**
* 47 -(14)
*/
@Column(name = "zcyf")
private String YZY153;
/**
* 48 -(15)
*/
@Column(name = "zcyf")
private String YZY154;
/**
* 49 -(16)
*/
@Column(name = "xf")
private String YZY139;
/**
* 50 -(17)
*/
@Column(name = "bdblzpf")
private String YZY140;
/**
* 51 -(18)
*/
@Column(name = "qdblzpf")
private String YZY141;
/**
* 52 -(19)
*/
@Column(name = "nxyzlzpf")
private String YZY142;
/**
* 53 -(20)
*/
@Column(name = "xbyzlzpf")
private String YZY143;
/**
* 54 -(21)
*/
@Column(name = "jcyycxyyclf")
private String YZY144;
/**
* 55 -(22)
*/
@Column(name = "zlyycxyyclf")
private String YZY145;
/** /**
* 56 -(23) *
*/ */
@Column(name = "ssyycxyyclf") @Column(name = "cut")
private String YZY146; private String YZY084;
/** /**
* 57 -(24) *
*/ */
@Column(name = "qtf") @Column(name = "operate_date")
private String YZY155; private String YZY106;
/** /**
* 58 *
*/ */
@Column(name = "zffy") @Column(name = "operate_class")
private String YZY122; private String YZY108;
/** /**
* 59 *
*/ */
private String mainDiagCode; @Column(name = "operator")
private String YZY109;
/** /**
* 61 *
*/ */
private String YZY105; @Column(name = "anaesthesia_name")
private String YZY112;
/** /**
* 62 * 62
*/ */
private String YZY110; private String YZY110;
/** /**
* 63 -1-2 * 63 -1-2
*
*/
/**
* 65
*/
private String YZY081;
/**
* 66
*/ */
private String YZY082; private String YZY221;
/** /**
* 67 * 67
*/ */
private String YZY083; private String YZY083;
/**
* 68
*/
private String YZY084;
/**
* 69
*/
private String YZY106;
/** /**
* 70 * 70
*/ */
@ -288,14 +111,14 @@ public class OtherData {
private String pathologyDingName; private String pathologyDingName;
/** /**
* 71 * 71
*/ */
private String YZY107; private String YZY107;
/** /**
* 78 * 78
*/ */
private String mainDiagCodeOutSideReason; private String YZY091;
/** /**
* 79 * 79
@ -312,56 +135,16 @@ public class OtherData {
*/ */
private String YZY094; private String YZY094;
/**
* 82
*/
private String YZY108;
/** /**
* 83 ( ) * 83 ( )
*/ */
private String YZY095; private String YZY095;
/**
* 85
*/
private String YZY109;
/** /**
* 86 * 86
*/ */
private String YZY097; private String YZY097;
/**
* 87
*/
private String YZY070;
/**
* 91 31
*/
private String YZY098;
/**
* 92 31
*/
private String YZY099;
/**
* 98
*/
private String YZY112;
/**
* 100
*/
private String YZY103;
} }

@ -1,70 +0,0 @@
package com.ann.demo.entity.normalEntity;
import lombok.Data;
import javax.persistence.*;
import java.util.Date;
/**
* @Description
* @Date 2019/6/15 16:57
* @Created by ljx
*/
@Table(name = "powerUser")
@Entity
@Data
public class User {
/**
*
*/
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "userId")
private Integer id;
@Column(name = "remark")
private String USER_ID;
/**
*
*/
@Column(name = "userName")
private String USER_NAME;
/**
*
*/
@Column(name = "deptId")
private String USER_DEPT;
/**
*
*/
@Column(name = "userPwd")
private String USER_PWD;
/**
*
*/
@Column(name = "createDate")
private String CREATE_DATE;
/**
* 0 ,1
*/
@Column(name = "roleId")
private Integer USER_TYPE;
@Column(name = "effective")
private Integer isValid = 0;
/**
* 1 0
*/
private Integer EDUCATION_FLAG;
}

@ -1,82 +0,0 @@
package com.ann.demo.entity.normalEntity;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
/**
* @Description
* @Date 2019/6/15 16:57
* @Created by ljx
*/
@Table(name = "users")
@Entity
@Data
public class User3 {
/**
*
*/
@Id
@Column(name = "id")
private String USER_ID;
/**
*
*/
@Column(name = "name")
private String USER_NAME;
/**
*
*/
@Column(name = "departmentid")
private String USER_DEPT;
/**
*
*/
@Column(name = "password")
private String USER_PWD;
/**
*
*/
@Column(name = "createdate")
private Date CREATE_DATE;
/**
*
*/
@Column(name = "initialism")
private String PYM;
/**
*
*/
@Column(name = "code")
private String USER_LOGIN_NAME;
/**
* 0 ,1
*/
@Column(name = "roleid")
private String USER_TYPE;
@Column(name = "isvalid")
private Integer isValid = 0;
/**
* 1 0
*/
@Column(name = "EDUCATION_FLAG")
private Integer EDUCATION_FLAG;
}

@ -7,11 +7,6 @@ import javax.jws.WebService;
@WebService @WebService
public interface HomepageDictionary { public interface HomepageDictionary {
// @WebMethod
// String ReceiveDict(@WebParam(name = "InputPara") String InputPara);
@WebMethod
String HIPMessageServer(@WebParam(name = "action") String action, @WebParam(name = "message") String message);
@WebMethod @WebMethod
String InpSummary(@WebParam(name = "InputPara") String InputPara); String InpSummary(@WebParam(name = "InputPara") String InputPara);

@ -45,9 +45,6 @@ public class HomepageDictionaryImpl implements HomepageDictionary {
@Autowired @Autowired
private MessageSubordinateService messageSubordinateService; private MessageSubordinateService messageSubordinateService;
@Autowired
private AnalysisService analysisService;
@Autowired @Autowired
private ArchiveDetailService archiveDetailService; private ArchiveDetailService archiveDetailService;
@ -55,45 +52,6 @@ public class HomepageDictionaryImpl implements HomepageDictionary {
private ArchiveMasterService archiveMasterService; private ArchiveMasterService archiveMasterService;
@Autowired
ExamApplyService examApplyService;
@Override
public String HIPMessageServer(String action, String message) {
// String result = "";
// try {
// if (action != null && message != null && !(message.equals("") && action.equals(""))) {
// switch (action) {
// case InterfaceName.PARAMETER_ADMISSION:
// // 入院
// result = analysisService.getHIPMessageServerResult(message, ArchiveMaster.class, InterfaceName.PARAMETER_ADMISSION);
// break;
// case InterfaceName.PARAMETER_DISCHARGE:
// // 出院
// result = analysisService.getHIPMessageServerResult(message, ArchiveMaster.class, InterfaceName.PARAMETER_DISCHARGE);
// break;
// case InterfaceName.PARAMETER_TRANSFER:
// // 转科
// result = analysisService.getHIPMessageServerResult(message, ArchiveMaster.class, InterfaceName.PARAMETER_TRANSFER);
// break;
// case InterfaceName.PARAMETER_CANCELLATION_DISCHARGE:
// // 取消入院
// result = analysisService.getHIPMessageServerResult(message, ArchiveMaster.class, InterfaceName.PARAMETER_CANCELLATION_DISCHARGE);
// break;
// case InterfaceName.PARAMETER_PATIENT_UPDATE:
// // 患者信息更新
// result = analysisService.getHIPMessageServerResult(message, ArchiveMaster.class, InterfaceName.PARAMETER_PATIENT_UPDATE);
// break;
// }
// }
// }catch (Exception e){
// return "";
// }
// ---------------------------------------这里捕捉 参数为空
// return result;
return null;
}
@Override @Override
public String InpSummary(String xmlStr) { public String InpSummary(String xmlStr) {
String outContent = "失败"; String outContent = "失败";
@ -103,7 +61,7 @@ public class HomepageDictionaryImpl implements HomepageDictionary {
// 1、定义变量 // 1、定义变量
long startTime = System.currentTimeMillis(); long startTime = System.currentTimeMillis();
boolean flag = false; boolean flag = false;
Integer result = 0; Integer result = 2;
Date xmlCreateTime = null; Date xmlCreateTime = null;
MessageLog messageLog = new MessageLog(xmlStr, InterfaceName.INP_SUMMARY, new Date(),WebserviceId.INP_SUMMARY); MessageLog messageLog = new MessageLog(xmlStr, InterfaceName.INP_SUMMARY, new Date(),WebserviceId.INP_SUMMARY);
MedicalRecordHomepageCache medicalRecordHomepageCache = null; MedicalRecordHomepageCache medicalRecordHomepageCache = null;
@ -150,10 +108,10 @@ public class HomepageDictionaryImpl implements HomepageDictionary {
logger.info("-----------------------病案首页总用时长:" + (endTime - startTime) + "-------------------------"); logger.info("-----------------------病案首页总用时长:" + (endTime - startTime) + "-------------------------");
}catch (Exception e){ }catch (Exception e){
try { try {
outContent = AnalysisService.getReturnResult(false,remark); outContent = AnalysisService.getReturnResult(false,e.getMessage());
logger.error("出错咯!错误信息为{},以及错误行数为:{}" ,e,e.getStackTrace()[0]); logger.error("当前参数:{},报错信息:{}","InpSummary",e.getMessage());
} catch (Exception ex) { } catch (Exception ex) {
logger.error("出错咯!错误信息为{},以及错误行数为:{}" ,ex,ex.getStackTrace()[0]); logger.error("当前参数:{},报错信息:{}","InpSummary",ex.getMessage());
} }
} }
return outContent; return outContent;
@ -167,7 +125,7 @@ public class HomepageDictionaryImpl implements HomepageDictionary {
// 手麻系统 判断消息是否传过 存入消息 然后解析消息 然后存到附属表 // 手麻系统 判断消息是否传过 存入消息 然后解析消息 然后存到附属表
// 1、定义变量 // 1、定义变量
boolean flag = false; boolean flag = false;
Integer result = 0; Integer result = 2;
String type = "", patientMainStr = null,archiveMasterId = null; String type = "", patientMainStr = null,archiveMasterId = null;
long startTime = System.currentTimeMillis(); long startTime = System.currentTimeMillis();
Date xmlCreateTime = null; Date xmlCreateTime = null;
@ -207,9 +165,9 @@ public class HomepageDictionaryImpl implements HomepageDictionary {
}catch (Exception e){ }catch (Exception e){
try { try {
outContent = AnalysisService.getReturnResult(false,remark); outContent = AnalysisService.getReturnResult(false,remark);
logger.error("出错咯!错误信息为{},以及错误行数为:{}" ,e,e.getStackTrace()[0]); logger.error("当前参数:{},报错信息:{}","handNumbnessReport",e.getMessage());
} catch (Exception ex) { } catch (Exception ex) {
logger.error("出错咯!错误信息为{},以及错误行数为:{}" ,ex,ex.getStackTrace()[0]); logger.error("当前参数:{},报错信息:{}","handNumbnessReport",ex.getMessage());
} }
} }
return outContent; return outContent;
@ -280,9 +238,9 @@ public class HomepageDictionaryImpl implements HomepageDictionary {
}catch (Exception e){ }catch (Exception e){
try { try {
outContent = AnalysisService.getReturnResult(false,remark); outContent = AnalysisService.getReturnResult(false,remark);
logger.error("出错咯消息id为{},错误信息为{},以及错误行数为:{}" ,messageLog.getId(),e,e.getStackTrace()[0]); logger.error("当前参数:{},报错信息:{}","ICUReport",e.getMessage());
} catch (Exception ex) { } catch (Exception ex) {
logger.error("出错咯消息id为{},错误信息为{},以及错误行数为:{}" ,messageLog.getId(),e,e.getStackTrace()[0]); logger.error("当前参数:{},报错信息:{}","ICUReport",ex.getMessage());
} }
} }
return outContent; return outContent;
@ -340,10 +298,10 @@ public class HomepageDictionaryImpl implements HomepageDictionary {
} }
}catch (Exception e){ }catch (Exception e){
try { try {
logger.error("出错咯!错误信息为{},以及错误行数为:{}" ,e,e.getStackTrace()[0]); logger.error("当前参数:{},报错信息:{}","BloodTransfusionUrl",e.getMessage());
return AnalysisService.getReturnResult(false,remark); return AnalysisService.getReturnResult(false,remark);
} catch (Exception e1) { } catch (Exception ex) {
logger.error("出错咯!错误信息为{},以及错误行数为:{}" ,e1,e1.getStackTrace()[0]); logger.error("当前参数:{},报错信息:{}","BloodTransfusionUrl",ex.getMessage());
} }
} }
return outContent; return outContent;

@ -1,18 +0,0 @@
package com.ann.demo.repository;
import com.ann.demo.entity.normalEntity.Department;
import com.ann.demo.entity.normalEntity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
/**
* @Author: LeiJiaXin
* @Date: 2019/7/16 9:53
*/
@Repository
public interface DepartmentRepository extends JpaRepository<Department, String> {
@Query("select o from Department o where o.DEPT_CODE = ?1 and o.isValid = ?2 ")
public Department findDepartmentByDeptCodeAndIsValid(String deptCode, Integer isValid);
}

@ -1,18 +0,0 @@
package com.ann.demo.repository;
import com.ann.demo.entity.normalEntity.Department;
import com.ann.demo.entity.normalEntity.EMRDictionary;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
/**
* @Author: LeiJiaXin
* @Date: 2019/9/21 16:04
*/
@Repository
public interface EMRDictionaryRepository extends JpaRepository<EMRDictionary, Integer> {
@Query("select o from EMRDictionary o where o.DEPT_CODE = ?1 and o.isValid = ?2 ")
public EMRDictionary findEMRDictionaryByCodeAndIsValid(String code, Integer isValid);
}

@ -1,26 +0,0 @@
package com.ann.demo.repository;
import com.ann.demo.entity.interfaceEntity.ExamApply;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
/**
* @Author: LeiJiaXin
* @Date: 2019/8/22 16:22
*/
@Repository
public interface ExamApplyRepository extends JpaRepository<ExamApply, String> {
@Transactional
@Modifying
@Query("update ExamApply o set o.isValid = 1 where o.applyId = ?1 and o.isValid = 0 ")
public Integer updateExamApplyIsValidById(String applyId);
@Query("select count(o) from ExamApply o where o.applyId = ?1 and o.isValid = 0")
public Integer countExamApply(String applyId);
public ExamApply findByApplyId(String applyId);
}

@ -1,15 +0,0 @@
package com.ann.demo.repository;
import com.ann.demo.entity.normalEntity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
/**
* @Author: LeiJiaXin
* @Date: 2019/7/16 9:53
*/
@Repository
public interface UserRepository extends JpaRepository<User, String> {
}

@ -1,26 +1,9 @@
package com.ann.demo.service; package com.ann.demo.service;
import com.alibaba.fastjson.JSON;
import com.ann.demo.entity.constant.AliasName;
import com.ann.demo.entity.constant.InterfaceName;
import com.ann.demo.entity.filing.dto.MessageDto;
import com.ann.demo.entity.interfaceEntity.ArchiveMaster;
import com.ann.demo.entity.interfaceEntity.ExamApply;
import com.ann.demo.entity.interfaceEntity.InspectionApply;
import com.ann.demo.entity.interfaceEntity.MessageLog;
import com.ann.demo.entity.normalEntity.MedicalRecordHomepage;
import com.ann.demo.entity.normalEntity.MedicalRecordHomepageCache;
import com.ann.demo.entity.normalEntity.OutPara; import com.ann.demo.entity.normalEntity.OutPara;
import com.ann.demo.utils.XMLUtils; import com.ann.demo.utils.XMLUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.util.Date;
import java.util.List;
import java.util.Objects;
/** /**
* *
* *
@ -30,32 +13,14 @@ import java.util.Objects;
@Component @Component
public class AnalysisService { public class AnalysisService {
static final Logger logger = LoggerFactory.getLogger(AnalysisService.class);
@Autowired
MessageService messageService;
@Autowired
MessageSubordinateService messageSubordinateService;
@Autowired
ArchiveMasterService archiveMasterService;
@Autowired
ExamApplyService examApplyService;
@Autowired
MedicalRecordHomepageCacheService medicalRecordHomepageCacheService;
public static String getReturnResult(boolean resultCode,String remark) throws Exception{ public static String getReturnResult(boolean resultCode,String remark) throws Exception{
OutPara outPara = new OutPara(); OutPara outPara = new OutPara();
if (!resultCode) { if (resultCode) {
outPara.setRESULT_CODE(false);
outPara.setRESULT_CONTENT(remark);
} else {
outPara.setRESULT_CODE(true); outPara.setRESULT_CODE(true);
outPara.setRESULT_CONTENT("成功"); outPara.setRESULT_CONTENT("成功");
} else {
outPara.setRESULT_CODE(false);
outPara.setRESULT_CONTENT(remark);
} }
return XMLUtils.generateXmlStr(outPara); return XMLUtils.generateXmlStr(outPara);
} }

@ -1,19 +0,0 @@
package com.ann.demo.service;
import com.ann.demo.entity.normalEntity.Department;
import com.ann.demo.entity.normalEntity.User;
/**
* @Description
* @Date 2019/7/16 9:56
* @Created by ljx
*/
public interface DepartmentService {
public void save(Department department);
public void delete(Department department);
public Department findDepartment(String user_dept);
}

@ -1,16 +0,0 @@
package com.ann.demo.service;
import com.ann.demo.entity.normalEntity.EMRDictionary;
/**
* @Author: LeiJiaXin
* @Date: 2019/9/21 16:08
*/
public interface EMRDictionaryService {
public void save(EMRDictionary emrDictionary);
public void delete(EMRDictionary emrDictionary);
public EMRDictionary findEMRDictionary(String code);
}

@ -1,22 +0,0 @@
package com.ann.demo.service;
import com.ann.demo.entity.interfaceEntity.ExamApply;
/**
* @Author: LeiJiaXin
* @Date: 2019/8/22 16:20
*/
public interface ExamApplyService {
public void save(ExamApply examApply);
/* public boolean updateExamApplyIsValidById(String id);*/
//public String findId(String applyId,String inpNo,String visitId,String patientId);
public ExamApply findExamApply(String applyId);
Integer countExamApply(String applyId);
boolean updateExamApplyIsValid(String applyId);
}

@ -1,17 +0,0 @@
package com.ann.demo.service;
import com.ann.demo.entity.normalEntity.User;
/**
* @Description
* @Date 2019/7/16 9:56
* @Created by ljx
*/
public interface UserService {
public void save(User user);
public void delete(User user);
}

@ -1,52 +0,0 @@
package com.ann.demo.service.impl;
import com.ann.demo.entity.normalEntity.Department;
import com.ann.demo.entity.normalEntity.User;
import com.ann.demo.repository.DepartmentRepository;
import com.ann.demo.repository.UserRepository;
import com.ann.demo.service.DepartmentService;
import com.ann.demo.service.UserService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @Description
* @Date 2019/7/9 16:43
* @Created by ljx
*/
@Service
public class DepartmentServiceImpl implements DepartmentService {
static final Logger logger = LoggerFactory.getLogger(DepartmentServiceImpl.class);
@Autowired
DepartmentRepository departmentRepository;
@Override
public void save(Department department) {
//打日志信息
try {
departmentRepository.save(department);
} catch (Exception e) {
logger.error("出错咯!错误信息:" + e);
}
}
@Override
public void delete(Department department) {
//打日志信息
try {
departmentRepository.delete(department);
} catch (Exception e) {
logger.error("出错咯!错误信息:" + e);
}
}
@Override
public Department findDepartment(String user_dept) {
// ------------------确认 isValid 0是正常 1是停用
return departmentRepository.findDepartmentByDeptCodeAndIsValid(user_dept, 0);
}
}

@ -1,49 +0,0 @@
package com.ann.demo.service.impl;
import com.ann.demo.entity.normalEntity.EMRDictionary;
import com.ann.demo.repository.DepartmentRepository;
import com.ann.demo.repository.EMRDictionaryRepository;
import com.ann.demo.service.EMRDictionaryService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @Author: LeiJiaXin
* @Date: 2019/9/21 16:08
*/
@Service
public class EMRDictionaryServiceImpl implements EMRDictionaryService {
static final Logger logger = LoggerFactory.getLogger(EMRDictionaryServiceImpl.class);
@Autowired
EMRDictionaryRepository emrDictionaryRepository;
@Override
public void save(EMRDictionary emrDictionary) {
//打日志信息
try {
emrDictionaryRepository.save(emrDictionary);
} catch (Exception e) {
logger.error("出错咯!错误信息:" + e);
}
}
@Override
public void delete(EMRDictionary emrDictionary) {
//打日志信息
try {
emrDictionaryRepository.delete(emrDictionary);
} catch (Exception e) {
logger.error("出错咯!错误信息:" + e);
}
}
@Override
public EMRDictionary findEMRDictionary(String code) {
// ------------------确认 isValid 0是正常 1是停用
return emrDictionaryRepository.findEMRDictionaryByCodeAndIsValid(code, 0);
}
}

@ -1,40 +0,0 @@
package com.ann.demo.service.impl;
import com.ann.demo.entity.interfaceEntity.ExamApply;
import com.ann.demo.repository.ExamApplyRepository;
import com.ann.demo.service.ExamApplyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @Author: LeiJiaXin
* @Date: 2019/8/22 16:20
*/
@Service
public class ExamApplyServiceImpl implements ExamApplyService {
@Autowired
ExamApplyRepository examApplyRepository;
@Override
public void save(ExamApply examApply) {
examApplyRepository.save(examApply);
}
@Override
public ExamApply findExamApply(String applyId) {
return examApplyRepository.findByApplyId(applyId);
}
@Override
public Integer countExamApply(String applyId) {
return examApplyRepository.countExamApply(applyId);
}
@Override
public boolean updateExamApplyIsValid(String applyId) {
if (examApplyRepository.updateExamApplyIsValidById(applyId) > 0)
return true;
return false;
}
}

@ -81,8 +81,6 @@ public class MedicalRecordHomepageCacheServiceImpl implements MedicalRecordHomep
if (commonTable1 != null) { if (commonTable1 != null) {
// 处理公共表 // 处理公共表
commonTable.setMasterId(masterId); commonTable.setMasterId(masterId);
// 将 患者id 赋值给 病案号
commonTable.setInpatient_no(commonTable.getYZY001());
if (operDetails != null) { if (operDetails != null) {
if (operDetails.size() > 0) { if (operDetails.size() > 0) {
commonTable.setIsOper("有"); commonTable.setIsOper("有");
@ -127,7 +125,7 @@ public class MedicalRecordHomepageCacheServiceImpl implements MedicalRecordHomep
diagDetail.setMasterId(masterId); diagDetail.setMasterId(masterId);
// 20200528 取出院诊断的主要诊断 // 20200528 取出院诊断的主要诊断
if(Objects.equals(diagDetail.getYZY203(),"3") && Objects.equals(diagDetail.getYZY201(),1) ){ if(Objects.equals(diagDetail.getYZY203(),"3") && Objects.equals(diagDetail.getYZY201(),1) ){
medicalRecordHomepage.getOtherData().setMainDiagCode(diagDetail.getAKC196()); commonTable.setMainDiagCode(diagDetail.getAKC196());
commonTable.setMainDiagName(diagDetail.getAKC185()); commonTable.setMainDiagName(diagDetail.getAKC185());
} }
} }

@ -62,7 +62,7 @@ public class MedicalRecordHomepageServiceImpl implements MedicalRecordHomepageSe
commonTable1Repository.save(medicalRecordHomepage.getCommonTable1()); commonTable1Repository.save(medicalRecordHomepage.getCommonTable1());
return true; return true;
} catch (Exception e) { } catch (Exception e) {
logger.error("保存病案首页出错咯!错误信息:" + e); logger.error("保存病案首页出错咯!错误信息:" + e.getMessage());
return false; return false;
} }
} }

@ -1,67 +0,0 @@
package com.ann.demo.service.impl;
import com.ann.demo.entity.filing.MessageSubordinate;
import com.ann.demo.entity.normalEntity.Department;
import com.ann.demo.entity.normalEntity.EMRDictionary;
import com.ann.demo.entity.normalEntity.User;
import com.ann.demo.repository.MessageSubordinateRepository;
import com.ann.demo.repository.UserRepository;
import com.ann.demo.service.DepartmentService;
import com.ann.demo.service.MessageSubordinateService;
import com.ann.demo.service.UserService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @Description
* @Date 2019/7/9 16:43
* @Created by ljx
*/
@Service
public class UserServiceImpl implements UserService {
static final Logger logger = LoggerFactory.getLogger(UserServiceImpl.class);
@Autowired
UserRepository userRepository;
@Autowired
EMRDictionaryServiceImpl emrDictionaryService;
@Override
public void save(User user) {
//打日志信息
try {
// 获取科室 根据科室类型区分临床和非临床,临床的然后有资质的就是医生,没有资质的就是护士
Integer roleId = 0;
if (user.getUSER_DEPT() != null) {
EMRDictionary emrDictionary = emrDictionaryService.findEMRDictionary(user.getUSER_DEPT());
if (emrDictionary != null) {
if (emrDictionary.getCLINIC_ATTR() == 0) {
if (user.getEDUCATION_FLAG() == 0) { // 无资质 护士
roleId = 1;
} else { // 有资质 为 1 医生
roleId = 2;
}
}
}
}
user.setUSER_TYPE(roleId);
userRepository.save(user);
} catch (Exception e) {
logger.error("出错咯!错误信息:" + e);
}
}
@Override
public void delete(User user) {
//打日志信息
try {
userRepository.delete(user);
} catch (Exception e) {
logger.error("出错咯!错误信息:" + e);
}
}
}

@ -10,7 +10,6 @@ import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct; import javax.annotation.PostConstruct;
import java.io.*; import java.io.*;
import java.time.LocalDateTime;
import java.util.Iterator; import java.util.Iterator;
import java.util.Properties; import java.util.Properties;
import java.util.Set; import java.util.Set;
@ -98,6 +97,5 @@ public class PinYinUtils {
} }
public static void main(String[] args) { public static void main(String[] args) {
System.out.println(LocalDateTime.now());
} }
} }

@ -50,26 +50,6 @@ public class XMLUtils {
@Value("${file.path}") @Value("${file.path}")
private String pathTemp; private String pathTemp;
// 转科
public static String transferRecordPath;
@Value("${file.transferRecordPath}")
private String transferRecordPathTemp;
// 出院
public static String dischargeRecordPath;
@Value("${file.dischargeRecordPath}")
private String dischargeRecordPathTemp;
// 入院
public static String admissionRecordPath;
@Value("${file.admissionRecordPath}")
private String admissionRecordPathTemp;
// 患者更新
public static String patientUpdatePath;
@Value("${file.patientUpdatePath}")
private String patientUpdatePathTemp;
// 手麻系统 // 手麻系统
public static String handNumbnessReportPath; public static String handNumbnessReportPath;
@Value("${file.handNumbnessReportPath}") @Value("${file.handNumbnessReportPath}")
@ -88,10 +68,6 @@ public class XMLUtils {
@PostConstruct @PostConstruct
public void init() { public void init() {
path = pathTemp; path = pathTemp;
patientUpdatePath = patientUpdatePathTemp;
dischargeRecordPath = dischargeRecordPathTemp;
admissionRecordPath = admissionRecordPathTemp;
transferRecordPath = transferRecordPathTemp;
handNumbnessReportPath = handNumbnessReportPathTemp; handNumbnessReportPath = handNumbnessReportPathTemp;
ICUReportPath = ICUReportPathTemp; ICUReportPath = ICUReportPathTemp;
bloodApplyPath = bloodApplyPathTemp; bloodApplyPath = bloodApplyPathTemp;
@ -118,95 +94,6 @@ public class XMLUtils {
return document.getRootElement().asXML(); return document.getRootElement().asXML();
} }
/**
* xml
*/
public static <T> T xmlStrToObject(String xmlStr, Class<T> type) throws Exception{
if (StringUtils.isEmpty(xmlStr)) {
return null;
}
Document doc = null; // 将xml格式的字符串转换成Document对象
T obj = null; // 创建 JavaBean 对象
obj = type.newInstance();
doc = DocumentHelper.parseText(xmlStr);
// 获取根节点
Element root = doc.getRootElement();
// 获取根节点下的所有元素
List children = root.elements();
// 循环所有子元素
if (children != null && children.size() > 0) {
for (int i = 0; i < children.size(); i++) {
Element child = (Element) children.get(i);
Field[] fields = obj.getClass().getDeclaredFields();
for (Field field : fields) {
field.setAccessible(true);
String fieldName = field.getName();
if (fieldName.equals(child.getName())) {
Type genericType = field.getGenericType();
Object[] args = new Object[1];
String value = child.getTextTrim();
// 赋值
PropertyDescriptor descriptor = new PropertyDescriptor(fieldName, type);
if (("java.lang.Integer").equals(genericType.getTypeName()) || genericType.getTypeName().equals("int")) {
if (value != null && value.length() > 0) {
args[0] = Integer.parseInt(value + "");
descriptor.getWriteMethod().invoke(obj, args);
}
} else if ((Date.class.getName()).equals(genericType.getTypeName())) {
descriptor.getWriteMethod().invoke(obj, simpleDateFormat.parse(value, new ParsePosition(0)));
} else if (("java.lang.Long").equalsIgnoreCase(genericType.getTypeName()) || genericType.getTypeName().equals("long")) {
if (value != null && value.length() > 0) {
args[0] = Long.parseLong(value + "");
descriptor.getWriteMethod().invoke(obj, args);
}
} else if (("java.lang.Boolean").equalsIgnoreCase(genericType.getTypeName()) || genericType.getTypeName().equals("boolean")) {
if (value != null && value.length() > 0) {
args[0] = Boolean.valueOf(value + "");
descriptor.getWriteMethod().invoke(obj, args);
}
} else if (("java.lang.Double").equalsIgnoreCase(genericType.getTypeName()) || genericType.getTypeName().equals("double")) {
if (value != null && value.length() > 0) {
args[0] = Double.parseDouble(value + "");
descriptor.getWriteMethod().invoke(obj, args);
}
} else if (("java.lang.Float").equalsIgnoreCase(genericType.getTypeName()) || genericType.getTypeName().equals("float")) {
if (value != null && value.length() > 0) {
args[0] = Float.parseFloat(value + "");
descriptor.getWriteMethod().invoke(obj, args);
}
} else {
descriptor.getWriteMethod().invoke(obj, value);
}
break;
}
}
}
}
return obj;
}
/**
* V3xml
*/
public static String generateV3XmlStr(String typeCodeValue, String textContent) throws Exception {
SAXReader reader = new SAXReader();
Document document = reader.read(path);
Element root = document.getRootElement();
Element creationTime = root.element("creationTime");
Attribute value = creationTime.attribute("value");
value.setValue(new Date().toString());
Element acknowledgement = root.element("acknowledgement");
Attribute typeCode = acknowledgement.attribute("typeCode");
typeCode.setValue(typeCodeValue);
Element acknowledgementDetail = acknowledgement.element("acknowledgementDetail");
Element text = acknowledgementDetail.element("text");
text.setText(textContent);
return document.getRootElement().asXML();
}
//--------------------------------------------向外抛出异常 //--------------------------------------------向外抛出异常
public static MessageDto xpathToBean(String xmlStr, Class tClass, String source) throws Exception { public static MessageDto xpathToBean(String xmlStr, Class tClass, String source) throws Exception {
@ -313,24 +200,9 @@ public class XMLUtils {
MessageDto messageDto = null; MessageDto messageDto = null;
// 根据source判断是哪个实体类 // 根据source判断是哪个实体类
switch (source) { switch (source) {
case InterfaceName.PARAMETER_ADMISSION: //入院
messageDto = new MessageDto(ArchiveMaster.class.getName(), new ArchiveMaster(), AliasName.ADMISSION_RECORD, admissionRecordPath, source);
break;
case InterfaceName.PARAMETER_DISCHARGE: // 出院
messageDto = new MessageDto(ArchiveMaster.class.getName(), new ArchiveMaster(), AliasName.DISCHARGE_RECORD, dischargeRecordPath, InterfaceName.PARAMETER_ADMISSION);
break;
case InterfaceName.PARAMETER_CANCELLATION_DISCHARGE: // 取消入院
messageDto = new MessageDto(ArchiveMaster.class.getName(), new ArchiveMaster(), AliasName.CANCELLATION_DISCHARGE, admissionRecordPath, source);
break;
case InterfaceName.PARAMETER_TRANSFER: // 转科
messageDto = new MessageDto(ArchiveMaster.class.getName(), new ArchiveMaster(), AliasName.TRANSFER_RECORD, transferRecordPath, source);
break;
case InterfaceName.HANDNUMBNESS_REPORT: // 手麻系统 case InterfaceName.HANDNUMBNESS_REPORT: // 手麻系统
messageDto = new MessageDto(HandNumbnessReport.class.getName(), new HandNumbnessReport(), AliasName.HANDNUMBNESS_REPORT, handNumbnessReportPath, source); messageDto = new MessageDto(HandNumbnessReport.class.getName(), new HandNumbnessReport(), AliasName.HANDNUMBNESS_REPORT, handNumbnessReportPath, source);
break; break;
case InterfaceName.PARAMETER_PATIENT_UPDATE: // 患者更新
messageDto = new MessageDto(ArchiveMaster.class.getName(), new ArchiveMaster(), AliasName.PATIENT_UPDATE, patientUpdatePath, source);
break;
case InterfaceName.ICU_REPORT: // ICU重症单 case InterfaceName.ICU_REPORT: // ICU重症单
messageDto = new MessageDto(ICUReport.class.getName(), new ICUReport(), AliasName.ICU_REPORT, ICUReportPath, source); messageDto = new MessageDto(ICUReport.class.getName(), new ICUReport(), AliasName.ICU_REPORT, ICUReportPath, source);
break; break;
@ -500,11 +372,20 @@ public class XMLUtils {
} }
} else if (("java.lang.Double").equalsIgnoreCase(genericType.getTypeName()) || genericType.getTypeName().equals("double")) { } else if (("java.lang.Double").equalsIgnoreCase(genericType.getTypeName()) || genericType.getTypeName().equals("double")) {
if (value != null && value.length() > 0) { if (value != null && value.length() > 0) {
descriptor.getWriteMethod().invoke(obj, Double.parseDouble(value + "")); if(value.indexOf("-") != -1){
descriptor.getWriteMethod().invoke(obj, Double.parseDouble("0.00"));
}else{
descriptor.getWriteMethod().invoke(obj, Double.parseDouble(value + ""));
}
} }
} else if (("java.lang.Float").equalsIgnoreCase(genericType.getTypeName()) || genericType.getTypeName().equals("float")) { } else if (("java.lang.Float").equalsIgnoreCase(genericType.getTypeName()) || genericType.getTypeName().equals("float")) {
if (value != null && value.length() > 0) { if (value != null && value.length() > 0) {
descriptor.getWriteMethod().invoke(obj, Float.parseFloat(value + "")); if(value.indexOf("-") != -1){
descriptor.getWriteMethod().invoke(obj, Float.parseFloat("0.00"));
}else{
descriptor.getWriteMethod().invoke(obj, Float.parseFloat(value + ""));
}
} }
} else { } else {
descriptor.getWriteMethod().invoke(obj, value); descriptor.getWriteMethod().invoke(obj, value);

Loading…
Cancel
Save