A method for constructing a composite intelligent quality control system for trauma medical records

By building a composite intelligent quality control system for trauma medical records, the difficulties faced by traditional quality control systems in identifying the semantic association and temporal dependencies between text data and medical images have been solved, and collaborative processing and automatic quality control of multimodal data have been achieved, thereby improving the comprehensiveness and accuracy of quality control and reducing the cost of manual review.

CN120088806BActive Publication Date: 2025-09-12北京紫云智能科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510558912.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-30
Publication Date
2025-09-12
Estimated Expiration
2045-04-30

AI Technical Summary

Technical Problem

Traditional quality control systems find it difficult to effectively identify the semantic associations and temporal dependencies between text data and medical images in trauma medical records, and are unable to automatically determine the degree of risk and generate feedback reports, limiting the versatility and intelligence of quality control systems in complex scenarios.

Method used

By obtaining text data and medical image data of trauma medical records, segmenting them into text fragments and image blocks, generating adversarial samples, and calculating word vector representations and visual feature representations, projecting them into a common feature space, constructing semantic association features, combining the quality control rule base and the directed acyclic graph of clinical events, identifying missing nodes and edges, calculating medical record risk scores, and generating quality control alarm information and reports.

Benefits of technology

It realizes the collaborative processing of multimodal medical data, improves the comprehensiveness and accuracy of quality control, can automatically identify potential problems, reduce the risk of medical errors, improve the depth and accuracy of quality control, reduce manual review costs, and provide a traceable quality control management system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120088806B_ABST
    Figure CN120088806B_ABST
Patent Text Reader

Abstract

The present invention provides a method for constructing a composite trauma medical record intelligent quality control system, which relates to the technical field of multimodal data intelligent processing, including obtaining trauma medical record data containing text records and medical images, generating graphic-text adversarial samples based on a masking and reorganization mechanism, and using a cross-modal embedding method to map text and image features to a unified feature space to generate semantic association features. The system maps semantic features with preset quality control rules, constructs a clinical event map, and identifies missing information through causal effect analysis and counterfactual reasoning to generate quality control defect data. Subsequently, a risk propagation model is constructed based on the number and criticality of defects, forming a thermal distribution matrix and an evolution path, calculating the medical record risk score, and finally realizing quality control alarm output and data writing. This method has the characteristics of high versatility, high timeliness and high intelligence, and is suitable for quality control system construction tasks in a variety of complex data environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to multimodal data intelligent processing technology, and in particular to a method for constructing a composite trauma medical record intelligent quality control system. Background Art

[0002] With the widespread deployment of electronic medical record systems, medical institutions have accumulated a large amount of structured medical records and unstructured image data in their daily operations. In trauma case scenarios, text data and medical images have strong temporal dependencies and semantic coupling, making it difficult for traditional quality control processes to effectively identify potential logical flaws and data gaps.

[0003] Existing methods typically perform static verification of structured data based on rule templates. They are unable to dynamically model semantic associations, image regions of interest, and causal chains between events within fused data. They also lack the ability to automatically determine risk levels and generate feedback reports. This situation limits the versatility and intelligence of quality control systems in complex scenarios.

[0004] Therefore, there is an urgent need for a multimodal intelligent quality control system that integrates natural language processing, computer vision and causal reasoning to realize the complete process of cross-modal semantic modeling, rule mapping and risk assessment automation. Summary of the Invention

[0005] The embodiment of the present invention provides a method for constructing a composite trauma medical record intelligent quality control system, which can solve the problems in the prior art.

[0006] According to a first aspect of the embodiments of the present invention,

[0007] A method for constructing a composite trauma medical record intelligent quality control system is provided, comprising:

[0008] Trauma medical record data, including medical record text data and medical image data, is obtained and segmented into text segments and image blocks. Adversarial samples are generated by randomly masking and recombining text segments and image blocks. The word vector representation of the text segments and the visual feature representation of the image blocks in the adversarial samples are calculated and projected into a common feature space to generate semantic association features.

[0009] Mapping semantic association features with rule items in the preset quality control rule library to obtain rule association results. Based on the rule association results, a directed acyclic graph of clinical events is constructed to extract temporal dependencies between events. By calculating the local causal effects and counterfactual conditional probabilities of clinical event nodes, missing nodes and edges in the directed acyclic graph of clinical events are identified to generate quality control defect data.

[0010] The medical record risk score is calculated based on the number and importance of missing nodes in the quality control defect data, and computing resources are allocated based on the medical record risk score. When the medical record risk score exceeds the preset risk threshold, a quality control alarm information is generated, the quality control defect data and quality control alarm information are written into the quality control cache, a quality control analysis report is generated, the quality control analysis report is sent to the clinical terminal, and the quality control defect data, quality control alarm information and quality control analysis report are stored in the quality control database.

[0011] In an optional embodiment,

[0012] Obtain trauma medical record data including medical record text data and medical image data, split them into text segments and image blocks respectively, and generate adversarial samples by randomly masking and recombining text segments and image blocks.

[0013] Segment the medical record text data using a sliding window to generate multiple text segments, each of which contains diagnosis description information and treatment record information;

[0014] constructing an attention heat map for the medical image data, and calculating an attention score of the lesion area based on the attention heat map; determining a target area based on the attention score, setting a cropping window with the target area as the center, and generating multiple image blocks;

[0015] Counting the frequency of occurrence of medical terms in the text segment, selecting the medical terms with the highest frequency of occurrence for masking, and generating text masking data; and simultaneously masking the non-target area in the image block while keeping the target area intact, and generating image masking data;

[0016] The text masking data and the image masking data are paired in time sequence to construct an original sample pair; the text masking data and the image masking data of adjacent time sequences in the original sample pair are recombined to generate a recombined sample pair; the original sample pair and the recombined sample pair are merged to form a final adversarial sample.

[0017] In an optional embodiment,

[0018] Calculate the word vector representation of the text fragment and the visual feature representation of the image patch in the adversarial sample, and project them into a common feature space to generate semantically related features including:

[0019] A pre-trained language model is used to extract features from text segments to obtain word vectors; a query matrix and a key-value matrix are constructed based on the word vectors; the query matrix and the key-value matrix are multiplied to obtain attention weights; and the attention weights are weighted with the word vectors to obtain text semantic features;

[0020] Perform convolution feature extraction on image blocks to obtain global visual features, perform multi-scale pooling operations on global visual features to obtain multi-scale visual features, and perform feature fusion on global visual features and multi-scale visual features to obtain image semantic features;

[0021] Calculating the mean vector and covariance matrix of text semantic features to obtain text distribution parameters, calculating the mean vector and covariance matrix of image semantic features to obtain image distribution parameters, constructing a multilayer perceptron as a feature projection network based on the text distribution parameters and image distribution parameters, and performing feature projection on the text semantic features and image semantic features to obtain text projection features and image projection features;

[0022] Constructing a set of sample pairs, including positive sample pairs consisting of text projection features and image projection features that correspond to each other in time sequence, and negative sample pairs consisting of text projection features and image projection features that do not correspond to each other in time sequence, respectively calculating the positive sample similarity of the positive sample pairs and the negative sample similarity of the negative sample pairs, and at the same time dividing the text projection features and image projection features into regions and calculating the local similarity;

[0023] The positive sample similarity, negative sample similarity and local similarity are combined to construct a multi-granularity contrast loss function, which is iteratively optimized based on the gradient descent method to obtain semantic association features.

[0024] In an optional embodiment,

[0025] Based on the rule association results, a directed acyclic graph of clinical events is constructed to extract the temporal dependencies between events. By calculating the local causal effects and counterfactual conditional probabilities of clinical event nodes, missing nodes and edges in the directed acyclic graph of clinical events are identified, and quality control defect data is generated, including:

[0026] constructing a conditional event in the rule association result as a parent node and a conclusion event as a child node, obtaining time information of the parent node and the child node, determining a temporal dependency relationship between the parent node and the child node based on the time information, calculating a conditional probability value between the parent node and the child node, and combining the parent node, the child node, the temporal dependency relationship, and the conditional probability value to construct a directed acyclic graph of clinical events;

[0027] Extracting event node pairs from the directed acyclic graph of clinical events, obtaining local causal effect values ​​by performing intervention calculations on the event node pairs, extracting covariate information of the event node pairs, and calculating counterfactual conditional probability values ​​of the event node pairs based on the covariate information;

