Trauma department medical record construction method and system based on self-iterative reasoning
By using a self-iterative reasoning generation method, combined with hierarchical constraint prompts and a self-iterative verification network, the problems of standardization and resource limitations in medical record generation technology are solved, enabling efficient and standardized construction of trauma department medical records and improving their clinical usability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- PEOPLES HOSPITAL PEKING UNIV
- Filing Date
- 2026-01-26
- Publication Date
- 2026-06-02
AI Technical Summary
Existing medical record generation technologies cannot effectively adapt to the diagnosis and treatment guidelines of specific hospitals and departments, resulting in the need for doctors to make extensive modifications to the generated medical records. Furthermore, the static rule execution logic cannot handle the contradiction between high-standard guidelines and limited local resources, leading to risks in medical decision-making or the system's inability to learn adaptively.
A method based on self-iterative reasoning is adopted, which uses hierarchical constraint prompts and a self-iterative verification network, combined with a multi-center diagnostic and treatment standard structured knowledge base, to generate a modular reasoning process data flow. The abnormal modules are corrected by self-iterative optimization of the process and composite knowledge base, ensuring that the medical records conform to medical logic and actual operating conditions.
It enables efficient and standardized construction of medical records, ensuring that the generated medical records comply with medical standards and actual operating conditions, improving the clinical usability of medical records and the adoption rate by doctors, and avoiding problems such as model illusion and resource conflicts.
Smart Images

