Method and system for performing real-time quality control on basis of patient sample, and method for constructing quality control model
By adopting real-time quality monitoring technology based on patient samples and neural networks in the detection instrument, the problem of insufficient error detection performance in the existing technology is solved, and more stable and sensitive internal quality control is achieved, reducing the samples required for error detection. reduces costs.
Patent Information
- Application Number
- PCT/CN2024/095713
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-06-01
- Filing Date
- 2024-05-28
- Publication Date
- 2024-12-05
AI Technical Summary
The existing real-time quality control method based on patient samples is insufficient when detecting conventional indicators and cannot meet the clinical internal quality control requirements. Especially for patients with diseases, a large number of continuous samples are required to identify errors. and the system out of control.
Using real-time quality monitoring technology based on patient samples and neural networks, by quantifying patient information and inputting pre-trained machine learning models, monitoring indicators are obtained to determine whether the detection instrument is out of control, and to reduce the quality control performance of factors such as disease, age, and gender. Influence, reduce the number of samples required for error detection.
It improves quality control stability and sensitivity, and can accurately detect the out-of-control state of the instrument under a small number of samples, reducing costs and improving detection efficiency.
Smart Images

Figure CN2024095713_05122024_PF_FP_ABST
Abstract
Description
Method, system and method for constructing quality control model based on patient samples for real-time quality control
[0001] Cross-references
[0002] This application is based on the PCT international patent application with application number PCT / CN2023 / 097857 and application date June 1, 2023, and claims the priority of the PCT international patent application. All the disclosed contents of the PCT international patent application are incorporated herein by reference. Technical Field
[0003] The present application relates to the field of quality control of in vitro diagnostic instruments, and in particular to a method and system for performing real-time quality control based on patient samples, and a method for constructing a quality control model for performing real-time quality control based on patient samples. Background Art
[0004] In the clinical diagnosis and treatment of diseases, the quality of medical testing directly impacts physicians' ability to diagnose and treat diseases. High-quality medical test results rely on a comprehensive quality control system within the medical laboratory. Quality control in medical laboratories encompasses three aspects: pre-analytical, in-analytical, and post-analytical quality control. In-analytical quality control is the most critical process within the quality management system. In-analytical quality control encompasses internal quality control (IQC). Currently, the most common IQC implementation involves testing quality control materials at a regular interval, using statistical calculations to assess the reliability of test results and thereby identify and eliminate factors that may be out of control during testing. However, the use of quality control materials for IQC monitoring has several key drawbacks: 1) IQC monitoring using quality control materials is not continuous, but rather performed at single time points to assess whether the analytical process is out of control; 2) quality control materials are not patient samples, and therefore are subject to matrix effects, which can affect IQC results; and 3) the use of quality control materials for IQC requires additional investment in quality control materials, reagents, and labor, resulting in high costs.
[0005] Summary of the Invention
[0006] In order to at least partially solve the above technical problems, the task of this application is to provide an improved PBRTQC-based technical solution that can achieve more stable and more sensitive indoor quality control.
[0007] In order to achieve the above-mentioned task of the present application, the first aspect of the present application provides a method for real-time quality control based on patient samples, comprising:
[0008] During the process of the detection instrument performing real-time detection on the current patient sample for the target item, obtaining an actual detection result of the current patient sample obtained by the detection instrument for the target item and patient information, wherein the patient information includes at least one of the patient's disease, age, gender, and the ordering department for the target item;
[0009] quantifying the patient information of the current patient sample and inputting the quantified patient information into a pre-built machine learning model to obtain an output result of the machine learning model as a predicted test result for the target item, wherein the machine learning model is trained using actual test results for the target item of multiple historical patient samples and patient information;
[0010] Acquire monitoring indicators based on the actual test results of the current patient sample and the predicted test results; and
[0011] Based on the monitoring index, it is determined whether the detection instrument is under control. If not, an alarm prompt indicating that the detection instrument is out of control is output.
[0012] In order to achieve the above-mentioned task of the present application, the second aspect of the present application provides a computer system for performing real-time quality control based on patient samples, comprising:
[0013] a data acquisition module configured to acquire, during the process of the detection instrument performing real-time detection on the current patient sample for the target item, an actual test result of the current patient sample obtained by the detection instrument for the target item and patient information, wherein the patient information includes at least one of the patient's disease, age, gender, and the ordering department for the target item;
[0014] a prediction result acquisition module configured to quantify the patient information of the current patient sample and input the quantified patient information into a pre-built machine learning model to obtain an output result of the machine learning model as a predicted test result for the target item, wherein the machine learning model is trained using actual test results and patient information for the target item of multiple historical patient samples;
[0015] a monitoring indicator acquisition module configured to acquire monitoring indicators based on the actual test results of the current patient sample and the predicted test results; and
[0016] The quality control module is configured to determine whether the detection instrument is under control based on the monitoring indicators, and if not,.
[0017] In order to achieve the above-mentioned task of the present application, the third aspect of the present application provides a method for constructing a quality control model for real-time quality control based on patient samples, comprising:
[0018] Acquiring data from multiple patient samples and dividing the data into a training set and a test set, the data including actual test results for target items of the multiple patient samples and patient information, wherein the actual test results are obtained by testing the patient samples using a testing instrument, and the patient information includes at least one of the patient's disease, age, gender, and the ordering department for the target item, wherein the data in the training set is obtained when the testing instrument is in a controlled state;
[0019] The training set is used to establish a machine learning model by quantifying the patient information of the patient samples in the training set, and establishing a machine learning model that satisfies the following formula between the quantified patient information and the actual test results in the training set: t =f(x 1t ,x 2t ,…,x nt )+ε t
[0020] Among them, X t is the actual detection result in the training set, f(x 1t ,x 2t ,...,x nt ) is a machine learning model, x 1t ,x 2t ,…,x nt represents the quantified patient information, ε t Represents the estimation of X using the machine learning model t The residual of
[0021] Building a quality control model for real-time quality control based on patient samples based on the machine learning model; and
[0022] The quality control model is validated using the test set.
[0023] In the technical solutions provided in various aspects of this application, a machine learning model trained based on actual test results and patient information from historical patient samples is used to obtain monitoring indicators for quality control of testing instruments. This not only overcomes the shortcomings of using quality control products for quality control, but also achieves more stable and sensitive in-house quality control compared to the existing PBRTQC. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] FIG1 is a schematic flow chart of a method for real-time quality control based on patient samples according to an embodiment of the present application.
[0025] FIG2 is a schematic diagram showing the number of samples required for error detection.
[0026] FIG3 is a schematic diagram of monitoring indicators obtained according to an embodiment of the present application and monitoring indicators obtained according to the prior art.
[0027] FIG4 is a schematic block diagram of a computer system for performing real-time quality control based on patient samples according to an embodiment of the present application.
[0028] FIG5 is a schematic flowchart of a method for constructing a quality control model for performing real-time quality control based on patient samples according to an embodiment of the present application.
[0029] FIG6 is a schematic structural diagram of a neural network model according to an embodiment of the present application.
[0030] FIG7 is a schematic flowchart of a method for optimizing a quality control model according to an embodiment of the present application.
[0031] FIG8 is a schematic flowchart of another method for optimizing a quality control model according to an embodiment of the present application.
[0032] FIG9 is a schematic flowchart of yet another method for optimizing a quality control model according to an embodiment of the present application. DETAILED DESCRIPTION
[0033] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0034] In recent years, patient-based real-time quality control (PBRTQC) has emerged as a promising method to address some of the shortcomings of current IQC. The advantages of PBRTQC include: 1) the ability to monitor the system using patient samples in real time, enabling prompt detection of instrument out-of-control conditions; 2) the use of patient samples eliminates matrix effects; and 3) PBRTQC is an analytical software-based approach that requires no additional quality control products, reagents, or labor, resulting in a relatively low cost.
[0035] With the deepening of PBRTQC research and application, it was found that the existing PBRTQC has insufficient error detection performance for some conventional indicators and cannot meet the clinical IQC requirements well.
[0036] For example, for patients with illnesses, their parameter results fluctuate significantly. Existing PBRTQC methods require a large number of consecutive samples to identify errors and system out-of-control conditions, failing to meet clinical IQC requirements. In particular, the inventors of this application discovered that for conventional indicators such as white blood cell count, red blood cell count, hemoglobin content, and thyroid-stimulating hormone, the distribution and fluctuation of these parameters are significant due to factors such as the patient's illness, age, and gender. Consequently, existing PBRTQC methods require a large number of samples to detect the average error of the system.
[0037] Therefore, this application proposes a technical solution for real-time quality monitoring based on patient samples and neural networks, so as to reduce the impact of factors such as the patient's disease, age, gender, etc. on the PBRTQC quality control performance (i.e., improve the quality control stability), and at the same time reduce the number of samples required for error detection compared to the existing PBRTQC quality control (i.e., improve sensitivity).
[0038] Figure 1 shows a method 100 for real-time quality control based on patient samples according to an embodiment of the present application. As shown in Figure 1 , the method 100 includes a data acquisition step S110, a data processing step S120, a monitoring indicator acquisition step S130, and a quality control step S140.
[0039] In the data acquisition step S110, while the detection instrument is performing real-time detection on the current patient sample for the target item, that is, in real time, the actual detection results of the current patient sample obtained by the detection instrument for the target item and the patient information are obtained, wherein the patient information includes the patient's disease, age, gender and at least one of the department to which the sample belongs.
[0040] In the embodiment of the present application, the department of the sample refers to the ordering department of the target project, that is, the hospital department that requests the use of the detection instrument to detect the current patient sample for the target project.
[0041] In the data processing step S120, the patient information of the current patient sample is quantified and the quantified patient information is input into a pre-built machine learning model to obtain the output result of the machine learning model as the predicted detection result for the target project, wherein the machine learning model is obtained by training the actual detection results and patient information for the target project of a plurality of known patient samples (i.e., historical patient samples). Here, the machine learning model proposed in the embodiment of the present application characterizes the relationship between the patient information and the detection results of the target project. That is to say, if the patient information is input into the machine learning model, the predicted detection result for the target project predicted by the machine learning model will be obtained.
[0042] In the monitoring indicator acquisition step S130 , the monitoring indicator is acquired based on the actual test result of the current patient sample obtained in step S110 and the predicted test result obtained in step S120 .
[0043] In the quality control step S140, whether the detection instrument is under control is determined based on the monitoring indicators and / or whether an alarm indicating that the detection instrument is out of control is determined based on the monitoring indicators. For example, if the detection instrument is determined to be out of control based on the monitoring indicators, an alarm indicating that the detection instrument is out of control is output.
[0044] The performance of the quality control method based on PBRTQC of the present application and the performance of the quality control method based on PBRTQC of the prior art are verified by using the number of samples required for error detection NPed under the same false alarm rate. The fewer the number of samples required for error detection, the better the sensitivity of error detection. Among them, the false alarm rate FAR refers to the number of false alarms of the monitoring indicator calculated based on the data obtained under the controlled state of the detection instrument (the number exceeding the preset control line) / number of samples * 100%. The number of samples required for error detection NPed refers to the number of samples required from the detection instrument to the monitoring indicator exceeding the preset control line, as shown in Figure 2.
[0045] Taking the target items of white blood cell count (WBC), red blood cell count (RBC), hemoglobin content (HGB), and thyroid-stimulating hormone (TSH) as examples for verification, the WBC verification data set, RBC verification data set, HGB verification data set, and TSH verification data set obtained under the control of the detection instrument were used respectively. By adding errors multiple times, the PBRTQC-based quality control method of this application and the PBRTQC-based quality control method of the prior art were simulated to obtain the average number of samples required for detection (ANPed) as shown in Table 1. As shown in Table 1, the PBRTQC-based quality control method proposed in this application significantly improves the quality control sensitivity compared to the prior art.
[0046] Table 1 ANPed for different target items
[0047] Furthermore, under the same alarm rate, taking the white blood cell count (WBC) as an example, the monitoring indicator NNs-PBRTQC according to the embodiment of the present application and the monitoring indicator PBRTQC according to the existing PBRTQC were calculated based on the WBC data set obtained under the control of the detection instrument, as shown in Figure 3. As can be seen from Figure 3, the monitoring indicator calculated according to the embodiment of the present application is more stable than the monitoring indicator calculated according to the existing PBRTQC, and under the same alarm rate, the control line obtained according to the embodiment of the present application is smaller than the control line obtained according to the existing PBRTQC.
[0048] In the embodiment of the present application, a detection instrument being controlled means that the detection instrument is in a normal state and no fault has occurred; while a detection instrument being out of control means that the detection instrument is in an abnormal state and a fault may have occurred.
[0049] In some embodiments, the machine learning model may be a neural network model. In other embodiments, the machine learning model may be a machine learning model based on SVM (support vector machine) and / or LDA (support vector machine).
[0050] In some embodiments, the target items can be routine blood test items, such as cell count (such as white blood cell count, platelet count, red blood cell count, etc.) and classification (such as white blood cell classification, etc.), hemoglobin content, etc.; accordingly, the detection instrument is a blood cell analyzer.
[0051] In other embodiments, the target items may be biochemical test items, such as thyroid function (such as thyroid-stimulating hormone, etc.), liver function, kidney function, blood lipids, blood sugar, etc.; accordingly, the detection instrument is a biochemical analyzer.
[0052] In some embodiments, the patient information may include multiple of the patient's disease, age, gender, and the department to which the sample belongs. Preferably, the patient information may include the patient's disease, age, gender, and the department to which the sample belongs.
[0053] In some embodiments, the patient information can be obtained from the laboratory (testing department) information system of the hospital where the testing instrument is located.
[0054] In some embodiments, step S130 of acquiring monitoring indicators based on the actual detection results and the predicted detection results may include:
[0055] Calculating the difference between the actual detection result and the predicted detection result; and
[0056] The difference is input into a calculation model based on a process control SPC algorithm to obtain an output result of the calculation model as the monitoring indicator.
[0057] The process control SPC algorithm may, for example, include at least one of a floating mean, a floating median, an exponentially weighted moving average, a floating standard deviation, a floating quantile, and a floating number of patients with abnormal values.
[0058] In other embodiments, step S130 of acquiring the monitoring indicator based on the actual detection result and the predicted detection result may also include acquiring the monitoring indicator based on the ratio of the actual detection result to the predicted detection result.
[0059] In some embodiments, quantifying the patient information of the current patient sample may include: quantifying at least one of the patient information of the current patient sample, especially at least one of the disease, gender, and department to which the sample belongs, into matrices.
[0060] In one example, quantizing at least one type of patient information of the current patient sample into a matrix may include: quantizing each type of patient information of the at least one type of patient information of the current patient sample into a one-dimensional matrix having multiple elements, wherein each element of the one-dimensional matrix represents a category, and the patient information belongs to at least one of the categories represented by the element.
[0061] For example, when the patient information includes disease information, if the disease can be divided into 33 disease categories, the disease information can be quantized into a one-dimensional matrix with 33 elements, where each element represents a disease.
[0062] For another example, when the patient information includes gender information, since gender is divided into two categories, namely male and female, the gender information can be quantified into a one-dimensional matrix with two elements, where one element represents male and the other element represents female.
[0063] For another example, when the patient information includes information about the department to which the sample belongs, if the department to which the sample belongs can be divided into 32 department categories, the information about the department to which the sample belongs can be quantified into a one-dimensional matrix with 32 elements, where each element represents a department.
[0064] Preferably, quantizing each type of patient information in the at least one type of patient information of the current patient sample into a one-dimensional matrix having multiple elements may include: quantizing each type of patient information in the at least one type of patient information of the current patient sample into a one-dimensional matrix having multiple elements consisting of 0s and 1s, wherein the value of the element representing the category to which the information belongs is 1, and the values of the remaining elements are 0. This simplifies the construction of the machine learning model.
[0065] For example, when the patient information includes disease information, if the disease can be divided into 33 disease categories, the disease information can be quantized into a one-dimensional matrix [X1, X2, ..., X33] with 33 elements, where each element X represents a disease, for example, X1 represents hyperthyroidism, X2 represents hypertension, etc. If the disease information of a current patient sample is hyperthyroidism, the disease information of the patient sample is quantized as [1, 0, 0, 0, ..., 0], that is, the value of element X1 is 1, and the values of the remaining elements are 0. If the disease information of a current patient sample includes hyperthyroidism and hypertension, the disease information of the patient sample is quantized as [1, 1, 0, 0, ..., 0], that is, the values of elements X1 and X2 are 1, and the values of the remaining elements are 0.
[0066] For another example, when the patient information includes gender information, since gender is divided into two categories, male and female, the gender information can be quantized into a one-dimensional matrix [Y1, Y2] with two elements, where element Y1 represents male and element Y2 represents female. If the gender information of a patient sample is male, the gender information of the patient sample is quantized to [1, 0], that is, the value of element Y1 is 1 and the value of element Y2 is 0.
[0067] For another example, when the patient information includes information about the department to which the sample belongs, if the department to which the sample belongs can be divided into 32 department categories, the information about the department to which the sample belongs can be quantized into a one-dimensional matrix [Z1, Z2, ..., Z32] with 32 elements, where each element represents a department, for example, Z1 represents the Department of Endocrinology, Z2 represents the Department of Nephrology, etc. If the department information of a patient sample is the Department of Endocrinology, the information about the department to which the sample belongs of the patient sample is quantized into [1, 0, 0, 0, ..., 0], that is, the value of element Z1 is 1, and the values of the remaining elements are 0.
[0068] In other embodiments, quantifying the patient information of the current patient sample may include: quantizing at least one piece of patient information in the patient information of the current patient sample, especially age, into a fixed value, preferably into a fixed integer.
[0069] In one example, age can be quantified as a fixed number between 0 and 150, i.e., if the patient's age is 30, then their age is quantified as 30. In other examples, age can be quantified as a percentage, e.g., if the patient's age is 30, then their age is quantified as 30 / 100.
[0070] In one example, gender can be quantified as a first positive integer or a second positive integer, where the first positive integer represents male and the second positive integer represents female. For example, the first positive integer is 1 and the second positive integer is 2, but the present application is not limited thereto.
[0071] Alternatively or additionally, at least one piece of patient information in the current patient sample may be quantified using a table lookup method, thereby simplifying the construction of a machine learning model.
[0072] In one example, different positive integers can be assigned to different diseases, and the assignments between diseases and corresponding positive integers can be pre-stored in the form of a lookup table. Therefore, when quantifying a patient's disease, the lookup table is used to search for the positive integer corresponding to the patient's disease. Table 2 shows an example of a lookup table for quantifying diseases.
[0073] Table 2 Lookup table for quantifying disease
[0074] In one example, different positive integers can be assigned to different departments, and the assignments between departments and corresponding positive integers can be pre-stored in the form of a lookup table. Therefore, when quantifying the department to which a patient sample belongs, the lookup table is used to search for the positive integer corresponding to the department to which the patient sample belongs. Table 3 shows an example of a lookup table for quantifying departments.
[0075] Table 3 Lookup table for quantifying departments
[0076] In some embodiments, in step S120, the average value of the actual test results for the target item of n patient samples (the value of n is, for example, the daily test throughput of the detection instrument) among the multiple known patient samples before a specific moment can also be used as a variable of the machine learning model, so as to reduce, for example, the diurnal effects caused by the calibration of the detection instrument and the diurnal effects caused by the reagents.
[0077] The machine learning model is trained by using actual test results of a target item from a plurality of known patient samples (i.e., historical patient samples) and patient information. Here, the machine learning model may further characterize the relationship between the patient information, the mean of the actual test results of the plurality of known patient samples, and the test results of the target item. In other words, if the patient information is input into the machine learning model, the predicted test results for the target item predicted by the machine learning model will be obtained.
[0078] In some embodiments, in step S120, that is, obtaining monitoring indicators based on the actual detection results and the predicted detection results may include:
[0079] performing data processing on the actual detection results, wherein the data processing includes truncation processing and / or normalization processing; and
[0080] The monitoring indicator is obtained based on the actual detection result and the predicted detection result after data processing.
[0081] However, in the embodiment of the present invention, due to the use of a machine learning model, the actual detection results may not be normalized, thereby simplifying data processing.
[0082] In some embodiments, in step S140, when one of the monitoring indicators exceeds a preset control line, it can be determined that the detection instrument is out of control and an alarm prompt can be output.
[0083] In other embodiments, in step S140, the detection instrument may be judged to be out of control and an alarm may be output only when M consecutive monitoring indicators (obtained in chronological order) exceed a preset control line, where M is a natural number greater than 1. This can reduce the false alarm rate compared to the case where an alarm is issued when a single monitoring indicator exceeds the preset control line.
[0084] In yet other embodiments, in step S140, the monitoring indicators of a first number M of consecutive patient samples can be obtained in chronological order, and whether the detection instrument is under control can be determined based on the monitoring indicators of the first number M of consecutive patient samples; when the monitoring indicators of at least a second number N of current patient samples among the first number M of consecutive current patient monitoring indicators (obtained in chronological order) exceed the preset control line, the detection instrument is determined to be out of control and an alarm prompt indicating that the detection instrument is out of control is output, wherein the first number M and the second number N are both natural numbers greater than 1 and the first number M is greater than the second number N. In this way, false alarms and true alarms can be significantly distinguished. Compared with the situation where an alarm is triggered when one monitoring indicator exceeds the preset control line, the false alarm rate can be reduced, and the number of samples required for error detection can be kept as small as possible.
[0085] In some embodiments, in step S140, when the detection instrument is judged to be out of control based on the monitoring indicators, a quality control sample for the target item can be automatically retrieved and tested by the detection instrument to obtain the test results of the quality control sample; and based on the test results of the quality control sample, it is determined whether the detection instrument is out of control. In other words, when the detection instrument is judged to be out of control based on the test results of actual patient samples, the quality control sample is further used to test the detection instrument to determine whether the detection instrument is truly out of control.
[0086] In some embodiments, the parameters of the computational model may be optimized in the following manner:
[0087] Obtaining actual test results of a plurality of historical patient samples for the target item and patient information, wherein the actual test results are obtained by testing the plurality of historical patient samples by the testing instrument under a controlled state;
[0088] Given a false alarm rate;
[0089] A plurality of SPC parameter values of the given calculation model;
[0090] For each SPC parameter value, the upper and lower control lines and the number of samples required for average error detection at the desired false alarm rate are calculated as follows:
[0091] The actual test results of the plurality of historical patient samples and the patient information are used in the calculation model having the SPC parameter value to calculate the monitoring index under the SPC parameter value, and the upper and lower control lines are obtained based on the monitoring index under the SPC parameter value and the false alarm rate.
[0092] In the calculation model having the SPC parameter value, a simulated data set containing multiple simulated instrument out-of-control locations or a real data set containing multiple real instrument out-of-control locations is used to calculate the monitoring index of the presence of instrument out-of-control at the SPC parameter value, and the monitoring index is compared with the upper and lower control lines to calculate the average number of samples required from the start of the simulated instrument out-of-control location or the real instrument out-of-control location to the actual monitoring of the simulated instrument out-of-control location or the real instrument out-of-control location, that is, the average number of samples required for error detection.
[0093] The simulated data set is obtained by adding errors to the actual test results of the multiple historical patient samples at different time points multiple times, and the real data set is obtained from the actual test results and patient information of the multiple historical patient samples or by obtaining the actual test results and patient information of multiple other historical patient samples for the target item, and
[0094] The SPC parameter value with the minimum number of samples required for average error detection and the upper and lower control lines corresponding to the SPC parameter value are selected to construct the optimized calculation model.
[0095] In other embodiments, the parameters of the truncation process and the parameters of the calculation model may be optimized in the following manner:
[0096] Obtaining actual test results of a plurality of historical patient samples for the target item and patient information, wherein the actual test results are obtained by testing the historical patient samples with the testing instrument under a controlled state;
[0097] Given a false alarm rate;
[0098] providing a plurality of truncation ratios of the truncation process and a plurality of SPC parameter values of the calculation model;
[0099] For each combination of each cutoff ratio and each SPC parameter value, the upper and lower control lines and the number of samples required for average error detection at the false alarm rate are calculated as follows:
[0100] In the calculation model having the parameter value combination, actual test results of the plurality of historical patient samples and patient information are used to calculate the monitoring index under the parameter value combination, and the upper and lower control lines are obtained based on the monitoring index under the parameter value combination and the false alarm rate.
[0101] In the calculation model having the parameter value combination, a simulated data set containing multiple simulated instrument out-of-control locations or a real data set containing multiple real instrument out-of-control locations is used to calculate the monitoring index of the presence of instrument out-of-control under the parameter value combination, and the monitoring index is compared with the upper and lower control lines to calculate the average number of samples required from the start of the simulated instrument out-of-control location or the real instrument out-of-control location to the actual monitoring of the simulated instrument out-of-control location or the real instrument out-of-control location, that is, the average number of samples required for error detection.
[0102] The simulated data set is obtained by adding errors to the actual test results of the multiple historical patient samples at different time points multiple times, and the real data set is obtained from the actual test results and patient information of the multiple historical patient samples or by obtaining the actual test results and patient information of multiple other historical patient samples for the target item; and
[0103] A parameter value combination with the minimum number of samples required for average error detection and upper and lower control lines corresponding to the parameter value combination are selected to construct the optimized truncation process and the calculation model.
[0104] Figure 4 is a schematic block diagram of a computer system 200 for performing real-time quality control based on patient samples according to an embodiment of the present application. As shown in Figure 4, the computer system 200 includes a data acquisition module 210, a prediction result acquisition module 220, a monitoring indicator acquisition module 230, and a quality control module 240.
[0105] The data acquisition module 210 is configured to acquire the actual test results and patient information of the current patient sample obtained by the detection instrument for the target item in real time during the process of the detection instrument performing real-time detection on the current patient sample, that is, in real time, wherein the patient information includes the patient's disease, age, gender and at least one of the department to which the sample belongs.
[0106] The prediction result acquisition module 220 is configured to quantify the patient information of the current patient sample and input the quantified patient information into a pre-built machine learning model to obtain the output result of the machine learning model as the predicted detection result for the target item, wherein the machine learning model is trained through the actual detection results of the target item and patient information of multiple known patient samples.
[0107] The monitoring indicator acquisition module 230 is configured to acquire monitoring indicators based on the actual test results of the current patient sample and the predicted test results.
[0108] The quality control module 240 is configured to determine whether the detection instrument is under control based on the monitoring indicators and / or determine whether to issue an alarm indicating that the detection instrument is out of control based on the monitoring indicators. When the detection instrument is determined to be out of control based on the monitoring indicators, the quality control module 240 outputs an alarm indicating that the detection instrument is out of control.
[0109] The computer system 200 proposed in the embodiment of the present application can be implemented in the form of hardware, such as a processor, or in the form of software, such as software that can be installed and executed on a computer. This application does not make any specific restrictions on this.
[0110] In some embodiments, the machine learning model may be a neural network model. In other embodiments, the machine learning model may be a machine learning model based on SVM (support vector machine) and / or LDA (support vector machine).
[0111] In some embodiments, the target items can be routine blood test items, such as cell count (such as white blood cell count, platelet count, red blood cell count, etc.) and classification (such as white blood cell classification, etc.), hemoglobin content, etc.; accordingly, the detection instrument is a blood cell analyzer.
[0112] In other embodiments, the target items may be biochemical test items, such as thyroid function (such as thyroid-stimulating hormone, etc.), liver function, kidney function, blood lipids, blood sugar, etc.; accordingly, the detection instrument is a biochemical analyzer.
[0113] In some embodiments, the patient information may include multiple of the patient's disease, age, gender, and the department to which the sample belongs. Preferably, the patient information may include the patient's disease, age, gender, and the department to which the sample belongs.
[0114] In some embodiments, the patient information can be obtained from the laboratory (testing department) information system of the hospital where the testing instrument is located.
[0115] In some embodiments, the monitoring indicator acquisition module 230 may be further configured to:
[0116] Calculating the difference between the actual detection result and the predicted detection result; and
[0117] The difference is input into a calculation model based on a process control SPC algorithm to obtain an output result of the calculation model as the monitoring indicator.
[0118] The process control SPC algorithm may, for example, include at least one of a floating mean, a floating median, an exponentially weighted moving average, a floating standard deviation, a floating quantile, and a floating number of patients with abnormal values.
[0119] In some embodiments, the prediction result acquisition module 220 can be further configured to quantify at least one of the patient information of the current patient sample, especially at least one of the disease, gender, and department to which the sample belongs, into a matrix.
[0120] Furthermore, the prediction result acquisition module 220 can be further configured to quantify each type of patient information in the at least one type of patient information of the current patient sample into a one-dimensional matrix having multiple elements, wherein each element of the one-dimensional matrix represents a category, and the patient information belongs to at least one of the categories represented by the element.
[0121] Preferably, the prediction result acquisition module 220 can be further configured to quantify each type of patient information in the at least one type of patient information of the current patient sample into a one-dimensional matrix consisting of 0 and 1 having multiple elements, wherein the value of the element representing the category to which the patient information belongs is 1, and the values of the remaining elements are 0.
[0122] In some embodiments, the prediction result acquisition module 220 may be further configured to quantify at least one piece of patient information in the patient information of the current patient sample, especially age, as a fixed value, preferably as a fixed integer.
[0123] Alternatively or additionally, the prediction result acquisition module 220 may be further configured to quantify at least one piece of patient information in the current patient sample by using a table lookup method, thereby simplifying the construction of the machine learning model.
[0124] For specific quantization examples, reference may be made to the above detailed descriptions of various embodiments of the method 100 , which will not be repeated here.
[0125] In some embodiments, the monitoring indicator acquisition module 230 may be further configured to:
[0126] performing data processing on the actual detection results, wherein the data processing includes truncation processing and / or normalization processing; and
[0127] The monitoring indicator is obtained based on the actual detection result and the predicted detection result after data processing.
[0128] However, in the embodiment of the present invention, due to the use of a machine learning model, the actual detection results may not be normalized, thereby simplifying data processing.
[0129] In some embodiments, the quality control module 240 may be further configured to determine that the detection instrument is out of control and output an alarm prompt when one of the monitoring indicators exceeds a preset control line.
[0130] In other embodiments, the quality control module 240 may be further configured to determine that the detection instrument is out of control and output an alarm only when M consecutive monitoring indicators (obtained in chronological order) exceed a preset control line, where M is a natural number greater than 1. Compared to issuing an alarm when a single monitoring indicator exceeds a preset control line, this can reduce the false alarm rate.
[0131] In yet other embodiments, the quality control module 240 can be further configured to obtain monitoring indicators of a first number M of consecutive current patient samples in chronological order, and determine whether the detection instrument is under control based on the monitoring indicators of the first number M of consecutive current patient samples; only when the monitoring indicators of at least a second number N of current patient samples among the monitoring indicators of the first number M of consecutive current patient samples (obtained in chronological order) exceed the preset control line, will it be determined that the detection instrument is out of control and an alarm prompt indicating that the detection instrument is out of control is output, wherein the first number M and the second number N are both natural numbers greater than 1 and the first number M is greater than the second number N. In this way, false alarms and true alarms can be significantly distinguished. Compared with the situation where an alarm is issued when one monitoring indicator exceeds the preset control line, the false alarm rate can be reduced, and the number of samples required for error detection is kept as small as possible.
[0132] In some embodiments, the quality control module 240 can be further configured to automatically retrieve quality control products for the target project to the testing instrument for testing to obtain the test results of the quality control products when the testing instrument is judged to be out of control based on the monitoring indicators; and judge whether the testing instrument is out of control based on the test results of the quality control products.
[0133] In some embodiments, the monitoring indicator acquisition module can be optimized in the following ways:
[0134] Obtaining actual test results of a plurality of historical patient samples for the target item and patient information, wherein the actual test results are obtained by testing the plurality of historical patient samples by the testing instrument under a controlled state;
[0135] Given a false alarm rate;
[0136] A plurality of SPC parameter values of the given calculation model;
[0137] For each SPC parameter value, the upper and lower control lines and the number of samples required for average error detection at the desired false alarm rate are calculated as follows:
[0138] The actual test results of the plurality of historical patient samples and the patient information are used in the calculation model having the SPC parameter value to calculate the monitoring index under the SPC parameter value, and the upper and lower control lines are obtained based on the monitoring index under the SPC parameter value and the false alarm rate.
[0139] In the calculation model having the SPC parameter value, a simulated data set containing multiple simulated instrument out-of-control locations or a real data set containing multiple real instrument out-of-control locations is used to calculate the monitoring index of the presence of instrument out-of-control at the SPC parameter value, and the monitoring index is compared with the upper and lower control lines to calculate the average number of samples required from the start of the simulated instrument out-of-control location or the real instrument out-of-control location to the actual monitoring of the simulated instrument out-of-control location or the real instrument out-of-control location, that is, the average number of samples required for error detection.
[0140] The simulated data set is obtained by adding errors to the actual test results of the multiple historical patient samples at different time points multiple times, and the real data set is obtained from the actual test results and patient information of the multiple historical patient samples or by obtaining the actual test results and patient information of multiple other historical patient samples for the target item, and
[0141] The SPC parameter value with the minimum number of samples required for average error detection and the upper and lower control lines corresponding to the SPC parameter value are selected to construct the optimized calculation model.
[0142] In other embodiments, the monitoring indicator acquisition module may be optimized in the following ways:
[0143] Obtaining actual test results of a plurality of historical patient samples for the target item and patient information, wherein the actual test results are obtained by testing the historical patient samples with the testing instrument under a controlled state;
[0144] Given a false alarm rate;
[0145] providing a plurality of truncation ratios of the truncation process and a plurality of SPC parameter values of the calculation model;
[0146] For each combination of each cutoff ratio and each SPC parameter value, the upper and lower control lines and the number of samples required for average error detection at the false alarm rate are calculated as follows:
[0147] In the calculation model having the parameter value combination, actual test results of the plurality of historical patient samples and patient information are used to calculate the monitoring index under the parameter value combination, and the upper and lower control lines are obtained based on the monitoring index under the parameter value combination and the false alarm rate.
[0148] In the calculation model having the parameter value combination, a simulated data set containing multiple simulated instrument out-of-control locations or a real data set containing multiple real instrument out-of-control locations is used to calculate the monitoring index of the presence of instrument out-of-control under the parameter value combination, and the monitoring index is compared with the upper and lower control lines to calculate the average number of samples required from the start of the simulated instrument out-of-control location or the real instrument out-of-control location to the actual monitoring of the simulated instrument out-of-control location or the real instrument out-of-control location, that is, the average number of samples required for error detection.
[0149] The simulated data set is obtained by adding errors to the actual test results of the multiple historical patient samples at different time points multiple times, and the real data set is obtained from the actual test results and patient information of the multiple historical patient samples or by obtaining the actual test results and patient information of multiple other historical patient samples for the target item; and
[0150] A parameter value combination with the minimum number of samples required for average error detection and upper and lower control lines corresponding to the parameter value combination are selected to construct the optimized truncation process and the calculation model.
[0151] The various embodiments and advantages of the method 100 provided in the embodiment of the present application can be correspondingly transferred to the computer system 200 provided in the embodiment of the present application, and therefore will not be described in detail.
[0152] FIG5 shows a method 300 for constructing a quality control model for real-time quality control based on patient samples according to an embodiment of the present application, comprising the following steps:
[0153] S310, obtaining data of multiple patient samples and dividing the data into a training set and a test set (for example, the data can be divided into a training set and a test set in chronological order), wherein the data includes the actual test results of the multiple patient samples for the target items and patient information, wherein the actual test results are obtained by testing the patient samples by a testing instrument, and the patient information includes at least one of the patient's disease, age, gender, and department to which the sample belongs, wherein the data in the training set is obtained when the testing instrument is in a controlled state. Here, for example, the actual test results of the target items and patient information of multiple patient samples, especially all patient samples, detected by the testing instrument in chronological order within a certain period of time are obtained.
[0154] In step S310 , the sample ratio of the training set and the test set can be set to 6:4 or 7:3, etc.
[0155] S320, using the training set to establish a machine learning model, the method is to quantify the patient information of the patient samples in the training set, and establish a machine learning model that satisfies the following formula between the quantified patient information and the actual test results in the training set, X t =f(x 1t ,x 2t ,...,x nt )+ε t
[0156] Among them, X t is the actual detection result in the training set, f(x 1t ,x 2t ,...,x nt ) is a machine learning model, x 1t ,x 2t ,...,x nt represents the quantified patient information, ε t Represents the estimation of X using the machine learning model t That is, using the historical test results and patient information of the controlled test instrument to learn and regress the machine learning model f, at this time ε t Approximately a random distribution with mean 0.
[0157] S330, constructing a quality control model for real-time quality control based on patient samples based on the machine learning model.
[0158] S340: Use the test set to verify the quality control model to verify the performance of the quality control model.
[0159] Since the machine learning model f is a nonlinear function of an artificial neural network, it reasonably estimates the deviations caused by factors such as disease, age, and gender. After eliminating such factors that affect parameter fluctuations, the monitoring indicators obtained by the quality control model constructed based on the machine learning model are stable, which improves the system error detection performance compared with the existing PBRTQC technology.
[0160] When the detection instrument is in a normal controlled state, the residual ε t Random fluctuations and the sum of square errors are minimized. In some embodiments, a loss function min∑‖ε can be established based on this principle. t ‖ 2 , by taking the training samples, i.e. the actual test results of the above-mentioned multiple patient samples and the patient information as input, the machine learning model f(x 1t ,x2t ,…,x nt ).
[0161] In some embodiments, the machine learning model may be a neural network model, wherein the structure of the neural network model is shown in Figure 6. In other embodiments, the machine learning model may be a machine learning model based on SVM (support vector machine) and / or LDA (support vector machine).
[0162] In some embodiments, in step S330, constructing a quality control model for real-time quality control based on patient samples based on the machine learning model may include: constructing the quality control model based on the machine learning model and a computational model based on a process control SPC algorithm, wherein the difference between the actual test result and the test result predicted by the machine learning model f, i.e., the residual ε t The data are input into a calculation model based on a process control SPC algorithm to obtain the output of the calculation model as a monitoring indicator of the quality control model.
[0163] However, in other embodiments, the monitoring indicators of the quality control model may be calculated from the actual test results and the test results predicted by the machine learning model f in other ways, such as by calculating the ratio.
[0164] In some embodiments, in step S320, the average value of the actual test results for the target item of n patient samples in the test set before a specific time (the value of n is, for example, the daily test throughput of the detection instrument) can also be used as a variable of the machine learning model to reduce, for example, the diurnal effects caused by the calibration of the detection instrument and the diurnal effects caused by the reagents.
[0165] Furthermore, in step S330, the false alarm rate is given and the upper and lower control lines of the quality control model are obtained based on the monitoring index and the false alarm rate. Here, in the process of using the above quality control model for real-time quality control, if the detection instrument is out of control, the residual ε t Non-random characteristics will be generated. After calculation based on the process control SPC algorithm, the monitoring indicators will exceed the upper control line or the lower control line, thereby generating an alarm, indicating that the detection instrument is out of control.
[0166] In some embodiments, the process control SPC algorithm may include at least one of a floating mean, a floating median, an exponentially weighted moving average, a floating standard deviation, a floating quantile, and a floating number of outlier patients.
[0167] In some embodiments, as shown in FIG7 , in step S330 , the parameters of the calculation model may be optimized in the following manner:
[0168] Step S331a, setting the false alarm rate FAR;
[0169] Step S332a, providing multiple SPC parameter values of the calculation model;
[0170] Step S333a, for each SPC parameter value, the upper and lower control lines and the number of samples required for average error detection under the false alarm rate are obtained in the following manner:
[0171] In the quality control model having the SPC parameter value, the actual test results in the training set and the patient information are used to calculate the monitoring index under the SPC parameter value, and the upper and lower control lines are obtained based on the monitoring index under the SPC parameter value and the false alarm rate.
[0172] A simulated data set containing multiple simulated instrument out-of-control locations or a real data set containing multiple real instrument out-of-control locations is used in the quality control model having the SPC parameter value to calculate a monitoring indicator of the presence of instrument out-of-control at the parameter value, and the monitoring indicator is compared with the upper and lower control lines to calculate the average number of samples required from the start of the simulated instrument out-of-control locations or the real instrument out-of-control locations to the actual monitoring of the simulated instrument out-of-control or the real instrument out-of-control by the quality control model, that is, the average number of samples required to detect the error ANPed, wherein the simulated data set is obtained by adding errors to the actual test results in the training set multiple times at different time points, and the real data set is obtained from the data of the multiple patient samples or by obtaining the actual test results for the target items of multiple other patient samples and their patient information, and
[0173] Step S334a, selecting the SPC parameter value with the minimum number of samples required for average error detection and the upper and lower control lines corresponding to the SPC parameter value to construct an optimized quality control model.
[0174] Here, the false alarm rate directly determines the upper and lower control lines. The false alarm rate is usually set by the user in combination with usage conditions, such as setting the false alarm rate to 0.1%. Once the false alarm rate is determined, the upper and lower control lines can also be determined.
[0175] Here, it can be understood that in the process of optimizing the parameters of the calculation model, other parameters of the quality control model, such as the value of the truncation ratio, are selected to be fixed, for example, selected based on experience.
[0176] Preferably, a simulated data set containing multiple simulated instrument out-of-control conditions is used to calculate the average number of samples required for error detection ANPed, that is: the actual test results in the training set and the patient information are used in the quality control model having the SPC parameter value to calculate the monitoring indicators under the SPC parameter value, and the upper and lower control lines are obtained based on the monitoring indicators under the parameter value and the false alarm rate; errors are added to the actual test results of the target items of the patient samples in the training set at different time points multiple times, and after the errors are added, the actual test results of the target items of the patient samples in the training set are input into the quality control model having the SPC parameter value together with the corresponding patient information to obtain the monitoring indicators after the error is added and compared with the upper and lower control lines, so as to calculate the average number of samples required from the start of the error addition to the actual detection of the error by the quality control model, that is, the average number of samples required for error detection ANPed.
[0177] Taking the sliding mean SPC algorithm as an example, the parameters of the calculation model based on the sliding mean method are sliding windows. Given a false alarm rate of 0.1%, and given sliding window parameter values of 5, 10, 15, 20, 50, and 100, the training set is used to calculate monitoring indicators under different sliding windows. Then, based on the monitoring indicators and false alarm rates, upper and lower control lines are calculated. (For example, using the actual test results for the target item from N patient samples and patient information to calculate the monitoring indicators, the number of false alarms is N*0.1%, and the number of false alarms above and below is N*0.1% / 2. Based on this, the upper and lower control lines are found, and N*0.1% / 2 monitoring indicators exceed these upper and lower control lines, respectively.) Errors are then randomly added to multiple locations in the training set. The number of samples required to detect each error is calculated, and the average number of samples required to detect the average error is taken. This results in the parameter value that satisfies the given false alarm rate and the minimum number of samples required to detect the average error.
[0178] In some embodiments, steps S331a, S332a, S333a, and S334a may be repeated, and then the minimum average error detection sample number ANPedmin is selected from the average error detection sample number under multiple false alarm rates (FAR) (e.g., 0.001%, 0.01%, 0.1%, 1%, 3%, and 5%), thereby obtaining a parameter value corresponding to the minimum average error detection sample number and upper and lower control lines corresponding to the parameter value to construct an optimized quality control model. Of course, in other embodiments, the false alarm rate (FAR) and the minimum average error detection sample number ANPedmin under the false alarm rate (FAR) may be weighted and then summed, i.e., sum = FAR*a+ANPedmin*b, where a is the weight of the false alarm rate (FAR) and b is the weight of the minimum average error detection sample number ANPedmin. Calculate the sum of each false alarm rate FAR and the minimum average error detection sample number ANPedmin under the corresponding false alarm rate FAR, and then select the minimum average error detection sample number corresponding to the minimum sum value and its corresponding parameter value.
[0179] In other embodiments, if there is data showing that the test set detects instrument out of control, the test set can be used as the real data set to obtain the upper and lower control lines and the average number of samples required for error detection under the false alarm rate for each SPC parameter value, in the following manner: the actual test results of the patient samples in the training set for the target items and the patient information are used in the quality control model with the SPC parameter value to calculate the monitoring indicators under the SPC parameter value, and the upper and lower control lines are obtained based on the monitoring indicators and the false alarm rate under the SPC parameter value; the actual test results of the patient samples in the test set for the target items together with the corresponding patient information are input into the quality control model with the SPC parameter value to obtain the monitoring indicators corresponding to the test set and compare them with the upper and lower control lines, so as to calculate the average number of samples required from the start of instrument out of control to the actual monitoring of the out of control by the quality control model, that is, the average number of samples required for error detection ANPed.
[0180] In yet other embodiments, an additional test set can be obtained, wherein the additional test set includes actual test results of target items for multiple patient samples and patient information, wherein the actual test results are obtained by testing the patient samples by a testing instrument, and the patient information includes the patient's disease, age, gender, and at least one of the departments to which the samples belong, wherein the additional test set includes data on the loss of control of the testing instrument. Here, the additional test set can be used to obtain the upper and lower control lines and the average number of samples required for error detection under the false alarm rate for each SPC parameter value, in the following manner: the actual test results of the patient samples in the training set for the target item and the patient information are used in the quality control model with the SPC parameter value to calculate the monitoring index under the SPC parameter value, and the upper and lower control lines are obtained based on the monitoring index and the false alarm rate under the SPC parameter value; the actual test results of the patient samples in the additional test set for the target item are input into the quality control model with the SPC parameter value together with the corresponding patient information to obtain the monitoring index corresponding to the additional test set and compare it with the upper and lower control lines, so as to calculate the average number of samples required from the start of the instrument out of control to the actual monitoring of the quality control by the quality control model, that is, the average number of samples required for error detection ANPed. In some embodiments, the actual test results of the patient samples in the training set for the target item can be truncated and optionally normalized before establishing the machine learning model.
[0181] In some embodiments, a fixed truncation ratio may be set for truncation processing.
[0182] In some embodiments, as shown in FIG8 , the parameters of the truncation process and the parameters of the calculation model may be optimized in the following manner:
[0183] Step S331b, setting the false alarm rate FAR;
[0184] Step S332b, providing a plurality of truncation ratios of the truncation process and a plurality of SPC parameter values of the calculation model;
[0185] Step S333b, for each combination of each cutoff ratio and each SPC parameter value, obtain the upper and lower control lines and the number of samples required for average error detection at the false alarm rate, in the following manner:
[0186] In the quality control model having the parameter value combination, the actual test results in the training set and the patient information are used to calculate the monitoring index under the parameter value combination, and the upper and lower control lines are obtained based on the monitoring index under the parameter value combination and the false alarm rate.
[0187] In the quality control model having the parameter value combination, a simulated data set containing multiple simulated instrument out-of-control locations or a real data set containing multiple real instrument out-of-control locations is used to calculate the monitoring index of the presence of instrument out-of-control under the parameter value combination, and the monitoring index is compared with the upper and lower control lines to calculate the average number of samples required from the start of the simulated instrument out-of-control location or the real instrument out-of-control location to the actual monitoring of the simulated instrument out-of-control location or the real instrument out-of-control location by the quality control model, that is, the average number of samples required for error detection.
[0188] The simulated data set is obtained by adding errors to the actual test results in the training set multiple times at different time points, and the real data set is obtained from the data of the multiple patient samples or by obtaining the actual test results for the target items of multiple additional patient samples and their patient information; and
[0189] Step S334b: Select the parameter value combination with the minimum number of samples required for average error detection and the upper and lower control lines corresponding to the parameter value combination to construct an optimized quality control model.
[0190] Here, it can be understood that, in the process of optimizing the parameters of the truncation process and the parameters of the calculation model, the values of other parameters of the quality control model are selected to be fixed, for example, selected based on experience.
[0191] Preferably, a simulated data set containing multiple simulated instrument out-of-control conditions is used to calculate the average number of samples required for error detection ANPed, that is: the actual test results of the target items of the patient samples in the training set and the patient information are used in the quality control model with the parameter value combination to calculate the monitoring indicators under the parameter value, and the upper and lower control lines are obtained based on the monitoring indicators under the parameter value and the false alarm rate; errors are added to the actual test results of the target items of the patient samples in the training set at different time points multiple times, and after the errors are added, the actual test results of the target items of the patient samples in the training set are input into the quality control model with the parameter value combination together with the corresponding patient information to obtain the monitoring indicators after the error is added and compared with the upper and lower control lines, so as to calculate the average number of samples required from the start of the error addition to the actual monitoring of the error by the quality control model, that is, the average number of samples required for error detection ANPed.
[0192] Similarly, in some embodiments, steps S331b, S332b, S333b, and S334b may be repeated, and then the minimum average error detection required number of samples is selected from the average error detection required number of samples under multiple false alarm rates (e.g., 0.001%, 0.01%, 0.1%, 1%, 3%, and 5%), thereby obtaining a parameter value combination corresponding to the minimum average error detection required number of samples and upper and lower control lines corresponding to the parameter value combination to construct an optimized quality control model. Of course, in other embodiments, the false alarm rate FAR and the minimum average error detection required number of samples ANPedmin under the false alarm rate FAR may be weighted and then summed, i.e., sum = FAR*a+ANPedmin*b, where a is the weight of the false alarm rate FAR and b is the weight of the minimum average error detection required number of samples ANPedmin. Calculate the sum of each false alarm rate FAR and the minimum average error detection sample number ANPedmin under the corresponding false alarm rate FAR, and then select the minimum average error detection sample number corresponding to the minimum sum value and its corresponding parameter value combination.
[0193] Taking the floating mean method as an example of the process control SPC algorithm, the parameter of the calculation model based on the floating mean method is a sliding window. The parameters to be optimized of the quality control model include the sliding window and the truncation ratio. The false alarm rate is given to be 0.1%, and the parameter values of the sliding window are given to be 5, 10, 15, 20, 50 and 100, and the parameter values of the truncation ratio of the given truncation processing are ±0%, ±1%, ±2%, ±5%. The training set is used to calculate the monitoring indicators under different parameter value combinations of the sliding window and the truncation ratio (in this example, there are a total of 24 parameter value combinations), and then the upper and lower control lines are calculated based on the monitoring indicators and the false alarm rate (for example, the monitoring indicators are calculated using the actual test results of the target items of N patient samples and the patient information, then the number of false alarms is N*0.1%, and the number of upper and lower false alarms is N*0.1% / 2. Based on this, the upper control line and the lower control line are found, and there are N*0.1% / 2 monitoring indicators exceeding the upper control line and the lower control line respectively.). Then, errors are randomly added to multiple places in the training set, the number of samples required for error detection each time is calculated, and then the average number of samples required for error detection is obtained, so as to find the parameter value combination that meets the given false alarm rate and the minimum average number of samples required for error detection.
[0194] In some embodiments, if there is data showing that the test instrument is out of control in the test set, the test set can be used to obtain the upper and lower control lines and the average number of samples required for error detection under the false alarm rate for each parameter value combination, in the following manner: the actual test results of the patient samples in the training set for the target items and the patient information are used in the quality control model with the parameter value combination to calculate the monitoring indicators under the parameter value combination, and the upper and lower control lines are obtained based on the monitoring indicators and the false alarm rate under the parameter value combination, and the actual test results of the patient samples in the test set for the target items together with the corresponding patient information are input into the quality control model with the parameter value combination to obtain the monitoring indicators corresponding to the test set and compare them with the upper and lower control lines, so as to calculate the average number of samples required from the start of instrument quality control to the actual monitoring of the quality control by the quality control model, that is, the average number of samples required for error detection ANPed.
[0195] In yet other embodiments, an additional test set can be obtained, wherein the additional test set includes actual test results of target items for multiple patient samples and patient information, wherein the actual test results are obtained by testing the patient samples by a testing instrument, and the patient information includes the patient's disease, age, gender, and at least one of the departments to which the samples belong, wherein the additional test set includes data on the loss of control of the testing instrument. Here, the additional test set can be used to obtain the upper and lower control lines and the average number of samples required for error detection under the false alarm rate for each parameter value combination, in the following manner: the actual test results of the patient samples in the training set for the target items and the patient information are used in the quality control model with the parameter value combination to calculate the monitoring indicators under the parameter value combination, and the upper and lower control lines are obtained based on the monitoring indicators and the false alarm rate under the parameter value combination, and the actual test results of the patient samples in the additional test set for the target items together with the corresponding patient information are input into the quality control model with the parameter value combination to obtain the monitoring indicators corresponding to the additional test set and compare them with the upper and lower control lines, so as to calculate the average number of samples required from the start of the instrument out of control to the actual monitoring of the quality control by the quality control model, that is, the average number of samples required for error detection ANPed.
[0196] In some embodiments, when using the above-mentioned quality control model for real-time quality control, the detection instrument can be judged to be out of control and an alarm prompt can be output when at least N monitoring indicators among M consecutive monitoring indicators (obtained in chronological order) exceed the upper and lower control lines, where M and N are both natural numbers greater than 1 and M is greater than N.
[0197] In some embodiments, as shown in FIG9 , M and N may also be parameters to be optimized for the quality control model, that is, the parameters of the calculation model and M, N, and the optional truncation processing parameters are optimized in the following manner:
[0198] S331c, given false alarm rate;
[0199] S332c, given a plurality of SPC parameter values of the calculation model, a plurality of parameter values of M, a plurality of parameter values of N, and optionally a plurality of truncation ratios of the truncation process;
[0200] S333c, for each SPC parameter value, each M parameter value, each N parameter value, and optionally each parameter value combination of each cutoff ratio, calculate the upper and lower control lines and the number of samples required for average error detection at the false alarm rate, in the following manner:
[0201] In the quality control model having the parameter value combination, the actual test results in the training set and the patient information are used to calculate the monitoring index under the parameter value combination, and the upper and lower control lines are obtained based on the monitoring index under the parameter value combination and the false alarm rate.
[0202] In the quality control model having the parameter value combination, a simulated data set containing multiple simulated instrument out-of-control locations or a real data set containing multiple real instrument out-of-control locations is used to calculate the monitoring index of the presence of instrument out-of-control under the parameter value combination, and the monitoring index is compared with the upper and lower control lines to calculate the average number of samples required from the start of the simulated instrument out-of-control location or the real instrument out-of-control location to the actual monitoring of the simulated instrument out-of-control location or the real instrument out-of-control location by the quality control model, that is, the average number of samples required for error detection.
[0203] The simulated data set is obtained by adding errors to the actual test results in the training set at different time points for multiple times, and the real data set is obtained from the data of the multiple patient samples or by obtaining multiple other
[0204] to obtain the actual test results of the target items and patient information of patient samples other than the target items; and
[0205] S334c, select the parameter value combination with the minimum number of samples required for average error detection and the upper and lower control lines corresponding to the parameter value combination to construct an optimized quality control model.
[0206] It is understood that when optimizing the parameters of the computational model, M, N, and the optional truncation processing parameters, the values of other parameters of the quality control model can be fixed, for example, based on experience. For example, when optimizing the parameters of the computational model, M, N, and the optional truncation processing parameters, the truncation ratio of the truncation processing can be fixed.
[0207] Similarly, in some embodiments, steps S331c, S332c, S333c, and S334c can be repeated, and then the minimum average error detection required number of samples is selected from the average error detection required number of samples under multiple false alarm rates (e.g., 0.001%, 0.01%, 0.1%, 1%, 3%, and 5%), thereby obtaining a parameter value combination corresponding to the minimum average error detection required number of samples and upper and lower control lines corresponding to the parameter value combination to construct an optimized quality control model. Of course, in other embodiments, the false alarm rate FAR and the minimum average error detection required number of samples ANPedmin under the false alarm rate FAR can also be weighted and then summed, that is, sum = FAR*a+ANPedmin*b, where a is the weight of the false alarm rate FAR and b is the weight of the minimum average error detection required number of samples ANPedmin. Calculate the sum of each false alarm rate FAR and the minimum average error detection sample number ANPedmin under the corresponding false alarm rate FAR, and then select the minimum average error detection sample number corresponding to the minimum sum value and its corresponding parameter value combination.
[0208] Preferably, a simulated data set containing multiple simulated instrument out-of-control conditions is used to calculate the average number of samples required for error detection ANPed, that is: the actual test results in the training set and the patient information are used in the quality control model having the parameter value combination to calculate the monitoring indicators under the parameter value, and the upper and lower control lines are obtained based on the monitoring indicators under the parameter value and the false alarm rate; errors are added to the actual test results of the target items of the patient samples in the training set at different time points multiple times, and after the errors are added, the actual test results of the target items of the patient samples in the training set are input into the quality control model having the parameter value combination together with the corresponding patient information to obtain the monitoring indicators after the error is added and compared with the upper and lower control lines, so as to calculate the average number of samples required from the start of the error addition to the actual monitoring of the error by the quality control model, that is, the average number of samples required for error detection ANPed.
[0209] Taking the sliding mean SPC algorithm as an example, the parameters of the calculation model based on the sliding mean method are sliding windows. The parameters to be optimized in the quality control model include the sliding window, the cutoff ratio, and M and N. A false alarm rate of 0.1% is given, and the sliding window parameter values are given as 10, 20, 50, 70, and 100. The cutoff ratio parameter values for the cutoff process are given as ±0%, ±1%, ±2%, and ±5%, and the parameter values for M and N are given as shown in Table 4. Using the training set, monitoring indicators are calculated for different combinations of sliding window, cutoff ratio, M, and N. Upper and lower control lines are then calculated based on the monitoring indicators and false alarm rate. Errors are then randomly added to the training set at multiple locations. The number of samples required to detect each error is calculated and then averaged to obtain the average number of samples required to detect the error. The above process is repeated with different false alarm rates (e.g., 0.001%, 0.01%, 1%, 3%, and 5%) to determine the parameter combination that meets the minimum average number of samples required to detect the error.
[0210] Table 4 Parameter values of alarm parameters
[0211] In other embodiments, if there is data showing that the test set detects instrument out of control, the test set can be used to obtain the upper and lower control lines and the average number of samples required for error detection under the false alarm rate for each parameter value combination, in the following manner: the actual test results of the patient samples in the training set for the target items and the patient information are used in the quality control model having the parameter value combination to calculate the monitoring indicators under the parameter value combination, and the upper and lower control lines are obtained based on the monitoring indicators and the false alarm rate under the parameter value combination, and the actual test results of the patient samples in the test set for the target items together with the corresponding patient information are input into the quality control model having the parameter value combination to obtain the monitoring indicators corresponding to the test set and compare them with the upper and lower control lines, so as to calculate the average number of samples required from the start of instrument out of control to the actual monitoring of the out of control by the quality control model, that is, the average number of samples required for error detection ANPed.
[0212] In yet other embodiments, an additional test set can be obtained, wherein the additional test set includes actual test results of target items for multiple patient samples and patient information, wherein the actual test results are obtained by testing the patient samples by a testing instrument, and the patient information includes the patient's disease, age, gender, and at least one of the departments to which the samples belong, wherein the additional test set includes data on the loss of control of the testing instrument. Here, the additional test set can be used to obtain the upper and lower control lines and the average number of samples required for error detection under the false alarm rate for each parameter value combination, in the following manner: the actual test results of the patient samples in the training set for the target items and the patient information are used in the quality control model with the parameter value combination to calculate the monitoring indicators under the parameter value combination, and the upper and lower control lines are obtained based on the monitoring indicators and the false alarm rate under the parameter value combination, and the actual test results of the patient samples in the additional test set for the target items together with the corresponding patient information are input into the quality control model with the parameter value combination to obtain the monitoring indicators corresponding to the additional test set and compare them with the upper and lower control lines, so as to calculate the average number of samples required from the start of the instrument out of control to the actual monitoring of the out of control by the quality control model, that is, the average number of samples required for error detection ANPed.
[0213] In other embodiments not shown, M and N may also be parameters to be optimized for the quality control model. The parameters of the calculation model, M, N, and the optional truncation processing parameters are optimized in the following manner:
[0214] Given a plurality of control line positions of the quality control model, a plurality of SPC parameter values of the calculation model, a plurality of alarm parameter value combinations of M and N, and optionally a plurality of truncation ratios of the truncation process;
[0215] The false alarm rate and the average number of samples required for error detection are calculated for each control line position, each SPC parameter value, each alarm parameter value combination, and optionally each parameter value combination of each cutoff ratio as follows:
[0216] In the quality control model having the parameter value combination, the actual test results in the training set and the patient information are used to calculate the monitoring indicators under the parameter value combination, and the model false alarm rate is calculated based on the upper and lower control lines in the parameter value combination and the monitoring indicators under the parameter value combination.
[0217] In the quality control model having the parameter value combination, a simulated data set containing multiple simulated instrument out-of-control locations or a real data set containing multiple real instrument out-of-control locations is used to calculate the monitoring index of the presence of instrument out-of-control under the parameter value combination, and the monitoring index is compared with the control line in the parameter value combination to calculate the average number of samples required from the start of the simulated instrument out-of-control location or the real instrument out-of-control location to the actual monitoring of the simulated instrument out-of-control location or the real instrument out-of-control location by the quality control model, that is, the average number of samples required for error detection.
[0218] The simulated data set is obtained by adding errors to the actual test results in the training set multiple times at different time points, and the real data set is obtained from the data of the multiple patient samples or by obtaining the actual test results for the target items of multiple additional patient samples and their patient information; and
[0219] The optimal parameter value combination is determined based on the model false alarm rate and the average number of samples required for error detection of each parameter value combination to construct an optimized quality control model.
[0220] In some embodiments, the parameter value combination with the smallest number of samples required for average error detection among the parameter value combinations whose model false alarm rate is lower than the preset false alarm rate can be selected as the final optimized parameter value combination of the quality control model.
[0221] In other embodiments, the model false alarm rates and the number of samples required for average error detection of each parameter value combination may be weighted and then summed, and then the parameter value combination corresponding to the smallest sum value may be selected.
[0222] Taking the floating mean method as an example of a process control SPC algorithm, the parameters of the calculation model based on the floating mean method are sliding windows. The parameters to be optimized in the quality control model include the sliding window, the cutoff ratio, and the M&N alarm parameter combination. Given the upper and lower control line positions (obtained by the percentage positions of S / 2 above and below the monitoring indicator, with S values of 0.001%, 0.01%, 0.1%, 1%, 3%, and 5%), the sliding window parameter values are given as 10, 20, 50, 70, and 100, the cutoff ratio parameter values for the cutoff process are given as ±0%, ±1%, ±2%, and ±5%, and the parameter values of the alarm parameter combination shown in Table 4 are given. The training set is used to calculate the monitoring indicators under different parameter value combinations of the upper and lower control line positions, sliding window, cutoff ratio, and alarm parameter combination, and then the model false alarm rate is calculated based on the monitoring indicators and the upper and lower control line positions. Then, errors are randomly added to multiple locations in the training set, the number of samples required to detect the error each time is calculated, and then the average number of samples required to detect the average error is obtained. The parameter value combination with the smallest number of samples required for average error detection among the parameter value combinations whose model false alarm rate is lower than the preset false alarm rate is selected as the final optimized parameter value combination of the quality control model.
[0223] In yet other embodiments not shown, M and N may also be parameters to be optimized of the quality control model, and the control line of the quality control model, the parameters of the calculation model, and M, N, and the parameters of the optional truncation process are optimized in the following manner:
[0224] Given a preset false alarm rate of the quality control model, a plurality of control line positions, a plurality of SPC parameter values of the calculation model, a plurality of alarm parameter value combinations of M and N, and optionally a plurality of truncation ratios of the truncation process;
[0225] Calculating a false alarm rate for each control line position, each SPC parameter value, each alarm parameter value combination, and optionally each parameter value combination of each cutoff ratio by using the actual test results in the training set and the patient information in the quality control model having the parameter value combination to calculate the monitoring index under the parameter value combination, and calculating the model false alarm rate based on the control line position in the parameter value combination and the monitoring index under the parameter value combination;
[0226] Selecting a model parameter value combination whose model false alarm rate is less than the preset false alarm rate as a candidate parameter value combination;
[0227] calculating, for each candidate parameter value combination, an average number of samples required for error detection by using, in the quality control model having the candidate parameter value combination, a simulated data set containing multiple simulated instrument out-of-control locations or a real data set containing multiple real instrument out-of-control locations, to calculate a monitoring indicator for the presence of instrument out-of-control under the candidate parameter value combination, and comparing the monitoring indicator with a control line in the candidate parameter value combination to calculate the average number of samples required from the start of each simulated instrument out-of-control location or real instrument out-of-control location to the actual monitoring of the simulated instrument out-of-control location or real instrument out-of-control by the quality control model, i.e., the average number of samples required for error detection, wherein the simulated data set is obtained by adding errors to the actual test results in the training set multiple times at different time points, and the real data set is obtained from the data of the multiple patient samples or by obtaining the actual test results for the target items of multiple additional patient samples and their patient information; and
[0228] The candidate parameter value combination with the minimum number of samples required for average error detection is used to construct an optimized quality control model.
[0229] Here, it is understood that when optimizing the control line of the quality control model, the parameters of the calculation model, M, N, and the optional parameters of the truncation process, the values of the other parameters of the quality control model can be fixed, for example, selected based on experience. For example, when optimizing the control line of the quality control model, the parameters of the calculation model, M, N, the truncation ratio of the truncation process can be fixed.
[0230] In some embodiments, in step S340, the quality control model can be verified in the following manner, that is, the data of the test set is input into the quality control model constructed in step S330, and the corresponding monitoring indicators are calculated to see whether they are within the upper and lower control lines. If they exceed the upper and lower control lines, it means that the system has generated non-random deviations, the detection instrument is out of control, and an out-of-control alarm is generated; if the monitoring indicators do not exceed the upper and lower control lines, it means that the system is normal and the detection instrument is under control. If there is out-of-control status data of the instrument in the test set, it can be used directly to verify the effectiveness of the algorithm. For the case where there is no out-of-control status data of the detection instrument in the test set, the allowable error can be added at a specified time in the test set to simulate the out-of-control status data of the detection instrument, thereby verifying the detection performance of the algorithm model. Through multiple simulations (adding errors at different time points in the test set), the number of samples required for error detection of all simulations can be averaged to obtain the average number of samples required for error detection, and the performance of the quality control model can be verified using the average number of samples required for error detection.
[0231] In some embodiments, in step S320, quantifying the patient information of the patient samples in the training set may include: quantifying at least one of the patient information of the patient samples in the training set, especially at least one of the disease, gender, and department to which the sample belongs, into a matrix.
[0232] Furthermore, quantizing at least one type of patient information of the patient samples in the training set into matrices may include: quantizing each type of patient information of the at least one type of patient information of the patient samples in the training set into a one-dimensional matrix having multiple elements, wherein each element of the one-dimensional matrix represents a category, and the patient information belongs to at least one of the categories represented by the element.
[0233] Preferably, quantizing the at least one patient information of the patient samples in the training set into a one-dimensional matrix having a plurality of elements may include:
[0234] Each type of patient information in the at least one type of patient information of the patient samples in the training set is quantified into a one-dimensional matrix consisting of 0 and 1 and having multiple elements, wherein the value of the element representing the category to which the patient information belongs is 1, and the values of the remaining elements are 0.
[0235] Alternatively or additionally, quantizing the patient information of the patient samples in the training set may include: quantizing the patient information of the patient samples in the training set to a fixed value, preferably to a fixed integer.
[0236] Alternatively or additionally, the patient information of the patient samples in the training set may be quantified by a table lookup method.
[0237] For specific quantization examples, reference may be made to the above detailed descriptions of various embodiments of the method 100 , which will not be repeated here.
[0238] In some embodiments, the patient information includes the patient's disease, age, gender, and department to which the sample belongs.
[0239] The various embodiments and advantages of the method 100 and computer system 300 provided in the embodiment of the present application can be correspondingly applied to the model building method 300 provided in the embodiment of the present application, and therefore will not be described in detail.
[0240] An embodiment of the present application also relates to the application of a quality control model constructed according to the above-mentioned method 300 in quality control of a detection instrument, wherein actual test results for target items of multiple patient samples and patient information are obtained, wherein the actual test results are obtained by testing the patient samples by a detection instrument, and the patient information includes the patient's disease, age, gender, and at least one of the departments to which the samples belong; the patient information of the multiple patient samples is quantified and the quantified patient information is input into the quality control model together with the actual test results to obtain monitoring indicators; and whether the detection instrument is under control is determined based on the monitoring indicators.
[0241] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the embodiments of the present application may take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware. Furthermore, the embodiments of the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including magnetic disk storage and optical storage, etc.) containing computer-usable program code.
[0242] The present application embodiment is described with reference to the flow chart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present application.It should be understood that each flow process and / or box in the flow chart and / or block diagram and the combination of the flow process and / or box in the flow chart and / or block diagram can be realized by computer program operation.These computer programs can be provided to operate on a general-purpose computer, a special-purpose computer, an embedded processing machine or other programmable data processing device to produce a machine, so that the operation performed by the processor of the computer or other programmable data processing device produces a device for realizing the function specified in one flow chart flow or multiple flows and / or one block or multiple blocks of the block diagram.
[0243] These computer program operations may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the operations stored in the computer-readable memory produce an article of manufacture including an operating device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0244] These computer program operations may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the operations executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0245] The features or feature combinations mentioned above in the specification, drawings, and claims may be used in any combination or individually, as long as they are meaningful and not mutually inconsistent within the scope of this application. The advantages and features described with reference to the methods provided in the embodiments of this application apply in a corresponding manner to the systems and applications provided in the embodiments of this application, and vice versa.
[0246] The above description is only a preferred embodiment of the present application and does not limit the patent scope of the present application. All equivalent transformation schemes made by using the contents of the present application description and drawings under the inventive concept of the present application, or directly / indirectly applied in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A method for real-time quality control based on patient samples, include: In the process of the detection instrument performing real-time detection on the current patient sample for the target item, obtaining the actual detection result of the current patient sample detected by the detection instrument for the target item and the patient information, wherein the patient information includes the patient's disease, age, gender and at least one of the ordering department of the target item; quantifying the patient information of the current patient sample and inputting the quantified patient information into a pre-built machine learning model to obtain an output result of the machine learning model as a predicted test result for the target item, wherein the machine learning model is trained by actual test results of multiple historical patient samples for the target item and patient information; Acquire monitoring indicators based on the actual test results of the current patient sample and the predicted test results; and Based on the monitoring index, it is determined whether the detection instrument is under control. If not, an alarm prompt indicating that the detection instrument is out of control is output.
2. The method according to claim 1, in, Acquiring monitoring indicators based on the actual test results of the current patient sample and the predicted test results includes: Calculating the difference between the actual detection result and the predicted detection result; and The difference is input into a calculation model based on a process control SPC algorithm to obtain an output result of the calculation model as the monitoring indicator.
3. The method according to claim 1 or 2, in, Quantifying the patient information of the current patient sample includes: At least one of the patient information of the current patient sample, in particular, the disease, gender, and at least one of the ordering department of the target item, is quantified into matrices.
4. The method according to claim 3, in, Converting at least one amount of patient information in the patient information of the current patient sample into matrices respectively includes: quantizing each type of patient information in the at least one type of patient information of the current patient sample into a one-dimensional matrix having a plurality of elements, wherein each element of the one-dimensional matrix represents a category, and the type of patient information belongs to at least one of the categories represented by the element; Preferably, each type of patient information in the at least one type of patient information of the current patient sample is quantized into a one-dimensional matrix having a plurality of elements, including: Each type of patient information in the at least one type of patient information of the current patient sample is quantified into a one-dimensional matrix consisting of 0 and 1 and having multiple elements, wherein the value of the element representing the category to which the patient information belongs is 1, and the values of the remaining elements are 0.
5. The method according to claim 1 or 2, in, Quantifying the patient information of the current patient sample includes: At least one of the patient information of the current patient sample, especially the age, is quantified as a fixed The value is preferably quantized as a fixed integer.
6. The method according to any one of claims 1 to 5, in, At least one of the patient information of the current patient sample is quantified by a table lookup method.
7. The method according to any one of claims 1 to 6, in, The patient information includes the patient's disease, age, gender, and the ordering department to which the target item belongs.
8. The method according to any one of claims 1 to 7, in, Acquiring monitoring indicators based on the actual detection results and the predicted detection results includes: Performing data processing on the actual detection result, wherein the data processing includes truncation processing and / or normalization processing; and The monitoring index is obtained based on the actual detection result and the predicted detection result after data processing.
9. The method according to any one of claims 1 to 8, in, The machine learning model is a neural network model.
10. The method according to any one of claims 1 to 8, in, The machine learning model is a machine learning model based on SVM and / or LDA.
11. The method according to any one of claims 1 to 10, in, Determining whether the detection instrument is under control based on the monitoring indicators includes: acquiring monitoring indicators of a first number of consecutive current patient samples in chronological order, and determining whether the detection instrument is under control based on the monitoring indicators of the first number of consecutive current patient samples; When at least a second number of monitoring indicators of the current patient samples among the monitoring indicators of the first consecutive number of current patient samples exceed the control line, an alarm prompt indicating that the detection instrument is out of control is output, wherein the first number is greater than the second number and the second number is greater than 1.
12. The method according to claim 2, in, The parameters of the calculation model are optimized in the following manner: Obtaining actual test results of a plurality of historical patient samples for the target item and patient information, wherein the actual test results are obtained by testing the plurality of historical patient samples by the testing instrument under a controlled state; Given a false alarm rate; A plurality of SPC parameter values of the given calculation model; For each SPC parameter value, the upper and lower control lines and the number of samples required for the average error detection under the false alarm rate are obtained in the following manner: In the calculation model having the SPC parameter value, the actual test results of the plurality of historical patient samples and the patient information are used to calculate the monitoring index under the SPC parameter value, and the upper and lower control lines are obtained based on the monitoring index under the SPC parameter value and the false alarm rate, In the calculation model with the SPC parameter value, a simulated data set containing multiple simulated instrument out-of-control or a real data set containing multiple real instrument out-of-control is used to calculate the monitoring value of the presence of instrument out-of-control at the SPC parameter value. The control index is compared with the upper and lower control lines to calculate the average number of samples required from the start of the simulated instrument out of control or the real instrument out of control to the actual monitoring of the simulated instrument out of control or the real instrument out of control, that is, the average number of samples required for error detection. The simulated data set is obtained by adding errors to the actual test results of the multiple historical patient samples at different time points for multiple times, and the real data set is obtained from the actual test results and patient information of the multiple historical patient samples or by obtaining the actual test results and patient information of multiple other historical patient samples for the target item, and The SPC parameter value with the smallest number of samples required for average error detection and the upper and lower control lines corresponding to the SPC parameter value are selected to construct the optimized calculation model.
13. The method according to claim 8, in, The parameters of the truncation process and the parameters of the calculation model are optimized in the following manner: Obtaining actual test results of a plurality of historical patient samples for the target item and patient information, wherein the actual test results are obtained by testing the historical patient samples by the testing instrument under a controlled state; Given a false alarm rate; Given a plurality of truncation ratios of the truncation process and a plurality of SPC parameter values of the calculation model; For each parameter value combination of each cutoff ratio and each SPC parameter value, the upper and lower control lines and the number of samples required for the average error detection at the false alarm rate are obtained in the following manner: In the calculation model having the parameter value combination, the actual test results of the plurality of historical patient samples and the patient information are used to calculate the monitoring index under the parameter value combination, and the upper and lower control lines are obtained based on the monitoring index under the parameter value combination and the false alarm rate, In the calculation model with the parameter value combination, a simulated data set containing multiple simulated instrument out-of-control or a real data set containing multiple real instrument out-of-control is used to calculate the monitoring index of the presence of instrument out-of-control under the parameter value combination, and the monitoring index is compared with the upper and lower control lines to calculate the average number of samples required from the start of the simulated instrument out-of-control or the real instrument out-of-control to the actual monitoring of the simulated instrument out-of-control or the real instrument out-of-control, that is, the average number of samples required for error detection, The simulated data set is obtained by adding errors to the actual test results of the multiple historical patient samples at different time points for multiple times, and the real data set is obtained from the actual test results and patient information of the multiple historical patient samples or by obtaining the actual test results and patient information of multiple other historical patient samples for the target item; and The parameter value combination with the minimum number of samples required for average error detection and the upper and lower control lines corresponding to the parameter value combination are selected to construct the optimized truncation process and the calculation model.
14. A computer system for real-time quality control based on patient samples, include: A data acquisition module, configured to acquire, during the process of the detection instrument performing real-time detection on the current patient sample for the target item, an actual detection result of the current patient sample detected by the detection instrument for the target item and patient information, wherein the patient information includes at least one of the patient's disease, age, gender and the ordering department for the target item; The prediction result acquisition module is configured to quantify the patient information of the current patient sample and input the quantified patient information into a pre-built machine learning model to obtain the output result of the machine learning model as The predicted test results for the target item, wherein the machine learning model is trained by actual test results for the target item of multiple historical patient samples and patient information; A monitoring indicator acquisition module is configured to acquire monitoring indicators based on the actual test results of the current patient sample and the predicted test results; and The quality control module is configured to determine whether the detection instrument is under control based on the monitoring indicators, and if not, output an alarm indicating that the detection instrument is out of control.
15. The computer system according to claim 14, in, The monitoring indicator acquisition module is further configured as follows: Calculating the difference between the actual detection result and the predicted detection result; and The difference is input into a calculation model based on a process control SPC algorithm to obtain an output result of the calculation model as the monitoring indicator.
16. A computer system according to claim 14 or 15, in, The prediction result acquisition module is further configured to quantify at least one of the patient information of the current patient sample, especially the disease, gender and at least one of the ordering department of the target project, into a matrix.
17. The computer system according to claim 16, in, The prediction result acquisition module is further configured to quantify each type of patient information in the at least one type of patient information of the current patient sample into a one-dimensional matrix having a plurality of elements, wherein each element of the one-dimensional matrix represents a category, and the type of patient information belongs to at least one of the categories represented by the element; Preferably, the prediction result acquisition module is further configured to quantify each type of patient information among the at least one type of patient information of the current patient sample into a one-dimensional matrix consisting of 0 and 1 having multiple elements, wherein the value of the element representing the category to which the patient information belongs is 1, and the values of the remaining elements are 0.
18. A computer system according to claim 14 or 15, in, The prediction result acquisition module is further configured to quantize the patient information of the current patient sample into a fixed value, preferably into a fixed integer.
19. A computer system according to any one of claims 14 to 18, in, The prediction result acquisition module is further configured to quantify the patient information of the current patient sample by table lookup method.
20. A computer system according to any one of claims 14 to 19, in, The patient information includes the patient's disease, age, gender, and the ordering department to which the target item belongs.
21. A computer system according to any one of claims 14 to 10, in, The monitoring indicator acquisition module is further configured as follows: Performing data processing on the actual detection result, wherein the data processing includes truncation processing and / or normalization processing; and The monitoring index is obtained based on the actual detection result and the predicted detection result after data processing.
22. A computer system according to any one of claims 14 to 21, in, The machine learning model is a neural network model; or The machine learning model is a machine learning model based on SVM and / or LDA.
23. A computer system according to any one of claims 14 to 22, in, The quality control module is further configured to successively acquire monitoring indicators of a first number of consecutive current patient samples in chronological order, determine whether the detection instrument is under control based on the monitoring indicators of the first number of consecutive current patient samples, and output an alarm indicating that the detection instrument is out of control when at least a second number of monitoring indicators of the first number of consecutive current patient samples exceed a control line, wherein the first number is greater than the second number and the second number is greater than 1.
24. The computer system according to claim 15, in, The monitoring indicator acquisition module is optimized in the following ways: Obtaining actual test results of a plurality of historical patient samples for the target item and patient information, wherein the actual test results are obtained by testing the plurality of historical patient samples by the testing instrument under a controlled state; Given a false alarm rate; A plurality of SPC parameter values of the given calculation model; For each SPC parameter value, the upper and lower control lines and the number of samples required for the average error detection under the false alarm rate are obtained in the following manner: In the calculation model having the SPC parameter value, the actual test results of the plurality of historical patient samples and the patient information are used to calculate the monitoring index under the SPC parameter value, and the upper and lower control lines are obtained based on the monitoring index under the SPC parameter value and the false alarm rate, In the calculation model with the SPC parameter value, a simulated data set containing multiple simulated instrument out-of-control or a real data set containing multiple real instrument out-of-control is used to calculate the monitoring index of the presence of instrument out-of-control under the SPC parameter value, and the monitoring index is compared with the upper and lower control lines to calculate the average number of samples required from the start of the simulated instrument out-of-control or the real instrument out-of-control to the actual monitoring of the simulated instrument out-of-control or the real instrument out-of-control, that is, the average number of samples required for error detection, The simulated data set is obtained by adding errors to the actual test results of the multiple historical patient samples at different time points for multiple times, and the real data set is obtained from the actual test results and patient information of the multiple historical patient samples or by obtaining the actual test results and patient information of multiple other historical patient samples for the target item, and The SPC parameter value with the smallest number of samples required for average error detection and the upper and lower control lines corresponding to the SPC parameter value are selected to construct the optimized calculation model.
25. The computer system according to claim 21, in, The monitoring indicator acquisition module is optimized in the following ways: Obtaining actual test results of a plurality of historical patient samples for the target item and patient information, wherein the actual test results are obtained by testing the historical patient samples by the testing instrument under a controlled state; Given a false alarm rate; Given a plurality of truncation ratios of the truncation process and a plurality of SPC parameter values of the calculation model; For each parameter value combination of each cutoff ratio and each SPC parameter value, the upper and lower control lines and the number of samples required for the average error detection at the false alarm rate are obtained in the following manner: In the calculation model having the parameter value combination, the actual test results of the plurality of historical patient samples and the patient information are used to calculate the monitoring index under the parameter value combination, and the upper and lower control lines are obtained based on the monitoring index under the parameter value combination and the false alarm rate, In the calculation model with the parameter value combination, a simulated data set containing multiple simulated instrument out-of-control or a real data set containing multiple real instrument out-of-control is used to calculate the monitoring index of the presence of instrument out-of-control under the parameter value combination, and the monitoring index is compared with the upper and lower control lines to calculate the average number of samples required from the start of the simulated instrument out-of-control or the real instrument out-of-control to the actual monitoring of the simulated instrument out-of-control or the real instrument out-of-control, that is, the average number of samples required for error detection, The simulated data set is obtained by adding errors to the actual test results of the multiple historical patient samples at different time points for multiple times, and the real data set is obtained from the actual test results and patient information of the multiple historical patient samples or by obtaining the actual test results and patient information of multiple other historical patient samples for the target item; and The parameter value combination with the minimum number of samples required for average error detection and the upper and lower control lines corresponding to the parameter value combination are selected to construct the optimized truncation process and the calculation model.
26. A method for constructing a quality control model for real-time quality control based on patient samples, include: Acquire data of multiple patient samples and divide the data into a training set and a test set, wherein the data includes actual test results of the multiple patient samples for target items and patient information, wherein the actual test results are obtained by testing the patient samples with a testing instrument, and the patient information includes at least one of the patient's disease, age, gender, and the ordering department of the target item, wherein the data in the training set is obtained when the testing instrument is in a controlled state; The training set is used to establish a machine learning model by quantifying the patient information of the patient samples in the training set, and establishing a machine learning model that satisfies the following formula between the quantified patient information and the actual test results in the training set: X t =f(x 1t ,x 2t ,…,x nt )+ε t Among them, X t is the actual detection result in the training set, f(x 1t ,x 2t ,…,x nt ) is a machine learning model, x 1t ,x 2t ,…,x nt represents the quantified patient information, ε t Represents the estimation of X using the machine learning model t The residual of Constructing a quality control model for real-time quality control based on patient samples based on the machine learning model; and The quality control model is validated using the test set.
27. The method according to claim 26, in, The machine learning model is a neural network model; or The machine learning model is a machine learning model based on SVM and / or LDA.
28. The method according to claim 26 or 27, in, A quality control model for real-time quality control based on patient samples is constructed based on the machine learning model, including: The quality control model is constructed according to the machine learning model and the calculation model based on the process control SPC algorithm, wherein the residual ε t The data are input into a calculation model based on a process control SPC algorithm to obtain the output of the calculation model as a monitoring indicator of the quality control model.
29. The method according to claim 28, in, The parameters of the calculation model are optimized in the following manner: Given a false alarm rate; A plurality of SPC parameter values of the given calculation model; For each SPC parameter value, the upper and lower control lines and the number of samples required for the average error detection under the false alarm rate are obtained in the following manner: In the quality control model having the SPC parameter value, the actual test results in the training set and the patient information are used to calculate the monitoring index under the SPC parameter value, and the upper and lower control lines are obtained based on the monitoring index under the SPC parameter value and the false alarm rate, In the quality control model with the SPC parameter value, a simulated data set containing multiple simulated instrument out-of-control or a real data set containing multiple real instrument out-of-control is used to calculate the monitoring index of instrument out-of-control under the SPC parameter value, and compare it with the upper and lower control lines to calculate the average number of samples required from the start of the simulated instrument out-of-control or the real instrument out-of-control at each location to the actual monitoring of the simulated instrument out-of-control or the real instrument out-of-control by the quality control model, that is, the average number of samples required for error detection, The simulated data set is obtained by adding errors to the actual test results in the training set at different time points for multiple times, and the real data set is obtained from the data of the multiple patient samples or by obtaining the actual test results of the target items of multiple other patient samples and their patient information, and Select the SPC parameter value with the smallest number of samples required for average error detection and the upper and lower control lines corresponding to the SPC parameter value to build an optimized quality control model.
30. The method according to claim 28, in, Before establishing the machine learning model, data processing is performed on the actual test results of the target items of the patient samples in the training set, wherein the data processing includes truncation processing and / or normalization processing.
31. The method according to claim 30, in, The parameters of the truncation process and the parameters of the calculation model are optimized in the following manner: Given a false alarm rate; Given a plurality of truncation ratios of the truncation process and a plurality of SPC parameter values of the calculation model; For each parameter value combination of each cutoff ratio and each SPC parameter value, the upper and lower control lines and the number of samples required for the average error detection at the false alarm rate are obtained in the following manner: In the quality control model having the parameter value combination, the actual test results in the training set and the patient information are used to calculate the monitoring index under the parameter value combination, and the upper and lower control lines are obtained based on the monitoring index under the parameter value combination and the false alarm rate, In the quality control model with the parameter value combination, a simulated data set containing multiple simulated instrument out-of-control or a real data set containing multiple real instrument out-of-control is used to calculate the monitoring index of the presence of instrument out-of-control under the parameter value combination, and the monitoring index is compared with the upper and lower control lines to calculate the average number of samples required from the start of the simulated instrument out-of-control or the real instrument out-of-control at each location to the actual monitoring of the simulated instrument out-of-control or the real instrument out-of-control by the quality control model, that is, the average number of samples required for error detection, The simulated data set is obtained by adding errors to the actual test results in the training set at different time points for multiple times, and the real data set is obtained from the data of the multiple patient samples or by obtaining multiple additional patient samples. The actual test results of the sample for the target item and the patient information thereof are obtained; and Select the parameter value combination with the smallest number of samples required for average error detection and the upper and lower control lines corresponding to the parameter value combination to build an optimized quality control model.
32. The method according to any one of claims 26 to 31, in, Quantifying the patient information of the patient samples in the training set includes: At least one of the patient information of the patient samples in the training set, in particular, at least one of the disease, gender, and the ordering department of the target item is quantified into matrices.
33. The method according to claim 32, in, Quantifying at least one of the patient information of the patient samples in the training set into matrices respectively, including: Each type of patient information among the at least one type of patient information of the patient samples in the training set is quantified into a one-dimensional matrix having multiple elements, wherein each element of the one-dimensional matrix represents a category, and the patient information belongs to at least one of the categories represented by the element. Preferably, each type of patient information in the at least one type of patient information of the patient samples in the training set is quantized into a one-dimensional matrix having a plurality of elements, including: Each type of patient information in the at least one type of patient information of the patient samples in the training set is quantified into a one-dimensional matrix consisting of 0 and 1 and having multiple elements, wherein the value of the element representing the category to which the patient information belongs is 1, and the values of the remaining elements are 0.
34. The method according to any one of claims 26 to 31, in, Quantifying the patient information of the patient samples in the training set includes: The patient information of the patient samples in the training set is quantized into fixed values, preferably fixed integers.
35. The method according to any one of claims 26 to 34, in, The patient information of the patient samples in the training set is quantified by a table lookup method.
36. The method according to any one of claims 26 to 35, in, The patient information includes the patient's disease, age, gender, and the ordering department to which the target item belongs.
37. A method for real-time quality control based on patient samples, include: In the process of the detection instrument performing real-time detection on the current patient sample for the target item, obtaining the actual detection result of the current patient sample detected by the detection instrument for the target item and the patient information, wherein the patient information includes the patient's disease, age, gender and at least one of the ordering department of the target item; quantifying the patient information of the current patient sample and inputting the quantified patient information into a pre-built machine learning model to obtain an output result of the machine learning model as a predicted test result for the target item, wherein the machine learning model is trained by actual test results of multiple historical patient samples for the target item and patient information; Acquire monitoring indicators based on the actual test results of the current patient sample and the predicted test results; and Based on the monitoring index, it is determined whether the detection instrument is under control and / or based on the monitoring index, it is determined whether to give an alarm indicating that the detection instrument is out of control.
Citation Information
Patent Citations
Laboratory quality control management method and system
CN107704986A
Statistical process control-based performance evaluation method for positioning precision of image-guided radiotherapy equipment
CN113559423A
Optimization method, system and equipment for real-time quality control
CN114330859A
Quality control method, device and equipment for medical data detection, medium and program product
CN115691722A
Medical examination quality control model training method and medical examination quality control method and system
CN115910364A
Cited By
Laboratory specimen operation process flow monitoring system
CN119860816A
