机构树
This commit is contained in:
@@ -2,7 +2,9 @@ package com.core.common.utils;
|
|||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.Period;
|
import java.time.Period;
|
||||||
|
import java.time.ZoneId;
|
||||||
import java.time.temporal.ChronoUnit;
|
import java.time.temporal.ChronoUnit;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据出生日期算年龄
|
* 根据出生日期算年龄
|
||||||
@@ -15,7 +17,9 @@ public final class AgeCalculatorUtil {
|
|||||||
/**
|
/**
|
||||||
* 当前年龄取得(床位列表表示年龄用)
|
* 当前年龄取得(床位列表表示年龄用)
|
||||||
*/
|
*/
|
||||||
public static String getAge(LocalDateTime dateTime) {
|
public static String getAge(Date date) {
|
||||||
|
// 将 Date 转换为 LocalDateTime
|
||||||
|
LocalDateTime dateTime = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime();
|
||||||
LocalDateTime now = LocalDateTime.now();
|
LocalDateTime now = LocalDateTime.now();
|
||||||
int years = now.getYear() - dateTime.getYear();
|
int years = now.getYear() - dateTime.getYear();
|
||||||
if (years > 2) {
|
if (years > 2) {
|
||||||
@@ -78,5 +82,4 @@ public final class AgeCalculatorUtil {
|
|||||||
private static boolean isLeapYear(int year) {
|
private static boolean isLeapYear(int year) {
|
||||||
return (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0);
|
return (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package com.openhis.web.basedatamanage.appservice;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.openhis.web.basedatamanage.dto.OrganizationQueryDto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Organization 应该服务类
|
||||||
|
*/
|
||||||
|
public interface IOrganizationAppService {
|
||||||
|
// 查询机构树
|
||||||
|
Page<OrganizationQueryDto> getOrganizationTree(Integer pageNo, Integer pageSize);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
package com.openhis.web.basedatamanage.appservice.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.openhis.administration.domain.Organization;
|
||||||
|
import com.openhis.administration.service.IOrganizationService;
|
||||||
|
import com.openhis.web.basedatamanage.appservice.IOrganizationAppService;
|
||||||
|
import com.openhis.web.basedatamanage.dto.OrganizationQueryDto;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class IOrganizationAppServiceImpl implements IOrganizationAppService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
IOrganizationService organizationService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Page<OrganizationQueryDto> getOrganizationTree(Integer pageNo, Integer pageSize) {
|
||||||
|
// 查询机构列表
|
||||||
|
Page<Organization> page = organizationService.page(new Page<>(pageNo, pageSize));
|
||||||
|
List<Organization> organizationList = page.getRecords();
|
||||||
|
// 将机构列表转为树结构
|
||||||
|
List<OrganizationQueryDto> orgTree = buildTree(organizationList);
|
||||||
|
Page<OrganizationQueryDto> orgQueryDtoPage = new Page<>(pageNo, pageSize, page.getTotal());
|
||||||
|
orgQueryDtoPage.setRecords(orgTree);
|
||||||
|
return orgQueryDtoPage;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将机构列表转换为树结构
|
||||||
|
*
|
||||||
|
* @param records 机构列表
|
||||||
|
* @return tree
|
||||||
|
*/
|
||||||
|
private List<OrganizationQueryDto> buildTree(List<Organization> records) {
|
||||||
|
// 按b_no的层级排序,确保父节点先处理
|
||||||
|
List<Organization> sortedRecords = records.stream()
|
||||||
|
.sorted(Comparator.comparingInt(r -> r.getBusNo().split("\\.").length)).collect(Collectors.toList());
|
||||||
|
|
||||||
|
Map<String, OrganizationQueryDto> nodeMap = new HashMap<>();
|
||||||
|
List<OrganizationQueryDto> tree = new ArrayList<>();
|
||||||
|
|
||||||
|
for (Organization record : sortedRecords) {
|
||||||
|
String bNo = record.getBusNo();
|
||||||
|
String[] parts = bNo.split("\\.");
|
||||||
|
OrganizationQueryDto node = new OrganizationQueryDto();
|
||||||
|
BeanUtils.copyProperties(record, node);
|
||||||
|
// 将当前节点加入映射
|
||||||
|
nodeMap.put(bNo, node);
|
||||||
|
|
||||||
|
if (parts.length == 1) {
|
||||||
|
// 根节点
|
||||||
|
tree.add(node);
|
||||||
|
} else {
|
||||||
|
// 获取父节点的b_no(去掉最后一部分)
|
||||||
|
String parentBNo = String.join(".", Arrays.copyOf(parts, parts.length - 1));
|
||||||
|
OrganizationQueryDto parent = nodeMap.get(parentBNo);
|
||||||
|
|
||||||
|
if (parent != null) {
|
||||||
|
parent.getChildren().add(node);
|
||||||
|
} else {
|
||||||
|
// 处理父节点不存在的情况(例如数据缺失)
|
||||||
|
// 可根据需求调整为将节点加入根或抛出异常
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return tree;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -3,16 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.basedatamanage.controller;
|
package com.openhis.web.basedatamanage.controller;
|
||||||
|
|
||||||
import java.util.*;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
|
|
||||||
import org.springframework.beans.BeanUtils;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.core.common.core.domain.R;
|
import com.core.common.core.domain.R;
|
||||||
import com.core.common.utils.AssignSeqUtil;
|
import com.core.common.utils.AssignSeqUtil;
|
||||||
@@ -22,12 +12,18 @@ import com.openhis.administration.mapper.OrganizationMapper;
|
|||||||
import com.openhis.administration.service.IOrganizationService;
|
import com.openhis.administration.service.IOrganizationService;
|
||||||
import com.openhis.common.constant.PromptMsgConstant;
|
import com.openhis.common.constant.PromptMsgConstant;
|
||||||
import com.openhis.common.enums.OrganizationType;
|
import com.openhis.common.enums.OrganizationType;
|
||||||
import com.openhis.web.basedatamanage.dto.OrgQueryParam;
|
import com.openhis.web.basedatamanage.appservice.IOrganizationAppService;
|
||||||
import com.openhis.web.basedatamanage.dto.OrganizationInitDto;
|
import com.openhis.web.basedatamanage.dto.OrganizationInitDto;
|
||||||
import com.openhis.web.basedatamanage.dto.OrganizationQueryDto;
|
import com.openhis.web.basedatamanage.dto.OrganizationQueryDto;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 机构管理controller
|
* 机构管理controller
|
||||||
@@ -42,6 +38,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
public class OrganizationController {
|
public class OrganizationController {
|
||||||
|
|
||||||
private final IOrganizationService organizationService;
|
private final IOrganizationService organizationService;
|
||||||
|
private final IOrganizationAppService iOrganizationAppService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private OrganizationMapper organizationMapper;
|
private OrganizationMapper organizationMapper;
|
||||||
@@ -63,38 +60,17 @@ public class OrganizationController {
|
|||||||
/**
|
/**
|
||||||
* 机构分页列表
|
* 机构分页列表
|
||||||
*
|
*
|
||||||
* @param orgQueryParam 查询字段
|
* @param pageNo 当前页码
|
||||||
* @param searchKey 模糊查询关键字
|
|
||||||
* @param pageNo 当前页码
|
|
||||||
* @param pageSize 查询条数
|
* @param pageSize 查询条数
|
||||||
* @param request 请求数据
|
|
||||||
* @return 机构分页列表
|
* @return 机构分页列表
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/organization")
|
@GetMapping(value = "/organization")
|
||||||
public R<?> getOrganizationPage(OrgQueryParam orgQueryParam,
|
public R<?> getOrganizationPage(
|
||||||
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
Page<OrganizationQueryDto> organizationTree = iOrganizationAppService.getOrganizationTree(pageNo, pageSize);
|
||||||
|
return R.ok(organizationTree,
|
||||||
// // 构建查询条件
|
MessageUtils.createMessage(PromptMsgConstant.Common.M00009, new Object[]{"机构信息"}));
|
||||||
// QueryWrapper<Organization> queryWrapper = HisQueryUtils.buildQueryWrapper(orgQueryParam, searchKey,
|
|
||||||
// new HashSet<>(Arrays.asList("name", "py_str", "wb_str")), request);
|
|
||||||
//
|
|
||||||
// // 设置排序
|
|
||||||
// queryWrapper.orderByDesc("create_time");
|
|
||||||
// // 执行分页查询并转换为 orgQueryDtoPage
|
|
||||||
// Page<OrganizationQueryDto> orgQueryDtoPage =
|
|
||||||
// HisPageUtils.selectPage(organizationMapper, queryWrapper, pageNo, pageSize, OrganizationQueryDto.class);
|
|
||||||
// 查询机构列表
|
|
||||||
Page<Organization> page = organizationService.page(new Page<>(pageNo, pageSize));
|
|
||||||
List<Organization> organizationList = page.getRecords();
|
|
||||||
// 将机构列表转为树结构
|
|
||||||
List<OrganizationQueryDto> orgTree = buildTree(organizationList);
|
|
||||||
Page<OrganizationQueryDto> orgQueryDtoPage = new Page<>(pageNo, pageSize, page.getTotal());
|
|
||||||
orgQueryDtoPage.setRecords(orgTree);
|
|
||||||
|
|
||||||
return R.ok(orgQueryDtoPage,
|
|
||||||
MessageUtils.createMessage(PromptMsgConstant.Common.M00009, new Object[] {"机构信息"}));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -116,8 +92,8 @@ public class OrganizationController {
|
|||||||
boolean saveOrgSuccess = organizationService.save(organization);
|
boolean saveOrgSuccess = organizationService.save(organization);
|
||||||
|
|
||||||
return saveOrgSuccess
|
return saveOrgSuccess
|
||||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00001, new Object[] {"机构信息"}))
|
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00001, new Object[]{"机构信息"}))
|
||||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00003, new Object[] {"机构信息"}));
|
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00003, new Object[]{"机构信息"}));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -129,7 +105,7 @@ public class OrganizationController {
|
|||||||
public R<?> getOrganizationById(@Validated @RequestParam Long orgId) {
|
public R<?> getOrganizationById(@Validated @RequestParam Long orgId) {
|
||||||
|
|
||||||
Organization organization = organizationService.getById(orgId);
|
Organization organization = organizationService.getById(orgId);
|
||||||
return R.ok(organization, MessageUtils.createMessage(PromptMsgConstant.Common.M00009, new Object[] {"机构信息"}));
|
return R.ok(organization, MessageUtils.createMessage(PromptMsgConstant.Common.M00009, new Object[]{"机构信息"}));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -145,8 +121,8 @@ public class OrganizationController {
|
|||||||
|
|
||||||
boolean updateOrgSuccess = organizationService.updateById(organization);
|
boolean updateOrgSuccess = organizationService.updateById(organization);
|
||||||
return updateOrgSuccess
|
return updateOrgSuccess
|
||||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"机构信息"}))
|
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[]{"机构信息"}))
|
||||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, new Object[] {"机构信息"}));
|
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, new Object[]{"机构信息"}));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -166,8 +142,8 @@ public class OrganizationController {
|
|||||||
boolean deleteOrgSuccess = organizationService.removeByIds(orgIdList);
|
boolean deleteOrgSuccess = organizationService.removeByIds(orgIdList);
|
||||||
|
|
||||||
return deleteOrgSuccess
|
return deleteOrgSuccess
|
||||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00005, new Object[] {"机构信息"}))
|
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00005, new Object[]{"机构信息"}))
|
||||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00006, new Object[] {"机构信息"}));
|
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00006, new Object[]{"机构信息"}));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -181,8 +157,8 @@ public class OrganizationController {
|
|||||||
boolean activeSuccess = organizationService.activeChange(orgId);
|
boolean activeSuccess = organizationService.activeChange(orgId);
|
||||||
|
|
||||||
return activeSuccess
|
return activeSuccess
|
||||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[] {"启用"}))
|
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[]{"启用"}))
|
||||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, new Object[] {"启用"}));
|
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, new Object[]{"启用"}));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -196,49 +172,9 @@ public class OrganizationController {
|
|||||||
boolean inActiveSuccess = organizationService.activeChange(orgId);
|
boolean inActiveSuccess = organizationService.activeChange(orgId);
|
||||||
|
|
||||||
return inActiveSuccess
|
return inActiveSuccess
|
||||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[] {"停用"}))
|
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[]{"停用"}))
|
||||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, new Object[] {"停用"}));
|
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, new Object[]{"停用"}));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 将机构列表转换为树结构
|
|
||||||
*
|
|
||||||
* @param records 机构列表
|
|
||||||
* @return tree
|
|
||||||
*/
|
|
||||||
private List<OrganizationQueryDto> buildTree(List<Organization> records) {
|
|
||||||
// 按b_no的层级排序,确保父节点先处理
|
|
||||||
List<Organization> sortedRecords = records.stream()
|
|
||||||
.sorted(Comparator.comparingInt(r -> r.getBusNo().split("\\.").length)).collect(Collectors.toList());
|
|
||||||
|
|
||||||
Map<String, OrganizationQueryDto> nodeMap = new HashMap<>();
|
|
||||||
List<OrganizationQueryDto> tree = new ArrayList<>();
|
|
||||||
|
|
||||||
for (Organization record : sortedRecords) {
|
|
||||||
String bNo = record.getBusNo();
|
|
||||||
String[] parts = bNo.split("\\.");
|
|
||||||
OrganizationQueryDto node = new OrganizationQueryDto();
|
|
||||||
BeanUtils.copyProperties(record, node);
|
|
||||||
// 将当前节点加入映射
|
|
||||||
nodeMap.put(bNo, node);
|
|
||||||
|
|
||||||
if (parts.length == 1) {
|
|
||||||
// 根节点
|
|
||||||
tree.add(node);
|
|
||||||
} else {
|
|
||||||
// 获取父节点的b_no(去掉最后一部分)
|
|
||||||
String parentBNo = String.join(".", Arrays.copyOf(parts, parts.length - 1));
|
|
||||||
OrganizationQueryDto parent = nodeMap.get(parentBNo);
|
|
||||||
|
|
||||||
if (parent != null) {
|
|
||||||
parent.getChildren().add(node);
|
|
||||||
} else {
|
|
||||||
// 处理父节点不存在的情况(例如数据缺失)
|
|
||||||
// 可根据需求调整为将节点加入根或抛出异常
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return tree;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ import java.util.List;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
import com.openhis.common.enums.OrganizationClass;
|
import com.openhis.common.enums.OrganizationClass;
|
||||||
import com.openhis.common.enums.OrganizationType;
|
import com.openhis.common.enums.OrganizationType;
|
||||||
|
|
||||||
@@ -24,6 +26,7 @@ public class OrganizationQueryDto {
|
|||||||
|
|
||||||
/** ID */
|
/** ID */
|
||||||
@TableId(type = IdType.ASSIGN_ID)
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/** 编码 */
|
/** 编码 */
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ public class HealthcareServiceDto {
|
|||||||
* 提供部门ID
|
* 提供部门ID
|
||||||
*/
|
*/
|
||||||
@Dict(dictTable = "adm_organization",dictCode = "id",dictText = "name")
|
@Dict(dictTable = "adm_organization",dictCode = "id",dictText = "name")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long offeredOrgId;
|
private Long offeredOrgId;
|
||||||
private String offeredOrgId_dictText;
|
private String offeredOrgId_dictText;
|
||||||
|
|
||||||
@@ -58,6 +59,7 @@ public class HealthcareServiceDto {
|
|||||||
* 地点
|
* 地点
|
||||||
*/
|
*/
|
||||||
@Dict(dictTable = "adm_location",dictCode = "id",dictText = "name")
|
@Dict(dictTable = "adm_location",dictCode = "id",dictText = "name")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long locationId;
|
private Long locationId;
|
||||||
private String locationId_dictText;
|
private String locationId_dictText;
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.openhis.web.outpatientservice.controller.appservice.impl;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.core.common.utils.AgeCalculatorUtil;
|
||||||
import com.openhis.administration.domain.Patient;
|
import com.openhis.administration.domain.Patient;
|
||||||
import com.openhis.administration.mapper.PatientMapper;
|
import com.openhis.administration.mapper.PatientMapper;
|
||||||
import com.openhis.common.enums.AdministrativeGender;
|
import com.openhis.common.enums.AdministrativeGender;
|
||||||
@@ -49,6 +50,8 @@ public class IOutpatientRegistrationServiceImpl implements IOutpatientRegistrati
|
|||||||
patientMetadataPage.getRecords().forEach(e -> {
|
patientMetadataPage.getRecords().forEach(e -> {
|
||||||
// 性别枚举
|
// 性别枚举
|
||||||
e.setGenderEnum_enumText(EnumUtils.getInfoByValue(AdministrativeGender.class, e.getGenderEnum()));
|
e.setGenderEnum_enumText(EnumUtils.getInfoByValue(AdministrativeGender.class, e.getGenderEnum()));
|
||||||
|
// 计算年龄
|
||||||
|
e.setAge(AgeCalculatorUtil.getAge(e.getBirthDate()));
|
||||||
});
|
});
|
||||||
return patientMetadataPage;
|
return patientMetadataPage;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
package com.openhis.web.outpatientservice.dto;
|
package com.openhis.web.outpatientservice.dto;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 患者信息 元数据
|
* 患者信息 元数据
|
||||||
*/
|
*/
|
||||||
@@ -12,6 +16,7 @@ public class PatientMetadata {
|
|||||||
/**
|
/**
|
||||||
* ID
|
* ID
|
||||||
*/
|
*/
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -25,4 +30,25 @@ public class PatientMetadata {
|
|||||||
private Integer genderEnum;
|
private Integer genderEnum;
|
||||||
private String genderEnum_enumText;
|
private String genderEnum_enumText;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 身份证号
|
||||||
|
*/
|
||||||
|
private String idCard;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电话
|
||||||
|
*/
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生日
|
||||||
|
*/
|
||||||
|
|
||||||
|
private Date birthDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 年龄
|
||||||
|
*/
|
||||||
|
private String age;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user