[0028] An event whose local causal effect value exceeds a preset causal threshold but does not have a corresponding node in the directed acyclic graph of clinical events is determined as a missing node; an event relationship whose counterfactual conditional probability value exceeds a preset probability threshold but does not have a corresponding edge in the directed acyclic graph of clinical events is determined as a missing edge, and quality control defect data is generated based on the missing nodes and missing edges.

[0029] In an optional embodiment,

[0030] Extracting event node pairs from the clinical event directed acyclic graph, obtaining local causal effect values ​​by performing intervention calculations on the event node pairs, extracting covariate information of the event node pairs, and calculating counterfactual conditional probability values ​​of the event node pairs based on the covariate information includes:

[0031] Extracting event duration information from clinical data, statistically calculating the duration distribution of each event, and determining the core impact duration of each event based on the duration distribution;

[0032] Calculating the basic impact strength of the event based on the core impact duration, substituting the time difference between the event occurrence time and the current time into an exponential decay function to obtain a time decay value, determining whether the time decay value exceeds the core impact duration to obtain an impact decay value, and multiplying the basic impact strength, the time decay value, and the impact decay value to obtain an event impact threshold;

[0033] Extract event node pairs from a directed acyclic graph of clinical events, apply intervention operations to source events in the event node pairs, calculate the conditional probabilities of target events before and after the source event intervention, multiply the conditional probabilities by the event impact threshold, and accumulate the integral over the time dimension to obtain the local causal effect value of the event node pairs;

[0034] Extracting covariate information of the event node pair, calculating an impact threshold of the covariate information based on the core impact duration and the event impact threshold, and multiplying the impact threshold of the covariate information by the event impact threshold of the event node pair to obtain an impact assessment value of the covariate information;

[0035] Based on the impact evaluation value of the covariate information, the conditional probability of the event node pair is weighted, and the weighted conditional probability is multiplied and integrated with the event impact threshold to obtain the counterfactual conditional probability value of the event node pair.

[0036] In an optional embodiment,

[0037] The medical record risk score is calculated based on the number and importance of missing nodes in the quality control defect data. Computing resources are allocated based on the medical record risk score. When the medical record risk score exceeds the preset risk threshold, quality control alarm information is generated, including:

[0038] Extracting medical decision points and diagnosis and treatment behavior sequences from historical medical record data, calculating the impact probability of the medical decision points and the diagnosis and treatment behavior sequences, and constructing a causal chain of clinical events based on the impact probability;

[0039] Extract missing node information from quality control defect data, obtain the target node corresponding to the missing node in the standard clinical pathway, calculate the data integrity difference between the missing node and the target node, calculate the node deviation coefficient based on the difference, analyze the cross-interaction strength between the missing node and the nodes in the clinical event causal chain based on the node deviation coefficient, and recursively propagate the cross-interaction strength to obtain a risk propagation value;

[0040] Constructing a multidimensional thermal distribution matrix based on the risk propagation value, calculating the time series sampling difference of the risk propagation value to obtain the risk evolution rate, calculating the heat diffusion coefficient of the multidimensional thermal distribution matrix according to the risk evolution rate, and using the heat aggregation value of the multidimensional thermal distribution matrix as the medical record risk score;

[0041] The heat diffusion area is predicted according to the heat diffusion coefficient, computing resources are allocated based on the heat concentration value, and when the medical record risk score exceeds a preset risk threshold, quality control alarm information is generated based on the heat transfer path of the multidimensional thermal distribution matrix.

[0042] In an optional embodiment,

[0043] Constructing a multidimensional thermal distribution matrix based on the risk propagation value, calculating the time series sampling difference of the risk propagation value to obtain the risk evolution rate, calculating the heat diffusion coefficient of the multidimensional thermal distribution matrix according to the risk evolution rate, and using the heat aggregation value of the multidimensional thermal distribution matrix as the medical record risk score includes:

[0044] Constructing an initial thermal distribution matrix based on the temporal correlation and spatial distribution of the risk propagation values, calculating the propagation attenuation of the risk propagation values ​​between diagnosis and treatment links to obtain a heat transfer coefficient, and fusing the heat transfer coefficient with the initial thermal distribution matrix to construct a multidimensional thermal distribution matrix;

[0045] The risk propagation value is sampled at regular intervals, the difference between the risk propagation values ​​at adjacent sampling moments is calculated to obtain the risk evolution rate, and the heat diffusion coefficient of the multidimensional thermal distribution matrix is ​​calculated based on the temporal correlation between the risk evolution rate and the diagnosis and treatment links;

[0046] Analyzing the risk sensitivity of different types of medical behaviors based on a medical decision tree, converting the risk sensitivity into a risk weight coefficient, and redistributing the heat in a multidimensional thermal distribution matrix according to the risk weight coefficient and the heat diffusion coefficient;

[0047] The redistributed multi-dimensional thermal distribution matrix is ​​summed up according to each dimension to obtain a heat accumulation value, which is used as the medical record risk score.

[0048] According to a second aspect of the embodiments of the present invention,

[0049] An electronic device is provided, comprising:

[0050] processor;

[0051] a memory for storing processor-executable instructions;

[0052] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.

[0053] According to a third aspect of the embodiments of the present invention,

[0054] A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method described above is implemented.

[0055] In this embodiment, by fusing and analyzing the text data of medical records and medical image data, a composite trauma medical record intelligent quality control system is constructed, which realizes the collaborative processing of multimodal medical data, improves the comprehensiveness and accuracy of quality control, and can capture potential problems that are difficult to find in traditional single-modality quality control systems. The introduction of clinical event directed acyclic graphs and causal reasoning mechanisms can automatically identify the temporal dependencies and potential missing links between clinical events. It can not only discover superficial data missing problems, but also deeply explore breakpoints in the clinical logic chain, thereby improving the depth and accuracy of quality control and effectively reducing the risk of medical errors. Based on the medical record risk score, intelligent allocation of computing resources and automatic triggering of quality control alarms are realized. At the same time, structured quality control analysis reports are generated and pushed to clinical terminals in real time, which improves quality control efficiency, reduces manual review costs, and provides medical institutions with a traceable and quantifiable quality control management system, which helps to continuously improve medical quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 This is a flow chart of a method for constructing a composite trauma medical record intelligent quality control system according to an embodiment of the present invention;

[0057] Figure 2 This is a frequency statistical histogram of medical terms according to an embodiment of the present invention;

[0058] Figure 3 This is a heat map of the risk propagation value distribution in an embodiment of the present invention. DETAILED DESCRIPTION

[0059] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0060] The following specific embodiments are used to describe the technical solution of the present invention in detail. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0061] Figure 1 FIG. 1 is a flow chart of a method for constructing a composite trauma medical record intelligent quality control system according to an embodiment of the present invention. Figure 1 As shown, the method includes:

[0062] Trauma medical record data, including medical record text data and medical image data, is obtained and segmented into text segments and image blocks. Adversarial samples are generated by randomly masking and recombining text segments and image blocks. The word vector representation of the text segments and the visual feature representation of the image blocks in the adversarial samples are calculated and projected into a common feature space to generate semantic association features.

[0063] Mapping semantic association features with rule items in the preset quality control rule library to obtain rule association results. Based on the rule association results, a directed acyclic graph of clinical events is constructed to extract temporal dependencies between events. By calculating the local causal effects and counterfactual conditional probabilities of clinical event nodes, missing nodes and edges in the directed acyclic graph of clinical events are identified to generate quality control defect data.

[0064] The medical record risk score is calculated based on the number and importance of missing nodes in the quality control defect data, and computing resources are allocated based on the medical record risk score. When the medical record risk score exceeds the preset risk threshold, a quality control alarm information is generated, the quality control defect data and quality control alarm information are written into the quality control cache, a quality control analysis report is generated, the quality control analysis report is sent to the clinical terminal, and the quality control defect data, quality control alarm information and quality control analysis report are stored in the quality control database.

[0065] In an optional embodiment, trauma medical record data including medical record text data and medical image data is obtained, and the data is divided into text segments and image blocks respectively. Generating adversarial samples by randomly masking and recombining the text segments and image blocks includes:

[0066] Segment the medical record text data using a sliding window to generate multiple text segments, each of which contains diagnosis description information and treatment record information;

[0067] constructing an attention heat map for the medical image data, and calculating an attention score of the lesion area based on the attention heat map; determining a target area based on the attention score, setting a cropping window with the target area as the center, and generating multiple image blocks;

[0068] Counting the frequency of occurrence of medical terms in the text segment, selecting the medical terms with the highest frequency of occurrence for masking, and generating text masking data; and simultaneously masking the non-target area in the image block while keeping the target area intact, and generating image masking data;

