web service服務搭建
parent
a23952b459
commit
d7ca603988
@ -0,0 +1,158 @@
|
||||
{
|
||||
"selectColumns":[
|
||||
{
|
||||
"serialNumber": "1",
|
||||
"tableName": "t_basic_sub",
|
||||
"columnName": "healthy_card",
|
||||
"qualityColumn": "VUID",
|
||||
"byNull":0
|
||||
},
|
||||
{
|
||||
"serialNumber": "2",
|
||||
"tableName": "t_basic",
|
||||
"columnName": "admiss_id",
|
||||
"qualityColumn": "INHOSP_INDEX_NO",
|
||||
"byNull":0
|
||||
},
|
||||
{
|
||||
"serialNumber": "3",
|
||||
"tableName": "t_basic",
|
||||
"columnName": "inpatient_no",
|
||||
"qualityColumn": "INHOSP_NO",
|
||||
"byNull":0
|
||||
},
|
||||
{
|
||||
"serialNumber": "4",
|
||||
"tableName": "t_basic",
|
||||
"columnName": "emp_id",
|
||||
"qualityColumn": "EMPI_ID",
|
||||
"byNull":0
|
||||
},
|
||||
{
|
||||
"serialNumber": "5",
|
||||
"tableName": "t_basic",
|
||||
"columnName": "dis_date",
|
||||
"qualityColumn": "DISCHARGE_DATETIME",
|
||||
"byNull":0
|
||||
},
|
||||
{
|
||||
"serialNumber": "6",
|
||||
"tableName": "t_basic",
|
||||
"columnName": "name",
|
||||
"qualityColumn": "PAT_NAME",
|
||||
"byNull":0
|
||||
},
|
||||
{
|
||||
"serialNumber": "7",
|
||||
"tableName": "t_basic",
|
||||
"columnName": "admiss_times",
|
||||
"qualityColumn": "VISIT_NO",
|
||||
"byNull":0
|
||||
},
|
||||
{
|
||||
"serialNumber": "8",
|
||||
"tableName": "t_basic",
|
||||
"columnName": "visit_type_code",
|
||||
"qualityColumn": "VISIT_TYPE_CODE",
|
||||
"byNull":0
|
||||
},
|
||||
{
|
||||
"serialNumber": "9",
|
||||
"tableName": "t_basic",
|
||||
"columnName": "visit_type_name",
|
||||
"qualityColumn": "VISIT_TYPE_NAME",
|
||||
"byNull":0
|
||||
},
|
||||
{
|
||||
"serialNumber": "10",
|
||||
"tableName": "t_basic",
|
||||
"columnName": "admiss_days",
|
||||
"qualityColumn": "INHOSP_DAYS",
|
||||
"byNull":0
|
||||
},
|
||||
{
|
||||
"serialNumber": "11",
|
||||
"tableName": "t_basic",
|
||||
"columnName": "id_card",
|
||||
"qualityColumn": "ID_NUMBER",
|
||||
"byNull":0
|
||||
},
|
||||
{
|
||||
"serialNumber": "12",
|
||||
"tableName": "t_basic",
|
||||
"columnName": "main_diag_code",
|
||||
"qualityColumn": "WM_DIAG_CODE",
|
||||
"byNull":0
|
||||
},
|
||||
{
|
||||
"serialNumber": "13",
|
||||
"tableName": "t_basic",
|
||||
"columnName": "main_diag_name",
|
||||
"qualityColumn": "WM_DIAG_NAME",
|
||||
"byNull":0
|
||||
},
|
||||
{
|
||||
"serialNumber": "14",
|
||||
"tableName": "t_basic",
|
||||
"columnName": "attending",
|
||||
"qualityColumn": "WM_DIAG_DR_CODE",
|
||||
"byNull":0
|
||||
},
|
||||
{
|
||||
"serialNumber": "15",
|
||||
"tableName": "t_basic",
|
||||
"columnName": "attending_name",
|
||||
"qualityColumn": "WM_DIAG_DR_NAME",
|
||||
"byNull":0
|
||||
},
|
||||
{
|
||||
"serialNumber": "16",
|
||||
"tableName": "t_basic",
|
||||
"columnName": "tcm_diag_code",
|
||||
"qualityColumn": "TCM_DIAG_CODE",
|
||||
"byNull":0
|
||||
},
|
||||
{
|
||||
"serialNumber": "17",
|
||||
"tableName": "t_basic",
|
||||
"columnName": "tcm_diag_name",
|
||||
"qualityColumn": "TCM_DIAG_NAME",
|
||||
"byNull":0
|
||||
},
|
||||
{
|
||||
"serialNumber": "18",
|
||||
"tableName": "t_basic",
|
||||
"columnName": "dis_dept",
|
||||
"qualityColumn": "DEPT_CODE",
|
||||
"byNull":1
|
||||
},
|
||||
{
|
||||
"serialNumber": "19",
|
||||
"tableName": "t_basic",
|
||||
"columnName": "dis_dept_name",
|
||||
"qualityColumn": "DEPT_NAME",
|
||||
"byNull":1
|
||||
},
|
||||
{
|
||||
"serialNumber": "20",
|
||||
"tableName": "t_basic",
|
||||
"columnName": "jzh",
|
||||
"qualityColumn": "ACCOUNT_NUM",
|
||||
"byNull":1
|
||||
},
|
||||
{
|
||||
"serialNumber": "21",
|
||||
"tableName": "t_basic",
|
||||
"columnName": "ward_palce",
|
||||
"qualityColumn": "SUBOR_HOSPITAL_DISTRICT",
|
||||
"byNull":1
|
||||
},
|
||||
{
|
||||
"serialNumber": "22",
|
||||
"tableName": "t_basic",
|
||||
"columnName": "admiss_dept",
|
||||
"qualityColumn": "ADMIT_DEPT_COD",
|
||||
"byNull":1
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1 @@
|
||||
lombok.var.flagUsage = ALLOW
|
@ -0,0 +1,66 @@
|
||||
package com.docus.webservice.config;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.autoconfigure.MybatisPlusProperties;
|
||||
import com.baomidou.mybatisplus.core.MybatisConfiguration;
|
||||
import com.baomidou.mybatisplus.core.config.GlobalConfig;
|
||||
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.experimental.var;
|
||||
import org.apache.ibatis.logging.nologging.NoLoggingImpl;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.util.Objects;
|
||||
|
||||
@Configuration
|
||||
@RequiredArgsConstructor
|
||||
@EnableTransactionManagement
|
||||
@MapperScan("com.docus.webservice.mapper")
|
||||
@ConditionalOnClass(value = {PaginationInterceptor.class})
|
||||
public class MybatisPlusConfig {
|
||||
|
||||
|
||||
private final MybatisPlusProperties mybatisPlusProperties;
|
||||
@Bean
|
||||
public PaginationInterceptor paginationInterceptor() {
|
||||
PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
|
||||
return paginationInterceptor;
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
public void initMybatisConfig(){
|
||||
mybatisPlusProperties.setMapperLocations(new String[]{"classpath*:/mapper/*Mapper.xml"});
|
||||
mybatisPlusProperties.setTypeAliasesPackage("com.docus.webservice.entity");
|
||||
|
||||
MybatisConfiguration configuration = mybatisPlusProperties.getConfiguration();
|
||||
if(Objects.isNull(configuration)){
|
||||
configuration=new MybatisConfiguration();
|
||||
}
|
||||
configuration.setMapUnderscoreToCamelCase(true);
|
||||
configuration.setCacheEnabled(true);
|
||||
configuration.setLogImpl(NoLoggingImpl.class);
|
||||
mybatisPlusProperties.setConfiguration(configuration);
|
||||
|
||||
var globalConfig = mybatisPlusProperties.getGlobalConfig();
|
||||
if(Objects.isNull(globalConfig)){
|
||||
globalConfig=new GlobalConfig();
|
||||
}
|
||||
GlobalConfig.DbConfig dbConfig = globalConfig.getDbConfig();
|
||||
if(Objects.isNull(dbConfig)){
|
||||
dbConfig=new GlobalConfig.DbConfig();
|
||||
}
|
||||
configuration.setCallSettersOnNulls(true);
|
||||
dbConfig.setIdType(IdType.ASSIGN_ID);
|
||||
dbConfig.setTableUnderline(true);
|
||||
dbConfig.setLogicDeleteValue("1");
|
||||
dbConfig.setLogicNotDeleteValue("0");
|
||||
dbConfig.setLogicDeleteField("def_flag");
|
||||
globalConfig.setDbConfig(dbConfig);
|
||||
globalConfig.setBanner(false);
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.docus.webservice.config;
|
||||
|
||||
import com.docus.webservice.enums.Codes;
|
||||
import com.docus.webservice.handler.ITBasicWebService;
|
||||
import com.docus.webservice.handler.TBasicWebService;
|
||||
import com.sun.xml.internal.ws.transport.http.server.EndpointImpl;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import javax.xml.ws.Endpoint;
|
||||
|
||||
@Configuration
|
||||
public class WebServiceConfig {
|
||||
|
||||
//把实现类交给spring管理
|
||||
@Bean
|
||||
public ITBasicWebService tBasicWebService() {
|
||||
return new TBasicWebService();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public Endpoint endpoint() {
|
||||
System.out.println("-----------------------web service服务已发布-------------------------");
|
||||
String address = "http://localhost:" + Codes.EXTERNAL.getCode()+"/" + Codes.EXTERNAL.getMessage();
|
||||
Endpoint publish = Endpoint.publish(address, tBasicWebService());
|
||||
System.out.println(" "+address);
|
||||
return publish;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package com.docus.webservice.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class SelectColumn {
|
||||
private String serialNumber;
|
||||
private String tableName;
|
||||
private String columnName;
|
||||
private String qualityColumn;
|
||||
private Integer byNull;
|
||||
}
|
@ -0,0 +1,419 @@
|
||||
package com.docus.webservice.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 病案子表
|
||||
* </p>
|
||||
*
|
||||
* @author jiashi
|
||||
* @since 2021-04-14
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="TBasicSub对象", description="病案子表")
|
||||
public class TBasicSub implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "病案主键")
|
||||
@TableId(value = "patient_id", type = IdType.ASSIGN_ID)
|
||||
private String patientId;
|
||||
|
||||
@ApiModelProperty(value = "医疗付费方式")
|
||||
private String payType;
|
||||
|
||||
@ApiModelProperty(value = "健康卡号")
|
||||
private String healthyCard;
|
||||
|
||||
@ApiModelProperty(value = "出生日期")
|
||||
private Date birthday;
|
||||
|
||||
@ApiModelProperty(value = "国籍")
|
||||
private String country;
|
||||
|
||||
@ApiModelProperty(value = "民族")
|
||||
private String nation;
|
||||
|
||||
@ApiModelProperty(value = "新生儿出生体重")
|
||||
private BigDecimal avoirdupois;
|
||||
|
||||
@ApiModelProperty(value = "新生儿入院体重")
|
||||
private BigDecimal birthbabyWeight;
|
||||
|
||||
@ApiModelProperty(value = "出生地")
|
||||
private String birthAddr;
|
||||
|
||||
@ApiModelProperty(value = "籍贯")
|
||||
private String nativePlace;
|
||||
|
||||
@ApiModelProperty(value = "职业")
|
||||
private String job;
|
||||
|
||||
@ApiModelProperty(value = "婚况")
|
||||
private String marriage;
|
||||
|
||||
@ApiModelProperty(value = "现住邮编")
|
||||
private String zip;
|
||||
|
||||
@ApiModelProperty(value = "户口地址")
|
||||
private String homeAddr;
|
||||
|
||||
@ApiModelProperty(value = "家庭电话")
|
||||
private String homeTel;
|
||||
|
||||
@ApiModelProperty(value = "家庭邮编")
|
||||
private String homeZip;
|
||||
|
||||
@ApiModelProperty(value = "病人来源")
|
||||
private String patientsSource;
|
||||
|
||||
@ApiModelProperty(value = "工作单位及地址")
|
||||
private String workAddr;
|
||||
|
||||
@ApiModelProperty(value = "工作单位电话")
|
||||
private String workTel;
|
||||
|
||||
@ApiModelProperty(value = "工作单位住址邮编")
|
||||
private String workZip;
|
||||
|
||||
@ApiModelProperty(value = "联系人姓名")
|
||||
private String linkman;
|
||||
|
||||
@ApiModelProperty(value = "联系人关系")
|
||||
private String relation;
|
||||
|
||||
@ApiModelProperty(value = "关系人住址")
|
||||
private String relAddr;
|
||||
|
||||
@ApiModelProperty(value = "关系人电话")
|
||||
private String relTel;
|
||||
|
||||
@ApiModelProperty(value = "入院途径")
|
||||
private String admissType;
|
||||
|
||||
@ApiModelProperty(value = "入院病房")
|
||||
private String admissWard;
|
||||
|
||||
@ApiModelProperty(value = "出院病房")
|
||||
private String disWard;
|
||||
|
||||
@ApiModelProperty(value = "门(急)诊诊断")
|
||||
private String clinicName;
|
||||
|
||||
@ApiModelProperty(value = "门(急)诊诊断编码")
|
||||
private String clinicDiag;
|
||||
|
||||
@ApiModelProperty(value = "门(急)诊医生")
|
||||
private String clinicDoctor;
|
||||
|
||||
@ApiModelProperty(value = "病历分型")
|
||||
private String caseType;
|
||||
|
||||
@ApiModelProperty(value = "是否有临床路径病历")
|
||||
private String isMedicalRecordPath;
|
||||
|
||||
@ApiModelProperty(value = "抢救次数")
|
||||
private String saveTimes;
|
||||
|
||||
@ApiModelProperty(value = "抢救成功次数")
|
||||
private String saveSuccessTimes;
|
||||
|
||||
@ApiModelProperty(value = "损伤、中毒的外部原因")
|
||||
private String injuryPoisoningCauses;
|
||||
|
||||
@ApiModelProperty(value = "损伤、中毒的外部原因编码")
|
||||
private String injuryPoisoningCausesDate;
|
||||
|
||||
@ApiModelProperty(value = "病理诊断")
|
||||
private String pathologyDiagName;
|
||||
|
||||
@ApiModelProperty(value = "病理号")
|
||||
private String pathologyDiagNum;
|
||||
|
||||
@ApiModelProperty(value = "病理编码")
|
||||
private String pathologyDiagCode;
|
||||
|
||||
@ApiModelProperty(value = "是否药物过敏")
|
||||
private String isMedicine;
|
||||
|
||||
@ApiModelProperty(value = "药物过敏")
|
||||
private String medicine;
|
||||
|
||||
@ApiModelProperty(value = "是否死亡患者尸检")
|
||||
private String emitPathology;
|
||||
|
||||
@ApiModelProperty(value = "血型")
|
||||
private String bloodType;
|
||||
|
||||
@ApiModelProperty(value = "Rh")
|
||||
@TableField("RH")
|
||||
private String rh;
|
||||
|
||||
@ApiModelProperty(value = "科主任")
|
||||
private String deptDirector;
|
||||
|
||||
@ApiModelProperty(value = "主任(副主任)医师")
|
||||
private String director;
|
||||
|
||||
@ApiModelProperty(value = "住院医师")
|
||||
private String admissDoctor;
|
||||
|
||||
@ApiModelProperty(value = "责任护士")
|
||||
private String responsibleNurse;
|
||||
|
||||
@ApiModelProperty(value = "进修医师")
|
||||
private String refresher;
|
||||
|
||||
@ApiModelProperty(value = "实习医师")
|
||||
private String praxis;
|
||||
|
||||
@ApiModelProperty(value = "编码员")
|
||||
private String coding;
|
||||
|
||||
@ApiModelProperty(value = "病案质量")
|
||||
private String quality;
|
||||
|
||||
@ApiModelProperty(value = "质控医师")
|
||||
private String control;
|
||||
|
||||
@ApiModelProperty(value = "质控护士")
|
||||
private String nurses;
|
||||
|
||||
@ApiModelProperty(value = "质控日期")
|
||||
private Date qualityDate;
|
||||
|
||||
@ApiModelProperty(value = "离院方式")
|
||||
private String disType;
|
||||
|
||||
@ApiModelProperty(value = "是否有出院31天内再住院计划")
|
||||
private String isHospitalization;
|
||||
|
||||
@ApiModelProperty(value = "出院31天内再住院目的")
|
||||
private String hospitalizationObjective;
|
||||
|
||||
@ApiModelProperty(value = "颅脑损伤患者昏迷时间入院前时间")
|
||||
private String craniocerebralStarttime;
|
||||
|
||||
@ApiModelProperty(value = "颅脑损伤患者昏迷时间入院后时间")
|
||||
private String craniocerebralEndtime;
|
||||
|
||||
@ApiModelProperty(value = "肿瘤分期类型")
|
||||
private String tumorStagingType;
|
||||
|
||||
@ApiModelProperty(value = "方式(放疗)")
|
||||
private String radiotherapyType;
|
||||
|
||||
@ApiModelProperty(value = "程式(放疗)")
|
||||
private String radiotherapyProgram;
|
||||
|
||||
@ApiModelProperty(value = "装置(放疗)")
|
||||
private String radiotherapyDevice;
|
||||
|
||||
@ApiModelProperty(value = "肿瘤诊断类型")
|
||||
private String tumorDiagType;
|
||||
|
||||
@ApiModelProperty(value = "放疗服药期间天数")
|
||||
private Integer primaryTumorDay;
|
||||
|
||||
@ApiModelProperty(value = "放疗服药期间每天次数")
|
||||
private Integer primaryTumorTimes;
|
||||
|
||||
@ApiModelProperty(value = "放疗服药期间每次剂量")
|
||||
private Integer primaryTumorDose;
|
||||
|
||||
@ApiModelProperty(value = "放疗服药起始日期")
|
||||
private String primaryTumorStarttime;
|
||||
|
||||
@ApiModelProperty(value = "放疗服药终止日期")
|
||||
private String primaryTumorEndtime;
|
||||
|
||||
@ApiModelProperty(value = "化疗方式")
|
||||
private String chemotherapyType;
|
||||
|
||||
@ApiModelProperty(value = "化疗方法")
|
||||
private String chemotherapyMethod;
|
||||
|
||||
@ApiModelProperty(value = "主要入院病情")
|
||||
private String mainAdmissThing;
|
||||
|
||||
@ApiModelProperty(value = "主要手术日期")
|
||||
private Date mainOperateDate;
|
||||
|
||||
@ApiModelProperty(value = "主要手术麻醉方式")
|
||||
private String mainAnaesthesiaType;
|
||||
|
||||
@ApiModelProperty(value = "主要手术级别")
|
||||
private String mainOperateClass;
|
||||
|
||||
@ApiModelProperty(value = "主要手术术者")
|
||||
private String mainOperator;
|
||||
|
||||
@ApiModelProperty(value = "院内感染病名")
|
||||
private String taintName;
|
||||
|
||||
@ApiModelProperty(value = "其他诊断")
|
||||
private String otherDiagName;
|
||||
|
||||
@ApiModelProperty(value = "终审时间")
|
||||
private String finalJudgmentName;
|
||||
|
||||
@ApiModelProperty(value = "是否已扫描")
|
||||
private String isScan;
|
||||
|
||||
@ApiModelProperty(value = "光点号")
|
||||
private String gdh;
|
||||
|
||||
private String bsColumn1;
|
||||
|
||||
private String bsColumn2;
|
||||
|
||||
private String bsColumn3;
|
||||
|
||||
private String bsColumn4;
|
||||
|
||||
private String bsColumn5;
|
||||
|
||||
private Integer bsColumn6;
|
||||
|
||||
private Integer bsColumn7;
|
||||
|
||||
private Integer bsColumn8;
|
||||
|
||||
private Integer bsColumn9;
|
||||
|
||||
private Integer bsColumn10;
|
||||
|
||||
@ApiModelProperty(value = "医疗付费方式名称")
|
||||
private String payTypeName;
|
||||
|
||||
@ApiModelProperty(value = "国籍名称")
|
||||
private String countryName;
|
||||
|
||||
@ApiModelProperty(value = "民族名称")
|
||||
private String nationName;
|
||||
|
||||
@ApiModelProperty(value = "籍贯名称")
|
||||
private String nativePlaceName;
|
||||
|
||||
@ApiModelProperty(value = "职业名称")
|
||||
private String jobName;
|
||||
|
||||
@ApiModelProperty(value = "婚况名称")
|
||||
private String marriageName;
|
||||
|
||||
@ApiModelProperty(value = "联系人关系名称")
|
||||
private String relationName;
|
||||
|
||||
@ApiModelProperty(value = "入院途径名称")
|
||||
private String admissTypeName;
|
||||
|
||||
@ApiModelProperty(value = "入院病房名称")
|
||||
private String admissWardName;
|
||||
|
||||
@ApiModelProperty(value = "出院病房名称")
|
||||
private String disWardName;
|
||||
|
||||
@ApiModelProperty(value = "门(急)诊医生名称")
|
||||
private String clinicDoctorName;
|
||||
|
||||
@ApiModelProperty(value = "病历分型名称")
|
||||
private String caseTypeName;
|
||||
|
||||
@ApiModelProperty(value = "科主任名称")
|
||||
private String deptDirectorName;
|
||||
|
||||
@ApiModelProperty(value = "主任(副主任)医师名称")
|
||||
private String directorName;
|
||||
|
||||
@ApiModelProperty(value = "住院医师名称")
|
||||
private String admissDoctorName;
|
||||
|
||||
@ApiModelProperty(value = "责任护士名称")
|
||||
private String responsibleNurseName;
|
||||
|
||||
@ApiModelProperty(value = "进修医师名称")
|
||||
private String refresherName;
|
||||
|
||||
@ApiModelProperty(value = "实习医师名称")
|
||||
private String praxisName;
|
||||
|
||||
@ApiModelProperty(value = "编码员名称")
|
||||
private String codingName;
|
||||
|
||||
@ApiModelProperty(value = "病案质量名称")
|
||||
private String qualityName;
|
||||
|
||||
@ApiModelProperty(value = "质控医师名称")
|
||||
private String controlName;
|
||||
|
||||
@ApiModelProperty(value = "质控护士名称")
|
||||
private String nursesName;
|
||||
|
||||
@ApiModelProperty(value = "离院方式名称")
|
||||
private String disTypeName;
|
||||
|
||||
@ApiModelProperty(value = "是否有出院31天内再住院计划名称")
|
||||
private String isHospitalizationName;
|
||||
|
||||
@ApiModelProperty(value = "肿瘤分期类型名称")
|
||||
private String tumorStagingTypeName;
|
||||
|
||||
@ApiModelProperty(value = "方式(放疗)名称")
|
||||
private String radiotherapyTypeName;
|
||||
|
||||
@ApiModelProperty(value = "程式(放疗)名称")
|
||||
private String radiotherapyProgramName;
|
||||
|
||||
@ApiModelProperty(value = "装置(放疗)名称")
|
||||
private String radiotherapyDeviceName;
|
||||
|
||||
@ApiModelProperty(value = "化疗方式名称")
|
||||
private String chemotherapyTypeName;
|
||||
|
||||
@ApiModelProperty(value = "化疗方法名称")
|
||||
private String chemotherapyMethodName;
|
||||
|
||||
@ApiModelProperty(value = "主要入院病情名称")
|
||||
private String mainAdmissThingName;
|
||||
|
||||
@ApiModelProperty(value = "主要手术麻醉方式名称")
|
||||
private String mainAnaesthesiaTypeName;
|
||||
|
||||
@ApiModelProperty(value = "主要手术级别名称")
|
||||
private String mainOperateClassName;
|
||||
|
||||
@ApiModelProperty(value = "主要手术术者名称")
|
||||
private String mainOperatorName;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "其他诊断编码")
|
||||
private String otherDiagCode;
|
||||
|
||||
@ApiModelProperty(value = "rh名称")
|
||||
private String rhName;
|
||||
@ApiModelProperty(value = "血型名称")
|
||||
private String bloodTypeName;
|
||||
@ApiModelProperty(value = "是否药物过敏名称")
|
||||
private String isMedicineName;
|
||||
@ApiModelProperty(value = "是否死亡患者尸检名称")
|
||||
private String emitPathologyName;
|
||||
@ApiModelProperty(value = "是否有临床路径病历名称")
|
||||
private String isMedicalRecordPathName;
|
||||
@ApiModelProperty(value = "肿瘤诊断类型名称")
|
||||
private String tumorDiagTypeName;
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package com.docus.webservice.handler;
|
||||
|
||||
import javax.jws.WebMethod;
|
||||
import javax.jws.WebService;
|
||||
|
||||
@WebService
|
||||
public interface ITBasicWebService {
|
||||
|
||||
/**
|
||||
* 检验报告推送
|
||||
* @param tbasic
|
||||
* @return
|
||||
*/
|
||||
@WebMethod
|
||||
String savaAndSub(String tbasic);
|
||||
}
|
@ -0,0 +1,95 @@
|
||||
package com.docus.webservice.handler;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.docus.webservice.dto.SelectColumn;
|
||||
import com.docus.webservice.enums.Codes;
|
||||
import com.docus.webservice.entity.TBasic;
|
||||
import com.docus.webservice.entity.TBasicSub;
|
||||
import com.docus.webservice.mapper.TBasicMapper;
|
||||
import com.docus.webservice.mapper.TBasicSubMapper;
|
||||
import com.docus.webservice.utils.JsonUtils;
|
||||
import com.docus.webservice.utils.ResultUtils;
|
||||
import com.docus.webservice.utils.XmlUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import javax.jws.WebService;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@WebService
|
||||
public class TBasicWebService implements ITBasicWebService {
|
||||
|
||||
@Autowired
|
||||
private TBasicMapper tBasicMapper;
|
||||
|
||||
@Autowired
|
||||
private TBasicSubMapper tBasicSubMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public String savaAndSub(String tbasic) {
|
||||
XmlUtils xmlUtils = null;
|
||||
String resXml;
|
||||
try {
|
||||
//解析xml
|
||||
xmlUtils = new XmlUtils(new ByteArrayInputStream(tbasic.getBytes("UTF-8")));
|
||||
//解析json映射文件
|
||||
String json = JsonUtils.readJsonFile(Codes.JSON_ADDRESS.getMessage());
|
||||
Map jsonMap = JSON.parseObject(json, Map.class);
|
||||
HashMap<String, Object> tBasicMap = new HashMap<>();
|
||||
HashMap<String, Object> tBasicSubMap = new HashMap<>();
|
||||
List<SelectColumn> selectColumns = JSON.parseArray(String.valueOf(jsonMap.get("selectColumns")), SelectColumn.class);
|
||||
String value;
|
||||
for (SelectColumn selectColumn : selectColumns) {
|
||||
try {
|
||||
value = String.valueOf(xmlUtils.getElementText(selectColumn.getQualityColumn()));
|
||||
}catch (RuntimeException e){
|
||||
String message = e.getMessage();
|
||||
System.out.println(message);
|
||||
return ResultUtils.fail(message);
|
||||
}
|
||||
if (StringUtils.isBlank(value)) {
|
||||
if (selectColumn.getByNull() == 0) {
|
||||
return ResultUtils.fail(selectColumn.getQualityColumn() + " 字段不能为空值");
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
if (selectColumn.getTableName().equals("t_basic")) {
|
||||
tBasicMap.put(selectColumn.getColumnName(), value);
|
||||
}
|
||||
if (selectColumn.getTableName().equals("t_basic_sub")) {
|
||||
tBasicSubMap.put(selectColumn.getColumnName(), value);
|
||||
}
|
||||
}
|
||||
}
|
||||
//处理业务
|
||||
TBasic tBasic = new TBasic();
|
||||
|
||||
int insert;
|
||||
if (tBasicMap != null && tBasicMap.size() > 0) {
|
||||
tBasic=JsonUtils.map2bean(tBasicMap,TBasic.class);
|
||||
// insert = tBasicMapper.insert(tBasic);
|
||||
// if (insert <= 0) {
|
||||
// return ResultUtils.fail("数据库执行出错,请重试");
|
||||
// }
|
||||
TBasicSub tBasicSub = new TBasicSub();
|
||||
// BeanUtils.copyProperties(tBasicSubMap, tBasicSub);
|
||||
tBasicSub=JsonUtils.map2bean(tBasicSubMap,TBasicSub.class);
|
||||
tBasicSub.setPatientId(tBasic.getPatientId());
|
||||
// insert = tBasicSubMapper.insert(tBasicSub);
|
||||
// if (insert <= 0) {
|
||||
// return ResultUtils.fail("数据库执行出错,请重试");
|
||||
// }
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return ResultUtils.fail();
|
||||
}
|
||||
return ResultUtils.success().asXML();
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.docus.webservice.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.docus.webservice.entity.TBasic;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 病案基本信息 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author jiashi
|
||||
* @since 2021-04-14
|
||||
*/
|
||||
public interface TBasicMapper extends BaseMapper<TBasic> {
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.docus.webservice.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.docus.webservice.entity.TBasicSub;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 病案子表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author jiashi
|
||||
* @since 2021-04-14
|
||||
*/
|
||||
public interface TBasicSubMapper extends BaseMapper<TBasicSub> {
|
||||
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.docus.webservice.run;
|
||||
|
||||
import com.docus.webservice.enums.Codes;
|
||||
import com.docus.webservice.handler.TBasicWebService;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.xml.ws.Endpoint;
|
||||
|
||||
/**
|
||||
* 启动服务
|
||||
*/
|
||||
public class RunServer {
|
||||
|
||||
public void run() {
|
||||
String address = "http://localhost:" + Codes.EXTERNAL.getCode()+"/" + Codes.EXTERNAL.getMessage();
|
||||
Endpoint.publish(address, new TBasicWebService());
|
||||
System.out.println("publish success...");
|
||||
System.out.println(address);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
package com.docus.webservice.utils;
|
||||
|
||||
import org.dom4j.Document;
|
||||
import org.dom4j.DocumentException;
|
||||
import org.dom4j.Element;
|
||||
import org.dom4j.io.SAXReader;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
public class XmlUtils {
|
||||
//定义解析器和文档对象
|
||||
private SAXReader saxReader;
|
||||
private Document document;
|
||||
|
||||
public XmlUtils(String path) {
|
||||
//获取解析器
|
||||
saxReader = new SAXReader();
|
||||
try {
|
||||
//获取文档对象
|
||||
document = saxReader.read(path);
|
||||
} catch (DocumentException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public XmlUtils(InputStream path) {
|
||||
//获取解析器
|
||||
saxReader = new SAXReader();
|
||||
try {
|
||||
//获取文档对象
|
||||
document = saxReader.read(path);
|
||||
} catch (DocumentException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据节点名称获取内容
|
||||
*
|
||||
* @param name 节点名称
|
||||
* @return 节点内容
|
||||
*/
|
||||
public String getElementText(String name) {
|
||||
//定位根节点
|
||||
Element root = document.getRootElement();
|
||||
//根据名称定位节点
|
||||
Element msg = root.element("Msg");
|
||||
if(msg==null){
|
||||
throw new RuntimeException("没有Msg节点");
|
||||
}
|
||||
Element patInfo = msg.element("PatInfo");
|
||||
if(patInfo==null){
|
||||
throw new RuntimeException("没有PatInfo节点");
|
||||
}
|
||||
Element element = patInfo.element(name);
|
||||
if(element==null){
|
||||
return null;
|
||||
}
|
||||
//返回节点内容
|
||||
return element.getText();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
server:
|
||||
port: 9696
|
||||
|
||||
mybatis-plus:
|
||||
configuration:
|
||||
map-underscore-to-camel-case: true
|
||||
call-setters-on-nulls: true
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
global-config:
|
||||
db-config:
|
||||
field-strategy: NOT_EMPTY
|
||||
db-type: MYSQL
|
||||
|
||||
spring:
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
username: docus
|
||||
password: docus702
|
||||
url: jdbc:mysql://db.docus.cn:3306/docus_medicalrecord?characterEncoding=utf8&useSSL=false&serverTimezone=UTC&rewriteBatchedStatements=true
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.docus.webservice.mapper.TBasicMapper">
|
||||
|
||||
</mapper>
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.docus.webservice.mapper.TBasicSubMapper">
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue