Data-free patient data generation method based on rule base
Through the data-free generation method based on the rule base, the problem of manpower consumption and data quality in the data collection and processing process of large medical consultation models is solved, rapid and credible patient data generation is achieved, data privacy leakage is avoided, and the satisfaction is satisfied It meets the different needs of data volume and has good scalability.
Patent Information
- Application Number
- CN202411328260.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-09-24
AI Technical Summary
Existing large-scale medical consultation models have problems such as high human resource consumption, low data quality, incomplete information, and data privacy leakage during data collection and processing. Moreover, data enhancement technology requires real data support, making it difficult to obtain rare data types. .
Using a data-free generation method based on a rule base, a random method is used to generate patient data, including disease diagnosis type, dialectical type, age, gender, clinical manifestations and treatment plan to form complete patient data information.
It greatly saves manpower and material resources, the data generated is reliable and fast, the scale is definable, it has good scalability, and it does not involve the leakage of patient privacy, and the system is easy to use.
Smart Images

Figure CN118866221A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of traditional Chinese medicine consultation data synthesis, and specifically relates to a method for generating data-free patient data based on a rule library. Background Art
[0002] The Medical Consultation Big Model is a technology built on a vast amount of medical consultation data. It uses deep learning methods to continuously learn from this data to enhance the model's consultation capabilities, aiming to enable intelligent consultation and triage.
[0003] Large models require not only extensive computing resources but also extensive data resources. Current data collection methods often rely on manual labor within hospitals, which is not only time-consuming and labor-intensive, but also suffers from low data quality, often requiring further processing. The information provided is also incomplete. For example, doctors may not typically ask about a patient's gender, age, or location, even though these factors can influence the outcome. Furthermore, the collection of patient information poses the risk of data privacy breaches.
[0004] Another approach is to use data augmentation techniques. For example, in the field of natural language processing, adversarial neural networks are often used to enhance medical interview data. This approach requires real data, so obtaining rare data types is still difficult. Patient self-descriptions generated by adversarial neural networks are often more structured and professional than real data, possibly due to the learning ability of adversarial neural networks. However, using this "high-quality" generated data can affect the large model's understanding of real data.
[0005] Therefore, to address these issues, it is necessary to propose a systematic method that can save a lot of manpower and material resources and does not need to consider patient privacy, so as to prepare the data set more quickly and conveniently in the early stage of model training. Summary of the Invention
[0006] In order to overcome the above problems, the present invention provides a method for generating patient data without data based on a rule base.
[0007] In a first aspect, the present invention provides a method for generating patient data without data based on a rule base, comprising the following steps: S1. Constructing a patient data rule base, the patient data rule base including a disease information table and a correspondence table between medical terms of clinical manifestations and patient self-reports; S2. Data processing: reading the data in the disease information table and processing various disease information to generate corresponding lists and data dictionaries; S3. Patient generation: Define the patient data size and patient and disease information, including the patient's age, age group, gender, clinical manifestations and self-report, disease identification, syndrome differentiation, treatment method, and representative prescriptions. The patient and disease information corresponds to the data size. S4. Disease generation: Generate the patient's disease type, and then use the generated disease type as a constraint to generate a random syndrome type under the disease type; S5. Generation of age and gender: Use the disease identification information and syndrome differentiation information as a joint primary key to generate age and gender information, and then use the generated age as input to generate the corresponding age group; S6. Treatment plan, using disease identification and syndrome differentiation information as joint primary keys to generate treatment method information and representative prescription information; S7. Symptom description: Generate random clinical manifestations from the disease information using disease and syndrome differentiation information as a joint primary key. Convert the random clinical manifestations into corresponding patient self-descriptions based on the correspondence between the medical terms of the clinical manifestations and the patient self-descriptions in the corresponding table; S8. Summarize the patient's disease type, syndrome type, age, age group, gender, clinical manifestations, patient self-report, and corresponding treatment methods and representative prescriptions to obtain the final patient data information.
[0008] Furthermore, the disease information table in step S1 is constructed in the following manner: Obtain disease information from medical books and process the disease information to obtain A disease information table with categories includes "Disease", "Syndrome Differentiation 1", "Syndrome Differentiation", "Clinical Manifestations", "Treatment Methods", "Representative Prescriptions", "High-Incidence Age Group", and "Male-Female Ratio". The disease information table is recorded as "ChineseMed.xlsx". Syndrome Differentiation 1 is an intermediate classification between disease differentiation and syndrome differentiation. The high-incidence age groups include none, infants: 0 to 1 years old, toddlers: 2 to 4 years old, children: 5 to 11 years old, teenagers: 12 to 18 years old, young people: 19 to 35 years old, middle-aged: 36 to 59 years old, and elderly: 60 to 90 years old. Furthermore, the construction process of the correspondence table between the medical terms of clinical manifestations and the patient's self-report is as follows: create a new text document, record it as "Clinical Manifestations.txt", copy all the clinical manifestations in the "ChineseMed.xlsx" into the document, convert the line breaks in the "Clinical Manifestations.txt" document into English commas, and use English commas as delimiters to split the symptoms, remove duplicate items in the document, and finally perform a sorting operation; create a new Excel table, record it as "Clinical Manifestations.xlsx", import the clinical manifestation data in the "Clinical Manifestations.txt" document into the Excel table, and then create the same number of patient self-reports as the clinical manifestation data in the "Clinical Manifestations.xlsx" table, set the content to "Unknown", and rename the "Clinical Manifestations.xlsx" file to "Patient Self-Report.xlsx"; use the language large model in The operation generates the corresponding patient self-description from the clinical manifestation data, copies the patient self-description to the "patient self-description.xlsx" file and corresponds it one by one with the clinical manifestation, modifies the patient self-description through manual verification, and finally obtains the correspondence table between the medical terms of clinical manifestation and the patient self-description, which contains categories, including “clinical manifestations” and “patient self-report”.
[0009] Furthermore, the data in the disease information table is read in step S2, and various disease information is processed to obtain disease differentiation and syndrome differentiation with a list data structure, disease differentiation-syndrome differentiation, clinical manifestations-patient self-report, age-age upper and lower limits data structure as a single primary key type dictionary, and syndrome differentiation, disease differentiation-age, syndrome differentiation, disease differentiation-treatment method, syndrome differentiation, disease differentiation-representative prescription, syndrome differentiation, disease differentiation-male-female ratio, and syndrome differentiation, disease differentiation-clinical manifestation data structure as a double primary key type dictionary, specifically including: converting disease differentiation and syndrome differentiation information directly into a list type; disease differentiation-syndrome differentiation uses disease differentiation as the primary key and syndrome differentiation as the value to establish a dictionary; clinical manifestations-patient self-report uses clinical manifestations as the primary key and patient self-report as the value to establish a dictionary; age-age upper and lower limits uses age group as the primary key and patient self-report as the value to establish a dictionary The key is to use the upper limit of the age range and the lower limit of the age range as two values to establish a dictionary; the disease differentiation and syndrome differentiation are spliced together to generate a new primary key disease differentiation-syndrome differentiation, and age is used as the value to establish syndrome differentiation and disease differentiation-age dictionaries; the disease differentiation and syndrome differentiation are spliced together to generate a new primary key disease differentiation-syndrome differentiation, and treatment method is used as the value to establish syndrome differentiation and disease differentiation-treatment method dictionaries; the disease differentiation and syndrome differentiation are spliced together to generate a new primary key disease differentiation-syndrome differentiation, and representative prescription is used as the value to establish syndrome differentiation and disease differentiation-representative prescription dictionaries; the disease differentiation and syndrome differentiation are spliced together to generate a new primary key disease differentiation-syndrome differentiation, and male-female ratio is used as the value to establish syndrome differentiation and disease differentiation-male-female ratio dictionaries, in which '[1]' should be added after the male-female ratio; the disease differentiation and syndrome differentiation are spliced together to generate a new primary key disease differentiation-syndrome differentiation, and clinical manifestation is used as the value to establish syndrome differentiation and disease differentiation-clinical manifestation dictionary.
[0010] Furthermore, step S3 specifically includes: manually defining the patient data size data_size and patient and disease information, named data; data categories include the patient's age, age group, gender, clinical manifestations and patient self-report, disease differentiation and syndrome classification, as well as treatment methods and representative prescriptions. The size of the data category corresponds to data_size, and the age value is set to "None", and the other values are set to "UnKnown".
[0011] Furthermore, the step S4 specifically includes: generating disease identification information: using a random pseudo-random method to generate random disease identification types with the same number as data_size in the disease information list, and adding the disease identification types to data in the form of a list; generating syndrome differentiation information: using the generated disease identification type as a constraint, using a random pseudo-random method to generate a random syndrome differentiation type under this type of disease differentiation in the disease identification-syndrome differentiation dictionary, and adding it to data in the form of a list.
[0012] Furthermore, step S5 specifically includes: generating gender information: taking the combined primary key of syndrome differentiation and disease differentiation as input, and using a random pseudo-random method to generate the corresponding patient gender in the dictionary of disease differentiation, syndrome differentiation-male-female ratio; generating age information: taking the combined primary key of syndrome differentiation and disease differentiation as input, and searching for the corresponding high-incidence age group in the dictionary of disease differentiation, syndrome differentiation-age, and then using a constrained random number generation function to generate the patient's age according to the different high-incidence age groups input, wherein the constrained random number generation function is as follows: Among them, a represents the upper limit of the age group, b represents the lower limit of the age group, Indicates that the lower limit is Upper limit is Generate a random integer in the range A random integer between 0 and 100 is added to data.
[0013] Furthermore, step S6 specifically includes: generating treatment methods: using disease identification and syndrome differentiation information as the joint primary key, generating corresponding treatment methods by searching the syndrome differentiation, disease identification-treatment method dictionary and adding them to data; generating representative prescriptions: using disease identification and syndrome differentiation information as the joint primary key, generating corresponding representative prescriptions by searching the syndrome differentiation, disease identification-representative prescription dictionary and adding them to data.
[0014] Furthermore, the step S7 specifically includes: generating clinical manifestations: using the disease identification and syndrome differentiation information as the joint primary key, obtaining the number of all clinical manifestations contained in the disease by searching the disease identification, syndrome differentiation-clinical manifestation dictionary , generate a new list of all clinical manifestations, and then select an integer As the number of clinical manifestations of this patient, , select a clinical manifestation according to the probability and add it to the patient data and delete the clinical manifestation and the corresponding selection probability in the list, and then reduce the selection probability of the clinical manifestations adjacent to the selected one. The specific operation method is: given a list of clinical manifestations of a disease is: The corresponding initial probability weight is: in, represents a list of clinical manifestations, List of clinical manifestations Corresponding initial probability weight; randomly select a weight value : in, is the sum of the probability weights of all clinical manifestations, for Any integer between is used to generate this clinical manifestation, and then according to this weight value Select clinical manifestations according to the interval: in, The first in the weight list of clinical manifestations item, Indicates the first item, For Start traversing to integer, if If it is greater than 0, continue to execute the formula ,until Less than or equal to , at this time Add to data, then in Delete, after deletion Denoted as: , Finally, modify the weight list to The adjacent weight of is halved and the modified value is: , Repeat the above steps until the formula is satisfied: , and finally generate clinical performance data in data, express The number of elements in .
[0015] Furthermore, the step S8 specifically includes: converting the patient's syndrome differentiation information and disease differentiation information into a character string, and outputting the generated data information in Excel format, recorded as "data.xlsx".
[0016] In a second aspect, the present invention provides a data-free patient data generation system based on a rule base, comprising a rule base construction module and a data generator: The rule base construction module is used to construct a patient data rule base, which includes a disease information table and a correspondence table between medical terms of clinical manifestations and patient self-descriptions; The data generator includes a data processing module, a patient generation module and a patient information generation module; The data processing module is used to read the data in the disease information table, process various disease information, and generate corresponding lists and data dictionaries; The patient generation module is used to define the patient data scale and patient and disease information; The patient information generation module is used to implement the contents of steps S4-S8 of the method described in the first aspect.
[0017] The advantages of the present invention are: The present invention does not require manual data collection, which greatly saves manpower and material resources. Each patient data is completely consistent with the rule base, ensuring the credibility of the generated data. Since a constrained random selection method is used, data can be generated quickly. The size of the generated data can be defined by the user himself, meeting the user's different needs for data volume. And by improving and modifying the rule base, disease information can be added and modified relatively easily, with good scalability. The rule base and the generated data are presented in Excel format, which greatly improves the readability of the rule base and the generated data. The auxiliary language large model used in the present invention uses a domestic open source model, which can be used without professionals, ensuring the ease of use of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.
[0019] Figure 1 Flow chart of the method of the present invention. DETAILED DESCRIPTION
[0020] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments derived by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0021] Example 1 In this embodiment, Figure 1 As shown, the present invention provides a method for generating patient data without data based on a rule base, and the specific steps include: Step a) comprises the following steps: A common disease information table is established. In this invention, "Chinese Internal Medicine" (New Century Fourth Edition) (Editors Zhang Boli and Wu Mianhua) is taken as an example. This table is the main part of the rule base.
[0022] a-1) Select the parts of the second part of the book "Internal Medicine of Traditional Chinese Medicine" (New Century Fourth Edition) (Editors: Zhang Boli and Wu Mianhua), that is, Chapter 4 and the following contents, and use each summary as a classification for disease differentiation. Then use the "Differential Diagnosis and Treatment" section in each summary as the information source for clinical manifestations, treatment methods, and representative prescriptions. Considering that the clinical manifestation information will be converted into patient self-reports later, and patients themselves are unlikely to pay attention to their own tongue and pulse conditions, the descriptions of tongue and pulse conditions in the clinical manifestations were removed during the information entry process.
[0023] a-2) A total of 62 types of common disease differentiation information and 361 types of detailed syndrome differentiation information are included. Disease-related information includes disease differentiation, syndrome differentiation 1 (a classification between disease differentiation and syndrome differentiation), syndrome differentiation, clinical manifestations, treatment methods, representative prescriptions, high-incidence age group, and male-female ratio. Due to the lack of statistical information, the high-incidence age group and male-female ratio both use the default values of "none" and "1".
[0024] a-3) Use Excel to remove all spaces and semicolons, and replace all Chinese commas with English to facilitate subsequent data operations.
[0025] a-4) Save the file in Excel format and name it "ChineseMed.xlsx". Part of the content is shown in Table 1.
[0026] Table 1 Disease information table Step b) comprises the following steps: A correspondence table between medical terms of clinical manifestations and patients' self-descriptions is established, and this table and "ChineseMed.xlsx" together constitute the rule base of the present invention.
[0027] b-1) Create a new text document and name it "Clinical Manifestations.txt". Copy all clinical manifestations in "ChineseMed.xlsx" into the "Clinical Manifestations.txt" document. Run the ALLSymptom module in the code to convert line breaks into commas, separate the symptoms using commas as delimiters, remove duplicates, and finally perform sorting.
[0028] b-2) Create a new Excel spreadsheet and name it "Clinical Manifestations.xlsx." Import the 1973 clinical manifestation data processed in b-1) into it. Then create the same number of patient self-reports, temporarily setting the content to "Unknown." Rename the "Clinical Manifestations.xlsx" file to "Patient Self-Report.xlsx" to prevent accidental code overwriting. Part of the content of "Patient Self-Report.xlsx" is shown in Table 2.
[0029] Table 2 Correspondence between medical terms for clinical manifestations and patients' self-reports b-3) Submit different clinical manifestations to a large language model in groups of 30. The large language model can be Zhinao, Wenxin Yiyan, Doubao, or Tongyi Qianwen. We use Wenxin Yiyan (Baidu) (https: / / yiyan.baidu.com / ) to generate corresponding patient descriptions, with requirements such as "Here are 30 clinical manifestations, please convert them into corresponding patient descriptions, requiring a consistent number and refined language." At the same time, we must constantly monitor the quality and quantity of the generated data to ensure that they meet the requirements. Any output that does not meet the requirements will be regenerated or manually modified.
[0030] b-4) Copy the patient self-report generated by the large model into the "patient self-report.xlsx" file and match it to the clinical manifestations one by one. Then remove the generated serial number. Finally, manually proofread and check for unreasonable descriptions and make manual corrections.
[0031] Step c) comprises the following steps: The disease information table "ChineseMed.xlsx" is loaded into the data processing module dataControl to read and process the data information. The processed information includes disease differentiation and syndrome differentiation with a list data structure, disease differentiation-syndrome differentiation, clinical manifestations-patient self-report with a single primary key type dictionary data structure, and age group, treatment method, representative prescription, male-female ratio and clinical manifestations with a double primary key type dictionary data structure.
[0032] c-1) Disease and syndrome differentiation information is directly converted into list type.
[0033] c-2) Clinical manifestations - patient self-reports. A dictionary is created with clinical manifestations as the primary key and patient self-reports as the value. c-3) Disease differentiation - syndrome differentiation: A dictionary is created with disease differentiation as the primary key and syndrome differentiation as the value, where syndrome differentiation is separated by an English comma.
[0034] c-4) First, disease differentiation and syndrome differentiation are concatenated to generate a new primary key disease differentiation-syndrome differentiation. The values are respectively established as dictionaries of age group, treatment method, representative prescription, male-female ratio and clinical manifestation. In the male-female ratio, a '[1]' is added after each value to serve as the weights list in the subsequent random.choices method for gender generation operation.
[0035] c-5) Age Group - Age Limits: A dictionary is created with age group as the primary key and age limits as two values. The age group divisions are derived from the Internet and can be manually modified. Step d) comprises the following steps: Define the size and type of patient data.
[0036] d-1) Manually define the patient data size data_size and patient and disease information, name it data, and use the data type pd.DataFrame.
[0037] d-2) Data types include the patient's age, age group, gender, clinical manifestations, and self-reports, as well as disease and syndrome differentiation, treatment methods, and representative prescriptions. The size of this information corresponds to data_size , with the age value set to None and all other values set to "Unknown."
[0038] Step e) comprises the following steps: Generate disease and syndrome differentiation information for patients. These two types of information basically serve as the main basis for generating other information.
[0039] e-1) Generate disease identification information: Call the add_disease() method in the createDiease module, use the random pseudo-random method to generate the same number of random disease identification types as data_size in the disease list, and add the disease identification types to data in the form of a list.
[0040] e-2) Generate syndrome information: call the add_syndrome() method in the createSyndrome module, use the generated disease information as a constraint, use the random pseudo-random method in the disease-syndrome dictionary to generate a random syndrome type under the disease classification, and add it to the data in the form of a list.
[0041] Step f) comprises the following steps: Generate patient's gender, age and age group information.
[0042] f-1) Generate gender information: Call the add_gender() method in the createGender module, take the joint primary key of syndrome differentiation and disease differentiation as input, and use the random pseudo-random method to generate the corresponding patient gender in the dictionary of disease differentiation and syndrome differentiation-male-female ratio. Here, the value in "ChineseMed.xlsx" refers to the male-female ratio under this classification, which is reflected in the probability of the patient's gender during the generation process.
[0043] f-2) Generate age information: Call the add_age() method in the createAge module, take the joint primary key of syndrome differentiation and disease differentiation as input, and query the corresponding high-incidence age group in the dictionary of disease differentiation, syndrome differentiation-age group. The high-incidence age group categories in "ChineseMed.xlsx" include none, infants (0 to 1 years old), toddlers (1 to 4 years old), children (5 to 11 years old), teenagers (12 to 18 years old), young people (19 to 35 years old), middle-aged (36 to 59 years old), and elderly (60 to 90 years old). Then, a constrained random number generation function is used to generate the patient's age according to the different high-incidence age groups. The random function is as follows: in are the upper and lower age limits for this age group, The lower limit is Upper limit is Generate a random integer in the range A random integer between 0 and 100 representing the relationship between the patient's age and the high-risk age group. In this method, there is a 50% probability that the patient's age falls within the high-risk age group for the disease, a 35% probability that the patient's age falls within an age group that is one segment shorter or shorter than the high-risk age group, and a 15% probability that the patient's age falls within the 0-90 age group. These parameters can be manually adjusted to better reflect real-world conditions. Finally, the generated age is added to the data.
[0044] f-3) Generate age stage information: Call the add_age_stage() method in the createAge module, take the patient age generated in f-2) as input, query the age stage corresponding to the patient in the age stage-age upper and lower limit dictionary, and add it to data.
[0045] Step g) comprises the following steps: Generate treatments and representative prescriptions for the patient's disease.
[0046] g-1) Generate treatment methods: Call the add_solution() method in the solution module, use the disease identification and syndrome differentiation information as the joint primary key, search for the corresponding treatment method in the disease identification, syndrome differentiation-treatment method dictionary and add it to the data.
[0047] g-2) Generate representative prescription: call the add_prescription() method in the solution module, use the disease identification and syndrome differentiation information as the joint primary key, query the corresponding representative prescription in the disease identification, syndrome differentiation-representative prescription dictionary and add it to the data.
[0048] Step h) comprises the following steps: Generate patient clinical manifestations and convert them into corresponding patient self-reports.
[0049] h-1) Generate clinical manifestations: call the add_symptoms() method in the createSymptom module, use the disease and syndrome information as the joint primary key, and obtain the number of all clinical manifestations contained in the disease by searching the disease, syndrome-clinical manifestation dictionary. , generate a new list of all clinical manifestations, and then select an integer As the number of clinical manifestations of this patient, , select a clinical manifestation according to the probability and add it to the patient data and delete the clinical manifestation and the corresponding selection probability in the list, and then reduce the selection probability of the clinical manifestations adjacent to the selected one. The specific operation method is: given a list of clinical manifestations of a disease is: The corresponding initial probability weight is: in, represents a list of clinical manifestations, List of clinical manifestations Corresponding initial probability weight; randomly select a weight value : in, is the sum of the probability weights of all clinical manifestations, for Any integer between is used to generate this clinical manifestation, and then according to this weight value Select clinical manifestations according to the interval: in, The first in the weight list of clinical manifestations item, Indicates the first item, For Start traversing to integer, if If it is greater than 0, continue to execute the formula ,until Less than or equal to , at this time Add to data, then in Delete, after deletion Denoted as: , Finally, modify the weight list to The adjacent weight of is halved and the modified value is: , Repeat the above steps until the formula is satisfied: , and finally generate clinical performance data in data, express The number of elements in .
[0050] h-2) Convert to patient self-report: Call the add_chief_com() method in the createCC module, use the split method to input each generated clinical manifestation separated by English commas, and compare it with "patient self-report.xlsx" to find the corresponding patient self-report, and then directly use string splicing and add it to data.
[0051] Step i) comprises the following steps: The generated data is converted and integrated for output.
[0052] i-1) The patient's syndrome differentiation type and disease differentiation type are converted into a string by outputting the first item of the list to facilitate reading.
[0053] i-2) Save the generated data information in Excel format and output it with the file name "data.xlsx". Part of the content of "data.xlsx" is shown in Table 3.
[0054] Table 3 Patient data information table Example 2 In this embodiment, a system for generating patient data without data based on a rule base is provided, including a rule base construction module and a data generator: The rule base construction module is used to construct a patient data rule base, which includes a disease information table and a correspondence table between medical terms of clinical manifestations and patient self-descriptions; The data generator includes a data processing module, a patient generation module and a patient information generation module; The data processing module is used to read the data in the disease information table, process various disease information, and generate corresponding lists and data dictionaries; The patient generation module is used to define the patient data scale and patient and disease information; The patient information generation module is used to realize disease generation, age and gender generation, treatment plan, symptom description, and summarize the patient's disease type, syndrome type, age, age group, gender, clinical manifestations, patient self-report, and corresponding treatment methods and representative prescriptions to obtain the final patient data information.
[0055] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art will be able to modify the technical solutions described in the aforementioned embodiments or substitute equivalents for some of the technical features. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.
Claims
1. A method for generating patient data without data based on a rule base, characterized in that: The following steps are involved: S1. Constructing a patient data rule base, the patient data rule base includes a disease information table and a correspondence table between medical terms of clinical manifestations and patient self-reports; S2. Data processing, reading the data in the disease information table, and processing various disease information to generate corresponding lists and data dictionaries; S3. Patient generation, defining the patient data scale, patient and disease information, including the patient's age, age group, gender, clinical manifestations and patient self-report, disease identification, syndrome differentiation, syndrome differentiation, treatment method and representative prescription, and the patient and disease information corresponds to the data scale; S4. Disease generation: generating the disease type that the patient suffers from, and then using the generated disease type as a constraint to generate a random syndrome type under the disease type; S5. Generation of age and gender: using disease identification information and syndrome differentiation information as joint primary keys to generate age information and gender information, and then using the generated age as input to generate the corresponding age group; S6. Treatment plan, using disease identification and syndrome differentiation information as joint primary keys to generate treatment method information and representative prescription information; S7. Symptom description, using disease identification and syndrome differentiation information as joint primary keys to generate random clinical manifestations in disease information, and converting the random clinical manifestations into corresponding patient self-descriptions according to the correspondence between the medical terms of the clinical manifestations and the patient self-descriptions in the correspondence table; S8. Summarize the patient's disease type, syndrome type, age, age group, gender, clinical manifestations, patient self-report, and corresponding treatment methods and representative prescriptions to obtain the final patient data information.
2. The method for generating patient data without data based on a rule base according to claim 1, characterized in that: The step S1 specifically includes: The disease information table is constructed in the following manner: Obtain disease information from medical books and process the disease information to obtain A disease information table of categories, including "disease", "differentiation 1", "differentiation", "clinical manifestation", "treatment method", "representative prescription", "high-incidence age group", and "male-female ratio", and the disease information table is recorded as "ChineseMed.xlsx"; The above-mentioned syndrome differentiation 1 is an intermediate classification between disease differentiation and syndrome differentiation; The high-risk age groups include none, infants: 0 to 1 years old, toddlers: 2 to 4 years old, children: 5 to 11 years old, teenagers: 12 to 18 years old, young adults: 19 to 35 years old, middle-aged: 36 to 59 years old, and elderly: 60 to 90 years old; The process of constructing the correspondence table between the medical terms of the clinical manifestations and the patient's self-report is as follows: Create a new text document named "Clinical Manifestations.txt", copy all clinical manifestations in the "ChineseMed.xlsx" into the document, convert line breaks in the "Clinical Manifestations.txt" document into English commas, separate symptoms with English commas as delimiters, remove duplicate items in the document, and finally perform a sorting operation; Create a new Excel table, record it as "Clinical Manifestations.xlsx", import the clinical manifestations data in the "Clinical Manifestations.txt" document into the Excel table, then create the same number of patient self-reports as the clinical manifestations data in the "Clinical Manifestations.xlsx" table, set the content to "Unknown", and rename the "Clinical Manifestations.xlsx" file to "Patient Self-reports.xlsx"; Using the language model The operation generates a corresponding patient self-description from the clinical manifestation data, copies the patient self-description to the "patient self-description.xlsx" file and corresponds it to the clinical manifestation one by one, modifies the patient self-description through manual verification, and finally obtains a correspondence table between the medical terms of the clinical manifestation and the patient self-description, the correspondence table contains categories, including "clinical manifestations" and "patient self-report".
3. The method for generating patient data without data based on a rule base according to claim 1, characterized in that: In step S2, the data in the disease information table is read, and various disease information is processed to obtain disease differentiation and syndrome differentiation in the form of a list, disease differentiation-syndrome differentiation, clinical manifestations-patient self-report, age-age upper and lower limits in the form of a single primary key type dictionary, and syndrome differentiation, disease differentiation-age, syndrome differentiation, disease differentiation-treatment method, syndrome differentiation, disease differentiation-representative prescription, syndrome differentiation, disease differentiation-male-female ratio, and syndrome differentiation, disease differentiation-clinical manifestations in the form of a double primary key type dictionary, specifically including: S21. Disease and syndrome differentiation information is directly converted into list type; S22. Disease Identification - Syndrome Identification uses disease identification as the primary key and syndrome identification as the value to create a dictionary; S23. Clinical manifestations-patient self-reports. A dictionary is established with clinical manifestations as the primary key and patient self-reports as the value; S24. Age - Age upper and lower limits: Use age group as the primary key, and the upper and lower limits of the age group as two values to create a dictionary; S25. Concatenate disease identification and syndrome identification to generate a new primary key disease identification-syndrome identification, and use age as a value to establish syndrome identification and disease identification-age dictionaries; S26. Splice the disease identification and syndrome identification to generate a new primary key disease identification-syndrome identification, and use the treatment method as the value to establish a syndrome and disease identification-treatment method dictionary; S27. Concatenate disease identification and syndrome identification to generate a new primary key disease identification-syndrome identification, and use the representative prescription as the value to establish a syndrome identification and disease identification-representative prescription dictionary; S28. Combine disease identification and syndrome identification to generate a new primary key disease identification-syndrome identification, and use the male-female ratio as the value to establish a syndrome identification and disease identification-male-female ratio dictionary, where '[1]' should be added after the male-female ratio; S29. Concatenate disease differentiation and syndrome differentiation to generate a new primary key disease differentiation-syndrome differentiation, and use clinical manifestations as values to establish syndrome differentiation and disease differentiation-clinical manifestation dictionaries.
4. The method for generating patient data without data based on a rule base according to claim 1, characterized in that: The step S3 specifically includes: S31. Manually define the patient data size data_size and patient and disease information, named data; S32. The data categories include the patient's age, age group, gender, clinical manifestations and patient self-report, disease differentiation and syndrome classification, as well as treatment methods and representative prescriptions. The size of the data category corresponds to data_size, and the age value is set to "None", and the other values are set to "UnKnown".
5. The method for generating patient data without data based on a rule base according to claim 1, characterized in that: The step S4 specifically includes: S41. Generate disease identification information: Use a random pseudo-random method to generate random disease identification types in the disease information list with the same number as data_size, and add the disease identification types to the data in the form of a list; S42. Generate syndrome differentiation information: Use the generated disease differentiation type as a constraint, use the random pseudo-random method in the disease differentiation-syndrome differentiation dictionary to generate a random syndrome differentiation type under this disease differentiation, and add it to the data in the form of a list.
6. The method for generating patient data without data based on a rule base according to claim 1, characterized in that: The step S5 specifically includes: S51. Generate gender information: take the joint primary key of syndrome differentiation and disease differentiation as input, and use the random pseudo-random method to generate the corresponding patient gender in the dictionary of disease differentiation and syndrome differentiation-male-female ratio; S52. Generate age information: Take the joint primary key of syndrome differentiation and disease differentiation as input, search for the corresponding high-incidence age group in the dictionary of disease differentiation, syndrome differentiation-age, and then use a constrained random number generation function to generate the patient's age according to the different high-incidence age groups input, where the constrained random number generation function is as follows: in, represents the patient's age, a represents the upper limit of the age range, and b represents the lower limit of the age range. Indicates that the lower limit is Upper limit is Generate a random integer in the range is a random integer between 0 and 100, and finally the generated age is added to data; S53. Generate age group information: take the generated patient age as input, generate the age group corresponding to the patient's age by searching the age-age group upper and lower limit dictionary, and add it to data.
7. The method for generating patient data without data based on a rule base according to claim 1, characterized in that: The step S6 specifically includes: S61. Generate treatment methods: Use disease identification and syndrome differentiation information as joint primary keys, generate corresponding treatment methods by searching syndrome differentiation and disease identification-treatment method dictionaries and add them to data; S62. Generate representative prescription: Use disease identification and syndrome differentiation information as joint primary keys, generate corresponding representative prescription by searching syndrome differentiation, disease identification-representative prescription dictionary and add it to data.
8. The method for generating patient data without data based on a rule base according to claim 1, characterized in that: The step S7 specifically includes: S71. Generate clinical manifestations: Use disease identification and syndrome differentiation information as joint primary keys, and obtain the number of all clinical manifestations included in the disease by searching the disease identification, syndrome differentiation-clinical manifestation dictionary. , generate a new list of all clinical manifestations, and then select an integer As the number of clinical manifestations of this patient, , select a clinical manifestation according to the probability and add it to the patient data and delete the clinical manifestation and the corresponding selection probability in the list, and then reduce the selection probability of the clinical manifestations adjacent to the selected one. The specific operation method is: The list of clinical manifestations for a given disease is: The initial probability weight list corresponding to the clinical manifestation list is: in, represents a list of clinical manifestations, List of clinical manifestations The corresponding initial probability weight list, is an integer rounded down, , and then randomly select a weight value : in, is the sum of the probability weights of all clinical manifestations, for Any integer between is used to generate the clinical manifestation, and then according to this weight value Select clinical manifestations according to the interval: in, The first in the weight list of clinical manifestations item, Indicates the first item, For Start traversing to integer, if If it is greater than 0, continue to execute the formula ,until Less than or equal to , at this time Add to data, and then In Delete, after deletion Denoted as: , Finally, modify the weight list to The adjacent weight of is halved, and the modified value is: , Repeat the above steps until the formula is satisfied: , and finally generate clinical performance data in data, express The number of elements in ; S72. Convert to patient self-report: Separate each generated clinical manifestation by English commas, and search for the patient self-report corresponding to each clinical manifestation in "patient self-report.xlsx", directly use string splicing and add to data.
9. The method for generating patient data without data based on a rule base according to claim 1, characterized in that: The step S8 specifically includes: The patient's syndrome differentiation information and disease differentiation information are converted into strings, and the generated data information is output in Excel format, recorded as "data.xlsx".
10. A data-free patient data generation system based on a rule base, characterized in that: Includes rule base building blocks and data generators: The rule base construction module is used to construct a patient data rule base, which includes a disease information table and a correspondence table between medical terms of clinical manifestations and patient self-descriptions; The data generator includes a data processing module, a patient generating module and a patient information generating module; The data processing module is used to read the data in the disease information table, process various disease information, and generate corresponding lists and data dictionaries; The patient generation module is used to define the patient data scale and patient and disease information; The patient information generation module is used to implement the contents of steps S4-S8 described in claim 1.
Citation Information
Patent Citations
Classical prescription medicine intelligent dialectical treatment system based on big data
CN107945869A
Traditional Chinese medicine syndrome differentiation system and method
CN113576413A
Medicine data retrieval method and device based on dialectical mapping rule
CN115186112A
Similar case recommendation method and system
CN115631823A
Follow-up visit scale generation method and system based on artificial intelligence
CN116910172A
