Executable clinical pathway generation method, device, electronic equipment and storage medium
By processing the original medical text with an open-source base model that has undergone content expansion and fine-tuning, combined with front-end verification and GoRules rule transformation, the accuracy and stability issues of large models in the medical field have been resolved, enabling the rapid generation of structured clinical pathways.
Patent Information
- Application Number
- CN202511509849.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-22
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2045-10-22
AI Technical Summary
Existing technologies cannot guarantee the accuracy and stability of large models output in the medical field, and the fine-tuning cycle of large models in the medical field is long, making it difficult to apply them across disciplines or fields.
By acquiring the original medical text, expanding the content using a large model, generating a semi-structured template using a finely tuned open-source base model, and then converting it into a structured clinical pathway through front-end visual verification and GoRules rules, the accuracy and stability of the generated clinical pathway are ensured by combining preset rules and layer-by-layer verification.
It improves the accuracy and stability of medical execution statements, reduces the fine-tuning cycle of large models in the medical field, and enhances the adaptability of cross-domain applications.
Smart Images

Figure CN120995987B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical assistance and data processing technology, and in particular to an executable clinical pathway generation method, apparatus, electronic device, and storage medium. Background Technology
[0002] As a powerful large-scale modeling tool, LLM can handle various unstructured data formats, including free text notes, scanned text (via OCR), and PDFs, and understand abbreviations, spelling errors, and nested clinical reasoning. It can identify and extract entities such as diagnoses, drugs, laboratory results, dosages, and vital signs, and establish relationships between entities, leading to its increasing use in rule generation. However, medical text presents unique challenges due to its "technical jargon and jargon," "ambiguity and uncertainty," and "negation." While LLM possesses advanced NLP capabilities and can be fine-tuned for domain-specific vocabulary, its probabilistic nature means it cannot always "understand" as perfectly as humans. This makes LLM more susceptible to problems such as being "tripped up by non-clinical information" or struggling with "semantic uncertainty" in negative sentences. Therefore, while powerful, LLM is not foolproof. For high-risk applications such as medical rule generation, LLM-based methods alone are risky and require complementary strategies, such as human-machine collaborative validation and robust post-processing, to ensure the accuracy and reliability of the output.
[0003] Currently, existing technical solutions do not directly generate structured language from medical descriptions based on large models. Instead, they convert natural language into executable query statements. For example: obtaining a first natural language (NL) statement input by the user; filtering a set of candidate SQL statements from multiple historical structured query language (SQL) statements based on the first NL statement, the set of candidate SQL statements including at least one candidate historical SQL statement matching the first NL statement, the candidate historical SQL statement containing some or all of the keywords from the first NL statement; generating a first SQL statement to express the first NL statement based on at least one candidate historical SQL statement included in the candidate SQL statement set; and displaying the first SQL statement to the user.
[0004] However, existing methods for generating executable statements, which require manual compilation of executable clinical pathways, are easily limited by the individual's disciplinary background and current learning or research field, making it difficult to cross disciplines or domains. Furthermore, due to the high level of specialization required in the medical field, large models are unlikely to perform well within the domain without extensive fine-tuning using high-quality domain data. Moreover, improving the performance of large models through existing fine-tuning schemes for specific domains demands a high quantity and quality of data; achieving good and stable performance for the base model in the medical field within a short period requires a relatively long timeframe.
[0005] In summary, existing methods for generating execution statements are limited by the probabilistic capabilities of large models, making it difficult to guarantee the accuracy and stability of the output of large models in the medical field. Furthermore, they have high quality requirements for the fine-tuning sample data, resulting in a long time period required for fine-tuning large models. Summary of the Invention
[0006] Therefore, it is necessary to provide an executable clinical pathway generation method, device, electronic device, and storage medium that can ensure the accuracy and stability of medical execution statement generation and reduce the fine-tuning cycle of large models, in order to address the above-mentioned technical problems.
[0007] This invention provides an executable clinical pathway generation method, the method comprising:
[0008] Obtain the original medical text and call the large model to expand the content of the original medical text to obtain expanded medical text that meets the preset expansion rules;
[0009] The extended medical text is input into the finely tuned open-source base model, so that the finely tuned open-source base model can generate a semi-structured template based on the extended medical text;
[0010] The semi-structured template is sent to the front end for visual display to verify whether the semi-structured template meets the preset structural rules;
[0011] When the semi-structured template meets the preset structural rules, the semi-structured template is converted into GoRules rules, and a structured clinical pathway to be executed is generated according to the GoRules rules.
[0012] In one embodiment, the step of obtaining the original medical text and calling a large model to expand the content of the original medical text to obtain expanded medical text that meets preset expansion rules includes:
[0013] The original medical text is input into the large model, and the prompt words of the large model are invoked to expand the content of the original medical text, so as to obtain the initial expanded medical text.
[0014] The initial extended medical text is verified according to the preset extension rules to determine whether the initial extended medical text meets the preset extension rules, and the extended medical text that meets the preset extension rules is determined based on the judgment result.
[0015] In one embodiment, the step of inputting the extended medical text into a fine-tuned open-source base model to invoke the fine-tuned open-source base model to generate a semi-structured template based on the extended medical text includes:
[0016] Acquire medical rule breakdown data from a large model and user input, and perform standardization and data augmentation on the medical rule breakdown data to construct a medical professional thesaurus;
[0017] The prompt word embedding vector of the open-source base model is optimized based on the medical professional vocabulary to adjust the model parameters of the open-source base model and obtain a fine-tuned open-source base model.
[0018] In one embodiment, the step of inputting the extended medical text into a fine-tuned open-source base model to invoke the fine-tuned open-source base model to generate a semi-structured template based on the extended medical text includes:
[0019] Using the extended medical text as input to the fine-tuned open-source base model, the fine-tuned open-source base model is called to transform the extended medical text into an extended text vector;
[0020] Based on the extended text vector, multiple candidate templates with a similarity ranking of not less than a first threshold are generated through vector matching.
[0021] In one embodiment, the step of inputting the extended medical text into a fine-tuned open-source base model to invoke the fine-tuned open-source base model to generate a semi-structured template based on the extended medical text further includes:
[0022] The multiple candidate templates are sorted a second time by a branch office weighted scoring strategy to obtain a candidate template list sorted by weighted total score.
[0023] Select candidate templates from the candidate template list whose weighted total score ranking is not lower than the second threshold, and output the semi-structured template.
[0024] In one embodiment, sending the semi-structured template to the front end for visualization to verify whether the semi-structured template meets preset structural rules includes:
[0025] The semi-structured template is sent to the front end, and the semi-structured template is visualized through rendering;
[0026] The semi-structured templates displayed in the visualization are verified according to the preset structural rules to determine the semi-structured templates that meet the preset structural rules, and the semi-structured templates that do not meet the preset structural rules are corrected.
[0027] In one embodiment, when the semi-structured template satisfies a preset structural rule, converting the semi-structured template into GoRules rules and generating a structured clinical pathway to be executed based on the GoRules rules includes:
[0028] The semi-structured templates that satisfy the preset structural rules are traversed, and the semi-structured templates are parsed to transform them into the GoRules rules.
[0029] The semi-structured template is verified row by row using a decision table. When all columns of the semi-structured template satisfy the corresponding set rules in the decision table, a structured clinical pathway to be executed is generated according to the GoRules rules.
[0030] The present invention also provides an executable clinical pathway generation apparatus for implementing the executable clinical pathway generation method described in any of the preceding claims, the apparatus comprising:
[0031] The content expansion module is used to obtain the original medical text and call the large model to expand the content of the original medical text in order to obtain expanded medical text that meets the preset expansion rules.
[0032] A semi-structured template generation module is used to input the extended medical text into a fine-tuned open-source base model, so as to call the fine-tuned open-source base model to generate a semi-structured template based on the extended medical text;
[0033] The template structure verification module is used to send the semi-structured template to the front end for visual display in order to verify whether the semi-structured template meets the preset structure rules.
[0034] The clinical pathway generation module is used to convert the semi-structured template into GoRules rules when the semi-structured template meets the preset structural rules, and generate a structured clinical pathway to be executed according to the GoRules rules.
[0035] The present invention also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the executable clinical pathway generation method as described above.
[0036] The present invention also provides a computer storage medium storing a computer program, which, when executed by a processor, implements the executable clinical pathway generation method as described above.
[0037] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the executable clinical pathway generation method as described above.
[0038] The aforementioned executable clinical pathway generation method, device, electronic device, and storage medium acquire original medical text and expand its content using a large model to obtain expanded medical text that meets preset expansion rules. The expanded medical text is then input into a fine-tuned open-source base model, which generates a semi-structured template based on the expanded medical text. The semi-structured template is then sent to a front-end for visualization to verify whether it meets preset structural rules. Finally, when the semi-structured template meets the preset structural rules, it is converted into GoRules rules, and an executable structured clinical pathway is generated based on these rules. This invention utilizes large model prompts and preset rules to perform layer-by-layer verification and structuring of free medical text, ultimately converting free medical text into executable structured clinical pathway rules. This not only ensures the accuracy and stability of generated medical execution statements but also reduces the fine-tuning cycle of the large model to a certain extent, allowing the large model to continuously improve the quality of fine-tuned data samples based on preset rules during the generation of structured clinical pathways. Attached Figure Description
[0039] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0040] Figure 1 This is one of the flowcharts illustrating the executable clinical pathway generation method provided by the present invention;
[0041] Figure 2 This is a schematic diagram of the executable structured rule generation process of the executable clinical pathway generation method in a specific embodiment of the present invention;
[0042] Figure 3 This is the second flowchart illustrating the executable clinical pathway generation method provided by the present invention.
[0043] Figure 4 The third flowchart illustrating the executable clinical pathway generation method provided by this invention;
[0044] Figure 5 The fourth flowchart illustrates the executable clinical pathway generation method provided by this invention.
[0045] Figure 6 The fifth flowchart illustrates the executable clinical pathway generation method provided by this invention.
[0046] Figure 7 The sixth flowchart illustrating the executable clinical pathway generation method provided by this invention;
[0047] Figure 8 The seventh flowchart illustrating the executable clinical pathway generation method provided by this invention;
[0048] Figure 9 A schematic diagram of the executable clinical pathway generation device provided by the present invention;
[0049] Figure 10 This is a diagram of the internal structure of the electronic device provided by the present invention. Detailed Implementation
[0050] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0051] The following is combined Figures 1 to 10 The present invention describes an executable clinical pathway generation method, apparatus, electronic device, and storage medium.
[0052] like Figure 1 As shown, in one embodiment, an executable clinical pathway generation method includes the following steps:
[0053] Step S110: Obtain the original medical text and call the large model to expand the content of the original medical text to obtain expanded medical text that meets the preset expansion rules.
[0054] Specifically, the server obtains the freely written original medical text, calls the prompt words in the large model to expand the content of the original medical text, and after verification, outputs the expanded medical text that meets the preset expansion rules.
[0055] Combination Figure 2 As shown in the specific embodiment, the executable clinical pathway generation method provided by the present invention includes steps 1 to 4:
[0056] Step 1: Use a large model to expand the medical free text content and have it confirmed by the user.
[0057] Specifically, the freely written original medical text is input into a large model. The model then expands the original medical text using prompts to obtain corresponding expanded text content. Furthermore, to ensure the accuracy and comprehensiveness of the subsequent semi-structured template generation, the generated expanded text content needs to be manually verified to avoid probabilistic illusions or misunderstandings in the large model's output.
[0058] The large model prompts used for expanding medical text content are shown below:
[0059] Please expand upon the following medical diagnosis and treatment requirements. Replace each medical concept (including its modifiers) in the original sentence with a consistent or near-synonymous expression commonly found in free medical texts, generating multiple semantically equivalent but differently worded complete sentences. Note:
[0060] 1. Maintain the overall structure and logical relationships of the original sentence.
[0061] 2. Avoid overly specific instantiation (such as specific age numbers).
[0062] 3. Pay close attention to the different expressions of medical terminology.
[0063] 4. Each expanded sentence should be a complete and natural medical description.
[0064] Medical treatment requirements: {Please fill in the sentence here that needs to be expanded on the medical treatment requirements}
[0065] In this embodiment, the output after expanding the large model prompt words with medical text content is shown below:
[0066] Input: Patient age > 60 years, with active malignant tumor, and has not received anti-tumor drug treatment.
[0067] Output:
[0068] 1. The patient is an elderly person with an active malignant tumor and has not yet received any anti-tumor drug treatment.
[0069] 2. Patients over sixty years of age with active cancer who have not received any anticancer drug treatment.
[0070] 3. This is an elderly patient diagnosed with active malignant tumor who has never received chemotherapy, radiotherapy, or targeted therapy.
[0071] 4. Patients aged 60 years or older currently have malignant tumor activity and have no history of anti-tumor drug treatment.
[0072] 5. The elderly patient's tumor is active and has not yet received any anti-tumor drug intervention.
[0073] 6. Patients over sixty years of age with a current progressive malignant tumor who have not received any related anti-tumor treatment.
[0074] Step S120: Input the extended medical text into the fine-tuned open-source base model, so as to call the fine-tuned open-source base model to generate a semi-structured template based on the extended medical text.
[0075] Specifically, the server inputs the extended medical text that meets the preset extension rules output in step S110 into the fine-tuned open-source base model, and calls the prompt words of the fine-tuned open-source base model to generate the corresponding semi-structured template based on the extended medical text.
[0076] Combination Figure 2 As shown in the specific embodiment, the executable clinical pathway generation method provided by the present invention, in step 2, calls the fine-tuned large model to generate a semi-structured medical template based on the extended free text.
[0077] Specifically, DeepSeek R1 was first selected as the open-source foundation model. This foundation model was trained and fine-tuned using a self-maintained large model that combined manually input medical rule-splitting data. During the fine-tuning process, authoritative knowledge bases such as UMLS and Metathesaurus were used to standardize the medical terms in the rule-splitting data to eliminate ambiguity. Simultaneously, synonym substitution and back-translation strategies were employed to expand the data scale and improve the model's generalization ability. Finally, a specialized vocabulary for the medical field was constructed to enhance the model's ability to recognize medical terms.
[0078] Among these strategies are: Back-translation: reconstructing text through multilingual translation chains, generating expression variants by leveraging language differences, i.e., translating into other languages and then back, increasing linguistic diversity; and Synonym substitution: replacing original content with semantically equivalent or similar words / phrases, introducing lexical diversity while maintaining the core semantics. In the medical field, specialized thesaurus is constructed, including categories such as diagnosis, symptoms, physical examination, and drugs, along with their specific standard terms.
[0079] In this embodiment, since the task is defined as generating an executable path based on free text, the model's input can be adjusted by optimizing the Prompt Embedding, thereby affecting the model's output. The model input is medical free text, such as "a description of treatment requirements based on clinical medical guidelines." The model output is a semi-structured template based on the above input.
[0080] In this embodiment, the training parameters of the open-source base model are configured as follows:
[0081] Learning rate: 1e-5, to avoid model overfitting;
[0082] Batch size: 16;
[0083] Number of training rounds: 3 rounds;
[0084] Optimization algorithm: Using the AdamW optimizer can effectively prevent overfitting;
[0085] Regularization: Regularization techniques such as dropout and weight decay are used to prevent overfitting.
[0086] Gradient clipping: Gradient clipping prevents gradient explosion.
[0087] Finally, the BLEU metric was used to evaluate the fine-tuned open-source foundation model, and the evaluation criteria are as follows:
[0088] BLEU > 0.40 (40%) - Excellent
[0089] BLEU 0.30-0.40 - Excellent
[0090] BLEU 0.20-0.30 - Good
[0091] BLEU 0.10-0.20 - General
[0092] BLEU < 0.10 (10%) - Poor
[0093] The model trained and fine-tuned in this example needs to meet excellent standards.
[0094] In this embodiment, a finely tuned open-source base model is invoked to recall the top 10 examples based on similarity ranking using vector matching, based on expanded text content. Each example generates a corresponding vector using the Qwen3 and Embedding models. Cosine similarity is used to calculate the similarity between the input text and candidate examples, and the examples are sorted in descending order of similarity score, selecting the top 10. Then, a sentence-by-sentence weighted scoring strategy is used to further refine the top 10 examples based on their total score, leaving the top 2 examples to be added to the prompt word template. That is, based on the recalculated total similarity score, the top two examples are selected in descending order of score. In the sentence-by-sentence weighted scoring process, the similarity of each example sentence is summed in weights, with the weight coefficient in the sum being the ratio between the number of identical entities in the sentence and the number of input entities.
[0095] Step S130: Send the semi-structured template to the front end for visual display to verify whether the semi-structured template meets the preset structure rules.
[0096] Specifically, the server sends the semi-structured template generated in step S120 to the front end for visualization, and then verifies whether the semi-structured template meets the preset structure rules based on the displayed content.
[0097] Combination Figure 2 As shown in the specific embodiment, the executable clinical pathway generation method provided by the present invention includes step 3, where the user confirms / modifies the content of the semi-structured medical template.
[0098] Specifically, the generated semi-structured medical template content is sent to the front end for visualization, allowing users to view and confirm the content and preventing errors caused by illusions or other issues in the large model. The verification process mainly consists of three modules:
[0099] Module 1: Basic Information of Patients Requiring Quality Control (Essential Conditions)
[0100] This module mainly describes the conditions that patients should meet before quality control reminders are needed for clinicians. Specifically, it includes: the medical concepts involved, the scope of the medical concepts, the source of the medical concepts (document source / document field source), and the time logic, etc.
[0101] (1) The medical concepts involved include: diagnosis, symptoms, generic names of drugs, etc. Based on the understanding of the original input by the large model, the names of the medical entity types involved in the output input are extracted;
[0102] (2) Scope of medical concepts: The standard terms included in specific medical concepts, as shown in the screenshot above. The concept of "diagnosis" includes standard terms such as "malignant tumor of the bladder lateral wall" and "malignant tumor of the bladder dome".
[0103] (3) Source of medical concepts: When judging the medical concepts extracted from the input medical diagnosis and treatment text based on the large model, it is necessary to judge which field of which document type in the electronic medical record. Document types include: admission record, first course of medical treatment, ward round record, discharge record, etc.; document field types include chief complaint, present illness history, past medical history, etc.
[0104] (4) Time logic: This is the time calculation logic requirement for medical concepts extracted from the input medical diagnosis and treatment text based on the large model.
[0105] Module Two: Diagnostic and treatment tasks that require standardized execution by medical personnel (supplementary conditions)
[0106] This module mainly describes the content and requirements for clinicians to perform diagnostic and treatment tasks after meeting the requirements of "Module 1" and providing quality control reminders. The composition of the module template content is the same as that of Module 1, including: the medical concepts involved, the scope of the medical concepts, the source of the medical concepts (document source / document field source), time logic, etc.
[0107] Module 3: Cases where patients need to be excluded during quality control (negative conditions).
[0108] This module mainly describes the conditions under which a patient's medical record content meets so that the patient does not require any quality control reminders. The module template content is composed of the same components as Module 1 and Module 2, including: the medical concepts involved, the scope of the medical concepts, the source of the medical concepts (document source / document field source), time logic, etc.
[0109] Step S140: When the semi-structured template meets the preset structural rules, the semi-structured template is converted into GoRules rules, and a structured clinical pathway to be executed is generated according to the GoRules rules.
[0110] Specifically, when the visualization verification result in step S130 shows that the generated semi-structured template meets the preset structural rules, the semi-structured template is converted into the corresponding GoRules rule, and a structured clinical pathway with executable function corresponding to the original free medical text is generated according to the GoRules rule.
[0111] Combination Figure 2 As shown in the specific embodiment, the executable clinical pathway generation method provided by the present invention includes step 4, generating executable structured rules.
[0112] Specifically, the generated executable structured clinical pathways / rules mainly include a start node, a quality control condition judgment node, a quality control result setting node, and an result node; among them, the quality control condition judgment node is a decision table, and the quality control result setting node is an expression node. The decision table can clearly express complex rules, and the expression can clearly and accurately express the relationship between different rows of the decision table and set the output results.
[0113] The "Quality Control Condition Judgment" node represents rules in the form of a decision table. It iterates through the input data, judging each row one by one. A row is considered to have a rule if all columns in that row meet the criteria. The "Quality Control Result Setting" node is an expression node that primarily uses expressions to process and aggregate the relationships between different rows of data in the "Quality Control Condition Judgment" node, and outputs the final result.
[0114] In this embodiment, the model input (diagnosis and treatment requirements described in free medical text) is used to generate a semi-structured template based on prompts from the larger model. This template includes necessary conditions, supplementary conditions, and negative conditions. Each condition consists of multiple keyword dimensions, each containing specific keyword content and constraint information. After manual verification, the semi-structured template is parsed and converted into GoRules rules by a program. Finally, an executable clinical pathway is generated based on the GoRules rules.
[0115] The aforementioned executable clinical pathway generation method acquires the original medical text and expands its content using a large model to obtain expanded medical text that meets preset expansion rules. The expanded medical text is then input into a fine-tuned open-source base model, which generates a semi-structured template based on the expanded medical text. The semi-structured template is then sent to the front end for visualization to verify whether it meets the preset structure rules. Finally, when the semi-structured template meets the preset structure rules, it is converted into GoRules rules, and an executable structured clinical pathway is generated based on these rules. This method utilizes prompts from the large model and preset rules to perform layer-by-layer verification and structuring of free medical text, ultimately converting it into executable structured clinical pathway rules. This not only ensures the accuracy and stability of the generated medical execution statements but also reduces the fine-tuning cycle of the large model to some extent, allowing the large model to continuously improve the quality of the fine-tuned data samples based on preset rules during the generation of structured clinical pathways.
[0116] like Figure 3As shown, in one embodiment, the executable clinical pathway generation method provided by the present invention includes the following steps in step S110:
[0117] Step S111: Input the original medical text into the large model, and call the prompt words of the large model to expand the content of the original medical text to obtain the initial expanded medical text.
[0118] Step S112: Verify the initial extended medical text according to the preset extension rules to determine whether the initial extended medical text meets the preset extension rules, and determine the extended medical text that meets the preset extension rules based on the judgment result.
[0119] like Figure 4 As shown, in one embodiment, the executable clinical pathway generation method provided by the present invention includes the following steps before step S120:
[0120] Step S410: Obtain medical rule split data from the large model and user input, and perform standardization and data augmentation on the medical rule split data to construct a medical professional lexicon.
[0121] Step S420: Optimize the prompt word embedding vector of the open source base model based on the medical professional vocabulary to adjust the model parameters of the open source base model and obtain the fine-tuned open source base model.
[0122] like Figure 5 As shown, in one embodiment, the executable clinical pathway generation method provided by the present invention includes the following steps in step S120:
[0123] Step S121: Using the extended medical text as input to the fine-tuned open-source base model, the fine-tuned open-source base model is called to transform the extended medical text into an extended text vector.
[0124] Step S122: Based on the extended text vector, generate multiple candidate templates with a similarity ranking of not less than the first threshold with the extended text vector through vector matching.
[0125] like Figure 6 As shown, in one embodiment, the executable clinical pathway generation method provided by the present invention further includes the following steps in step S120:
[0126] Step S123: The multiple candidate templates are sorted a second time using the branch office weighted scoring strategy to obtain a candidate template list sorted by weighted total score.
[0127] Step S124: Select candidate templates from the candidate template list whose weighted total score ranking is not lower than the second threshold, and output semi-structured templates.
[0128] like Figure 7 As shown, in one embodiment, the executable clinical pathway generation method provided by the present invention includes the following steps in step S130:
[0129] Step S131: Send the semi-structured template to the front end and visualize the semi-structured template through rendering.
[0130] Step S132: Verify the semi-structured templates for visualization according to the preset structure rules to determine the semi-structured templates that meet the preset structure rules, and correct the semi-structured templates that do not meet the preset structure rules.
[0131] like Figure 8 As shown, in one embodiment, the executable clinical pathway generation method provided by the present invention includes the following steps in step S140:
[0132] Step S141: Traverse the semi-structured templates that satisfy the preset structure rules, and parse the semi-structured templates to convert them into GoRules rules.
[0133] Step S142: Verify the semi-structured template row by row using the decision table, and generate the structured clinical pathway to be executed according to the GoRules rules when all columns of the semi-structured template meet the corresponding set rules in the decision table.
[0134] The executable clinical pathway generation apparatus provided by the present invention is described below. The executable clinical pathway generation apparatus described below and the executable clinical pathway generation method described above can be referred to in correspondence.
[0135] like Figure 9 As shown, in one embodiment, an executable clinical pathway generation device includes a content expansion module 910, a semi-structured template generation module 920, a template structure verification module 930, and a clinical pathway generation module 940.
[0136] The content extension module 910 is used to obtain the original medical text and call the large model to extend the content of the original medical text in order to obtain extended medical text that meets the preset extension rules.
[0137] The semi-structured template generation module 920 is used to input extended medical text into a fine-tuned open-source base model, so as to call the fine-tuned open-source base model to generate a semi-structured template based on the extended medical text.
[0138] The template structure verification module 930 is used to send the semi-structured template to the front end for visual display to verify whether the semi-structured template meets the preset structure rules.
[0139] The clinical pathway generation module 940 is used to convert a semi-structured template into GoRules rules when the semi-structured template meets the preset structural rules, and to generate a structured clinical pathway to be executed based on the GoRules rules.
[0140] In this embodiment, the executable clinical pathway generation device provided by the present invention, the content expansion module 910 is specifically used for:
[0141] The original medical text is input into the large model, and prompts from the large model are used to expand the content of the original medical text, resulting in an initial expanded medical text.
[0142] The initial extended medical text is verified according to the preset extension rules to determine whether the initial extended medical text meets the preset extension rules, and the extended medical text that meets the preset extension rules is determined based on the judgment result.
[0143] In this embodiment, the executable clinical pathway generation device provided by the present invention further includes a model fine-tuning module, used for:
[0144] We acquire medical rule breakdown data from large models and user input, and perform standardization and data augmentation on the medical rule breakdown data to construct a medical professional thesaurus.
[0145] The prompt word embedding vectors of the open-source base model are optimized based on a medical professional vocabulary to adjust the model parameters of the open-source base model and obtain a fine-tuned open-source base model.
[0146] In this embodiment, the semi-structured template generation module 920 of the executable clinical pathway generation device provided by the present invention is specifically used for:
[0147] Using extended medical text as input to a finely tuned open-source base model, the finely tuned open-source base model is called to transform the extended medical text into extended text vectors.
[0148] Based on the extended text vector, multiple candidate templates with a similarity ranking of no less than the first threshold with the extended text vector are generated through vector matching.
[0149] In this embodiment, the semi-structured template generation module 920 of the executable clinical pathway generation device provided by the present invention is further used for:
[0150] The candidate templates are sorted a second time by a weighted scoring strategy at the branch level, resulting in a list of candidate templates sorted by their weighted total score.
[0151] Select candidate templates from the candidate template list whose weighted total score ranking is not lower than the second threshold, and output semi-structured templates.
[0152] In this embodiment, the executable clinical pathway generation device provided by the present invention, specifically uses the template structure verification module 930 for:
[0153] The semi-structured template is sent to the front end, and the semi-structured template is visualized through rendering.
[0154] The semi-structured templates for visualization are verified according to the preset structural rules to determine the semi-structured templates that meet the preset structural rules, and the semi-structured templates that do not meet the preset structural rules are corrected.
[0155] In this embodiment, the executable clinical pathway generation device provided by the present invention, specifically uses the clinical pathway generation module 940 for:
[0156] Iterate through the semi-structured templates that satisfy the preset structure rules, and parse the semi-structured templates to convert them into GoRules rules.
[0157] The semi-structured template is verified row by row using a decision table. When all columns of the semi-structured template meet the corresponding rules set in the decision table, a structured clinical pathway to be executed is generated according to the GoRules rules.
[0158] Figure 10 This example illustrates a schematic diagram of the physical structure of an electronic device, which can be a smart terminal. Its internal structure diagram can be as follows: Figure 10 As shown. The electronic device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements an executable clinical pathway generation method, which includes:
[0159] Obtain the original medical text and call the large model to expand the content of the original medical text to obtain expanded medical text that meets the preset expansion rules;
[0160] The extended medical text is input into the fine-tuned open-source base model, which then generates a semi-structured template based on the extended medical text.
[0161] The semi-structured template is sent to the front end for visual display to verify whether the semi-structured template meets the preset structure rules;
[0162] When a semi-structured template meets the preset structural rules, the semi-structured template is converted into GoRules rules, and a structured clinical pathway to be executed is generated based on the GoRules rules.
[0163] Those skilled in the art will understand that Figure 10 The structure shown is merely a block diagram of a portion of the structure related to the present invention and does not constitute a limitation on the electronic device to which the present invention is applied. A specific electronic device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0164] On the other hand, the present invention also provides a computer storage medium storing a computer program, which, when executed by a processor, implements an executable clinical pathway generation method, the method comprising:
[0165] Obtain the original medical text and call the large model to expand the content of the original medical text to obtain expanded medical text that meets the preset expansion rules;
[0166] The extended medical text is input into the fine-tuned open-source base model, which then generates a semi-structured template based on the extended medical text.
[0167] The semi-structured template is sent to the front end for visual display to verify whether the semi-structured template meets the preset structure rules;
[0168] When a semi-structured template meets the preset structural rules, the semi-structured template is converted into GoRules rules, and a structured clinical pathway to be executed is generated based on the GoRules rules.
[0169] In another aspect, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and when the processor executes the computer instructions, it implements a method comprising:
[0170] Obtain the original medical text and call the large model to expand the content of the original medical text to obtain expanded medical text that meets the preset expansion rules;
[0171] The extended medical text is input into the fine-tuned open-source base model, which then generates a semi-structured template based on the extended medical text.
[0172] The semi-structured template is sent to the front end for visual display to verify whether the semi-structured template meets the preset structure rules;
[0173] When a semi-structured template meets the preset structural rules, the semi-structured template is converted into GoRules rules, and a structured clinical pathway to be executed is generated based on the GoRules rules.
[0174] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory.
[0175] By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0176] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0177] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.
Claims
1. An executable clinical pathway generation method, characterized in that, The method includes: Obtain the original medical text and call the large model to expand the content of the original medical text to obtain expanded medical text that meets the preset expansion rules; The extended medical text is input into the finely tuned open-source base model, so that the finely tuned open-source base model can generate a semi-structured template based on the extended medical text; The semi-structured template is sent to the front end for visual display to verify whether the semi-structured template meets the preset structural rules; When the semi-structured template meets the preset structural rules, the semi-structured template is converted into GoRules rules, and a structured clinical pathway to be executed is generated according to the GoRules rules. The step of inputting the extended medical text into the fine-tuned open-source base model, and then calling the fine-tuned open-source base model to generate a semi-structured template based on the extended medical text, includes the following prior steps: Acquire medical rule breakdown data from a large model and user input, and perform standardization and data augmentation on the medical rule breakdown data to construct a medical professional thesaurus; The prompt word embedding vector of the open-source base model is optimized based on the medical professional vocabulary to adjust the model parameters of the open-source base model and obtain a fine-tuned open-source base model. The step of inputting the extended medical text into the fine-tuned open-source base model, and then calling the fine-tuned open-source base model to generate a semi-structured template based on the extended medical text, includes: Using the extended medical text as input to the fine-tuned open-source base model, the fine-tuned open-source base model is called to transform the extended medical text into an extended text vector; Based on the extended text vector, multiple candidate templates with a similarity ranking of not less than a first threshold are generated through vector matching.
2. The executable clinical pathway generation method according to claim 1, characterized in that, The process of obtaining the original medical text and then using a large model to expand the content of the original medical text to obtain expanded medical text that meets preset expansion rules includes: The original medical text is input into the large model, and the prompt words of the large model are invoked to expand the content of the original medical text, so as to obtain the initial expanded medical text. The initial extended medical text is verified according to the preset extension rules to determine whether the initial extended medical text meets the preset extension rules, and the extended medical text that meets the preset extension rules is determined according to the judgment result.
3. The executable clinical pathway generation method according to claim 1, characterized in that, The step of inputting the extended medical text into the fine-tuned open-source base model, and then calling the fine-tuned open-source base model to generate a semi-structured template based on the extended medical text, further includes: The multiple candidate templates are sorted a second time by a branch office weighted scoring strategy to obtain a candidate template list sorted by weighted total score. Select candidate templates from the candidate template list whose weighted total score ranking is not lower than the second threshold, and output the semi-structured template.
4. The executable clinical pathway generation method according to claim 1, characterized in that, The step of sending the semi-structured template to the front end for visual display to verify whether the semi-structured template meets the preset structural rules includes: The semi-structured template is sent to the front end, and the semi-structured template is visualized through rendering; The semi-structured templates displayed in the visualization are verified according to the preset structural rules to determine the semi-structured templates that meet the preset structural rules, and the semi-structured templates that do not meet the preset structural rules are corrected.
5. The executable clinical pathway generation method according to claim 1, characterized in that, When the semi-structured template satisfies preset structural rules, the semi-structured template is converted into GoRules rules, and a structured clinical pathway to be executed is generated based on the GoRules rules, including: The semi-structured templates that satisfy the preset structural rules are traversed, and the semi-structured templates are parsed to transform them into the GoRules rules. The semi-structured template is verified row by row using a decision table. When all columns of the semi-structured template satisfy the corresponding set rules in the decision table, a structured clinical pathway to be executed is generated according to the GoRules rules.
6. An executable clinical pathway generation device, characterized in that, The apparatus for implementing the executable clinical pathway generation method according to any one of claims 1 to 5 includes: The content expansion module is used to obtain the original medical text and call the large model to expand the content of the original medical text in order to obtain expanded medical text that meets the preset expansion rules. A semi-structured template generation module is used to input the extended medical text into a fine-tuned open-source base model, so as to call the fine-tuned open-source base model to generate a semi-structured template based on the extended medical text; The template structure verification module is used to send the semi-structured template to the front end for visual display in order to verify whether the semi-structured template meets the preset structure rules. The clinical pathway generation module is used to convert the semi-structured template into GoRules rules when the semi-structured template meets the preset structural rules, and generate a structured clinical pathway to be executed according to the GoRules rules.
7. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the executable clinical pathway generation method according to any one of claims 1 to 5.
8. A computer storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the executable clinical pathway generation method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Contract document data extraction method and device
CN117350250A