Method, device and system for caching medical information data based on SQLite

By using an SQLite-based medical information data caching method, the problem of limited caching methods in hospital information systems was solved. This method enables on-demand, rapid caching and updating of medical data, improving data reusability and efficiency, and ensuring system stability and user experience.

CN116303594BActive Publication Date: 2026-05-08GUANGZHOU HOPE BRIDGE COMPUTER TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGZHOU HOPE BRIDGE COMPUTER TECH CO LTD
Filing Date
2023-02-16
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

The hospital information system uses only one method to cache medical data, which cannot quickly cache and analyze comprehensive data as needed, resulting in a decrease in the reuse rate and efficiency of medical data.

Method used

A medical information data caching method based on SQLite is adopted. The account login status is detected by the local client, and the main program is started to make the cache information index of the basic SQLite cache database correspond to that of the server database. The cached data is downloaded and updated as needed, including technical means such as data consistency judgment, target identification information determination, and paginated download.

Benefits of technology

It improves the reusability and efficiency of medical data, ensures rapid data use and reuse, reduces network traffic, and enhances system fault tolerance and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116303594B_ABST
    Figure CN116303594B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of data caching, and discloses a medical information data caching method, device and system based on SQLite. The application stores all medical information data in a server database, and a local client is responsible for downloading and caching corresponding local SQLite cache files on demand and incrementally updating the local SQLite cache files, wherein the method comprises the following steps: when the login state of a target medical account is detected by the local client to be in an online state, a main program is started to make the cached data in a basic SQLite cache database correspond to the cached information index of the server database; the server database stores all medical information data; after the main program is started, a data acquisition instruction of a target client subsystem corresponding to the target medical account is received, required cached data is downloaded from the server database, and the basic SQLite cache database and the corresponding subsystem SQLite cache database are updated. The application can realize lightweight caching and on-demand caching, and improves the reusability and application efficiency of medical data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data caching technology, and in particular to a method, apparatus and system for caching medical information data based on SQLite. Background Technology

[0002] Medical information systems are an important component of modern hospital construction, playing a vital role in patient treatment and diagnosis. These systems store a wide range of information, including patient medical records, examination results, medication and treatment details, which collectively constitute a vast amount of medical data.

[0003] As the scale of healthcare expands, the amount of medical data increases, and the number of medical functional modules that need to be added to hospital information systems also gradually increases. Currently, hospital information systems have limited methods for caching medical data and cannot quickly cache and analyze comprehensive data on demand. The increase in medical data and functional modules reduces the operational efficiency of hospital information systems, decreases the reuse rate and efficiency of medical data, and hinders medical staff from using medical information systems to complete related tasks. Summary of the Invention

[0004] This invention provides a method, device, and system for caching medical information data based on SQLite, which solves the technical problems of current hospital information systems having limited caching methods for medical data and being unable to quickly cache and analyze comprehensive data on demand. As the amount of medical data and medical function modules increases, the operating efficiency of the hospital information system decreases, resulting in a reduction in the reuse rate and efficiency of medical data.

[0005] The first aspect of this invention provides a method for caching medical information data based on SQLite, applied to a local client. The local client's cache database is divided into a basic SQLite cache database and a subsystem SQLite cache database. The method includes:

[0006] When the target medical account is detected to be logged in online, the main program is started to make the cached data in the basic SQLite cache database correspond to the cached information index in the server database; the server database stores all medical information data.

[0007] After the main program starts, it receives a data acquisition instruction from the target client subsystem corresponding to the target medical account; the data acquisition instruction is compatible with the permissions of the target medical account.

[0008] Search the basic SQLite cache database for the first target SQLite cache data corresponding to the data retrieval instruction to obtain the search result;

[0009] When the search result is that the first target SQLite cache data is found, the update size and update time of the first target SQLite cache data are used to determine whether the first target SQLite cache data is consistent with the corresponding SQLite cache data in the server database, and a data consistency judgment result is obtained.

[0010] When the data consistency judgment result is that the data is inconsistent, the target identifier information of the SQLite cached data to be downloaded is determined based on the inconsistent part of the data;

[0011] Download the corresponding SQLite cache data from the server database according to the target identification information, and obtain the downloaded SQLite cache data;

[0012] The first target SQLite cache data is updated based on the downloaded SQLite cache data to obtain the second target SQLite cache data;

[0013] The base SQLite cache database is updated based on the second target SQLite cache data, and the subsystem SQLite cache database corresponding to the target client subsystem is updated based on the second target SQLite cache data.

[0014] According to one embodiment of the first aspect of the present invention, the step of starting the main program to make the cached data in the underlying SQLite cache database correspond to the cache information index of the server database includes:

[0015] Obtain the cache information index of the server-side database; the server-side database stores all medical information data;

[0016] The local cache is compared with the cache information index to determine whether data updates are needed, and a data update determination result is obtained.