[0069] The text masking data and the image masking data are paired in time sequence to construct an original sample pair; the text masking data and the image masking data of adjacent time sequences in the original sample pair are recombined to generate a recombined sample pair; the original sample pair and the recombined sample pair are merged to form a final adversarial sample.

[0070] For example, trauma medical records are collected. This data consists of two main components: textual records of medical records and medical image data. Textual records include patient descriptions of symptoms, physical examination results, diagnosis opinions, and treatment plans. Medical image data includes X-rays, CT scans, MRIs, and other medical imaging data of the trauma site.

[0071] For processing medical record text data, a sliding window approach is used for segmentation. Sliding window is a text segmentation method that sets a fixed-size window and moves it stepwise across the text, generating a text segment with each movement. The window size can be adjusted according to actual needs, such as setting it to 50 characters. The step size of each window movement can also be flexibly set, usually half the window size, to ensure a certain overlap between adjacent text segments and maintain semantic coherence. After sliding window processing, multiple text segments containing diagnostic description information and treatment record information are obtained.

[0072] When processing medical image data, the first step is to construct an attention heatmap. This technique is used to highlight important areas in an image. A deep learning model is used to calculate the importance of each region. This is achieved by using a convolutional neural network to extract image features. Then, a gradient-weighted approach is used to calculate the attention weight for each pixel to generate a heatmap. Warmer colors in the heatmap indicate more important areas and are more likely to be lesions.

[0073] The attention score of the lesion region is calculated based on the attention heatmap. The attention score reflects the likelihood that a region is identified as a lesion. It is calculated by summing and normalizing the attention weights of all pixels in the region. A threshold is set. When the attention score of a region exceeds the threshold, it is identified as a target region. A cropping window is set centered on the target region. The window size is determined based on the actual size of the target region, typically extending the target region boundary by a certain number of pixels. Multiple image blocks are generated by sliding the cropping window across the image.

[0074] The text segments are processed, and the number of occurrences of each medical term in all text segments is counted. Medical terms include professional terms such as disease names, symptom descriptions, examination items, and treatment methods. These terms are sorted from highest to lowest frequency, and the most frequent terms are selected for masking. Masking replaces the selected terms with special markers, such as "[MASK]." The resulting masked text data retains the overall structure of the original text, but obscures key information.

[0075] The image blocks are then masked. While ensuring the integrity of the target area, non-target areas are masked. Masking methods can include setting pixel values ​​in non-target areas to zero, applying Gaussian blur, or filling them with a fixed background color. The resulting masked image data highlights the lesion area while suppressing information in other areas.

[0076] The masked text data and masked image data are paired in chronological order to construct original sample pairs. The temporal relationship refers to the chronological order of the acquisition of medical records and medical images. The masked text data and masked image data from adjacent time sequences in the original sample pairs are then recombined to generate recombined sample pairs. Finally, the original and recombined sample pairs are merged to form the final adversarial sample.

[0077] Figure 2 This is a frequency statistical histogram of medical terms in an embodiment of the present invention, such as Figure 2As shown in the figure, this graph shows the frequency statistics of medical terms in trauma medical records, with the horizontal axis representing different medical term categories and the vertical axis representing frequency percentage (%). This technical solution uses a context-sensitive term recognition method, which can more accurately identify and count term frequencies. As can be seen from the data in the figure, the recognition frequency of the term "fracture" in this technical solution is 28.7%, higher than the 23.4% of traditional word frequency statistics; the recognition rate of the term "hematoma" is 19.3%, compared to 16.8% with traditional methods; the recognition rate of the term "contusion" is 15.6%, compared to 14.2% with traditional methods; the recognition rate of the term "laceration" is 12.8%, compared to 11.3% with traditional methods; the recognition rate of the term "nerve injury" is 10.2%, compared to 8.7% with traditional methods; the recognition rate of the term "vascular injury" is 8.9%, compared to 7.4% with traditional methods; and the recognition rate of the term "inflammation" is 4.5%, compared to 9.3% with traditional methods. This technical solution improves the recognition accuracy of key diagnostic terms by considering the contextual relationships of terms, with an average increase of 4.3 percentage points. At the same time, it reduces the over-recognition of general descriptive terms (such as "inflammation"), enabling the masking strategy to more accurately target core medical terms, thereby more effectively retaining key information in medical records when generating text masked data. The semantic completeness of the masked text is improved by 23.6%.

[0078] In this embodiment, by processing and reorganizing text and image data, key information in trauma medical records can be effectively identified and extracted. The sliding window segmentation method ensures the semantic coherence of the text, so that the segmented text segments still have complete clinical diagnostic value. The construction of attention heat maps helps to accurately locate the lesion area in the medical image and improves the accuracy of lesion identification. The frequency statistics and masking strategies of medical terms highlight important information in clinical diagnosis, while reducing the impact of interference information by masking non-critical areas. The method of generating adversarial samples by temporal pairing and reorganization of text and images enhances the model's ability to understand different types of medical record data and improves the accuracy and reliability of clinical diagnosis. This processing method can also help medical personnel quickly locate key diagnostic information and improve the efficiency of diagnosis and treatment. By generating high-quality adversarial samples, the scheme can also be used for training and verification of medical AI models to improve the robustness and generalization ability of the model.

[0079] In an optional embodiment, calculating the word vector representation of the text segment and the visual feature representation of the image block in the adversarial sample and projecting them into a common feature space to generate semantic association features includes:

[0080] A pre-trained language model is used to extract features from text segments to obtain word vectors; a query matrix and a key-value matrix are constructed based on the word vectors; the query matrix and the key-value matrix are multiplied to obtain attention weights; and the attention weights are weighted with the word vectors to obtain text semantic features;

[0081] Perform convolution feature extraction on image blocks to obtain global visual features, perform multi-scale pooling operations on global visual features to obtain multi-scale visual features, and perform feature fusion on global visual features and multi-scale visual features to obtain image semantic features;

[0082] Calculating the mean vector and covariance matrix of text semantic features to obtain text distribution parameters, calculating the mean vector and covariance matrix of image semantic features to obtain image distribution parameters, constructing a multilayer perceptron as a feature projection network based on the text distribution parameters and image distribution parameters, and performing feature projection on the text semantic features and image semantic features to obtain text projection features and image projection features;

[0083] Constructing a set of sample pairs, including positive sample pairs consisting of text projection features and image projection features that correspond to each other in time sequence, and negative sample pairs consisting of text projection features and image projection features that do not correspond to each other in time sequence, respectively calculating the positive sample similarity of the positive sample pairs and the negative sample similarity of the negative sample pairs, and at the same time dividing the text projection features and image projection features into regions and calculating the local similarity;

[0084] The positive sample similarity, negative sample similarity and local similarity are combined to construct a multi-granularity contrast loss function, which is iteratively optimized based on the gradient descent method to obtain semantic association features.

[0085] For example, feature extraction is performed on text snippets to obtain word vector representations. Specifically, a pre-trained BERT (Bidirectional Encoder Representations from Transformers) model is used as a feature extractor. This model, pre-trained on large-scale medical text data, is highly capable of understanding medical terminology and expressions. For example, for a text snippet such as "The patient experienced significant tenderness and localized swelling in the mid-section of the right tibia," the model converts it into a fixed-dimensional word vector representation.

[0086] Based on the obtained word vectors, a query matrix and a key-value matrix are constructed. The query matrix represents the current text content of interest, while the key-value matrix stores key information within the text. For example, when processing the sentence "Preliminary diagnosis: right tibia fracture," the query matrix focuses on the action "diagnosis," while the key-value matrix contains the diagnosis "right tibia fracture." Multiplying the query matrix with the key-value matrix yields attention weights, which reflect the degree of association between different words. The larger the attention weight, the more important the corresponding word is for understanding the semantics of the text.

[0087] The attention weights are then added to the word vectors to generate text semantic features. This step is equivalent to redistributing the weights of the original word vectors, highlighting important information. For example, when processing treatment records, words related to surgical procedures will receive higher weights. The resulting text semantic features better reflect the core meaning of the text.

[0088] To process image blocks, we first use a convolutional neural network to extract features and obtain global visual features. We can choose a network architecture such as ResNet, which has performed well in the medical imaging field. For example, when processing a fracture X-ray, the network will extract key visual features such as the fracture line and bone density.

[0089] Multi-scale pooling is performed on the extracted global visual features to obtain multi-scale visual features. Multi-scale pooling involves sampling the feature map using pooling windows of different sizes, which can capture image information at different scales. For example, in a fracture image, large-scale features reflect the overall bone structure, while small-scale features contain fracture details.

