格式化代码

This commit is contained in:
纪寒 2024-04-01 10:26:15 +08:00
parent 1a99ff2754
commit 6560540c4a
4 changed files with 628 additions and 543 deletions

View File

@ -194,25 +194,25 @@ public class Constants {
*/
public static final String TASK_STATUS_CODE = "TSC";
/**
* 门诊患者
*/
public static final String OUTPATIENT = "outpatient";
/**
* 门诊患者
*/
public static final String OUTPATIENT = "outpatient";
/**
* 预住院
*/
public static final String PRE_HOSPITALIZED = "prehospitalized";
/**
* 预住院
*/
public static final String PRE_HOSPITALIZED = "prehospitalized";
/**
* 在院
*/
public static final String IN_HOSPITAL = "inhospital";
/**
* 在院
*/
public static final String IN_HOSPITAL = "inhospital";
/**
* 出院
*/
public static final String DISCHARGED = "discharged";
/**
* 出院
*/
public static final String DISCHARGED = "discharged";
/**
* 字段信息编码前缀

View File

@ -5,13 +5,14 @@ import com.xinelu.common.annotation.Excel;
import com.xinelu.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.time.LocalDate;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import java.time.LocalDate;
import java.time.LocalDateTime;
/**
* 患者信息对象 patient_info
*
@ -25,187 +26,261 @@ import lombok.NoArgsConstructor;
@ApiModel(value = "患者信息对象", description = "patient_info")
public class PatientInfo extends BaseEntity {
private static final long serialVersionUID=1L;
private static final long serialVersionUID = 1L;
/** 主键id */
/**
* 主键id
*/
private Long id;
/** 居民信息表id */
@ApiModelProperty(value = "居民信息表id")
private Long residentId;
/**
* 居民信息表id
*/
@ApiModelProperty(value = "居民信息表id")
private Long residentId;
/** 患者姓名 */
/**
* 患者姓名
*/
@ApiModelProperty(value = "患者姓名")
@Excel(name = "患者姓名")
private String patientName;
/** 患者电话 */
/**
* 患者电话
*/
@ApiModelProperty(value = "患者电话")
@Excel(name = "患者电话")
private String patientPhone;
/** 家属电话 */
/**
* 家属电话
*/
@ApiModelProperty(value = "家属电话")
private String familyMemberPhone;
/** 出生日期格式yyyy-MM-dd */
/**
* 出生日期格式yyyy-MM-dd
*/
@ApiModelProperty(value = "出生日期格式yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
private LocalDate birthDate;
/** 身份证号 */
/**
* 身份证号
*/
@ApiModelProperty(value = "身份证号")
private String cardNo;
/** 性别MALEFEMALE */
/**
* 性别MALEFEMALE
*/
@ApiModelProperty(value = "性别MALEFEMALE")
@Excel(name = "性别MALEFEMALE")
private String sex;
/** 住址 */
/**
* 住址
*/
@ApiModelProperty(value = "住址")
@Excel(name = "住址")
private String address;
/** 患者类型预住院患者PRE_HOSPITALIZED_PATIENT在院患者IN_HOSPITAL_PATIENT门诊患者OUTPATIENT出院患者DISCHARGED_PATIENT
签约患者CONTRACTED_PATIENT */
/**
* 患者类型预住院患者PRE_HOSPITALIZED_PATIENT在院患者IN_HOSPITAL_PATIENT门诊患者OUTPATIENT出院患者DISCHARGED_PATIENT
* 签约患者CONTRACTED_PATIENT
*/
@ApiModelProperty(value = "患者类型预住院患者PRE_HOSPITALIZED_PATIENT在院患者IN_HOSPITAL_PATIENT门诊患者OUTPATIENT出院患者DISCHARGED_PATIENT签约患者CONTRACTED_PATIENT")
private String patientType;
/**
* 签约状态未签约UN_SIGN,在签IN_SIGN,解约SEPARATE_SIGN, 服务到期EXPIRE_SIGN
*/
@ApiModelProperty(value = "签约状态未签约UN_SIGN,在签IN_SIGN,解约SEPARATE_SIGN, 过期EXPIRE_SIGN")
private String signStatus;
/**
* 签约状态未签约UN_SIGN,在签IN_SIGN,解约SEPARATE_SIGN, 服务到期EXPIRE_SIGN
*/
@ApiModelProperty(value = "签约状态未签约UN_SIGN,在签IN_SIGN,解约SEPARATE_SIGN, 过期EXPIRE_SIGN")
private String signStatus;
@ApiModelProperty(value = "签约记录表id")
private Long signPatientRecordId;
@ApiModelProperty(value = "签约记录表id")
private Long signPatientRecordId;
/**
* 服务状态意向签约INTENTIONAL_SIGNING服务中SERVICE_CENTER服务结束SERVICE_END
*/
@ApiModelProperty(value = "服务状态意向签约INTENTIONAL_SIGNING服务中SERVICE_CENTER服务结束SERVICE_END")
private String serviceStatus;
/**
* 服务状态意向签约INTENTIONAL_SIGNING服务中SERVICE_CENTER服务结束SERVICE_END
*/
@ApiModelProperty(value = "服务状态意向签约INTENTIONAL_SIGNING服务中SERVICE_CENTER服务结束SERVICE_END")
private String serviceStatus;
/** 签约时间格式yyyy-MM-dd HH:mm:ss */
/**
* 签约时间格式yyyy-MM-dd HH:mm:ss
*/
@ApiModelProperty(value = "签约时间格式yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "签约时间格式yyyy-MM-dd HH:mm:ss", width = 30, dateFormat = "yyyy-MM-dd")
private LocalDateTime signTime;
/** 就诊方式门诊OUTPATIENT_SERVICE住院BE_IN_HOSPITAL */
/**
* 就诊方式门诊OUTPATIENT_SERVICE住院BE_IN_HOSPITAL
*/
@ApiModelProperty(value = "就诊方式门诊OUTPATIENT_SERVICE住院BE_IN_HOSPITAL")
@Excel(name = "就诊方式门诊OUTPATIENT_SERVICE住院BE_IN_HOSPITAL")
private String visitMethod;
/** 主治医生id */
@ApiModelProperty(value = "主治医生id")
@Excel(name = "主治医生id")
private Long attendingPhysicianId;
/**
* 主治医生id
*/
@ApiModelProperty(value = "主治医生id")
@Excel(name = "主治医生id")
private Long attendingPhysicianId;
/** 主治医生姓名 */
@ApiModelProperty(value = "主治医生姓名")
@Excel(name = "主治医生姓名")
private String attendingPhysicianName;
/**
* 主治医生姓名
*/
@ApiModelProperty(value = "主治医生姓名")
@Excel(name = "主治医生姓名")
private String attendingPhysicianName;
/** 主要诊断 */
/**
* 主要诊断
*/
@ApiModelProperty(value = "主要诊断")
private String mainDiagnosis;
/** 所属医院id */
/**
* 所属医院id
*/
@ApiModelProperty(value = "所属医院id")
private Long hospitalAgencyId;
/** 所属医院名称 */
/**
* 所属医院名称
*/
@ApiModelProperty(value = "所属医院名称")
@Excel(name = "所属医院名称")
private String hospitalAgencyName;
/** 所属院区id */
/**
* 所属院区id
*/
@ApiModelProperty(value = "所属院区id")
private Long campusAgencyId;
/** 所属院区名称 */
/**
* 所属院区名称
*/
@ApiModelProperty(value = "所属院区名称")
@Excel(name = "所属院区名称")
private String campusAgencyName;
/** 所属科室id */
/**
* 所属科室id
*/
@ApiModelProperty(value = "所属科室id")
private Long departmentId;
/** 所属科室名称 */
/**
* 所属科室名称
*/
@ApiModelProperty(value = "所属科室名称")
@Excel(name = "所属科室名称")
private String departmentName;
/** 所属病区id */
/**
* 所属病区id
*/
@ApiModelProperty(value = "所属病区id")
private Long wardId;
/** 所属病区名称 */
/**
* 所属病区名称
*/
@ApiModelProperty(value = "所属病区名称")
@Excel(name = "所属病区名称")
private String wardName;
/** 责任护士 */
/**
* 责任护士
*/
@ApiModelProperty(value = "责任护士")
private String responsibleNurse;
/** 最新一条就诊记录id */
@ApiModelProperty(value = "最新一条就诊记录id")
private Long patientVisitRecordId;
/**
* 最新一条就诊记录id
*/
@ApiModelProperty(value = "最新一条就诊记录id")
private Long patientVisitRecordId;
/** 就诊流水号 */
/**
* 就诊流水号
*/
@ApiModelProperty(value = "就诊流水号")
private String visitSerialNumber;
/** 入院时间时间格式yyyy-MM-dd */
/**
* 入院时间时间格式yyyy-MM-dd
*/
@ApiModelProperty(value = "入院时间")
private LocalDateTime admissionTime;
/** 出院时间出院患者时间格式yyyy-MM-dd */
/**
* 出院时间出院患者时间格式yyyy-MM-dd
*/
@ApiModelProperty(value = "出院时间(出院患者)")
private LocalDateTime dischargeTime;
/** 预约治疗组(取值以及枚举未知?) */
/**
* 预约治疗组取值以及枚举未知
*/
@ApiModelProperty(value = "预约治疗组(取值以及枚举未知?)")
private String appointmentTreatmentGroup;
/** 登记号(预住院患者) */
/**
* 登记号预住院患者
*/
@ApiModelProperty(value = "登记号(预住院患者)")
private String registrationNo;
/** 登记日期预住院患者时间格式yyyy-MM-dd */
/**
* 登记日期预住院患者时间格式yyyy-MM-dd
*/
@ApiModelProperty(value = "登记日期预住院患者时间格式yyyy-MM-dd")
private LocalDate registrationDate;
/** 预约时间预住院患者时间格式yyyy-MM-dd */
/**
* 预约时间预住院患者时间格式yyyy-MM-dd
*/
@ApiModelProperty(value = "预约时间预住院患者时间格式yyyy-MM-dd")
private LocalDate appointmentDate;
/** 门诊/住院号 */
/**
* 门诊/住院号
*/
@ApiModelProperty(value = "门诊/住院号 ")
@Excel(name = "门诊/住院号 ", readConverterExp = "门诊/住院号 ")
private String inHospitalNumber;
/** 就诊时间格式yyyy-MM-dd HH:mm:ss */
@ApiModelProperty(value = "就诊时间格式yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "就诊时间格式yyyy-MM-dd HH:mm:ss", width = 30, dateFormat = "yyyy-MM-dd")
private LocalDateTime visitDate;
/**
* 就诊时间格式yyyy-MM-dd HH:mm:ss
*/
@ApiModelProperty(value = "就诊时间格式yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "就诊时间格式yyyy-MM-dd HH:mm:ss", width = 30, dateFormat = "yyyy-MM-dd")
private LocalDateTime visitDate;
/** 出院方式(出院患者) */
/**
* 出院方式出院患者
*/
@ApiModelProperty(value = "出院方式")
@Excel(name = "出院方式", readConverterExp = "出=院患者")
private String dischargeMethod;
/** 患者来源微信小程序WE_CHAT_APPLET微信公众号WE_CHAT_OFFICIAL_ACCOUNT管理端MANAGE_END */
/**
* 患者来源微信小程序WE_CHAT_APPLET微信公众号WE_CHAT_OFFICIAL_ACCOUNT管理端MANAGE_END
*/
@ApiModelProperty(value = "患者来源微信小程序WE_CHAT_APPLET微信公众号WE_CHAT_OFFICIAL_ACCOUNT管理端MANAGE_END")
@Excel(name = "患者来源微信小程序WE_CHAT_APPLET微信公众号WE_CHAT_OFFICIAL_ACCOUNT管理端MANAGE_END")
private String patientSource;
/** 删除标识0未删除1已删除 */
/**
* 删除标识0未删除1已删除
*/
private Integer delFlag;
}

View File

@ -3,6 +3,7 @@ package com.xinelu.manage.mapper.patientinfo;
import com.xinelu.manage.domain.patientinfo.PatientInfo;
import com.xinelu.manage.dto.patientinfo.PatientInfoDto;
import com.xinelu.manage.vo.patientinfo.PatientBaseInfoVo;
import java.util.List;
/**
@ -20,7 +21,13 @@ public interface PatientInfoMapper {
*/
public PatientInfo selectPatientInfoById(Long id);
public PatientBaseInfoVo getPatientBaseInfo(Long id);
/**
* 查询患者信息
*
* @param id 主键id
* @return 患者信息
*/
public PatientBaseInfoVo getPatientBaseInfo(Long id);
/**
* 查询患者信息列表

View File

@ -1,56 +1,56 @@
<?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">
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.xinelu.manage.mapper.patientinfo.PatientInfoMapper">
<resultMap type="com.xinelu.manage.domain.patientinfo.PatientInfo" id="PatientInfoResult">
<result property="id" column="id" />
<result property="residentId" column="resident_id" />
<result property="patientName" column="patient_name" />
<result property="patientPhone" column="patient_phone" />
<result property="familyMemberPhone" column="family_member_phone" />
<result property="birthDate" column="birth_date" />
<result property="cardNo" column="card_no" />
<result property="sex" column="sex" />
<result property="address" column="address" />
<result property="patientType" column="patient_type" />
<result property="signStatus" column="sign_status" />
<result property="signPatientRecordId" column="sign_patient_record_id" />
<result property="serviceStatus" column="service_status" />
<result property="signTime" column="sign_time" />
<result property="visitMethod" column="visit_method" />
<result property="attendingPhysicianId" column="attending_physician_id" />
<result property="attendingPhysicianName" column="attending_physician_name" />
<result property="mainDiagnosis" column="main_diagnosis" />
<result property="hospitalAgencyId" column="hospital_agency_id" />
<result property="hospitalAgencyName" column="hospital_agency_name" />
<result property="campusAgencyId" column="campus_agency_id" />
<result property="campusAgencyName" column="campus_agency_name" />
<result property="departmentId" column="department_id" />
<result property="departmentName" column="department_name" />
<result property="wardId" column="ward_id" />
<result property="wardName" column="ward_name" />
<result property="responsibleNurse" column="responsible_nurse" />
<result property="patientVisitRecordId" column="patient_visit_record_id" />
<result property="visitSerialNumber" column="visit_serial_number" />
<result property="admissionTime" column="admission_time" />
<result property="dischargeTime" column="discharge_time" />
<result property="appointmentTreatmentGroup" column="appointment_treatment_group" />
<result property="registrationNo" column="registration_no" />
<result property="registrationDate" column="registration_date" />
<result property="appointmentDate" column="appointment_date" />
<result property="inHospitalNumber" column="in_hospital_number" />
<result property="visitDate" column="visit_date" />
<result property="dischargeMethod" column="discharge_method" />
<result property="patientSource" column="patient_source" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<resultMap type="com.xinelu.manage.domain.patientinfo.PatientInfo" id="PatientInfoResult">
<result property="id" column="id"/>
<result property="residentId" column="resident_id"/>
<result property="patientName" column="patient_name"/>
<result property="patientPhone" column="patient_phone"/>
<result property="familyMemberPhone" column="family_member_phone"/>
<result property="birthDate" column="birth_date"/>
<result property="cardNo" column="card_no"/>
<result property="sex" column="sex"/>
<result property="address" column="address"/>
<result property="patientType" column="patient_type"/>
<result property="signStatus" column="sign_status"/>
<result property="signPatientRecordId" column="sign_patient_record_id"/>
<result property="serviceStatus" column="service_status"/>
<result property="signTime" column="sign_time"/>
<result property="visitMethod" column="visit_method"/>
<result property="attendingPhysicianId" column="attending_physician_id"/>
<result property="attendingPhysicianName" column="attending_physician_name"/>
<result property="mainDiagnosis" column="main_diagnosis"/>
<result property="hospitalAgencyId" column="hospital_agency_id"/>
<result property="hospitalAgencyName" column="hospital_agency_name"/>
<result property="campusAgencyId" column="campus_agency_id"/>
<result property="campusAgencyName" column="campus_agency_name"/>
<result property="departmentId" column="department_id"/>
<result property="departmentName" column="department_name"/>
<result property="wardId" column="ward_id"/>
<result property="wardName" column="ward_name"/>
<result property="responsibleNurse" column="responsible_nurse"/>
<result property="patientVisitRecordId" column="patient_visit_record_id"/>
<result property="visitSerialNumber" column="visit_serial_number"/>
<result property="admissionTime" column="admission_time"/>
<result property="dischargeTime" column="discharge_time"/>
<result property="appointmentTreatmentGroup" column="appointment_treatment_group"/>
<result property="registrationNo" column="registration_no"/>
<result property="registrationDate" column="registration_date"/>
<result property="appointmentDate" column="appointment_date"/>
<result property="inHospitalNumber" column="in_hospital_number"/>
<result property="visitDate" column="visit_date"/>
<result property="dischargeMethod" column="discharge_method"/>
<result property="patientSource" column="patient_source"/>
<result property="delFlag" column="del_flag"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
</resultMap>
<sql id="selectPatientInfoVo">
<sql id="selectPatientInfoVo">
select id,resident_id,
patient_name,
patient_phone,
@ -71,428 +71,431 @@
from patient_info
</sql>
<select id="selectPatientInfoList" parameterType="com.xinelu.manage.dto.patientinfo.PatientInfoDto" resultMap="PatientInfoResult">
<include refid="selectPatientInfoVo" />
<where>
del_flag = 0
<if test="patientName != null and patientName != ''">
and patient_name = #{patientName}
</if>
<if test="patientPhone != null and patientPhone != ''">
and patient_phone like concat('%', #{patientPhone}, '%')
</if>
<if test="cardNo != null and cardNo != ''">
and card_no = #{cardNo}
</if>
<if test="patientType != null and patientType != ''">
<choose>
<when test="patientType == 'OUTPATIENT_DISCHARGE'.toString()">
and (patient_type = 'OUTPATIENT' or patient_type = 'DISCHARGED_PATIENT')
</when>
<otherwise>
and patient_type = #{patientType}
</otherwise>
</choose>
</if>
<if test="attendingPhysicianId != null">
and attending_physician_id = #{attendingPhysicianId}
</if>
<if test="mainDiagnosis != null and mainDiagnosis != ''">
and main_diagnosis like concat('%', #{mainDiagnosis}, '%')
</if>
<if test="hospitalAgencyId != null ">
and hospital_agency_id = #{hospitalAgencyId}
</if>
<if test="campusAgencyId != null ">
and campus_agency_id = #{campusAgencyId}
</if>
<if test="departmentId != null ">
and department_id = #{departmentId}
</if>
<if test="wardId != null ">
and ward_id = #{wardId}
</if>
<if test="visitMethod != null and visitMethod != ''">
and visit_method = #{visitMethod}
</if>
<if test="visitDateStart != null ">
and visit_date >= #{visitDateStart}
</if>
<if test="visitDateEnd != null ">
and visit_date &lt;= #{visitDateEnd}
</if>
<if test="admissionTimeStart != null ">
and admission_time >= #{admissionTimeStart}
</if>
<if test="admissionTimeEnd != null ">
and admission_time &lt;= #{admissionTimeEnd}
</if>
<if test="appointmentDateStart != null ">
and appointment_date >= #{appointmentDateStart}
</if>
<if test="appointmentDateEnd != null ">
and appointment_date &lt;= #{appointmentDateEnd}
</if>
<if test="appointmentTreatmentGroup != null and appointmentTreatmentGroup != ''">
and appointment_treatment_group = #{appointmentTreatmentGroup}
</if>
<if test="registrationNo != null and registrationNo != ''">
and registration_no = #{registrationNo}
</if>
<if test="visitSerialNumber != null and visitSerialNumber != ''">
and visit_serial_number = #{visitSerialNumber}
</if>
<if test="responsibleNurse != null and responsibleNurse != ''">
and responsible_nurse = #{responsibleNurse}
</if>
<if test="patientSource != null and patientSource != ''">
and patient_source = #{patientSource}
</if>
</where>
</select>
<select id="selectPatientInfoList" parameterType="com.xinelu.manage.dto.patientinfo.PatientInfoDto"
resultMap="PatientInfoResult">
<include refid="selectPatientInfoVo"/>
<where>
del_flag = 0
<if test="patientName != null and patientName != ''">
and patient_name = #{patientName}
</if>
<if test="patientPhone != null and patientPhone != ''">
and patient_phone like concat('%', #{patientPhone}, '%')
</if>
<if test="cardNo != null and cardNo != ''">
and card_no = #{cardNo}
</if>
<if test="patientType != null and patientType != ''">
<choose>
<when test="patientType == 'OUTPATIENT_DISCHARGE'.toString()">
and (patient_type = 'OUTPATIENT' or patient_type = 'DISCHARGED_PATIENT')
</when>
<otherwise>
and patient_type = #{patientType}
</otherwise>
</choose>
</if>
<if test="attendingPhysicianId != null">
and attending_physician_id = #{attendingPhysicianId}
</if>
<if test="mainDiagnosis != null and mainDiagnosis != ''">
and main_diagnosis like concat('%', #{mainDiagnosis}, '%')
</if>
<if test="hospitalAgencyId != null ">
and hospital_agency_id = #{hospitalAgencyId}
</if>
<if test="campusAgencyId != null ">
and campus_agency_id = #{campusAgencyId}
</if>
<if test="departmentId != null ">
and department_id = #{departmentId}
</if>
<if test="wardId != null ">
and ward_id = #{wardId}
</if>
<if test="visitMethod != null and visitMethod != ''">
and visit_method = #{visitMethod}
</if>
<if test="visitDateStart != null ">
and visit_date >= #{visitDateStart}
</if>
<if test="visitDateEnd != null ">
and visit_date &lt;= #{visitDateEnd}
</if>
<if test="admissionTimeStart != null ">
and admission_time >= #{admissionTimeStart}
</if>
<if test="admissionTimeEnd != null ">
and admission_time &lt;= #{admissionTimeEnd}
</if>
<if test="appointmentDateStart != null ">
and appointment_date >= #{appointmentDateStart}
</if>
<if test="appointmentDateEnd != null ">
and appointment_date &lt;= #{appointmentDateEnd}
</if>
<if test="appointmentTreatmentGroup != null and appointmentTreatmentGroup != ''">
and appointment_treatment_group = #{appointmentTreatmentGroup}
</if>
<if test="registrationNo != null and registrationNo != ''">
and registration_no = #{registrationNo}
</if>
<if test="visitSerialNumber != null and visitSerialNumber != ''">
and visit_serial_number = #{visitSerialNumber}
</if>
<if test="responsibleNurse != null and responsibleNurse != ''">
and responsible_nurse = #{responsibleNurse}
</if>
<if test="patientSource != null and patientSource != ''">
and patient_source = #{patientSource}
</if>
</where>
</select>
<select id="selectPatientInfoById" parameterType="Long" resultMap="PatientInfoResult">
<include refid="selectPatientInfoVo" />
where id = #{id}
</select>
<select id="selectPatientInfoById" parameterType="Long" resultMap="PatientInfoResult">
<include refid="selectPatientInfoVo"/>
where id = #{id}
</select>
<select id="getPatientBaseInfo" parameterType="Long" resultType="com.xinelu.manage.vo.patientinfo.PatientBaseInfoVo">
<select id="getPatientBaseInfo" parameterType="Long"
resultType="com.xinelu.manage.vo.patientinfo.PatientBaseInfoVo">
select id, resident_id, patient_name, patient_phone, family_member_phone,
birth_date, card_no, sex, address
from patient_info
where id = #{id}
</select>
<insert id="insertPatientInfo" parameterType="com.xinelu.manage.domain.patientinfo.PatientInfo" useGeneratedKeys="true" keyProperty="id">
insert into patient_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="residentId != null">
resident_id,
</if>
<if test="patientName != null">
patient_name,
</if>
<if test="patientPhone != null">patient_phone,
</if>
<if test="familyMemberPhone != null">family_member_phone,
</if>
<if test="birthDate != null">birth_date,
</if>
<if test="cardNo != null">card_no,
</if>
<if test="sex != null">sex,
</if>
<if test="address != null">address,
</if>
<if test="patientType != null">patient_type,
</if>
<if test="signStatus != null">sign_status,
</if>
<if test="signPatientRecordId != null">sign_patient_record_id,
</if>
<if test="serviceStatus != null">service_status,
</if>
<if test="signTime != null">sign_time,
</if>
<if test="visitMethod != null">visit_method,
</if>
<if test="attendingPhysicianId != null">attending_physician_id,
</if>
<if test="attendingPhysicianName != null">attending_physician_name,
</if>
<if test="mainDiagnosis != null">main_diagnosis,
</if>
<if test="hospitalAgencyId != null">hospital_agency_id,
</if>
<if test="hospitalAgencyName != null">hospital_agency_name,
</if>
<if test="campusAgencyId != null">campus_agency_id,
</if>
<if test="campusAgencyName != null">campus_agency_name,
</if>
<if test="departmentId != null">department_id,
</if>
<if test="departmentName != null">department_name,
</if>
<if test="wardId != null">ward_id,
</if>
<if test="wardName != null">ward_name,
</if>
<if test="responsibleNurse != null">
responsible_nurse,
</if>
<if test="patientVisitRecordId != null">
patient_visit_record_id,
</if>
<if test="visitSerialNumber != null">
visit_serial_number,
</if>
<if test="admissionTime != null">
admission_time,
</if>
<if test="dischargeTime != null">
discharge_time,
</if>
<if test="appointmentTreatmentGroup != null">appointment_treatment_group,
</if>
<if test="registrationNo != null">registration_no,
</if>
<if test="registrationDate != null">registration_date,
</if>
<if test="appointmentDate != null">appointment_date,
</if>
<if test="inHospitalNumber != null">in_hospital_number,
</if>
<if test="visitDate != null">visit_date,
</if>
<if test="dischargeMethod != null">discharge_method,
</if>
<if test="patientSource != null">patient_source,
</if>
<if test="delFlag != null">del_flag,
</if>
<if test="createBy != null">create_by,
</if>
<if test="createTime != null">create_time,
</if>
<if test="updateBy != null">update_by,
</if>
<if test="updateTime != null">update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="residentId != null">#{residentId},
</if>
<if test="patientName != null">#{patientName},
</if>
<if test="patientPhone != null">#{patientPhone},
</if>
<if test="familyMemberPhone != null">#{familyMemberPhone},
</if>
<if test="birthDate != null">#{birthDate},
</if>
<if test="cardNo != null">#{cardNo},
</if>
<if test="sex != null">#{sex},
</if>
<if test="address != null">#{address},
</if>
<if test="patientType != null">#{patientType},
</if>
<if test="signStatus != null">#{signStatus},
</if>
<if test="signPatientRecordId != null">#{signPatientRecordId},
</if>
<if test="serviceStatus != null">#{serviceStatus},
</if>
<if test="signTime != null">#{signTime},
</if>
<if test="visitMethod != null">#{visitMethod},
</if>
<if test="attendingPhysicianId != null">#{attendingPhysicianId},
</if>
<if test="attendingPhysicianName != null">#{attendingPhysicianName},
</if>
<if test="mainDiagnosis != null">#{mainDiagnosis},
</if>
<if test="hospitalAgencyId != null">#{hospitalAgencyId},
</if>
<if test="hospitalAgencyName != null">#{hospitalAgencyName},
</if>
<if test="campusAgencyId != null">#{campusAgencyId},
</if>
<if test="campusAgencyName != null">#{campusAgencyName},
</if>
<if test="departmentId != null">#{departmentId},
</if>
<if test="departmentName != null">#{departmentName},
</if>
<if test="wardId != null">#{wardId},
</if>
<if test="wardName != null">#{wardName},
</if>
<if test="responsibleNurse != null">#{responsibleNurse},
</if>
<if test="patientVisitRecordId != null">#{patientVisitRecordId},
</if>
<if test="visitSerialNumber != null">#{visitSerialNumber},
</if>
<if test="admissionTime != null">#{admissionTime},
</if>
<if test="dischargeTime != null">#{dischargeTime},
</if>
<if test="appointmentTreatmentGroup != null">#{appointmentTreatmentGroup},
</if>
<if test="registrationNo != null">#{registrationNo},
</if>
<if test="registrationDate != null">#{registrationDate},
</if>
<if test="appointmentDate != null">#{appointmentDate},
</if>
<if test="inHospitalNumber != null">#{inHospitalNumber},
</if>
<if test="visitDate != null">#{visitDate},
</if>
<if test="dischargeMethod != null">#{dischargeMethod},
</if>
<if test="patientSource != null">#{patientSource},
</if>
<if test="delFlag != null">#{delFlag},
</if>
<if test="createBy != null">#{createBy},
</if>
<if test="createTime != null">#{createTime},
</if>
<if test="updateBy != null">#{updateBy},
</if>
<if test="updateTime != null">#{updateTime},
</if>
</trim>
</insert>
<insert id="insertPatientInfo" parameterType="com.xinelu.manage.domain.patientinfo.PatientInfo"
useGeneratedKeys="true" keyProperty="id">
insert into patient_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="residentId != null">
resident_id,
</if>
<if test="patientName != null">
patient_name,
</if>
<if test="patientPhone != null">patient_phone,
</if>
<if test="familyMemberPhone != null">family_member_phone,
</if>
<if test="birthDate != null">birth_date,
</if>
<if test="cardNo != null">card_no,
</if>
<if test="sex != null">sex,
</if>
<if test="address != null">address,
</if>
<if test="patientType != null">patient_type,
</if>
<if test="signStatus != null">sign_status,
</if>
<if test="signPatientRecordId != null">sign_patient_record_id,
</if>
<if test="serviceStatus != null">service_status,
</if>
<if test="signTime != null">sign_time,
</if>
<if test="visitMethod != null">visit_method,
</if>
<if test="attendingPhysicianId != null">attending_physician_id,
</if>
<if test="attendingPhysicianName != null">attending_physician_name,
</if>
<if test="mainDiagnosis != null">main_diagnosis,
</if>
<if test="hospitalAgencyId != null">hospital_agency_id,
</if>
<if test="hospitalAgencyName != null">hospital_agency_name,
</if>
<if test="campusAgencyId != null">campus_agency_id,
</if>
<if test="campusAgencyName != null">campus_agency_name,
</if>
<if test="departmentId != null">department_id,
</if>
<if test="departmentName != null">department_name,
</if>
<if test="wardId != null">ward_id,
</if>
<if test="wardName != null">ward_name,
</if>
<if test="responsibleNurse != null">
responsible_nurse,
</if>
<if test="patientVisitRecordId != null">
patient_visit_record_id,
</if>
<if test="visitSerialNumber != null">
visit_serial_number,
</if>
<if test="admissionTime != null">
admission_time,
</if>
<if test="dischargeTime != null">
discharge_time,
</if>
<if test="appointmentTreatmentGroup != null">appointment_treatment_group,
</if>
<if test="registrationNo != null">registration_no,
</if>
<if test="registrationDate != null">registration_date,
</if>
<if test="appointmentDate != null">appointment_date,
</if>
<if test="inHospitalNumber != null">in_hospital_number,
</if>
<if test="visitDate != null">visit_date,
</if>
<if test="dischargeMethod != null">discharge_method,
</if>
<if test="patientSource != null">patient_source,
</if>
<if test="delFlag != null">del_flag,
</if>
<if test="createBy != null">create_by,
</if>
<if test="createTime != null">create_time,
</if>
<if test="updateBy != null">update_by,
</if>
<if test="updateTime != null">update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="residentId != null">#{residentId},
</if>
<if test="patientName != null">#{patientName},
</if>
<if test="patientPhone != null">#{patientPhone},
</if>
<if test="familyMemberPhone != null">#{familyMemberPhone},
</if>
<if test="birthDate != null">#{birthDate},
</if>
<if test="cardNo != null">#{cardNo},
</if>
<if test="sex != null">#{sex},
</if>
<if test="address != null">#{address},
</if>
<if test="patientType != null">#{patientType},
</if>
<if test="signStatus != null">#{signStatus},
</if>
<if test="signPatientRecordId != null">#{signPatientRecordId},
</if>
<if test="serviceStatus != null">#{serviceStatus},
</if>
<if test="signTime != null">#{signTime},
</if>
<if test="visitMethod != null">#{visitMethod},
</if>
<if test="attendingPhysicianId != null">#{attendingPhysicianId},
</if>
<if test="attendingPhysicianName != null">#{attendingPhysicianName},
</if>
<if test="mainDiagnosis != null">#{mainDiagnosis},
</if>
<if test="hospitalAgencyId != null">#{hospitalAgencyId},
</if>
<if test="hospitalAgencyName != null">#{hospitalAgencyName},
</if>
<if test="campusAgencyId != null">#{campusAgencyId},
</if>
<if test="campusAgencyName != null">#{campusAgencyName},
</if>
<if test="departmentId != null">#{departmentId},
</if>
<if test="departmentName != null">#{departmentName},
</if>
<if test="wardId != null">#{wardId},
</if>
<if test="wardName != null">#{wardName},
</if>
<if test="responsibleNurse != null">#{responsibleNurse},
</if>
<if test="patientVisitRecordId != null">#{patientVisitRecordId},
</if>
<if test="visitSerialNumber != null">#{visitSerialNumber},
</if>
<if test="admissionTime != null">#{admissionTime},
</if>
<if test="dischargeTime != null">#{dischargeTime},
</if>
<if test="appointmentTreatmentGroup != null">#{appointmentTreatmentGroup},
</if>
<if test="registrationNo != null">#{registrationNo},
</if>
<if test="registrationDate != null">#{registrationDate},
</if>
<if test="appointmentDate != null">#{appointmentDate},
</if>
<if test="inHospitalNumber != null">#{inHospitalNumber},
</if>
<if test="visitDate != null">#{visitDate},
</if>
<if test="dischargeMethod != null">#{dischargeMethod},
</if>
<if test="patientSource != null">#{patientSource},
</if>
<if test="delFlag != null">#{delFlag},
</if>
<if test="createBy != null">#{createBy},
</if>
<if test="createTime != null">#{createTime},
</if>
<if test="updateBy != null">#{updateBy},
</if>
<if test="updateTime != null">#{updateTime},
</if>
</trim>
</insert>
<update id="updatePatientInfo" parameterType="com.xinelu.manage.domain.patientinfo.PatientInfo">
update patient_info
<trim prefix="SET" suffixOverrides=",">
<if test="residentId != null">
resident_id = #{residentId},
</if>
<if test="patientName != null">
patient_name = #{patientName},
</if>
<if test="patientPhone != null">
patient_phone = #{patientPhone},
</if>
<if test="familyMemberPhone != null">
family_member_phone = #{familyMemberPhone},
</if>
<if test="birthDate != null">
birth_date = #{birthDate},
</if>
<if test="cardNo != null">
card_no = #{cardNo},
</if>
<if test="sex != null">
sex = #{sex},
</if>
<if test="address != null">
address = #{address},
</if>
<if test="patientType != null">
patient_type = #{patientType},
</if>
<if test="signStatus != null">sign_status =
#{signStatus},
</if>
<if test="signPatientRecordId != null">sign_patient_record_id = #{signPatientRecordId},
</if>
<if test="serviceStatus != null">service_status = #{serviceStatus},
</if>
<if test="signTime != null">sign_time =
#{signTime},
</if>
<if test="visitMethod != null">visit_method =
#{visitMethod},
</if>
<if test="attendingPhysicianId != null">attending_physician_id =
#{attendingPhysicianId},
</if>
<if test="attendingPhysicianName != null">attending_physician_name =
#{attendingPhysicianName},
</if>
<if test="mainDiagnosis != null">main_diagnosis =
#{mainDiagnosis},
</if>
<if test="hospitalAgencyId != null">hospital_agency_id =
#{hospitalAgencyId},
</if>
<if test="hospitalAgencyName != null">hospital_agency_name =
#{hospitalAgencyName},
</if>
<if test="campusAgencyId != null">campus_agency_id =
#{campusAgencyId},
</if>
<if test="campusAgencyName != null">campus_agency_name =
#{campusAgencyName},
</if>
<if test="departmentId != null">department_id =
#{departmentId},
</if>
<if test="departmentName != null">department_name =
#{departmentName},
</if>
<if test="wardId != null">ward_id =
#{wardId},
</if>
<if test="wardName != null">ward_name =
#{wardName},
</if>
<if test="responsibleNurse != null">responsible_nurse =
#{responsibleNurse},
</if>
<if test="patientVisitRecordId != null">patient_visit_record_id =
#{patientVisitRecordId},
</if>
<if test="visitSerialNumber != null">visit_serial_number =
#{visitSerialNumber},
</if>
<if test="admissionTime != null">
admission_time = #{admissionTime},
</if>
<if test="dischargeTime != null">
discharge_time = #{dischargeTime},
</if>
<if test="appointmentTreatmentGroup != null">appointment_treatment_group =
#{appointmentTreatmentGroup},
</if>
<if test="registrationNo != null">registration_no =
#{registrationNo},
</if>
<if test="registrationDate != null">registration_date =
#{registrationDate},
</if>
<if test="appointmentDate != null">appointment_date =
#{appointmentDate},
</if>
<if test="inHospitalNumber != null">in_hospital_number =
#{inHospitalNumber},
</if>
<if test="visitDate != null">visit_date =
#{visitDate},
</if>
<if test="dischargeMethod != null">discharge_method =
#{dischargeMethod},
</if>
<if test="patientSource != null">patient_source =
#{patientSource},
</if>
<if test="delFlag != null">del_flag =
#{delFlag},
</if>
<if test="createBy != null">create_by =
#{createBy},
</if>
<if test="createTime != null">create_time =
#{createTime},
</if>
<if test="updateBy != null">update_by =
#{updateBy},
</if>
<if test="updateTime != null">update_time =
#{updateTime},
</if>
</trim>
where id = #{id}
</update>
<update id="updatePatientInfo" parameterType="com.xinelu.manage.domain.patientinfo.PatientInfo">
update patient_info
<trim prefix="SET" suffixOverrides=",">
<if test="residentId != null">
resident_id = #{residentId},
</if>
<if test="patientName != null">
patient_name = #{patientName},
</if>
<if test="patientPhone != null">
patient_phone = #{patientPhone},
</if>
<if test="familyMemberPhone != null">
family_member_phone = #{familyMemberPhone},
</if>
<if test="birthDate != null">
birth_date = #{birthDate},
</if>
<if test="cardNo != null">
card_no = #{cardNo},
</if>
<if test="sex != null">
sex = #{sex},
</if>
<if test="address != null">
address = #{address},
</if>
<if test="patientType != null">
patient_type = #{patientType},
</if>
<if test="signStatus != null">sign_status =
#{signStatus},
</if>
<if test="signPatientRecordId != null">sign_patient_record_id = #{signPatientRecordId},
</if>
<if test="serviceStatus != null">service_status = #{serviceStatus},
</if>
<if test="signTime != null">sign_time =
#{signTime},
</if>
<if test="visitMethod != null">visit_method =
#{visitMethod},
</if>
<if test="attendingPhysicianId != null">attending_physician_id =
#{attendingPhysicianId},
</if>
<if test="attendingPhysicianName != null">attending_physician_name =
#{attendingPhysicianName},
</if>
<if test="mainDiagnosis != null">main_diagnosis =
#{mainDiagnosis},
</if>
<if test="hospitalAgencyId != null">hospital_agency_id =
#{hospitalAgencyId},
</if>
<if test="hospitalAgencyName != null">hospital_agency_name =
#{hospitalAgencyName},
</if>
<if test="campusAgencyId != null">campus_agency_id =
#{campusAgencyId},
</if>
<if test="campusAgencyName != null">campus_agency_name =
#{campusAgencyName},
</if>
<if test="departmentId != null">department_id =
#{departmentId},
</if>
<if test="departmentName != null">department_name =
#{departmentName},
</if>
<if test="wardId != null">ward_id =
#{wardId},
</if>
<if test="wardName != null">ward_name =
#{wardName},
</if>
<if test="responsibleNurse != null">responsible_nurse =
#{responsibleNurse},
</if>
<if test="patientVisitRecordId != null">patient_visit_record_id =
#{patientVisitRecordId},
</if>
<if test="visitSerialNumber != null">visit_serial_number =
#{visitSerialNumber},
</if>
<if test="admissionTime != null">
admission_time = #{admissionTime},
</if>
<if test="dischargeTime != null">
discharge_time = #{dischargeTime},
</if>
<if test="appointmentTreatmentGroup != null">appointment_treatment_group =
#{appointmentTreatmentGroup},
</if>
<if test="registrationNo != null">registration_no =
#{registrationNo},
</if>
<if test="registrationDate != null">registration_date =
#{registrationDate},
</if>
<if test="appointmentDate != null">appointment_date =
#{appointmentDate},
</if>
<if test="inHospitalNumber != null">in_hospital_number =
#{inHospitalNumber},
</if>
<if test="visitDate != null">visit_date =
#{visitDate},
</if>
<if test="dischargeMethod != null">discharge_method =
#{dischargeMethod},
</if>
<if test="patientSource != null">patient_source =
#{patientSource},
</if>
<if test="delFlag != null">del_flag =
#{delFlag},
</if>
<if test="createBy != null">create_by =
#{createBy},
</if>
<if test="createTime != null">create_time =
#{createTime},
</if>
<if test="updateBy != null">update_by =
#{updateBy},
</if>
<if test="updateTime != null">update_time =
#{updateTime},
</if>
</trim>
where id = #{id}
</update>
<update id="deletePatientInfoById" parameterType="Long">
<update id="deletePatientInfoById" parameterType="Long">
update patient_info set del_flag = 1
where id = #{id}
</update>
<update id="deletePatientInfoByIds" parameterType="String">
update patient_info set del_flag = 1 where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</update>
<update id="deletePatientInfoByIds" parameterType="String">
update patient_info set del_flag = 1 where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</update>
</mapper>