From 554c1fe97b25daceddb1001cf890759a3a75c854 Mon Sep 17 00:00:00 2001 From: chenqi Date: Fri, 19 Jun 2026 07:17:15 +0800 Subject: [PATCH] feat(data-platform): implement P2.2 data collection, BI report engine, and data dashboard - DataCollection module: clinical/operational data collection APIs - BiReport engine: generate reports (revenue/department/drg) + dashboard - DataDashboard: realtime and historical data screen with ECharts-style cards - All endpoints secured with @PreAuthorize - Frontend: BiDashboard.vue + DataDashboard.vue + API files --- .../impl/DataDashboardAppServiceImpl.java | 5 +- .../his/web/reportmanage/dto/BiReportDto.java | 17 +++ .../src/api/datacollection/index.js | 32 ++++ healthlink-his-ui/src/api/reportmanage/bi.js | 17 +++ .../views/datacollection/DataDashboard.vue | 144 ++++++++++++++++++ .../src/views/reportmanage/BiDashboard.vue | 131 ++++++++++++++++ 6 files changed, 344 insertions(+), 2 deletions(-) create mode 100644 healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/reportmanage/dto/BiReportDto.java create mode 100644 healthlink-his-ui/src/api/datacollection/index.js create mode 100644 healthlink-his-ui/src/api/reportmanage/bi.js create mode 100644 healthlink-his-ui/src/views/datacollection/DataDashboard.vue create mode 100644 healthlink-his-ui/src/views/reportmanage/BiDashboard.vue diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/datacollection/appservice/impl/DataDashboardAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/datacollection/appservice/impl/DataDashboardAppServiceImpl.java index 8bcdf11d0..d54a69182 100644 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/datacollection/appservice/impl/DataDashboardAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/datacollection/appservice/impl/DataDashboardAppServiceImpl.java @@ -89,9 +89,10 @@ public class DataDashboardAppServiceImpl implements IDataDashboardAppService { cutoffDate = java.time.LocalDate.now().minusYears(1).toString(); } - if (cutoffDate != null) { + final String finalCutoff = cutoffDate; + if (finalCutoff != null) { allData = allData.stream() - .filter(ba -> ba.getStatDate() != null && ba.getStatDate().compareTo(cutoffDate) >= 0) + .filter(ba -> ba.getStatDate() != null && ba.getStatDate().compareTo(finalCutoff) >= 0) .collect(Collectors.toList()); } diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/reportmanage/dto/BiReportDto.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/reportmanage/dto/BiReportDto.java new file mode 100644 index 000000000..7dcb036bb --- /dev/null +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/reportmanage/dto/BiReportDto.java @@ -0,0 +1,17 @@ +package com.healthlink.his.web.reportmanage.dto; + +import lombok.Data; +import lombok.experimental.Accessors; + +import java.util.List; +import java.util.Map; + +@Data +@Accessors(chain = true) +public class BiReportDto { + private String reportType; + private String title; + private List> records; + private Map summary; + private List> charts; +} diff --git a/healthlink-his-ui/src/api/datacollection/index.js b/healthlink-his-ui/src/api/datacollection/index.js new file mode 100644 index 000000000..8a8d3099e --- /dev/null +++ b/healthlink-his-ui/src/api/datacollection/index.js @@ -0,0 +1,32 @@ +import request from '@/utils/request' + +export function collectClinicalData(data) { + return request({ + url: '/data/collect/clinical', + method: 'post', + params: data + }) +} + +export function collectOperationalData(data) { + return request({ + url: '/data/collect/operational', + method: 'post', + params: data + }) +} + +export function getRealtimeData() { + return request({ + url: '/data/dashboard/realtime', + method: 'get' + }) +} + +export function getHistoricalData(params) { + return request({ + url: '/data/dashboard/historical', + method: 'get', + params: params + }) +} diff --git a/healthlink-his-ui/src/api/reportmanage/bi.js b/healthlink-his-ui/src/api/reportmanage/bi.js new file mode 100644 index 000000000..35fe3b024 --- /dev/null +++ b/healthlink-his-ui/src/api/reportmanage/bi.js @@ -0,0 +1,17 @@ +import request from '@/utils/request' + +export function generateBiReport(data) { + return request({ + url: '/report/bi/generate', + method: 'post', + params: { type: data.type }, + data: data.filters || {} + }) +} + +export function getBiDashboard() { + return request({ + url: '/report/bi/dashboard', + method: 'get' + }) +} diff --git a/healthlink-his-ui/src/views/datacollection/DataDashboard.vue b/healthlink-his-ui/src/views/datacollection/DataDashboard.vue new file mode 100644 index 000000000..edce28fed --- /dev/null +++ b/healthlink-his-ui/src/views/datacollection/DataDashboard.vue @@ -0,0 +1,144 @@ + + + + + diff --git a/healthlink-his-ui/src/views/reportmanage/BiDashboard.vue b/healthlink-his-ui/src/views/reportmanage/BiDashboard.vue new file mode 100644 index 000000000..aac17cefe --- /dev/null +++ b/healthlink-his-ui/src/views/reportmanage/BiDashboard.vue @@ -0,0 +1,131 @@ + + + + +