An electronic medical record dynamic partition rendering method

CN123011226APending Publication Date: 2026-10-30HEBEI KEZHUO ELECTRONIC TECH CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610865691.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-16
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0007]为了克服上述缺陷,提出了本发明,以解决传统电子病历编辑器存在渲染效率低下、组件易覆盖不可变区、以及数据与视图关联复杂且错误率高的问题

Benefits of technology

[0032]在实施本发明的技术方案中,通过区分可变区与不可变区并结合R-tree空间索引,避免了组件拖拽时覆盖关键固定信息,同时降低碰撞检测的计算复杂度从,显著提升了大规模病历文档中组件布局的实时交互效率与渲染性能。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123011226A_ABST
    Figure CN123011226A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of medical informatization, and specifically provides an electronic medical record dynamic partition rendering method, which comprises the following steps: creating an electronic medical record template, rendering the electronic medical record template on a Canvas canvas, and constructing a global R-tree space index for the whole page; in response to a user dragging a component on the Canvas canvas, judging the area type of a target position after dragging; if the area type is a variable area, performing global R-tree collision detection, if the area type is an invariable area, first performing a position correction strategy, and then performing global R-tree collision detection; performing conflict detection according to the global R-tree collision detection result, if no conflict occurs, inserting the component, if a conflict occurs, performing conflict resolution, and then inserting the component; and providing a sidebar metadata configuration interface after the component insertion is completed. Through the above scheme, the problems of low rendering efficiency, easy covering of the invariable area by the component, and complex and high-error-rate association of data and views are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical information technology, specifically providing a method for dynamic partitioning and rendering of electronic medical records. Background Technology

[0002] Electronic medical records (EMRs) are a core component of healthcare informatization. Traditional EMR editors are primarily based on browser DOM trees or XML semi-structured storage solutions. Browser DOM trees calculate element positions layer by layer using CSS layout engines, such as in editors and HTML rich text editors. XML semi-structured storage solutions store medical record data in XML format, combined with template nesting and natural language descriptions, supporting partially structured data entry. However, these existing technologies have the following significant drawbacks and limitations.

