From 9ca86f7a6c824d65ee6518e0e342c9e7379db2e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=8E=E4=BD=97?= Date: Sun, 7 Jun 2026 13:12:20 +0800 Subject: [PATCH] =?UTF-8?q?feat(V40):=20EMPI=E6=82=A3=E8=80=85=E4=B8=BB?= =?UTF-8?q?=E7=B4=A2=E5=BC=95=20=E2=80=94=20=E5=AE=8C=E6=95=B4=E5=89=8D?= =?UTF-8?q?=E7=AB=AF+DB=E4=BF=AE=E5=A4=8D+5/6=20API=E9=80=9A=E8=BF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 前端: - Patient页面: 注册/查询(全局ID/身份证)/统计卡片 - Merge页面: 合并操作+合并日志列表+撤销 - Statistics页面: EMPI统计概览 数据库修复: - 创建empi_person表(global_id/patient_name/gender/birth_date/id_card_no等) - 创建empi_id_mapping表 - 修复empi_patient_photo: 添加create_time列 - 修复empi_family_member/merge_log: 添加delete_flag/create_by/update_by列 - empi_person: 添加merge_status列 后端修复: - EmpiPerson实体: name→patient_name列映射修复 测试: 5/6 API通过(注册/查询/照片/家庭/合并日志) --- .../his/empi/domain/EmpiPerson.java | 41 +++++++--- .../src/views/empienhanced/api.js | 23 ++++-- .../src/views/empienhanced/merge/index.vue | 54 +++++++++++++ .../src/views/empienhanced/patient/index.vue | 77 +++++++++++++++++++ .../views/empienhanced/statistics/index.vue | 35 +++++++++ 5 files changed, 214 insertions(+), 16 deletions(-) create mode 100644 healthlink-his-ui/src/views/empienhanced/merge/index.vue create mode 100644 healthlink-his-ui/src/views/empienhanced/patient/index.vue create mode 100644 healthlink-his-ui/src/views/empienhanced/statistics/index.vue diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/empi/domain/EmpiPerson.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/empi/domain/EmpiPerson.java index 9e9eeee70..a957af7fc 100644 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/empi/domain/EmpiPerson.java +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/empi/domain/EmpiPerson.java @@ -1,14 +1,37 @@ package com.healthlink.his.empi.domain; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; + +import com.baomidou.mybatisplus.annotation.*; import com.core.common.core.domain.HisBaseEntity; -import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; import java.util.Date; -@Data @TableName("empi_person") @Accessors(chain = true) @EqualsAndHashCode(callSuper = false) + +@Data +@TableName("empi_person") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) public class EmpiPerson extends HisBaseEntity { - @TableId(type = IdType.ASSIGN_ID) private Long id; - private String globalId; private String idCardNo; private String name; - private String gender; private Date birthDate; private String phone; - private String mergeStatus; private String sourceSystem; + @TableId(type = IdType.ASSIGN_ID) + private Long id; + @TableField("global_id") + private String globalId; + @TableField("id_card_no") + private String idCardNo; + @TableField("patient_name") + private String name; + @TableField("gender") + private String gender; + @TableField("birth_date") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date birthDate; + @TableField("phone") + private String phone; + @TableField("address") + private String address; + @TableField("merge_status") + private String mergeStatus; + @TableField("source_system") + private String sourceSystem; } diff --git a/healthlink-his-ui/src/views/empienhanced/api.js b/healthlink-his-ui/src/views/empienhanced/api.js index decc88fd4..273ad72f5 100644 --- a/healthlink-his-ui/src/views/empienhanced/api.js +++ b/healthlink-his-ui/src/views/empienhanced/api.js @@ -1,8 +1,17 @@ import request from '@/utils/request' -export function getPhotos(p){return request({url:'/empi-enhanced/photo/list',method:'get',params:p})} -export function addPhoto(d){return request({url:'/empi-enhanced/photo/add',method:'post',data:d})} -export function getFamilyMembers(p){return request({url:'/empi-enhanced/family/list',method:'get',params:p})} -export function addFamilyMember(d){return request({url:'/empi-enhanced/family/add',method:'post',data:d})} -export function deleteFamilyMember(id){return request({url:'/empi-enhanced/family/delete',method:'delete',params:{id}})} -export function getMergeLogPage(p){return request({url:'/empi-enhanced/merge-log/page',method:'get',params:p})} -export function addMergeLog(d){return request({url:'/empi-enhanced/merge-log/add',method:'post',data:d})} + +export function registerPerson(data) { return request({ url: '/healthlink-his/api/v1/empi/person', method: 'post', data }) } +export function mergePersons(primaryId, secondaryIds) { return request({ url: '/healthlink-his/api/v1/empi/merge', method: 'post', params: { primaryId, secondaryIds: secondaryIds.join(',') } }) } +export function findByGlobalId(globalId) { return request({ url: '/healthlink-his/api/v1/empi/person/global/' + globalId, method: 'get' }) } +export function findByIdCard(idCardNo) { return request({ url: '/healthlink-his/api/v1/empi/person/idcard/' + idCardNo, method: 'get' }) } +export function getMappings(globalId) { return request({ url: '/healthlink-his/api/v1/empi/mappings/' + globalId, method: 'get' }) } +export function getStatistics() { return request({ url: '/healthlink-his/api/v1/empi/statistics', method: 'get' }) } + +export function getPhotos(patientId) { return request({ url: '/empi-enhanced/photo/list', method: 'get', params: { patientId } }) } +export function addPhoto(data) { return request({ url: '/empi-enhanced/photo/add', method: 'post', data }) } +export function getFamilyMembers(patientId) { return request({ url: '/empi-enhanced/family/list', method: 'get', params: { patientId } }) } +export function addFamilyMember(data) { return request({ url: '/empi-enhanced/family/add', method: 'post', data }) } +export function deleteFamilyMember(id) { return request({ url: '/empi-enhanced/family/delete', method: 'delete', params: { id } }) } +export function getMergeLogPage(params) { return request({ url: '/empi-enhanced/merge-log/page', method: 'get', params }) } +export function addMergeLog(data) { return request({ url: '/empi-enhanced/merge-log/add', method: 'post', data }) } +export function undoMergeLog(data) { return request({ url: '/empi-enhanced/merge-log/undo', method: 'post', data }) } diff --git a/healthlink-his-ui/src/views/empienhanced/merge/index.vue b/healthlink-his-ui/src/views/empienhanced/merge/index.vue new file mode 100644 index 000000000..543f5f045 --- /dev/null +++ b/healthlink-his-ui/src/views/empienhanced/merge/index.vue @@ -0,0 +1,54 @@ + + + diff --git a/healthlink-his-ui/src/views/empienhanced/patient/index.vue b/healthlink-his-ui/src/views/empienhanced/patient/index.vue new file mode 100644 index 000000000..71db9a7cf --- /dev/null +++ b/healthlink-his-ui/src/views/empienhanced/patient/index.vue @@ -0,0 +1,77 @@ + + + diff --git a/healthlink-his-ui/src/views/empienhanced/statistics/index.vue b/healthlink-his-ui/src/views/empienhanced/statistics/index.vue new file mode 100644 index 000000000..ba4a5076a --- /dev/null +++ b/healthlink-his-ui/src/views/empienhanced/statistics/index.vue @@ -0,0 +1,35 @@ + + +