Dynamic report generation method and device based on medical data, equipment and medium
By generating multimodal data through dynamic weighted aggregation algorithms and cross-dimensional correlation engines, the problem of lag in traditional medical data report analysis methods has been solved. This enables the automatic generation and synchronous early warning of multi-dimensional linked reports, improving the efficiency of hospital operational decision-making and the refinement of inventory management.
Patent Information
- Application Number
- CN202511262596.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-05
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2045-09-05
AI Technical Summary
Traditional medical data reporting and analysis methods cannot dynamically adjust the importance of data dimensions according to different time granularities, resulting in delayed or distorted analysis results. This makes it difficult to meet the dynamic analysis needs of different time periods, departments, and business scenarios. Furthermore, single-dimensional data analysis cannot meet the needs of refined management and cross-dimensional correlation insights.
By acquiring user interaction commands and report configuration information, the system allocates weights for registration data, fee data, and drug inventory dimensions based on a dynamic weighted aggregation algorithm. It then uses a cross-dimensional association engine to generate multimodal data and generates risk labeling data based on the warning level, ultimately generating a dynamically adjusted target report.
It enables the automatic generation and synchronized early warning of multi-dimensional linked reports, improving the efficiency of hospital operation decision-making, reducing inventory management risks, and providing real-time and refined operation support.
Smart Images

