A method for generating patient data without data based on rule base
By constructing a rule base and using a random generation algorithm, the problem of manual data collection in the existing technology is solved, which is time-consuming and labor-intensive. The generated patient data is reliable and fast, adaptable to different needs, and does not involve privacy issues.
Patent Information
- Application Number
- CN202411328260.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2044-09-24
AI Technical Summary
The existing medical consultation model requires a large amount of manual data collection, resulting in wasted time and human resources. At the same time, the data quality is not high, the information is not comprehensive enough, and there is a risk of data privacy leakage.
Using a data-free patient data generation method based on a rule base, a random generation algorithm is used to generate patient data, including age, gender, clinical manifestations, patient self-reports and treatment, by constructing a correspondence table between disease information tables and medical terms of clinical manifestations and patient self-reports. plan.
It greatly saves manpower and material resources, the generated data is reliable and fast, adapts to different data volume requirements, has good scalability, and does not involve patient privacy issues.
Smart Images

Figure CN118866221B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of synthetic data of traditional Chinese medicine consultation, and in particular relates to a method for generating patient data without data based on a rule base. Background Art
[0002] The medical consultation model is a technology based on a large amount of medical consultation data. It uses deep learning methods to continuously learn from medical consultation data to enhance the model's consultation capabilities, in the hope of realizing functions such as intelligent consultation and intelligent triage.
[0003] Large models require not only a large amount of computing resources, but also a large amount of data resources. The current data collection method is mostly to go into the hospital for manual collection, which not only takes a lot of time and manpower; it also faces the problem of low data quality, which usually requires further processing; the information reflected is not comprehensive enough, for example, doctors may not usually ask patients about their gender, age, and location, but these factors may also have a certain impact on the results of the consultation; at the same time, the collection of patient information also faces the problem of data privacy leakage.
[0004] Another way is to use data enhancement technology. For example, in the field of natural language processing, adversarial neural networks are often used to enhance medical consultation data. This method requires the support of real data, so it is still difficult to obtain rare data types; the self-description of patients' conditions generated by adversarial neural networks is often more structured and professional than real data, which may be due to the learning ability of adversarial neural networks, but using this "high-quality" generated data will affect the large model's understanding of real data.
[0005] Therefore, in response to these problems, 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:
[0008] 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;
[0009] S2. Data processing, reading the data in the disease information table, and processing various disease information to generate corresponding lists and data dictionaries;
[0010] S3. Patient generation, defining the patient data scale and 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;
[0011] 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;
[0012] 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;
[0013] S6. Treatment plan, using disease identification and syndrome differentiation information as joint primary keys to generate treatment method information and representative prescription information;
[0014] 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;
[0015] 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.
[0016] Furthermore, the disease information table in step S1 is constructed in the following manner:
[0017] Obtain disease information from medical books and process the disease information to obtain The disease information table includes "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 differentiation 1 is an intermediate classification between disease differentiation and syndrome differentiation; the high-incidence age group includes 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, youth: 19 to 35 years old, middle-aged: 36 to 59 years old, and elderly: 60 to 90 years old;
[0018] Furthermore, the construction process of the correspondence table between the medical terms of clinical manifestations and the patient's self-report is specifically as follows: create a new text document, recorded 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, recorded 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-reports.xlsx"; adopt the language large model The operation generates a corresponding patient self-description from the clinical manifestation data, copies the patient self-description into 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”.
[0019] Further, 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 with a single primary key type dictionary data structure, 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 with a double primary key type dictionary data structure, specifically including: directly converting disease differentiation and syndrome differentiation information 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 to establish a dictionary The key is used, and the upper and lower limits of the age range are used as two values to establish a dictionary; disease identification and syndrome differentiation are concatenated to generate a new primary key disease identification-syndrome differentiation, and age is used as the value to establish syndrome differentiation and disease identification-age dictionaries; disease identification and syndrome differentiation are concatenated to generate a new primary key disease identification-syndrome differentiation, and treatment methods are used as the value to establish syndrome differentiation and disease identification-treatment methods dictionaries; disease identification and syndrome differentiation are concatenated to generate a new primary key disease identification-syndrome differentiation, and representative prescriptions are used as the value to establish syndrome differentiation and disease identification-representative prescription dictionaries; disease identification and syndrome differentiation are concatenated to generate a new primary key disease identification-syndrome differentiation, and the male-female ratio is used as the value to establish syndrome differentiation and disease identification-male-female ratio dictionaries, where '[1]' should be added after the male-female ratio; disease identification and syndrome differentiation are concatenated to generate a new primary key disease identification-syndrome differentiation, and clinical manifestations are used as the value to establish syndrome differentiation and disease identification-clinical manifestations dictionaries.
[0020] Furthermore, the 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 identification 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".
[0021] 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 in the disease identification-syndrome differentiation dictionary to generate random syndrome differentiation types under this type of disease identification, and adding them to data in the form of a list.
[0022] Further, the step S5 specifically includes: generating gender information: taking the joint primary key of syndrome differentiation and disease differentiation as input, and using the 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 joint primary key of syndrome differentiation and disease differentiation as input, and searching 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:
[0023]
[0024] Among them, a represents the upper limit of the age group, and 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.
[0025] Furthermore, the 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.
[0026] 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: The clinical manifestation list of a given disease is:
[0027]
[0028] The corresponding initial probability weight is:
[0029]
[0030] in, represents a list of clinical manifestations, List of clinical manifestations Corresponding initial probability weight; randomly select a weight value :
[0031]
[0032]
[0033] 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:
[0034]
[0035] 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:
[0036] ,
[0037] Finally, modify the weight list to The adjacent weight of is halved, and the modified value is:
[0038] ,
[0039] Repeat the above steps until the formula is satisfied: , and finally generate clinical performance data in data, express The number of elements in .
[0040] 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".
[0041] 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:
[0042] 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;
[0043] The data generator includes a data processing module, a patient generating module and a patient information generating module;
[0044] 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;
[0045] The patient generation module is used to define the patient data scale and patient and disease information;
[0046] The patient information generation module is used to implement the contents of steps S4-S8 of the method described in the first aspect.
[0047] The advantages of the present invention are:
[0048] The present invention does not require manual data collection, which greatly saves manpower and material resources. Each patient data is completely corresponding to 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, it is relatively easy to add and modify disease information, 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
[0049] 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.
[0050] Figure 1 The figure is a flow chart of the method of the present invention. DETAILED DESCRIPTION
[0051] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0052] Example 1
[0053] 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:
[0054] Step a) comprises the following steps:
[0055] A common disease information table is established. In the present invention, "Chinese Internal Medicine" (New Century Fourth Edition) (Editors-in-Chief Zhang Boli and Wu Mianhua) is taken as an example. This table is the main part of the rule base.
[0056] a-1) Select the parts of the second part of the book "Chinese Internal 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 disease classification, and use the "Differential diagnosis and treatment" part 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-report later, and the patients themselves are unlikely to pay attention to their own tongue and pulse, the descriptions of tongue and pulse in the clinical manifestations were removed during the information entry process.
[0057] a-2) A total of 62 types of common disease differentiation information and 361 types of detailed syndrome differentiation information are recorded. 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 groups, and male-female ratio. The high-incidence age groups and male-female ratio all use the default values of "None" and '1' due to the lack of statistical information.
[0058] a-3) Use Excel tools to remove all spaces and semicolons, and replace all Chinese commas with English ones to facilitate subsequent data operations.
[0059] a-4) Save it in Excel format and name it "ChineseMed.xlsx". Some of the contents are shown in Table 1.
[0060] Table 1 Disease information table
[0061]
[0062] Step b) comprises the following steps:
[0063] 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.
[0064] b-1) Create a new text document and name it "Clinical Manifestations.txt", copy all clinical manifestations in "ChineseMed.xlsx" to the "Clinical Manifestations.txt" document, run the ALLSymptom module in the code to convert the line breaks in it into English commas, and split the symptoms with English commas as delimiters, then remove the duplicates, and finally perform the sorting operation.
[0065] b-2) Create a new Excel sheet and name it "Clinical Manifestations.xlsx", and import the 1973 clinical manifestations data processed in b-1), then create the same number of patient self-reports, temporarily set the content to "Unknown", and rename the "Clinical Manifestations.xlsx" file to "Patient Self-report.xlsx" to prevent accidental code operation and file overwriting. Part of the content of "Patient Self-report.xlsx" is shown in Table 2.
[0066] Table 2 Correspondence between medical terms for clinical manifestations and patients’ self-reports
[0067]
[0068] b-3) Different clinical manifestations are given to the language model in groups of 30. The language model can be Zhinao, Wenxinyiyan, Doubao, Tongyi Qianwen, etc. We use Wenxinyiyan (Baidu) (https: / / yiyan.baidu.com / ) to generate the corresponding patient descriptions, with requirements such as "Here are 30 clinical manifestations, please convert them into corresponding patient descriptions, the number must be consistent and the language must be refined". At the same time, we must constantly pay attention to whether the quality and quantity of the generated data meet the requirements, and regenerate or manually modify the output that does not meet the requirements.
[0069] b-4) Copy the patient self-report generated by the large model to the "patient self-report.xlsx" file and match it to the clinical manifestations one by one, then remove the serial number when it was generated. Finally, perform manual proofreading, check for unreasonable descriptions and make manual modifications.
[0070] Step c) comprises the following steps:
[0071] 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.
[0072] c-1) Disease and syndrome differentiation information is directly converted into list type.
[0073] 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.
[0074] c-3) Disease Identification - Syndrome Identification: A dictionary is created with disease identification as the primary key and syndrome identification as the value, where syndrome identification is separated by English commas.
[0075] c-4) First, disease identification and syndrome differentiation are concatenated to generate a new primary key disease identification-syndrome differentiation. The values are respectively used to establish dictionaries for 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.
[0076] c-5) Age group - age upper and lower limits. The age group is the primary key, and the age upper and lower limits are two values to create a dictionary. The age group division comes from the Internet and can be manually modified;
[0077] Step d) comprises the following steps:
[0078] Define the size and type of patient data.
[0079] 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.
[0080] d-2) Data types include the patient's age, age group, gender, clinical manifestations and patient self-report, disease identification and syndrome classification, treatment methods and representative prescriptions. The scale of the above information corresponds to data_size, and the value of age is set to None, and the other values are set to "UnKnown".
[0081] Step e) comprises the following steps:
[0082] Generate disease diagnosis and syndrome differentiation information for patients. These two types of information basically serve as the main basis for generating other information.
[0083] 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.
[0084] 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 data in the form of a list.
[0085] Step f) comprises the following steps:
[0086] Generate the patient's gender, age, and age group information.
[0087] 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 generate the corresponding patient gender through the random pseudo-random method in the dictionary of disease differentiation and syndrome differentiation-male-female ratio. The value in "ChineseMed.xlsx" here refers to the male-female ratio under this classification, which is reflected in the probability of the patient's gender in the generation process.
[0088] 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), youth (19 to 35 years old), middle-aged (36 to 59 years old) and elderly (60 to 90 years old). Then use a constrained random number generation function to generate the patient's age according to the different high-incidence age groups. The random function is as follows:
[0089]
[0090] 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 is a random integer between 0 and 100, used to represent the relationship between the patient's age and the high-risk age group. In the present invention, the patient's age has a 50% probability of being in the high-risk age group of the disease, a 35% probability of being in the age group that is reduced and increased by one high-risk age group, and a 15% probability of being in the age group from 0 to 90. These parameters can be adjusted manually to be closer to the actual situation. Finally, the generated age is added to data.
[0091] f-3) Generate age group information: call the add_age_stage() method in the createAge module, take the patient age generated in f-2) as input, query the age group corresponding to the patient in the age group-age upper and lower limit dictionary, and add it to data.
[0092] Step g) comprises the following steps:
[0093] Generate treatments and representative prescriptions for the patient's illness.
[0094] 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, query the corresponding treatment method in the disease identification, syndrome differentiation-treatment method dictionary and add it to the data.
[0095] g-2) Generate representative prescription: call the add_prescription() method in the solution module, use the disease identification and syndrome identification information as the joint primary key, query the corresponding representative prescription in the disease identification, syndrome identification-representative prescription dictionary and add it to the data.
[0096] Step h) comprises the following steps:
[0097] Generate patient clinical manifestations and convert them into corresponding patient self-reports.
[0098] h-1) Generate clinical manifestations: call the add_symptoms() method in the createSymptom module, use the disease identification and syndrome differentiation information as the joint primary key, and obtain 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: The clinical manifestation list of a given disease is:
[0099]
[0100] The corresponding initial probability weight is:
[0101]
[0102] in, represents a list of clinical manifestations, List of clinical manifestations Corresponding initial probability weight; randomly select a weight value :
[0103]
[0104]
[0105] 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:
[0106]
[0107] 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:
[0108] ,
[0109] Finally, modify the weight list to The adjacent weight of is halved, and the modified value is:
[0110] ,
[0111] Repeat the above steps until the formula is satisfied: , and finally generate clinical performance data in data, express The number of elements in .
[0112] 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 "patient self-report.xlsx" to find the corresponding patient self-report, and then directly use string splicing and add it to data.
[0113] Step i) comprises the following steps:
[0114] The generated data is converted and integrated for output.
[0115] 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 the reader's reading.
[0116] i-2) Save the generated data information in Excel format and output it with the file name "data.xlsx". Part of the content in "data.xlsx" is shown in Table 3.
[0117] Table 3 Patient data information table
[0118]
[0119] Example 2
[0120] 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:
[0121] 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;
[0122] The data generator includes a data processing module, a patient generating module and a patient information generating module;
[0123] 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;
[0124] The patient generation module is used to define the patient data scale and patient and disease information;
[0125] 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.
[0126] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is 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 can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope 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; The specific method of constructing the disease information table is: obtaining disease information from medical books, and processing the disease information to obtain The disease information table has three 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 differentiation 1 is an intermediate classification between disease differentiation and differentiation; the high-incidence age group includes 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, youth: 19 to 35 years old, middle-aged: 36 to 59 years old, and elderly: 60 to 90 years old; 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 segment 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-reports.xlsx"; adopt the language macro 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"; S2. Data processing, reading the data in the disease information table, and processing various disease information to generate corresponding lists and data dictionaries; The data in the disease information table is read, 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 with a single primary key type dictionary data structure, 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 with a double primary key type dictionary data structure, specifically including: S21. Disease differentiation and syndrome differentiation information is directly converted into a list type; S22. Disease differentiation-syndrome differentiation uses disease differentiation as the primary key and syndrome differentiation as the value to establish a dictionary; S23. Clinical manifestations-patient self-report uses clinical manifestations as the primary key and patient self-report as the value to establish a dictionary; S24. Age-age upper and lower limits uses age group as the primary key, age group upper and lower limits and The lower limit of the age range is used as two values to establish a dictionary; S25. Disease identification and syndrome differentiation are concatenated to generate a new primary key disease identification-syndrome differentiation, and age is used as the value to establish syndrome differentiation and disease identification-age dictionaries; S26. Disease identification and syndrome differentiation are concatenated to generate a new primary key disease identification-syndrome differentiation, and treatment methods are used as the value to establish syndrome differentiation and disease identification-treatment methods dictionaries; S27. Disease identification and syndrome differentiation are concatenated to generate a new primary key disease identification-syndrome differentiation, and representative prescriptions are used as the value to establish syndrome differentiation and disease identification-representative prescription dictionaries; S28. Disease identification and syndrome differentiation are concatenated to generate a new primary key disease identification-syndrome differentiation, and the male-female ratio is used as the value to establish syndrome differentiation and disease identification-male-female ratio dictionaries, where '[1]' should be added after the male-female ratio; S29. Disease identification and syndrome differentiation are concatenated to generate a new primary key disease identification-syndrome differentiation, and clinical manifestations are used as the value to establish syndrome differentiation and disease identification-clinical manifestations 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; 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 identification and syndrome classification, treatment methods and representative prescriptions. The size of the data category corresponds to data_size, and the value of age is set to "None", and the other values are set to "UnKnown"; 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; S41. Generate disease identification information: Use a random pseudo-random method to generate random disease identification types with the same number as data_size in the disease information list, 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 the disease differentiation, and add it to the data in the form of a list; 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; 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; S6. Treatment plan, using disease identification and syndrome differentiation information as joint primary keys to generate treatment method information and representative prescription information; 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 key, generate corresponding representative prescription by searching syndrome differentiation, disease identification-representative prescription dictionary and add it to data; 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; 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 clinical manifestation generated by English commas, and search for the patient self-report corresponding to each clinical manifestation in "patient self-report.xlsx", directly concatenate them using strings and add them to data; 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. A 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".
3. 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
Medicine data retrieval method and device based on dialectical mapping rule
CN115186112A
Determining patient condition from unstructured text data
US10770184B1