Browse Source

同步表和患者表添加“患者编号”字段,对接时以此字段为唯一标识

hnzxyjhyy
zhangye 2 weeks ago
parent
commit
b9c99295c2
  1. 2
      ruisi_java/ruisi-cc-generator/src/main/resources/mbg.xml
  2. 11
      ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/DockPatientBaseInfo.java
  3. 70
      ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/DockPatientBaseInfoExample.java
  4. 11
      ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/DockPatientVisitInfo.java
  5. 70
      ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/DockPatientVisitInfoExample.java
  6. 11
      ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/PmsPatient.java
  7. 70
      ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/PmsPatientExample.java
  8. 15
      ruisi_java/ruisi-system/src/main/java/com/ccsens/system/service/impl/DockServiceImpl.java
  9. 63
      ruisi_java/ruisi-system/src/main/resources/mapper/system/DockPatientBaseInfoMapper.xml
  10. 91
      ruisi_java/ruisi-system/src/main/resources/mapper/system/DockPatientVisitInfoMapper.xml
  11. 25
      ruisi_java/ruisi-system/src/main/resources/mapper/system/PmsPatientMapper.xml
  12. 8
      sql/数据对接.sql

2
ruisi_java/ruisi-cc-generator/src/main/resources/mbg.xml

@ -60,7 +60,7 @@
<!-- <table tableName="ums_device" domainObjectName="UmsDevice"/>--> <!-- <table tableName="ums_device" domainObjectName="UmsDevice"/>-->
<!-- <table tableName="ums_data_source" domainObjectName="UmsDataSource"/>--> <!-- <table tableName="ums_data_source" domainObjectName="UmsDataSource"/>-->
<!-- <table tableName="pms_patient" domainObjectName="PmsPatient"/>--> <table tableName="pms_patient" domainObjectName="PmsPatient"/>
<!-- <table tableName="ld_patient_record" domainObjectName="LdPatientRecord"/>--> <!-- <table tableName="ld_patient_record" domainObjectName="LdPatientRecord"/>-->
<!-- <table tableName="pms_patient_record" domainObjectName="PmsPatientRecord"/>--> <!-- <table tableName="pms_patient_record" domainObjectName="PmsPatientRecord"/>-->
<!-- <table tableName="pms_patient_acp" domainObjectName="PmsPatientAcp"/>--> <!-- <table tableName="pms_patient_acp" domainObjectName="PmsPatientAcp"/>-->

11
ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/DockPatientBaseInfo.java

@ -8,6 +8,8 @@ public class DockPatientBaseInfo implements Serializable {
private String name; private String name;
private String patientNo;
private String idCard; private String idCard;
private String phone; private String phone;
@ -76,6 +78,14 @@ public class DockPatientBaseInfo implements Serializable {
this.name = name == null ? null : name.trim(); this.name = name == null ? null : name.trim();
} }
public String getPatientNo() {
return patientNo;
}
public void setPatientNo(String patientNo) {
this.patientNo = patientNo == null ? null : patientNo.trim();
}
public String getIdCard() { public String getIdCard() {
return idCard; return idCard;
} }
@ -284,6 +294,7 @@ public class DockPatientBaseInfo implements Serializable {
sb.append("Hash = ").append(hashCode()); sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id); sb.append(", id=").append(id);
sb.append(", name=").append(name); sb.append(", name=").append(name);
sb.append(", patientNo=").append(patientNo);
sb.append(", idCard=").append(idCard); sb.append(", idCard=").append(idCard);
sb.append(", phone=").append(phone); sb.append(", phone=").append(phone);
sb.append(", sex=").append(sex); sb.append(", sex=").append(sex);

70
ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/DockPatientBaseInfoExample.java

