Medical health self-examination and self-report generation system and method based on large language model

By building a medical and health self-inspection and self-report database and using a large language model to generate reports, the time-consuming and error-prone problems of traditional medical and health reports are solved, and rapid, accurate and standardized report generation is achieved.

CN119400340APending Publication Date: 2025-02-07北京争上游科技有限公司
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411476071.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-22
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

The generation of traditional medical and health reports relies on manual sorting and writing, which makes them time-consuming and error-prone, and cannot quickly and accurately organize and format medical and health self-inspection data.

Method used

A medical and health self-inspection report generation system based on a large language model is adopted. By building a medical and health self-inspection and self-report database, the medical and health report prompts are used as input to the large language model, and the search content and report prompts are integrated to generate structured reports.

Benefits of technology

It significantly improves the efficiency of generating medical and health reports, reduces the need for manual editing, ensures consistency of report formats and content, reduces the differences and errors introduced by manual operations, and enhances the standardization and reliability of reports.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119400340A_ABST
    Figure CN119400340A_ABST
Patent Text Reader

Abstract

The invention discloses a medical health self-examination report generation system and method based on a large language model. The system comprises a multi-source data acquisition module, a database autonomous maintenance module and a large language model retrieval module, the multi-source data acquisition module is used for being in communication connection with a medical health self-inspection client and acquiring health self-inspection data; the database self-maintenance module is used for carrying out report type division according to health self-inspection project requirements of the medical health self-inspection client, and arranging the report into unified structured data for storage; the large language model retrieval module is used for acquiring prompt information through a preset report prompt template and generating a corresponding structured query language; the retrieval module is used for performing retrieval in a database according to a structured conversation query language to generate retrieval content; the report generation module is used for generating suggestions and conclusions according to the retrieval content and generating a report in combination with the retrieval content and a prompt template; multi-source data can be received to establish a database, a large language model is utilized to assist a user to realize database retrieval, and a report is automatically generated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and more specifically to a medical and health self-examination report generation system and method based on a large language model. Background Art

[0002] Medical and health care is an important area related to human health and is a service necessary to protect human health. Among them, medical and health care services mainly involve public health services, medical services, etc., which match the level of economic and social development, ensure that all citizens can have fair access, and are also one of the strong pursuits of human beings for healthy life. Therefore, self-inspection and self-reporting of medical and health care is crucial. This method of self-inspection and self-reporting can timely understand the problems existing in medical and health care. For example, in medical institutions, through self-inspection of medical waste treatment and instrument disinfection, it is helpful to reasonably point out the problems, and point out modification suggestions and plans.

[0003] In order to study the above content, the scope of medical and health self-examination is usually diverse, including radiation health, medical beauty institutions, medical institutions, etc. A major problem faced in these areas is the huge amount of data and complex information management needs. The content of self-examination includes health service testing, medical records, equipment testing, imaging data, etc. These self-examination information also need to be manually sorted, analyzed and stored, which consumes a lot of energy and time. Using self-examination data to convert into a report form can facilitate medical and health staff to understand the existing problems more clearly and give reasonable suggestions and conclusions in a timely manner. However, the generation of traditional medical and health reports still relies mainly on manual sorting and writing, which is not only time-consuming, but also the self-examination information is huge, and it is very easy to make mistakes when sorting and writing reports.

[0004] Therefore, how to quickly and accurately organize and format medical and health self-examination data, improve the processing speed and quality of medical and health information, provide standardized medical and health reports, and quickly give reasonable suggestions and conclusions in the reports are problems that technical personnel in this field urgently need to solve. Summary of the invention

[0005] In view of this, the present invention provides a medical and health self-examination report generation system and method based on a large language model. By constructing a medical and health self-examination and self-reporting database, prompts for writing medical and health reports are used as input of the large language model, relevant content is retrieved from the database, and the retrieved content and the medical and health report prompts are integrated to allow the large language model to reorganize the language output suggestions and conclusions, thereby overcoming the time-consuming and labor-intensive problem of manually writing medical and health reports.

[0006] In order to achieve the above object, the present invention adopts the following technical solution:

[0007] A medical and health self-examination report generation system based on a large language model, comprising: a multi-source data acquisition module, a database autonomous maintenance module and a large language model retrieval module;

[0008] The multi-source data acquisition module is used to communicate with the medical and health self-examination client and obtain health self-examination data;

[0009] The database self-maintenance module is used to classify the report types according to the health self-examination project requirements of the medical and health self-examination client, and organize them into unified structured data for storage;

[0010] The large language model retrieval module is used to obtain prompt information through a preset report prompt template and generate a corresponding structured query language; to search in a database according to the structured query language and generate search content; to generate suggestions and conclusions based on the search content, and to generate a report in combination with the search content and the prompt template.

[0011] Preferably, the database autonomous maintenance module includes: a data classification and index generation submodule, a data cleaning submodule and a database model management submodule;

[0012] The data classification and index generation submodule is used to identify data types and generate index items according to corresponding types;

[0013] The data cleaning submodule is used to remove outliers from the data, standardize different data items, and then encode them in a unified encoding format to generate structured data;

[0014] The database model management submodule is used to generate corresponding data tables according to the index items and store and manage the corresponding structured data.

[0015] Preferably, the database autonomous maintenance module further includes a periodic data collection submodule, and the periodic data collection submodule realizes periodic data collection of different medical and health self-examination clients by setting timed event tasks.

[0016] Preferably, the database model management module is also used to generate corresponding specific fields in each of the data tables for storing basic data information, specific test results and compliance status.

[0017] Preferably, the large language model retrieval module includes a key sentence generation submodule, a retrieval submodule and a report generation submodule;

[0018] The key statement generation submodule is used to receive generation instructions and prompt information, and generate structured query language through Text-to-SQL;

[0019] The retrieval submodule is used to call the corresponding data table in the database to search according to the prompt information, and filter out the corresponding health self-examination data as the detection content;

[0020] The report generation submodule is used to generate suggestions and conclusions according to the detection content and the report prompt module and further form a report.

[0021] Preferably, the prompt information includes health self-examination items and specific search conditions.

[0022] Preferably, the large language model retrieval module further includes a prompt template design module, and the prompt template design module is used to construct corresponding prompt templates according to different self-check data types.

[0023] A method for generating a medical and health self-examination report based on a large language model comprises the following steps:

[0024] S1: Receive instructions and confirm the corresponding prompt template;

[0025] S2: Obtaining prompt information through the prompt template;

[0026] S3: using a large language model to generate a corresponding structured query language according to the first prompt information;

[0027] S4: searching in a pre-built database according to the structure query needs to generate corresponding search content;

[0028] S5: Generate suggestions and conclusions based on the search content, and generate a report in combination with the search content and the prompt template.

[0029] Preferably, the step of constructing the database includes:

[0030] Obtain different types of medical and health self-examination data, classify and pre-process them, and convert the classified data into unified structured data;

[0031] Use structured data to build a medical and health self-examination and self-reporting database, and design corresponding table structures according to different types of self-examination data to store different categories of self-examination data;

[0032] The medical and health self-examination data are collected regularly according to the preset period and added to the medical and health self-examination and self-reporting database.

[0033] Preferably, the steps further include: constructing corresponding prompt templates according to different self-check data types.

[0034] It can be seen from the above technical solutions that, compared with the prior art, the present invention discloses a system and method for generating a medical and health self-examination report based on a large language model. Before constructing a medical and health self-examination and self-report relational database, the relationship between various medical and health self-examination data and categories is taken into consideration, and the data is classified using a data dictionary. According to the classification results, the corresponding table structure is designed to store the data, so as to overcome the dispersion problem of medical and health self-examination data. Since the large language model has a powerful text generation capability, a medical and health report prompt is input for it, and a structured report can be quickly generated, which reduces the need for manual editing and significantly improves work efficiency. At the same time, the application of the large language model ensures the consistency of the format and content of the medical and health report, reduces the differences and errors introduced by manual operation, and enhances the standardization and reliability of the report. The present invention generates a medical and health report that is easy to understand and communicate through a large language model. This report can be understood by medical and health professionals from different backgrounds, promotes effective communication and collaboration within the team, and the standardized report format helps the electronic management of data and supports better data operability. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0036] Figure 1 A schematic diagram of a medical and health self-examination report generation system based on a large language model provided by the present invention;

[0037] Figure 2 A schematic diagram of a method for generating a medical and health self-examination report based on a large language model provided by the present invention. DETAILED DESCRIPTION

[0038] 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.

[0039] Example 1

[0040] The embodiment of the present invention discloses a medical and health self-examination report generation system based on a large language model, which is characterized by comprising: a multi-source data acquisition module, a database autonomous maintenance module and a large language model retrieval module.

[0041] The multi-source data acquisition module is used to communicate with the medical and health self-examination client and obtain health self-examination data; the database self-maintenance module is used to classify report types according to the health self-examination project requirements of the medical and health self-examination client, and organize them into unified structured data for storage; the large language model retrieval module is used to obtain prompt information through a preset report prompt template and generate a corresponding structured query language; it is used to search in the database according to the structured query language and generate search content; it is used to generate suggestions and conclusions based on the search content, and generate a report in combination with the search content and the prompt template.

[0042] In this embodiment, the present invention realizes the integration of various types of medical and health self-examination data through a relational database. Such as radiation health, medical beauty institution health, and general medical institution health. For the collected real-time medical and health self-examination information, the self-examination data is cleaned and standardized, and updated to the relational database to prepare a foundation for subsequent data analysis and report generation. Then, the large language model is called twice. The first call of the large language model generates SQL statements according to the instructions and the report prompt template. The large language model is used for text generation and information extraction, and the relevant information is automatically extracted from the relational database according to different medical and health scenarios; the second call of the large language model is to retrieve the content from the database according to the SQL statement, and then the large language model is filled according to the detected content and the blank content in the report prompt template, and the corresponding suggestions and conclusions are generated. Finally, combined with the latest medical and health report prompts, the large language model is allowed to reorganize the language to generate a detailed medical and health report. Therefore, the present invention can quickly generate structured reports through the powerful text generation ability of the large language model and the prompt engineering technology of the large language model, overcoming the problem of easy errors in manually editing reports.

[0043] In this embodiment, in order to realize the generation of SQL statements, it is necessary to train the language data so that the large language model can learn the relationship between language patterns, grammatical structures and contexts during the training process. Specifically, the corresponding SQL statements are written based on the natural language description, and the natural language description is paired with the corresponding SQL statement. In this way, a training set is constructed, and the large language model is trained to generate SQL statements through the training set.

[0044] When performing natural language description, natural language with prompt words can be formed in the form of a report prompt template, so that the large language model can recognize the data structure and accurately generate corresponding SQL statements.

[0045] In order to generate suggestions and conclusions, it is necessary to prepare corresponding training data to train the pre-trained large language model and achieve fine-tuning. The training data should include health data, health standards, and professional suggestions and conclusions. Based on the above information, construct training sample pairs, namely input (prompt) and output (suggestions and conclusions). Input the training samples into the pre-trained large language model, measure the gap between the model prediction and the actual label through the loss function, and optimize it. Save the optimal model after training.

[0046] In order to further implement the above technical solution, the database autonomous maintenance module includes: a data classification and index generation submodule, a data cleaning submodule and a database model management submodule.

[0047] The data classification and index generation submodule is used to identify data types and generate index items according to the corresponding types; the data cleaning submodule is used to remove outliers in the data, standardize different data items, and encode them in a unified coding format to generate structured data; the database model management submodule is used to generate corresponding data tables according to index items and store and manage the corresponding structured data.

[0048] Specifically, when classifying, the self-examination medical and health data is first classified using a data dictionary to determine a clear data index system. For example, 0 is used to represent radiation health, 1 is used to represent medical beauty institutions, and 2 is used to represent medical institutions.

[0049] When performing data cleaning, it is necessary to ensure that the cleaned data is of higher quality and usable. This process specifically includes: (1) removing invalid or abnormal values ​​in the data, such as obviously erroneous records or data points that differ too much or too little from the normal values; (2) implementing unified standardization operations on all data items, including ensuring that date data follows a unified format such as YYYY-MM-DD; and also maintaining the use of unified measurement units and precision for similar data; (3) finally encoding the standardized data using a unified encoding method.

[0050] When storing data, it is necessary to use structured data to design a medical and health self-examination and self-reporting database.

[0051] Use a relational database management system such as MySQL to design corresponding table structures according to different types of self-examination data, and use them to store different types of self-examination data. For example: RadiationHealth represents the radiation health data table; CosmeticMedicalInstitutions represents the medical beauty institution data table; MedicalInstitutions represents the general medical institution data table.

[0052] A medical and health classification table is established to manage the above three sub-tables. Each sub-table should have specific fields. Taking the radiation health data table RadiationHealth as an example, its fields include test time, test location, test items, test content, etc. These fields store basic information about radiation health and record specific test results and compliance related to radiation health.

[0053] The medical and health classification table can store numbers, institution names, and three sub-table names. When generating SQL statements, you can find the corresponding sub-table name based on the institution name, and then find the corresponding field based on the sub-table.

[0054] Furthermore, the database autonomous maintenance module also includes a data periodic collection submodule, which realizes periodic data collection of different medical and health self-examination clients by setting timed event tasks.