[0003] (1) Low layout rendering efficiency: Traditional electronic medical record editors (such as B / S architecture solutions based on DOM / SVG) rely on the browser rendering engine, which has a performance bottleneck when processing large-scale medical record documents (such as more than 100 pages). For example, DOM rendering requires calculating the element layout layer by layer, which leads to a surge in global reflow time (≥5 seconds) and cannot support real-time interaction (such as dynamic adjustment after component dragging). The technical root cause is that the complexity of DOM tree operations and CSS style calculation is O(n 2 Furthermore, it frequently triggers repaint and reflow, resulting in excessive CPU load.

[0004] (2) Insufficient dynamic adaptability: Existing technologies lack hybrid layout management capabilities and cannot be compatible with the complex requirements of coexistence of variable areas (freely editable areas) and immutable areas (such as electronic signatures and fixed templates) in medical scenarios. For example, when components are dragged, immutable areas are easily covered, resulting in the loss of key information (such as signatures and quality control marks) or layout errors; at the same time, there is a lack of dynamic spatial indexing technology (such as R-tree and quadtree), which makes it impossible to calculate component overlap and optimize layout paths in real time.

[0005] (3) Outdated data-view binding technology: Traditional database storage methods make it difficult to separate dynamic styles from data, resulting in poor data compatibility after upgrade (such as non-standard XML tag definitions and high risk of style loss); at the same time, it is necessary to manually associate structured data (such as test results) with visualization components (such as tables and charts) through JavaScript, resulting in code redundancy and a high error rate.

[0006] (4) Inefficient storage and computing architecture: In terms of storage, traditional solutions use centralized databases to store medical record files (such as uncompressed DOM / XML), which leads to high network transmission pressure and cannot support distributed storage and fast retrieval; in terms of computing, the lack of block rendering and asynchronous update mechanisms leads to high memory consumption. Summary of the Invention

[0007] To overcome the above-mentioned shortcomings, this invention is proposed to solve the problems of low rendering efficiency, easy overwriting of immutable areas by components, and complex data and view association with high error rate in traditional electronic medical record editors.

[0008] This invention provides a method for dynamic partitioning and rendering of electronic medical records, comprising the following steps:

[0009] S1: Create an electronic medical record template and render it on the Canvas. Build a global R-tree spatial index for the entire page. The electronic medical record template defines the page, including immutable and mutable areas.

[0010] S2: Responds to the user dragging a component on the Canvas and determines the type of the target area after dragging;

[0011] S3: If the region type is a variable region, then perform global R-tree collision detection; if the region type is an immutable region, then first perform the position correction strategy, and then perform global R-tree collision detection.

[0012] S4: Perform conflict detection based on the global R-tree collision detection results to determine whether a conflict has occurred;

[0013] S5: If no conflict occurs, insert the component; if a conflict occurs, resolve the conflict before inserting the component.

[0014] S6: After the component is inserted, a sidebar metadata configuration interface is provided.

[0015] Furthermore, the position correction strategy automatically snaps the drag endpoint of the component to the nearest edge of the variable region based on the boundary of the immutable region and the free grid information of the quadtree, and corrects the coordinates of the target position after the component is dragged.

[0016] Furthermore, performing global R-tree collision detection includes:

[0017] Based on the global R-tree spatial index, calculate the overlap between the dragged component and all immutable regions on the page. The preset collision threshold θ=0.15, where A represents the area of ​​the dragged component, B represents the area of ​​the immutable area, AIB represents the area of ​​the overlapping area, and AYB represents the total area of ​​the dragged component and the immutable area. The global R-tree index quickly locates spatial relationships using the minimum bounding rectangle.

[0018] Furthermore, step S4 includes comparing the calculated overlap with a threshold θ. If overlap ≤ θ, it is determined that no conflict has occurred; if overlap > θ, it is determined that a conflict has occurred.

[0019] Furthermore, in step S5, conflict resolution includes the following steps performed sequentially:

[0020] S511: Based on priority weight model and A The path planning algorithm plans the optimal displacement path for the component and determines the final displacement endpoint coordinates of the component;

[0021] S512: Execute the optimal displacement path for the component and update the local quadtree spatial index;

[0022] S513: Employs Canvas block rendering technology to redraw local canvas areas related to the new position of the component.

[0023] Furthermore, the priority weight model includes calculating the weight of the immutable region. Where S is the area ratio of the immutable region, and T is the timestamp decay factor;

[0024] The A The path planning algorithm includes taking the current position of the component as the starting point, the nearby free variable area as the target, and comprehensively considering the movement distance, as well as the weight and elasticity coefficient of the area passed through, to generate a polyline path. After the path is generated, Bézier curves are introduced as a smooth interpolation algorithm, and the path planning is decoupled from the Canvas main rendering thread.

[0025] Furthermore, step S512 includes subdividing a high-density area containing nested tables and mixed text and image components into quadtree grid units, dynamically adjusting the grid density through a recursive segmentation algorithm, and performing pixel-level collision detection only on components within the coverage area after the updated quadtree is updated.

[0026] Furthermore, at the finally determined insertion position, a component insertion operation is performed, including the following steps executed sequentially:

[0027] S521: Automatically align components to the nearest grid edge based on the coordinates of the free grid in the quadtree;

[0028] S522: Assign rendering levels by component type;

[0029] S523: Draw the component on the Canvas.

[0030] Furthermore, the sidebar metadata configuration interface includes a feature where users drag database fields from the sidebar to components already inserted on the Canvas, and the engine automatically generates a mapping relationship from the database fields to the components.

[0031] The working principle and beneficial effects of this invention:

[0032] In implementing the technical solution of this invention, by distinguishing between variable and immutable areas and combining them with R-tree spatial indexing, key fixed information is avoided from being covered when components are dragged, while the computational complexity of collision detection is reduced, thus significantly improving the real-time interactive efficiency and rendering performance of component layout in large-scale medical record documents. Attached Figure Description

[0033] The disclosure of this invention will become more readily understood with reference to the accompanying drawings. It will be readily understood by those skilled in the art that these drawings are for illustrative purposes only and are not intended to limit the scope of protection of this invention. Furthermore, similar numbers in the drawings are used to denote similar components, wherein:

[0034] Figure 1 This is a schematic diagram of the main steps of a dynamic partitioning rendering method for electronic medical records according to the present invention. Detailed Implementation

[0035] Some embodiments of the present invention will now be described with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are merely illustrative of the technical principles of the present invention and are not intended to limit the scope of protection of the present invention.

[0036] Figure 1 This is a schematic diagram illustrating the main steps of a dynamic partitioning rendering method for electronic medical records according to the present invention. Figure 1 As shown, the electronic medical record dynamic partition rendering method in this embodiment mainly includes the following steps S1-S6.

[0037] Step S1: Create an electronic medical record template and render it on a Canvas. Build a global R-tree spatial index for the entire page. The electronic medical record template defines the page, including immutable and mutable areas.

[0038] In one implementation, the electronic medical record template defines the basic structure of the page, including the initial layout of immutable areas (such as the electronic signature area, header, footer, and patient basic information field) and variable areas (freely editable areas).

[0039] Step S2: In response to the user dragging a component (such as a text input box, a process graph, a tooth position graph, a dynamic table, etc.) on the Canvas, determine the type of the area at the target location after dragging.

[0040] In one implementation, users can drag and drop new components from the component library onto the Canvas, or drag components from the variable area of ​​the Canvas. Each component in the component library has a predefined type property and a default elasticity factor (text block elasticity factor). Table of elasticity coefficients Image elasticity coefficient ).

