后端最新版本同步
This commit is contained in:
@@ -166,11 +166,22 @@ public class PatientInformationServiceImpl implements IPatientInformationService
|
||||
public R<?> editPatient(PatientInformationDto patientInformationDto) {
|
||||
// 如果患者没有输入身份证号则根据年龄自动生成
|
||||
String idCard = patientInformationDto.getIdCard();
|
||||
if (idCard == null || CommonConstants.Common.AREA_CODE.equals(idCard.substring(0, 6))) {
|
||||
idCard = IdCardUtil.generateIdByAge(patientInformationDto.getAge());
|
||||
Date birthday = IdCardUtil.extractBirthdayFromIdCard(idCard);
|
||||
Date birthday = null;
|
||||
// if (idCard == null || CommonConstants.Common.AREA_CODE.equals(idCard.substring(0, 6))) {
|
||||
// idCard = IdCardUtil.generateIdByAge(patientInformationDto.getAge());
|
||||
// Date birthday = IdCardUtil.extractBirthdayFromIdCard(idCard);
|
||||
// patientInformationDto.setIdCard(idCard).setBirthDate(birthday);
|
||||
// }
|
||||
if (idCard != null && !idCard.isEmpty()) {
|
||||
birthday = IdCardUtil.extractBirthdayFromIdCard(idCard);
|
||||
patientInformationDto.setIdCard(idCard).setBirthDate(birthday);
|
||||
}
|
||||
// if(idCard==null&&patientInformationDto.getAge() != null)
|
||||
// {
|
||||
// idCard = IdCardUtil.generateIdByAge(patientInformationDto.getAge());
|
||||
// birthday = IdCardUtil.extractBirthdayFromIdCard(idCard);
|
||||
// patientInformationDto.setIdCard(idCard).setBirthDate(birthday);
|
||||
// }
|
||||
Patient patient = new Patient();
|
||||
BeanUtils.copyProperties(patientInformationDto, patient);
|
||||
|
||||
@@ -221,11 +232,22 @@ public class PatientInformationServiceImpl implements IPatientInformationService
|
||||
public R<?> addPatient(PatientInformationDto patientInformationDto) {
|
||||
// 如果患者没有输入身份证号则根据年龄自动生成
|
||||
String idCard = patientInformationDto.getIdCard();
|
||||
if (idCard == null || idCard.isEmpty() || CommonConstants.Common.AREA_CODE.equals(idCard.substring(0, 6))) {
|
||||
idCard = IdCardUtil.generateIdByAge(patientInformationDto.getAge());
|
||||
Date birthday = IdCardUtil.extractBirthdayFromIdCard(idCard);
|
||||
Date birthday = null;
|
||||
// if (idCard == null || CommonConstants.Common.AREA_CODE.equals(idCard.substring(0, 6))) {
|
||||
// idCard = IdCardUtil.generateIdByAge(patientInformationDto.getAge());
|
||||
// Date birthday = IdCardUtil.extractBirthdayFromIdCard(idCard);
|
||||
// patientInformationDto.setIdCard(idCard).setBirthDate(birthday);
|
||||
// }
|
||||
if (idCard != null && !idCard.isEmpty()) {
|
||||
birthday = IdCardUtil.extractBirthdayFromIdCard(idCard);
|
||||
patientInformationDto.setIdCard(idCard).setBirthDate(birthday);
|
||||
}
|
||||
// if(idCard==null&&patientInformationDto.getAge() != null)
|
||||
// {
|
||||
// idCard = IdCardUtil.generateIdByAge(patientInformationDto.getAge());
|
||||
// birthday = IdCardUtil.extractBirthdayFromIdCard(idCard);
|
||||
// patientInformationDto.setIdCard(idCard).setBirthDate(birthday);
|
||||
// }
|
||||
Patient patient = new Patient();
|
||||
BeanUtils.copyProperties(patientInformationDto, patient);
|
||||
patient.setBusNo(assignSeqUtil.getSeq(AssignSeqEnum.PATIENT_NUM.getPrefix(), 10));
|
||||
|
||||
@@ -25,131 +25,202 @@ import lombok.experimental.Accessors;
|
||||
@Accessors(chain = true)
|
||||
public class PatientInformationDto {
|
||||
|
||||
/** ID */
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/** 临时标识 */
|
||||
/**
|
||||
* 临时标识
|
||||
*/
|
||||
private Integer tempFlag;
|
||||
|
||||
/** 患者姓名 */
|
||||
/**
|
||||
* 患者姓名
|
||||
*/
|
||||
@NotBlank(message = "患者姓名不能为空")
|
||||
private String name;
|
||||
|
||||
/** 患者其他名称 */
|
||||
/**
|
||||
* 患者其他名称
|
||||
*/
|
||||
private String nameJson;
|
||||
|
||||
/** 患者院内编码/病历号 */
|
||||
/**
|
||||
* 患者院内编码/病历号
|
||||
*/
|
||||
private String busNo;
|
||||
|
||||
/** 性别编码 */
|
||||
/**
|
||||
* 性别编码
|
||||
*/
|
||||
@NotNull
|
||||
private Integer genderEnum;
|
||||
private String genderEnum_enumText;
|
||||
|
||||
/** 生日 */
|
||||
/**
|
||||
* 生日
|
||||
*/
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
|
||||
private Date birthDate;
|
||||
|
||||
/** 死亡时间 */
|
||||
/**
|
||||
* 死亡时间
|
||||
*/
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date deceasedDate;
|
||||
|
||||
/** 婚姻状态 */
|
||||
/**
|
||||
* 婚姻状态
|
||||
*/
|
||||
private Integer maritalStatusEnum;
|
||||
private String maritalStatusEnum_enumText;
|
||||
|
||||
/** 职业编码 */
|
||||
/**
|
||||
* 职业编码
|
||||
*/
|
||||
private Integer prfsEnum;
|
||||
private String prfsEnum_enumText;
|
||||
|
||||
/** 电话 */
|
||||
// @NotBlank(message = "电话不能为空")
|
||||
@Size(min = 11, max = 11, message = "电话长度必须为11位")
|
||||
@Pattern(regexp = "^1[3-9]\\d{9}$", message = "电话格式不正确")
|
||||
/**
|
||||
* 电话
|
||||
*/
|
||||
@Pattern(regexp = "^$|^1[3-9]\\d{9}$", message = "电话格式不正确(必须为11位有效手机号)")
|
||||
private String phone;
|
||||
|
||||
/** 地址 */
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
private String address;
|
||||
|
||||
/** 地址省 */
|
||||
/**
|
||||
* 地址省
|
||||
*/
|
||||
private String addressProvince;
|
||||
|
||||
/** 地址市 */
|
||||
/**
|
||||
* 地址市
|
||||
*/
|
||||
private String addressCity;
|
||||
|
||||
/** 地址区 */
|
||||
/**
|
||||
* 地址区
|
||||
*/
|
||||
private String addressDistrict;
|
||||
|
||||
/** 地址街道 */
|
||||
/**
|
||||
* 地址街道
|
||||
*/
|
||||
private String addressStreet;
|
||||
|
||||
/** 患者其他地址 */
|
||||
/**
|
||||
* 患者其他地址
|
||||
*/
|
||||
private String addressJson;
|
||||
|
||||
/** 民族 */
|
||||
/**
|
||||
* 民族
|
||||
*/
|
||||
private String nationalityCode;
|
||||
|
||||
/** 证件号码 */
|
||||
/**
|
||||
* 证件号码
|
||||
*/
|
||||
private String idCard;
|
||||
|
||||
/** 证件类型 */
|
||||
/**
|
||||
* 证件类型
|
||||
*/
|
||||
@Dict(dictCode = "sys_idtype")
|
||||
private String typeCode;
|
||||
private String typeCode_dictText;
|
||||
|
||||
/** 标识号 */
|
||||
/**
|
||||
* 标识号
|
||||
*/
|
||||
private String identifierNo;
|
||||
|
||||
/** 拼音码 */
|
||||
/**
|
||||
* 拼音码
|
||||
*/
|
||||
private String pyStr;
|
||||
|
||||
/** 五笔码 */
|
||||
/**
|
||||
* 五笔码
|
||||
*/
|
||||
private String wbStr;
|
||||
|
||||
/** 血型ABO */
|
||||
/**
|
||||
* 血型ABO
|
||||
*/
|
||||
private Integer bloodAbo;
|
||||
private String bloodAbo_enumText;
|
||||
|
||||
/** 血型RH */
|
||||
/**
|
||||
* 血型RH
|
||||
*/
|
||||
private Integer bloodRh;
|
||||
private String bloodRh_enumText;
|
||||
|
||||
/** 工作单位 */
|
||||
/**
|
||||
* 工作单位
|
||||
*/
|
||||
private String workCompany;
|
||||
|
||||
/** 籍贯 */
|
||||
/**
|
||||
* 籍贯
|
||||
*/
|
||||
private String nativePlace;
|
||||
|
||||
/** 国家编码 */
|
||||
/**
|
||||
* 国家编码
|
||||
*/
|
||||
private String countryCode;
|
||||
|
||||
/** 联系人 */
|
||||
/**
|
||||
* 联系人
|
||||
*/
|
||||
private String linkName;
|
||||
|
||||
/** 联系人关系 */
|
||||
/**
|
||||
* 联系人关系
|
||||
*/
|
||||
private Integer linkRelationCode;
|
||||
private String linkRelationCode_enumText;
|
||||
|
||||
/** 联系人电话 */
|
||||
@Size(min = 11, max = 11, message = "电话长度必须为11位")
|
||||
@Pattern(regexp = "^1[3-9]\\d{9}$", message = "电话格式不正确")
|
||||
/**
|
||||
* 联系人电话
|
||||
*/
|
||||
// @Size(min = 11, max = 11, message = "电话长度必须为11位")
|
||||
// @Pattern(regexp = "^1[3-9]\\d{9}$", message = "电话格式不正确")
|
||||
@Pattern(regexp = "^$|^1[3-9]\\d{9}$", message = "联系人电话格式不正确(必须为11位有效手机号)")
|
||||
private String linkTelcom;
|
||||
|
||||
/** 其他联系人 */
|
||||
/**
|
||||
* 其他联系人
|
||||
*/
|
||||
private String linkJsons;
|
||||
|
||||
/** 机构Id */
|
||||
/**
|
||||
* 机构Id
|
||||
*/
|
||||
private Long organizationId;
|
||||
|
||||
/** 机构名 */
|
||||
/**
|
||||
* 机构名
|
||||
*/
|
||||
private String organizationName;
|
||||
|
||||
/** 创建时间 */
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
/** 年龄 */
|
||||
/**
|
||||
* 年龄
|
||||
*/
|
||||
private Integer age;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user