[0017] When the data update determination result indicates that a data update is required, a data update request is initiated to the server; the data update request includes the data index that needs to be updated.

[0018] Receive the target cache data sent by the server that corresponds to the data index to be updated;

[0019] The target cache data is written to the underlying SQLite cache database; the completion of writing the target cache data indicates that the main program has started successfully.

[0020] According to one achievable method of the first aspect of the present invention, the step of downloading corresponding SQLite cache data from the server database based on the target identification information to obtain the downloaded SQLite cache data includes:

[0021] Determine the target data interface on the server based on the type of SQLite cached data that needs to be downloaded;

[0022] Download the required SQLite cache data through the corresponding target data interface based on the target identification information.

[0023] According to one achievable method of the first aspect of the present invention, the target data interface includes a HIS (Hospital Information System) for acquiring medical diagnosis and prescription information, an EMR (Electronic Medical Record) module for acquiring electronic medical record information, and a DRG (Diagnosis Related Groups) diagnostic module for acquiring diagnostic information.

[0024] The HIS system includes a test application module for obtaining test information, a test application module for obtaining examination information, and a prescription module for obtaining drug diagnosis and treatment information.

[0025] According to one achievable method of the first aspect of the present invention, the step of downloading the required SQLite cache data through the corresponding target data interface based on the target identifier information includes:

[0026] Determine whether pagination is needed based on the size of the SQLite cached data to be downloaded;

[0027] When paginated download is required, the data is downloaded in a paginated manner, and the required SQLite cached data is downloaded from the server database through the corresponding target data interface according to the target identifier information.

[0028] According to one achievable method of the first aspect of the present invention, the data acquisition instruction is generated when logging into the target client subsystem or when a target business operation instruction is detected on the target client subsystem.

[0029] According to one achievable embodiment of the first aspect of the invention, the method further includes:

[0030] When downloading the corresponding SQLite cached data from the server database based on the target identifier information fails, the failure result is recorded and uploaded to the server.

[0031] According to one achievable embodiment of the first aspect of the invention, the method further includes:

[0032] When the search result indicates that the first target SQLite cache data cannot be found, the corresponding SQLite cache data is downloaded in full from the server database according to the data acquisition instruction, and the basic SQLite cache database and the subsystem SQLite cache database corresponding to the target client subsystem are updated accordingly.

[0033] A second aspect of the present invention provides a medical information data caching device based on SQLite, comprising:

[0034] A memory for storing instructions; wherein the instructions are used to implement the SQLite-based medical information data caching method as described in any of the above embodiments;

[0035] A processor for executing instructions in the memory.

[0036] The third aspect of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the SQLite-based medical information data caching method as described in any of the above embodiments.

[0037] A fourth aspect of the present invention provides a medical information data caching device based on SQLite, applied to a local client, wherein the local client's caching database is divided into a basic SQLite caching database and a subsystem SQLite caching database, and the medical information data caching device includes:

[0038] The startup module is used to start the main program when the login status of the target medical account is detected to be online, so that the cached data in the basic SQLite cache database corresponds with the cached information index of the server database; the server database stores all medical information data.

[0039] The receiving module is configured to receive a data acquisition instruction from the target client subsystem corresponding to the target medical account after the main program has started; the data acquisition instruction is compatible with the permissions of the target medical account.

[0040] The lookup module is used to search for the first target SQLite cache data corresponding to the data retrieval instruction in the basic SQLite cache database and obtain the lookup result;

[0041] The judgment module is used to determine whether the first target SQLite cache data is consistent with the corresponding SQLite cache data in the server database based on the update size and update time of the first target SQLite cache data when the search result is that the first target SQLite cache data is found, and to obtain the data consistency judgment result.

[0042] The determination module is used to determine the target identifier information of the SQLite cached data to be downloaded based on the inconsistent part of the data when the data consistency judgment result is data inconsistency;

[0043] The first download module is used to download the corresponding SQLite cache data from the server database according to the target identification information, and obtain the downloaded SQLite cache data;

[0044] The first update module is used to update the first target SQLite cache data according to the downloaded SQLite cache data to obtain the second target SQLite cache data;

[0045] The second update module is used to update the basic SQLite cache database according to the second target SQLite cache data, and to update the subsystem SQLite cache database corresponding to the target client subsystem according to the second target SQLite cache data.

[0046] According to one embodiment of the fourth aspect of the present invention, the startup module comprises:

[0047] The acquisition unit is used to acquire the cache information index of the server database; the server database stores all medical information data.

[0048] The comparison unit is used to compare the local cache with the cache information index to determine whether data update is needed and to obtain a data update judgment result.

[0049] The initiating unit is used to initiate a data update request to the server when the data update determination result indicates that a data update is required; the data update request includes the data index that needs to be updated.

[0050] The receiving unit is used to receive the target cache data sent by the server that corresponds to the data index to be updated;

[0051] The writing unit is used to write the target cache data into the underlying SQLite cache database; the completion of writing the target cache data indicates that the main program has started successfully.