[0055] Specifically, designing a timed event task means developing a script that will perform the following functions: regularly collect medical and health self-inspection data, determine the appropriate update frequency such as daily, and then classify the original data, process them separately according to the source and type of the data such as radiation health, medical beauty institutions, medical institutions, etc., perform data preprocessing operations on each type of data, such as removing invalid or erroneous data, unifying date formats, unifying text encodings, and connecting to the database interface to automatically update the self-inspection data to the created relational database.

[0056] In this embodiment, the system can regularly and autonomously complete data collection work to form a database to receive report generation requirements at any time.

[0057] In order to further implement the above technical solution, the large language model retrieval module includes a key sentence generation submodule, a retrieval submodule and a report generation submodule.

[0058] The key statement generation submodule is used to receive generation instructions and prompt information, and generate structured query language through Text-to-SQL; the retrieval submodule is used to call the corresponding data table in the database for retrieval according to the prompt information, and filter out the corresponding health self-inspection data as the test content; the report generation submodule is used to generate suggestions and conclusions based on the test content and the report prompt module and further form a report.

[0059] In this embodiment, after the user selects the corresponding prompt template and enters the prompt information on the client, the large language model generates the corresponding SQL through the Text-to-SQL technology. Since the self-examination and self-reporting report is generated every day, the prompt information such as the test date, test location, test agency or test item needs to be input as specific search conditions and passed to the large language model to generate the corresponding SQL. The large language model retrieves other relevant information in the database based on the SQL to fill in various health self-examination data.

[0060] The SQL is generated as follows:

[0061] SQL = LLM (I, P, T, D, X)

[0062] Where I represents the instruction for generating SQL, P represents the designed prompt template, T represents the detection time, D represents the detection location, X represents the detection organization / detection item, LLM represents the large language model, and SQL represents the generation of the corresponding SQL.

[0063] In order to ensure that the SQL statements are correct and to perform necessary optimizations on them to improve execution efficiency, the generated SQL statements can be manually checked and adjusted to ensure that the SQL statements conform to the actual structure and business rules of the database.

[0064] The search and report generation methods are as follows:

[0065] C1, C2,…,Cn=RetrieveFromDB(SQL)

[0066] M, N=LLM (C1, C2,..., Cn)

[0067] Report=LLM(C1,C2,…,Cn,M,N,P)

[0068] Among them, C1, C2, ···, Cn represent each detection content retrieved from the relational database, M represents the generated suggestion, N represents the generated conclusion, and P represents the designed report prompt template. You can choose to use automated tools such as the ReportLab library in Python to create PDF or other formats of reports.

[0069] Furthermore, the large language model retrieval module also includes a prompt template design module, and the prompt template design module is used to construct corresponding prompt templates according to different self-check data types.

[0070] For example, different report prompt templates are constructed for different types of self-examination data such as radiation hygiene, medical cosmetology institutions, medical institutions, etc. Each report prompt template includes a data query request and a report structure guide.

[0071] The prompt template for radiation health is: Report name: Radiation health {test item} report; Test time: {test time}; Test location: {test location}; Test item: {test item}; Test content and standards: {test content and standards}.

[0072] The reminder template for hygiene in medical beauty institutions is: Report name: Medical beauty {testing agency} hygiene report; Testing time: {testing time}; Testing location: {testing location}; Testing agency: {testing agency}; Facilities and environmental hygiene: {facilities and environmental hygiene}; Employee hygiene and training: {employee hygiene and training}; Disinfection and sterilization procedures: {disinfection and sterilization procedures}; Medical waste treatment: {medical waste treatment}.

[0073] The prompt template for medical institution hygiene is: Report name: Medical {testing agency} hygiene report; Testing time: {testing time}; Testing location: {testing location}; Testing agency: {testing agency}; Water quality testing: {water quality testing}; Air quality testing: {air quality testing}; Medical waste treatment testing: {medical waste treatment testing}; Food hygiene testing: {food hygiene testing}; Instrument disinfection testing: {instrument disinfection testing}; Employee hygiene and training: {employee hygiene and training}.

[0074] Example 2

[0075] like Figure 2 Based on the same inventive concept, the embodiment of the present invention discloses a method for generating a medical and health self-examination report based on a large language model, comprising the following steps:

[0076] S1: Receive instructions and confirm the corresponding prompt template;

[0077] S2: Obtaining prompt information through the prompt template;

[0078] S3: using a large language model to generate a corresponding structured query language according to the first prompt information;