@ -262,6 +262,76 @@ public class DockPatientBaseInfoExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPatientNoIsNull() {
addCriterion("patient_no is null");
return (Criteria) this;
}
public Criteria andPatientNoIsNotNull() {
addCriterion("patient_no is not null");
return (Criteria) this;
}
public Criteria andPatientNoEqualTo(String value) {
addCriterion("patient_no =", value, "patientNo");
return (Criteria) this;
}
public Criteria andPatientNoNotEqualTo(String value) {
addCriterion("patient_no <>", value, "patientNo");
return (Criteria) this;
}
public Criteria andPatientNoGreaterThan(String value) {
addCriterion("patient_no >", value, "patientNo");
return (Criteria) this;
}
public Criteria andPatientNoGreaterThanOrEqualTo(String value) {
addCriterion("patient_no >=", value, "patientNo");
return (Criteria) this;
}
public Criteria andPatientNoLessThan(String value) {
addCriterion("patient_no <", value, "patientNo");
return (Criteria) this;
}
public Criteria andPatientNoLessThanOrEqualTo(String value) {
addCriterion("patient_no <=", value, "patientNo");
return (Criteria) this;
}
public Criteria andPatientNoLike(String value) {
addCriterion("patient_no like", value, "patientNo");
return (Criteria) this;
}
public Criteria andPatientNoNotLike(String value) {
addCriterion("patient_no not like", value, "patientNo");
return (Criteria) this;
}
public Criteria andPatientNoIn(List<String> values) {
addCriterion("patient_no in", values, "patientNo");
return (Criteria) this;
}
public Criteria andPatientNoNotIn(List<String> values) {
addCriterion("patient_no not in", values, "patientNo");
return (Criteria) this;
}
public Criteria andPatientNoBetween(String value1, String value2) {
addCriterion("patient_no between", value1, value2, "patientNo");
return (Criteria) this;
}
public Criteria andPatientNoNotBetween(String value1, String value2) {
addCriterion("patient_no not between", value1, value2, "patientNo");
return (Criteria) this;
}
public Criteria andIdCardIsNull() { public Criteria andIdCardIsNull() {
addCriterion("id_card is null"); addCriterion("id_card is null");
return (Criteria) this; return (Criteria) this;

11
ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/DockPatientVisitInfo.java

@ -9,6 +9,8 @@ public class DockPatientVisitInfo implements Serializable {
private String idCard; private String idCard;
private String patientNo;
private String visitType; private String visitType;
private String visitNo; private String visitNo;
@ -111,6 +113,14 @@ public class DockPatientVisitInfo implements Serializable {
this.idCard = idCard == null ? null : idCard.trim(); this.idCard = idCard == null ? null : idCard.trim();
} }
public String getPatientNo() {
return patientNo;
}
public void setPatientNo(String patientNo) {
this.patientNo = patientNo == null ? null : patientNo.trim();
}
public String getVisitType() { public String getVisitType() {
return visitType; return visitType;
} }
@ -455,6 +465,7 @@ public class DockPatientVisitInfo implements Serializable {
sb.append("Hash = ").append(hashCode()); sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id); sb.append(", id=").append(id);
sb.append(", idCard=").append(idCard); sb.append(", idCard=").append(idCard);
sb.append(", patientNo=").append(patientNo);
sb.append(", visitType=").append(visitType); sb.append(", visitType=").append(visitType);
sb.append(", visitNo=").append(visitNo); sb.append(", visitNo=").append(visitNo);
sb.append(", age=").append(age); sb.append(", age=").append(age);

70
ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/DockPatientVisitInfoExample.java

@ -236,6 +236,76 @@ public class DockPatientVisitInfoExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPatientNoIsNull() {
addCriterion("patient_no is null");
return (Criteria) this;
}
public Criteria andPatientNoIsNotNull() {
addCriterion("patient_no is not null");
return (Criteria) this;
}
public Criteria andPatientNoEqualTo(String value) {
addCriterion("patient_no =", value, "patientNo");
return (Criteria) this;
}
public Criteria andPatientNoNotEqualTo(String value) {
addCriterion("patient_no <>", value, "patientNo");
return (Criteria) this;
}
public Criteria andPatientNoGreaterThan(String value) {
addCriterion("patient_no >", value, "patientNo");
return (Criteria) this;
}
public Criteria andPatientNoGreaterThanOrEqualTo(String value) {
addCriterion("patient_no >=", value, "patientNo");
return (Criteria) this;
}
public Criteria andPatientNoLessThan(String value) {
addCriterion("patient_no <", value, "patientNo");
return (Criteria) this;
}
public Criteria andPatientNoLessThanOrEqualTo(String value) {
addCriterion("patient_no <=", value, "patientNo");
return (Criteria) this;
}
public Criteria andPatientNoLike(String value) {
addCriterion("patient_no like", value, "patientNo");
return (Criteria) this;
}
public Criteria andPatientNoNotLike(String value) {
addCriterion("patient_no not like", value, "patientNo");
return (Criteria) this;
}
public Criteria andPatientNoIn(List<String> values) {
addCriterion("patient_no in", values, "patientNo");
return (Criteria) this;
}
public Criteria andPatientNoNotIn(List<String> values) {
addCriterion("patient_no not in", values, "patientNo");
return (Criteria) this;
}
public Criteria andPatientNoBetween(String value1, String value2) {
addCriterion("patient_no between", value1, value2, "patientNo");
return (Criteria) this;
}
public Criteria andPatientNoNotBetween(String value1, String value2) {
addCriterion("patient_no not between", value1, value2, "patientNo");
return (Criteria) this;
}
public Criteria andVisitTypeIsNull() { public Criteria andVisitTypeIsNull() {
addCriterion("visit_type is null"); addCriterion("visit_type is null");
return (Criteria) this; return (Criteria) this;

11
ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/PmsPatient.java

@ -96,6 +96,8 @@ public class PmsPatient implements Serializable {
private String rhBloodType; private String rhBloodType;
private String patientNo;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public Long getId() { public Long getId() {
@ -466,6 +468,14 @@ public class PmsPatient implements Serializable {
this.rhBloodType = rhBloodType == null ? null : rhBloodType.trim(); this.rhBloodType = rhBloodType == null ? null : rhBloodType.trim();
} }
public String getPatientNo() {
return patientNo;
}
public void setPatientNo(String patientNo) {
this.patientNo = patientNo == null ? null : patientNo.trim();
}
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
@ -518,6 +528,7 @@ public class PmsPatient implements Serializable {
sb.append(", idCardTypeOther=").append(idCardTypeOther); sb.append(", idCardTypeOther=").append(idCardTypeOther);
sb.append(", aboBloodType=").append(aboBloodType); sb.append(", aboBloodType=").append(aboBloodType);
sb.append(", rhBloodType=").append(rhBloodType); sb.append(", rhBloodType=").append(rhBloodType);
sb.append(", patientNo=").append(patientNo);
sb.append("]"); sb.append("]");
return sb.toString(); return sb.toString();
} }

70
ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/PmsPatientExample.java

@ -3154,6 +3154,76 @@ public class PmsPatientExample {
addCriterion("rh_blood_type not between", value1, value2, "rhBloodType"); addCriterion("rh_blood_type not between", value1, value2, "rhBloodType");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPatientNoIsNull() {
addCriterion("patient_no is null");
return (Criteria) this;
}
public Criteria andPatientNoIsNotNull() {
addCriterion("patient_no is not null");
return (Criteria) this;
}
public Criteria andPatientNoEqualTo(String value) {
addCriterion("patient_no =", value, "patientNo");
return (Criteria) this;
}
public Criteria andPatientNoNotEqualTo(String value) {
addCriterion("patient_no <>", value, "patientNo");
return (Criteria) this;
}
public Criteria andPatientNoGreaterThan(String value) {
addCriterion("patient_no >", value, "patientNo");
return (Criteria) this;
}
public Criteria andPatientNoGreaterThanOrEqualTo(String value) {
addCriterion("patient_no >=", value, "patientNo");
return (Criteria) this;
}
public Criteria andPatientNoLessThan(String value) {
addCriterion("patient_no <", value, "patientNo");
return (Criteria) this;
}
public Criteria andPatientNoLessThanOrEqualTo(String value) {
addCriterion("patient_no <=", value, "patientNo");
return (Criteria) this;
}
public Criteria andPatientNoLike(String value) {
addCriterion("patient_no like", value, "patientNo");
return (Criteria) this;
}
public Criteria andPatientNoNotLike(String value) {
addCriterion("patient_no not like", value, "patientNo");
return (Criteria) this;
}
public Criteria andPatientNoIn(List<String> values) {
addCriterion("patient_no in", values, "patientNo");
return (Criteria) this;
}
public Criteria andPatientNoNotIn(List<String> values) {
addCriterion("patient_no not in", values, "patientNo");
return (Criteria) this;
}
public Criteria andPatientNoBetween(String value1, String value2) {
addCriterion("patient_no between", value1, value2, "patientNo");
return (Criteria) this;
}
public Criteria andPatientNoNotBetween(String value1, String value2) {
addCriterion("patient_no not between", value1, value2, "patientNo");
return (Criteria) this;
}
} }
public static class Criteria extends GeneratedCriteria { public static class Criteria extends GeneratedCriteria {

15
ruisi_java/ruisi-system/src/main/java/com/ccsens/system/service/impl/DockServiceImpl.java

@ -425,13 +425,13 @@ public class DockServiceImpl implements DockService {
return; return;
} }
for (DockPatientBaseInfo dockPatientBaseInfo : dockPatientBaseInfos) { for (DockPatientBaseInfo dockPatientBaseInfo : dockPatientBaseInfos) {
if(ObjectUtil.isNull(dockPatientBaseInfo.getIdCard())){ if(ObjectUtil.isNull(dockPatientBaseInfo.getPatientNo())){
continue; continue;
} }
//根据患者身份证号查询业务表内患者信息 //根据患者患者唯一编号查询业务表内患者信息
PmsPatient pmsPatient; PmsPatient pmsPatient;
PmsPatientExample pmsPatientExample = new PmsPatientExample(); PmsPatientExample pmsPatientExample = new PmsPatientExample();
pmsPatientExample.createCriteria().andIdcardEqualTo(dockPatientBaseInfo.getIdCard()).andDelFlagEqualTo((byte) 0); pmsPatientExample.createCriteria().andIdcardEqualTo(dockPatientBaseInfo.getPatientNo()).andDelFlagEqualTo((byte) 0);
List<PmsPatient> pmsPatients = pmsPatientMapper.selectByExample(pmsPatientExample); List<PmsPatient> pmsPatients = pmsPatientMapper.selectByExample(pmsPatientExample);
if (CollUtil.isNotEmpty(pmsPatients)) { if (CollUtil.isNotEmpty(pmsPatients)) {
//存在就更新 //存在就更新
@ -468,15 +468,15 @@ public class DockServiceImpl implements DockService {
} }
private PmsPatientBody savePatientBady(DockPatientVisitInfo dockPatientVisitInfo) { private PmsPatientBody savePatientBady(DockPatientVisitInfo dockPatientVisitInfo) {
//根据身份证号查找业务表内患者信息 //根据患者唯一编号查找业务表内患者信息
PmsPatient pmsPatient; PmsPatient pmsPatient;
PmsPatientExample pmsPatientExample = new PmsPatientExample(); PmsPatientExample pmsPatientExample = new PmsPatientExample();
pmsPatientExample.createCriteria().andIdcardEqualTo(dockPatientVisitInfo.getIdCard()).andDelFlagEqualTo((byte) 0); pmsPatientExample.createCriteria().andIdcardEqualTo(dockPatientVisitInfo.getPatientNo()).andDelFlagEqualTo((byte) 0);
List<PmsPatient> pmsPatients = pmsPatientMapper.selectByExample(pmsPatientExample); List<PmsPatient> pmsPatients = pmsPatientMapper.selectByExample(pmsPatientExample);
if (CollUtil.isEmpty(pmsPatients)) { if (CollUtil.isEmpty(pmsPatients)) {
//根据身份证号查找同步表的患者信息 //根据患者唯一编号查找同步表的患者信息
DockPatientBaseInfoExample dockPatientBaseInfoExample = new DockPatientBaseInfoExample(); DockPatientBaseInfoExample dockPatientBaseInfoExample = new DockPatientBaseInfoExample();
dockPatientBaseInfoExample.createCriteria().andIdCardEqualTo(dockPatientVisitInfo.getIdCard()).andDelFlagEqualTo((byte) 0); dockPatientBaseInfoExample.createCriteria().andIdCardEqualTo(dockPatientVisitInfo.getPatientNo()).andDelFlagEqualTo((byte) 0);
List<DockPatientBaseInfo> dockPatientBaseInfos = dockPatientBaseInfoMapper.selectByExample(dockPatientBaseInfoExample); List<DockPatientBaseInfo> dockPatientBaseInfos = dockPatientBaseInfoMapper.selectByExample(dockPatientBaseInfoExample);
if (CollUtil.isNotEmpty(dockPatientBaseInfos)) { if (CollUtil.isNotEmpty(dockPatientBaseInfos)) {
//存在则更新 //存在则更新
@ -658,6 +658,7 @@ public class DockServiceImpl implements DockService {
private void disposePmsPatient(DockPatientBaseInfo dockPatientBaseInfo, PmsPatient pmsPatient) { private void disposePmsPatient(DockPatientBaseInfo dockPatientBaseInfo, PmsPatient pmsPatient) {
pmsPatient.setPatientNo(dockPatientBaseInfo.getPatientNo());
// 姓名相关 // 姓名相关
pmsPatient.setName(dockPatientBaseInfo.getName()); pmsPatient.setName(dockPatientBaseInfo.getName());
pmsPatient.setNameFull(PinyinUtil.getPinyin(pmsPatient.getName(), "")); pmsPatient.setNameFull(PinyinUtil.getPinyin(pmsPatient.getName(), ""));

63
ruisi_java/ruisi-system/src/main/resources/mapper/system/DockPatientBaseInfoMapper.xml

@ -4,6 +4,7 @@
<resultMap id="BaseResultMap" type="com.ccsens.system.domain.po.DockPatientBaseInfo"> <resultMap id="BaseResultMap" type="com.ccsens.system.domain.po.DockPatientBaseInfo">
<id column="id" jdbcType="BIGINT" property="id" /> <id column="id" jdbcType="BIGINT" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" /> <result column="name" jdbcType="VARCHAR" property="name" />
<result column="patient_no" jdbcType="VARCHAR" property="patientNo" />
<result column="id_card" jdbcType="VARCHAR" property="idCard" /> <result column="id_card" jdbcType="VARCHAR" property="idCard" />
<result column="phone" jdbcType="VARCHAR" property="phone" /> <result column="phone" jdbcType="VARCHAR" property="phone" />
<result column="sex" jdbcType="VARCHAR" property="sex" /> <result column="sex" jdbcType="VARCHAR" property="sex" />
@ -89,10 +90,10 @@
</where> </where>
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, name, id_card, phone, sex, birthday, educational_status, career, marital_status, id, name, patient_no, id_card, phone, sex, birthday, educational_status, career,
nation, native_place, address, dwelling_state, contact_name, contact_mobile, contact_relation, marital_status, nation, native_place, address, dwelling_state, contact_name, contact_mobile,
abo_blood_type, rh_blood_type, belief, hobby, create_by, create_time, update_by, contact_relation, abo_blood_type, rh_blood_type, belief, hobby, create_by, create_time,
update_time, del_flag, remark, sync update_by, update_time, del_flag, remark, sync
</sql> </sql>
<select id="selectByExample" parameterType="com.ccsens.system.domain.po.DockPatientBaseInfoExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.ccsens.system.domain.po.DockPatientBaseInfoExample" resultMap="BaseResultMap">
select select
@ -125,26 +126,26 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.ccsens.system.domain.po.DockPatientBaseInfo"> <insert id="insert" parameterType="com.ccsens.system.domain.po.DockPatientBaseInfo">
insert into dock_patient_base_info (id, name, id_card, insert into dock_patient_base_info (id, name, patient_no,
phone, sex, birthday, id_card, phone, sex,
educational_status, career, marital_status, birthday, educational_status, career,
nation, native_place, address, marital_status, nation, native_place,
dwelling_state, contact_name, contact_mobile, address, dwelling_state, contact_name,
contact_relation, abo_blood_type, rh_blood_type, contact_mobile, contact_relation, abo_blood_type,
belief, hobby, create_by, rh_blood_type, belief, hobby,
create_time, update_by, update_time, create_by, create_time, update_by,
del_flag, remark, sync update_time, del_flag, remark,
) sync)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{idCard,jdbcType=VARCHAR}, values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{patientNo,jdbcType=VARCHAR},
#{phone,jdbcType=VARCHAR}, #{sex,jdbcType=VARCHAR}, #{birthday,jdbcType=DATE}, #{idCard,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{sex,jdbcType=VARCHAR},
#{educationalStatus,jdbcType=VARCHAR}, #{career,jdbcType=VARCHAR}, #{maritalStatus,jdbcType=VARCHAR}, #{birthday,jdbcType=DATE}, #{educationalStatus,jdbcType=VARCHAR}, #{career,jdbcType=VARCHAR},
#{nation,jdbcType=VARCHAR}, #{nativePlace,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{maritalStatus,jdbcType=VARCHAR}, #{nation,jdbcType=VARCHAR}, #{nativePlace,jdbcType=VARCHAR},
#{dwellingState,jdbcType=VARCHAR}, #{contactName,jdbcType=VARCHAR}, #{contactMobile,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{dwellingState,jdbcType=VARCHAR}, #{contactName,jdbcType=VARCHAR},
#{contactRelation,jdbcType=VARCHAR}, #{aboBloodType,jdbcType=VARCHAR}, #{rhBloodType,jdbcType=VARCHAR}, #{contactMobile,jdbcType=VARCHAR}, #{contactRelation,jdbcType=VARCHAR}, #{aboBloodType,jdbcType=VARCHAR},
#{belief,jdbcType=VARCHAR}, #{hobby,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{rhBloodType,jdbcType=VARCHAR}, #{belief,jdbcType=VARCHAR}, #{hobby,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR},
#{delFlag,jdbcType=TINYINT}, #{remark,jdbcType=VARCHAR}, #{sync,jdbcType=VARCHAR} #{updateTime,jdbcType=TIMESTAMP}, #{delFlag,jdbcType=TINYINT}, #{remark,jdbcType=VARCHAR},
) #{sync,jdbcType=VARCHAR})
</insert> </insert>
<insert id="insertSelective" parameterType="com.ccsens.system.domain.po.DockPatientBaseInfo"> <insert id="insertSelective" parameterType="com.ccsens.system.domain.po.DockPatientBaseInfo">
insert into dock_patient_base_info insert into dock_patient_base_info
@ -155,6 +156,9 @@
<if test="name != null"> <if test="name != null">
name, name,
</if> </if>
<if test="patientNo != null">
patient_no,
</if>
<if test="idCard != null"> <if test="idCard != null">
id_card, id_card,
</if> </if>
@ -238,6 +242,9 @@
<if test="name != null"> <if test="name != null">
#{name,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
</if> </if>
<if test="patientNo != null">
#{patientNo,jdbcType=VARCHAR},
</if>
<if test="idCard != null"> <if test="idCard != null">
#{idCard,jdbcType=VARCHAR}, #{idCard,jdbcType=VARCHAR},
</if> </if>
@ -330,6 +337,9 @@
<if test="record.name != null"> <if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR}, name = #{record.name,jdbcType=VARCHAR},
</if> </if>
<if test="record.patientNo != null">
patient_no = #{record.patientNo,jdbcType=VARCHAR},
</if>
<if test="record.idCard != null"> <if test="record.idCard != null">
id_card = #{record.idCard,jdbcType=VARCHAR}, id_card = #{record.idCard,jdbcType=VARCHAR},
</if> </if>
@ -414,6 +424,7 @@
update dock_patient_base_info update dock_patient_base_info
set id = #{record.id,jdbcType=BIGINT}, set id = #{record.id,jdbcType=BIGINT},
name = #{record.name,jdbcType=VARCHAR}, name = #{record.name,jdbcType=VARCHAR},
patient_no = #{record.patientNo,jdbcType=VARCHAR},
id_card = #{record.idCard,jdbcType=VARCHAR}, id_card = #{record.idCard,jdbcType=VARCHAR},
phone = #{record.phone,jdbcType=VARCHAR}, phone = #{record.phone,jdbcType=VARCHAR},
sex = #{record.sex,jdbcType=VARCHAR}, sex = #{record.sex,jdbcType=VARCHAR},
@ -449,6 +460,9 @@
<if test="name != null"> <if test="name != null">
name = #{name,jdbcType=VARCHAR}, name = #{name,jdbcType=VARCHAR},
</if> </if>
<if test="patientNo != null">
patient_no = #{patientNo,jdbcType=VARCHAR},
</if>
<if test="idCard != null"> <if test="idCard != null">
id_card = #{idCard,jdbcType=VARCHAR}, id_card = #{idCard,jdbcType=VARCHAR},
</if> </if>
@ -530,6 +544,7 @@
<update id="updateByPrimaryKey" parameterType="com.ccsens.system.domain.po.DockPatientBaseInfo"> <update id="updateByPrimaryKey" parameterType="com.ccsens.system.domain.po.DockPatientBaseInfo">
update dock_patient_base_info update dock_patient_base_info
set name = #{name,jdbcType=VARCHAR}, set name = #{name,jdbcType=VARCHAR},
patient_no = #{patientNo,jdbcType=VARCHAR},
id_card = #{idCard,jdbcType=VARCHAR}, id_card = #{idCard,jdbcType=VARCHAR},
phone = #{phone,jdbcType=VARCHAR}, phone = #{phone,jdbcType=VARCHAR},
sex = #{sex,jdbcType=VARCHAR}, sex = #{sex,jdbcType=VARCHAR},

91
ruisi_java/ruisi-system/src/main/resources/mapper/system/DockPatientVisitInfoMapper.xml

@ -4,6 +4,7 @@
<resultMap id="BaseResultMap" type="com.ccsens.system.domain.po.DockPatientVisitInfo"> <resultMap id="BaseResultMap" type="com.ccsens.system.domain.po.DockPatientVisitInfo">
<id column="id" jdbcType="BIGINT" property="id" /> <id column="id" jdbcType="BIGINT" property="id" />
<result column="id_card" jdbcType="VARCHAR" property="idCard" /> <result column="id_card" jdbcType="VARCHAR" property="idCard" />
<result column="patient_no" jdbcType="VARCHAR" property="patientNo" />
<result column="visit_type" jdbcType="VARCHAR" property="visitType" /> <result column="visit_type" jdbcType="VARCHAR" property="visitType" />
<result column="visit_no" jdbcType="VARCHAR" property="visitNo" /> <result column="visit_no" jdbcType="VARCHAR" property="visitNo" />
<result column="age" jdbcType="INTEGER" property="age" /> <result column="age" jdbcType="INTEGER" property="age" />
@ -106,13 +107,13 @@
</where> </where>
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, id_card, visit_type, visit_no, age, department, doctor, admission_date, admission_count, id, id_card, patient_no, visit_type, visit_no, age, department, doctor, admission_date,
bed_number, discharge_date, admission_method, discharge_method, height, weight, tz, admission_count, bed_number, discharge_date, admission_method, discharge_method,
temperature, blood_pressure_shrink, blood_pressure_diastole, pulse, creatinine, oxygen_saturation, height, weight, tz, temperature, blood_pressure_shrink, blood_pressure_diastole,
albumin, total_protein, vitamin_d3, hematocrit, dimer, smoking_history, smoking_year, pulse, creatinine, oxygen_saturation, albumin, total_protein, vitamin_d3, hematocrit,
smoking_quit, smoking_quit_year, drink_history, drink_year, drink_quit, drink_quit_year, dimer, smoking_history, smoking_year, smoking_quit, smoking_quit_year, drink_history,
has_allergy, allergy_drug, create_by, create_time, update_by, update_time, del_flag, drink_year, drink_quit, drink_quit_year, has_allergy, allergy_drug, create_by, create_time,
remark, sync update_by, update_time, del_flag, remark, sync
</sql> </sql>
<select id="selectByExample" parameterType="com.ccsens.system.domain.po.DockPatientVisitInfoExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.ccsens.system.domain.po.DockPatientVisitInfoExample" resultMap="BaseResultMap">
select select
@ -145,36 +146,38 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.ccsens.system.domain.po.DockPatientVisitInfo"> <insert id="insert" parameterType="com.ccsens.system.domain.po.DockPatientVisitInfo">
insert into dock_patient_visit_info (id, id_card, visit_type, insert into dock_patient_visit_info (id, id_card, patient_no,
visit_no, age, department, visit_type, visit_no, age,
doctor, admission_date, admission_count, department, doctor, admission_date,
bed_number, discharge_date, admission_method, admission_count, bed_number, discharge_date,
discharge_method, height, weight, admission_method, discharge_method, height,
tz, temperature, blood_pressure_shrink, weight, tz, temperature,
blood_pressure_diastole, pulse, creatinine, blood_pressure_shrink, blood_pressure_diastole,
oxygen_saturation, albumin, total_protein, pulse, creatinine, oxygen_saturation,
vitamin_d3, hematocrit, dimer, albumin, total_protein, vitamin_d3,
smoking_history, smoking_year, smoking_quit, hematocrit, dimer, smoking_history,
smoking_quit_year, drink_history, drink_year, smoking_year, smoking_quit, smoking_quit_year,
drink_quit, drink_quit_year, has_allergy, drink_history, drink_year, drink_quit,
allergy_drug, create_by, create_time, drink_quit_year, has_allergy, allergy_drug,
update_by, update_time, del_flag, create_by, create_time, update_by,
remark, sync) update_time, del_flag, remark,
values (#{id,jdbcType=BIGINT}, #{idCard,jdbcType=VARCHAR}, #{visitType,jdbcType=VARCHAR}, sync)
#{visitNo,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER}, #{department,jdbcType=VARCHAR}, values (#{id,jdbcType=BIGINT}, #{idCard,jdbcType=VARCHAR}, #{patientNo,jdbcType=VARCHAR},
#{doctor,jdbcType=VARCHAR}, #{admissionDate,jdbcType=TIMESTAMP}, #{admissionCount,jdbcType=INTEGER}, #{visitType,jdbcType=VARCHAR}, #{visitNo,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER},
#{bedNumber,jdbcType=VARCHAR}, #{dischargeDate,jdbcType=TIMESTAMP}, #{admissionMethod,jdbcType=VARCHAR}, #{department,jdbcType=VARCHAR}, #{doctor,jdbcType=VARCHAR}, #{admissionDate,jdbcType=TIMESTAMP},
#{dischargeMethod,jdbcType=VARCHAR}, #{height,jdbcType=DECIMAL}, #{weight,jdbcType=DECIMAL}, #{admissionCount,jdbcType=INTEGER}, #{bedNumber,jdbcType=VARCHAR}, #{dischargeDate,jdbcType=TIMESTAMP},
#{tz,jdbcType=DECIMAL}, #{temperature,jdbcType=DECIMAL}, #{bloodPressureShrink,jdbcType=INTEGER}, #{admissionMethod,jdbcType=VARCHAR}, #{dischargeMethod,jdbcType=VARCHAR}, #{height,jdbcType=DECIMAL},
#{bloodPressureDiastole,jdbcType=INTEGER}, #{pulse,jdbcType=INTEGER}, #{creatinine,jdbcType=DECIMAL}, #{weight,jdbcType=DECIMAL}, #{tz,jdbcType=DECIMAL}, #{temperature,jdbcType=DECIMAL},
#{oxygenSaturation,jdbcType=DECIMAL}, #{albumin,jdbcType=DECIMAL}, #{totalProtein,jdbcType=DECIMAL}, #{bloodPressureShrink,jdbcType=INTEGER}, #{bloodPressureDiastole,jdbcType=INTEGER},
#{vitaminD3,jdbcType=DECIMAL}, #{hematocrit,jdbcType=DECIMAL}, #{dimer,jdbcType=DECIMAL}, #{pulse,jdbcType=INTEGER}, #{creatinine,jdbcType=DECIMAL}, #{oxygenSaturation,jdbcType=DECIMAL},
#{smokingHistory,jdbcType=TINYINT}, #{smokingYear,jdbcType=INTEGER}, #{smokingQuit,jdbcType=TINYINT}, #{albumin,jdbcType=DECIMAL}, #{totalProtein,jdbcType=DECIMAL}, #{vitaminD3,jdbcType=DECIMAL},
#{smokingQuitYear,jdbcType=INTEGER}, #{drinkHistory,jdbcType=TINYINT}, #{drinkYear,jdbcType=INTEGER}, #{hematocrit,jdbcType=DECIMAL}, #{dimer,jdbcType=DECIMAL}, #{smokingHistory,jdbcType=TINYINT},
#{drinkQuit,jdbcType=TINYINT}, #{drinkQuitYear,jdbcType=INTEGER}, #{hasAllergy,jdbcType=TINYINT}, #{smokingYear,jdbcType=INTEGER}, #{smokingQuit,jdbcType=TINYINT}, #{smokingQuitYear,jdbcType=INTEGER},
#{allergyDrug,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{drinkHistory,jdbcType=TINYINT}, #{drinkYear,jdbcType=INTEGER}, #{drinkQuit,jdbcType=TINYINT},
#{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{delFlag,jdbcType=TINYINT}, #{drinkQuitYear,jdbcType=INTEGER}, #{hasAllergy,jdbcType=TINYINT}, #{allergyDrug,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR}, #{sync,jdbcType=VARCHAR}) #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR},
#{updateTime,jdbcType=TIMESTAMP}, #{delFlag,jdbcType=TINYINT}, #{remark,jdbcType=VARCHAR},
#{sync,jdbcType=VARCHAR})
</insert> </insert>
<insert id="insertSelective" parameterType="com.ccsens.system.domain.po.DockPatientVisitInfo"> <insert id="insertSelective" parameterType="com.ccsens.system.domain.po.DockPatientVisitInfo">
insert into dock_patient_visit_info insert into dock_patient_visit_info
@ -185,6 +188,9 @@
<if test="idCard != null"> <if test="idCard != null">
id_card, id_card,
</if> </if>
<if test="patientNo != null">
patient_no,
</if>
<if test="visitType != null"> <if test="visitType != null">
visit_type, visit_type,
</if> </if>
@ -319,6 +325,9 @@
<if test="idCard != null"> <if test="idCard != null">
#{idCard,jdbcType=VARCHAR}, #{idCard,jdbcType=VARCHAR},
</if> </if>
<if test="patientNo != null">
#{patientNo,jdbcType=VARCHAR},
</if>
<if test="visitType != null"> <if test="visitType != null">
#{visitType,jdbcType=VARCHAR}, #{visitType,jdbcType=VARCHAR},
</if> </if>
@ -462,6 +471,9 @@
<if test="record.idCard != null"> <if test="record.idCard != null">
id_card = #{record.idCard,jdbcType=VARCHAR}, id_card = #{record.idCard,jdbcType=VARCHAR},
</if> </if>
<if test="record.patientNo != null">
patient_no = #{record.patientNo,jdbcType=VARCHAR},
</if>
<if test="record.visitType != null"> <if test="record.visitType != null">
visit_type = #{record.visitType,jdbcType=VARCHAR}, visit_type = #{record.visitType,jdbcType=VARCHAR},
</if> </if>
@ -597,6 +609,7 @@
update dock_patient_visit_info update dock_patient_visit_info
set id = #{record.id,jdbcType=BIGINT}, set id = #{record.id,jdbcType=BIGINT},
id_card = #{record.idCard,jdbcType=VARCHAR}, id_card = #{record.idCard,jdbcType=VARCHAR},
patient_no = #{record.patientNo,jdbcType=VARCHAR},
visit_type = #{record.visitType,jdbcType=VARCHAR}, visit_type = #{record.visitType,jdbcType=VARCHAR},
visit_no = #{record.visitNo,jdbcType=VARCHAR}, visit_no = #{record.visitNo,jdbcType=VARCHAR},
age = #{record.age,jdbcType=INTEGER}, age = #{record.age,jdbcType=INTEGER},
@ -649,6 +662,9 @@
<if test="idCard != null"> <if test="idCard != null">
id_card = #{idCard,jdbcType=VARCHAR}, id_card = #{idCard,jdbcType=VARCHAR},
</if> </if>
<if test="patientNo != null">
patient_no = #{patientNo,jdbcType=VARCHAR},
</if>
<if test="visitType != null"> <if test="visitType != null">
visit_type = #{visitType,jdbcType=VARCHAR}, visit_type = #{visitType,jdbcType=VARCHAR},
</if> </if>
@ -781,6 +797,7 @@
<update id="updateByPrimaryKey" parameterType="com.ccsens.system.domain.po.DockPatientVisitInfo"> <update id="updateByPrimaryKey" parameterType="com.ccsens.system.domain.po.DockPatientVisitInfo">
update dock_patient_visit_info update dock_patient_visit_info
set id_card = #{idCard,jdbcType=VARCHAR}, set id_card = #{idCard,jdbcType=VARCHAR},
patient_no = #{patientNo,jdbcType=VARCHAR},
visit_type = #{visitType,jdbcType=VARCHAR}, visit_type = #{visitType,jdbcType=VARCHAR},
visit_no = #{visitNo,jdbcType=VARCHAR}, visit_no = #{visitNo,jdbcType=VARCHAR},
age = #{age,jdbcType=INTEGER}, age = #{age,jdbcType=INTEGER},

25
ruisi_java/ruisi-system/src/main/resources/mapper/system/PmsPatientMapper.xml

@ -48,6 +48,7 @@
<result column="id_card_type_other" jdbcType="VARCHAR" property="idCardTypeOther" /> <result column="id_card_type_other" jdbcType="VARCHAR" property="idCardTypeOther" />
<result column="abo_blood_type" jdbcType="VARCHAR" property="aboBloodType" /> <result column="abo_blood_type" jdbcType="VARCHAR" property="aboBloodType" />
<result column="rh_blood_type" jdbcType="VARCHAR" property="rhBloodType" /> <result column="rh_blood_type" jdbcType="VARCHAR" property="rhBloodType" />
<result column="patient_no" jdbcType="VARCHAR" property="patientNo" />
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
<where> <where>
@ -114,7 +115,7 @@
city, address, domicile, independent_living_skills, dwelling_state, recorder, remark, city, address, domicile, independent_living_skills, dwelling_state, recorder, remark,
create_by, create_time, update_by, update_time, del_flag, birth_year, birthday, belief, create_by, create_time, update_by, update_time, del_flag, birth_year, birthday, belief,
hobby, contact_name, contact_relation, contact_mobile, contact_other, id_card_type, hobby, contact_name, contact_relation, contact_mobile, contact_other, id_card_type,
id_card_type_other, abo_blood_type, rh_blood_type id_card_type_other, abo_blood_type, rh_blood_type, patient_no
</sql> </sql>
<select id="selectByExample" parameterType="com.ccsens.system.domain.po.PmsPatientExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.ccsens.system.domain.po.PmsPatientExample" resultMap="BaseResultMap">
select select
@ -162,7 +163,7 @@
belief, hobby, contact_name, belief, hobby, contact_name,
contact_relation, contact_mobile, contact_other, contact_relation, contact_mobile, contact_other,
id_card_type, id_card_type_other, abo_blood_type, id_card_type, id_card_type_other, abo_blood_type,
rh_blood_type) rh_blood_type, patient_no)
values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{hospitalId,jdbcType=BIGINT}, values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{hospitalId,jdbcType=BIGINT},
#{name,jdbcType=VARCHAR}, #{nameInitial,jdbcType=VARCHAR}, #{nameFull,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{nameInitial,jdbcType=VARCHAR}, #{nameFull,jdbcType=VARCHAR},
#{patientNumber,jdbcType=VARCHAR}, #{hospitalNumber,jdbcType=VARCHAR}, #{idcard,jdbcType=VARCHAR}, #{patientNumber,jdbcType=VARCHAR}, #{hospitalNumber,jdbcType=VARCHAR}, #{idcard,jdbcType=VARCHAR},
@ -178,7 +179,7 @@
#{belief,jdbcType=VARCHAR}, #{hobby,jdbcType=VARCHAR}, #{contactName,jdbcType=VARCHAR}, #{belief,jdbcType=VARCHAR}, #{hobby,jdbcType=VARCHAR}, #{contactName,jdbcType=VARCHAR},
#{contactRelation,jdbcType=VARCHAR}, #{contactMobile,jdbcType=VARCHAR}, #{contactOther,jdbcType=VARCHAR}, #{contactRelation,jdbcType=VARCHAR}, #{contactMobile,jdbcType=VARCHAR}, #{contactOther,jdbcType=VARCHAR},
#{idCardType,jdbcType=VARCHAR}, #{idCardTypeOther,jdbcType=VARCHAR}, #{aboBloodType,jdbcType=VARCHAR}, #{idCardType,jdbcType=VARCHAR}, #{idCardTypeOther,jdbcType=VARCHAR}, #{aboBloodType,jdbcType=VARCHAR},
#{rhBloodType,jdbcType=VARCHAR}) #{rhBloodType,jdbcType=VARCHAR}, #{patientNo,jdbcType=VARCHAR})
</insert> </insert>
<insert id="insertSelective" parameterType="com.ccsens.system.domain.po.PmsPatient"> <insert id="insertSelective" parameterType="com.ccsens.system.domain.po.PmsPatient">
insert into pms_patient insert into pms_patient
@ -321,6 +322,9 @@
<if test="rhBloodType != null"> <if test="rhBloodType != null">
rh_blood_type, rh_blood_type,
</if> </if>
<if test="patientNo != null">
patient_no,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
@ -461,6 +465,9 @@
<if test="rhBloodType != null"> <if test="rhBloodType != null">
#{rhBloodType,jdbcType=VARCHAR}, #{rhBloodType,jdbcType=VARCHAR},
</if> </if>
<if test="patientNo != null">
#{patientNo,jdbcType=VARCHAR},
</if>
</trim> </trim>
</insert> </insert>
<select id="countByExample" parameterType="com.ccsens.system.domain.po.PmsPatientExample" resultType="java.lang.Long"> <select id="countByExample" parameterType="com.ccsens.system.domain.po.PmsPatientExample" resultType="java.lang.Long">
@ -610,6 +617,9 @@
<if test="record.rhBloodType != null"> <if test="record.rhBloodType != null">
rh_blood_type = #{record.rhBloodType,jdbcType=VARCHAR}, rh_blood_type = #{record.rhBloodType,jdbcType=VARCHAR},
</if> </if>
<if test="record.patientNo != null">
patient_no = #{record.patientNo,jdbcType=VARCHAR},
</if>
</set> </set>
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
@ -662,7 +672,8 @@
id_card_type = #{record.idCardType,jdbcType=VARCHAR}, id_card_type = #{record.idCardType,jdbcType=VARCHAR},
id_card_type_other = #{record.idCardTypeOther,jdbcType=VARCHAR}, id_card_type_other = #{record.idCardTypeOther,jdbcType=VARCHAR},
abo_blood_type = #{record.aboBloodType,jdbcType=VARCHAR}, abo_blood_type = #{record.aboBloodType,jdbcType=VARCHAR},
rh_blood_type = #{record.rhBloodType,jdbcType=VARCHAR} rh_blood_type = #{record.rhBloodType,jdbcType=VARCHAR},
patient_no = #{record.patientNo,jdbcType=VARCHAR}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
@ -805,6 +816,9 @@
<if test="rhBloodType != null"> <if test="rhBloodType != null">
rh_blood_type = #{rhBloodType,jdbcType=VARCHAR}, rh_blood_type = #{rhBloodType,jdbcType=VARCHAR},
</if> </if>
<if test="patientNo != null">
patient_no = #{patientNo,jdbcType=VARCHAR},
</if>
</set> </set>
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
@ -854,7 +868,8 @@
id_card_type = #{idCardType,jdbcType=VARCHAR}, id_card_type = #{idCardType,jdbcType=VARCHAR},
id_card_type_other = #{idCardTypeOther,jdbcType=VARCHAR}, id_card_type_other = #{idCardTypeOther,jdbcType=VARCHAR},
abo_blood_type = #{aboBloodType,jdbcType=VARCHAR}, abo_blood_type = #{aboBloodType,jdbcType=VARCHAR},
rh_blood_type = #{rhBloodType,jdbcType=VARCHAR} rh_blood_type = #{rhBloodType,jdbcType=VARCHAR},
patient_no = #{patientNo,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
</mapper> </mapper>

8
sql/数据对接.sql

@ -42,6 +42,7 @@ DROP TABLE IF EXISTS `dock_patient_base_info`;
CREATE TABLE `dock_patient_base_info` ( CREATE TABLE `dock_patient_base_info` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '表ID(自增)', `id` bigint NOT NULL AUTO_INCREMENT COMMENT '表ID(自增)',
`name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '姓名', `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '姓名',
`patient_no` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '患者唯一编号',
`id_card` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '证件号码(身份证号)', `id_card` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '证件号码(身份证号)',
`phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '联系电话', `phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '联系电话',
`sex` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '性别:0女、1男', `sex` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '性别:0女、1男',
@ -126,7 +127,8 @@ CREATE TABLE `dock_patient_medication_info` (
DROP TABLE IF EXISTS `dock_patient_visit_info`; DROP TABLE IF EXISTS `dock_patient_visit_info`;
CREATE TABLE `dock_patient_visit_info` ( CREATE TABLE `dock_patient_visit_info` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '表ID(自增)', `id` bigint NOT NULL AUTO_INCREMENT COMMENT '表ID(自增)',
`id_card` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '证件号码,使用身份证号与基础信息关联', `id_card` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '证件号码',
`patient_no` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '患者唯一编号',
`visit_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '就诊类型', `visit_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '就诊类型',
`visit_no` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '门诊/住院号', `visit_no` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '门诊/住院号',
`age` int NULL DEFAULT NULL COMMENT '年龄', `age` int NULL DEFAULT NULL COMMENT '年龄',
@ -174,6 +176,10 @@ CREATE TABLE `dock_patient_visit_info` (
INDEX `idx_id_card`(`id_card` ASC) USING BTREE INDEX `idx_id_card`(`id_card` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '患者就诊信息表' ROW_FORMAT = Dynamic; ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '患者就诊信息表' ROW_FORMAT = Dynamic;
-- 患者表添加字段
ALTER TABLE `pms_patient`
ADD COLUMN `patient_no` varchar(50) COMMENT '患者院内唯一编号';
-- 主库从库都需要修改部门和用户表,加字段 -- 主库从库都需要修改部门和用户表,加字段
ALTER TABLE `ums_user` ALTER TABLE `ums_user`
ADD COLUMN `empl_code` varchar(30) DEFAULT '' COMMENT '工号' AFTER `nick_name`; ADD COLUMN `empl_code` varchar(30) DEFAULT '' COMMENT '工号' AFTER `nick_name`;

Loading…
Cancel
Save