[0052] According to one achievable embodiment of the fourth aspect of the present invention, the first download module includes:

[0053] The determination unit is used to determine the target data interface on the server based on the type of SQLite cached data to be downloaded.

[0054] The download unit is used to download the required SQLite cache data through the corresponding target data interface according to the target identification information.

[0055] According to one achievable method of the fourth aspect of the present invention, the target data interface includes a HIS system for acquiring medical diagnosis and prescription information, an EMR module for acquiring electronic medical record information, and a DRG diagnostic module for acquiring diagnostic information;

[0056] The HIS system includes a test application module for obtaining test information, a test application module for obtaining examination information, and a prescription module for obtaining drug diagnosis and treatment information.

[0057] According to one embodiment of the fourth aspect of the present invention, the downloading unit comprises:

[0058] The `determine` sub-unit is used to determine whether paginated downloading is necessary based on the size of the SQLite cached data to be downloaded.

[0059] The download subunit is used to download the required SQLite cached data from the server database in a paginated manner when paginated download is required, based on the target identifier information and through the corresponding target data interface.

[0060] According to one achievable method of the fourth aspect of the present invention, the data acquisition instruction is generated when logging into the target client subsystem or when a target business operation instruction is detected on the target client subsystem.

[0061] According to one embodiment of the fourth aspect of the invention, the apparatus further includes:

[0062] The download failure handling module is used to record the failure result and upload it to the server when the download of the corresponding SQLite cached data from the server database fails based on the target identification information.

[0063] According to one embodiment of the fourth aspect of the invention, the apparatus further includes:

[0064] The second download module is used to download the corresponding SQLite cache data from the server database in full according to the data acquisition instruction when the search result is that the first target SQLite cache data cannot be found, and update the basic SQLite cache database and the subsystem SQLite cache database corresponding to the target client subsystem accordingly.

[0065] The fifth aspect of the present invention provides a medical information data caching system based on SQLite, including a local client and a server. The cache database of the local client is divided into a basic SQLite cache database and a subsystem SQLite cache database, and the server is provided with a server database.

[0066] The local client includes a medical information data caching device based on SQLite, as described in any of the above-mentioned methods.

[0067] As can be seen from the above technical solutions, the present invention has the following advantages:

[0068] This invention uses a server-side database to store all medical information data, while a local client is responsible for downloading the corresponding SQLite cache data on demand and incrementally updating the corresponding local SQLite cache file. The method includes: when the local client detects that the target medical account is logged in online, it starts a main program to ensure that the cached data in the basic SQLite cache database corresponds to the cache information index in the server-side database; the server-side database stores all medical information data; after the main program starts, it receives a data retrieval instruction from the target client subsystem corresponding to the target medical account, and then downloads the required SQLite cache data from the server-side database based on the data retrieval instruction, and updates the basic SQLite cache database and the subsystem SQLite cache database corresponding to the target client subsystem. This invention uses lightweight SQLite data caching technology to cache medical information data, and downloads and updates the cache on demand based on the target medical account, which facilitates the rapid use and reuse of medical information data, improving the reusability and efficiency of medical data. Attached Figure Description

[0069] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0070] Figure 1 A flowchart illustrating an optional embodiment of the present invention for caching medical information data based on SQLite;

[0071] Figure 2 A flowchart illustrating a method for caching medical information data based on SQLite, provided as another optional embodiment of the present invention;

[0072] Figure 3 The diagram below shows the structural connection of a medical information data caching device based on SQLite, provided as an optional embodiment of the present invention.

[0073] Figure 4 The diagram below shows the structural connection of a medical information data caching device based on SQLite, which is provided as another optional embodiment of the present invention.

[0074] Figure label:

[0075] 1-Startup module; 2-Receiving module; 3-Search module; 4-Judgment module; 5-Confirmation module; 6-First download module; 7-First update module; 8-Second update module; 9-Download failure handling module; 10-Second download module. Detailed Implementation

[0076] This invention provides a method, apparatus, and system for caching medical information data based on SQLite, which addresses the technical problems of current hospital information systems having limited caching methods for medical data and being unable to quickly cache and analyze comprehensive data on demand. As the amount of medical data and medical function modules increases, the operating efficiency of the hospital information system decreases, leading to a reduction in the reuse rate and efficiency of medical data.

[0077] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0078] To better illustrate this invention application, relevant terms are explained.

[0079] SQLite is a lightweight, ACID-compliant relational database management system contained within a relatively small C library. Designed for embedded systems, it boasts low resource consumption. It supports major operating systems such as Windows, Linux, and Unix, and can be integrated with many programming languages.

[0080] This invention provides a method for caching medical information data based on SQLite.

[0081] Please see Figure 1 , Figure 1 The flowchart illustrates a method for caching medical information data based on SQLite, as provided in an embodiment of the present invention.