[0090] Global visual features and multi-scale visual features are fused to generate image semantic features. Feature fusion can be performed using feature concatenation or weighted summation. The fused features contain both overall image information and local details. For example, the fused features can simultaneously express the location and specific morphology of a fracture.

[0091] The mean vector and covariance matrix of text semantic features are calculated to obtain the text distribution parameters. The mean vector reflects the overall trend of the feature, and the covariance matrix reflects the correlation between the dimensions of the feature. The distribution parameters of image semantic features are calculated in the same way. These parameters describe the statistical properties of text and image features.

[0092] A multilayer perceptron is constructed based on the distribution parameters of text and images, serving as a feature projection network. This network maps text and image features into the same feature space. The network structure can include multiple fully connected layers, using nonlinear activation functions to enhance feature representation. This network projects text and image semantic features, yielding projected text and image features of the same dimension.

[0093] Construct a set of sample pairs, including positive and negative pairs. Positive pairs consist of text and image features that correspond in time sequence, such as the medical record description at the time of admission and the features of the X-ray taken at that time. Negative pairs consist of features that do not correspond in time sequence, such as the admission record and the features of the imaging at the time of discharge. Calculate the similarity of each positive and negative pair, using the inner product of the feature vectors.

[0094] The text-projected features and image-projected features are divided into regions and local similarity is calculated. Region division involves splitting a feature vector into multiple sub-vectors and calculating similarity for each of them. This allows for a more detailed measurement of feature matching. For example, you can focus on matching different aspects, such as symptom descriptions and treatment plans.

[0095] A multi-granularity contrastive loss function is constructed by combining positive sample similarity, negative sample similarity, and local similarity. Specifically, a loss function is designed that comprehensively considers global and local similarity, thereby increasing the similarity of positive sample pairs and decreasing the similarity of negative sample pairs. The multi-granularity contrastive loss function is iteratively optimized using the gradient descent method. Specifically, the Adam optimizer is used with a learning rate of 0.0001, a batch size of 64, and 50 training rounds. The model parameters are updated through the backpropagation algorithm, ultimately obtaining a feature representation that effectively expresses the semantic association between text and images, namely the semantic association feature.

[0096] In practice, for example, if a text describing a patient's right ankle swelling and limited mobility after a fall is input, and a corresponding X-ray image of a calcaneal fracture is presented, the system first extracts a word vector representation of the text using a pre-trained language model. Using an attention mechanism, it then highlights key information such as "right calcaneal fracture." Convolutional feature extraction and multi-scale pooling are then performed on the X-ray to produce a visual representation that includes fracture features. After a feature projection network maps these two features into the same space, their semantic similarity can be accurately calculated, verifying the consistency between the text description and the image representation. In this way, the system effectively learns the semantic associations between medical text and images, providing support for clinical diagnosis.

[0097] In this embodiment, text and image features are extracted respectively by pre-training language models and deep convolutional networks, and key information is highlighted by combining attention mechanisms, which can accurately capture the semantic content of medical text and image data. The multi-scale pooling operation enables the system to focus on both local details and overall structure of the image, thereby improving the comprehensiveness of feature extraction. The feature projection network maps features of different modalities to a unified semantic space, achieving effective alignment of text and image features. The multi-granularity contrast learning strategy takes into account both overall semantic similarity and the degree of matching of local areas, thereby improving the accuracy of feature expression. This technical solution can effectively learn the semantic association between medical text and images, and improve the accuracy and efficiency of clinical diagnosis. At the same time, the solution has good scalability and versatility, can adapt to different types of medical data, and provide strong support for intelligent medical diagnosis systems.

[0098] In an optional embodiment, a directed acyclic graph of clinical events is constructed based on rule association results, temporal dependencies between events are extracted, and missing nodes and edges in the directed acyclic graph of clinical events are identified by calculating local causal effects and counterfactual conditional probabilities of clinical event nodes. Generating quality control defect data includes:

[0099] constructing a conditional event in the rule association result as a parent node and a conclusion event as a child node, obtaining time information of the parent node and the child node, determining a temporal dependency relationship between the parent node and the child node based on the time information, calculating a conditional probability value between the parent node and the child node, and combining the parent node, the child node, the temporal dependency relationship, and the conditional probability value to construct a directed acyclic graph of clinical events;

[0100] Extracting event node pairs from the directed acyclic graph of clinical events, obtaining local causal effect values ​​by performing intervention calculations on the event node pairs, extracting covariate information of the event node pairs, and calculating counterfactual conditional probability values ​​of the event node pairs based on the covariate information;

[0101] An event whose local causal effect value exceeds a preset causal threshold but does not have a corresponding node in the directed acyclic graph of clinical events is determined as a missing node; an event relationship whose counterfactual conditional probability value exceeds a preset probability threshold but does not have a corresponding edge in the directed acyclic graph of clinical events is determined as a missing edge, and quality control defect data is generated based on the missing nodes and missing edges.

[0102] This embodiment provides a method for constructing a directed acyclic graph (DAG) of clinical events based on rule association results and extracting temporal dependencies. By calculating the local causal effects and counterfactual conditional probabilities of clinical event nodes, missing nodes and edges in the DAG are identified, generating quality control defect data. For example, the conditional events in the rule association results are first constructed as parent nodes, and the conclusion events as child nodes. For example, for the rule "If a patient's temperature decreases after receiving antibiotic treatment," "antibiotic treatment" can be set as the parent node, and "temperature decrease" as the child node. Specifically, patient clinical event records are extracted from a medical database. Each record contains fields such as event ID, event name, and occurrence time. For the above example, the following records may exist: Event 1 (ID: 1001, Name: Antibiotic Treatment, Time: 2023-01-15 09:30) and Event 2 (ID: 1002, Name: Temperature Decreased, Time: 2023-01-15 14:20).

[0103] Obtain the time information of the parent and child nodes and determine the temporal dependency between them based on this time information. In the above example, by comparing the time of "Antibiotic Treatment" (09:30) and the time of "Body Temperature Dropped" (14:20), it is found that "Antibiotic Treatment" occurred before "Body Temperature Dropped," which conforms to causal logic. Therefore, a directed edge is established from "Antibiotic Treatment" to "Body Temperature Dropped." If the child node event is found to occur earlier than the parent node event, it is considered illogical and the directed edge is not established.

[0104] Calculate the conditional probability between the parent node and the child node. The conditional probability P(B|A) represents the probability of event B occurring given the occurrence of event A. For example, for a sample of all patients receiving antibiotic treatment, calculate the percentage of patients whose body temperature decreases. If 80 out of 100 patients receiving antibiotic treatment subsequently experience a decrease in body temperature, then the conditional probability P(temperature decrease | antibiotic treatment) = 0.8.

[0105] Parent nodes, child nodes, temporal dependencies, and conditional probability values ​​are combined to form a directed acyclic graph of clinical events. In practical applications, this may include multiple nodes and edges. For example, a path such as "fever" → "antibiotic treatment" → "temperature drops" → "discontinue antibiotics" may form a complete directed acyclic graph structure.

[0106] Extract event node pairs from the directed acyclic graph of clinical events, such as (antibiotic treatment, decreased body temperature), (fever, antibiotic treatment), etc. The local causal effect value is obtained by performing intervention calculations on the event node pairs. This step is achieved by comparing the difference in results between the intervention group and the non-intervention group. Specifically, a patient group that performs an intervention and a patient group that does not perform the intervention are selected to compare the differences in the outcome events between the two groups. For example, the difference in body temperature between the group of patients who received antibiotic treatment and the group of patients who did not receive antibiotic treatment is compared. If the body temperature reduction rate of the treated group is 85% and that of the non-treated group is 25%, the local causal effect value is 0.6.

[0107] Extract covariate information for event node pairs, such as the patient's age, gender, and underlying conditions, to identify factors that may influence the outcome. For example, for the event pair (antibiotic treatment, decreased body temperature), covariates might include the patient's age range (0-18, 19-65, >65) and underlying conditions (heart disease, diabetes, etc.). Calculate the counterfactual conditional probability value for the event node pair based on this covariate information, considering how the outcome would have changed if the patient's attributes had been different. For example, calculating the probability of antibiotic treatment causing a decrease in body temperature after controlling for covariates such as age and underlying conditions might yield a counterfactual conditional probability of 0.75.