[0041] Step S3: If the region type is a variable region, then perform global R-tree collision detection. If the region type is an immutable region, then first perform the position correction strategy, and then perform global R-tree collision detection.

[0042] In this embodiment, the coordinates of the target position on the Canvas where the user is currently dragging the component are obtained, and the region type (variable or immutable) to which the coordinates belong is queried. The region type is determined based on the coordinate range set during the initialization of the electronic medical record template.

[0043] In one implementation, the position correction strategy is to automatically snap the drag endpoint of the component to the nearest edge of the variable region based on the boundary of the immutable region and the free grid information of the quadtree, and correct the coordinates of the target position after the component is dragged.

[0044] In one implementation, performing global R-tree collision detection includes:

[0045] Based on the global R-tree spatial index, calculate the overlap between the dragged component and all immutable regions on the page. The preset collision threshold θ = 0.15. Here, A represents the area of ​​the dragged component, B represents the area of ​​the immutable region, AIB represents the area of ​​the overlapping region, and AYB represents the total area of ​​the dragged component and the immutable region. The global R-tree index quickly locates spatial relationships using the minimum bounding rectangle (MBR) and supports real-time index updates for hundreds of pages of documents (asynchronous calculation in the background thread).

[0046] Step S4: Perform conflict detection based on the global R-tree collision detection results to determine whether a conflict has occurred.

[0047] In one implementation, the calculated overlap is compared with a threshold θ. If overlap ≤ θ, it is determined that no conflict has occurred; if overlap > θ, it is determined that a conflict has occurred.

[0048] Step S5: If no conflict occurs, insert the component; if a conflict occurs, resolve the conflict before inserting the component.

[0049] In one implementation, conflict resolution includes the following steps performed sequentially:

[0050] S511: Based on priority weight model and A The path planning algorithm plans the optimal displacement path for the component and determines the final displacement endpoint coordinates of the component.

[0051] The priority weight model includes calculating the weights of the immutable region. Where S is the area ratio of the immutable region, and T is the timestamp decay factor (the priority of newly locked immutable regions is increased by 20%). Based on the preset elasticity coefficients of the variable region components (0.8 for text blocks, 0.5 for tables, and 0.3 for images), space is released by compressing highly elastic components.

[0052] A The path planning algorithm involves taking the component's current position as the starting point, targeting nearby empty variable areas, and comprehensively considering the movement distance, as well as the weight and elasticity coefficient of the areas traversed (prioritizing passage through highly elastic areas) to generate a polyline path (avoiding jump-like movements). After path generation, a Bézier curve is introduced as a smoothing interpolation algorithm to optimize the visual effect of movement. This path planning is decoupled from the Canvas main rendering thread (executed asynchronously), ensuring that the main thread's response latency is ≤100ms.