[0082] This invention provides a method for caching medical information data based on SQLite, applied to a local client. The local client's cache database is divided into a basic SQLite cache database and a subsystem SQLite cache database. The method includes steps S1-S8.

[0083] Step S1: When the login status of the target medical account is detected to be online, the main program is started to make the cached data in the basic SQLite cache database correspond to the cached information index of the server database; the server database stores all medical information data.

[0084] Different medical staff members have different medical accounts, and the corresponding information for each target medical account is stored in the local client. When a user successfully logs into their medical account on the local client, the detected login status of the medical account is online, at which point the local client launches the main program. The medical account can be the user's employee ID or user ID from their hospital.

[0085] The process of starting the main program to ensure that the cached data in the underlying SQLite cache database corresponds to the cached information index in the server-side database includes:

[0086] Retrieve the cache information index from the server-side database;

[0087] The local cache is compared with the cache information index to determine whether data updates are needed, and a data update determination result is obtained.

[0088] When the data update determination result indicates that a data update is required, a data update request is initiated to the server; the data update request includes the data index that needs to be updated.

[0089] Receive the target cache data sent by the server that corresponds to the data index to be updated;

[0090] The target cache data is written to the underlying SQLite cache database; the completion of writing the target cache data indicates that the main program has started successfully.

[0091] Furthermore, if the data update determination result indicates that no data update is required, it means that the main program has finished starting.

[0092] In this embodiment, the system compares the cache information indexes of the local cache and the server database to determine whether the basic cache data needs to be updated. If no update is needed, the main program starts successfully. If an update is required, an update request is initiated, the latest cache data from the server database is read, and the latest cache data is written to the local SQLite cache database. After the basic cache data update is complete, the main program starts successfully. By starting the main program to update the data in the basic SQLite cache database, the local client can incrementally update the corresponding local SQLite cache file according to changes in server metadata. This ensures that the local cache on the local client is up-to-date, laying a solid foundation for subsequent on-demand cache downloads.

[0093] Step S2: After the main program starts, a data acquisition instruction is received from the target client subsystem corresponding to the target medical account; the data acquisition instruction is compatible with the permissions of the target medical account.

[0094] The data acquisition instruction is generated when logging into the target client subsystem or when a target business operation instruction is detected on the target client subsystem.

[0095] The target business operation command is generated when the user opens the target client subsystem to perform business operations after the main program starts. Users can be categorized into different roles based on their medical functions, such as doctors, nurses, and pharmacists. Since different roles require different medical information data, the SQLite cache used by the client subsystem also differs accordingly. Therefore, appropriate data retrieval commands are used to retrieve the required SQLite cache data. Because different medical accounts have different functional permissions, the generated data retrieval commands must conform to the permissions of the corresponding medical account before the local client will execute subsequent steps based on the data retrieval command.

[0096] In this embodiment of the invention, by initiating a data retrieval command based on the target medical account, the subsequently downloaded cached data can be directly included in the database under the user's name (i.e., the SQLite cache database of the subsystem corresponding to the target client subsystem), which is beneficial for the unified collection, organization and research of relevant data used by the user in daily life.

[0097] Step S3: Search for the first target SQLite cache data corresponding to the data retrieval instruction in the basic SQLite cache database to obtain the search result.

[0098] As a specific implementation, the data acquisition instruction may include the target medical account identifier and / or the target client subsystem identifier, so that in this step, the corresponding first target SQLite cache data can be retrieved from the basic SQLite cache database based on the target medical account identifier and / or the target client subsystem identifier.

[0099] The underlying SQLite cache database can be a storage area with different target medical account identifiers / or target client subsystem identifiers to facilitate the retrieval of the first target SQLite cache data.

[0100] As another specific implementation, the data acquisition instruction may include a data identifier, so that in this step, the corresponding first target SQLite cache data can be found from the underlying SQLite cache database based on the data identifier.

[0101] Step S4: When the search result is that the first target SQLite cache data is found, determine whether the first target SQLite cache data is consistent with the corresponding SQLite cache data in the server database based on the update size and update time of the first target SQLite cache data, and obtain the data consistency judgment result.

[0102] Specifically, when determining whether the first target SQLite cached data is consistent with the corresponding SQLite cached data in the server database, the corresponding SQLite cached data in the server database can be obtained based on the data identifier. This allows us to determine whether its update size and update time are consistent with the first target SQLite cached data, thus obtaining the corresponding data consistency judgment result. If they are consistent, it indicates that the current first target SQLite cached data is the latest cached data, and no data update operation is required. If they are inconsistent, step S5 needs to be executed.

[0103] Step S5: When the data consistency judgment result is that the data is inconsistent, determine the target identifier information of the SQLite cached data that needs to be downloaded based on the inconsistent part of the data.