[0079] S4: searching in a pre-built database according to the structure query needs to generate corresponding search content;

[0080] S5: Generate suggestions and conclusions based on the search content, and generate a report in combination with the search content and the prompt template.

[0081] In order to further implement the above technical solution, the steps of building the database include:

[0082] Obtain different types of medical and health self-examination data, classify and pre-process them, and convert the classified data into unified structured data;

[0083] Use structured data to build a medical and health self-examination and self-reporting database, and design corresponding table structures according to different types of self-examination data to store different categories of self-examination data;

[0084] The medical and health self-examination data are collected regularly according to the preset period and added to the medical and health self-examination and self-reporting database.

[0085] In order to further implement the above technical solution, the steps also include: constructing corresponding prompt templates according to different self-inspection data types.

[0086] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0087] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A medical and health self-examination report generation system based on a large language model, characterized in that: include: Multi-source data collection module, database autonomous maintenance module and large language model retrieval module; The multi-source data acquisition module is used to communicate with the medical and health self-examination client and obtain health self-examination data; The database self-maintenance module is used to classify the report types according to the health self-examination project requirements of the medical and health self-examination client, and organize them into unified structured data for storage; The large language model retrieval module is used to obtain prompt information through a preset report prompt template and generate a corresponding structured query language; and is used to search in a database according to the structured query language to generate search content; Used to generate suggestions and conclusions based on the search content and the report prompt template; Generate a self-examination report based on the search content, report prompt template, suggestions and conclusions.

2. According to the medical and health self-examination report generation system based on a large language model according to claim 1, it is characterized in that: The database autonomous maintenance module includes: a data classification and index generation submodule, a data cleaning submodule and a database model management submodule; The data classification and index generation submodule is used to identify data types and generate index items according to corresponding types; The data cleaning submodule is used to remove outliers from the data, standardize different data items, and then encode them in a unified encoding format to generate structured data; The database model management submodule is used to generate corresponding data tables according to the index items and store and manage the corresponding structured data.

3. A medical and health self-examination report generation system based on a large language model according to claim 2, characterized in that: The database autonomous maintenance module also includes a data periodic collection submodule, and the periodic collection submodule realizes periodic data collection of different medical and health self-examination clients by setting timed event tasks.

4. A medical and health self-examination report generation system based on a large language model according to claim 2, characterized in that: The database model management module is also used to generate corresponding specific fields in each of the data tables for storing basic data information, specific test results and compliance status.

5. According to the large language model-based medical and health self-examination report generation system of claim 1, it is characterized in that: The large language model retrieval module includes a key sentence generation submodule, a retrieval submodule and a report generation submodule; The key statement generation submodule is used to receive generation instructions and prompt information, and generate structured query language through Text-to-SQL; The retrieval submodule is used to call the corresponding data table in the database to search according to the prompt information, and filter out the corresponding health self-examination data as the detection content; The report generation submodule is used to generate suggestions and conclusions according to the detection content and the report prompt module and further form a report.

6. A medical and health self-examination report generation system based on a large language model according to claim 5, characterized in that: The prompt information includes health self-examination items and specific search conditions.

7. A medical and health self-examination report generation system based on a large language model according to claim 5, characterized in that: The large language model retrieval module also includes a prompt template design module, and the prompt template design module is used to construct corresponding prompt templates according to different self-check data types.

8. A method for generating a medical and health self-examination report based on a large language model, characterized in that: The following steps are involved: S1: Receive instructions and confirm the corresponding prompt template; S2: Obtaining prompt information through the prompt template; S3: using a large language model to generate a corresponding structured query language according to the first prompt information; S4: searching in a pre-built database according to the structure query needs to generate corresponding search content; S5: Generate suggestions and conclusions based on the search content, and generate a report in combination with the search content and the prompt template.

9. A method for generating a medical and health self-examination report based on a large language model according to claim 8, characterized in that: The steps of constructing the database include: Obtain different types of medical and health self-examination data, classify and pre-process them, and convert the classified data into unified structured data; Use structured data to build a medical and health self-examination and self-reporting database, and design corresponding table structures according to different types of self-examination data to store different types of self-examination data; The medical and health self-examination data are collected regularly according to the preset period and added to the medical and health self-examination and self-reporting database.

10. The method for generating a medical and health self-examination report based on a large language model according to claim 8, characterized in that: The steps also include: constructing corresponding prompt templates according to different self-check data types.

Citation Information

Cited By

  • Database analysis report automatic generation method based on large language model agent

    CN121070964A