[0108] Events whose local causal effect exceeds the preset causal threshold but do not have a corresponding node in the directed acyclic graph of clinical events are identified as missing nodes. For example, if the preset causal threshold is 0.4, and the local causal effect of "antibiotic dose adjustment" on "body temperature reduction" is found to be 0.5, but there is no "antibiotic dose adjustment" node in the existing graph, then this node is identified as missing.

[0109] Event relationships whose counterfactual conditional probability values ​​exceed a preset probability threshold but for which no corresponding edge exists in the directed acyclic graph of clinical events are identified as missing edges. For example, if the preset probability threshold is 0.6 and the counterfactual conditional probability of "antibiotic treatment" on "change in renal function" is 0.7 after controlling for covariates, but there is no edge from "antibiotic treatment" to "change in renal function" in the existing graph, then this relationship is identified as a missing edge.

[0110] Generate quality control defect data based on missing nodes and edges. For example, a quality control defect report might include the following: missing node "Antibiotic Dose Adjustment" (local causal effect value: 0.5, recommended to be added between "Antibiotic Treatment" and "Fever Decrease"); missing edge "Antibiotic Treatment → Renal Function Change" (counterfactual conditional probability value: 0.7, recommended to be added as a monitoring relationship). Medical institutions can use this quality control defect data to improve clinical pathways and monitoring standards, thereby enhancing healthcare quality.

[0111] In this embodiment, by constructing a directed acyclic graph of clinical events, the temporal dependency and conditional probability association between clinical events are effectively established. By obtaining the local causal effect value through intervention calculation and calculating the counterfactual conditional probability in combination with covariate information, it is possible to accurately identify potential event omissions and relationship omissions in clinical practice. This quality control method based on causal reasoning can effectively discover hidden defects in clinical pathways and avoid the omission of important clinical events or key treatment steps. At the same time, the solution can automatically identify and supplement quality control defects in the clinical diagnosis and treatment process, and improve the accuracy and efficiency of medical quality control. By analyzing the causal relationship and conditional probability between event nodes, the system can warn of potential medical risks and provide support for clinical decision-making. This method also has strong interpretability, which helps medical personnel understand and improve the clinical diagnosis and treatment process and improve the overall quality of medical services.

[0112] In an optional embodiment, extracting event node pairs from the clinical event directed acyclic graph, obtaining local causal effect values ​​by performing intervention calculations on the event node pairs, extracting covariate information of the event node pairs, and calculating counterfactual conditional probability values ​​of the event node pairs based on the covariate information includes:

[0113] Extracting event duration information from clinical data, statistically calculating the duration distribution of each event, and determining the core impact duration of each event based on the duration distribution;

[0114] Calculating the basic impact strength of the event based on the core impact duration, substituting the time difference between the event occurrence time and the current time into an exponential decay function to obtain a time decay value, determining whether the time decay value exceeds the core impact duration to obtain an impact decay value, and multiplying the basic impact strength, the time decay value, and the impact decay value to obtain an event impact threshold;

[0115] Extract event node pairs from a directed acyclic graph of clinical events, apply intervention operations to source events in the event node pairs, calculate the conditional probabilities of target events before and after the source event intervention, multiply the conditional probabilities by the event impact threshold, and accumulate the integral over the time dimension to obtain the local causal effect value of the event node pairs;

[0116] Extracting covariate information of the event node pair, calculating an impact threshold of the covariate information based on the core impact duration and the event impact threshold, and multiplying the impact threshold of the covariate information by the event impact threshold of the event node pair to obtain an impact assessment value of the covariate information;

[0117] Based on the impact evaluation value of the covariate information, the conditional probability of the event node pair is weighted, and the weighted conditional probability is multiplied and integrated with the event impact threshold to obtain the counterfactual conditional probability value of the event node pair.

[0118] For example, event duration information is extracted from clinical data. Specifically, for each clinical event, its duration in different cases is counted to obtain the duration distribution of the event. For example, for the event "fever", the following distribution may be obtained: 1-3 days account for 40%, 4-7 days account for 50%, and more than 7 days account for 10%. Based on this distribution, the core impact duration of the event is determined, which can be taken as the median or mode of the distribution. In this example, 4-7 days can be taken as the core impact duration of fever.

[0119] The basic impact intensity of the event is calculated based on the core impact duration. The following method can be used: substitute the core impact duration into the preset impact intensity function to obtain a value between 0 and 1 as the basic impact intensity. For example, for a fever event with a core impact duration of 5 days, its basic impact intensity may be 0.7. Then calculate the time decay value of the event. Specifically, take the time difference between the time when the event occurred and the current time, and substitute it into the exponential decay function. The function can be expressed as: the product of the time difference with e as the base and a negative exponent and the preset attenuation coefficient. For example, if a fever event occurred 3 days ago and the attenuation coefficient is 0.2, then its time decay value is e to the power of -0.6, which is approximately 0.549.

[0120] Determine whether the time decay value exceeds the core impact duration to obtain the impact decay value. If the time decay value does not exceed the core impact duration, the impact decay value is 1; otherwise, it is a value less than 1, which can be obtained by substituting the excess value into a faster decay function. Multiply the base impact intensity, the time decay value, and the impact decay value to obtain the event impact threshold. For example, for the fever event mentioned above, the event impact threshold is 0.7 × 0.549 × 1 = 0.384.

[0121] Extract event node pairs from a directed acyclic graph of clinical events. For example, a pair of event nodes might be extracted: "fever" and "elevated white blood cell count." Apply an intervention operation to the source event (e.g., "fever") and calculate the conditional probability of the target event (e.g., "elevated white blood cell count") before and after the intervention.

[0122] The conditional probability before intervention can be calculated by counting the proportion of patients with elevated white blood cell counts after fever in clinical data. The conditional probability after intervention requires causal inference methods, such as do-calculus, to estimate the probability of elevated white blood cell counts if all patients were artificially induced to have a fever. The resulting conditional probability is multiplied by the event impact threshold and cumulatively integrated over time. This integration can be understood as multiplying the conditional probability at each time point by the event impact threshold at that time point over the entire timeframe of the event's impact, and then summing the results. This ultimately yields the local causal effect value for the event node pair.

[0123] Extract covariate information for event node pairs. Covariates are other factors that may influence both the source and target events, such as age and gender. For each covariate, calculate the core impact duration and event impact threshold based on its characteristics. For example, for the covariate "age," its core impact duration may be lifelong, while the event impact threshold may vary across age groups. Possible values ​​are: 0.8 for children (0-14 years old), 0.6 for young adults (15-44 years old), 0.7 for middle-aged adults (45-64 years old), and 0.9 for the elderly (over 65 years old).

[0124] Multiply the covariate impact threshold by the event impact threshold for the event node pair to obtain the covariate impact assessment value. For example, if the patient is 70 years old, the impact assessment value of the age covariate is 0.9 × 0.384 = 0.3456.

[0125] The conditional probabilities of event node pairs are weighted based on the impact estimates of the covariate information. Specifically, the impact estimate of each covariate is multiplied by a preset weight, and the weighted results of all covariates are summed to obtain an overall weighting factor. This weighting factor is used to adjust the original conditional probabilities. The weighted conditional probabilities are multiplied by the event impact threshold and integrated to obtain the counterfactual conditional probability value for the event node pair. This value represents the true causal effect of the source event on the target event after accounting for the influence of various covariates.

[0126] Existing causal relationship analysis of clinical events typically only considers the chronological order and statistical correlation of events, ignoring the dynamic decay characteristics of event impacts and the complex interfering factors of the clinical environment, resulting in inaccurate causal relationship identification. This approach introduces the concept of core impact duration and combines it with a time decay function to calculate the actual impact strength of an event, which is more consistent with the objective law that the impact of medical events gradually weakens in clinical practice. By establishing an event impact threshold assessment system, the time decay characteristics and impact strength are organically combined, improving the accuracy of causal relationship identification. When calculating local causal effects, a cumulative integration method along the time dimension is used to fully consider the persistent characteristics of event impacts. At the same time, covariate information is innovatively incorporated into the assessment system, and through the weighted calculation of the impact threshold, interfering factors in the clinical environment are effectively eliminated. This method, which comprehensively considers time decay, impact strength, and environmental factors, significantly improves the accuracy and reliability of causal relationship analysis of clinical events, providing more precise decision support for medical quality control.

[0127] In an optional embodiment, a medical record risk score is calculated based on the number and importance of missing nodes in the quality control defect data, computing resources are allocated based on the medical record risk score, and when the medical record risk score exceeds a preset risk threshold, quality control alarm information is generated, including:

[0128] Extracting medical decision points and diagnosis and treatment behavior sequences from historical medical record data, calculating the impact probability of the medical decision points and the diagnosis and treatment behavior sequences, and constructing a causal chain of clinical events based on the impact probability;

[0129] Extract missing node information from quality control defect data, obtain the target node corresponding to the missing node in the standard clinical pathway, calculate the data integrity difference between the missing node and the target node, calculate the node deviation coefficient based on the difference, analyze the cross-interaction strength between the missing node and the nodes in the clinical event causal chain based on the node deviation coefficient, and recursively propagate the cross-interaction strength to obtain a risk propagation value;

[0130] Constructing a multidimensional thermal distribution matrix based on the risk propagation value, calculating the time series sampling difference of the risk propagation value to obtain the risk evolution rate, calculating the heat diffusion coefficient of the multidimensional thermal distribution matrix according to the risk evolution rate, and using the heat aggregation value of the multidimensional thermal distribution matrix as the medical record risk score;

[0131] The heat diffusion area is predicted according to the heat diffusion coefficient, computing resources are allocated based on the heat concentration value, and when the medical record risk score exceeds a preset risk threshold, quality control alarm information is generated based on the heat transfer path of the multidimensional thermal distribution matrix.

[0132] For example, medical decision points and treatment behavior sequences can be extracted from historical medical record data. Specifically, natural language processing techniques can be used to analyze historical medical record text to identify key medical decision points, such as diagnosis, medication, and surgery. Simultaneously, the treatment behaviors recorded in the medical record are arranged chronologically to form a treatment behavior sequence. For example, for a pneumonia patient's medical record, a decision point and behavior sequence might be extracted: "initial diagnosis - chest X-ray - antibiotic administration - reexamination."

[0133] To calculate the probability of influence between medical decision points and treatment behavior sequences, a Bayesian network model can be used, with decision points as parent nodes and treatment behaviors as child nodes. By analyzing a large number of medical record samples, the conditional probabilities between nodes can be learned. For example, the probability that the decision point "administering antibiotics" influences the treatment outcome "symptom improvement" can be determined to be 0.8. Based on these influence probabilities, a causal chain of clinical events can be constructed, reflecting the causal relationship between decisions and behaviors.

[0134] Extract missing node information from quality control defect data. Quality control defect data is typically annotated by quality control personnel according to regulatory requirements and contains problematic sections of the medical record. This method maps these defective sections to the standard clinical pathway and identifies the target node corresponding to the missing node. For example, if "Routine Blood Test" is missing, the corresponding "Routine Blood Test" node in the standard pathway is found as the target node.

[0135] Next, the difference in data integrity between the missing node and the target node is calculated. A scoring standard can be set to quantify the degree of missingness. For example, a complete missing node is scored as 0, a partial missing node is scored as 0.5, and a complete record is scored as 1. By comparing the score of the missing node with the standard score of the target node (usually 1), a difference value is obtained. Based on this difference value, the node deviation coefficient can be further calculated. The deviation coefficient can be defined as the difference value divided by the standard score, reflecting the degree of deviation between the actual record and the standard requirements.

[0136] To analyze the strength of the cross-interaction between the missing node and nodes in the causal chain of clinical events, we can use the previously constructed causal chain to examine the impact of the missing node on other nodes in the chain. Specifically, we can calculate the correlation coefficient between the missing node and the causal chain nodes. A higher correlation coefficient indicates a stronger cross-interaction. For example, if the correlation coefficient between the missing node "blood routine test" and the causal chain node "antibiotic use" is 0.7, it indicates a strong cross-interaction between them.

[0137] By recursively propagating the cross-effect intensity along the causal chain, we can obtain a risk propagation value. During this propagation process, we can employ an attenuation factor to reduce the impact as the propagation distance increases. For example, we could set the intensity to decay by 20% with each propagation step. In this way, after multiple propagation steps, we can obtain a risk propagation value for each node.

[0138] Based on the risk propagation values, a multidimensional heat distribution matrix is ​​constructed. This matrix can be viewed as a visual representation of medical record risk. Each dimension of the matrix can correspond to a different risk factor, such as examination items, medication usage, and surgical procedures. The value of each element in the matrix represents the risk propagation value at that location.

[0139] To reflect the dynamic changes in risk, the risk evolution rate also needs to be calculated. This can be achieved by sampling the risk propagation value in a time series and calculating the difference between adjacent time points. For example, sampling can be performed every 6 hours, and the change in the risk propagation value between two samplings can be calculated to obtain the risk evolution rate.

[0140] Based on the risk evolution rate, we can further calculate the thermal diffusion coefficient of the multidimensional thermal distribution matrix. The thermal diffusion coefficient reflects the speed at which risk spreads across different dimensions. The risk evolution rate can be normalized to obtain the thermal diffusion coefficient. The faster the dimension, the larger the diffusion coefficient.

[0141] The heat accumulation value of a multidimensional thermal distribution matrix can be used as a risk score for a medical record. The heat accumulation value is calculated by taking the weighted sum of all element values ​​in the matrix. Weights can be set based on the importance of different dimensions. For example, the examination item dimension might be given a weight of 0.3, the medication dimension a weight of 0.5, and the surgical procedure dimension a weight of 0.2. Based on the heat diffusion coefficient, the heat diffusion area can be predicted. Specifically, starting from a high-risk point, the heat diffusion process in the matrix can be simulated according to the magnitude of the diffusion coefficient to determine the possible diffusion area. This helps predict the potential scope of the risk. Computing resources are allocated based on the heat accumulation value, i.e., the medical record risk score. Multiple risk levels can be set, such as low, medium, and high, corresponding to different resource allocation strategies. For example, low-risk medical records may only require routine review, medium-risk records require special attention, and high-risk records require immediate action.

[0142] When a medical record risk score exceeds a preset threshold, the system generates a quality control alert. This alert is generated based on the heat transfer path of a multidimensional thermal distribution matrix. Specifically, starting from the high-risk point, the system traces the source of the risk and the potential impact along the heat transfer path. The alert should include the risk score, primary risk point, potential impact, and recommended action.

[0143] Figure 3 This is a heat map of the risk propagation value distribution in an embodiment of the present invention, as shown in Figure 3 The figure shows a multidimensional heat distribution matrix constructed based on the node deviation coefficient and the length of the risk propagation path. The figure uses different shades of gray to represent the magnitude of the risk propagation value, with higher values ​​indicating darker shades. The heat map clearly shows that the risk propagation value reaches its highest value of 0.92 when the node deviation coefficient is higher (close to 1.0) and the propagation path length is shorter (close to 0). As the node deviation coefficient decreases and the propagation path length increases, the risk propagation value exhibits a clear attenuation trend. When the node deviation coefficient is 0.8 and the propagation path length is 1, the risk propagation value is 0.78. When the node deviation coefficient drops to 0.4 and the propagation path length increases to 3, the risk propagation value drops to 0.24. This attenuation trend conforms to the actual law of medical risk propagation—risk gradually decreases as the propagation path lengthens, and the smaller the node deviation, the smaller its contribution to the overall risk. The highest risk area in the figure is concentrated in the upper left corner, indicating that nodes with high deviation coefficients have the greatest risk impact in short-path propagation. This thermal distribution model provides crucial decision-making support for medical quality control, guiding medical institutions to prioritize nodes with high deviations and located on the shortest links of critical transmission paths, thereby allocating quality control resources more efficiently. By visualizing risks as heat, this technical solution makes complex risk propagation models intuitive and understandable, effectively improving the accuracy and responsiveness of medical quality management.

[0144] Through the above steps, this method achieves accurate assessment of medical record quality and risk warning, helping to improve the efficiency and accuracy of medical quality control. The core advantage of this method lies in its integration of quality control deficiencies with the clinical decision-making process. Through multi-dimensional risk propagation analysis, it comprehensively assesses the potential risks of medical records. Furthermore, dynamic risk evolution analysis and resource allocation strategies enable more timely and targeted quality control efforts. This method is not only applicable to the risk assessment of individual medical records but can also be extended to the quality management system of an entire medical institution, providing strong support for the continuous improvement of medical quality.

[0145] In an optional embodiment, a multidimensional thermal distribution matrix is ​​constructed based on the risk propagation value, a time series sampling difference of the risk propagation value is calculated to obtain a risk evolution rate, a heat diffusion coefficient of the multidimensional thermal distribution matrix is ​​calculated according to the risk evolution rate, and a heat aggregation value of the multidimensional thermal distribution matrix is ​​used as a medical record risk score, including:

[0146] Constructing an initial thermal distribution matrix based on the temporal correlation and spatial distribution of the risk propagation values, calculating the propagation attenuation of the risk propagation values ​​between diagnosis and treatment links to obtain a heat transfer coefficient, and fusing the heat transfer coefficient with the initial thermal distribution matrix to construct a multidimensional thermal distribution matrix;

[0147] The risk propagation value is sampled at regular intervals, the difference between the risk propagation values ​​at adjacent sampling moments is calculated to obtain the risk evolution rate, and the heat diffusion coefficient of the multidimensional thermal distribution matrix is ​​calculated based on the temporal correlation between the risk evolution rate and the diagnosis and treatment links;

[0148] Analyzing the risk sensitivity of different types of medical behaviors based on a medical decision tree, converting the risk sensitivity into a risk weight coefficient, and redistributing the heat in a multidimensional thermal distribution matrix according to the risk weight coefficient and the heat diffusion coefficient;

[0149] The redistributed multi-dimensional thermal distribution matrix is ​​summed up according to each dimension to obtain a heat accumulation value, which is used as the medical record risk score.

[0150] For example, the system first constructs an initial thermal distribution matrix based on the temporal association and spatial distribution of risk propagation values. For example, for a medical record consisting of four treatment stages: outpatient visit, examination, medication, and surgery, a 4-dimensional initial thermal distribution matrix can be constructed. Assuming the risk propagation value for the outpatient stage is 0.6, the examination stage is 0.4, the medication stage is 0.7, and the surgery stage is 0.8, the initial thermal distribution matrix can be expressed as [0.6, 0.4, 0.7, 0.8].

[0151] The heat transfer coefficient is calculated by calculating the propagation attenuation of the risk propagation value between diagnosis and treatment links. The risk transfer relationship between adjacent diagnosis and treatment links is analyzed. For example, the heat transfer coefficient from the outpatient clinic to the examination link may be 0.9, indicating that 90% of the risk will be transferred; the heat transfer coefficient from the examination to the medication link is 0.8; and the heat transfer coefficient from the medication to the surgery link is 0.95. These heat transfer coefficients form a transfer matrix [0.9, 0.8, 0.95].

[0152] The heat transfer coefficient is fused with the initial thermal distribution matrix to construct a multidimensional thermal distribution matrix. This fusion method multiplies the risk propagation value of each link by its corresponding heat transfer coefficient, taking into account the correlation between links. For example, the updated thermal value for the outpatient link is 0.6 × 1 = 0.6, the examination link is 0.4 × 0.9 + 0.4 = 0.76, the medication link is 0.7 × 0.8 + 0.7 = 1.26, and the surgery link is 0.8 × 0.95 + 0.8 = 1.56. The updated multidimensional thermal distribution matrix is ​​[0.6, 0.76, 1.26, 1.56].

[0153] The system regularly samples risk propagation values, calculates the risk evolution rate, and determines the thermal diffusion coefficient. In practice, the system can sample risk propagation values ​​once an hour. Assuming the risk propagation values ​​sampled at time T1 are [0.6, 0.76, 1.26, 1.56], and the risk propagation values ​​sampled at time T2 are [0.65, 0.8, 1.3, 1.6], the risk evolution rate is [0.05, 0.04, 0.04, 0.04] per hour.

[0154] The system calculates the heat diffusion coefficient of the multidimensional thermal distribution matrix based on the temporal correlation between the risk evolution rate and the diagnosis and treatment stages. For example, for the outpatient stage, where the risk evolution rate is higher, the heat diffusion coefficient can be set to 0.3; for other stages, the heat diffusion coefficient can be set to [0.3, 0.24, 0.24, 0.24] based on the ratio of the risk evolution rates. The system then analyzes the risk sensitivity of different types of medical behaviors based on a medical decision tree. In actual implementation, the system constructs a medical decision tree by analyzing the frequency of risk events for different medical behaviors in historical case studies. For example, the decision tree analysis shows that the surgical stage has the highest risk sensitivity, at 0.4; the medication stage is second, at 0.3; the examination stage is 0.2; and the outpatient stage has the lowest risk sensitivity, at 0.1.

[0155] The system converts risk sensitivity into risk weight coefficients. This conversion is done by directly using the sensitivity value as the weight coefficient, i.e., [0.1, 0.2, 0.3, 0.4]. The system then redistributes the heat in the multidimensional thermal distribution matrix based on the risk weight coefficient and the heat diffusion coefficient. Specifically, the system first multiplies the original heat value by the heat diffusion coefficient to obtain the diffusion amount. This diffusion amount is then weighted and distributed to each link using the risk weight coefficient.

[0156] Taking the outpatient care phase as an example, its diffusion is 0.6 × 0.3 = 0.18. This diffusion is distributed to each phase according to the weight coefficient: the outpatient phase receives 0.18 × 0.1 = 0.018, the examination phase receives 0.18 × 0.2 = 0.036, the medication phase receives 0.18 × 0.3 = 0.054, and the surgery phase receives 0.18 × 0.4 = 0.072. The diffusion distribution for other phases is calculated in this same way, ultimately resulting in a redistributed thermal matrix of [0.564, 0.7448, 1.2348, 1.5784]. Finally, the system sums the redistributed multidimensional thermal distribution matrix along each dimension to obtain the thermal aggregation value. In this example, the thermal aggregation value is 0.564 + 0.7448 + 1.2348 + 1.5784 = 4.122. The system uses this thermal aggregation value as the medical record risk score.

[0157] In practice, medical record risk scores can be further quantified into risk levels. For example, a risk score <3 indicates low risk, 3-5 indicates medium risk, and >5 indicates high risk. In this example, a score of 4.122 indicates medium risk. The system will prompt medical staff to pay attention to the medical record and may recommend a second review or preventive measures.

[0158] The advantages of this method are that it can capture the dynamic change trend of risks through sampling analysis in the time dimension; it can evaluate the spread of risks between different diagnosis and treatment links through heat diffusion analysis in the spatial dimension; and it can conduct more accurate risk assessments based on the actual risk characteristics of different medical behaviors through risk sensitivity analysis of the medical decision tree, thereby providing medical institutions with more comprehensive and accurate medical record risk warnings.

[0159] Existing medical risk assessment methods primarily rely on static risk indicator statistics and simple weighted calculations, which fail to effectively reflect the dynamic propagation and cumulative effects of risk during the diagnosis and treatment process. This innovative approach incorporates a thermal distribution model, analogizing the risk propagation process to heat transfer. By constructing a multidimensional thermal distribution matrix, it dynamically quantifies risk propagation. By calculating the risk evolution rate and thermal diffusion coefficient, it accurately captures the propagation patterns and attenuation characteristics of risk across different stages of diagnosis and treatment. Combined with risk sensitivity derived from medical decision tree analysis, a risk weighting system more aligns with clinical practice is established, avoiding the overly subjective weighting issues of traditional methods. Through heat redistribution and clustering calculations, it systematically integrates information from multiple dimensions, including temporal correlation, spatial distribution, and risk sensitivity, resulting in a more comprehensive and objective risk assessment of medical records. This thermodynamic model-based risk assessment method significantly improves the accuracy and timeliness of medical risk assessment, providing a more reliable basis for decision-making in healthcare quality management.

[0160] According to a second aspect of the embodiments of the present invention,

[0161] An electronic device is provided, comprising:

[0162] processor;

[0163] a memory for storing processor-executable instructions;

[0164] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.

[0165] According to a third aspect of the embodiments of the present invention,

[0166] A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method described above is implemented.

[0167] The present invention may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present invention.