[0104] As a specific implementation, in the data inconsistency section, if the update time of the corresponding cached data in the server-side database is earlier than the update time of the first target SQLite cached data on the local client, it indicates that the first target SQLite cached data on the local client is the latest cached data, and in this case, it is determined that there is no need to download SQLite cached data. Conversely, if the update time of the corresponding cached data in the server-side database is later than the update time of the first target SQLite cached data on the local client, it indicates that the corresponding cached data in the server-side database is the latest cached data, and in this case, it is determined based on the inconsistency section that SQLite cached data needs to be downloaded, and the target identifier information of the SQLite cached data to be downloaded is obtained.

[0105] As a specific implementation method, in the part of data inconsistency, if the update time is the same, when the content size of the corresponding cached data in the server database exceeds the content size of the first target SQLite cached data on the local client, it is determined that SQLite cached data needs to be downloaded.

[0106] It should be noted that the specific mechanism for determining the target identifier information of the SQLite cached data to be downloaded based on the data inconsistency can also be adjusted according to the actual situation and is not limited to the two implementation methods mentioned above.

[0107] Step S6: Download the corresponding SQLite cache data from the server database according to the target identifier information to obtain the downloaded SQLite cache data.

[0108] In this embodiment, the corresponding SQLite cache data is downloaded from the server database according to the target identification information, realizing on-demand download, which can reduce network traffic for downloading cache data and improve download caching efficiency.

[0109] It should be noted that if an unexpected error occurs when downloading the corresponding SQLite cached data from the server database, the local client will not interrupt the user's business operations. The problematic cache will be intelligently skipped to ensure that doctors and other operators can use the system smoothly and to ensure that there will be no situation that blocks medical staff from using the system, thereby improving user experience and system fault tolerance.

[0110] In one feasible approach, the step of downloading the corresponding SQLite cache data from the server database based on the target identifier information, to obtain the downloaded SQLite cache data, includes:

[0111] Determine the target data interface on the server based on the type of SQLite cached data that needs to be downloaded;

[0112] Download the required SQLite cache data through the corresponding target data interface based on the target identification information.

[0113] The target data interface includes a HIS system for acquiring medical diagnosis and prescription information, an EMR module for acquiring electronic medical record information, and a DRG diagnostic module for acquiring diagnostic information.

[0114] The HIS system includes a test application module for obtaining test information, a test application module for obtaining examination information, and a prescription module for obtaining drug diagnosis and treatment information.

[0115] The test information obtained by the test application module can include test item information cache, test item information cache, commonly used test information cache, and test category information cache. The test item information cache and commonly used test information cache can be maintained, added, or modified and improved according to actual medical needs. Information with data adjustments will be recorded on the server and updated locally when the user initiates a data retrieval command next time.

[0116] The examination information obtained by the image examination request module can include cached examination item information, cached frequently used examination information, and cached examination category information. The cached examination item information, cached frequently used examination information, and cached examination category information can be maintained, added, deleted, or modified and improved according to medical needs. Information with data adjustments will be recorded on the server and updated locally when the user initiates a data retrieval command next time.

[0117] The drug and treatment information obtained from the prescription module can include cached information on prescriptions for Western medicine, traditional Chinese medicine, treatment prescriptions, dosing frequency, and dosing methods. Hospitals can adjust the dosing method, frequency, and prescription type as needed, such as when new drugs are introduced or new treatment plans are implemented. The system can be maintained, added, deleted, or modified as needed. Any data adjustments will be recorded on the server and updated locally when the user initiates a data retrieval command again.

[0118] The electronic medical record information obtained by the EMR module can include cached commonly used medical record information, cached medical record phrase information, and cached outpatient document information. The cached commonly used medical record information, cached medical record phrase information, cached outpatient document information, and cached medical record template information can be maintained, added, deleted, or modified and improved according to medical needs. Information with data adjustments will be recorded on the server and updated locally when the user initiates a data retrieval command next time.

[0119] The diagnostic information obtained by the DRG diagnostic module can include a cache of commonly used diagnostic codes, a cache of historical diagnostic information, and a cache of combined diagnostic information. The caches of commonly used diagnostic codes, historical diagnostic information, and combined diagnostic information can be maintained, added to, deleted from, or modified and improved according to medical needs. Any data adjustments will be recorded on the server and updated locally when the user next initiates a data retrieval command.

[0120] The SQLite cached medical information data file updated to the local client contains cached data downloaded from various data acquisition interfaces and records download update logs.

[0121] The above embodiments of the present invention obtain information needed by doctors for diagnosis, treatment, and management, as well as electronic medical records, through various data acquisition interfaces, thereby increasing the means of information sourcing and making it more conducive to the aggregation and caching of comprehensive data.

[0122] In one feasible approach, downloading the required SQLite cache data through the corresponding target data interface based on the target identifier information includes:

[0123] Determine whether pagination is needed based on the size of the SQLite cached data to be downloaded;

[0124] When paginated download is required, the data is downloaded in a paginated manner, and the required SQLite cached data is downloaded from the server database through the corresponding target data interface according to the target identifier information.

