A multimodal medical document information extraction and structuring method and system
By constructing a unified visual recognition abstract interface and a cross-page semantic merging algorithm, the problems of cross-page semantic fragmentation and strong coupling of visual models in medical document information extraction are solved, enabling data integrity and accuracy management, reducing system maintenance costs, and providing security for clinical decision-making.
Patent Information
- Application Number
- CN202611122732.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-27
- Publication Date
- 2026-11-27
AI Technical Summary
Existing medical document information extraction technologies have shortcomings in cross-page semantic integration, visual model decoupling and expansion, and timely management of test data, resulting in duplicate data entry, omission of key information, poor system scalability, high maintenance costs, and clinical safety risks.
A unified visual recognition abstract interface (VisionProvider pattern) is constructed to achieve pluggable decoupling of visual models. Multi-page document data is integrated through cross-page semantic merging algorithm, and data timeliness is managed through a time series verification mechanism.
It achieves pluggable decoupling of the visual recognition model, solves the problem of semantic fragmentation across pages, ensures data integrity and accuracy, reduces system maintenance costs, prevents historical data from being misused for clinical decision-making, provides outlier detection and trend labeling capabilities, and improves the efficiency and reliability of clinical data analysis.
Smart Images

Figure CN123182879A_ABST
Abstract
Description
Technical Field
[0001] This application relates to a method and system for extracting and structuring multimodal medical document information, belonging to the field of intelligent medical document processing technology. Background Technology
[0002] With the deepening advancement of medical informatization, clinical diagnosis and treatment activities generate a large number of multi-page heterogeneous medical documents stored in formats such as PDF (Portable Document Format), including inpatient records, laboratory reports, past medical history, and discharge summaries. Automated information extraction and structured processing of these documents are an important foundation for realizing intelligent medical applications such as clinical decision support, nutritional assessment, and chronic disease management.
[0003] Currently, the industry typically uses OCR technology to recognize text in medical documents, and then combines it with Natural Language Processing (NLP) methods to extract fields from the recognition results. However, existing technical solutions have the following main problems: First, existing OCR solutions generally adopt a single-page independent recognition mode, which fails to effectively handle the semantic continuity problem of the same patient across pages and documents. In actual clinical scenarios, the test indicators of the same patient are often distributed across different pages of multiple documents such as admission records and test reports. Simple single-page recognition and splicing processing can easily lead to duplicate data entry or omission of key information, seriously affecting the completeness and accuracy of information extraction.
[0004] Secondly, the current method of calling visual recognition models is highly coupled with the downstream text processing logic. When it is necessary to switch the underlying visual model (such as from GLM-4V to Qwen-VL) or change the AI (Artificial Intelligence) service provider, it is often necessary to reconstruct the entire processing flow on a large scale, resulting in poor system scalability, high maintenance costs, and difficulty in adapting to the rapid iteration of AI models.
[0005] Third, medical laboratory indicators exhibit significant time-series characteristics. The same test item (such as serum creatinine, albumin, etc.) for the same patient may be tested multiple times during hospitalization, generating multiple timestamped historical data. Existing solutions lack a systematic management mechanism for the timeliness of laboratory data, which can easily lead to the misuse of historical laboratory data that has exceeded the effective time window for current clinical decision-making or nutritional prescription calculations, posing a clinical safety risk.
[0006] In summary, existing medical document information extraction technologies have significant shortcomings in three dimensions: cross-page semantic integration, visual model decoupling and expansion, and timely management of test data. There is an urgent need for a new technical solution that can systematically solve the above problems. Summary of the Invention
[0007] The purpose of this invention is to overcome the aforementioned deficiencies in the existing technology and provide a method and system for extracting and structuring multimodal medical document information. By constructing a unified visual recognition abstract interface (Provider pattern) to achieve pluggable decoupling of the visual model, by using a cross-page semantic merging algorithm to integrate patient data from multiple pages of documents, and by using a time series verification mechanism for test indicators to manage the timeliness of test data, the invention solves the three core problems of semantic fragmentation in multiple pages of medical documents, strong coupling of visual models, and misuse of the timeliness of test data.
[0008] To achieve the above objectives, the first aspect of the present invention provides a method for extracting and structuring multimodal medical document information, comprising the following steps: Step 1: PDF page splitting and preprocessing.
[0009] The system receives uploaded multi-page medical PDF documents and breaks them down into individual page image units. Each page image unit undergoes a quality assessment, including blur detection and tilt angle detection.
[0010] Blur detection determines the sharpness of a page image by calculating a blur score.
[0011] Optionally, the blur detection uses the Laplacian operator to calculate the image blur score; the preset blur threshold is selected from any value of 30, 40, 50, 60, 70 or a range of any two. Preferably, the preset fuzziness threshold is 50. Page images with fuzziness scores lower than the preset fuzziness threshold are determined to be fuzzy pages, and image denoising processing is performed. In one specific implementation, the image denoising process employs Gaussian denoising filtering.
[0012] Tilt angle detection determines whether a page image is tilted by detecting the tilt angle of text lines.
[0013] Optionally, the tilt angle detection uses Hough Transform to detect the tilt angle of the text line; the preset tilt angle threshold is selected from any value of 1°, 2°, 3°, 4°, 5° or any range of two. Preferably, the preset tilt angle threshold is 2°. Page images with a tilt angle exceeding the preset tilt angle threshold are determined to be tilted pages and rotation correction processing is performed. In one specific embodiment, the rotation correction process employs affine transformation rotation correction.
[0014] Step 2: Decoupled calls based on the unified visual recognition abstract interface.
[0015] The system defines a unified visual recognition abstract interface, VisionProvider, which includes a standard method, extract. This standard method takes page image units as input and outputs a structured intermediate representation format containing text blocks, table areas, and layout areas. Different visual recognition models implement this unified visual recognition abstract interface, becoming pluggable visual recognition providers. The configuration center dynamically selects a specific visual recognition provider instance to execute the recognition task at runtime based on preset environment variables or routing strategies. After the recognition results are uniformly converted into the intermediate representation format, they are passed to the downstream text language model for semantic understanding and field extraction.
[0016] The unified visual recognition abstraction interface supports the configuration center to dynamically switch the underlying visual recognition model at runtime based on the routing strategy without modifying the downstream semantic understanding logic.
[0017] For example, when switching the visual recognition model from GLM-4V to Qwen-VL, only the Provider configuration item in the configuration center needs to be modified, without modifying any code in the downstream semantic understanding module, cross-page merging module, timing verification module, and manual review module.
[0018] In a preferred embodiment, the routing strategy includes: for page images with image quality higher than a preset quality threshold, prioritizing the selection of a lower-cost visual recognition provider; for page images with image quality lower than the preset quality threshold, automatically switching to a visual recognition provider with stronger recognition capabilities, thereby optimizing the overall cost-effectiveness of the system while ensuring recognition quality.
[0019] Step 3: Cross-page semantic merging.
[0020] For multi-page document recognition results belonging to the same patient, the following cross-page semantic merging processing is performed: (1) Assign a unique page number and document source identifier to each page of the recognition results; (2) Extract the patient identity anchor field from the recognition results on each page. The patient identity anchor field consists of a combined hash value of the patient's name, hospital number, and date of birth.
[0021] In one specific implementation, the combined hash value is calculated using the SHA-256 algorithm from the concatenated string of the patient's name, hospital number, and date of birth. By comparing the hash values of the patient identity anchor field in the recognition results of each page, it is confirmed that the recognition results of multiple pages belong to the same patient instance. (3) Construct a mapping table between fields and page numbers, and perform merging processing on the values of the same semantic field on different pages according to the batch determination rules. The batch determination rules are as follows: when the inspection date and the inspection item code are the same, they are determined to be the same batch, and the OCR recognition result with higher confidence is used as the final value; when the inspection dates are different, they are determined to be different batches, and each result is retained as an independent time series data point without performing an overwrite merging operation. (4) For table content that is broken across pages, perform table splicing and restoration processing based on the similarity of the header fields and the continuity of the row numbers of adjacent pages to restore the broken table into a complete logical table unit.
[0022] In a preferred embodiment, whether a table is a page break is determined by calculating the cosine similarity of the header fields of adjacent pages; the preset similarity threshold is selected from any value of 0.75, 0.80, 0.85, 0.90, 0.95 or a range of any two of these values. Preferably, the preset similarity threshold is 0.85.
[0023] Step 4: Verify the time series of the verification indicators.
[0024] For multiple identification results of the same patient and the same test item, a time series is constructed by sorting the test dates, and the following validation processing is performed: (1) Outlier detection: Calculate the moving average of the time series with a preset window size, and calculate the deviation of each test value. The deviation is calculated as follows: Deviation = |Current test value - Moving average| / Moving average × 100%. If the deviation of a test value exceeds the preset deviation threshold, the data point is marked as pending manual review and highlighted in the manual review interface.
[0025] Optionally, the preset window size is selected from any value of 2, 3, 4, 5 or a range of values composed of any two. Preferably, the preset window size is 3 data points.
[0026] Optionally, the preset deviation threshold is selected from any value of 10%, 15%, 20%, 30%, 40%, or a range of any two of these values. Preferably, the preset deviation threshold is 20%.
[0027] (2) Timeliness verification: When generating clinical prescriptions or nutrition plans, only the latest test data with test dates within the preset timeliness window are used as the calculation input. Historical test data outside the preset timeliness window are only used as a trend analysis reference and are not included in the calculation. The preset timeliness window is a configurable parameter that can be flexibly adjusted according to clinical needs.
[0028] Optionally, the preset time window is selected from any value of 7 days, 10 days, 14 days, 21 days, and 30 days, or a range of any two of them; Preferably, the preset time window is 14 days.
[0029] (3) Trend labeling: The trend labels of the test indicators are automatically generated based on the time series data. The trend labels include rising, falling, and stable. The trend judgment rules are as follows: Divide the time series into two equal parts in chronological order, and calculate the mean of the first half and the mean of the second half respectively; if the change of the mean of the second half relative to the mean of the first half exceeds the preset trend threshold, and the mean of the second half is greater than the mean of the first half, then it is labeled as rising; if the mean of the second half is less than the mean of the first half and the change exceeds the preset trend threshold, then it is labeled as falling; otherwise, it is labeled as stable.
[0030] Optionally, the preset trend threshold is selected from any value of 3%, 5%, 10%, 15% or a range of any two of them; Preferably, the preset trend threshold is 5%. The trend labels are output together with the structured extraction results to provide auxiliary reference information for clinical decision-making.
[0031] Step 5: Manual review.
[0032] The structured extraction results, along with the corresponding original page image fragments and the confidence scores of each field, are pushed to the manual review interface. Reviewers will manually check and correct fields with confidence scores lower than the preset confidence threshold. The corrected data will be used as the final structured output.
[0033] Optionally, the preset confidence threshold is selected from any value of 0.70, 0.75, 0.80, 0.85, 0.90 or a range of any two of them; Preferably, the preset confidence threshold is 0.80.
[0034] A second aspect of the present invention also provides a multimodal medical document information extraction and structuring system, comprising: The document preprocessing module is used to split multi-page medical documents into page image units, and to perform quality assessment and preprocessing on the page image units; The visual recognition module includes a unified visual recognition abstract interface and at least one pluggable visual recognition provider that implements the unified visual recognition abstract interface. The configuration center dynamically selects a visual recognition provider instance at runtime according to the routing strategy, performs recognition on the page image unit, and outputs the recognition result in a unified intermediate representation format. The semantic understanding module is used to receive the recognition results of the intermediate representation format and perform semantic understanding and field extraction through the text big language model; The cross-page merging module is used to extract the patient identity anchor field from the recognition results of each page, confirm that the recognition results of multiple pages belong to the same patient instance based on the patient identity anchor field, and perform cross-page semantic merging processing according to the batch judgment rules. The time series verification module is used to construct a time series by sorting the multiple identification results of the same patient and the same test item by test date, and to perform outlier detection, timeliness verification and trend labeling. Only the latest test data within the preset time window is used as the input for prescription calculation. The manual review module is used to push the structured extraction results, along with the corresponding original page image fragments and the confidence scores of each field, to the manual review interface, receive correction input from reviewers, and output the final structured data.
[0035] Terminology Explanation: In this application, OCR (Optical Character Recognition) refers to the technology of converting text in an image into editable text through image processing techniques.
[0036] LLM (Large Language Model) refers to a deep learning model trained on a large-scale corpus that has the ability to understand and generate natural language. In this application, it is used to perform semantic understanding and field extraction on the OCR recognition results.
[0037] A VisionProvider (Visual Recognition Provider) refers to a visual recognition model instance that implements a unified visual recognition abstract interface. Different visual recognition models (such as GLM-4V, Qwen-VL, etc.) can all become pluggable VisionProviders by implementing the unified visual recognition abstract interface. In this application, the Provider pattern is a software design pattern that, by defining a unified interface specification, allows different underlying implementations to be interchangeable without affecting the upper-layer business logic.
[0038] Configuration Center: This refers to the module that centrally manages the configuration parameters during system runtime.
[0039] Intermediate representation format: refers to the unified data structure after the visual recognition results have been standardized and transformed, which includes three types of information: text blocks (including text content, bounding box coordinates and OCR confidence scores), table areas (including row and column structured data and confidence scores), and layout areas (including the types and positions of layout elements such as headers, footers, body text, and tables).
[0040] Patient identity anchor field: This is a composite field used to uniquely identify a patient. It consists of a hash value of the patient's name, hospital number, and date of birth, and is used to confirm that multiple pages of identification results belong to the same patient instance.
[0041] A test batch refers to a complete test performed on the same patient at the same time for the same test item, and is uniquely identified by a combination of the test date and the test item code.
[0042] Time window: refers to the time range within which test data is considered valid when generating clinical prescriptions or nutritional plans.
[0043] The moving average is a local mean calculated by sliding a fixed window size over time series data.
[0044] Confidence Score is a quantitative indicator of the reliability of OCR recognition or field extraction results.
[0045] Cosine similarity is an index that measures the degree of similarity between two vectors by calculating the cosine of the angle between them. In this application, it is used to measure the similarity between header fields of adjacent pages, and the value ranges from 0 to 1.
[0046] Deviation: refers to the relative deviation between a test value and the moving mean. The formula is: Deviation = |Current test value - Moving mean| / Moving mean × 100%.
[0047] A preset trend threshold is a critical value used to determine the magnitude of change in the trend direction of a time series indicator. When the magnitude of change in the mean of the second half relative to the mean of the first half exceeds this threshold, it is determined to be an upward or downward trend; otherwise, it is determined to be stable. In this application, the preset trend threshold is selected from any value of 3%, 5%, 10%, 15%, or a range of any two of these values; preferably, the preset trend threshold is 5%.
[0048] The beneficial effects that this application can produce include: (1) Achieving pluggable decoupling of the visual recognition model. This invention completely decouples the underlying visual recognition model from the downstream semantic understanding logic by constructing a unified visual recognition abstract interface (VisionProvider). When it is necessary to switch the underlying visual recognition model, only one configuration parameter in the configuration center needs to be modified, without modifying the code of any downstream module, which significantly reduces the maintenance cost and expansion difficulty of the system, enabling the system to quickly adapt to the iterative updates of the AI model.
[0049] (2) Effectively solves the problem of semantic fragmentation across pages in multi-page medical documents. This invention uses the patient identity anchor field (composed of a combined hash value of the patient's name, hospital number, and date of birth) to confirm the patient's affiliation in multi-page identification results, and uses batch judgment rules to accurately merge the cross-page values of the same semantic field, avoiding duplicate data entry or omission of key information, and ensuring the integrity and accuracy of information extraction from multi-page heterogeneous medical documents.
[0050] (3) Effectively prevents the misuse of historical test data in clinical prescription calculation. This invention systematically manages the validity of test data through a preset time window mechanism, using only the latest test data within the time window for prescription calculation, while historical data outside the time window is only used for trend analysis reference, fundamentally eliminating the safety risk of misusing historical test data in clinical decision-making.
[0051] (4) Provides automatic outlier detection and trend labeling capabilities. This invention automatically identifies test values that deviate from the normal range and marks them as awaiting manual review through a moving mean outlier detection mechanism, and automatically generates trend labels (rising / falling / stable) for test indicators through a trend labeling mechanism, providing auxiliary decision-making references for clinicians and improving the efficiency and reliability of clinical data analysis.
[0052] (5) Human-machine collaboration ensures the quality of final data. This invention uses a manual review module to simultaneously push low-confidence fields and corresponding original image fragments to the review interface, realizing human-machine collaborative verification and further ensuring the accuracy of the final structured data on the basis of automated processing. Attached Figure Description
[0053] Figure 1 This is a flowchart illustrating a multimodal medical document information extraction and structuring method according to the present invention. Figure 2 This is a schematic diagram of the module architecture of a multimodal medical document information extraction and structuring system according to the present invention; Figure 3 This is a schematic diagram of the cross-page semantic merging process of the present invention; Figure 4 This is a flowchart illustrating the time series verification process for the verification indicators of this invention. Detailed Implementation
[0054] The present application is described in detail below with reference to the embodiments, but the present application is not limited to these embodiments.
[0055] Example 1: Multimodal Medical Document Processing for Clinical Nutrition Assessment This embodiment uses a scenario of nutritional assessment for inpatients in the clinical nutrition department of a tertiary hospital as an example to illustrate the specific implementation of the present invention.
[0056] In step one, the system receives the patient's hospitalization data uploaded by the nutritionist. This data is a 18-page PDF document, including the admission record (pages 1-4), blood test report (pages 5-9), urine test report (pages 10-12), imaging report (pages 13-15), and discharge summary (pages 16-18). The system uses a PDF parsing library to split the document into 18 independent PNG (Portable Network Graphics) page images. A quality assessment is performed on each page image: a Laplacian operator is used to calculate the image blur score; if the blur score is below 50, the page is considered blurry. A Hough transform is used to detect the tilt angle of text lines; if the tilt angle exceeds 2°, the page is considered tilted. For pages deemed unacceptable, Gaussian denoising filtering and affine transformation rotation correction are performed.
[0057] In step two, the system uses the GLM-4V visual recognition provider preset in the configuration file. The system calls the GLM-4VProvider instance through the unified visual recognition abstract interface VisionProvider to execute the extract method on each of the 18 page images. GLM-4VProvider encodes each page image and sends it to the GLM-4V model API (Application Programming Interface) to obtain the recognition results. After obtaining the results, it parses and converts them into a unified intermediate representation format. The recognition results in this intermediate representation format are then passed to the downstream text language model, which performs semantic understanding and field extraction, extracting structured fields including patient basic information, test item names, test values, test units, reference ranges, and test dates.
[0058] In step three, the system performs cross-page semantic merging on the 18 pages of recognition results.
[0059] First, the system assigns a page number (1 to 18) and a document source identifier to each page of recognition results.
[0060] Secondly, the system extracts the patient identity anchor field from the recognition results on each page: it identifies the patient's name Zhang Moumou, hospital number 20240312001, and date of birth 1965-08-15 from the first page of the admission record, calculates the SHA-256 combined hash value of the three, and verifies the consistency of the hash value in the recognition results of subsequent pages to confirm that all 18 pages of data belong to the same patient instance.
[0061] Then, the system constructed a mapping table between fields and page numbers. It was found that the serum albumin (ALB) index was recorded on both page 6 (test date: March 13, 2024, value: 32.5 g / L, confidence level: 0.95) and page 8 (test date: March 13, 2024, value: 32.5 g / L, confidence level: 0.88). Since the test date and project code are the same, they are determined to be from the same test batch, and the result on page 6 (0.95) with the higher confidence level is taken as the final value. The serum creatinine (SCr) index was recorded on both page 6 (test date: March 13, 2024, value: 78 μmol / L) and page 9 (test date: March 18, 2024, value: 85 μmol / L). Since the test dates are different, they are determined to be from different test batches, and the two data points are retained as independent time series data points.
[0062] Finally, the system detected that the blood test report table was broken at the end of page 8 and continued to page 9. By comparing the cosine similarity of the header fields of the last row of page 8 and the first row of page 9 (0.97, exceeding the threshold of 0.85) and the continuity of the row numbers, the system performed table splicing and restoration, restoring the broken table to a complete logical table unit.
[0063] In step four, the system performs time series verification on the serum creatinine (SCr) index (a total of 5 data points, with test dates from March 13, 2024 to March 22, 2024, and values of 78, 82, 85, 91, and 88 μmol / L respectively).
[0064] Outlier detection: Calculate the moving average using a window of 3 data points. The moving averages and deviations for each data point are calculated as follows: The moving average for the third data point (85 μmol / L) is (78+82+85) / 3=81.7 μmol / L, and the deviation is |85-81.7| / 81.7×100%=4.0%, which does not exceed the 20% threshold; the moving average for the fourth data point (91 μmol / L) is (82+85+91) / 3=86.0 μmol / L, and the deviation is |91-86.0| / 86.0×100%=5.8%, which does not exceed the 20% threshold; the moving average for the fifth data point (88 μmol / L) is (85+91+88) / 3=88.0 μmol / L, and the deviation is |88-88.0| / 88.0×100%=0%, which does not exceed the 20% threshold. None of the five data points triggered anomaly flags.
[0065] In contrast, if a patient's time series data points for the same test item are 78, 82, 85, 140, and 88 μmol / L, then the moving average of the fourth data point (140 μmol / L) is (82+85+140) / 3=102.3 μmol / L. The deviation is |140-102.3| / 102.3×100%=36.9%, which exceeds the preset deviation threshold of 20%. The system marks this data point as pending manual review and highlights it in the manual review interface, prompting the reviewer to check whether the abnormal value is a genuine acute change or an entry error.
[0066] Timeliness verification: The prescription was generated on March 23, 2024, and the preset time window was 14 days (i.e., from March 9, 2024 to March 23, 2024). All 5 data points were within the time window, and the latest data point (March 22, 2024, 88 μmol / L) was used as the input for the nutritional prescription calculation.
[0067] Trend labeling: The five data points are divided into two equal halves in chronological order: the first half (78, 82 μmol / L, mean 80.0 μmol / L) and the second half (85, 91, 88 μmol / L, mean 88.0 μmol / L). The change in the mean of the second half (88.0) relative to the mean of the first half (80.0) is (88.0-80.0) / 80.0×100%=10.0%, which exceeds the preset trend threshold (set to 5% in this embodiment). Since the mean of the second half is greater than the mean of the first half, the system automatically labels the trend as rising and adds it to the structured output results for reference by clinicians.
[0068] In step five, the system pushes all structured extraction results, along with the corresponding original page image fragments and the confidence scores for each field, to the manual review interface. The review interface highlights fields with confidence scores below 0.80; three fields are highlighted (all from the handwritten annotation areas in the imaging reports). The nutritionist manually checks each of these three fields, confirming two are correct and correcting one (changing a misidentified 18.5 to 13.5). After completing the manual review, the final structured data is submitted for subsequent nutritional assessment calculations.
[0069] Example 2: Dynamic Scene Switching for Visual Recognition Provider This embodiment illustrates the specific implementation of the present invention in a scenario of dynamic switching of visual recognition models, in order to verify the effectiveness of the Provider pattern decoupling design.
[0070] A medical institution, while using the system of this invention, decided to switch its visual recognition model to Qwen-VL (Tongyi Qianwen Visual Language Model) due to increased API call fees from the GLM-4V service provider. Under the technical solution of this invention, the switching operation only requires modifying the Provider configuration item in the configuration center, changing the `vision.provider` parameter from `GLM4VProvider` to `QwenVLProvider`, without requiring any modification to the downstream semantic understanding module, cross-page merging module, timing verification module, or manual review module.
[0071] QwenVLProvider implements the extract method according to the specification of the unified visual recognition abstract interface VisionProvider: it receives the page image input, calls the Qwen-VL model API to obtain the recognition result, parses the recognition result and converts it into an intermediate representation format that is exactly the same as GLM-4VProvider, and then returns it. After receiving the recognition result in the intermediate representation format, the downstream text large language model performs semantic understanding and field extraction according to the same logic as the original process, and the rest of the entire processing flow remains unchanged.
[0072] Testing verified that after switching to QwenVLProvider, the system's structured extraction results for the same batch of test documents remained consistent with those before the switch, validating the correctness and effectiveness of the Provider pattern decoupling design of this invention. Furthermore, the system supports parallel deployment of multiple Providers based on routing strategies. For example, it prioritizes lower-cost Providers for documents with higher image quality and automatically switches to Providers with stronger recognition capabilities for documents with lower image quality, further optimizing the overall cost-effectiveness of the system.
[0073] The above description is merely a few embodiments of this application and is not intended to limit this application in any way. Although this application discloses preferred embodiments as described above, it is not intended to limit this application. Any changes or modifications made by those skilled in the art without departing from the scope of the technical solution of this application using the disclosed technical content are equivalent to equivalent implementation cases and fall within the scope of the technical solution.
Claims
1. A method for extracting and structuring multimodal medical document information, characterized in that, Includes the following steps: Multi-page medical documents are split into page image units, and the page image units are subjected to quality assessment and preprocessing. By calling the pluggable visual recognition model through the unified visual recognition abstraction interface, the recognition results are converted into a unified intermediate representation format and then passed to the text big language model to perform semantic understanding and field extraction. The unified visual recognition abstraction interface supports the configuration center to dynamically switch the underlying visual recognition model at runtime based on the routing strategy without modifying the downstream semantic understanding logic. Extract the patient identity anchor field from the recognition results of each page, confirm that the recognition results of multiple pages belong to the same patient instance based on the patient identity anchor field, and perform cross-page semantic merging processing on the values of the same semantic field on different pages according to the batch judgment rules. Multiple identification results for the same patient and the same test item are sorted by test date to construct a time series. Outlier detection and timeliness verification are performed, and only the latest test data within the preset time window is used as the input for prescription calculation.
2. The method according to claim 1, characterized in that, The quality assessment includes ambiguity detection and tilt angle detection; Image denoising is performed on page images with a fuzziness score lower than a preset fuzziness threshold, and rotation correction is performed on page images with a tilt angle exceeding a preset tilt angle threshold. Preferably, the preset ambiguity threshold is 30 to 70; Preferably, the preset ambiguity threshold is 50; Preferably, the preset tilt angle threshold is 1° to 5°; Preferably, the preset tilt angle threshold is 2°.
3. The method according to claim 1, characterized in that, The unified visual recognition abstract interface defines a standard method, which receives page image input and outputs a structured intermediate representation format containing text blocks, table areas, and layout areas. Different visual recognition models, after implementing the unified visual recognition abstract interface, become pluggable visual recognition providers. The configuration center dynamically selects a specific visual recognition provider instance at runtime based on environment variables or routing strategies. Preferably, the routing strategy includes: For page images with image quality higher than a preset quality threshold, a lower-cost visual recognition provider is selected first; for page images with image quality lower than the preset quality threshold, the system automatically switches to a visual recognition provider with stronger recognition capabilities.
4. The method according to claim 1, characterized in that, The patient identity anchor field is composed of a combined hash value of three pieces of information: patient name, hospital number, and date of birth. By comparing the hash values of the patient identity anchor field in the recognition results of each page, it was confirmed that the recognition results of multiple pages belong to the same patient instance.
5. The method according to claim 1, characterized in that, The batch determination rule is as follows: If the inspection date and the inspection item code are the same, they are determined to be from the same inspection batch, and the OCR recognition result with higher confidence is used as the final value. If the inspection dates are different, they are determined to be different inspection batches. Each result is retained as an independent time series data point, and no overwrite or merging operation is performed.
6. The method according to claim 1, characterized in that, Also includes: For table content that is broken across pages, table splicing and restoration processing is performed based on the similarity of the header fields and the continuity of the row numbers of adjacent pages, so as to restore the broken table into a complete logical table unit. Preferably, when the cosine similarity of the header fields of adjacent pages exceeds a preset similarity threshold, it is determined to be a broken table across pages and splicing and restoration are performed; The preset similarity threshold is 0.75 to 0.95; Preferably, the preset similarity threshold is 0.
85.
7. The method according to claim 1, characterized in that, The outlier detection includes: The moving average of the time series is calculated with a preset window size. If the deviation of a certain test value from the moving average exceeds a preset deviation threshold, the data point is marked as pending manual review. Preferably, the preset window size is 2 to 5 data points; Preferably, the preset window size is 3 data points; Preferably, the preset deviation threshold is 10% to 40%; Preferably, the preset deviation threshold is 20%.
8. The method according to claim 1, characterized in that, In the timeliness verification, the preset timeliness window is a configurable parameter. Historical verification data that exceeds the preset timeliness window is only used as a trend analysis reference and is not included in prescription calculation. Preferably, the preset time window is 7 to 30 days; Preferably, the preset time window is 14 days.
9. The method according to claim 1, characterized in that, It also includes the trend labeling step: Based on the time series data of the same patient and the same test item, the time series is divided into the first half and the second half. The mean of the first half and the mean of the second half are calculated. Based on whether the change of the mean of the second half relative to the mean of the first half exceeds the preset trend threshold, the change trend label of the test indicator is automatically generated. The trend label includes rising, falling and stable. The trend label and the structured extraction results are output together. Preferably, the preset trend threshold is 3% to 15%; Preferably, the preset trend threshold is 5%; Preferably, it also includes a manual review step: The structured extraction results, along with the corresponding original page image fragments and the confidence scores of each field, are pushed to the manual review interface. Reviewers will manually check and correct fields with confidence scores lower than the preset confidence threshold. The corrected data will be used as the final structured output results. Preferably, the preset confidence threshold is 0.70 to 0.90; Preferably, the preset confidence threshold is 0.
80.
10. A multimodal medical document information extraction and structuring system, characterized in that, include: The document preprocessing module is used to split multi-page medical documents into page image units, and to perform quality assessment and preprocessing on the page image units; The visual recognition module includes a unified visual recognition abstract interface and at least one pluggable visual recognition provider that implements the unified visual recognition abstract interface. The configuration center dynamically selects a visual recognition provider instance at runtime according to the routing strategy, performs recognition on the page image unit, and outputs the recognition result in a unified intermediate representation format. The semantic understanding module is used to receive the recognition results of the intermediate representation format and perform semantic understanding and field extraction through the text big language model; The cross-page merging module is used to extract the patient identity anchor field from the recognition results of each page, confirm that the recognition results of multiple pages belong to the same patient instance based on the patient identity anchor field, and perform cross-page semantic merging processing according to the batch judgment rules. The time series verification module is used to construct a time series by sorting the multiple identification results of the same patient and the same test item by test date, and to perform outlier detection, timeliness verification and trend labeling. Only the latest test data within the preset time window is used as the input for prescription calculation. The manual review module is used to push the structured extraction results, along with the corresponding original page image fragments and the confidence scores of each field, to the manual review interface, receive correction input from reviewers, and output the final structured data.