[0053] S512: Execute the optimal displacement path for the component and update the local quadtree spatial index.

[0054] For high-density areas containing nested tables, mixed text and images, etc., the area is subdivided into quadtree grid units (1px precision), and the grid density is dynamically adjusted using a recursive segmentation algorithm. The updated quadtree performs pixel-level collision detection only on components within the covered area, reducing the computational complexity of subsequent potential conflict detection from O(n²) to O(n... logn ).

[0055] S513: Employs Canvas block rendering technology to redraw local canvas areas (i.e. affected grid blocks) related to the new position of the component, rather than the entire document page.

[0056] In one implementation, at the finally determined insertion position, a component insertion operation is performed, including the following steps performed sequentially:

[0057] S521: Automatically align components to the nearest grid edge based on the coordinates of the free grid in the quadtree, with an error of ≤1px.

[0058] S522: Assign rendering layers by component type (text bottom layer, table middle layer, image top layer).

[0059] S523: Draw the component on the Canvas.

[0060] Step S6: After the component is inserted, a sidebar metadata configuration interface is provided.

[0061] Users drag database fields (such as "Complaint") from the sidebar to components (such as text input boxes) that have been inserted on the Canvas, and the engine automatically generates a mapping relationship from the database fields to the components.

[0062] After mapping is complete, when a user modifies the component content, the incremental Diff algorithm is triggered, and the data synchronization controller updates and writes the changes to the database. When the database changes, the Canvas is notified to redraw the relevant components.

[0063] In this embodiment, variable / immutable area classification is implemented in a medical scenario. Conflicts in mixed layouts are resolved through elasticity coefficients and path planning algorithms, reducing the conflict rate to below 10%. By integrating R-tree global indexes and quadtree local indexes (pixel-level detection error ≤1px) and combining GPU block rendering technology, a 300-page medical record document can be loaded within 0.5 seconds. Traditional DOM solutions are time-consuming and memory-intensive; this invention has low memory usage, significantly improved rendering efficiency, and stable interactive frame rates. A hybrid data storage format of JSON + styles is adopted, supporting intelligent matching of medical symbol libraries (such as ISO 3950 dental maps). Combined with an incremental Diff algorithm, storage redundancy is reduced by 90%. Traditional DOM / XML solutions suffer from tag redundancy and high manual coding error rates. This invention achieves two-way data-view binding through drag-and-drop configuration of sidebar metadata, resulting in a lower error rate and supporting direct extraction of research fields (such as chief complaint and present medical history) by third parties. Canvas content automatically continues across pages with an offset error of ≤2px, avoiding the truncation problem of traditional DOM printing, which has a relatively high misalignment rate. This invention significantly reduces the misalignment rate by locking immutable areas and using dynamic pagination algorithms, and also supports lossless Canvas screenshot printing technology (physical pixel-level alignment).

[0064] Based on steps S1-S6 above, an electronic medical record template containing immutable areas (such as the signature area) and variable areas (free editing areas) is first created and rendered on a Canvas. Simultaneously, a global R-tree spatial index is built for the entire page to support efficient spatial queries. When a user drags a component on the canvas, the system first determines the type of the target location's area—if it's a variable area, R-tree collision detection is performed directly; if it's an immutable area, a position correction strategy (such as offsetting the component to an adjacent variable area) is executed before collision detection, and then the system determines whether an overlap conflict occurs based on the detection results. If there is no conflict, the component is inserted directly; if there is a conflict, a conflict resolution mechanism (such as path replanning based on elasticity coefficients) is invoked to adjust the position before insertion. Finally, after the component is inserted, a sidebar metadata configuration interface is provided for data binding. By distinguishing between variable and immutable areas and combining this with the R-tree spatial index, key fixed information is avoided from being covered during component dragging, while the computational complexity of collision detection is reduced, significantly improving the real-time interactive efficiency and rendering performance of component layout in large-scale medical record documents.