[0125] In this embodiment, the paginated download method can prevent problems such as slow download speed or memory overflow caused by excessive content data, increase download speed and smoothness, and enable the local client to support multi-threaded synchronous download of medical information data.

[0126] It should be noted that downloading data in a paginated manner is an existing technology, and this embodiment does not limit the specific process of paginated downloading.

[0127] Step S7: Update the first target SQLite cache data according to the downloaded SQLite cache data to obtain the second target SQLite cache data.

[0128] Step S8: Update the basic SQLite cache database according to the second target SQLite cache data, and update the subsystem SQLite cache database corresponding to the target client subsystem according to the second target SQLite cache data.

[0129] In the above embodiments of the present invention, during the update process, the local client saves the update size and update time of the SQLite cached medical information data file. When the medical metadata of different data acquisition interfaces on the server changes, the data update time is recorded. When the local client initiates the data acquisition command again, the local cached data is updated. This design constructs a scientific method for medical data caching and organization, which can effectively improve the reusability and utilization efficiency of data, and plays a great role in reducing the workload of medical staff and improving work efficiency.

[0130] In one feasible way, Figure 1 Based on the method shown, such as Figure 2 As shown, the method further includes:

[0131] Step S9: If downloading the corresponding SQLite cached data from the server database based on the target identifier information fails, record the failure result and upload it to the server.

[0132] In this embodiment, if an error occurs during downloading the cache, an error log will be automatically recorded, the cause of the error will be automatically analyzed, and the analysis results will be reported, which facilitates the maintenance and self-improvement of the cache data.

[0133] In one feasible implementation, the method further includes:

[0134] Step S10: When the search result indicates that the first target SQLite cache data cannot be found, the corresponding SQLite cache data is downloaded in full from the server database according to the data acquisition instruction, and the basic SQLite cache database and the subsystem SQLite cache database corresponding to the target client subsystem are updated accordingly.

[0135] After successfully downloading the corresponding SQLite cache data, the local client will save the update size and update time of the downloaded SQLite cache data. This will allow the client to determine whether the server time and local time are up-to-date during the next download and decide whether to update and download the latest cached data.

[0136] The present invention also provides a medical information data caching device based on SQLite, which can be used to execute the medical information data caching method based on SQLite described in any of the above embodiments of the present invention.

[0137] Please see Figure 3 , Figure 3 The diagram shows a structural connection block diagram of a medical information data caching device based on SQLite provided in an embodiment of the present invention.

[0138] The medical information data caching device based on SQLite provided in this embodiment of the invention is applied to a local client. The local client's cache database is divided into a basic SQLite cache database and a subsystem SQLite cache database. The medical information data caching device includes:

[0139] Startup module 1 is used to start the main program when the login status of the target medical account is detected to be online, so that the cached data in the basic SQLite cache database corresponds with the cached information index of the server database; the server database stores all medical information data;

[0140] The receiving module 2 is used to receive a data acquisition instruction from the target client subsystem corresponding to the target medical account after the main program has started; the data acquisition instruction is compatible with the permissions of the target medical account.

[0141] The lookup module 3 is used to search for the first target SQLite cache data corresponding to the data retrieval instruction in the basic SQLite cache database and obtain the lookup result;

[0142] The judgment module 4 is used to determine whether the first target SQLite cache data is consistent with the corresponding SQLite cache data in the server database based on the update size and update time of the first target SQLite cache data when the search result is that the first target SQLite cache data is found, and to obtain the data consistency judgment result.

[0143] Module 5 is used to determine the target identifier information of the SQLite cached data to be downloaded based on the inconsistent part of the data when the data consistency judgment result is data inconsistency;

[0144] The first download module 6 is used to download the corresponding SQLite cache data from the server database according to the target identification information, and obtain the downloaded SQLite cache data;

[0145] The first update module 7 is used to update the first target SQLite cache data according to the downloaded SQLite cache data to obtain the second target SQLite cache data;

[0146] The second update module 8 is used to update the basic SQLite cache database according to the second target SQLite cache data, and to update the subsystem SQLite cache database corresponding to the target client subsystem according to the second target SQLite cache data.

[0147] In one feasible implementation, the startup module 1 includes:

[0148] The acquisition unit is used to acquire the cache information index of the server database; the server database stores all medical information data.

[0149] The comparison unit is used to compare the local cache with the cache information index to determine whether data update is needed and to obtain a data update judgment result.

[0150] The initiating unit is used to initiate a data update request to the server when the data update determination result indicates that a data update is required; the data update request includes the data index that needs to be updated.

[0151] The receiving unit is used to receive the target cache data sent by the server that corresponds to the data index to be updated;

[0152] The writing unit is used to write the target cache data into the underlying SQLite cache database; the completion of writing the target cache data indicates that the main program has started successfully.

[0153] In one feasible implementation, the first download module 6 includes:

[0154] The determination unit is used to determine the target data interface on the server based on the type of SQLite cached data to be downloaded.

[0155] The download unit is used to download the required SQLite cache data through the corresponding target data interface according to the target identification information.

[0156] In one feasible approach, the target data interface includes a HIS system for acquiring medical diagnosis and prescription information, an EMR module for acquiring electronic medical record information, and a DRG diagnostic module for acquiring diagnostic information.

[0157] The HIS system includes a test application module for obtaining test information, a test application module for obtaining examination information, and a prescription module for obtaining drug diagnosis and treatment information.

[0158] In one feasible manner, the download unit includes:

[0159] The `determine` sub-unit is used to determine whether paginated downloading is necessary based on the size of the SQLite cached data to be downloaded.

[0160] The download subunit is used to download the required SQLite cached data from the server database in a paginated manner when paginated download is required, based on the target identifier information and through the corresponding target data interface.

[0161] In one feasible manner, the data acquisition instruction is generated when logging into the target client subsystem or when a target business operation instruction is detected on the target client subsystem.

[0162] In one feasible way, Figure 3 Based on the device shown, such as Figure 4 As shown, the device further includes:

[0163] Download failure handling module 9 is used to record the failure result and upload it to the server when downloading the corresponding SQLite cached data from the server database according to the target identification information fails.

[0164] Furthermore, the device also includes:

[0165] The second download module 10 is used to download the corresponding SQLite cache data from the server database in full according to the data acquisition instruction when the search result is that the first target SQLite cache data cannot be found, and update the basic SQLite cache database and the subsystem SQLite cache database corresponding to the target client subsystem accordingly.

[0166] The present invention also provides a medical information data caching system based on SQLite, including a local client and a server. The cache database of the local client is divided into a basic SQLite cache database and a subsystem SQLite cache database, and the server is equipped with a server database.

[0167] The local client includes a medical information data caching device based on SQLite, as described in any of the above-mentioned methods.

[0168] The present invention also provides a medical information data caching device based on SQLite, comprising:

[0169] A memory for storing instructions; wherein the instructions are used to implement the SQLite-based medical information data caching method as described in any of the above embodiments;

[0170] A processor for executing instructions in the memory.

[0171] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the SQLite-based medical information data caching method as described in any of the above embodiments.

[0172] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the medical information data caching system, medical information data caching device and module described above can be referred to the corresponding process in the foregoing method embodiments, and the specific beneficial effects of the medical information data caching system, medical information data caching device and module described above can be referred to the corresponding beneficial effects in the foregoing method embodiments, and will not be repeated here.

[0173] In the several embodiments provided in this application, it should be understood that the disclosed medical information data caching system, medical information data caching device, and medical information data caching method can be implemented in other ways. For example, the embodiments of the medical information data caching device described above are merely illustrative. For instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed.

[0174] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0175] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.

[0176] If the integrated module is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0177] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for caching medical information data based on SQLite, applied to a local client, characterized in that, The local client's cache database is divided into a basic SQLite cache database and a subsystem SQLite cache database; The method includes: When the target medical account is detected to be logged in online, the main program is started to make the cached data in the basic SQLite cache database correspond to the cached information index in the server database; The server-side database stores all medical information data; The process of starting the main program to make the cached data in the basic SQLite cache database correspond to the cached information index in the server database includes: Obtain the cache information index of the server-side database; the server-side database stores all medical information data; The local cache information index corresponding to the cached data in the basic SQLite cache database is compared with the cache information index to determine whether data update is needed, and a data update judgment result is obtained. When the data update determination result indicates that a data update is required, a data update request is initiated to the server; the data update request includes the data index that needs to be updated. Receive the target cache data sent by the server that corresponds to the data index to be updated; The target cache data is written to the underlying SQLite cache database; the completion of writing the target cache data indicates that the main program has started successfully. After the main program starts, it receives a data acquisition instruction from the target client subsystem corresponding to the target medical account; the data acquisition instruction is compatible with the permissions of the target medical account. Search the basic SQLite cache database for the first target SQLite cache data corresponding to the data retrieval instruction to obtain the search result; When the search result is that the first target SQLite cache data is found, the update size and update time of the first target SQLite cache data are used to determine whether the first target SQLite cache data is consistent with the corresponding SQLite cache data in the server database, and a data consistency judgment result is obtained. When the data consistency judgment result is that the data is inconsistent, the target identifier information of the SQLite cached data to be downloaded is determined based on the inconsistent part of the data; Download the corresponding SQLite cache data from the server database according to the target identification information, and obtain the downloaded SQLite cache data; The first target SQLite cache data is updated based on the downloaded SQLite cache data to obtain the second target SQLite cache data; Update the underlying SQLite cache database according to the second target SQLite cache data, and update the subsystem SQLite cache database corresponding to the target client subsystem according to the second target SQLite cache data; The method further includes: When the search result indicates that the first target SQLite cache data cannot be found, the corresponding SQLite cache data is downloaded in full from the server database according to the data acquisition instruction, and the basic SQLite cache database and the subsystem SQLite cache database corresponding to the target client subsystem are updated accordingly.