[0168] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for constructing a composite trauma medical record intelligent quality control system, characterized in that: include: Trauma medical record data, including medical record text data and medical image data, is obtained and segmented into text segments and image blocks. Adversarial samples are generated by randomly masking and recombining text segments and image blocks. The word vector representation of the text segments and the visual feature representation of the image blocks in the adversarial samples are calculated and projected into a common feature space to generate semantic association features. Mapping semantic association features with rule items in the preset quality control rule library to obtain rule association results. Based on the rule association results, a directed acyclic graph of clinical events is constructed to extract temporal dependencies between events. By calculating the local causal effects and counterfactual conditional probabilities of clinical event nodes, missing nodes and edges in the directed acyclic graph of clinical events are identified to generate quality control defect data. Calculate the medical record risk score based on the number and importance of missing nodes in the quality control defect data, allocate computing resources based on the medical record risk score, generate quality control alarm information when the medical record risk score exceeds the preset risk threshold, write the quality control defect data and quality control alarm information into the quality control cache, generate a quality control analysis report, send the quality control analysis report to the clinical terminal, and store the quality control defect data, quality control alarm information and quality control analysis report into the quality control database; Based on the rule association results, a directed acyclic graph of clinical events is constructed to extract the temporal dependencies between events. By calculating the local causal effects and counterfactual conditional probabilities of clinical event nodes, missing nodes and edges in the directed acyclic graph of clinical events are identified, and quality control defect data is generated, including: constructing a conditional event in the rule association result as a parent node and a conclusion event as a child node, obtaining time information of the parent node and the child node, determining a temporal dependency relationship between the parent node and the child node based on the time information, calculating a conditional probability value between the parent node and the child node, and combining the parent node, the child node, the temporal dependency relationship, and the conditional probability value to construct a directed acyclic graph of clinical events; Extracting event node pairs from the directed acyclic graph of clinical events, obtaining local causal effect values ​​by performing intervention calculations on the event node pairs, extracting covariate information of the event node pairs, and calculating counterfactual conditional probability values ​​of the event node pairs based on the covariate information; An event whose local causal effect value exceeds a preset causal threshold but does not have a corresponding node in the directed acyclic graph of clinical events is determined as a missing node; an event relationship whose counterfactual conditional probability value exceeds a preset probability threshold but does not have a corresponding edge in the directed acyclic graph of clinical events is determined as a missing edge, and quality control defect data is generated based on the missing nodes and missing edges.

2. The method according to claim 1, characterized in that Obtain trauma medical record data including medical record text data and medical image data, split them into text segments and image blocks respectively, and generate adversarial samples by randomly masking and recombining text segments and image blocks. Segment the medical record text data using a sliding window to generate multiple text segments, each of which contains diagnosis description information and treatment record information; constructing an attention heat map for the medical image data, and calculating an attention score of the lesion area based on the attention heat map; determining a target area based on the attention score, setting a cropping window with the target area as the center, and generating multiple image blocks; Counting the frequency of occurrence of medical terms in the text segment, selecting the medical terms with the highest frequency of occurrence for masking, and generating text masking data; and simultaneously masking the non-target area in the image block while keeping the target area intact, and generating image masking data; The text masking data and the image masking data are paired in time sequence to construct an original sample pair; the text masking data and the image masking data of adjacent time sequences in the original sample pair are recombined to generate a recombined sample pair; the original sample pair and the recombined sample pair are merged to form a final adversarial sample.

3. The method according to claim 1, characterized in that Calculate the word vector representation of the text fragment and the visual feature representation of the image patch in the adversarial sample, and project them into a common feature space to generate semantically related features including: A pre-trained language model is used to extract features from text segments to obtain word vectors; a query matrix and a key-value matrix are constructed based on the word vectors; the query matrix and the key-value matrix are multiplied to obtain attention weights; and the attention weights are weighted with the word vectors to obtain text semantic features; Perform convolution feature extraction on image blocks to obtain global visual features, perform multi-scale pooling operations on global visual features to obtain multi-scale visual features, and perform feature fusion on global visual features and multi-scale visual features to obtain image semantic features; Calculating the mean vector and covariance matrix of text semantic features to obtain text distribution parameters, calculating the mean vector and covariance matrix of image semantic features to obtain image distribution parameters, constructing a multilayer perceptron as a feature projection network based on the text distribution parameters and image distribution parameters, and performing feature projection on the text semantic features and image semantic features to obtain text projection features and image projection features; Constructing a set of sample pairs, including positive sample pairs consisting of text projection features and image projection features that correspond to each other in time sequence, and negative sample pairs consisting of text projection features and image projection features that do not correspond to each other in time sequence, respectively calculating the positive sample similarity of the positive sample pairs and the negative sample similarity of the negative sample pairs, and at the same time dividing the text projection features and image projection features into regions and calculating the local similarity; The positive sample similarity, negative sample similarity and local similarity are combined to construct a multi-granularity contrast loss function, which is iteratively optimized based on the gradient descent method to obtain semantic association features.

4. The method according to claim 1, wherein Extracting event node pairs from the clinical event directed acyclic graph, obtaining local causal effect values ​​by performing intervention calculations on the event node pairs, extracting covariate information of the event node pairs, and calculating counterfactual conditional probability values ​​of the event node pairs based on the covariate information includes: Extracting event duration information from clinical data, statistically calculating the duration distribution of each event, and determining the core impact duration of each event based on the duration distribution; Calculating the basic impact strength of the event based on the core impact duration, substituting the time difference between the event occurrence time and the current time into an exponential decay function to obtain a time decay value, determining whether the time decay value exceeds the core impact duration to obtain an impact decay value, and multiplying the basic impact strength, the time decay value, and the impact decay value to obtain an event impact threshold; Extract event node pairs from a directed acyclic graph of clinical events, apply intervention operations to source events in the event node pairs, calculate the conditional probabilities of target events before and after the source event intervention, multiply the conditional probabilities by the event impact threshold, and accumulate the integral over the time dimension to obtain the local causal effect value of the event node pairs; Extracting covariate information of the event node pair, calculating an impact threshold of the covariate information based on the core impact duration and the event impact threshold, and multiplying the impact threshold of the covariate information by the event impact threshold of the event node pair to obtain an impact assessment value of the covariate information; Based on the impact evaluation value of the covariate information, the conditional probability of the event node pair is weighted, and the weighted conditional probability is multiplied and integrated with the event impact threshold to obtain the counterfactual conditional probability value of the event node pair.

5. The method according to claim 1, characterized in that The medical record risk score is calculated based on the number and importance of missing nodes in the quality control defect data. Computing resources are allocated based on the medical record risk score. When the medical record risk score exceeds the preset risk threshold, quality control alarm information is generated, including: Extracting medical decision points and diagnosis and treatment behavior sequences from historical medical record data, calculating the impact probability of the medical decision points and the diagnosis and treatment behavior sequences, and constructing a causal chain of clinical events based on the impact probability; Extract missing node information from quality control defect data, obtain the target node corresponding to the missing node in the standard clinical pathway, calculate the data integrity difference between the missing node and the target node, calculate the node deviation coefficient based on the difference, analyze the cross-interaction strength between the missing node and the nodes in the clinical event causal chain based on the node deviation coefficient, and recursively propagate the cross-interaction strength to obtain a risk propagation value; Constructing a multidimensional thermal distribution matrix based on the risk propagation value, calculating the time series sampling difference of the risk propagation value to obtain the risk evolution rate, calculating the heat diffusion coefficient of the multidimensional thermal distribution matrix according to the risk evolution rate, and using the heat aggregation value of the multidimensional thermal distribution matrix as the medical record risk score; The heat diffusion area is predicted according to the heat diffusion coefficient, computing resources are allocated based on the heat concentration value, and when the medical record risk score exceeds a preset risk threshold, quality control alarm information is generated based on the heat transfer path of the multidimensional thermal distribution matrix.

6. The method according to claim 5, characterized in that Constructing a multidimensional thermal distribution matrix based on the risk propagation value, calculating the time series sampling difference of the risk propagation value to obtain the risk evolution rate, calculating the heat diffusion coefficient of the multidimensional thermal distribution matrix according to the risk evolution rate, and using the heat aggregation value of the multidimensional thermal distribution matrix as the medical record risk score includes: Constructing an initial thermal distribution matrix based on the temporal correlation and spatial distribution of the risk propagation values, calculating the propagation attenuation of the risk propagation values ​​between diagnosis and treatment links to obtain a heat transfer coefficient, and fusing the heat transfer coefficient with the initial thermal distribution matrix to construct a multidimensional thermal distribution matrix; The risk propagation value is sampled at regular intervals, the difference between the risk propagation values ​​at adjacent sampling moments is calculated to obtain the risk evolution rate, and the heat diffusion coefficient of the multidimensional thermal distribution matrix is ​​calculated based on the temporal correlation between the risk evolution rate and the diagnosis and treatment links; Analyzing the risk sensitivity of different types of medical behaviors based on a medical decision tree, converting the risk sensitivity into a risk weight coefficient, and redistributing the heat in a multidimensional thermal distribution matrix according to the risk weight coefficient and the heat diffusion coefficient; The redistributed multi-dimensional thermal distribution matrix is ​​summed up according to each dimension to obtain a heat accumulation value, which is used as the medical record risk score.

7. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method according to any one of claims 1 to 6.

8. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Electronic medical record diagnosis and treatment quality control method based on clinical diagnosis and treatment guide

    CN113361230A

  • Electronic medical record automatic quality control system and method based on large language model

    CN119692879A