Figure CN121565362B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical record construction technology, and in particular to a method and system for constructing trauma department medical records based on self-iterative reasoning. Background Technology
[0002] With the rapid development of smart healthcare technology, using large language models to assist doctors in writing electronic medical records has become an important means of improving clinical efficiency, especially in trauma departments where timeliness is extremely important, where the rapid generation of standardized medical records is crucial for emergency decision-making. However, existing medical record generation technologies typically rely on general medical knowledge graphs or single large model reasoning, which suffers from "black box" and uncontrollable problems. In practical applications, general large models often lack the ability to accurately adapt to the extremely detailed diagnostic and treatment guidelines of specific hospitals and departments. As a result, although the generated medical records are correct in terms of overall medical logic, they fail to pass quality control due to the lack of specific standard references or terminology that does not conform to the hospital's habits, forcing doctors to make a lot of secondary revisions and failing to truly reduce their workload.
[0003] Furthermore, a more serious conflict-ridden technical problem lies in the fact that existing standardized medical record creation systems often employ static, rigid rule-based logic, failing to address the contradiction between high-standard guidelines and limited local resources. For example, national trauma guidelines may mandate advanced treatment methods, such as the REBOA procedure. However, grassroots hospitals, limited by hardware equipment, lack the conditions to implement it. Existing technologies either blindly follow high-priority guidelines, generating theoretically correct but practically unfeasible illusory medical records, leading to risks in medical decision-making; or they rely solely on manual correction by doctors, preventing the system from adaptively learning. Summary of the Invention
[0004] This invention aims to at least partially solve one of the technical problems in related technologies. Therefore, the purpose of this invention is to propose a method and system for constructing trauma department medical records based on self-iterative reasoning, achieving efficient and standardized construction of trauma department medical records.
[0005] To achieve the above objectives, a first aspect of the present invention proposes a method for constructing trauma ward medical records based on self-iterative reasoning, comprising the following steps:
[0006] In response to the medical record generation request from the trauma department, obtain the doctor-patient dialogue text and the current diagnosis and treatment scenario identifier;
[0007] The pre-built multi-center structured knowledge base of diagnosis and treatment guidelines is invoked, and the corresponding set of diagnosis and treatment guidelines is determined according to the current diagnosis and treatment scenario identifier. The set of diagnosis and treatment guidelines includes strongly constrained guidelines and weakly constrained guidelines.
[0008] Based on the set of diagnostic and treatment guidelines, hierarchical constraint prompts are generated, and the hierarchical constraint prompts and the doctor-patient dialogue text are input into a large language model to generate a modular initial inference process data stream;
[0009] Initiate an iterative optimization process for the initial inference process data stream: use a preset verification network to perform medical logic semantic consistency verification on the initial inference process data stream;
[0010] If the verification fails, the abnormal reasoning module is located based on the verification result, the composite knowledge base is called to correct the abnormal reasoning module, and an updated reasoning process data stream is generated until the verification passes or the preset number of iterations is reached.
[0011] In response to a successful verification signal, the target structured medical record is generated and output based on the final inference process data stream.
[0012] To achieve the above objectives, a second aspect of the present invention proposes a trauma ward medical record construction system based on self-iterative reasoning, comprising:
[0013] The standardization management module is used to build and maintain a structured knowledge base of multi-center diagnosis and treatment standards, and outputs a set of diagnosis and treatment standards containing strongly constrained standards and weakly constrained standards based on scenario identifiers;
[0014] The prompt word generation module is used to generate hierarchical constraint prompt words based on the set of diagnostic and treatment guidelines. The prompt words include a basic layer, a constraint layer, an adaptation layer, and a feedback reservation layer.
[0015] The reasoning iteration module is used to input the hierarchical constraint prompts and doctor-patient dialogue text into the large language model to generate the reasoning process data stream, and execute the self-iterative optimization process: call the verification network to perform medical logic semantic consistency verification on the reasoning process; if the verification fails, call the composite knowledge base recall and correction rules to correct the abnormal module and update the data stream.
[0016] The medical record generation module is used to generate and output the target structured medical record in response to the signal that the data stream in the inference process has passed the verification.
[0017] To achieve the above objectives, a third aspect of the present invention provides an electronic device including a memory, a processor, and a computer program stored in the memory. When the computer program is executed by the processor, it implements the above-described method for constructing trauma department medical records based on self-iterative reasoning.
[0018] The trauma department medical record construction method and system based on self-iterative reasoning in this invention, through hierarchical constraint prompts and a self-iterative verification network, restricts the generation capability of a large language model within the dual security boundaries of medical logic and treatment guidelines, effectively solving the compliance problem caused by model illusion; in particular, it introduces a two-level dynamic bridging mechanism based on semantic implication, which can identify logically correct reasoning steps that lack explicit references, avoiding the pseudo-logical breakage problem caused by mechanical verification.
[0019] Meanwhile, this application creatively resolves the execution conflict between high-standard guidelines and the lack of primary healthcare resources through a rule feasibility verification mechanism based on local resource constraints. This ensures that the generated medical records not only comply with medical standards but also meet the actual operational conditions of the current medical scenario, significantly improving the clinical usability of the medical records and the adoption rate by doctors. Attached Figure Description
[0020] Figure 1 This is a flowchart illustrating the trauma department medical record construction method based on self-iterative reasoning provided by the present invention;
[0021] Figure 2 This is a radar chart comparing the performance of the initial and final medical records in the trauma department medical record construction method based on self-iterative reasoning provided by this invention under a three-dimensional evaluation system.
[0022] Figure 3 This is a simulation diagram of PID control for dynamic weight adjustment of prompt word module based on evaluation feedback in the trauma department medical record construction method based on self-iterative reasoning provided by the present invention.
[0023] Figure 4 This is a simulation diagram of the convergence trend of multi-dimensional evaluation indicators in the self-iterative optimization process of the trauma department medical record construction method based on self-iterative reasoning provided by the present invention;
[0024] Figure 5 This is a simulation diagram of the semantic vector space mapping between medical principle nodes and strongly constrained normative clauses in the trauma department medical record construction method based on self-iterative reasoning provided by the present invention.
[0025] Figure 6 This is a schematic diagram of vector projection and activation threshold distribution in the logical implication probability calculation model of the trauma department medical record construction method based on self-iterative reasoning provided by the present invention;
[0026] Figure 7 This is a heatmap of the matching matrix between the resource requirements of the correction rules and the resource capacity map of the hospital in the trauma department medical record construction method based on self-iterative reasoning provided by the present invention.
[0027] Figure 8This is a schematic diagram illustrating the implementation of the trauma department medical record construction system based on self-iterative reasoning provided by the present invention.
[0028] Figure 9 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0029] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.
[0030] The following description, with reference to the accompanying drawings, outlines a method, system, and electronic device for constructing trauma department medical records based on self-iterative reasoning, according to embodiments of the present invention.
[0031] Example 1:
[0032] This embodiment details a method for constructing trauma department medical records based on self-iterative reasoning. The method in this embodiment mainly runs on electronic devices, such as hospital servers, workstations, or cloud computing platforms.
[0033] like Figure 1 As shown, the method includes the following:
[0034] Step S100: The starting point of the medical record creation process is the real-time response to clinical needs.
[0035] For example, the system first responds to a medical record generation request from the trauma department. This request is typically triggered by a clinician during or after a consultation via a terminal device, such as clicking the smart generate button in the electronic medical record system or waking up the system via voice command.
[0036] Upon receiving the generation request, the system performs an acquisition operation, which mainly retrieves the doctor-patient dialogue text and the current diagnosis and treatment scenario identifier.
[0037] The doctor-patient dialogue text is a text stream converted from audio recordings taken at the treatment site using Automatic Speech Recognition (ASR) technology. Considering the noisy nature of trauma emergency environments and the urgency of the conversation, the text may contain multi-speaker separation markers and timestamps. The system preprocesses the original text, removing irrelevant interjections and non-medical chatter, retaining core consultation information, patient complaints, and verbal medical orders from the doctor.
[0038] For example, the current treatment scenario identifier is key metadata used to define the medical record generation environment. This identifier not only includes the broad label of trauma department, but also specifies the subspecialty or treatment stage, such as the resuscitation room for severe multiple injuries, the emergency reduction room for pelvic fractures, or the neurosurgical emergency observation room. This identifier can be obtained automatically by the system based on the logged-in doctor's account permissions, or it can be manually selected by the doctor on the interface. This identifier plays a crucial indexing role in subsequent steps, determining which level of knowledge base and rule set the system will invoke.
[0039] Step S200: After obtaining the input data, the system enters the core knowledge retrieval and rule matching stage.
[0040] The system invokes a pre-built multi-center treatment guidelines structured knowledge base. The process of building this multi-center treatment guidelines structured knowledge base includes collecting clinical guidelines and departmental personalized operating procedures at different levels. The system aggregates a massive amount of medical guidelines documents through web scraping, authoritative database interfaces, or manual input. These documents are then segmented and structured according to three dimensions: constraint strength, applicable scenarios, and reasoning modules.
[0041] For example, the constraint strength dimension is key to distinguishing the enforceability of regulations. Regarding the constraint strength dimension, a strong constraint regulation is defined as a mandatory requirement that includes pre-defined diagnostic indicators for traumatic shock. For instance, the "Chinese Guidelines for the Prevention and Treatment of Hypertension (2024 Revised Edition)" explicitly states that "systolic blood pressure below 90 mmHg is considered hypotension, and heart rate exceeding 120 beats / minute is considered tachycardia," which is a strong constraint regulation. Such regulations involve life safety and do not allow any deviation from the model. Conversely, a weak constraint regulation is defined as a non-mandatory requirement that includes departmental personalized writing habits. For example, a hospital's trauma department might habitually abbreviate a history of hypertension in past medical records as HBP, or habitually describe positive signs before negative signs. Such regulations are a matter of style preference, do not affect the core medical logic, and allow for a certain degree of flexibility.
[0042] For example, the applicable scenario dimension is used to mark the specific environment in which the standard takes effect, corresponding to the aforementioned diagnosis and treatment scenario identifier. The reasoning module dimension, on the other hand, segments the standard and categorizes it into specific paragraphs of the medical record, such as present illness, past medical history, physical examination, auxiliary examinations, and diagnostic basis, to facilitate micro-level access.
[0043] Furthermore, to resolve potential conflicts between standards from multiple sources, a standard conflict arbitration mechanism has been established in the knowledge base. When standards from different sources conflict in the same scenario, the system must determine which standard should be implemented. The effective standard is determined according to a preset priority order, which is as follows: national guidelines, provincial standards, hospital-level standards, and departmental personalized rules.
[0044] Optionally, this priority ranking logic is implemented internally by a weighted scoring algorithm. For example, if national guidelines stipulate that a certain type of operation is mandatory, while departmental rules stipulate that it is optional, the system determines that the operation is mandatory as the final constraint based on priority.
[0045] Returning to the operational flow, the system searches the aforementioned structured knowledge base based on the current treatment scenario identifier to determine the corresponding set of treatment guidelines. This set of guidelines is a customized rule package for this medical record generation task. The set of guidelines explicitly includes both strongly constrained and weakly constrained guidelines, defining rigid baselines and flexible boundaries for subsequent large-scale model inference.
[0046] Step S300: In order for the large language model to accurately understand and execute the above-mentioned complex set of specifications, the present invention adopts a hierarchical prompting engineering technique.
[0047] The system generates hierarchical constraint prompts based on the set of diagnostic and treatment guidelines. This process includes constructing a prompt architecture that includes a basic layer, a constraint layer, an adaptation layer, and a feedback reservation layer.
[0048] For example, the base layer mainly includes the model's role setting (such as setting itself as an experienced trauma specialist), task objectives (generating structured medical records based on dialogue), and basic language style instructions.
[0049] Within the constraint layer, the system performs refined rule embedding operations. The strongly constrained specifications are embedded for the diagnostic reasoning unit. This means that the prompt words explicitly require the model to strictly reference the threshold values in the strongly constrained specifications when deriving diagnostic conclusions. For example, the prompt words might include: "When determining whether a patient is in shock, it is necessary to check whether the systolic blood pressure is less than..." And whether the lactate value is greater than ,in and These are strong constraint variables. The weak constraint norms are embedded in the supplementary units for details of the present medical history. This guides the model to refer to the wording conventions in the weak constraint norms when writing medical history descriptions, but not to rigidly copy them; the focus is on the completeness and fluency of the information.
[0050] The adaptation layer embeds multi-center specification adaptation tags that match the current treatment scenario identifier. For example, if the scenario identifier is the Trauma Center of XX Hospital, the adaptation layer will load the center's unique terminology mapping table and template structure tags to ensure that the generated medical records meet the center's administrative quality control requirements.
[0051] Hidden attribute identifiers are set in the feedback reservation layer. These identifiers are invisible in the final medical record text presented to the doctor, but they serve as crucial anchors in the internal data flow of the system. They are primarily used to locate the corresponding inference module during subsequent iterations or when doctors provide feedback. For example, each text paragraph generated in the inference step is tagged with a unique hash ID. When a doctor raises an objection to a paragraph, the system can quickly trace back to the specific prompt word fragment and referenced canonical entries used to generate that paragraph using this ID.
[0052] Subsequently, the system inputs the hierarchical constraint prompts along with the doctor-patient dialogue text into the large language model. Based on this contextual information, the large language model performs deep reasoning, generating a modular initial version of the reasoning process data stream. Here, modularity means that the generated content is not a general text, but is clearly divided into independent logical units according to the medical record structure, such as the chief complaint module, present illness history module, and physical examination module, with each unit carrying a specific reasoning path.
[0053] Step S400: The initial inference results often fail to directly meet stringent clinical requirements, therefore the system immediately initiates a self-iterative optimization process for the initial inference process data stream. The core of this process lies in using a pre-defined verification network to perform medical logical semantic consistency verification on the initial inference process data stream.
[0054] The verification process is highly structured. The system first breaks down the initial inference process data stream into multiple inference sub-modules, including present medical history, past medical history, physical examination, and diagnostic evidence. This breakdown allows for parallel processing of the verification work and enables precise problem localization.
[0055] Next, the system constructs a verification network based on general medical logic and the structured knowledge base of the multi-center diagnosis and treatment guidelines. This verification network can be understood as a graph structure composed of medical entity nodes and logical relationship edges, or as a series of pre-trained discriminative models.
[0056] The verification network is used to sequentially perform causal relationship verification, standard consistency verification, terminology standardization verification, and logical loop verification on each inference submodule.
[0057] For example, causality checks are used to examine whether there are logical contradictions between symptoms and diagnoses in a medical record. For instance, if the present medical history describes that the patient has full range of motion in their left lower limb, but the diagnosis is a left femoral shaft fracture, the causality check will report an error.
[0058] For example, the standard consistency check is used to compare whether the inference content matches the aforementioned set of established diagnostic and treatment standards.
[0059] For example, terminology standardization checks are used to ensure that all medical terms conform to the standard terminology set.
[0060] The logical closed-loop verification is one of the key aspects of this embodiment. This verification includes checking whether reasoning steps involving strongly constrained specifications contain valid reference specification identifiers. If the model arrives at a conclusion based on a strongly constrained indicator but fails to explicitly indicate the guideline clause ID it relies on in the reasoning chain, the system determines that this step is risky. If a reference specification identifier is missing, it is considered a logical break. This mechanism forces the model to have a basis, eliminating the possibility of fabricating diagnostic evidence out of thin air.
[0061] In addition, the process of initiating an iterative optimization of the initial inference process data stream also includes a multi-dimensional evaluation step, which aims to quantify the quality of the generated medical records.
[0062] The system constructs a multi-dimensional evaluation system based on the controllability of medical logic, the flexibility of scenario adaptation, and the conformity with clinical practice.
[0063] For example, the system calculates the score of the current inference process data flow under the multi-dimensional evaluation system. The calculation indicators for the controllability of medical logic include clinical guideline fit and key terminology accuracy.
[0064] Optionally, clinical guideline fit It can be calculated using the following formula:
[0065] ;
[0066] in, This represents the number of steps in the reasoning process that conform to the strong constraint rules. This indicates the total number of reasoning steps involved in strongly constrained rules.
[0067] Key term accuracy It can be calculated using the following formula:
[0068] ;
[0069] in, This indicates the number of times correct standard medical terminology was used. This indicates the total number of times a medical entity is mentioned in the medical record.
[0070] The calculation metrics for scenario adaptation flexibility include the completeness of inference in the new scenario. It can be calculated using the following formula:
[0071] ;
[0072] in, This indicates the number of core elements actually covered in the generated medical record. This indicates the total number of core elements that should be covered based on the current scene identifier.
[0073] The calculation indicators for clinical practice compliance include the physician annotation error rate. It can be calculated using the following formula:
[0074] ;
[0075] Here, this metric might be used more for model training or historical data statistics, but in real-time generation, the system can estimate this value by simulating a doctor's predictive model. Alternatively, this metric can be dynamically calculated based on the proportion of corrections triggered in previous iterations.
[0076] like Figure 2 A radar chart comparing the performance of initial and final medical records under a three-dimensional evaluation system is presented. The chart establishes five core evaluation dimensions: clinical guideline compliance, accuracy of key terminology, flexibility in scenario adaptation, feasibility in clinical practice, and feedback response rate. These dimensions collectively constitute the three-dimensional evaluation system described in this invention.
[0077] Figure 2 The small, irregularly shaped blue dashed closed loop in the central region represents the quality of the medical record generated from the unoptimized initial inference process data flow. Its scores across all dimensions are low, particularly in the clinical feasibility dimension, which corresponds to the issues of large language models easily generating unrealistic illusions and resource conflicts mentioned in the background section. Conversely, the significantly expanded, full-shaped red solid closed filled region represents the quality of the final structured medical record after processing by the self-iterative optimization process described in this invention.
[0078] The comparison shows that the clinical guideline fit and the accuracy of key terms improved from a low initial level to an extremely high level, directly verifying the dual control effect of hierarchical constraint prompts and medical logic verification networks. At the same time, the significant improvement in clinical feasibility and scenario adaptability ensures that the generated medical records not only conform to medical theory but also fit the actual hospital implementation environment, ultimately achieving a leapfrog evolution from unusable drafts to high-quality clinical documentation.
[0079] Next, the system determines whether the target has been met based on the calculation results. If the score does not fall within the preset equilibrium range, the system dynamically adjusts the parameter weights of the strong constraint module and the weak constraint module in the hierarchical constraint prompts, and triggers the generation of the next round of reasoning process.
[0080] For example, the preset equilibrium range refers to the threshold range in which all indicators reach a satisfactory level. If the controllability of medical logic is found to be too low, the system will increase the weight of the strong constraint module in the prompt words in the next generation, for example, by using more stringent instruction words or repetition emphasis rules; if the flexibility of scene adaptation is found to be insufficient, making the medical records appear rigid, the system will appropriately increase the weight of the weak constraint module, allowing the model to exert more language organization capabilities.
[0081] like Figure 3 A simulation diagram of PID control with dynamic weight adjustment based on evaluation feedback for the prompt word module is shown. This diagram intuitively reflects the adaptive adjustment capability of the system described in this invention when dealing with sudden and complex cases. In the diagram, the horizontal axis represents the batch sequence generated by inference iteration, and the two vertical axes represent the controlled state and control action of the system, respectively.
[0082] Figure 3 The blue dotted-line waveform represents the real-time detected medical logic error rate, while the red solid-line waveform represents the weight parameter values of the strongly constrained module in the prompt word architecture. Simulation data shows that at the tenth iteration batch, the system encountered highly complex trauma case inputs, causing a step-like surge in the medical logic error rate shown by the blue curve. This simulates a scenario in actual clinical practice where a large language model experiences hallucinations due to a rare condition. At this point, the PID control algorithm integrated within the system responds rapidly, driving the weight parameters of the strongly constrained module shown by the red curve to rise quickly. This rise process exhibits typical proportional-integral-derivative control characteristics, namely, a fast rise time to suppress errors immediately, accompanied by a small overshoot to accelerate system convergence.
[0083] As the weight of strong constraints increases, the intensity of mandatory instructions regarding treatment guidelines in the prompts significantly strengthens, effectively suppressing divergent reasoning in the large model. This causes the error rate, as shown by the blue curve, to decay exponentially and quickly return to a low, safe range. This dynamic adjustment process powerfully demonstrates that the three-dimensional evaluation iterative optimization mechanism described in this invention is not a simple linear adjustment, but possesses the robustness and stability found in automatic control theory. It ensures that even when the treatment scenario undergoes drastic changes, the quality of the medical records generated by the system remains consistently within the strict boundaries of medical guidelines.
[0084] Step S500: If the verification fails, the system enters the correction phase. The system locates the anomaly reasoning module based on the verification result. Thanks to the aforementioned modular design and hidden attribute identifiers, the system can accurately identify which statement or logic deduced the problem.
[0085] Subsequently, the system invokes a composite knowledge base to correct the abnormal reasoning module; the correction process is highly intelligent. The system first identifies the target abnormal reasoning module containing medical logic errors or failing to adapt to the standards based on the verification results.
[0086] Next, based on the feature vector of the target anomaly inference module, the system performs multi-dimensional recall within the composite knowledge base. Here, the feature vector is a high-dimensional numerical vector converted from the anomalous text using an embedding model. The composite knowledge base integrates a general medical common sense base, the structured knowledge base of the multi-center diagnosis and treatment guidelines, and a doctor feedback rule base, forming a comprehensive knowledge support system.
[0087] After recalling multiple potential correction rules, the system prioritizes them according to a preset priority order. The priority order for correction rules is: strongly binding rules from national guidelines, rules requiring doctor feedback confirmation, hospital-level standards, rules based on general medical knowledge, and rules with weak constraints.
[0088] For example, if the check finds an error in the shock management module, the system recalls three rules: one is general fluid resuscitation therapy (common sense), one is the hospital's internal rapid fluid resuscitation procedure (hospital standard), and one is the restrictive fluid resuscitation strategy in national guidelines (strong constraints in national guidelines). Based on priority, the system will prioritize the restrictive fluid resuscitation strategy.
[0089] The system reconstructs the reasoning logic of the target anomaly reasoning module using a first-order correction rule. This involves replacing erroneous logic with correct rules and regenerating the module's text.
[0090] This process may repeat cyclically, generating an updated inference process data stream until validation passes or the preset number of iterations is reached. The preset number of iterations (e.g., 3 or 5) is set to prevent the system from entering an infinite loop and to ensure that the system's response time is within an acceptable range.
[0091] like Figure 4 A simulation graph showing the convergence trend of multi-dimensional evaluation metrics during the self-iterative optimization process is presented. This graph intuitively reflects the performance evolution characteristics of the system described in this invention under continuous multi-round iterative corrections. In the graph, the horizontal axis represents the sequence of rounds of self-iterative optimization performed by the system, and the vertical axis represents the score of the multi-dimensional evaluation system after normalization.
[0092] Figure 4The solid blue line represents the medical logic controllability index. This index was only 0.45 in the initial first round, indicating significant logical flaws in the initial reasoning. However, with the dynamic intervention of strong constraint prompt weights, the curve showed a steep upward slope in the second and third rounds, quickly stabilizing at a high level of 0.96 in the fourth round, demonstrating the verification network's ability to immediately block and correct logical errors. The dashed red line represents the scenario adaptation flexibility index, which shows a stepped upward trend, indicating that the system effectively solved the problems of rigid terminology or inflexible templates by gradually adjusting the parameters of the weak constraint modules. The dotted green line represents the clinical practice compliance index. This index started at a low of only 0.38, usually attributed to the conflict between high-standard guidelines and local resource capabilities. However, with the round-by-round recall of resource feasibility verification rules and the generation of deviation statements in the composite knowledge base, this index steadily increased, finally reaching 0.95 in the fifth round.
[0093] Overall, all three curves entered the preset equilibrium convergence interval shown by the gray shade in the fourth to fifth rounds, which strongly proves that the self-iterative optimization process described in this invention has good mathematical convergence and can ensure that the system can transform the low-quality initial inference flow into high-quality compliant medical records within a limited computational overhead, without falling into abnormal states such as divergent oscillation or infinite loop.
[0094] In addition, the self-iterative optimization process also includes steps for filtering and handling error cases.
[0095] In the self-iterative optimization process, the system identifies erroneous reasoning data flows that fail medical logic verification, fail to adapt to specifications, or lack key information. These are the problem points that the system cannot self-correct even after multiple attempts.
[0096] The system performs structured annotation on the error reasoning process data stream, records information such as the error type, triggering scenario, and related normative entries, and generates error case data.
[0097] Finally, the erroneous case data is stored in an error case database, and the verification parameters of the verification network are updated based on the erroneous case data. This means that the system has self-learning capabilities, continuously adjusting the sensitivity and judgment logic of the verification network by analyzing failed cases to avoid repeating the same mistakes in the future.
[0098] Step S600: When the self-iterative process ends successfully, i.e. in response to the verification pass signal, the system considers that the current reasoning content has a high degree of accuracy and compliance.
[0099] The system generates and outputs the target structured medical record based on the final inference process data stream. The output can be in the form of a standard electronic medical record (EMR) data package, which is directly written into the hospital's information system database; or it can be a draft text presented on the doctor's workstation interface for the doctor's final confirmation.
[0100] Step S700: To ensure continuous optimization, this invention also designs a variant of the reinforcement learning (RLHF) mechanism based on human feedback. The method further includes a closed-loop optimization step based on physician feedback.
[0101] The system receives feedback information for the target structured medical record through a feedback interface. This feedback interface is embedded in the doctor's work interface and is designed to be lightweight and convenient. The feedback information includes error type selection instructions or rule suggestion text. For example, the doctor can select a paragraph and choose a label for logical error or inappropriate terminology, or directly enter a text note: "The patient's allergy history should be added here."
[0102] The system uses natural language processing algorithms to categorize the feedback information and associate it with the corresponding inference module, composite knowledge base, or prompt word architecture. If the doctor points out a logical problem, the feedback will be associated with the inference module; if it points out a citation error, it will be associated with the knowledge base; if it points out an inappropriate tone, it may be associated with the prompt word architecture.
[0103] Once the feedback information is confirmed by a predetermined number of doctors from the same department, incremental training of the large language model is triggered. This is a crowdsourced quality control mechanism to prevent individual doctors' personal preferences from misleading the model. Training will only begin after common problems are identified.
[0104] The incremental training employs a supervised training approach. Supervised training (SFT) here refers to fine-tuning the model parameters using high-quality labeled data. The training dataset is composed of doctor-patient dialogue text, a corrected modular reasoning process, multi-center standardized labels, and doctor feedback annotations. In this way, the model not only learns the correct way to write medical records but also remembers the doctor's correction logic for specific errors, thus performing more intelligently and in line with clinical needs in subsequent services.
[0105] In summary, this embodiment constructs a closed-loop trauma department medical record construction system through the complete process of S100 to S700 described above, effectively solving the pain points in the prior art.
[0106] Example 2:
[0107] This embodiment, based on the overall trauma department medical record generation process constructed in Embodiment 1, further elaborates on the logical closed-loop verification step. Especially in actual clinical applications, large language models often possess rich potential medical knowledge and can make correct clinical judgments, but may be misjudged as logical errors due to failure to accurately match specific clause IDs in the structured knowledge base. To solve this technical problem of pseudo-logical breakage, this embodiment discloses in detail a logical closed-loop verification method including a two-level dynamic bridging process. Specifically, it includes the following:
[0108] The method described in this embodiment also runs on an electronic device with high-performance computing capabilities, which is equipped with a preset verification network and a multi-level knowledge base system.
[0109] Step S410: During the system's iterative optimization process of the initial inference data flow, logical closed-loop verification is the last line of defense to ensure medical record compliance. The verification network scans each module in the inference process line by line.
[0110] For example, when the validation network scans to a reasoning step involving strongly constrained specifications, the system first performs a validity check. Strongly constrained specifications typically involve core medical actions such as emergency resuscitation, surgical indication determination, and critical value management; therefore, the system requires these steps to explicitly include a specification reference identifier. The system parses metadata or special marker bits in the reasoning text to check for the existence of a unique index key pointing to a multi-center, structured knowledge base of treatment guidelines.
[0111] In response to the detection that the strongly constrained reasoning step lacks a valid reference specification identifier, the system does not directly trigger an error reporting mechanism or determine that the step is incorrect. Instead, it immediately activates the secondary dynamic bridging process. At this time, the system suspends the verification status of the current reasoning step, i.e., pauses the determination of logical breakage. The original intention of this mechanism is to give the large language model a chance for self-explanation or bypass verification, avoiding the obliteration of correct medical logic due to format issues.
[0112] Step S420: In the suspended state, the system begins to analyze the inherent semantics of the reasoning step in depth.
[0113] Optionally, the system invokes a pre-built natural language processing encoder to extract semantic feature quantities of the strongly constrained reasoning steps. This encoder typically employs a Transformer architecture model fine-tuned with massive amounts of medical text, capable of mapping natural language descriptions of diagnostic and treatment behaviors into a high-dimensional semantic space.
[0114] Let the text content of the strongly constrained reasoning step be... The extracted semantic feature vector is denoted as This vector can capture key medical entities in the text (such as systolic blood pressure, shock), action intentions (such as diagnosis, administration), and degree modifiers (such as severe, immediate).
[0115] Subsequently, the system performs a search in a pre-defined general medical knowledge base based on the semantic feature vectors. It is important to note that the general medical knowledge base differs significantly in nature from the aforementioned multi-center treatment guidelines structured knowledge base. The multi-center treatment guidelines structured knowledge base stores rules and regulations, focusing on administrative and quality control constraints; while the general medical knowledge base stores principles and facts, focusing on causal mechanisms in physiology, pathology, and pharmacology, falling under the category of white-box knowledge.
[0116] For example, the retrieval process is achieved through calculation. This is achieved through vector similarity with various knowledge nodes in a general medical knowledge base. The system aims to determine whether there exists a medical principle node that can explain the strongly constrained reasoning step. For example, if the reasoning step is that a patient's systolic blood pressure is 80 mmHg, indicating shock, but no guidelines are cited, the medical principle node retrieved from the knowledge base by the system might be that a systolic blood pressure below 90 mmHg is a typical hemodynamic feature of shock in adults.
[0117] like Figure 5 A simulation diagram illustrating the semantic vector space mapping between medical principle nodes and strongly constrained normative clauses is presented. This diagram uses visualization dimensionality reduction technology to intuitively present the operational mechanism of the two-level dynamic bridging process described in this invention in the semantic space. The coordinate axes in the diagram represent the high-dimensional semantic feature space after dimensionality reduction processing; the closer the points are in the space, the higher their semantic similarity.
[0118] Figure 5 The clusters of tightly packed red solid dots represent the strongly constrained normative clauses in the structured knowledge base of multi-center diagnosis and treatment guidelines, demonstrating the high degree of certainty and cohesion of rule-based knowledge in the semantic space; the green diamond-shaped dots scattered in the space represent the medical principle nodes in the general medical common sense base, forming an intermediate layer connecting specific cases and abstract rules; the blue hollow dots represent the initial reasoning steps generated by the large language model.
[0119] Figure 5 A connecting path composed of dashed and solid lines, specifically marked in the image, clearly demonstrates how the system establishes a semantic association by retrieving the nearest medical principle bridging point when a reasoning step to be verified is outside the canonical cluster due to a missing reference identifier, and further locks onto the target strongly constrained canonical through logical implication computation. This connectivity in geometric topology strongly proves that even if the model output does not explicitly contain a canonical ID, the system can still use white-box knowledge as an intermediary to verify the compliance of the reasoning logic at the semantic level, thereby avoiding false judgments due to pseudo-logical breaks caused by mechanical matching.
[0120] Step S430: After the search is completed, the system first determines whether a matching medical principle node has been successfully found. If the search result is empty or the highest similarity is lower than the basic threshold, it indicates that the reasoning step lacks basic medical common sense support, and the process will directly jump to the exception handling stage.
[0121] If the aforementioned medical principle node exists, the system will enter the most critical cross-library mapping stage. At this point, the system needs to establish a logical bridge from medical principles (white-box knowledge) to diagnostic and treatment guidelines (structured rules).
[0122] For example, the system calculates the logical implication probability between the medical principle node and each strongly constrained normative clause in the multi-center treatment guidelines structured knowledge base. This step is not a simple text similarity comparison, but a calculation of implication relationships based on logical reasoning. The system attempts to answer the question: Since the medical principle is valid, does it necessarily imply the applicability of a certain strongly constrained norm based on this principle?
[0123] To quantify this relationship, this embodiment introduces logical implication probability. The computational model is as follows. Let the feature vector of the retrieved medical principle node be... The first in the multicenter diagnosis and treatment guidelines structured knowledge base The feature vector of a strongly constrained normative clause is The system utilizes a pre-trained Natural Language Inference (NLI) module. To calculate the implication relationship between the two. Logical implication probability. The calculation formula is as follows:
[0124] ;
[0125] in, This represents the Sigmoid activation function, which maps output values to a probability range of 0 to 1. Quantity splicing operation; This represents the absolute difference operation between vector elements, used to capture the difference characteristics between two vectors; This is the projection weight matrix; This is the bias term. This formula can comprehensively evaluate the semantic inclusion and derivation relationship between medical principles and regulatory provisions.
[0126] like Figure 6This diagram illustrates the vector projection and activation threshold distribution in the logical implication probability calculation model, visually revealing the binary decision principle in the two-level dynamic bridging mechanism. The horizontal axis represents the semantic vector projection feature values obtained after calculating the projection weight matrix of the medical principle nodes and strong constraint normative clauses, while the vertical axis represents the logical implication probability output after nonlinear mapping using the Sigmoid function.
[0127] Figure 6 The blue S-shaped curve illustrates the nonlinear response characteristic of the probability value monotonically increasing with the feature value, while the red dashed line marks the system's preset extremely high confidence threshold, which corresponds to the 0.98 high standard described in the embodiment. The gray crosses below the threshold represent inference steps that, although subjected to common sense retrieval, have insufficient feature matching. Because their calculated logical implication probability failed to break through the critical point, the system judges them as falling into the logical break zone and executes error processing; while Figure 6 The green dots distributed within the green-filled area represent reasoning steps that successfully break through the threshold. This indicates that although these reasoning steps do not explicitly reference the specification, their inherent medical logic characteristics are strong enough to be recognized in the probability space as having a necessary implication relationship with the strongly constrained specification. This triggers the system to automatically generate a derived reference identifier and determine that the bridging is successful. This intuitively proves the mathematical interpretability and robustness of this model in high-precision compliance verification.
[0128] Step S440: After calculating the logical implication probability for each strong constraint specification, the system performs a strict threshold determination.
[0129] Optionally, the system has a preset confidence threshold of extremely high confidence level. For example, it can be set to 0.98. This is because the strong constraint specifications involve core medical safety, and it is essential to ensure that the accuracy of the bridging is virtually error-free.
[0130] If the logical implication probability corresponding to a strongly constrained regulatory clause exceeds a preset confidence threshold, that is, if a certain... Make If the system determines that the bridging is successful, then the system will determine that the bridging is successful. This means that although the large language model does not directly provide the specification ID, the medical principles on which its reasoning is based are logically highly isomorphic to the specification.
[0131] In this case, the system performs an identifier generation operation to generate a derived reference identifier pointing to the target strongly constrained specification clause. To distinguish it from the original explicit reference, this derived reference identifier will have a specific suffix or metadata tag indicating that it was automatically completed by the system through two-level derivation.
[0132] Subsequently, the system automatically injects the derived reference identifier into the strongly constrained inference step. This injection process is seamless; the system inserts the ID at the appropriate position in the inference text, making it formally conform to the requirements of logical loop closure verification.
[0133] After injection is complete, the system updates the status of the inference step and determines that the logical loop closure verification has passed. Through this process, compliant but incomplete inference steps are preserved, avoiding the illusionary risk that may arise from repeated forced rewriting of the model, i.e., fabricating incorrect IDs to meet format requirements.
[0134] Step S450: Conversely, if the system fails to establish a valid bridge after executing the above process, that is, if the medical principle node does not exist or the logical implied probability does not exceed the confidence threshold.
[0135] For example, this may correspond to two situations: one is that the reasoning steps themselves violate common medical sense, that is, the principle node cannot be found; the other is that although the reasoning steps conform to common sense, they do not conform to the specific administrative regulations in the current scenario. For example, some treatments are medically feasible, but are prohibited by hospital management regulations, which makes it impossible to establish a high probability implication with the regulatory clauses.
[0136] If any of the above situations occur, the system will terminate the suspended state and ultimately confirm that the strongly constrained reasoning step is a logical break. At this time, the step will be marked as an erroneous module and handed over to the subsequent composite knowledge base recall and correction module for reconstruction.
[0137] In summary, this embodiment constructs a highly robust logical closed-loop verification mechanism by introducing a two-level dynamic bridging process that includes semantic vector extraction, white-box knowledge retrieval, and logical implication computation. This mechanism not only maintains the seriousness of diagnostic and treatment guidelines but also fully utilizes the inherent knowledge capabilities of large language models, significantly improving the success rate of medical record generation and clinical fit.
[0138] Example 3:
[0139] This embodiment, building upon Embodiments 1 and 2, further focuses on the feasibility of executing medical procedures in a real physical environment. In a multi-center, tiered healthcare system, the available resources vary significantly across different levels of medical institutions. A top-tier national trauma center might be equipped with extracorporeal membrane oxygenation (ECMO) equipment, aortic resuscitation balloon occlusion equipment, and 24 / 7 teams of senior specialists in various subspecialties, while grassroots county hospitals or community emergency centers often only possess basic life support facilities. If the medical record creation system merely mechanically follows high-priority national guidelines, it is highly likely to generate unrealistic medical records that are detached from the actual capabilities of current hospitals. This not only fails to guide clinical work but may also lead to medical disputes due to the recording of unenforceable treatment plans. Therefore, this embodiment details a rule feasibility verification process based on local resource constraints and its supporting technical implementation mechanism.
[0140] The method described in this embodiment is integrated before the inference logic refactoring module and runs as a mandatory pre-filter, including the following:
[0141] Step S510: The primary task of the system is to establish the physical boundaries and capability limits of the current diagnostic and treatment activities.
[0142] For example, in response to the initiation of the correction process, the system first obtains the hospital identity identifier bound to the current treatment scenario. This identifier is not merely a unique numerical code; it is associated with the medical institution's dynamic capability profile in the cloud database. The system uses this identifier as an index key to retrieve the hospital resource capability knowledge graph associated with the hospital identity identifier from the multi-center treatment guidelines structured knowledge base.
[0143] Optionally, the hospital resource capability knowledge graph is a high-dimensional dynamic data structure, which can be logically represented as a graph structure containing a set of entities and a set of relations. Among them, entity set This dataset encompasses all medical elements of the hospital, broken down into three subsets: hardware facilities, drug inventory, and human resource qualifications. The hardware facilities subset includes the operational status of specific equipment such as CT scanners, MRI machines, DSA operating rooms, and ventilator models. The drug inventory subset is connected to the hospital's HIS (Hospital Information System) in real-time, recording the inventory levels of critical emergency medications such as norepinephrine, clotting factors, and red blood cell suspension. The human resource qualifications subset records the surgical authorization level and specific technical certifications of the currently on-duty physicians. By loading this dataset, the system achieves a comprehensive understanding of the current medical environment.
[0144] Step S520: While sensing the environment, the system needs to accurately understand what resources are required to support the high-priority correction rules to be executed.
[0145] For example, the system extracts entities from the ranking-first correction rule. This process relies on a named entity recognition model specific to the medical vertical. Suppose the ranking-first rule is: "According to the Guidelines for the Treatment of Severe Pelvic Fractures, REBOA should be performed immediately in the emergency room to control bleeding." The system uses a natural language processing algorithm to parse out the key medical resource entities required for the execution of this correction rule.
[0146] Optionally, to ensure the accuracy and completeness of the extraction, the system defines a resource requirement parsing function. For the input rule text This function outputs a set of resource demand vectors. .
[0147] ;
[0148] In the example above, the set This may include three key entities: REBOA catheter consumables, angiography machines, and physicians qualified for vascular intervention. The system will standardize and map these entities, converting them into standard terms consistent with the ontology level in the hospital resource capability knowledge graph, such as mapping angiography machines to DSA devices.
[0149] Step S530: After the resource requirements are quantified, the system enters the core collision test phase.
[0150] For example, the system performs a matching test between the key medical resource entities and the hospital resource capability knowledge graph. This test is not a simple string matching process, but rather a verification of inclusion relationships based on ontology reasoning. The system aims to determine whether the current hospital has the conditions to execute the corrective rules.
[0151] Optionally, the system defines a feasibility determination function. Used to calculate the set of rule requirements Compared to hospital capability maps The degree of satisfaction. This judgment logic can be expressed as: if every key entity in the demand set... If a matching is successful, and a corresponding available node can be found in the hospital's capability graph, and that node is in an available state, then the match is considered successful. The formula can be expressed as:
[0152] ;
[0153] in, This is an attribute matching operation that verifies not only the existence of the device but also its suitability. For example, if the map shows that the hospital has a DSA device but its status is marked as faulty and under repair, the match will still fail. Or, if the rule requires Level 3 surgical qualifications, but the currently on-duty doctor only has Level 2 surgical qualifications, the match will also fail. This fine-grained detection ensures the rigor of feasibility verification.
[0154] like Figure 7 A heatmap showing the matching matrix between the resource requirements of the correction rules and the hospital's resource capabilities is presented. This graph visually reflects the logical operation process in the resource feasibility verification step described in this invention. The vertical axis represents the three candidate correction rules recalled by the system from high to low priority, and the horizontal axis represents the key medical resource entities necessary to execute these rules.
[0155] Figure 7 The colors of the blocks in the matrix correspond to the result status of resource matching detection. Red blocks represent that the current hospital resource capability map is missing this key resource, green blocks represent that the hospital has this capability, and gray blocks represent that the rule does not involve this resource.
[0156] from Figure 7 As seen in the first row of data, although the high-priority rule corresponding to the national guidelines is placed first, it is displayed as a red missing item in the REBOA catheter consumables column. This indicates that the system detected a hard resource conflict, triggering a resource conflict masking signal, causing the rule in this row to be judged as unexecutable and masked. In contrast, the hospital's packing and transport protocol shown in the third row, although with a lower priority, has all its required resource columns in a green matching state or a gray irrelevant state, with no red conflict points. Therefore, the system ultimately judged this rule as feasible and adopted it. This figure vividly demonstrates that the system can automatically filter out unrealistic high-standard rules through a matrix-based collision detection mechanism, ensuring that the generated treatment recommendations have a high probability of being implemented at the physical level.
[0157] Step S540: When high-standard idealized rules encounter real-world resource constraints, the system must make intelligent decisions to avoid logical deadlock.
[0158] For example, if the matching detection result is "not met," meaning the above function returns 0, the system determines that the current rule is physically unenforceable. In this case, the system triggers an exception handling mechanism, generating a resource conflict mask signal. This signal carries the specific reason for the conflict, such as a missing REBOA catheter or a lack of interventional physicians.
[0159] Optionally, in response to the signal, the system performs a masking operation on the first-ranked correction rule. Masking means temporarily setting the weight of that rule node to negative infinity or marking it as unreachable in the current decision tree. Subsequently, the system activates the next-ranked rule in the priority ranking as a new candidate correction rule.
[0160] For example, in the case of the pelvic fracture mentioned above, when the national guidelines for performing REBOA are blocked, the system may activate provincial or hospital-level guidelines with slightly lower priority, such as immediate pelvic tamponade or anti-shock treatment and immediate transfer to a higher-level trauma center.
[0161] The system repeatedly performs the matching detection until a feasible rule is found. This is a recursive or cyclical process; the system searches down the priority chain level by level until it finds a rule whose required resource set is completely covered by the current hospital's capability map. This mechanism ensures that the system's final output treatment recommendations are practical and actionable.
[0162] Step S550: Although the system has chosen a suboptimal solution to adapt to the real situation, the rationality and legality of this downgrade behavior must be clearly explained in the logical closed loop of medical documents in order to protect the occupational safety of doctors.
[0163] For example, when reconstructing the reasoning logic using the finally determined feasible rules, the system doesn't simply silently replace the text; it simultaneously generates a compliance deviation statement. This statement is key evidence for the system's self-defense.
[0164] The compliance deviation statement includes the identifiers of the high-priority rules that were blocked and the specific reasons for the resource shortage. The system uses template generation technology or a natural language generation model to construct this statement text. The structure of the statement typically follows the logical paradigm of "should have been done but not done" + "reason" + "alternative solution".
[0165] Let the high-priority rule that is blocked be identified as The missing resource entity is The final rule adopted is: The generated deviation declaration text It can be represented as:
[0166] ;
[0167] The generated text may be: Although the patient meets the criteria of the "Guidelines for the Treatment of Severe Pelvic Fractures" (i.e., Regarding the indications for REBOA, however, our hospital currently lacks REBOA catheter consumables (i.e., Therefore, in accordance with the "Hospital Emergency Transfer System" (i.e. After applying pressure and securing the bandage, the transfer process is initiated.
[0168] For example, the system embeds the compliance deviation statement into the reasoning process data stream. This embedding typically occurs at the end of the treatment plan or treatment opinion module, or exists as a separate medical decision explanation paragraph. In this way, the generated medical record not only records what was done, but also fully records why a better choice was not made, thus forming a perfect logical loop from a legal perspective.
[0169] In summary, this embodiment creatively resolves the contradiction between rigid standards and heterogeneous resources faced by medical artificial intelligence in practical applications. It enables the medical record construction system based on self-iterative reasoning to function not only as a conveyor of medical knowledge but also as an intelligent decision-making assistant with environmental adaptability and medical risk control capabilities, greatly enhancing the system's applicability and viability in primary healthcare institutions and resource-scarce scenarios.
[0170] Example 4:
[0171] Corresponding to the above method embodiments, this embodiment details a trauma ward medical record construction system based on self-iterative reasoning. This system is typically deployed on a hospital's high-performance server or an authorized medical cloud platform, and its functions are implemented through electronic devices.
[0172] like Figure 8 As shown, the system mainly consists of four core units: a standard management module, a prompt word generation module, an inference iteration module, and a medical record generation module. These modules interact with each other via an internal bus or API interface, forming a closed-loop intelligent processing system.
[0173] For example, the standards management module is the knowledge foundation of the entire system, mainly used to build and maintain a structured knowledge base of multi-center diagnosis and treatment standards. During the system initialization or update phase, the standards management module is responsible for collecting clinical guidelines and departmental personalized operating procedures at different levels, and splitting and storing them in a structured manner according to three dimensions: constraint strength, applicable scenarios, and reasoning modules.
[0174] This module outputs a set of diagnostic and treatment guidelines, including both strongly constrained and weakly constrained guidelines, based on the scenario identifier. To ensure the accuracy of the output guidelines, the module incorporates a conflict arbitration mechanism, strictly adhering to the priority order that national guidelines take precedence over provincial guidelines, hospital-level guidelines, and departmental personalized details. Strongly constrained guidelines are defined as mandatory requirements containing pre-defined diagnostic indicators for traumatic shock, while weakly constrained guidelines are defined as non-mandatory requirements incorporating departmental personalized writing habits.
[0175] For example, the prompt word generation module is used to generate hierarchical constraint prompt words based on the set of diagnostic and treatment guidelines. The prompt word architecture constructed by this module includes four layers: a basic layer, a constraint layer, an adaptation layer, and a feedback reservation layer.
[0176] In the constraint layer, this module embeds strong constraint specifications into the instructions of the diagnostic basis inference unit and weak constraint specifications into the instructions of the present medical history detail supplementation unit. In the adaptation layer, this module embeds multi-center specification adaptation tags that match the current diagnosis and treatment scenario identifier. In the feedback reservation layer, this module sets hidden attribute identifiers, which serve as implicit metadata of the data stream and are used to locate the corresponding inference module in subsequent iterations or doctor feedback. Finally, this module sends the synthesized hierarchical constraint prompts along with the acquired doctor-patient dialogue text to the downstream modules.
[0177] For example, the inference iteration module is the core computing unit of this system, which is used to input the hierarchical constraint prompts and doctor-patient dialogue text into the large language model to generate the inference process data stream and execute the self-iterative optimization process.
[0178] First, this module invokes a verification network to perform medical logic semantic consistency checks on the reasoning process. The verification network performs causal relationship checks, normative consistency checks, terminology standardization checks, and logical closure checks on the reasoning submodule. During multi-dimensional evaluation, this module calculates indicators of medical logic controllability in real time, such as clinical guideline fit and key terminology accuracy.
[0179] To address the potential for pseudo-logic breaks during logic loop verification, this module integrates a two-level dynamic bridging subunit. When a reasoning step involving strongly constrained specifications is found to lack a valid reference specification identifier, this subunit extracts a semantic feature vector and searches for medical principle nodes in a general medical knowledge base. If a matching node exists, the logical implication probability is calculated using a formula:
[0180] If the calculation result exceeds the preset confidence threshold, the module will automatically generate a derived reference identifier and inject it into the data stream, thus determining that the verification has passed.
[0181] If the verification fails, the module invokes the composite knowledge base to recall and correct the abnormal module and update the data stream. During this correction process, the module further integrates a resource feasibility verification subunit. This subunit obtains the hospital identity identifier bound to the current treatment scenario and retrieves the hospital resource capability knowledge graph associated with the hospital identity identifier from the standardization management module. The subunit extracts entities from the top-ranked correction rule, uses a resource requirement parsing function to parse out the set of key medical resource entities, and uses a feasibility judgment function to determine whether the current hospital has the conditions for execution. If the judgment result is "not met," the subunit generates a resource conflict mask signal to block the current rule and activates the next priority rule. Simultaneously, it generates a compliance deviation statement containing the identifier of the blocked high-priority rule and the reason for the resource shortage, embedding it into the inference process data stream.
[0182] For example, the medical record generation module is the system's output interface, used to generate and output the target structured medical record in response to a signal indicating that the data stream in the inference process has passed verification. Once the inference iteration module confirms that the final data stream is logically consistent, complete in terms of normative references, and feasible on local resources, it sends a pass signal to the medical record generation module. This module then assembles the modular inference data into a structured file conforming to the electronic medical record exchange standard document architecture and presents it to clinicians or pushes it to the hospital information system.
[0183] In addition, the system also includes a doctor feedback processing unit. This unit is responsible for collecting doctor feedback information, classifying it using natural language processing algorithms, and associating it with the corresponding modules. After confirmation, it triggers incremental supervised training of the large language model, thereby enabling the continuous evolution of the system.
[0184] In summary, the trauma department medical record construction system based on self-iterative reasoning disclosed in this embodiment, through the close collaboration of various modules, deeply integrates advanced technologies such as hierarchical constraints, self-iterative verification, two-level dynamic bridging, and resource feasibility verification, effectively overcoming the limitations of traditional medical record generation systems and providing trauma departments with an efficient, compliant, and clinically relevant intelligent solution.
[0185] Example 5:
[0186] Corresponding to the above embodiments, the present invention also proposes an electronic device.
[0187] like Figure 9The diagram shows a structural schematic of an electronic device according to the present invention. The electronic device 100 includes a processor 101 and a memory 103. The processor 101 and the memory 103 are connected, for example, via a bus 102. Optionally, the electronic device 100 may further include a transceiver 104. It should be noted that in practical applications, the transceiver 104 is not limited to one unit, and the structure of this electronic device 100 does not constitute a limitation on the embodiments of the present invention.
[0188] Processor 101 may be a CPU, a general-purpose processor, a DSP, an ASIC, an FPGA, or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It may implement or execute the various exemplary logic blocks, modules, and circuits described in connection with this disclosure. Processor 101 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0189] Bus 102 may include a pathway for transmitting information between the aforementioned components. Bus 102 may be a PCI bus or an EISA bus, etc. Bus 102 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 9 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0190] The memory 103 stores a computer program corresponding to the trauma ward medical record construction method based on self-iterative reasoning in the above embodiments of the present invention. This computer program is controlled and executed by the processor 101. The processor 101 executes the computer program stored in the memory 103 to implement the content shown in the aforementioned method embodiments.
[0191] Among them, electronic devices 100 include, but are not limited to: mobile terminals such as laptops and PADs (tablet computers) and fixed terminals such as desktop computers. Figure 9 The electronic device 100 shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of the present invention.
[0192] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A method for constructing trauma department medical records based on self-iterative reasoning, characterized in that, Includes the following steps: In response to the medical record generation request from the trauma department, obtain the doctor-patient dialogue text and the current diagnosis and treatment scenario identifier; The pre-built multi-center structured knowledge base of diagnosis and treatment guidelines is invoked, and the corresponding set of diagnosis and treatment guidelines is determined according to the current diagnosis and treatment scenario identifier. The set of diagnosis and treatment guidelines includes strongly constrained guidelines and weakly constrained guidelines. Based on the set of diagnostic and treatment guidelines, hierarchical constraint prompts are generated, and the hierarchical constraint prompts and the doctor-patient dialogue text are input into a large language model to generate a modular initial inference process data stream; Initiate an iterative optimization process for the initial inference process data stream: use a preset verification network to perform medical logic semantic consistency verification on the initial inference process data stream; If the verification fails, the abnormal reasoning module is located based on the verification result, and the composite knowledge base is invoked to correct the abnormal reasoning module. The specific correction process is as follows: Based on the verification results, a target abnormal reasoning module is identified as having a medical logic error or failing to adapt to the standard. Based on the feature vector of the target anomaly reasoning module, multi-dimensional recall is performed in the composite knowledge base, which integrates the general medical common sense base, the multi-center diagnosis and treatment standard structured knowledge base, and the doctor feedback rule base. The recall and revision rules are sorted according to a preset priority order, with the following priority: national guidelines with strong constraints, doctor feedback confirmation rules, hospital-level standards, general medical common sense rules, and weakly constrained standards. Before reconstructing the reasoning logic of the target anomaly reasoning module, a rule feasibility verification step based on local resource constraints is performed: Obtain the hospital identity identifier bound to the current diagnosis and treatment scenario, and call the hospital resource capability knowledge graph associated with the hospital identity identifier from the multi-center diagnosis and treatment standard structured knowledge base; Entity extraction is performed on the first sorting rule to extract the key medical resource entities required for the execution of the rule. The key medical resource entities are matched and detected with the hospital resource capability knowledge graph to determine whether the current hospital has the conditions to execute the correction rule; If the matching detection result is not met, a resource conflict mask signal is generated, the first-ranked correction rule is masked, and the next-ranked rule in the priority ranking is activated as a new candidate correction rule. The matching detection is repeated until a feasible rule is found. The reasoning logic of the target anomaly reasoning module is reconstructed using the finally determined feasible rules, and a compliance deviation statement is generated synchronously to be embedded into the reasoning process data stream, thereby generating an updated reasoning process data stream. The compliance deviation statement includes the masked high-priority rule identifier and the specific reason for the resource shortage. Repeat the above verification and correction process until the verification passes or the preset number of iterations is reached; In response to a successful verification signal, the target structured medical record is generated and output based on the final inference process data stream.
2. The method according to claim 1, characterized in that, The process of constructing the structured knowledge base of the multicenter diagnosis and treatment guidelines includes: Collect clinical guidelines and departmental personalized operating procedures at different levels, and break them down and store them in a structured manner according to three dimensions: constraint intensity, applicable scenarios, and reasoning modules; Specifically, regarding the constraint strength dimension, the strong constraint specification is defined as a mandatory requirement that includes preset diagnostic indicators for traumatic shock, while the weak constraint specification is defined as a non-mandatory requirement that includes departmental personalized writing habits. Establish a standard conflict arbitration mechanism. When standards from different sources conflict in the same scenario, the effective standard will be determined according to a preset priority order, which is as follows: national guidelines, provincial standards, hospital-level standards, and department-specific detailed rules.
3. The method according to claim 1, characterized in that, The generation of hierarchical constraint prompts based on the set of diagnostic and treatment guidelines includes: Construct a prompt word architecture that includes a base layer, constraint layer, adaptation layer, and feedback reservation layer; In the constraint layer, the strong constraint specification is embedded in the diagnostic basis reasoning unit, and the weak constraint specification is embedded in the present medical history detail supplementation unit. In the adaptation layer, a multi-center specification adaptation tag matching the current diagnosis and treatment scenario identifier is embedded; In the feedback reservation layer, a hidden attribute identifier is set to locate the corresponding inference module in subsequent iterations or doctor feedback.
4. The method according to claim 1, characterized in that, The step of performing medical logic semantic consistency verification on the initial inference process data stream using a preset verification network includes: The initial inference process data stream is divided into multiple inference sub-modules, including present medical history, past medical history, physical examination, and diagnostic basis. A verification network is constructed based on general medical logic and the structured knowledge base of the multi-center diagnosis and treatment guidelines. The aforementioned verification network is used to sequentially perform causal relationship verification, standard consistency verification, terminology standardization verification, and logical loop verification on each inference submodule. The logic loop verification includes: detecting whether the reasoning steps involving strongly constrained specifications contain valid reference specification identifiers; if the reference specification identifiers are missing, it is determined as a logic break.
5. The method according to claim 1, characterized in that, The process of initiating an iterative optimization of the initial inference process data stream also includes a multi-dimensional evaluation step: A multi-dimensional evaluation system is constructed based on the controllability of medical logic, the flexibility of scenario adaptation, and the conformity with clinical practice. Calculate the score of the current inference process data stream under the multi-dimensional evaluation system; If the score does not enter the preset balance range, the parameter weights of the strong constraint module and the weak constraint module in the hierarchical constraint prompt will be dynamically adjusted, and the next round of reasoning process will be triggered. The calculation indicators for the controllability of medical logic include clinical guideline fit and key terminology accuracy. The calculation metrics for scenario adaptation flexibility include the completeness of reasoning for new scenarios; The calculation indicators for clinical practice compliance include the doctor's labeling error rate.
6. The method according to claim 1, characterized in that, The method also includes a closed-loop optimization step based on doctor feedback: The system receives feedback information for the target structured medical record through a feedback interface. The feedback information includes error type selection instructions or rule suggestion text. The feedback information is classified using natural language processing algorithms and associated with the corresponding reasoning module, composite knowledge base, or prompt word architecture; Once the feedback information is confirmed by a preset number of doctors in the same department, incremental training of the large language model is triggered. The incremental training adopts a supervised training method, and the training dataset is formed by splicing together doctor-patient dialogue text, the corrected modular reasoning process, multi-center standardized labels, and doctor feedback annotations.
7. The method according to claim 1, characterized in that, The self-iterative optimization process also includes steps for filtering and handling error cases: In the self-iterative optimization process, erroneous reasoning process data flows that ultimately fail medical logic verification, fail to adapt to specifications, or lack key information are identified. The data stream of the erroneous reasoning process is structured and annotated to generate erroneous case data; The error case data is stored in the error case database, and the verification parameters of the verification network are updated based on the error case data.
8. The method according to claim 4, characterized in that, The logical closed-loop verification also includes a two-level dynamic bridging process for strongly constrained reasoning steps that lack reference specification identifiers: In response to the detection that the strong constraint reasoning step is missing a valid reference specification identifier, the semantic feature vector of the strong constraint reasoning step is extracted, and the determination of logical break is paused. Based on the semantic feature vector, a search is performed in a preset general medical knowledge base to determine whether there are medical principle nodes that can explain the strongly constrained reasoning steps. If the medical principle node exists, calculate the logical implication probability between the medical principle node and each strongly constrained normative clause in the multi-center diagnosis and treatment standard structured knowledge base; If the logical implication probability corresponding to the target strong constraint specification clause exceeds the preset confidence threshold, a derived reference identifier pointing to the target strong constraint specification clause is generated, and the derived reference identifier is automatically injected into the strong constraint reasoning step, and the logical loop verification is determined to be passed. If the medical principle node does not exist or the logical implication probability does not exceed the confidence threshold, then the strongly constrained reasoning step is confirmed as a logical break.
9. A trauma department medical record construction system based on self-iterative reasoning, characterized in that, include: The standardization management module is used to build and maintain a structured knowledge base of multi-center diagnosis and treatment standards, and outputs a set of diagnosis and treatment standards containing strongly constrained standards and weakly constrained standards based on scenario identifiers; The prompt word generation module is used to generate hierarchical constraint prompt words based on the set of diagnostic and treatment guidelines. The prompt words include a basic layer, a constraint layer, an adaptation layer, and a feedback reservation layer. The inference iteration module is used to input the hierarchical constraint prompts and doctor-patient dialogue text into the large language model to generate an initial version of the inference process data stream, and to execute a self-iterative optimization process: using a preset verification network to perform medical logic semantic consistency verification on the initial version of the inference process data stream; If the verification fails, the abnormal reasoning module is located based on the verification result, and the composite knowledge base is invoked to correct the abnormal reasoning module. The specific correction process is as follows: Based on the verification results, a target abnormal reasoning module is identified as having a medical logic error or failing to adapt to the standard. Based on the feature vector of the target anomaly reasoning module, multi-dimensional recall is performed in the composite knowledge base, which integrates the general medical common sense base, the multi-center diagnosis and treatment standard structured knowledge base, and the doctor feedback rule base. The recall and revision rules are sorted according to a preset priority order, with the following priority: national guidelines with strong constraints, doctor feedback confirmation rules, hospital-level standards, general medical common sense rules, and weakly constrained standards. Before reconstructing the reasoning logic of the target anomaly reasoning module, a rule feasibility verification step based on local resource constraints is performed: Obtain the hospital identity identifier bound to the current diagnosis and treatment scenario, and call the hospital resource capability knowledge graph associated with the hospital identity identifier from the multi-center diagnosis and treatment standard structured knowledge base; Entity extraction is performed on the first sorting rule to extract the key medical resource entities required for the execution of the rule. The key medical resource entities are matched and detected with the hospital resource capability knowledge graph to determine whether the current hospital has the conditions to execute the correction rule; If the matching detection result is not met, a resource conflict mask signal is generated, the first-ranked correction rule is masked, and the next-ranked rule in the priority ranking is activated as a new candidate correction rule. The matching detection is repeated until a feasible rule is found. The reasoning logic of the target anomaly reasoning module is reconstructed using the finally determined feasible rules, and a compliance deviation statement is generated synchronously to be embedded into the reasoning process data stream, thereby generating an updated reasoning process data stream. The compliance deviation statement includes the masked high-priority rule identifier and the specific reason for the resource shortage. Repeat the above verification and correction process until the verification passes or the preset number of iterations is reached; The medical record generation module is used to generate and output the target structured medical record based on the final inference process data stream in response to the verification pass signal.