An electronic medical record version evolution tracking and differential comparison method based on OFD-H semantic indexing
Patent Information
- Application Number
- CN202611251936.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-18
- Publication Date
- 2026-11-03
- Estimated Expiration
- 2046-08-18
AI Technical Summary
Existing electronic medical record version management systems cannot achieve accurate alignment and quantitative comparison of diagnostic and treatment semantic fields, lack field-level rollback, bidirectional traceability of original text, and privacy layer protection, and cannot meet the refined needs of medical quality control and scientific research.
Based on OFD-H semantic indexing, by parsing and extracting custom indexing nodes in electronic medical records, performing indexing integrity verification, privacy desensitization and tag normalization processing, constructing a semantic indexing index and association graph, calculating the comprehensive weight score of field differences, and generating differentiated views and reports.
It enables fine-grained control over electronic medical record version management, reduces the workload of manual comparison, improves medical record quality control and research efficiency, and ensures data security and privacy protection.
Smart Images

Figure CN122797517B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer information processing technology, and in particular to a method for tracking and comparing the evolution of electronic medical record versions based on OFD-H semantic indexing. Background Technology
[0002] OFD-H (Open Fixed-layout Document for Healthcare) is a format for electronic medical record layout documents that is customized and extended for the medical field based on my country's independent OFD national standard GB / T 33190-2016. It is currently in the national standard approval stage, with standard project number 20250854-T-244. OFD-H incorporates a standardized semantic indexing mechanism and custom metadata extension capabilities. While ensuring complete consistency in the display of medical record layouts across terminals and institutions, it enables semantic description of medical record content and embedded structured data. Its core design concept is "file as interface," using standardized OFD-H documents as a unified exchange carrier for healthcare data across the entire domain.
[0003] Electronic medical records (EMRs) are the legally mandated core credentials for clinical diagnosis and treatment, multidisciplinary consultations, medical record quality control, medical insurance settlement, and medical research. Throughout the clinical process, a single patient's medical record undergoes multiple rounds of revisions and iterations. The complete lifecycle includes: initial consultation record, supplementary information from follow-up visits, addition of laboratory / imaging reports, review and revision by senior physicians, quality control rectification and modification, and final archiving. Currently, mainstream electronic medical record systems in China generally adopt a multi-version independent file storage scheme. Each modification generates a completely new independent medical record file, distinguishing historical versions by version number and timestamp.
[0004] Existing traditional electronic medical record version management solutions have the following problems: Manual comparison of version differences is extremely costly, and changes are not readily apparent. The system only lists filename versions (e.g., 20260101_v1, 20260105_v2, 20260110_v3) and lacks automatic difference annotation capabilities. Doctors must manually open each file and read it line by line to compare changes between versions, a single complete comparison taking 10-30 minutes and easily overlooking crucial modifications such as diagnoses, medications, and critical values. Existing limited OFD version tracing patents only focus on electronic signature verification, completely neglecting semantic-level comparison of medical record content.
[0005] It only supports coarse-grained version management at the file level, lacking structured tracking at the medical field level. Traditional version management uses the entire file as a single unit of storage and comparison, making it impossible to locate changes in individual diagnostic fields. Fine-grained changes that are of key clinical concern, such as adjustments to diagnostic texts, additions or subtractions to medication regimens, modifications to body temperature / test values, and revisions to surgical records, are all buried within the entire file and cannot be automatically identified, extracted, classified, or statistically analyzed by machines, thus failing to meet the needs of refined review in medical quality control.
[0006] The inability to perform batch automated analysis of medical record version evolution data leads to low efficiency in research and quality control. In medical research and hospital-wide medical record quality control scenarios, there is a need to statistically analyze the patterns of massive amounts of medical record version changes, such as the frequency of diagnoses for specific diseases, medication adjustment trends in various departments, and the distribution of critical value changes. Existing file-level storage architectures require manual batch parsing of files and manual organization of change data, making it impossible to automate the mining of version evolution patterns at scale.
[0007] The OFD-H standard's semantic indexing capabilities are underutilized, leading to a technical gap in its implementation. The OFD-H industry standard specifically defines a standardized semantic tagging system for core diagnostic and treatment fields such as chief complaint, present medical history, diagnosis, medication, and laboratory tests. However, none of the existing medical record version management systems reuse this semantic indexing capability or use standardized tags for automatic version difference identification and structured comparison. As a result, the standard's design capabilities cannot be implemented, leading to a waste of technical resources.
[0008] Meanwhile, there are clear requirements for traceability of changes throughout the entire lifecycle of electronic medical records, full traceability of operations, and interoperability of structured data. OFD-H, as a unified medical exchange carrier, is being promoted in medical institutions nationwide, but supporting semantic-level version comparison and tracking tools are incomplete.
[0009] In addition, existing similar solutions lack a layered privacy protection system, and in scenarios involving batch comparisons and scientific research data export, sensitive patient identity information is easily leaked, which does not meet the mandatory requirements for medical data security compliance. Summary of the Invention
[0010] Therefore, the technical problem to be solved by the present invention is to overcome the difficulties in the existing electronic medical record version management in accurately aligning and quantifying the semantic fields of diagnosis and treatment, the inability to automatically classify high-risk changes in diagnosis and treatment, and the lack of field-level rollback, bidirectional traceability of the original text, privacy layer protection, and adaptive weight optimization capabilities.
[0011] To address the aforementioned technical problems, this invention provides a method for tracking and comparing the evolution of electronic medical record versions based on OFD-H semantic indexing, comprising: Semantic fields of custom indexing nodes in the old and new versions of OFD-H electronic medical records are parsed and extracted respectively. Indexing integrity verification, automatic filling of missing fields, privacy desensitization and label normalization are performed on the semantic fields in sequence. The normalized semantic fields are bound to the corresponding version metadata to build a semantic indexing index. A medical semantic association graph and version semantic snapshot are built based on the normalized semantic fields. Using the normalized unified semantic label as the matching benchmark, the semantic fields of the old version OFD-H electronic medical record and the new version OFD-H electronic medical record are aligned. The differences in the aligned fields are divided into newly added fields, deleted fields and value changed fields. The corresponding difference quantification results are calculated according to the data type of the semantic fields that have differences. Based on the semantic tag inherent weight of the field difference, the change type correction coefficient, the change magnitude quantification coefficient, the associated risk bonus coefficient, and the department-defined adjustment coefficient, the comprehensive weight score of the field difference is calculated, and the risk priority of the field difference is determined based on the comprehensive weight score. The differences in each field are sorted according to the risk priority, and a two-column semantic comparison view with the old and new version semantic fields horizontally aligned is generated. Differential visual coding is performed according to the difference type of the field differences, and OFD-H archived difference report and structured scientific research statistical report are generated. Based on the target historical version and the set of semantic fields to be rolled back selected by the user, the corresponding version semantic snapshot is read. Only the semantic fields to be rolled back are replaced with the field values in the target historical version, while keeping other diagnosis and treatment fields in the current latest version unchanged. A new incremental OFD-H electronic medical record version is generated, and the rollback operation log is recorded.
[0012] In one embodiment of the present invention, before performing the differential comparison, the method further includes: Obtain the old version and the new version of OFD-H electronic medical record corresponding to the same medical process, perform two-layer identity verification based on the medical visit ID and the patient identity hash value, and terminate the difference calculation and generate a security alarm log when the medical visit ID is inconsistent or the patient identity hash value is mismatched.
[0013] In one embodiment of the present invention, privacy desensitization is performed on the extraction results, including: Irreversible hashing is used for ID card numbers and mobile phone numbers, salted hashing is used for hospitalization numbers and patient IDs and business association is carried out through controlled mapping relationships within the hospital, and business semantics are preserved for diagnosis, medication and laboratory treatment fields. The semantic index includes at least the version number, patient ID, field semantic label, field value, data type, generation time, modifier, and indexing source.
[0014] In one embodiment of the present invention, normalized semantic fields are bound to version metadata to construct a semantic index, and a medical semantic association graph and a version semantic snapshot are constructed based on the semantic fields, including: The medical semantic association graph adopts a two-layer graph structure consisting of entity nodes and medical business edges. The entity nodes include at least diagnostic entities, medication administration entities, laboratory examination entities, and surgical or treatment operation entities. Each medical business edge stores the association type and association strength coefficient. ; The association strength coefficient of fixed rule associations satisfies: ; The association strength coefficient of text co-occurrence inference satisfies: ; When a semantic field is deleted in the new version, the corresponding entity node is marked as invalid and the original associated edges and invalid timestamps are retained; the medical semantic association graph is based on the patient's visit ID and integrates the patient's historical versions, and records the effective version range for each associated edge; The version semantic snapshots are persisted according to a hierarchical rule: 0-30 days are stored in high-speed storage media, 30 days-3 years are stored in object storage media, and more than 3 years are only retained as index metadata.
[0015] In one embodiment of the present invention, calculating the corresponding difference quantification result based on the field data type includes: The calculation includes quantitative results of differences such as textual difference degree, absolute numerical difference, enumerated encoding difference, and the proportion of changes in sub-items of composite fields; The text difference degree is calculated according to the following formula: ; in, The weight represents the text difference degree, and the weight represents the word weight corresponding to the word segmentation unit. Indicates the first The lexical weights corresponding to each word segmentation unit; This indicates that when converting old version text to new version text, for the first... The number of insertion, deletion, or replacement operations performed by each word segmentation unit; This represents the sum of the weights of each word segmentation unit in the old and new versions of the text; the weight coefficient for key diagnostic terms is 3, and the weight coefficient for ordinary descriptive text is 1; when A value ≥ 0.2 is considered a substantial text replacement; a value < 0 is considered a substantial text replacement. A value less than 0.2 is considered a minor text editing adjustment. When the value is 0, it is determined that the text has not changed; The absolute difference of the numerical fields is calculated according to the following formula: ; in, Represents the absolute difference between the values. This indicates the new version of the field value. This indicates the old version field value; T represents the national standard medical safety threshold or the department-defined floating threshold. A value greater than T is marked as a significant numerical fluctuation, while a value less than T is marked as a significant fluctuation. When the value is ≤T, it is marked as a small numerical fluctuation. When the value is 0, it is determined that the value has not changed; The calculation steps for the enumeration encoding differences include: For enumerated fields, each enumeration option of the enumerated field is mapped to a corresponding unified integer code, and the integer codes of the corresponding enumerated fields in the new version of the electronic medical record are compared with those in the old version of the electronic medical record. When the integer codes of the new version of electronic medical records are inconsistent with those of the old version, it is determined that the corresponding enumeration parameters have changed, and the corresponding associated risk level is determined based on the changed integer codes. When the integer codes are consistent, it is determined that the corresponding enumeration parameters have not changed; wherein, the enumeration class fields include at least one of medication frequency, disease grade, specimen type, and treatment status; The steps for calculating the percentage change in the composite field sub-item include: For composite structured fields, the composite structured fields in the new version of electronic medical records and the old version of electronic medical records are decomposed into multiple independent sub-semantic entries, and a unique identifier is assigned to each of the sub-semantic entries. The intersection and difference sets of the sub-semantic entries corresponding to the new version of the electronic medical record and the sub-semantic entries corresponding to the old version of the electronic medical record are calculated based on the unique identifier. Sub-semantic entries that exist in the old version of the electronic medical record but not in the new version of the electronic medical record are marked as deleted sub-items. Sub-semantic entries that exist in the new version of the electronic medical record but not in the old version of the electronic medical record are marked as added sub-items. Sub-semantic entries that have the same unique identifier but have inconsistent internal values or text content are marked as changed sub-item values. The number of modified sub-semantic entries in the composite structured field is counted, and the proportion of modified sub-semantic entries to the total number of sub-semantic entries in the composite structured field is calculated. When the proportion exceeds 30%, the overall change risk level of the composite structured field is increased. The composite structured field includes at least one of complete medication plan, surgical procedure, and multi-diagnosis entry set.
[0016] In one embodiment of the present invention, the comprehensive weight score is calculated according to the following formula: ; in, This represents the overall weighted score. This represents the inherent weight of the semantic label. This indicates the change type correction factor. This represents the quantification coefficient of the change magnitude. This represents the associated risk factor. This indicates the department's custom adjustment coefficient; the high-priority label, medium-priority label, and low-priority label correspond to... They are 10, 5, and 1 respectively; the corresponding values for deleted and added fields are... The values for the changed fields are 1.2 and 1.0 respectively. The difference quantization result is taken, with a value range of [0, 1.2]; for text fields... Pick Numeric fields Calculate using the following formula: ; For enumerated fields, the change magnitude quantification coefficient Take the risk quantification coefficient corresponding to the changed integer code; For composite structured fields, the change magnitude quantification coefficient Take the percentage change of the sub-items in the composite field; When the corresponding semantic field has not undergone substantial changes =0; When there is no high-risk field associated with the current field difference, the associated risk bonus coefficient The coefficient is 0; when there is a high-risk field that is associated with the difference of the current field, the association risk bonus coefficient is 0. The coefficient is 0.3; when there are two or more high-risk fields that are correlated with the current field, the correlation risk factor is increased. It is 0.6; Departmental custom adjustment coefficient The value range is [0.7, 1.5], and the default value for the entire hospital is 1.0.
[0017] In one embodiment of the present invention, it further includes: The number of cross-version modifications to the same semantic field under the same patient ID is counted. When the same semantic field under the same patient ID has been modified three or more times across versions, the semantic field is marked as a cyclically modified field, and a score is added for cyclic modifications. When the semantic field is modified less than 3 times across versions, the cyclic variable score will be increased. Set it to 0; and determine the final weight score according to the following formula: ; in, This represents the final weighted score; when A score of ≥6 indicates a high-priority warning. When 2≤ <6 indicates a medium priority level for monitoring; when If the value is less than 2, it is determined to be of low priority.
[0018] In one embodiment of the present invention, a two-column semantic comparison view with horizontally aligned semantic fields of the old and new versions is generated; differential visual coding is performed according to the difference type; and OFD-H archived difference reports and structured scientific research statistical reports are generated, including: The two-column semantic comparison view uses a highlighted indicator for newly added fields, a strikethrough indicator for deleted fields, a comparison indicator of old and new values for fields with changed values, and a high-priority risk warning indicator. Each semantic index is synchronously bound to the page logical coordinates and the document physical rendering coordinates, so that the original text can be located based on any coordinate after the layout is adjusted; The OFD-H archived difference report includes a change overview, high-priority change details, version change timeline, and operation log. The structured scientific research statistical report automatically desensitizes patient identity fields during export, and medical users, quality control administrators, and scientific research users have different report export permissions.
[0019] In one embodiment of the present invention, a corresponding version semantic snapshot is read based on the target historical version selected by the user and the set of semantic fields to be rolled back. Only the semantic fields to be rolled back are replaced with field values from the target historical version, while other diagnostic and treatment fields remain unchanged. A new incremental OFD-H electronic medical record version is generated, and a rollback operation log is recorded, including: Copy all semantic fields of the current latest version, and replace only the fields in the semantic field set F to be rolled back with the field values of the target historical version T; Load the current latest version of OFD-H electronic medical record's layout description layer, page layout, image and text coordinates, font style and pagination rules, replace the custom index node corresponding to set F in a targeted manner and update the page logical coordinates and physical rendering coordinates synchronously; Write the newly generated version number, target historical version number, rollback operator, operation timestamp, rollback reason, list of semantic tags to be rolled back, final weight score and list of related affected fields in the custom metadata area of the OFD-H document; recalculate the document global hash and append the operation electronic signature; The newly generated OFD-H master document, semantic snapshot, and semantic index will be persistently stored. All historical versions will be set to read-only status, and the rollback operation log and the ordinary medical record modification log will be stored in separate tables.
[0020] In one embodiment of the present invention, it further includes: Collect logs of medical record version comparison operations, filter logs from test accounts, robot accounts, and temporary internship accounts, and deduplicate duplicate behaviors of the same operator, the same patient, and the same semantic field on a monthly basis. Manually marking key points, tracing the original text multiple times, filtering and displaying, and checking the report selection are marked as positive samples; filtering and hiding, manually ignoring, and viewing without clicking are marked as negative samples; and default browsing behavior is marked as neutral samples. The positive excitation coefficient Set to 1, negative attenuation coefficient Set to -0.6, neutral sample coefficient Set to 0; Update the basic inherent weights of semantic tags according to the following formula: ; in, This represents the updated base intrinsic weights. This represents the base inherent weights before the update, and α represents the monthly learning rate. ; This represents the total number of valid training samples corresponding to the semantic labels. Indicates the first The sample coefficients corresponding to each valid training sample, and According to the The sample type of each valid training sample is taken as follows: , or .
[0021] Update the underlying intrinsic weights Limited to [0.5, 15]; Generate mutually isolated weight configuration libraries according to the hospital-wide dimension and the department dimension respectively, load the new copyright reconfiguration of the department into 10% of the medical record comparison traffic of the corresponding department, and verify it continuously for 7 natural working days; When the number of anomaly detections during the verification period is lower than a preset threshold, the new copyright reconfiguration for the department is fully implemented; when the number of anomaly detections during the verification period reaches or exceeds the preset threshold, the new copyright reconfiguration for the department is reverted to the weight configuration of the previous version.
[0022] The technical solution of the present invention has the following advantages compared with the prior art: This invention presents an electronic medical record version evolution tracking and difference comparison method based on OFD-H semantic indexing. This method refines the granularity of medical record version management from complete files to standardized semantic fields such as diagnosis, medication, laboratory tests, and surgeries, enabling accurate location of changes in treatment content. Through automatic tag alignment, difference quantification, and priority sorting, it reduces the workload of manually reading each medical record and lowers the risk of missing key modifications.
[0023] This invention fully utilizes OFD-H's custom indexing, metadata, and coordinate positioning capabilities to create a version evolution tracking solution adapted to domestically produced medical documents.
[0024] This invention outputs structured difference data, which can be used to statistically analyze the frequency of diagnostic modifications, medication adjustment trends, and distribution of critical value changes, thereby improving the efficiency of medical record quality control and medical research data utilization.
[0025] This invention rolls back only specified semantic fields and generates new incremental versions, which can avoid the loss of irrelevant fields caused by overwriting the entire file. At the same time, it achieves full traceability through read-only historical versions, rollback logs, hashes and electronic signatures.
[0026] This invention employs layered hash desensitization, tiered report export permissions, and split-table storage of rollback logs to improve data security in batch comparison and scientific research export scenarios.
[0027] This invention reduces high-speed storage usage through hot and cold layered semantic snapshots; the disclosure records can reduce version comparison query latency by more than 60% in scenarios with millions of medical record version data.
[0028] This invention employs dual threshold value judgment, departmental isolation weights, and grouped batch rollback, which can adapt to the differentiated quality control rules of different departments.
[0029] This invention updates weights, performs grayscale verification, and performs one-click rollback based on medical and nursing operation behaviors, forming a periodic adaptive iteration of priority determination rules. Attached Figure Description
[0030] To make the content of this invention easier to understand, the invention will be further described in detail below with reference to specific embodiments and accompanying drawings.
[0031] Figure 1This is a flowchart of OFD-H semantic indexing extraction and indexing process of the present invention.
[0032] Figure 2 This is a flowchart of the semantic difference engine of this invention.
[0033] Figure 3 This is a flowchart of the difference visualization rendering and report generation process of the present invention.
[0034] Figure 4 This is a flowchart of the semantic field rollback process of the present invention.
[0035] Figure 5 This is a flowchart of the adaptive learning priority tuning process of the present invention. Detailed Implementation
[0036] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments described are not intended to limit the present invention.
[0037] In this invention, "several" means one or more, "multiple" means two or more, "greater than," "less than," "exceeding," etc., are understood to exclude the stated number; "above," "below," "within," etc., are understood to include the stated number. In the description of this invention, the terms "first" and "second" are used only to distinguish technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of indicated technical features, or implicitly indicating the order of the indicated technical features.
[0038] Example 1 This embodiment provides a method for tracking and comparing the evolution of electronic medical record versions based on OFD-H semantic indexing, including: S1. Obtain the old version OFD-H electronic medical record and the new version OFD-H electronic medical record corresponding to the same medical process, perform two-layer identity verification based on the medical visit ID and the patient identity hash value, and terminate the difference calculation and generate a security alarm log when the medical visit ID is inconsistent or the patient identity hash value is mismatched.
[0039] S2. Parse and extract the semantic fields of the custom indexing nodes in the old version and the new version of OFD-H electronic medical records respectively. Perform indexing integrity verification, automatic filling of missing fields, privacy desensitization and label normalization on the semantic fields in sequence. Bind the normalized semantic fields with the corresponding version metadata to build a semantic indexing index. Construct a medical semantic association graph and a version semantic snapshot based on the normalized semantic fields.
[0040] Specifically, the extracted results are automatically indexed for missing fields, including: A three-level hybrid NLP post-structured architecture is adopted, which includes a real-time online lightweight sequence labeling model, an offline batch large language model, and a rule engine fallback correction layer. The real-time online lightweight sequence labeling model adopts the Chinese medical RoBERTa-wwm-ext clinical pre-training model, a linear chain CRF layer, and a medical dictionary fusion module based on the FLAT lattice structure. The offline batch large language model uses structured medical record instruction prompts and sliding window segmented reasoning to output a set of structured JSON diagnosis and treatment fields; The rule engine's fallback correction layer performs secondary verification on the model output based on the medical terminology regular rule library and national standard medical data element constraint rules; the automatically supplemented data and the original index data are stored in separate partitions, and the automatically supplemented data only fills in the missing fields of the original index.
[0041] Specifically, privacy desensitization is performed on the extraction results, including: Irreversible hashing is used for ID card numbers and mobile phone numbers, salted hashing is used for hospitalization numbers and patient IDs and business association is carried out through controlled mapping relationships within the hospital, and business semantics are preserved for diagnosis, medication and laboratory treatment fields. The semantic index includes at least the version number, patient ID, field semantic label, field value, data type, generation time, modifier, and indexing source.
[0042] In one embodiment of the present invention, normalized semantic fields are bound to version metadata to construct a semantic index, and a medical semantic association graph and a version semantic snapshot are constructed based on the semantic fields, including: The medical semantic association graph adopts a two-layer graph structure consisting of entity nodes and medical business edges. The entity nodes include at least diagnostic entities, medication administration entities, laboratory examination entities, and surgical or treatment operation entities. Each medical business edge stores the association type and association strength coefficient. ; The association strength coefficient of fixed rule associations satisfies: ; The association strength coefficient of text co-occurrence inference satisfies: ; When a semantic field is deleted in the new version, the corresponding entity node is marked as invalid and the original associated edges and invalid timestamps are retained; the medical semantic association graph is based on the patient's visit ID and integrates the patient's historical versions, and records the effective version range for each associated edge; The version semantic snapshots are persisted according to a hierarchical rule: 0-30 days are stored in high-speed storage media, 30 days-3 years are stored in object storage media, and more than 3 years are only retained as index metadata.
[0043] S3. Using the normalized unified semantic label as the matching benchmark, align the semantic fields of the old version OFD-H electronic medical record and the new version OFD-H electronic medical record, divide the aligned field differences into newly added fields, deleted fields and value changed fields, and calculate the corresponding difference quantification results according to the data type of the semantic fields that have differences.
[0044] Specifically, the corresponding difference quantification results are calculated based on the field data type, including: The calculation includes quantitative results of differences such as textual difference degree, absolute numerical difference, enumerated encoding difference, and the proportion of changes in sub-items of composite fields; The text difference degree is calculated according to the following formula: ; in, The weight represents the text difference degree, and the weight represents the word weight corresponding to the word segmentation unit. Indicates the first The lexical weights corresponding to each word segmentation unit; This indicates that when converting old version text to new version text, for the first... The number of insertion, deletion, or replacement operations performed by each word segmentation unit; This represents the sum of the weights of each word segmentation unit in the old and new versions of the text; the weight coefficient for key diagnostic terms is 3, and the weight coefficient for ordinary descriptive text is 1; when A value ≥ 0.2 is considered a substantial text replacement; a value < 0 is considered a substantial text replacement. A value less than 0.2 is considered a minor text editing adjustment. When the value is 0, it is determined that the text has not changed.
[0045] The absolute difference of the numerical fields is calculated according to the following formula: ; in, Represents the absolute difference between the values. This indicates the new version of the field value. This indicates the old version field value; T represents the national standard medical safety threshold or the department-defined floating threshold. A value greater than T is marked as a significant numerical fluctuation, while a value less than T is marked as a significant fluctuation. When the value is ≤T, it is marked as a small numerical fluctuation. When the value is 0, it is determined that the value has not changed; The calculation steps for the enumeration encoding differences include: For enumerated fields, each enumeration option of the enumerated field is mapped to a corresponding unified integer code, and the integer codes of the corresponding enumerated fields in the new version of the electronic medical record are compared with those in the old version of the electronic medical record. When the integer codes of the new version of electronic medical records are inconsistent with those of the old version, it is determined that the corresponding enumeration parameters have changed, and the corresponding associated risk level is determined based on the changed integer codes. When the integer codes are consistent, it is determined that the corresponding enumeration parameters have not changed; wherein, the enumeration class fields include at least one of medication frequency, disease grade, specimen type, and treatment status; The steps for calculating the percentage change in the composite field sub-item include: For composite structured fields, the composite structured fields in the new version of electronic medical records and the old version of electronic medical records are decomposed into multiple independent sub-semantic entries, and a unique identifier is assigned to each of the sub-semantic entries. The intersection and difference sets of the sub-semantic entries corresponding to the new version of the electronic medical record and the sub-semantic entries corresponding to the old version of the electronic medical record are calculated based on the unique identifier. Sub-semantic entries that exist in the old version of the electronic medical record but not in the new version of the electronic medical record are marked as deleted sub-items. Sub-semantic entries that exist in the new version of the electronic medical record but not in the old version of the electronic medical record are marked as added sub-items. Sub-semantic entries that have the same unique identifier but have inconsistent internal values or text content are marked as changed sub-item values. The number of modified sub-semantic entries in the composite structured field is counted, and the proportion of modified sub-semantic entries to the total number of sub-semantic entries in the composite structured field is calculated. When the proportion exceeds 30%, the overall change risk level of the composite structured field is increased. The composite structured field includes at least one of complete medication plan, surgical procedure, and multi-diagnosis entry set.
[0046] S4. Calculate the comprehensive weight score of the field differences based on the semantic label inherent weight, change type correction coefficient, change magnitude quantification coefficient, associated risk bonus coefficient, and department-defined adjustment coefficient, and determine the risk priority of the field differences based on the comprehensive weight score.
[0047] Specifically, the comprehensive weight score is calculated according to the following formula: ; in, This represents the overall weighted score. This represents the inherent weight of the semantic label. This indicates the change type correction factor. This represents the quantification coefficient of the change magnitude. This represents the associated risk factor. This indicates the department's custom adjustment coefficient; the high-priority label, medium-priority label, and low-priority label correspond to... They are 10, 5, and 1 respectively; the corresponding values for deleted and added fields are... The values for the changed fields are 1.2 and 1.0 respectively. The difference quantization result is taken, with a value range of [0, 1.2]; for text fields... Pick Numeric fields Calculate using the following formula: ; For enumerated fields, the change magnitude quantification coefficient Take the risk quantification coefficient corresponding to the changed integer code; For composite structured fields, the change magnitude quantification coefficient Take the percentage change of the sub-items in the composite field; When the corresponding semantic field has not undergone substantial changes =0; When there is no high-risk field associated with the current field difference, the associated risk bonus coefficient The coefficient is 0; when there is a high-risk field that is associated with the difference of the current field, the association risk bonus coefficient is 0. The coefficient is 0.3; when there are two or more high-risk fields that are correlated with the current field, the correlation risk factor is increased. It is 0.6; Departmental custom adjustment coefficient The value range is [0.7, 1.5], and the default value for the entire hospital is 1.0.
[0048] Specifically, it also includes: The number of cross-version modifications to the same semantic field under the same patient ID is counted. When the same semantic field under the same patient ID has been modified three or more times across versions, the semantic field is marked as a cyclically modified field, and a score is added for cyclic modifications. When the semantic field is modified less than 3 times across versions, the cyclic variable score will be increased. Set it to 0; and determine the final weight score according to the following formula: ; in, This represents the final weighted score; when A score of ≥6 indicates a high-priority warning. When 2≤ <6 indicates a medium priority level for monitoring; when If the value is less than 2, it is determined to be of low priority.
[0049] Structured differential data packet synchronous storage , , , , , It is used to trace the source of risk weights.
[0050] S5. Sort the differences in each field according to the risk priority, generate a two-column semantic comparison view with the old and new version semantic fields horizontally aligned, perform differential visual coding according to the difference type of the field differences, and generate an OFD-H archived difference report and a structured scientific research statistical report. This includes: The two-column semantic comparison view uses a highlighted indicator for newly added fields, a strikethrough indicator for deleted fields, a comparison indicator of old and new values for fields with changed values, and a high-priority risk warning indicator. Each semantic index is synchronously bound to the page logical coordinates and the document physical rendering coordinates, so that the original text can be located based on any coordinate after the layout is adjusted; The OFD-H archived difference report includes a change overview, high-priority change details, version change timeline, and operation log. The structured scientific research statistical report automatically desensitizes patient identity fields during export, and medical users, quality control administrators, and scientific research users have different report export permissions.
[0051] S6. Based on the user-selected target historical version and the set of semantic fields to be rolled back, read the corresponding version semantic snapshot, replace only the semantic fields to be rolled back with the field values in the target historical version, keep other diagnosis and treatment fields in the current latest version unchanged, generate a new incremental OFD-H electronic medical record version, and record the rollback operation log. Specifically, this includes: Copy all semantic fields of the current latest version, and replace only the fields in the semantic field set F to be rolled back with the field values of the target historical version T; Load the current latest version of OFD-H electronic medical record's layout description layer, page layout, image and text coordinates, font style and pagination rules, replace the custom index node corresponding to set F in a targeted manner and update the page logical coordinates and physical rendering coordinates synchronously; Write the newly generated version number, target historical version number, rollback operator, operation timestamp, rollback reason, list of semantic tags to be rolled back, final weight score and list of related affected fields in the custom metadata area of the OFD-H document; recalculate the document global hash and append the operation electronic signature; The newly generated OFD-H master document, semantic snapshot, and semantic index will be persistently stored. All historical versions will be set to read-only status, and the rollback operation log and the ordinary medical record modification log will be stored in separate tables.
[0052] This embodiment also includes: Collect logs of medical record version comparison operations, filter logs from test accounts, robot accounts, and temporary internship accounts, and deduplicate duplicate behaviors of the same operator, the same patient, and the same semantic field on a monthly basis. Manually marking key points, tracing the original text multiple times, filtering and displaying, and checking the report selection are marked as positive samples; filtering and hiding, manually ignoring, and viewing without clicking are marked as negative samples; and default browsing behavior is marked as neutral samples. The positive excitation coefficient Set to 1, negative attenuation coefficient Set to -0.6, neutral sample coefficient Set to 0; Update the basic inherent weights of semantic tags according to the following formula: ; in, This represents the updated base intrinsic weights. This represents the base inherent weights before the update, and α represents the monthly learning rate. ; This represents the total number of valid training samples corresponding to the semantic labels. Indicates the first The sample coefficients corresponding to each valid training sample, and According to the The sample type of each valid training sample is taken as follows: , or .
[0053] Update the underlying intrinsic weights Limited to [0.5, 15]; Generate mutually isolated weight configuration libraries according to the hospital-wide dimension and the department dimension respectively, load the new copyright reconfiguration of the department into 10% of the medical record comparison traffic of the corresponding department, and verify it continuously for 7 natural working days; When the number of anomaly detections during the verification period is lower than a preset threshold, the new copyright reconfiguration for the department is fully implemented; when the number of anomaly detections during the verification period reaches or exceeds the preset threshold, the new copyright reconfiguration for the department is reverted to the weight configuration of the previous version.
[0054] Example 2 This embodiment provides a method for tracking and comparing the evolution of electronic medical record versions based on OFD-H semantic indexing, including: Semantic indexing.
[0055] like Figure 1 As shown, the nodes in the OFD-H document that conform to the custom indexing specification in Chapter 16 of GB / T 33190-2016 are read. Patient identity fields, core diagnosis and treatment fields, laboratory test fields, and quality control signature fields are extracted according to business hierarchy.
[0056] The patient identity field includes name, ID number, and hospitalization number; the core diagnosis and treatment fields include chief complaint, present illness, past medical history, ICD-coded diagnosis, diagnosis description, treatment plan, medication record, and surgical name and procedure; the laboratory examination field includes laboratory test items, test values, reference range, imaging or examination conclusions, and critical value markers; the quality control signature field includes attending physician, reviewing physician, signature time, quality control score, and modification operation log.
[0057] Index integrity verification is used to determine whether all core diagnostic fields have standard semantic labels. When indexes are missing, the NLP-based structured model is invoked to fill in the missing fields. The NLP-based structured model adopts a three-level hybrid architecture.
[0058] The first level is a real-time online lightweight sequence labeling model. The basic encoder uses the Chinese medical RoBERTa-wwm-ext clinical pre-trained model, with a back-end concatenated linear chain CRF layer, and integrates a medical dictionary through a FLAT lattice structure to recognize medical record abbreviations, nested medical entities, and long phrases. This model is used in real-time archiving scenarios for single medical records, completing the extraction of chief complaint, diagnosis, medication, and laboratory test entities, as well as BIO sequence labeling.
[0059] The second level is an offline batch large-scale language model. This model adopts a domestically developed open-source medical fine-tuning large-scale model and structured instruction prompts for medical records, supporting cross-paragraph relationship extraction, ICD encoding mapping, and critical value marking for long texts such as discharge summaries and multi-page surgical records. For long texts, a sliding window segmented reasoning method is used to output a structured JSON set of diagnostic and treatment fields for offline batch parsing of existing unindexed medical records.
[0060] The third level is the rule engine's fallback correction layer. It corrects terminological ambiguities, numerical unit conversion errors, and results that do not conform to constraints by using the output of the medical terminology regularity rule base and the national standard medical data element constraint rule verification model. Data corrected by the rules is marked as the source of algorithmic supplementation and rule correction. Automatic supplementation only fills in missing fields in the original OFD-H index, without overwriting existing indexes, and is stored separately from the original indexes.
[0061] Privacy processing employs a three-tiered strategy. Permanently anonymized fields such as ID card numbers and mobile phone numbers use irreversible hashing, and the index does not store plaintext. Business-related fields such as hospital admission numbers and patient IDs use salted hashing, and the association is achieved through controlled mapping relationships within the hospital. Treatment fields such as diagnoses, medications, and laboratory tests retain their business semantics. Custom tags from different medical institutions are converted into unified semantic tags using a national standard medical data element mapping dictionary, which is synchronized monthly with the official data element update library.
[0062] The anonymized and normalized semantic fields are bound to version numbers, patient IDs, document generation times, and the codes of the person and institution who modified them. A semantic index table is then constructed and written to the semantic index database. An example of the index representation is shown below.
[0063] Table 1: Index Table The medical semantic association graph adopts a two-layer graph structure consisting of entity nodes and medical business edges. Entity nodes are based on normalized semantic fields, and each node carries at least a unique node ID, unified semantic label, patient ID, current version number, field data type, field original value, ICD code, drug code, test item code, critical value marker, and semantic basic risk weight.
[0064] The entity nodes in the graph include diagnostic entity sets, medication administration entity sets, laboratory examination entity sets, and surgical or treatment operation entity sets. Directed association edges are generated based on the national standard electronic medical record data element association rule base and NLP entity co-occurrence reasoning. Each association edge stores the association type and association strength coefficient. The association strength coefficient of a fixed strong rule association satisfies: ; Fixed strong rule associations include associations from diagnosis to medication, diagnosis to surgery, critical value testing to treatment plan, and surgery to postoperative testing. The association strength coefficient of weak inference associations based on text co-occurrence satisfies: ; Text co-occurrence weak inference associations are generated based on the dependency relationships of symptoms, medications, and examination items in the same medical record paragraph; when multiple weak associations are superimposed, the corresponding association strength coefficient can be increased.
[0065] When adding or modifying an OFD-H medical record, only the changed fields of the current version are parsed, and the corresponding entity nodes and their upstream and downstream related edges are added or updated. Entities and relationships that have not been changed are retained from historical graph data. Using the patient's visit ID as the primary key, all historical versions of the patient's entities and related edges are merged into a comprehensive semantic relationship graph for the entire patient domain, and the effective version range of the related edges is recorded. Nodes corresponding to fields deleted in the new version are marked as invalid, and the original related edges are retained with an invalidation timestamp appended.
[0066] The graph query interface receives the changed semantic node ID, recursively queries high-risk entities that are directly or indirectly related, counts the number of associations, and outputs the association risk bonus coefficient Klink; at the same time, it outputs a list of diagnostic fields that may be affected by the change based on the strength of the association edges.
[0067] Each version is archived with an independent semantic snapshot generated simultaneously. Snapshots are persisted in a tiered manner, using high-speed SSD storage for 0-30 days, low-cost object storage for 30 days-3 years, and only index metadata for older versions. Snapshots are decoupled from the original OFD-H file, allowing retrieval of historical semantic evolution data even if the original file is unavailable.
[0068] Perform version semantic difference and risk calculation.
[0069] like Figure 2 As shown, when a user initiates a comparison request between any two versions, the system first reads the old version A, the new version B, and the corresponding patient ID. Based on the matching of patient IDs, it further compares the patient identity hash value. If the patient IDs are the same but the patient identity hash values are different, the difference calculation is terminated and a security alert log is generated to intercept erroneous comparisons across patient medical records.
[0070] The complete indexing data for both versions is extracted from the semantic index library. Label normalization is then performed again using a medical data metadata mapping dictionary, and field alignment is completed using the unified semantic label as the matching benchmark. For fields with multiple records under the same semantic label, a one-to-one correspondence can be established using drug codes, test item codes, record time, unique entry identifiers, or combinations thereof.
[0071] Field differences include newly added fields, deleted fields, and fields with changed values. Newly added fields are semantic fields that exist only in the new version B; deleted fields are semantic fields that exist only in the old version A; fields with changed values are fields with the same semantic tag that exist in both versions but have different values. Value changes further include numerical fluctuations, text replacements, and changes to enumeration parameters.
[0072] Text fields employ a medical-domain word vector weighted edit distance algorithm. Medical record text is segmented into weighted word units based on ICD encoding, drug names, symptom terms, and general descriptive text. Key diagnostic terms are weighted at 3, and general descriptive text at 1. Text discrepancy is then assessed. Calculate using the following formula: ; in, The weight represents the text difference degree, and the weight represents the word weight corresponding to the word segmentation unit. Indicates the first The lexical weights corresponding to each word segmentation unit; This indicates that when converting old version text to new version text, for the first... The number of insertion, deletion, or replacement operations performed by each word segmentation unit; This represents the sum of the weights of each word segmentation unit in the old and new versions of the text; the weight coefficient for key diagnostic terms is 3, and the weight coefficient for ordinary descriptive text is 1; when A value ≥ 0.2 is considered a substantial text replacement; a value < 0 is considered a substantial text replacement. A value less than 0.2 is considered a minor text editing adjustment. When the value is 0, it is determined that the text has not changed; Numerical fields employ a tiered threshold difference judgment algorithm. Critical value fields use national standard medical safety thresholds, while routine test fields use department-defined floating thresholds T. Absolute numerical differences are also considered. Calculate using the following formula: ; in, Represents the absolute difference between the values. This indicates the new version of the field value. This indicates the old version field value; T represents the national standard medical safety threshold or the department-defined floating threshold. A value greater than T is marked as a significant numerical fluctuation, while a value less than T is marked as a significant fluctuation. When the value is ≤T, it is marked as a small numerical fluctuation. When the value is 0, it is determined that the value has not changed.
[0073] Enumerated fields map options such as medication frequency, disease severity, specimen type, and treatment status to nationally standardized integer codes and directly compare the old and new codes. Composite structured fields are broken down into multiple sub-semantic entries with unique identifiers. The addition, deletion, and value changes of sub-entries are identified through the intersection and difference of sets. When the proportion of changed sub-entries exceeds 30%, the overall risk level of the composite field is increased.
[0074] The system tracks the number of times the same semantic field under the same patient ID has been modified across versions. When the cumulative number of modifications reaches 3 or more, a quality control focus marker is added, and the field is pushed to the medical record quality control module.
[0075] The differential engine queries the medical semantic association graph to obtain other diagnosis and treatment fields linked to the currently changed field and the scope of the change propagation. It then encapsulates the semantic tags, difference types, old values, new values, change time, modifier, related impact fields, and risk parameters into a structured JSON difference data package.
[0076] Risk Priority Comprehensive Weighting The calculation is based on a five-dimensional fusion of semantic tag inherent weight, change type correction coefficient, change magnitude quantification coefficient, associated risk bonus coefficient, and department-defined adjustment coefficient. ; In the formula, This represents the overall weighted score. This represents the inherent weight of the semantic label. This indicates the change type correction factor. This represents the quantification coefficient of the change magnitude. This represents the associated risk factor. This indicates a department-defined adjustment factor. High-priority labels include those for diagnosis, ICD coding, medication, surgery, and critical value testing. The priority label is 10; among routine tests, treatment plans, and imaging findings. The priority is 5; low-priority tags such as formatting text, punctuation, and modifiers. The value is 1.
[0077] Delete field Version 1.2, with the addition of new fields For 1.0, the value of the field is changed. The score is calculated based on differences such as weighted edit distance or the percentage of numerical fluctuation differences, with a value range of [0, 1.2]. (Text field) Directly adopt Numeric fields Calculate using the following formula: ; Fields of enumeration classes or composite collection classes Take the percentage of changed sub-items; when there are no substantial changes =0. When there are no associated high-risk fields, one associated high-risk field exists, or two or more associated high-risk fields exist. The values are 0, 0.3, and 0.6, respectively. Provided by the department's self-learning weight configuration library, the value range is [0.7, 1.5], and the hospital-wide benchmark default value is 1.0.
[0078] The system according to Determine the three priority levels: ≥6 indicates a high-priority warning, 2≤ <6 is considered a medium priority. <2 indicates low priority. If the cross-version cycle change flag is triggered 3 or more times, the cycle change score will be increased. =3, and the final weighted score is calculated according to the following formula: ; In the formula, This represents the final weight score. Difference data packets are stored synchronously. , , , , , This is so that quality control personnel can see the source of risk weights.
[0079] The priority and corresponding field examples are shown in Table 2.
[0080] Table 2: Priority and Corresponding Fields Visualize differences, trace the source of the original text, and generate reports.
[0081] like Figure 3 As shown, the difference visualization rendering and report generation module receives a structured JSON difference data packet, arranges the difference items in descending order according to the final weight score, and displays the standardized semantic fields of the old and new versions in the left and right columns of the page, respectively. Identical semantic tags are horizontally aligned to avoid coordinate misalignment caused by pagination, line breaks, or layout changes.
[0082] New fields are marked with a "new" badge and highlighted; deleted fields are marked with a "delete" badge and strikethrough; fields with changed values display a comparison between the old and new content; high-priority changes are marked with a risk warning and displayed at the top. Colors are only used for visual coding of the business interface and do not constitute a limitation on the implementation method.
[0083] Each semantic index stores both page logical coordinates and document physical rendering coordinates. When a user clicks on a difference entry, the system prioritizes locating the semantic object based on the page logical coordinates and then uses the physical rendering coordinates for display verification. If a layout adjustment causes one type of coordinate to become invalid, the other coordinate is used to complete the original text jump, achieving bidirectional linkage between the difference summary and the original medical record content.
[0084] The system automatically generates OFD-H archive discrepancy reports and research statistical reports. The OFD-H archive discrepancy report includes a change overview, details of high-priority changes, a version change timeline, and operator logs, and is archived in conjunction with the medical record system. The research statistical reports record discrepancy details in structured field format, supporting statistical analysis such as diagnostic modification frequency, medication change trends, and critical value adjustment distribution.
[0085] Report export employs a tiered access control system. Healthcare users can only export single-patient reports, while quality control administrators can export reports in batches according to their permissions. Research reports are automatically anonymized for sensitive patient identification fields. The front-end also supports viewing only high-priority changes, manually marking key changes, batch exporting detailed differences, and viewing operation logs in conjunction with the system.
[0086] Version semantic snapshots and field-level rollback.
[0087] like Figure 4As shown, after the user selects the target historical version T and the set of semantic fields to be rolled back F, the system reads the semantic snapshot of version T and extracts the historical field values corresponding to set F. Before the rollback is executed, the old and new values of the fields and the associated impact range are displayed. The replacement is only executed after the user confirms again; if the user cancels the confirmation, the process terminates and no data changes are generated.
[0088] Rollback supports batch selection by diagnosis group, medication group, and testing group, and previews the old and new values of all fields in the entire group before execution. All archived historical versions are permanently kept in read-only state and cannot be overwritten, deleted, or edited.
[0089] After completing semantic field replacement, semantic index writing, and rollback log persistence, the incremental OFD-H document reconstruction pipeline is started. First, the layout description layer, page layout, image and text coordinates, font styles, pagination rules, and signature layout of the latest version of the OFD-H document are read, and static layout resources unrelated to the fields to be rolled back are fully reused.
[0090] Secondly, OFD-H custom indexing nodes are located based on the unified semantic tags corresponding to set F. For indexing nodes in set F, text values, numerical values, ICD codes, and medication parameters are replaced with field values from historical snapshots; other indexing nodes, static text, images, tables, and signatures remain unchanged; the page logical coordinates and physical rendering coordinates of the modified nodes are updated synchronously.
[0091] Subsequently, rollback traceability metadata is added to the OFD-H document's custom metadata area, including the newly generated version number Vn+1, the target historical version T, the rollback operator ID, the operation timestamp, the rollback reason, the list of semantic tags to be rolled back, the final weight score Wfinal, and the list of related impact fields. This metadata is incorporated into the document's global hash and electronic signature coverage for integrity verification and operation traceability.
[0092] After completing field replacement and metadata appending, the OFD-H document global file hash is recalculated, and the digital signature process of the operating physician or quality control administrator is triggered to append an electronic signature to the newly generated document. The signature information is bound to the rollback operation log.
[0093] The newly generated OFD-H master document is stored in the business high-speed storage. Simultaneously, all semantic fields are extracted to generate a new version semantic snapshot, which is then written to the semantic index library. Incremental updates to the medical semantic association graph are performed. Original historical version files remain read-only, and the new version is isolated from historical versions. The system also generates an OFD-H archive difference report containing only the changes to the rollback fields, risk classification, and operation logs. Rollback operation logs and regular medical record modification logs are stored in physically separate tables.
[0094] Model self-learning and threshold tuning.
[0095] like Figure 5 As shown, the model self-learning and threshold optimization module is used to dynamically adjust the risk weights of semantic fields based on the actual operational behaviors of medical staff and quality control personnel. The system collects patient IDs, operator identities, operation times, version comparisons, manually marked items, filtered items, repeatedly referenced original text fields, report selection types, and manually ignored items in real time, and binds them to corresponding semantic tags, change types, change magnitudes, and final weight scores. Behavior logs are written to a separate behavior database and are not stored together with medical record business data.
[0096] Sample cleaning included account filtering, duplicate behavior deduplication, and tiered assignment. Logs from test accounts, robot background task accounts, and temporary internship accounts were filtered. Repeated clicks and markers within a short period for the same operator, patient, and semantic field were merged by monthly time window. Manually marking key points, multiple source tracing views, filtering for only display, and exporting reports were considered positive samples; batch filtering for hiding, manual ignoring, and viewing without clicks were considered negative samples; and only default browsing was considered neutral samples.
[0097] positive excitation coefficient =1, negative attenuation coefficient =-0.6, neutral sample coefficient =0. Valid samples from the entire hospital and each department are aggregated monthly, and the inherent weights of the semantic labels are recalculated using a linear regression optimization model. The weight update formula is: ; in, This represents the updated base intrinsic weights. This represents the base inherent weights before the update, and α represents the monthly learning rate. ; This represents the total number of valid training samples corresponding to the semantic labels. Indicates the first The sample coefficients corresponding to each valid training sample, and According to the The sample type of each valid training sample is taken as follows: , or .
[0098] Training output The weight is limited to [0.5, 15] to restrict the magnitude of a single weight change. A hospital-wide general weight configuration library and a department-specific independent weight configuration library are generated, physically isolated from each other. New weights for a department do not take full effect immediately; instead, they are loaded into 10% of the department's medical record comparison traffic, while the remaining 90% continue to use the old weights, running continuously for 7 calendar days. During the gray-scale testing period, the frequency of missed and incorrect labeling of high-priority changes is counted; when the number of anomalies is below a preset threshold, the system switches to the full new weights; when the number of anomalies reaches or exceeds the preset threshold, the new weights are abandoned and the system reverts to the previous version.
[0099] When calculating the risk of a single change, the latest basic weight of the corresponding department is read. The visualization module reorders the difference entries according to the updated weights; weight updates, gray-scale switching, and rollbacks all generate operation and maintenance audit logs containing update time, operator, old and new weights, and verification results. The above collection, cleaning, training, gray-scale release, and module loading processes are repeated monthly. The quality control administrator can lock the weights of specified fields to prevent the model from automatically adjusting specific quality control fields.
[0100] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0101] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0102] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0103] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0104] Finally, it should be noted that the above specific embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to examples, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method for tracking and comparing the evolution of electronic medical record versions based on OFD-H semantic indexing, characterized in that, include: Semantic fields of custom indexing nodes in the old and new versions of OFD-H electronic medical records are parsed and extracted respectively. Indexing integrity verification, automatic filling of missing fields, privacy desensitization and label normalization are performed on the semantic fields in sequence. The normalized semantic fields are bound to the corresponding version metadata to build a semantic indexing index. A medical semantic association graph and version semantic snapshot are built based on the normalized semantic fields. Using the normalized unified semantic label as the matching benchmark, the semantic fields of the old version OFD-H electronic medical record and the new version OFD-H electronic medical record are aligned. The differences in the aligned fields are divided into newly added fields, deleted fields and value changed fields. The corresponding difference quantification results are calculated according to the data type of the semantic fields that have differences. Based on the semantic tag inherent weight of the field difference, the change type correction coefficient, the change magnitude quantification coefficient, the associated risk bonus coefficient, and the department-defined adjustment coefficient, the comprehensive weight score of the field difference is calculated, and the risk priority of the field difference is determined based on the comprehensive weight score. The differences in each field are sorted according to the risk priority, and a two-column semantic comparison view with the old and new version semantic fields horizontally aligned is generated. Differential visual coding is performed according to the difference type of the field differences, and OFD-H archived difference report and structured scientific research statistical report are generated. Based on the target historical version and the set of semantic fields to be rolled back selected by the user, the corresponding version semantic snapshot is read. Only the semantic fields to be rolled back are replaced with the field values in the target historical version, while keeping other diagnosis and treatment fields in the current latest version unchanged. A new incremental OFD-H electronic medical record version is generated, and the rollback operation log is recorded. The normalized semantic fields are bound to version metadata to construct a semantic index, and a medical semantic association graph and a version semantic snapshot are constructed based on the semantic fields, including: The medical semantic association graph adopts a two-layer graph structure consisting of entity nodes and medical business edges. The entity nodes include at least diagnostic entities, medication administration entities, laboratory examination entities, and surgical or treatment operation entities. Each medical business edge stores the association type and association strength coefficient. ; The association strength coefficient of fixed rule associations satisfies: ; The association strength coefficient of text co-occurrence inference satisfies: ; When a semantic field is deleted in the new version, the corresponding entity node is marked as invalid and the original associated edges and invalid timestamps are retained; the medical semantic association graph is based on the patient's visit ID and integrates the patient's historical versions, and records the effective version range for each associated edge; The version semantic snapshots are persisted according to a hierarchical rule: 0-30 days are stored in high-speed storage media, 30 days-3 years are stored in object storage media, and more than 3 years are only retained as index metadata. Generate a two-column semantic comparison view with the old and new version semantic fields horizontally aligned. Perform differential visual coding based on the difference type, and generate OFD-H archived difference reports and structured scientific research statistical reports, including: The dual-column semantic comparison view uses a highlighted indicator for newly added fields, a strikethrough indicator for deleted fields, a comparison indicator for old and new values of fields with changed values, and a high-priority risk warning indicator. Each semantic index is synchronously bound to the page logical coordinates and the document physical rendering coordinates, so that the original text can be located based on any coordinate after the layout is adjusted; The OFD-H archived difference report includes a change overview, high-priority change details, version change timeline, and operation log. The structured scientific research statistical report automatically desensitizes patient identity fields during export, and medical users, quality control administrators, and scientific research users have different report export permissions. Based on the user-selected target historical version and the set of semantic fields to be rolled back, the corresponding version semantic snapshot is read. Only the semantic fields to be rolled back are replaced with the field values in the target historical version, while other diagnosis and treatment fields remain unchanged. A new incremental OFD-H electronic medical record version is generated, and a rollback operation log is recorded, including: Copy all semantic fields of the current latest version, and replace only the fields in the semantic field set F to be rolled back with the field values of the target historical version T; Load the current latest version of OFD-H electronic medical record's layout description layer, page layout, image and text coordinates, font style and pagination rules, replace the custom index node corresponding to set F, and synchronously update the page logical coordinates and physical rendering coordinates; Write the newly generated version number, target historical version number, rollback operator, operation timestamp, rollback reason, list of semantic tags to be rolled back, final weight score and list of related affected fields in the custom metadata area of the OFD-H document; recalculate the document global hash and append the operation electronic signature; The newly generated OFD-H master document, semantic snapshot, and semantic index will be persistently stored. All historical versions will be set to read-only status, and the rollback operation log and the ordinary medical record modification log will be stored in separate tables.
2. The method for tracking and comparing the evolution of electronic medical records based on OFD-H semantic indexing according to claim 1, characterized in that, Before conducting a comparative analysis, the following is also included: Obtain the old version and the new version of OFD-H electronic medical record corresponding to the same medical process, perform two-layer identity verification based on the medical visit ID and the patient identity hash value, and terminate the difference calculation and generate a security alarm log when the medical visit ID is inconsistent or the patient identity hash value is mismatched.
3. The method for tracking and comparing the evolution of electronic medical records based on OFD-H semantic indexing according to claim 1, characterized in that, Perform privacy anonymization on the extracted results, including: Irreversible hashing is used for ID card numbers and mobile phone numbers, salted hashing is used for hospitalization numbers and patient IDs and business association is carried out through controlled mapping relationships within the hospital, and business semantics are preserved for diagnosis, medication and laboratory treatment fields. The semantic index includes at least the version number, patient ID, field semantic label, field value, data type, generation time, modifier, and indexing source.
4. The method for tracking and comparing the evolution of electronic medical records based on OFD-H semantic indexing according to claim 1, characterized in that, The corresponding difference quantification results are calculated based on the field data type, including: The calculation includes quantitative results of differences such as textual difference degree, absolute numerical difference, enumerated encoding difference, and the proportion of changes in sub-items of composite fields; The text difference degree is calculated according to the following formula: ; in, The weight represents the text difference degree, and the weight represents the word weight corresponding to the word segmentation unit. Indicates the first The lexical weights corresponding to each word segmentation unit; This indicates that when converting old version text to new version text, for the first... The number of insertion, deletion, or replacement operations performed by each word segmentation unit; This represents the sum of the weights of each word segmentation unit in the old and new versions of the text; the weight coefficient for key diagnostic terms is 3, and the weight coefficient for ordinary descriptive text is 1; when A value ≥ 0.2 is considered a substantial text replacement; a value < 0 is considered a substantial text replacement. A value less than 0.2 is considered a minor text editing adjustment. When the value is 0, it is determined that the text has not changed; The absolute difference of the numerical fields is calculated according to the following formula: ; in, Represents the absolute difference between the values. This indicates the new version of the field value. This indicates the old version field value; T represents the national standard medical safety threshold or the department-defined floating threshold. A value greater than T is marked as a significant numerical fluctuation, while a value less than T is marked as a significant fluctuation. When the value is ≤T, it is marked as a small numerical fluctuation. When the value is 0, it is determined that the value has not changed; The calculation steps for the enumeration encoding differences include: For enumerated fields, each enumeration option of the enumerated field is mapped to a corresponding unified integer code, and the integer codes of the corresponding enumerated fields in the new version of the electronic medical record are compared with those in the old version of the electronic medical record. When the integer codes of the new version of electronic medical records are inconsistent with those of the old version, it is determined that the corresponding enumeration parameters have changed, and the corresponding associated risk level is determined based on the changed integer codes. When the integer codes are consistent, it is determined that the corresponding enumeration parameters have not changed; wherein, the enumeration fields include at least one of medication frequency, disease grade, specimen type, and treatment status; The steps for calculating the percentage change in the composite field sub-item include: For composite structured fields, the composite structured fields in the new version of electronic medical records and the old version of electronic medical records are decomposed into multiple independent sub-semantic entries, and a unique identifier is assigned to each of the sub-semantic entries. The intersection and difference sets of the sub-semantic entries corresponding to the new version of the electronic medical record and the sub-semantic entries corresponding to the old version of the electronic medical record are calculated based on the unique identifier. Sub-semantic entries that exist in the old version of the electronic medical record but not in the new version of the electronic medical record are marked as deleted sub-items. Sub-semantic entries that exist in the new version of the electronic medical record but not in the old version of the electronic medical record are marked as added sub-items. Sub-semantic entries that have the same unique identifier but have inconsistent internal values or text content are marked as changed sub-item values. The number of modified sub-semantic entries in the composite structured field is counted, and the proportion of modified sub-semantic entries to the total number of sub-semantic entries in the composite structured field is calculated. When the proportion exceeds 30%, the overall change risk level of the composite structured field is increased. The composite structured field includes at least one of complete medication plan, surgical procedure, and multi-diagnosis entry set.
5. The method for tracking and comparing the evolution of electronic medical records based on OFD-H semantic indexing according to claim 1, characterized in that, The overall weighted score is calculated according to the following formula: ; in, This represents the overall weighted score. This represents the inherent weight of the semantic label. This indicates the change type correction factor. This represents the quantification coefficient of the change magnitude. This represents the associated risk factor. This indicates the department's custom adjustment coefficient; High-priority tags, medium-priority tags, and low-priority tags correspond to They are 10, 5, and 1 respectively; The corresponding fields for deleting and adding fields The values for the changed fields are 1.2 and 1.0 respectively. The difference quantification result is taken, and the value range is [0, 1.2]. Text fields Pick Numeric fields Calculate using the following formula: ; in, Indicates the absolute difference in values; T represents the national standard medical safety threshold or the department's custom floating threshold; For enumerated fields, the change magnitude quantification coefficient Take the risk quantification coefficient corresponding to the changed integer code; For composite structured fields, the change magnitude quantification coefficient Take the percentage change of the sub-items in the composite field; When the corresponding semantic field has not undergone substantial changes =0; When there is no high-risk field associated with the current field difference, the associated risk bonus coefficient The coefficient is 0; when there is a high-risk field that is associated with the difference of the current field, the association risk factor is increased. The coefficient is 0.3; when there are two or more high-risk fields that are correlated with the current field, the correlation risk factor is increased. It is 0.6; Departmental custom adjustment coefficient The value range is [0.7, 1.5], and the default value for the entire hospital is 1.
0.
6. The method for tracking and comparing the evolution of electronic medical records based on OFD-H semantic indexing according to claim 1, characterized in that, Also includes: The number of cross-version modifications to the same semantic field under the same patient ID is counted. When the same semantic field under the same patient ID has been modified three or more times across versions, the semantic field is marked as a cyclically modified field, and a score is added for cyclic modifications. When the semantic field is modified less than 3 times across versions, the cyclic variable score will be increased. Set it to 0; and determine the final weight score according to the following formula: ; in, This represents the final weighted score; when A score of ≥6 indicates a high-priority warning. When 2≤ <6 indicates a medium priority level for monitoring; when If the value is less than 2, it is determined to be of low priority.
7. The method for tracking and comparing the evolution of electronic medical records based on OFD-H semantic indexing according to claim 1, characterized in that, Also includes: Collect logs of medical record version comparison operations, filter logs from test accounts, robot accounts, and temporary internship accounts, and deduplicate duplicate behaviors of the same operator, the same patient, and the same semantic field on a monthly basis. Manually marking key points, tracing the original text multiple times, filtering and displaying, and checking the report selection are marked as positive samples; filtering and hiding, manually ignoring, and viewing without clicking are marked as negative samples; and default browsing behavior is marked as neutral samples. The positive excitation coefficient Set to 1, negative attenuation coefficient Set to -0.6, neutral sample coefficient Set to 0; Update the basic inherent weights of semantic tags according to the following formula: ; in, This represents the updated base intrinsic weights. This represents the base inherent weights before the update, and α represents the monthly learning rate. ; This represents the total number of valid training samples corresponding to the semantic labels. Indicates the first The sample coefficients corresponding to each valid training sample, and According to the The sample type of each valid training sample is taken as follows: , or ; Update the underlying intrinsic weights Limited to [0.5, 15]; Generate mutually isolated weight configuration libraries according to the hospital-wide dimension and the department dimension respectively, load the new copyright reconfiguration of the department into 10% of the medical record comparison traffic of the corresponding department, and verify it continuously for 7 natural working days; When the number of anomaly detections during the verification period is lower than a preset threshold, the new copyright reconfiguration for the department is fully implemented; when the number of anomaly detections during the verification period reaches or exceeds the preset threshold, the new copyright reconfiguration for the department is reverted to the weight configuration of the previous version.