Figure CN120806830A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of report processing, and in particular to a dynamic report generation method and device based on medical data, equipment and medium. BACKGROUND
[0002] The traditional medical data report analysis method mostly adopts a static report or a fixed dimension statistical method, mostly uses fixed analysis dimensions and weight settings, and cannot dynamically adjust the importance of each data dimension according to different time granularities (such as hours, days, weeks, and months), resulting in lagging or distorted analysis results, and difficulty in adapting to dynamic analysis requirements in different time periods, different departments, and different business scenarios. In addition, in the face of complex and variable medical service processes, single-dimensional data analysis cannot meet the needs of fine management and cross-dimensional correlation insight. Therefore, there is an urgent need for a dynamic report generation method to dynamically generate multi-dimensional linked reports and simultaneously complete inventory warning. SUMMARY
[0003] The main purpose of the present application is to provide a dynamic report generation method based on medical data, device and medium, aiming to solve the technical problem of how to dynamically generate multi-dimensional linked reports and simultaneously complete inventory warning.
[0004] To achieve the above-mentioned purpose, the present application provides a dynamic report generation method based on medical data, comprising: obtaining a user interaction instruction and report configuration information, wherein the report configuration information includes time granularity, data dimension set and warning level, the time granularity includes hour granularity, day granularity, week granularity and month granularity, and the data dimension includes registration data dimension, charging data dimension and drug inventory dimension; distributing weights to the registration data dimension, the charging data dimension and the drug inventory dimension in the data dimension according to the time granularity based on a dynamic weighted aggregation algorithm, to obtain corresponding dynamic weights; inputting the report configuration information combined with the dynamic weights into a cross-dimensional correlation engine to generate multi-modal data, wherein the multi-modal data includes registration volume data, revenue data and inventory consumption data, and the cross-dimensional correlation engine is constructed based on the registration data dimension, the charging data dimension and the drug inventory dimension; determining the multi-modal data according to the warning level to obtain a determination result; when the determination result is that the inventory consumption data in the multi-modal data exceeds a preset threshold corresponding to the warning level, generating risk marker data; generating an initial report based on the risk marker data and the multi-modal data; adjusting the initial report according to the user interaction instruction to obtain a target report.
[0005] In an embodiment, the step of assigning weights to a registration data dimension, a fee data dimension, and a drug inventory dimension in the data dimension according to the time granularity based on a dynamic weighting aggregation algorithm to obtain corresponding dynamic weights comprises: obtaining a department business priority based on the registration data dimension; obtaining a charge item type based on the fee data dimension; obtaining drug expiration data based on the drug inventory dimension; determining an initial first weight coefficient, an initial second weight coefficient, and an initial third weight coefficient based on the data dimension according to the time granularity, wherein the registration data dimension corresponds to the initial first weight coefficient, the fee data dimension corresponds to the initial second weight coefficient, and the drug inventory dimension corresponds to the initial third weight coefficient; dynamically adjusting the initial first weight coefficient based on the department business priority to obtain a first weight coefficient; grading correcting the initial second weight coefficient according to the charge item type to obtain a second weight coefficient; combining the initial third weight coefficient with the drug expiration data to obtain a third weight coefficient; taking the first weight coefficient, the second weight coefficient, and the third weight coefficient as the dynamic weights.
[0006] In an embodiment, the step of inputting the report configuration information combined with the dynamic weights into a cross-dimension association engine to generate multi-modal data, wherein the multi-modal data includes registration volume data, revenue data, and inventory consumption data, before the step of constructing the cross-dimension association engine based on a registration data dimension, a charge data dimension, and a drug inventory dimension comprises: constructing a time series analysis model based on the registration data dimension; constructing a department-charge item association matrix according to the charge data dimension; combining the drug inventory dimension and the registration data dimension to calculate the department consumption association degree of each drug based on a graph neural network to construct an inventory consumption network graph, wherein the network nodes of the inventory consumption graph represent drug inventory states, and the edge weights represent consumption rates; combining the time series analysis model, the department-charge item association matrix, and the inventory consumption network graph to obtain the cross-dimension association engine.
[0007] In an embodiment, the step of inputting the report configuration information combined with the dynamic weights into a cross-dimension association engine to generate multi-modal data comprises: Inputting the report configuration information into a time series analysis model of a cross-dimensional correlation engine to generate registration volume data; Input the report configuration information into the department-charge item association matrix of the cross-dimensional association engine and calculate it through a hierarchical clustering algorithm to obtain revenue data; Inputting the report configuration information into the inventory consumption network diagram of the cross-dimensional correlation engine for calculation to obtain inventory consumption data; Performing spatiotemporal alignment and normalization processing on the registration volume data, the revenue data, and the inventory consumption data based on the dynamic weight to obtain initial multimodal data; Metadata tags are added to the initial multimodal data to obtain multimodal data, where the metadata tags include data type, generation time, and weight distribution information.
[0008] In one embodiment, when the judgment result is that the inventory consumption data in the multimodal data exceeds a preset threshold corresponding to the warning level, the step of generating risk marker data includes: obtaining a level identifier and a corresponding threshold table based on the warning level, wherein the threshold table includes a first threshold, a second threshold, and a third threshold, the first threshold being smaller than the second threshold, and the second threshold being smaller than the third threshold; Obtaining a current consumption ratio based on inventory consumption data in the multimodal data; Determine a current warning level according to the current consumption ratio; Retrieving a target threshold in the threshold table according to the current warning level to obtain a matching threshold; When the current consumption ratio is greater than the matching threshold, an over-limit flag is recorded; An event number is generated according to the over-limit flag, and the event number, the current consumption ratio, the matching threshold and the level identifier are combined into risk marking data.
[0009] In one embodiment, the step of generating an initial report based on the risk marker data and the multimodal data includes: Sorting the multimodal data according to time granularity to obtain a time series data sequence; Time-aligning the risk marker data with the time series data sequence to obtain a marked data set; generating a first chart based on the data set, wherein the first chart is used to display a trend of changes in the number of registered patients over time; generating a second chart based on the data set, the second chart being used to display the cumulative distribution of revenue data; generating a third chart based on the data set, the third chart being used to display inventory consumption data and highlighting a time period with the risk-marked data; The first chart, the second chart, and the third chart are spliced together according to preset layout rules to obtain an initial report.
[0010] In one embodiment, the step of adjusting the initial report according to the user interaction instruction to obtain a target report includes: Parsing the user interaction instruction to extract the adjustment type and adjustment parameters, wherein the adjustment type includes chart style adjustment, time range adjustment, and dimension increase or decrease adjustment; If the adjustment type is chart style adjustment, then replacing the chart in the initial report according to the adjustment parameters to obtain a style-updated chart; If the adjustment type is a time range adjustment, re-filtering the multimodal data in the initial report according to the adjustment parameters to obtain re-filtered data; If the adjustment type is dimension increase or decrease adjustment, then adding or removing a specified dimension to the multimodal data in the initial report according to the adjustment parameter to obtain dimension adjustment data; Remapping the style-updated chart, the re-filtered data, or the dimension-adjusted data to the report layout of the initial report to obtain an intermediate report; The intermediate report is rendered and cached to obtain a target report.
[0011] In addition, to achieve the above-mentioned purpose, the present application also proposes a dynamic report generation device based on medical data, the dynamic report generation device based on medical data comprising: A data collection module is used to obtain user interaction instructions and report configuration information, wherein the report configuration information includes time granularity, data dimension set, and warning level. The time granularity includes hourly granularity, daily granularity, weekly granularity, and monthly granularity. The data dimension includes registration data dimension, fee data dimension, and drug inventory dimension. an allocation module, configured to allocate weights to the registration data dimension, the expense data dimension, and the drug inventory dimension in the data dimensions according to the time granularity based on a dynamic weighted aggregation algorithm to obtain corresponding dynamic weights; a data generation module, configured to input the report configuration information into a cross-dimensional association engine in combination with the dynamic weight to generate multimodal data, wherein the multimodal data includes registration volume data, revenue data, and inventory consumption data, and the cross-dimensional association engine is constructed based on the registration data dimension, the billing data dimension, and the drug inventory dimension; A judgment module, configured to judge the multimodal data according to the warning level to obtain a judgment result; The execution module is configured to generate risk marking data when the determination result is that the inventory consumption data in the multi-modal data exceeds the preset threshold of the corresponding early warning level. The construction module is configured to generate an initial report based on the risk marking data and the multi-modal data. The result module is configured to adjust the initial report according to the user interaction instruction to obtain a target report.
[0012] In addition, to achieve the above-mentioned purpose, the present application also provides a storage medium, which is a computer readable storage medium, and a computer program is stored on the storage medium. The computer program is executed by a processor to implement the steps of the dynamic report generation method based on medical data as described above.
[0013] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program. The computer program is executed by a processor to implement the steps of the dynamic report generation method based on medical data as described above.
[0014] The present application obtains user interaction instructions and report configuration information, assigns weights to the registration data dimension, the fee data dimension and the drug inventory dimension in the data dimension according to the time granularity based on a dynamic weighted aggregation algorithm, obtains corresponding dynamic weights, inputs the report configuration information and the dynamic weights into a cross-dimension association engine, generates multi-modal data, determines the multi-modal data according to the early warning level, obtains a determination result, generates risk marking data when the determination result is that the inventory consumption data in the multi-modal data exceeds the preset threshold of the corresponding early warning level, generates an initial report based on the risk marking data and the multi-modal data, adjusts the initial report according to the user interaction instruction, and obtains a target report. By using the dynamic weights and the cross-dimension association engine, the user configuration instruction can real-time aggregate registration, charging and inventory data, instantly mark inventory risks according to the early warning level, and embed report information in the report to dynamically obtain report information, realize multi-dimensional linkage report automatic generation and synchronous early warning, improve hospital operation decision-making efficiency, and reduce inventory management risks. BRIEF DESCRIPTION OF DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiment or prior art description will be briefly introduced below. Obviously, for those skilled in the art, other drawings can also be obtained without creative labor based on these drawings.
[0016] Figure 1 The flowchart of the first embodiment of the dynamic report generation method based on medical data of the present application; Figure 2Flowchart of the second embodiment of the method for generating dynamic report based on medical data of the present application; Figure 3 Flowchart of the third embodiment of the method for generating dynamic report based on medical data of the present application; Figure 4 Module structure diagram of the dynamic report generating device based on medical data of the first embodiment of the method for generating dynamic report based on medical data of the present application; Figure 5 Device structure diagram of the hardware running environment involved in the method for generating dynamic report based on medical data of the embodiments of the present application.
[0017] The object implementation, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION
[0018] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application, and are not used to limit the present application.
[0019] In order to better understand the technical solutions of the present application, the specific embodiments will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0020] With the continuous advancement of medical informatization construction, the real-time monitoring demand of hospital on outpatient operation state is increasing. The traditional medical data report analysis method mostly adopts static report or fixed dimension statistics method, mostly uses fixed analysis dimension and weight setting, and cannot dynamically adjust the importance of each data dimension according to different time granularity (such as hour, day, week, month), which leads to lagging or distorted analysis results, and it is difficult to adapt to the dynamic analysis demand of different time periods, different departments and different business scenarios. In addition, facing the complex and changeable medical service process, single dimension data analysis cannot meet the demand of fine management and cross-dimension correlation insight. If the manager still relies on the traditional fixed-time batch running, static weight and dimension split report system, he cannot realize real-time insight into the chain risk of "registration surge-charge rise-inventory shortage".
[0021] Therefore, the application provides a dynamic report generation method based on medical data to solve the above problems. The main solution of the embodiment of the application is: by obtaining a user interaction instruction and report configuration information, based on a dynamic weighted aggregation algorithm, weights are assigned to the registration data dimension, the fee data dimension and the drug inventory dimension in the data dimension according to the time granularity, the corresponding dynamic weights are obtained, the report configuration information is combined with the dynamic weights to input a cross-dimension association engine, multi-modal data is generated, the multi-modal data is judged according to the warning level, and a judgment result is obtained. When the judgment result is that the inventory consumption data in the multi-modal data exceeds the preset threshold of the corresponding warning level, risk marker data is generated, an initial report is generated based on the risk marker data and the multi-modal data, the initial report is adjusted according to the user interaction instruction, and a target report is obtained.
[0022] Based on the above, the embodiment of the application further provides a dynamic report generation method based on medical data, which refers to Figure 1 , Figure 1 The flowchart of the first embodiment of the dynamic report generation method based on medical data of the application is shown. In this embodiment, the dynamic report generation method based on medical data includes steps S10-S70: Step S10, obtaining a user interaction instruction and report configuration information.
[0023] It should be noted that the operation instruction of the user is received through a graphical interface or an API interface, including but not limited to query time range, attention business module, visual style preference, etc., and preset report configuration information is obtained. The report configuration information includes time granularity, data dimension set and warning level. The time granularity is used to define the time unit of data aggregation, and the time granularity includes hourly granularity, daily granularity, weekly granularity and monthly granularity, to adapt to the trend analysis and periodic judgment requirements in different business scenarios. The data dimension includes the registration data dimension, the fee data dimension and the drug inventory dimension, which correspond to the hospital outpatient operation, the financial income and expenditure status and the material management situation respectively, and the three together constitute the core index system of hospital operation; the warning level is used to set the sensitivity level of risk identification, which is usually divided into low, medium and high three grades, corresponding to different threshold standards and response strategies.
[0024] Step S20, based on a dynamic weighted aggregation algorithm, weights are assigned to the registration data dimension, the fee data dimension and the drug inventory dimension in the data dimension according to the time granularity, and the corresponding dynamic weights are obtained.
[0025] It should be noted that the process does not use fixed weights, but dynamically adjusts the contribution proportion of each dimension data in the overall analysis according to the different time granularities (such as hour level, day level, week level or month level) and the importance changes of each dimension data in the specific business scenario. Specifically, at a high-frequency time granularity (such as by hour), more attention is paid to the real-time operation state, so the weight of the registration data dimension is appropriately increased to reflect the fluctuation of the outpatient flow; at a low-frequency granularity (such as by month), the cost data and the drug inventory data may assume a more important analysis role for evaluating the overall revenue status and the material reserve level of the hospital. In addition, the dynamically weighted aggregation algorithm also combines auxiliary information such as department business priority, charge item type and drug expiration date to adaptively correct the initial weight. For example, the registration data of the emergency department has a higher priority than that of the general outpatient department, the cost data should be given a greater weight in financial analysis, and the drug inventory data near the expiration date needs to have a higher sensitivity in the early warning module.
[0026] Further, step S20 further comprises obtaining department business priority based on registration data dimension, obtaining charge item type based on fee data dimension, and obtaining drug expiration data based on drug inventory dimension. Specifically, the registration data dimension covers information such as registration department, registration doctor, registration type (such as general number, expert number), registration time, etc. Through the analysis of these data, the system can calculate the business busy degree of each department, so as to obtain the department business priority. For example, the registration volume of emergency department increases sharply in a short time, indicating that its business priority is high; and the registration volume of some special departments significantly increases in a certain time period (such as holidays), which also increases its priority. The fee data dimension includes charge item name, charge amount, charge time, etc. Through the classification and analysis of the charge items, the system can identify different types of charge items, such as examination fee, treatment fee, drug fee, etc. These item types reflect the income structure and business focus of the hospital. In addition, the drug inventory dimension involves information such as drug name, inventory quantity, expiration date, storage time, etc. Through the analysis of these data, the expiration data of the drug, i.e. the effective period and inventory turnover of the drug, can be obtained. For example, the consumption rate of near-expiration drugs needs to be focused on to avoid waste due to expiration. Then, based on the data dimensions, the initial first weight coefficient, the initial second weight coefficient and the initial third weight coefficient are determined according to the time granularity, wherein the registration data dimension corresponds to the initial first weight coefficient, the fee data dimension corresponds to the initial second weight coefficient, and the drug inventory dimension corresponds to the initial third weight coefficient. Specifically, the selection of time granularity (such as hour, day, week, month) is crucial to the weight distribution. The system assigns initial weight coefficients to the registration data dimension, the fee data dimension and the drug inventory dimension according to the coarseness of the time granularity. For example, for the hour granularity, the real-time performance of the registration data is stronger, so the initial weight coefficient is higher; while for the month granularity, the cumulative effect of the fee data is more significant, and the initial weight is adjusted accordingly. Then, the initial first weight coefficient is dynamically adjusted based on the department business priority to obtain the first weight coefficient. Specifically, combined with the current time granularity (such as hour level or day level) and the business fluctuation, the sliding window algorithm is used to dynamically adjust the initial first weight coefficient to obtain the first weight coefficient, and the specific formula is: wherein, represents the initial first weight coefficient, is an adjustment factor, represents a time series fluctuation function. The initial second weight coefficient is graded corrected according to the charge item type to obtain the second weight coefficient, specifically, the charge items are divided into basic service class (such as registration fee), high-value consumables class (such as surgical materials) and medical insurance reimbursement class, etc., different correction coefficient functions are set for different charge item types, and the initial second weight coefficient is graded corrected accordingly, which is specifically represented as: wherein denotes the initial second weight coefficient, denotes the correction coefficient function of the charge item type for the initial third weight coefficient. The initial third weight coefficient is compensated for timeliness in combination with the drug expiration date data to obtain a third weight coefficient. Specifically, according to the remaining validity period of the drug, the initial third weight coefficient is compensated for timeliness using an exponential decay function to ensure that drugs approaching the expiration date obtain higher sensitivity in the early warning module. Specifically, it is expressed as: wherein, is the drug expiration time, is the current time, is the decay coefficient. Finally, the first weight coefficient, the second weight coefficient and the third weight coefficient are used as dynamic weights for subsequent cross-dimension association modeling and multi-modal data fusion analysis, improving the accuracy and practicality of the report results.
[0027] Step S30, inputting the report configuration information combined with the dynamic weight into the cross-dimension association engine to generate multi-modal data.
[0028] It should be noted that the cross-dimensional association engine is built based on the dimensions of registration data, billing data, and drug inventory, and features multi-source data fusion, dynamic weighted modeling, and cross-modal reasoning. Specifically, a time series analysis model is constructed based on the registration data dimension. Information such as the number of patients and appointment ratios by department and time period is extracted from historical registration records. Using classic time series modeling methods such as ARIMA, LSTM, or Prophet, outpatient volume forecasting models are established at different time granularities (hourly, daily, and weekly). This model not only generates registration volume data for the current time period but also assists in identifying peak periods and abnormal fluctuations, providing a basis for subsequent resource scheduling. Secondly, a department-charge item association matrix is constructed based on the billing data dimension. Specifically, the relationship between each hospital department and its corresponding charge items (such as examination fees, treatment fees, and drug fees) is represented in matrix form. The rows of the matrix represent the department, the columns represent the charge items, and the element values indicate the business share or monetary contribution of a department to a particular charge item. Using methods such as hierarchical clustering or principal component analysis (PCA), we can further explore financial similarities and differences between departments, which can be used for classification statistics and trend analysis of revenue data. Next, we combine the drug inventory dimension and the registration data dimension to calculate the departmental consumption correlation of each drug, constructing an inventory consumption network graph. The nodes of the inventory consumption graph represent drug inventory status (e.g., inventory quantity, expiration date), the edges represent the drug flow between departments, and the edge weights represent the consumption rate. Using a graph convolutional network (GCN), we can learn drug usage patterns across departments and identify high-frequency consumption drugs and potential shortage risk points. Finally, we combine the time series analysis model, the department-charge item association matrix, and the inventory consumption network graph to create a cross-dimensional association engine. This engine receives configuration parameters and dynamic weights through a unified data interface layer, invokes each sub-model, and performs collaborative computations to achieve spatiotemporal alignment and semantic fusion of registration, charge, and inventory data. The multimodal data output by the engine contains both single-dimensional trend information and cross-dimensional correlation features, providing high-quality data support for intelligent report generation, risk warning, and decision support.
[0029] Through the above mechanism, the cross-dimensional correlation engine can output structured multimodal data. The multimodal data includes registration volume data, revenue data, and inventory consumption data. The three are aligned in the time dimension and business dimension, and are accompanied by metadata tags for subsequent visualization, risk warning, and report generation.
[0030] Step S40: judging the multimodal data according to the warning level to obtain a judgment result.
[0031] It should be noted that this process is usually based on the set early warning level to determine the data of different dimensions, to identify potential risks or opportunities, and accordingly take appropriate measures. According to the business needs and historical data analysis, a series of early warning levels are defined. These levels can be a simple binary classification (such as normal, abnormal), or a more detailed classification (such as low risk, medium risk, high risk, emergency). Each level corresponds to a specific threshold range, which can be determined according to the number of registrations, the fluctuation of the amount of charges, the inventory consumption data and other key indicators. In this embodiment, the inventory consumption data is used as an indicator for determination. If the inventory of some drugs is higher than the safe inventory level and the consumption rate is continuously low, a "low risk" early warning may be triggered, indicating the risk of inventory accumulation.
[0032] Secondly, by collecting and processing the latest data from the time series analysis model, the department-charge item association matrix and the inventory consumption network diagram, these data are mapped to the pre-set early warning levels. Through machine learning algorithms, the system can not only identify which early warning level the current state belongs to, but also predict the trend of state changes in the future.
[0033] Step S50, when the judgment result is that the inventory consumption data in the multi-modal data exceeds the preset threshold of the corresponding early warning level, risk marker data is generated.
[0034] It should be noted that the corresponding threshold table is obtained according to the user-configured early warning levels (such as low risk, medium risk, high risk), wherein each level corresponds to one or more key indicator thresholds. Then, the current drug inventory state is compared with each early warning threshold in real time. If the actual inventory of a certain type of drug is lower than the set safe threshold, or its consumption rate abnormally increases beyond the normal fluctuation range, it is determined as an out-of-limit event and risk marker data is generated.
[0035] Further, step S50 further comprises: obtaining a level identifier and a corresponding threshold table based on the early warning level, wherein the threshold table includes a first threshold, a second threshold and a third threshold, the first threshold is less than the second threshold, and the second threshold is less than the third threshold. Specifically, according to the user-configured early warning levels, a level identifier and a corresponding threshold table are established to define the risk standards of different levels. For example, three early warning levels are set: low risk, medium risk and high risk, and the corresponding thresholds are first threshold , second threshold and third threshold , satisfying the relationship These thresholds are usually calculated based on the safe inventory level of the drug, the historical consumption rate and the expiration date. Then, the current consumption ratio The current consumption ratio is used to measure whether the drug use is within a normal range. Then, the current warning level is determined according to the current consumption ratio. Specifically, the target threshold is retrieved in the threshold table according to the current warning level, and the matching threshold is obtained. When the current consumption ratio is greater than the matching threshold, the overrun flag is recorded. Specifically, the current consumption ratio is compared with each level threshold to determine the current warning level to which it belongs, and is specifically represented as: After determining the current warning level, the system searches the threshold table for the matching threshold corresponding to the level , and compares it with the actual consumption ratio . When , the overrun flag is recorded, indicating that the drug has abnormal consumption behavior at the current time granularity. Then, the event number is generated according to the overrun flag, and the event number, current consumption ratio, matching threshold and level identifier are combined into risk marker data. This data can not only be used to highlight abnormal situations in reports in the form of color, icon, etc., but also be used as a log record for subsequent analysis, auditing and automatic replenishment strategy calling.
[0036] Step S60, generating an initial report based on the risk marker data and the multi-modal data.
[0037] It should be noted that the multi-modal data covers data in multiple dimensions such as registration volume, revenue, inventory consumption, etc. These data are generated through cross-dimension association engine and can fully reflect the operation status of the hospital. The risk marker data is generated based on the multi-modal data according to the warning level, and is used to identify data abnormality, such as inventory consumption exceeding the preset threshold, etc. The process aims to fuse structured business data and risk warning information, and present them to the user in a visualized manner to assist them in quickly understanding the hospital operation status and making scientific decisions.
[0038] Further, step S60 further includes: sorting the multi-modal data by time granularity to obtain a time series data sequence, and then time-aligning the risk label data with the time series data sequence to obtain a labeled data set. Specifically, the multi-modal data (including registration volume, revenue situation, inventory consumption, etc.) obtained from the cross-dimension correlation engine is sorted by time granularity to form a time series data sequence; at the same time, the risk label data generated previously is time-aligned with these time series data to ensure that each risk event can be accurately corresponded to the corresponding time period or data point, thereby constructing a labeled data set containing normal data and abnormal identification. Then, a first chart is generated according to the data set, and the first chart is used to show the trend of registration volume data changing over time. Specifically, this chart usually adopts the form of a line chart to show, in which the X-axis represents the time dimension (such as date, week or month), and the Y-axis represents the number of registrations. Through this intuitive visualization, the medical institution can quickly identify the peak and trough periods of visits, providing a basis for resource scheduling. For example, in the case of a significant increase in registration volume during the flu season, the hospital can arrange more medical staff in advance. Secondly, a second chart is generated according to the data set, and the second chart is used to show the cumulative distribution of revenue data. The second chart can use a stacked area chart or a column chart to present the income contribution of different departments or projects. Such chart design not only helps to understand the overall financial performance, but also deeply understands the specific contribution proportion of each department to the total income. For example, through analyzing these data, the management can find out which service projects are most popular and which aspects may need to be improved or promoted, so as to optimize resource allocation to improve profitability. In addition, a third chart is generated according to the data set, and the third chart is used to show the inventory consumption data and highlight the time period with risk label data. Considering the importance and particularity of medical supplies, the third chart usually adopts a heat map or a column chart with color coding. Under normal circumstances, the inventory level remains within a safe range, and once the inventory of certain drugs or supplies approaches the warning line, the corresponding time period will be marked red or highlighted in other eye-catching ways. This enables supply chain management personnel to take timely measures to prevent service interruptions due to shortages of materials. In addition, by comparing historical data, future demand trends can also be predicted, further enhancing the effectiveness and forward-looking nature of inventory management.
[0039] Finally, the first chart, the second chart and the third chart are spliced according to the preset layout rule to obtain an initial report. Specifically, in the splicing process, the size and position of each chart are automatically adjusted according to the preset layout rule. For example, the registration volume trend chart can be set to occupy a larger area in the upper left corner of the report to highlight its importance; the cumulative distribution chart of revenue is placed in the upper right corner, which forms a contrast with the registration volume trend chart, so as to facilitate the user to simultaneously view the change trend of the two key indicators. The inventory consumption chart is placed at the bottom of the report and occupies a wider horizontal area, so as to detail the dynamic change of the inventory. In addition to the splicing of the charts, the information in the report is also integrated and optimized. For example, a title bar is added at the top of the report to display the name of the report, the generation time, the time granularity and other basic information; a footer is added at the bottom of the report to display the data source, the report version and other auxiliary information. In addition, according to the risk marking data, highlight display or special marking is added in the chart to remind the user to pay attention to the potential risk points. The finally generated initial report not only contains rich data information, but also highlights the key data and risk points through reasonable layout and highlight display, thereby providing comprehensive and intuitive decision support for hospital managers.
[0040] In step S70, the initial report is adjusted according to the user interaction instruction to obtain a target report.
[0041] It should be noted that the user interaction instruction is parsed to extract the adjustment type and the adjustment parameter. The adjustment type can include the change of the chart style (such as switching from a column chart to a line chart), the adjustment of the time range (such as switching from a monthly granularity to a daily granularity), and the increase or decrease of the data dimension (such as adding or removing the registration data of a certain department). The adjustment parameter specifically specifies the details of the adjustment, such as the new time range, the added dimension field, etc. Then, according to the parsed adjustment type, the corresponding operation is performed. For example, if the user wants to change the chart style, the corresponding chart in the initial report will be replaced according to the adjustment parameter to generate a new chart style. If the user adjusts the time range, the multi-modal data will be filtered again, the updated data will be generated according to the new time range, and the related chart will be re-rendered. If the user needs to increase or decrease the data dimension, the specified dimension will be added or removed in the multi-modal data according to the adjustment parameter, so as to update the data display in the report. Through a series of steps, the initial report can be flexibly adjusted according to the user interaction instruction to generate a target report that is more suitable for the user's needs.
[0042] The embodiment obtains user interaction instructions and report configuration information, allocates weights to the registration data dimension, the fee data dimension and the drug inventory dimension in the data dimension according to the time granularity based on a dynamic weighted aggregation algorithm, obtains corresponding dynamic weights, inputs the report configuration information and the dynamic weights into a cross-dimension association engine, generates multi-modal data, judges the multi-modal data according to the warning level, obtains a judgment result, generates risk marker data when the judgment result is that the inventory consumption data in the multi-modal data exceeds the preset threshold of the corresponding warning level, generates an initial report based on the risk marker data and the multi-modal data, adjusts the initial report according to the user interaction instructions, and obtains a target report. The dynamic weights and the cross-dimension association engine are used to real-time aggregate registration, charging and inventory data according to the user configuration instructions, to instantly mark inventory risks according to the warning level and to embed the report to dynamically obtain report information, to realize multi-dimensional linkage report automatic generation and synchronous early warning, to improve hospital operation decision-making efficiency and to reduce inventory management risks.
[0043] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as the above-mentioned first embodiment can be referred to the above introduction, and will not be repeated hereinafter. On this basis, please refer to Figure 2 , the dynamic report generation method based on medical data step S30 further comprises steps S201-S205: Step S201, inputting the report configuration information into a time series analysis model of the cross-dimension association engine to generate registration volume data.
[0044] It should be noted that the time series analysis model is one of the core components of the cross-dimension association engine, which is specially used to process time-related data. It can extract data related to registration volume from the medical data source according to the input report configuration information, and aggregate and analyze according to the specified time granularity. For example, if the time granularity is set to "daily granularity", the model will extract daily registration volume data and calculate the total daily registration volume, the registration volume distribution of each department and other key indicators.
[0045] Further, in generating the registration volume data, the model considers various factors such as holiday effects, seasonal changes, hospital scheduling arrangements, etc. For example, during holidays or weekends, the registration volume of certain departments may significantly increase, while that of other departments may be relatively small. By introducing these dynamic factors, the model can more accurately predict and reflect the actual registration volume changes. In addition, the model also performs smoothing processing on the data to reduce the impact of short-term fluctuations, thereby more clearly showing the long-term trend. For example, through techniques such as moving average or exponential smoothing, the model can generate a more smoothed registration volume curve, helping users better understand the overall trend of the data. Finally, the registration volume data generated by the time series analysis model will be output in a structured form, including daily total registration volume, department registration volume, registration volume trend, etc. These data can not only be directly used for report generation, but also serve as input for other analysis modules (such as revenue analysis, inventory consumption analysis) to realize multi-dimensional data linkage analysis.
[0046] In step S202, the report configuration information is input into the department-charge item association matrix of the cross-dimension association engine, and the revenue data is obtained by calculating through the hierarchical clustering algorithm.
[0047] It should be noted that the department-charge item association matrix is one of the core components of the cross-dimension association engine, and is specifically used to process revenue-related data. It constructs a matrix structure with departments as rows and charge items as columns, and the elements in the matrix represent the charge amount of a certain department for a certain charge item within a specified time granularity. For example, if the time granularity is set to "daily granularity", the matrix will record the charge of each department for different charge items on a daily basis.
[0048] Specifically, in the process of generating revenue data, the hierarchical clustering algorithm is called to analyze the association matrix. The hierarchical clustering algorithm gradually merges similar departments by calculating their similarity in charge items to form a clustering tree. For example, by calculating the cosine similarity, the system can identify which departments have similar charging patterns in charge items. In the clustering process, a pre-set similarity threshold (such as 0.8) is used to determine whether to merge two departments. When the similarity exceeds the threshold, the system merges the two departments into a cluster and calculates the total charge amount of the cluster. In this way, the system can group departments with similar charging patterns into a group, thereby simplifying the display of revenue data. Finally, the revenue data generated by the hierarchical clustering algorithm will be output in a structured form, including the total charge amount of each cluster, the list of departments within the cluster, the list of charge items, and the timestamp, etc. These data can not only be directly used for report generation, but also serve as input for other analysis modules (such as cost analysis, profit analysis) to realize multi-dimensional data linkage analysis.
[0049] Step S203, input the report configuration information into the inventory consumption network graph of the cross-dimension association engine for calculation to obtain inventory consumption data.
[0050] It is to be noted that the inventory consumption network graph is one of the core components of the cross-dimension association engine, and is specially used for processing inventory-related data. It constructs a dynamic graph structure by taking drugs as nodes and department consumption records as edges, and the weight of the edge represents the consumption amount of the department to the drug within a specified time granularity. For example, if the time granularity is set to "daily granularity", the network graph will record the daily consumption of different drugs by each department.
[0051] Further, in the process of generating inventory consumption data, various factors are considered, such as the expiration date of the drug, the inventory quantity, the consumption habit of the department, etc. For example, for drugs close to expiration, the system will increase their consumption priority to avoid waste due to expiration. By introducing these dynamic factors, the system can more accurately predict and reflect the actual inventory consumption situation. In addition, data smoothing is also performed to reduce the impact of short-term fluctuations, thereby more clearly showing long-term trends. For example, through techniques such as moving average or exponential smoothing, a smoother inventory consumption curve can be generated to help users better understand the overall trend of the data. Finally, the inventory consumption data generated by the inventory consumption network graph will be output in a structured form, including daily total consumption, consumption of each department, consumption trend, etc. These data can not only be directly used for report generation, but also serve as input for other analysis modules (such as registration volume analysis, revenue analysis) to realize multi-dimensional data linkage analysis.
[0052] Step S204, based on dynamic weights, time-space alignment and normalization processing is performed on the registration volume data, revenue data and inventory consumption data to obtain initial multi-modal data.
[0053] It should be noted that the spatio-temporal alignment is a process of aligning the registration volume data, revenue data and inventory consumption data according to the same time granularity. For example, if the time granularity is set to "daily granularity", the system will ensure that all data is aggregated and displayed in daily units. This process is achieved through the standardization of timestamps and resampling of data, ensuring consistency in time across different dimensions. For example, interpolation or smoothing may be required for some data to fill in missing time points, ensuring data integrity. Normalization is the process of converting data from different dimensions to the same dimension. Registration volume, revenue and inventory consumption data often have different dimensions and orders of magnitude, and direct comparison may result in unbalanced data. Through normalization, these data are converted to the range of [0, 1], so that data from different dimensions can be compared on the same scale. For example, the maximum-minimum normalization method can be used to convert each data point to a relative value relative to its maximum and minimum value. This method not only eliminates the effect of dimension, but also makes the data more intuitive and easy to read.
[0054] Further, after spatio-temporal alignment and normalization, the registration volume data, revenue data and inventory consumption data are fused into initial multi-modal data. These data not only contain the information of the original data, but also reflect the relative importance of different data dimensions at a specific time granularity through dynamic weight weighting. The initial multi-modal data provides a unified data basis for subsequent chart generation and comprehensive analysis, enabling reports to fully and accurately reflect the hospital's operating conditions. Through spatio-temporal alignment and normalization based on dynamic weights, accurate and unified initial multi-modal data can be generated to provide strong support for medical management decisions. This process not only improves the accuracy and consistency of data, but also enhances the flexibility and adaptability of the report system, enabling the report to better meet the needs of different users.
[0055] In step S205, metadata tags are added to the initial multi-modal data to obtain multi-modal data.
[0056] It should be noted that metadata tags include data type, generation time, and weight distribution information. After data fusion is completed, three layers of metadata tags are added to the initial multimodal data: the "data type" field uses enumerated values to distinguish between registration volume, revenue, and inventory consumption, facilitating subsequent routing to the corresponding visualization component; the "generation time" is accurate to the millisecond level, recording the moment the calculation of this data is completed, and is accompanied by time zone information to ensure synchronization across hospital campuses; the "weight distribution information" is written in JSON format, containing an array of dynamic weights for the three dimensions of registration, billing, and inventory at this time granularity, adjustment reason codes (such as "emergency peak" and "holidays"), and a summary of the parameters used for weight calculation. All tags are Base64-encoded and appended to the data packet header. This tagging mechanism not only improves data organization efficiency but also provides a unified data semantic foundation for subsequent risk tagging, user interaction adjustments, and report exports.
[0057] This embodiment inputs report configuration information into different sub-modules of the cross-dimensional association engine to generate registration volume, revenue, and inventory consumption data respectively, and performs spatiotemporal alignment and normalization based on dynamic weights, and finally merges them into multimodal data with metadata tags, realizing multidimensional fusion and semantic enhancement of medical data.
[0058] Based on the first embodiment of the present application, in the third embodiment of the present application, the same or similar contents as those in the first embodiment can be referred to the above introduction and will not be described in detail later. Figure 3 The step S70 of generating a dynamic report based on medical data further includes steps S301 to S306: Step S301: parse the user interaction instruction to extract the adjustment type and adjustment parameters.
[0059] It's important to note that user interaction commands are parsed to extract the adjustment type and parameters. Adjustment types may include changing the chart style (e.g., switching from a bar chart to a line chart), adjusting the time range (e.g., switching from monthly to daily granularity), or adding or removing data dimensions (e.g., adding or removing registration data for a specific department). Adjustment parameters specify the details of the adjustment, such as a new time range or added dimension fields.
[0060] Step S302: If the adjustment type is chart style adjustment, the chart in the initial report is replaced according to the adjustment parameters to obtain a style-updated chart.
[0061] It should be noted that when the adjustment type contained in the user interaction instruction is a chart style adjustment, the chart in the initial report will be replaced or optimized according to the adjustment parameters specified by the user to generate a style updated chart that meets the user's preferences and display requirements. This function enhances the interactivity and visual expression ability of the report system, allowing users with different roles (such as hospital managers, financial personnel, and pharmacy staff) to customize data presentation methods flexibly according to their own needs.
[0062] Specifically, first, the user's adjustment parameters are parsed to identify the required replacement chart type (such as changing a line chart to a column chart or a stacked area chart), color theme, coordinate axis settings, data aggregation method, etc. Subsequently, the system calls the built-in visualization component library to re-render the corresponding chart object according to the new configuration and ensure its compatibility with the original report layout without disrupting the overall information structure. For example, for a registration volume trend chart, the user may wish to switch from a "daily granularity line chart" to a "weekly granularity column chart" to more clearly compare the overall visit volume changes for each week. For a revenue distribution chart, the user may choose to replace the two-dimensional bar chart with a pie chart or a ring chart to highlight the proportion of each department's revenue.
[0063] In addition, the function of saving and reusing custom templates of chart styles is also supported. Users can save commonly used chart styles as templates for subsequent report quick calls. This flexible style adjustment mechanism not only improves user experience but also enhances the adaptability and expression of dynamic reports in multiple scenarios, thereby better serving the intelligent decision-making needs of hospitals.
[0064] Step S303, if the adjustment type is time range adjustment, then the multi-modal data in the initial report is re-filtered according to the adjustment parameters to obtain re-filtered data.
[0065] It should be noted that when the adjustment type is time range adjustment, the system will re-filter the multi-modal data in the initial report according to the adjustment parameters provided by the user. This means that whether it is a hospital's registration record, patient information, drug inventory situation, or financial data, etc., will be filtered and reorganized according to the new time range requirements to generate a data view that meets the specific time period.
[0066] Specifically, the system first parses the user-specified time range parameters, which can involve selecting a start date and end date, or querying for a specific year, quarter, month, or even a specific hour range. Next, the system will traverse the relevant tables and fields in the original database or data warehouse, using efficient query algorithms to extract all records that fall within the specified time interval. For certain datasets that require complex calculations (such as daily average patient visits, monthly revenue growth rates, etc.), the system will also dynamically adjust its statistical logic to ensure that the calculation results accurately reflect the actual situation under the new time framework. For example, when analyzing the annual drug consumption of a certain department, if the user decides to shorten the time range from the entire year to the third quarter, the system will automatically recalculate and display the actual consumption of various drugs in that period, helping managers accurately grasp seasonal drug trends. For example, to evaluate patient satisfaction in a specific time period, the system can retrieve the corresponding questionnaire results and feedback information based on the updated time parameters, generating more targeted reports.
[0067] In addition, considering the diversity of multi-modal data, including text, numbers, images, and other formats, the system must ensure that different types of data are properly processed and integrated during the time range adjustment process.
[0068] Step S304, if the adjustment type is dimension addition or removal adjustment, the specified dimension is added or removed from the multi-modal data in the initial report according to the adjustment parameters, to obtain dimension adjustment data.
[0069] It should be noted that when the adjustment type is dimension addition or removal adjustment, the specified data dimension is dynamically added or removed from the multi-modal data in the initial report according to the adjustment parameters in the user interaction instruction, to generate dimension adjustment data. For example, if the user wants to add the "medical insurance payment ratio" dimension to the current report to analyze the fee structure, the corresponding fields will be extracted from the multi-modal data and integrated into the revenue chart. Conversely, if the user considers the "registration source channel" dimension to be redundant, it can also be removed from the report through the instruction to reduce information interference. The system supports dynamic switching of registration data dimensions, fee data dimensions, and drug inventory dimensions, and ensures that the adjusted data remains consistent in the time axis and visual layout.
[0070] Step S305, the style update chart, re-filtered data, or dimension adjustment data is remapped to the report layout of the initial report to obtain an intermediate report.
[0071] It should be noted that this process aims to re-integrate the chart styles, time ranges, or data dimensions modified by the user through the interaction instruction into a unified report framework, generating an intermediate report that is structurally complete and visually coordinated, laying the foundation for the final output of high-quality visual results.
[0072] Specifically, the current update content is identified according to the user operation type: if it is a chart style adjustment, the original chart component is replaced and its relative position in the layout is maintained; if it is a time range adjustment, the corresponding data set is refreshed and dynamically rendered in the original chart; if it is a dimension increase or decrease adjustment, the report structure is partially reconstructed, and the related dimension information is added or hidden. During the entire mapping process, the system uses a responsive layout engine to automatically adapt to different chart sizes and data densities, ensuring that the overall page is aesthetically pleasing and logically clear.
[0073] In addition, to improve user experience, the system also supports historical version backtracking and multi-view parallel display functions, allowing users to compare report effects under different configurations in the same interface. For example, a registration trend chart can be displayed simultaneously according to "daily granularity" and "monthly granularity" statistics, or revenue analysis results with and without certain dimensions can be displayed side by side.
[0074] Step S306, rendering and caching the intermediate report to obtain the target report.
[0075] It should be noted that during the rendering phase, the system uses a front-end visualization engine or a server-side rendering framework to uniformly draw elements such as chart objects, data labels, and layout rules in the intermediate report. The system supports multiple output formats such as HTML, PDF, PNG, or Excel, ensuring that the report maintains good display effects in different terminals and application scenarios. At the same time, the system will automatically optimize the rendering strategy based on user device resolution, screen ratio, and other parameters to improve the visualization experience.
[0076] In terms of caching mechanism, the system uses a combination of in-memory caching and persistent storage to temporarily or permanently store the generated target report and its metadata (such as report configuration, time range, dimension selection, style settings, etc.). For high-frequency access report templates, the system can automatically cache the rendering results to speed up subsequent calls and reduce repeated computational resource consumption. In addition, the caching mechanism also supports version management and historical backtracking, making it easy for users to view report states at different time points or restore configurations before a mistake was made.
[0077] Through rendering and intelligent caching mechanisms, the system not only improves report generation efficiency and response speed, but also enhances user experience and system stability, making dynamic medical reports truly real-time, interactive, and reusable, meeting the needs of data analysis and decision support in multiple roles and scenarios in hospitals.
[0078] The embodiment analyzes the user interaction instruction, identifies the adjustment type, and performs corresponding chart style replacement, time range filtering, or dimension increase / decrease operation, finally generates a target report table with complete structure and strong adaptability, supports real-time adjustment and visual display of multi-dimensional data, and enhances the efficiency of hospital data analysis and decision support capability.
[0079] Based on the first embodiment of the present application, the present application further provides a dynamic report table generation device based on medical data, please refer to Figure 4 , the device comprises: The data acquisition module 10 is configured to obtain a user interaction instruction and report table configuration information, wherein the report table configuration information comprises time granularity, data dimension set, and early warning level, the time granularity comprises hour granularity, day granularity, week granularity, and month granularity, and the data dimension comprises registration data dimension, charging data dimension, and drug inventory dimension.
[0080] The distribution module 20 is configured to distribute weights to the registration data dimension, the charging data dimension, and the drug inventory dimension in the data dimension according to the time granularity based on a dynamic weighted aggregation algorithm, to obtain corresponding dynamic weights.
[0081] The data generation module 30 is configured to input the report table configuration information and the dynamic weights into a cross-dimension association engine to generate multi-modal data, wherein the multi-modal data comprises registration volume data, revenue data, and inventory consumption data, and the cross-dimension association engine is constructed based on the registration data dimension, the charging data dimension, and the drug inventory dimension.
[0082] The judgment module 40 is configured to determine the multi-modal data according to the early warning level to obtain a judgment result.
[0083] The execution module 50 is configured to generate risk marker data when the judgment result is that the inventory consumption data in the multi-modal data exceeds a preset threshold value of the corresponding early warning level.
[0084] The construction module 60 is configured to generate an initial report table based on the risk marker data and the multi-modal data.
[0085] The result module 70 is configured to adjust the initial report table according to the user interaction instruction to obtain a target report table.
[0086] The dynamic report generation device based on medical data provided in the application adopts the dynamic report generation method based on medical data in the above embodiment, and can solve the technical problem of how to dynamically generate multi-dimensional linkage reports and synchronously complete inventory warning. Compared with the prior art, the beneficial effects of the dynamic report generation device based on medical data provided in the application are the same as those of the dynamic report generation method based on medical data provided in the above embodiment, and other technical features of the dynamic report generation device based on medical data are the same as those disclosed in the above embodiment method, which will not be repeated here.
[0087] In an embodiment, the allocation module 20 is also configured to obtain a department business priority based on a registration data dimension, obtain a charge item type based on a fee data dimension, obtain a drug shelf life data based on a drug inventory dimension, and determine an initial first weight coefficient, an initial second weight coefficient and an initial third weight coefficient according to a time granularity based on the data dimension, wherein the registration data dimension corresponds to the initial first weight coefficient, the fee data dimension corresponds to the initial second weight coefficient, and the drug inventory dimension corresponds to the initial third weight coefficient; dynamically adjust the initial first weight coefficient based on the department business priority to obtain a first weight coefficient; grade correct the initial second weight coefficient according to the charge item type to obtain a second weight coefficient; combine the initial third weight coefficient with the drug shelf life data to perform time-effectiveness compensation to obtain a third weight coefficient; and use the first weight coefficient, the second weight coefficient and the third weight coefficient as the dynamic weight.
[0088] In an embodiment, the data generation module 30 is also configured to construct a time series analysis model based on a registration data dimension, construct a department-charge item association matrix according to a charge data dimension, and calculate a department consumption correlation degree of each drug based on a graph neural network in combination with a drug inventory dimension and a registration data dimension to construct an inventory consumption network graph, wherein a network node of the inventory consumption graph represents a drug inventory state, and an edge weight represents a consumption rate; and combine the time series analysis model, the department-charge item association matrix and the inventory consumption network graph to obtain a cross-dimension association engine.
[0089] In an embodiment, the data generation module 30 is also configured to input report configuration information into the time series analysis model of the cross-dimension association engine to generate registration volume data, input the report configuration information into the department-charge item association matrix of the cross-dimension association engine to calculate to obtain revenue data through a hierarchical clustering algorithm, and input the report configuration information into the inventory consumption network graph of the cross-dimension association engine to calculate to obtain inventory consumption data; perform spatio-temporal alignment and normalization processing on the registration volume data, the revenue data and the inventory consumption data based on the dynamic weight to obtain initial multi-modal data; add a metadata label to the initial multi-modal data to obtain multi-modal data, wherein the metadata label includes data type, generation time and weight allocation information.
[0090] In an embodiment, the executing module 50 is further configured to obtain a level identifier and a corresponding threshold table based on the early warning level, wherein the threshold table comprises a first threshold, a second threshold, and a third threshold, the first threshold is less than the second threshold, and the second threshold is less than the third threshold; obtain a current consumption ratio based on the inventory consumption data in the multi-modal data; determine a current early warning level based on the current consumption ratio; retrieve a target threshold in the threshold table based on the current early warning level to obtain a matching threshold; record an overrun flag when the current consumption ratio is greater than the matching threshold; generate an event number based on the overrun flag, and combine the event number, the current consumption ratio, the matching threshold, and the level identifier into risk marker data.
[0091] In an embodiment, the constructing module 60 is further configured to sort the multi-modal data according to a time granularity to obtain a time series data sequence; time-align the risk marker data with the time series data sequence to obtain a data set with markers; generate a first chart based on the data set, the first chart being used to show a trend of the number of registrations changing over time; generate a second chart based on the data set, the second chart being used to show a cumulative distribution of the revenue data; generate a third chart based on the data set, the third chart being used to show the inventory consumption data and highlight a time period with the risk marker data; and splice the first chart, the second chart, and the third chart according to a preset layout rule to obtain an initial report.
[0092] In an embodiment, the result module 70 is further configured to analyze a user interaction instruction, extract an adjustment type and an adjustment parameter, the adjustment type comprising a chart style adjustment, a time range adjustment, and a dimension increase / decrease adjustment; if the adjustment type is the chart style adjustment, replace a chart in the initial report according to the adjustment parameter to obtain a style updated chart; if the adjustment type is the time range adjustment, re-filter the multi-modal data in the initial report according to the adjustment parameter to obtain re-filtered data; if the adjustment type is the dimension increase / decrease adjustment, add or remove a specified dimension in the multi-modal data in the initial report according to the adjustment parameter to obtain dimension adjusted data; remap the style updated chart, the re-filtered data, or the dimension adjusted data to a report layout of the initial report to obtain an intermediate report; render and cache the intermediate report to obtain a target report.
[0093] The application provides a dynamic report generation device based on medical data, which comprises at least one processor and a memory in communication connection with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the dynamic report generation method based on medical data in the above-mentioned embodiment one.
[0094] Reference will be made to the following Figure 5, which shows a schematic diagram of the structure of a medical data-based dynamic report generation device suitable for implementing the embodiments of the present application. The medical data-based dynamic report generation device in the embodiments of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5 The medical data-based dynamic report generation device shown is merely an example and should not limit the functions and scope of use of the embodiments of the present application.
[0095] like Figure 5 As shown, the medical data-based dynamic report generation device may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes based on programs stored in a read-only memory (ROM) 1002 or programs loaded from a storage device 1003 into a random access memory (RAM) 1004. RAM 1004 also stores various programs and data required for the operation of the medical data-based dynamic report generation device. Processing device 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following can be connected to the I / O interface 1006: input devices 1007, such as a touch screen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008, such as a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003, such as a magnetic tape, hard disk, etc.; and communication devices 1009. Communication devices 1009 can allow the medical data-based dynamic report generation device to communicate with other devices wirelessly or wired to exchange data. Although the figure shows various medical data-based dynamic report generation devices, it should be understood that implementation or presence of all shown devices is not required. More or fewer devices may be implemented or present instead.
[0096] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer-readable storage medium, the computer program containing program codes for executing the method shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network through a communication device, or installed from the storage device 1003, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiments disclosed in the present application are executed.
[0097] The dynamic report generation device based on medical data provided by the present application adopts the dynamic report generation method based on medical data in the above-mentioned embodiments, and can solve the technical problem of how to dynamically generate multi-dimensional linkage report and synchronously complete inventory warning. Compared with the prior art, the dynamic report generation device based on medical data provided by the present application has the same beneficial effects as the dynamic report generation method based on medical data provided by the above-mentioned embodiments, and other technical features in the dynamic report generation device based on medical data are the same as the features disclosed in the previous embodiment method, which will not be repeated here.
[0098] It should be understood that parts of the present application can be realized by hardware, software, firmware or their combinations. In the description of the above-mentioned embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0099] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
[0100] The present application provides a computer-readable storage medium having stored thereon computer-readable program instructions (i.e. computer program) for executing the dynamic report generation method based on medical data in the above-mentioned embodiments.
[0101] The computer readable storage medium provided in the present application may, for example, be a U disk, but is not limited to an electric, magnetic, optical, electromagnetic, infrared, or semiconductor, or device, or any combination of the above. More specific examples of the computer readable storage medium can include, but are not limited to, an electric connection with one or more conductive wires, a portable computer disk, a hard disk, a random access memory (RAM), a read only memory (ROM), an erasable programmable read only memory (EPROM or flash memory), an optical fiber, a portable compact disk read only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present embodiment, the computer readable storage medium can be any tangible storage medium containing or storing a program that can be executed by or used in conjunction with an instruction execution device. The program code contained on the computer readable storage medium can be transmitted in any suitable storage medium, including but not limited to an electric wire, an optical cable, an RF (Radio Frequency), and the like, or any suitable combination of the above.
[0102] The above computer readable storage medium can be contained in the medical data based dynamic report generation device, or can exist separately without being assembled into the medical data based dynamic report generation device.
[0103] The above computer readable storage medium carries one or more programs, which, when executed by the medical data based dynamic report generation device, enable the medical data based dynamic report generation device to write computer program code in one or more programming languages or combinations thereof for executing the operations of the present application. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" language or similar programming languages. The program code can be executed entirely on a user computer, partially on a user computer, as a separate software package, partially on a user computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, through the Internet using an Internet service provider).
[0104] The flowcharts and block diagrams in the drawings illustrate the architecture, functionality, and operation of possible implementations of various embodiments of the methods and computer program products according to the present application. In this regard, each block in the flowcharts or block diagrams can represent a module, a segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks noted in succession can in fact be executed substantially concurrently or can sometimes be executed in reverse order, depending on the functionality involved. It will also be noted that each block of the block diagrams and / or flowcharts, and combinations thereof, can be implemented by dedicated hardware-based systems which perform the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0105] The modules involved in the embodiments of the present application can be implemented by software or by hardware. In some cases, the names of the modules do not limit the modules themselves.
[0106] The readable storage medium provided by the present application is a computer readable storage medium, which stores computer readable program instructions (i.e., a computer program) for executing the medical data-based dynamic report generation method described above, and can solve the technical problem of how to dynamically generate a multi-dimensional linkage report and simultaneously complete inventory warning. Compared with the prior art, the computer readable storage medium provided by the present application has the same beneficial effects as the medical data-based dynamic report generation method provided by the above embodiments, and will not be described here.
[0107] The present application also provides a computer program product, which includes a computer program, and the computer program is executed by a processor to implement the steps of the medical data-based dynamic report generation method described above.
[0108] The computer program product provided by the present application can solve the technical problem of how to dynamically generate a multi-dimensional linkage report and simultaneously complete inventory warning. Compared with the prior art, the computer program product provided by the present application has the same beneficial effects as the medical data-based dynamic report generation method provided by the above embodiments, and will not be described here.
[0109] The above only describes some embodiments of the present application, and does not limit the patent scope of the present application. Any equivalent structural transformation made by using the content of the present application specification and drawings, or direct / indirect application in other related technical fields is included in the patent protection scope of the present application.
Claims
1. A method for generating dynamic reports based on medical data, characterized in that: The method comprises: Obtaining user interaction instructions and report configuration information, wherein the report configuration information includes time granularity, data dimension set, and warning level, the time granularity includes hourly granularity, daily granularity, weekly granularity, and monthly granularity, and the data dimension includes registration data dimension, fee data dimension, and drug inventory dimension; Based on the dynamic weighted aggregation algorithm, weights are assigned to the registration data dimension, the expense data dimension, and the drug inventory dimension in the data dimensions according to the time granularity to obtain corresponding dynamic weights; Inputting the report configuration information into a cross-dimensional association engine in combination with the dynamic weight to generate multimodal data, wherein the multimodal data includes registration volume data, revenue data, and inventory consumption data, and the cross-dimensional association engine is constructed based on the registration data dimension, the fee data dimension, and the drug inventory dimension; Determining the multimodal data according to the warning level to obtain a determination result; When the judgment result is that the inventory consumption data in the multimodal data exceeds a preset threshold value corresponding to the warning level, generating risk marking data; generating an initial report based on the risk marker data and the multimodal data; The initial report is adjusted according to the user interaction instruction to obtain a target report.
2. The method according to claim 1, wherein The step of assigning weights to the registration data dimension, the expense data dimension, and the drug inventory dimension in the data dimensions according to the time granularity based on a dynamic weighted aggregation algorithm to obtain corresponding dynamic weights includes: Obtaining department business priorities based on the registration data dimensions; Obtaining a charging item type based on the cost data dimension; Obtaining drug expiration data based on the drug inventory dimension; Determine an initial first weight coefficient, an initial second weight coefficient, and an initial third weight coefficient based on the data dimension and the time granularity, wherein the registration data dimension corresponds to the initial first weight coefficient, the expense data dimension corresponds to the initial second weight coefficient, and the drug inventory dimension corresponds to the initial third weight coefficient; Dynamically adjusting the initial first weight coefficient based on the department business priority to obtain a first weight coefficient; Modifying the initial second weight coefficient in a graded manner according to the charging item type to obtain a second weight coefficient; Combining the drug expiration date data with the initial third weight coefficient to compensate for timeliness, thereby obtaining a third weight coefficient; The first weight coefficient, the second weight coefficient and the third weight coefficient are used as the dynamic weight.
3. The method according to claim 1, wherein The step of inputting the report configuration information into a cross-dimensional association engine in combination with the dynamic weight to generate multimodal data, wherein the multimodal data includes registration volume data, revenue data, and inventory consumption data, and the step of constructing the cross-dimensional association engine based on the registration data dimension, the fee data dimension, and the drug inventory dimension includes: Constructing a time series analysis model based on the registration data dimension; Constructing a department-charge item association matrix based on the charge data dimensions; Combining the drug inventory dimension and the registration data dimension, the department consumption correlation of each drug is calculated based on a graph neural network, and an inventory consumption network graph is constructed, where the network nodes of the inventory consumption graph represent the drug inventory status and the edge weights represent the consumption rate; The time series analysis model, the department-charge item association matrix and the inventory consumption network diagram are combined to obtain a cross-dimensional association engine.
4. The method according to claim 1, wherein The step of inputting the report configuration information into a cross-dimensional correlation engine in combination with the dynamic weight to generate multimodal data includes: Inputting the report configuration information into a time series analysis model of a cross-dimensional correlation engine to generate registration volume data; Input the report configuration information into the department-charge item association matrix of the cross-dimensional association engine and calculate it through a hierarchical clustering algorithm to obtain revenue data; Inputting the report configuration information into the inventory consumption network diagram of the cross-dimensional correlation engine for calculation to obtain inventory consumption data; Performing spatiotemporal alignment and normalization processing on the registration volume data, the revenue data, and the inventory consumption data based on the dynamic weight to obtain initial multimodal data; Metadata tags are added to the initial multimodal data to obtain multimodal data, where the metadata tags include data type, generation time, and weight distribution information.
5. The method according to claim 1, wherein When the judgment result is that the inventory consumption data in the multimodal data exceeds the preset threshold value corresponding to the warning level, the step of generating risk marker data includes: obtaining a level identifier and a corresponding threshold table based on the warning level, wherein the threshold table includes a first threshold, a second threshold, and a third threshold, the first threshold being smaller than the second threshold, and the second threshold being smaller than the third threshold; Obtaining a current consumption ratio based on inventory consumption data in the multimodal data; Determine a current warning level according to the current consumption ratio; Retrieving a target threshold in the threshold table according to the current warning level to obtain a matching threshold; When the current consumption ratio is greater than the matching threshold, an over-limit flag is recorded; An event number is generated according to the over-limit flag, and the event number, the current consumption ratio, the matching threshold and the level identifier are combined into risk marking data.
6. The method according to claim 1, wherein The step of generating an initial report based on the risk marker data and the multimodal data includes: Sorting the multimodal data according to time granularity to obtain a time series data sequence; Time-aligning the risk marker data with the time series data sequence to obtain a marked data set; generating a first chart based on the data set, wherein the first chart is used to display a trend of changes in the number of registered patients over time; generating a second chart based on the data set, the second chart being used to display the cumulative distribution of revenue data; generating a third chart based on the data set, the third chart being used to display inventory consumption data and highlighting a time period with the risk-marked data; The first chart, the second chart, and the third chart are spliced together according to preset layout rules to obtain an initial report.
7. The method according to claim 1, wherein The step of adjusting the initial report according to the user interaction instruction to obtain a target report includes: Parsing the user interaction instruction to extract the adjustment type and adjustment parameters, wherein the adjustment type includes chart style adjustment, time range adjustment, and dimension increase or decrease adjustment; If the adjustment type is chart style adjustment, then replacing the chart in the initial report according to the adjustment parameters to obtain a style-updated chart; If the adjustment type is a time range adjustment, re-filtering the multimodal data in the initial report according to the adjustment parameters to obtain re-filtered data; If the adjustment type is dimension increase or decrease adjustment, then adding or removing a specified dimension to the multimodal data in the initial report according to the adjustment parameter to obtain dimension adjustment data; Remapping the style-updated chart, the re-filtered data, or the dimension-adjusted data to the report layout of the initial report to obtain an intermediate report; The intermediate report is rendered and cached to obtain a target report.
8. A dynamic report generation device based on medical data, characterized in that: The device comprises: A data collection module is used to obtain user interaction instructions and report configuration information, wherein the report configuration information includes time granularity, data dimension set, and warning level. The time granularity includes hourly granularity, daily granularity, weekly granularity, and monthly granularity. The data dimension includes registration data dimension, fee data dimension, and drug inventory dimension. an allocation module, configured to allocate weights to the registration data dimension, the expense data dimension, and the drug inventory dimension in the data dimensions according to the time granularity based on a dynamic weighted aggregation algorithm to obtain corresponding dynamic weights; a data generation module, configured to input the report configuration information into a cross-dimensional association engine in combination with the dynamic weight to generate multimodal data, wherein the multimodal data includes registration volume data, revenue data, and inventory consumption data, and the cross-dimensional association engine is constructed based on the registration data dimension, the billing data dimension, and the drug inventory dimension; A judgment module, configured to judge the multimodal data according to the warning level to obtain a judgment result; an execution module, configured to generate risk marking data when the judgment result is that the inventory consumption data in the multimodal data exceeds a preset threshold corresponding to the warning level; A construction module, configured to generate an initial report based on the risk marker data and the multimodal data; The result module is used to adjust the initial report according to the user interaction instruction to obtain a target report.
9. A dynamic report generation device based on medical data, characterized in that: The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the method for generating a dynamic report based on medical data according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the method for generating a dynamic report based on medical data according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Hospital management system and electronic equipment
CN117877694A
Hospital index comprehensive report generation method and device, electronic equipment and storage medium
CN117995343A
Hospital comprehensive monitoring analysis method and platform based on artificial intelligence
CN120412950A
Online management method and system for hospital infection prevention and control related data
CN120432186A