[0065] It should be noted that although the steps in the above embodiments are described in a specific order, those skilled in the art will understand that in order to achieve the effects of the present invention, different steps do not necessarily have to be executed in such an order. They can be executed simultaneously (in parallel) or in other orders, and these variations are all within the scope of protection of the present invention.

[0066] The technical solution of the present invention has been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after such changes or substitutions will all fall within the scope of protection of the present invention.

Claims

1. A method for dynamic partitioning and rendering of electronic medical records, characterized in that, Includes the following steps, S1: Create an electronic medical record template and render it on the Canvas. Build a global R-tree spatial index for the entire page. The electronic medical record template defines the page, including immutable and mutable areas. S2: Responds to the user dragging a component on the Canvas and determines the type of the target area after dragging; S3: If the region type is a variable region, then perform global R-tree collision detection; if the region type is an immutable region, then first perform the position correction strategy, and then perform global R-tree collision detection. S4: Perform conflict detection based on the global R-tree collision detection results to determine whether a conflict has occurred; S5: If no conflict occurs, insert the component; if a conflict occurs, resolve the conflict before inserting the component. S6: After the component is inserted, a sidebar metadata configuration interface is provided.

2. The method for dynamic partitioning and rendering of electronic medical records according to claim 1, characterized in that, The position correction strategy automatically snaps the drag endpoint of the component to the nearest edge of the variable region based on the boundary of the immutable region and the free grid information of the quadtree, and corrects the coordinates of the target position after the component is dragged.

3. The method for dynamic partitioning and rendering of electronic medical records according to claim 1, characterized in that, Performing global R-tree collision detection includes: Based on the global R-tree spatial index, calculate the overlap between the dragged component and all immutable regions on the page. The preset collision threshold θ=0.15, where A represents the area of ​​the dragged component, B represents the area of ​​the immutable area, AIB represents the area of ​​the overlapping area, and AYB represents the total area of ​​the dragged component and the immutable area. The global R-tree index quickly locates spatial relationships using the minimum bounding rectangle.

4. The method for dynamic partitioning and rendering of electronic medical records according to claim 1, characterized in that, Step S4 includes comparing the calculated overlap with a threshold θ. If overlap ≤ θ, it is determined that no conflict has occurred; if overlap > θ, it is determined that a conflict has occurred.

5. The method for dynamic partitioning and rendering of electronic medical records according to claim 1, characterized in that, In step S5, conflict resolution includes the following steps performed sequentially: S511: Based on priority weight model and A The path planning algorithm plans the optimal displacement path for the component and determines the final displacement endpoint coordinates of the component; S512: Execute the optimal displacement path for the component and update the local quadtree spatial index; S513: Employs Canvas block rendering technology to redraw local canvas areas related to the new position of the component.

6. The method for dynamic partitioning and rendering of electronic medical records according to claim 5, characterized in that, The priority weight model includes calculating the weight of the immutable region. Where S is the area ratio of the immutable region, and T is the timestamp decay factor; The A The path planning algorithm includes taking the current position of the component as the starting point, the nearby free variable area as the target, and comprehensively considering the movement distance, as well as the weight and elasticity coefficient of the area passed through, to generate a polyline path. After the path is generated, Bézier curves are introduced as a smooth interpolation algorithm, and the path planning is decoupled from the Canvas main rendering thread.

7. The method for dynamic partitioning and rendering of electronic medical records according to claim 5, characterized in that, Step S512 includes subdividing a high-density area containing nested tables and mixed text and image components into quadtree grid units, dynamically adjusting the grid density through a recursive segmentation algorithm, and performing pixel-level collision detection only on components within the coverage area after the updated quadtree is updated.

8. The method for dynamic partitioning and rendering of electronic medical records according to claim 5, characterized in that, At the final determined insertion position, perform the component insertion operation, including the following steps performed sequentially: S521: Automatically align components to the nearest grid edge based on the coordinates of the free grid in the quadtree; S522: Assign rendering levels by component type; S523: Draw the component on the Canvas.

9. The method for dynamic partitioning and rendering of electronic medical records according to claim 1, characterized in that, The sidebar metadata configuration interface includes a feature where users drag database fields from the sidebar to components already inserted on the Canvas, and the engine automatically generates a mapping relationship from the database fields to the components.