2. The medical information data caching method based on SQLite according to claim 1, characterized in that, The step of downloading the corresponding SQLite cache data from the server database based on the target identifier information, to obtain the downloaded SQLite cache data, includes: Determine the target data interface on the server based on the type of SQLite cached data that needs to be downloaded; Download the required SQLite cache data through the corresponding target data interface based on the target identification information.

3. The medical information data caching method based on SQLite according to claim 2, characterized in that, The target data interface includes a HIS system for acquiring medical diagnosis and prescription information, an EMR module for acquiring electronic medical record information, and a DRG diagnostic module for acquiring diagnostic information. The HIS system includes a test application module for obtaining test information, a test application module for obtaining examination information, and a prescription module for obtaining drug diagnosis and treatment information.

4. The medical information data caching method based on SQLite according to claim 2, characterized in that, The step of downloading the required SQLite cache data through the corresponding target data interface based on the target identifier information includes: Determine whether pagination is needed based on the size of the SQLite cached data to be downloaded; When paginated download is required, the data is downloaded in a paginated manner, and the required SQLite cached data is downloaded from the server database through the corresponding target data interface according to the target identifier information.

5. The medical information data caching method based on SQLite according to claim 1, characterized in that, The data acquisition instruction is generated when logging into the target client subsystem or when a target business operation instruction is detected on the target client subsystem.

6. The method for caching medical information data based on SQLite according to claim 1, characterized in that, The method further includes: When downloading the corresponding SQLite cached data from the server database based on the target identifier information fails, the failure result is recorded and uploaded to the server.

7. A medical information data caching device based on SQLite, characterized in that, include: A memory for storing instructions; wherein the instructions are used to implement the SQLite-based medical information data caching method as described in any one of claims 1-6; A processor for executing instructions in the memory.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the SQLite-based medical information data caching method as described in any one of claims 1-6.

9. A medical information data caching device based on SQLite, applied to a local client, characterized in that, The local client's cache database is divided into a basic SQLite cache database and a subsystem SQLite cache database; The medical information data caching device includes: The startup module is used to start the main program when the login status of the target medical account is detected to be online, so that the cached data in the basic SQLite cache database corresponds with the cached information index of the server database; the server database stores all medical information data. The startup module includes: an acquisition unit for acquiring cache information indexes from a server-side database; the server-side database stores all medical information data; a comparison unit for comparing the local cache information index corresponding to the cached data in the basic SQLite cache database with the cache information index to determine whether data updates are needed, and obtaining a data update judgment result; an initiation unit for initiating a data update request to the server when the data update judgment result indicates that data updates are needed; the data update request includes the data index to be updated; a receiving unit for receiving target cached data corresponding to the data index to be updated sent by the server; and a writing unit for writing the target cached data to the basic SQLite cache database; the completion of writing the target cached data indicates that the main program has started successfully. The receiving module is configured to receive a data acquisition instruction from the target client subsystem corresponding to the target medical account after the main program has started; the data acquisition instruction is compatible with the permissions of the target medical account. The lookup module is used to search for the first target SQLite cache data corresponding to the data retrieval instruction in the basic SQLite cache database and obtain the lookup result; The judgment module is used to determine whether the first target SQLite cache data is consistent with the corresponding SQLite cache data in the server database based on the update size and update time of the first target SQLite cache data when the search result is that the first target SQLite cache data is found, and to obtain the data consistency judgment result. The determination module is used to determine the target identifier information of the SQLite cached data to be downloaded based on the inconsistent part of the data when the data consistency judgment result is that the data is inconsistent. The download module is used to download the corresponding SQLite cache data from the server database according to the target identification information, and obtain the downloaded SQLite cache data; The first update module is used to update the first target SQLite cache data according to the downloaded SQLite cache data to obtain the second target SQLite cache data; The second update module is used to update the basic SQLite cache database according to the second target SQLite cache data, and to update the subsystem SQLite cache database corresponding to the target client subsystem according to the second target SQLite cache data. The device further includes: The second download module is used to download the corresponding SQLite cache data from the server database in full according to the data acquisition instruction when the search result is that the first target SQLite cache data cannot be found, and update the basic SQLite cache database and the subsystem SQLite cache database corresponding to the target client subsystem accordingly.

10. A medical information data caching system based on SQLite, comprising a local client and a server, characterized in that, The local client's cache database is divided into a basic SQLite cache database and a subsystem SQLite cache database, and the server has a server-side database; The local client includes the SQLite-based medical information data caching device as described in claim 9.

Citation Information

Patent Citations

  • Data processing method and device, electronic equipment and storage medium

    CN113094378A

  • Medical information pushing method and device, computer equipment and storage medium

    CN114461895A