Real-time quality control method, real-time quality control system and quality control model construction method
By optimizing the alarm rules of the quality control model, alarms are output only when the continuous monitoring indicators reach a specific number, the problem of difficult to balance the number of samples required for false alarm rates and error detection in the existing technology is solved, and the real-time based on patient samples is improved Quality control performance.
Patent Information
- Application Number
- CN202310645437.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-01
- Publication Date
- 2024-12-03
AI Technical Summary
The existing real-time quality control method based on patient samples is difficult to meet clinical applications in the false alarm rate and error detection, resulting in poor performance.
When the detection instrument conducts real-time detection of patient samples, the actual detection results are obtained and the quality control model is input, and the continuous monitoring indicators are obtained in chronological order. The alarm prompt is output only when at least the second number of monitoring indicators exceeds the control line, and the alarm prompt is optimized. Parameter combination to reduce false alarm rate and error detection required number of samples.
It significantly distinguishes false alarms and true alarms, reduces false alarm rates, and maintains as few samples as possible in error detection, improves the performance of quality control methods and meets clinical application needs.
Smart Images

Figure CN119064607A_ABST
Abstract
Description
Technical Field
[0001] 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
[0002] In the process of clinical diagnosis and treatment of diseases, the quality of medical tests directly affects doctors' diagnosis and treatment of diseases. High-quality medical test results rely on a sound quality control system in medical testing laboratories. Internal quality control (IQC) is the core of the quality control system of clinical laboratories and an important method for evaluating the precision and accuracy of the detection system. At present, the common IQC implementation is that testers test quality control products at a certain frequency, use statistical theory to calculate and evaluate the reliability of the test results, and then observe and eliminate the out-of-control factors in the test. However, there are some typical defects in using quality control products for IQC monitoring: 1) The process of using quality control products for IQC monitoring is not continuous, but is tested at a single time point to estimate whether the analysis process is out of control; 2) Quality control products are not patient samples, so there is a matrix effect, which affects the IQC results; 3) Using quality control products for IQC requires additional quality control products, reagents, manpower and other costs, which is costly.
[0003] In recent years, patient-based real-time quality control (PBRTQC) can make up for some of the shortcomings of current IQC due to its characteristics. The advantages of PBRTQC are: 1) It can use the patient sample monitoring system in real time to detect the out-of-control state of the instrument in time; 2) Because of the use of patient samples, there is no influence of matrix effect; 3) PBRTQC is an analytical software, which does not require additional quality control products, reagents, and labor costs, and has a low cost.
[0004] However, under the existing PBRTQC alarm rules, the false alarm rate and the number of samples required for error detection are difficult to meet clinical applications at the same time. Summary of the invention
[0005] Therefore, in order to at least partially solve the above technical problems, the task of the present application is to provide an improved PBRTQC technical solution, which can better balance the false alarm rate and quality control sensitivity, so as to better meet clinical applications.
[0006] In order to achieve the above-mentioned task of the present application, the first aspect of the present application first proposes a method for real-time quality control based on patient samples, comprising:
[0007] In the process of the detection instrument performing real-time detection on the patient sample for the target detection item, obtaining the actual detection result of the patient sample detected by the detection instrument for the target detection item and inputting it into the quality control model to obtain the monitoring index output by the quality control model;
[0008] When at least a second number of monitoring indicators among the first number of monitoring indicators obtained successively in chronological order exceeds the control line of the quality control model, 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,
[0009] The first number and the second number are selected from a plurality of different alarm parameter value combinations based on the false alarm rate and the number of samples required for error detection of the quality control model under a plurality of different alarm parameter value combinations of the first number and the second number.
[0010] In order to achieve the above-mentioned task of the present application, the second aspect of the present application provides another method for real-time quality control based on patient samples, comprising:
[0011] In the process of the detection instrument performing real-time detection on the patient sample for the target detection item, obtaining the actual detection result of the patient sample obtained by the detection instrument for the target detection item;
[0012] Acquiring monitoring indicators based on actual test results of the patient samples;
[0013] Determine whether at least a second number of monitoring indicators exceeds a control line among a first number of continuous monitoring indicators obtained in chronological order, wherein the first number is greater than the second number and the second number is greater than 1;
[0014] When at least a second number of monitoring indicators among the first number of monitoring indicators successively obtained in chronological order exceed the control line, an alarm prompt indicating that the detection instrument is out of control is output.
[0015] In order to achieve the above-mentioned task of the present application, the third aspect of the present application provides a system for real-time quality control based on patient samples, comprising:
[0016] A monitoring index acquisition module is configured to obtain the actual test results of the patient sample obtained by the detection instrument for the target test item during the process of the detection instrument performing real-time detection on the patient sample for the target test item and input the results into the quality control model to obtain the monitoring index output by the quality control model;
[0017] The quality control module is configured to output an alarm prompt indicating that the detection instrument is out of control when at least a second number of monitoring indicators among a first number of continuous monitoring indicators obtained in chronological order exceeds the control line of the quality control model, wherein the first number is greater than the second number and the second number is greater than 1, and wherein the first number and the second number are selected from the multiple different alarm parameter value combinations based on the false alarm rate and the number of samples required for error detection of the quality control model under multiple different alarm parameter value combinations of the first number and the second number.
[0018] In order to achieve the above-mentioned task of the present application, the fourth aspect of the present application provides another system for real-time quality control based on patient samples, comprising:
[0019] The data acquisition module is configured to acquire, during the process of the detection instrument performing real-time detection on the patient sample for the target detection item, the actual detection result of the patient sample obtained by the detection instrument for the target detection item;
[0020] A monitoring index acquisition module, configured to acquire monitoring indicators based on actual test results of the patient samples;
[0021] a determination module configured to determine whether at least a second number of monitoring indicators exceeds a control line among a first number of continuous monitoring indicators obtained in chronological order, wherein the first number is greater than the second number and the second number is greater than 1; and
[0022] The quality control module is configured to output an alarm indicating that the detection instrument is out of control when at least a second number of monitoring indicators among a first number of continuous monitoring indicators obtained in chronological order exceed a control line.
[0023] In order to achieve the above-mentioned task of the present application, the fifth aspect of the present application provides a method for constructing a quality control model for real-time quality control based on patient samples, wherein the quality control model is configured to obtain the actual test results of the patient samples detected by the detection instrument for the target detection items, obtain monitoring indicators based on the actual test results, and when at least a second number of monitoring indicators among the continuous first number of monitoring indicators obtained in chronological order exceeds the control line of the quality control model, output an alarm prompt indicating that the detection instrument is out of control, wherein the first number is greater than the second number and the second number is greater than 1;
[0024] Wherein, the method comprises:
[0025] Acquire actual test results for target test items of multiple patient samples tested by the test instrument in chronological order within a certain period of time and divide the actual test results of the multiple patient samples into a training set, a first verification set and a second verification set, wherein the actual test results in the training set and the actual test results in the first verification set are obtained when the test instrument is in a controlled state, and the second verification set contains actual test results detected when the test instrument is out of control;
[0026] Given a plurality of parameter values of at least one parameter to be optimized of the quality control model, the at least one parameter to be optimized includes the control line and the first number and the second number of alarm parameter combinations;
[0027] The model false alarm rate and the number of samples required for average error detection are calculated for each model parameter value combination between each parameter value of each parameter to be optimized, in the following way:
[0028] In the quality control model having the model parameter value combination, the actual detection results of the patient samples in the training set for the target detection items are used to calculate the monitoring index under the model parameter value combination, and the model false alarm rate is calculated based on the control line in the model parameter value combination and the monitoring index under the model parameter value combination,
[0029] 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 model parameter value combination, and the monitoring index is compared with the control line in the model parameter value combination, so as 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,
[0030] The simulated data set is obtained by adding errors to the actual test results of the target items of the patient samples 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;
[0031] Determine the optimal combination of model parameter values according to the model false alarm rate and the average number of samples required for error detection of each combination of model parameter values to construct an optimized quality control model; and
[0032] The first validation set is used to validate the false alarm rate of the constructed quality control model, and the second validation set is used to validate the average number of samples required for error detection of the constructed quality control model.
[0033] In order to achieve the above-mentioned task of the present application, the sixth aspect of the present application provides another method for constructing a quality control model for real-time quality control based on patient samples, wherein the quality control model is configured to obtain the actual test results of the patient samples detected by the detection instrument for the target detection items, obtain monitoring indicators based on the actual test results, and when at least a second number of monitoring indicators among the continuous first number of monitoring indicators obtained in chronological order exceeds the control line of the quality control model, output an alarm prompt indicating that the detection instrument is out of control, wherein the first number is greater than the second number and the second number is greater than 1;
[0034] Wherein, the method comprises:
[0035] Acquire actual test results for target test items of multiple patient samples tested by the test instrument in chronological order within a certain period of time and divide the actual test results of the multiple patient samples into a training set, a first verification set and a second verification set, wherein the actual test results in the training set and the actual test results in the first verification set are obtained when the test instrument is in a controlled state, and the second verification set contains actual test results detected when the test instrument is out of control;
[0036] Given a preset false alarm rate of the quality control model and a plurality of parameter values of at least one parameter to be optimized of the quality control model, the at least one parameter to be optimized includes the control line and the first number and the second number of alarm parameter combinations;
[0037] The model false alarm rate is calculated for each model parameter value combination between each parameter value of each parameter to be optimized, in the following manner: in the quality control model having the model parameter value combination, the actual detection results of the patient samples in the training set for the target detection items are used to calculate the monitoring index under the model parameter value combination, and the model false alarm rate is calculated based on the control line in the model parameter value combination and the monitoring index under the model parameter value combination;
[0038] 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;
[0039] Calculating the average number of samples required for error detection for each candidate parameter value combination, in the manner of using 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 in the quality control model having the candidate parameter value combination to calculate the monitoring index of the presence of instrument out-of-control under the candidate parameter value combination, and comparing it with the control line in the candidate parameter value combination, so as 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 for error detection, wherein the simulated data set is obtained by adding errors to the actual test results of the target items of the patient samples 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 test items of multiple other patient samples;
[0040] 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; and
[0041] The first validation set is used to validate the false alarm rate of the constructed quality control model, and the second validation set is used to validate the average number of samples required for error detection of the constructed quality control model.
[0042] In the technical solutions provided by various aspects of the present application, only when at least a second number of monitoring indicators among the first number of continuous monitoring indicators obtained in chronological order exceeds the preset control line, an alarm prompt indicating that the detection instrument is out of control will be output. Thus, false alarms and true alarms can be significantly distinguished, thereby reducing the false alarm rate as much as possible and keeping the number of samples required for error detection as small as possible. Compared with the prior art PBRTQC, it can better meet clinical applications.
[0043] The method for real-time quality control based on patient samples according to the first aspect of the present application is particularly applicable to the system for real-time quality control based on patient samples according to the second aspect of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 Schematic diagram of the number of samples required to obtain error detection.
[0045] Figure 2 The present invention is a schematic flowchart of a method for real-time quality control based on patient samples according to an embodiment of the present application.
[0046] Figure 3 This is a schematic diagram of issuing an alarm according to the alarm rules of an embodiment of the present application.
[0047] Figure 4It is a schematic diagram of monitoring indicators when the detection instrument is in a controlled state and monitoring indicators when the detection instrument is in an out-of-control state.
[0048] Figure 5 A schematic flowchart of obtaining monitoring indicators according to an embodiment of the present application.
[0049] Figure 6 The present invention is a schematic flowchart of another method for real-time quality control based on patient samples according to an embodiment of the present application.
[0050] Figure 7 It is a schematic block diagram of a system for performing real-time quality control based on patient samples according to an embodiment of the present application.
[0051] Figure 8 It is a schematic block diagram of another system for performing real-time quality control based on patient samples according to an embodiment of the present application.
[0052] Fig. 9 A schematic flowchart of a method for constructing a quality control model for real-time quality control based on patient samples according to an embodiment of the present application.
[0053] Fig.10 The present invention is a schematic flowchart of another method for constructing a quality control model for real-time quality control based on patient samples according to an embodiment of the present application.
[0054] Fig.11 The present invention is a schematic flowchart of another method for constructing a quality control model for real-time quality control based on patient samples according to an embodiment of the present application.
[0055] Fig.12 A structural diagram of a machine learning model according to an embodiment of the present application.
[0056] Fig.13 A schematic flowchart of a method for optimizing a quality control model according to an embodiment of the present application.
[0057] Fig.14 A schematic diagram for setting upper and lower control lines.
[0058] Fig.15 A schematic flowchart of another method for optimizing a quality control model according to an embodiment of the present application. DETAILED DESCRIPTION
[0059] The embodiments of the present application will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.
[0060] In the embodiment of the present application, 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 of exceeding the preset control line) / the number of samples*100%. The number of samples required for error detection NPed (i.e., quality control sensitivity) refers to the number of samples required from the detection instrument to the monitoring indicator exceeding the preset control line, as shown in 1.
[0061] At present, the alarm rule of PBRTQC is that when a monitoring indicator exceeds the preset control line, the detection instrument is judged to be out of control and an alarm prompt is output. However, the inventors of the present application found that the preset control line is usually calculated based on an expected false alarm rate given artificially. Under the existing alarm rules, if the given expected false alarm rate is high, although the number of samples required for error detection of PBRTQC is small, it will be difficult to apply clinically due to the high false alarm rate; and if the expected false alarm rate is set to be low, the number of samples required for error detection of PBRTQC will be large, which will also be difficult to meet clinical applications. For example, taking the white blood cell count WBC continuously tested in a hospital as an example, a model is built according to the existing PBRTQC. Assuming that the hospital's test sample size is 500 cases / day, if the false positive rate is assumed to be 0.1%, the number of samples required for error detection is 200 cases. Under the alarm rule in the prior art that when a monitoring indicator exceeds a preset control line, the detection instrument is judged to be out of control, it is calculated that in actual application, there is a false alarm once every 2 days, which is unacceptable for actual clinical medical use; if the false positive rate is assumed to be 0.001%, the number of samples required for error detection is 550 cases. Under the alarm rule in the prior art, it is calculated that in actual application, there is a false alarm once every 6 months. Although the number of false alarms is small (that is, the false alarm rate is low), the number of samples required for error detection is 550, which has exceeded the daily test sample size of the hospital. The actual use value is low and the performance is greatly reduced.
[0062] Therefore, under the existing alarm rules, it is difficult to balance the false alarm rate and the number of samples required for error detection, resulting in poor performance of PBRTQC quality control, which is difficult to meet clinical applications. This application proposes an improved PBRTQC technical solution that can effectively reduce the false alarm rate while keeping the number of samples required for error detection as small as possible, thereby improving the performance of the PBRTQC-based quality control method to meet clinical applications.
[0063] Figure 2 A method 100 for real-time quality control based on patient samples according to an embodiment of the present application is shown. Figure 2 As shown, the method 100 includes a monitoring indicator acquisition step S110 and a quality control step S120.
[0064] In the monitoring indicator acquisition step S110, during the process of the detection instrument performing real-time detection on the patient sample for the target detection item, that is, in real time, the actual detection result of the patient sample obtained by the detection instrument for the target detection item is obtained and input into the quality control model to obtain the monitoring indicator output by the quality control model.
[0065] In the quality control step S120, when a second number m of monitoring indicators of a first number M of continuous monitoring indicators obtained in chronological order exceed the control line of the quality control model, an alarm prompt indicating that the detection instrument is out of control is output. Here, the first number M is greater than the second number m and the second number m is greater than 1. The first number and the second number are selected from the multiple different alarm parameter value combinations based on the false alarm rate and the number of samples required for error detection of the quality control model under multiple different alarm parameter value combinations of the first number and the second number.
[0066] It can be understood that the alarm rule of the quality control method based on PBRTQC proposed in this application is: when at least m monitoring indicators among M monitoring indicators obtained successively in chronological order exceed the control line, an alarm prompt indicating that the detection instrument is out of control is output.
[0067] In one example, if the first number M is 10 and the second number m is 7, then according to the quality control method based on PBRTQC proposed in this application, an alarm indicating that the detection instrument is out of control will be output only when at least 7 of the 10 consecutive monitoring indicators obtained in chronological order exceed the preset control line.
[0068] like Figure 3 As shown in the figure, if less than 7 of the 10 consecutive monitoring indicators in the dotted box at A exceed the preset control line, no alarm prompt is output. If at least 7 of the 10 consecutive monitoring indicators in the dotted box at B exceed the preset control line, an alarm prompt is output.
[0069] It should be noted that the detection instrument is not out of control at point A, but the monitoring index here has exceeded the preset control line. It can be seen that if the existing PBRTQC alarm rules are used, an alarm prompt will be output at point A, resulting in a false alarm.
[0070] To illustrate the advantages of the quality control method based on PBRTQC proposed in this application, taking the target detection item of white blood cell count WBC as an example, the monitoring indicators are calculated based on the WBC data set obtained when the detection instrument is under controlled state and the monitoring indicators are calculated based on the WBC data set obtained when the detection instrument is out of control, such as Figure 4 As shown, Figure 4The upper figure is a curve of monitoring indicators calculated based on the WBC data set obtained when the detection instrument is in a controlled state, and the lower figure is a curve of monitoring indicators calculated based on the WBC data set obtained when the detection instrument is out of control.
[0071] It can be seen that there is a difference between the number of monitoring indicators that exceed the preset control line at the false alarm and the number of monitoring indicators that exceed the preset control line at the true alarm. Even when the instrument is under control, there may be individual monitoring indicators that exceed the preset control line and cause false alarms. The method proposed in this application to alarm only when at least m of the consecutive M monitoring indicators exceed the preset control line can significantly distinguish between false alarms and true alarms. Compared with the existing PBRTQC method of alarming when one monitoring indicator exceeds the preset control line, it can effectively reduce the false alarm rate, and at the same time, it can also keep the number of samples required for error detection as small as possible.
[0072] Furthermore, the performance of the PBRTQC-based quality control method of the present application and the performance of the PBRTQC-based quality control method of the prior art are verified by the number of samples required for error detection under the same false alarm rate. The fewer the number of samples required for error detection, the better the performance of the PBRTQC-based quality control method, that is, the higher the sensitivity.
[0073] The target detection items are white blood cell count WBC, red blood cell count RBC, hemoglobin content HGB and thyroid stimulating hormone TSH. The WBC verification data set, RBC verification data set, HGB verification data set and TSH verification data set obtained under the controlled state of the detection instrument are used respectively. The PBRTQC-based quality control method of the present application and the PBRTQC-based quality control method of the prior art are simulated by adding errors multiple times, and the average number of samples required for error detection ANPed as shown in Table 1 is obtained. As shown in Table 1, under the same false alarm rate FAR (0.001%), the PBRTQC-based quality control method proposed in the present application can keep the number of samples required for error detection as small as possible compared with the prior art, significantly improves the quality control performance, and can better meet clinical applications.
[0074] Table 1 ANPed of different target detection items at a false alarm rate of 0.001%
[0075]
[0076] In some embodiments, the target detection 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 can be a blood cell analyzer.
[0077] In other embodiments, the target detection items may be biochemical detection items, such as thyroid function (such as thyroid stimulating hormone, etc.), liver function, kidney function, blood lipids, blood sugar, etc.; accordingly, the detection instrument may be a biochemical analyzer.
[0078] In some embodiments, the quality control model is constructed according to a calculation model based on a process control SPC algorithm; wherein the step S110 of inputting the actual detection result into the quality control model to obtain the monitoring indicator may include:
[0079] The actual detection results are preprocessed, preferably truncated and / or normalized, and
[0080] The actual detection results that have been preprocessed are input into a calculation model based on a process control SPC algorithm to obtain an output of the calculation model as the monitoring indicator.
[0081] In some embodiments, the step S110 of inputting the actual test results into the quality control model to obtain the monitoring index may include:
[0082] The actual test results and the patient information of the patient sample are input into the quality control model to obtain the monitoring index, wherein the patient information includes at least one of the patient's disease, age, gender and the department to which the sample belongs.
[0083] 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.
[0084] 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.
[0085] Furthermore, the quality control model is constructed according to a machine learning model; wherein the step of inputting the actual test results and the patient information of the patient sample into the quality control model to obtain the monitoring index may include:
[0086] The patient information of the 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 of the patient sample for the target detection item, wherein the machine learning model is trained by actual detection results and patient information of multiple known patient samples (i.e., historical patient samples) for the target detection item; and monitoring indicators are obtained based on the actual detection results and the predicted detection results.
[0087] Here, the machine learning model proposed in the embodiment of the present application characterizes the relationship between the patient information and the test results of the target detection items. In other words, if the patient information is input into the machine learning model, the predicted test results for the target detection items predicted by the machine learning model will be obtained.
[0088] 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).
[0089] In some embodiments, quantifying the patient information of the patient sample may include: quantifying at least one of the patient information of the patient sample, especially at least one of the disease, gender, and department to which the sample belongs, into a matrix.
[0090] In one example, quantizing at least one of the patient information of the patient sample into matrices may include: quantizing the at least one information of the patient sample into one-dimensional matrices having N elements, wherein each element of the one-dimensional matrix represents a category, and the at least one information belongs to one of the categories represented by the element.
[0091] For example, when the patient information includes disease information, if the disease can be classified into 33 disease categories, the disease information may be quantified into a one-dimensional matrix having 33 elements, wherein each element represents a disease.
[0092] 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, wherein one element represents male and the other element represents female.
[0093] 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.
[0094] Preferably, quantizing the at least one information of the patient sample into a one-dimensional matrix with N elements may include: quantizing the at least one information of the patient sample into a one-dimensional matrix with N elements consisting of 0 and 1, wherein the value of the element representing the category to which the at least one information belongs is 1, and the values of the remaining elements are 0. This simplifies the construction of the machine learning model.
[0095] 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, wherein each element X represents a disease, for example, X1 represents hyperthyroidism, X2 represents hypertension, etc. If the disease information of a patient sample is hyperthyroidism, the disease information of the patient sample is quantized into [1, 0, 0, 0, ..., 0], that is, the value of element X1 is 1, and the values of the remaining elements are 0.
[0096] 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 quantized into a one-dimensional matrix [Y1, Y2] with two elements, wherein 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.
[0097] 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, wherein each element represents a department, for example, Z1 represents the Department of Endocrinology, Z2 represents the Department of Nephrology, etc. If the information about the department to which the sample of a patient belongs is the Department of Endocrinology, the information about the department to which the sample of the patient belongs is quantized into [1, 0, 0, 0, ..., 0], that is, the value of the element Z1 is 1, and the values of the remaining elements are 0.
[0098] In other embodiments, quantizing the patient information of the patient sample may include: quantizing at least one piece of information in the patient information of the patient sample, especially age, as a fixed value, preferably as a fixed integer.
[0099] In one example, age can be quantified as a fixed value from 0 to 150, i.e., if the patient's age is 30, then his age is quantified as 30. In other examples, age can be quantified as a percentage. For example, if the patient's age is 30, then his age is quantified as 30 / 100.
[0100] In one example, gender can be quantified as a first positive integer or a second positive integer, wherein the first positive integer represents a male and the second positive integer represents a female. For example, the first positive integer is 1 and the second positive integer is 2, but the present application is not limited thereto.
[0101] Alternatively or additionally, at least one of the patient information of the patient sample may be quantified by a table lookup method, thereby simplifying the construction of the machine learning model.
[0102] In one example, different positive integers can be assigned to different diseases, and the assignment of diseases to corresponding positive integers can be pre-stored in the form of a lookup table. Therefore, when quantifying a patient's disease, the positive integer corresponding to the patient's disease is searched through the lookup table. Table 2 shows an example of a lookup table for quantifying diseases.
[0103] Table 2 Lookup table for quantifying disease
[0104]
[0105]
[0106] In one example, different positive integers may be assigned to different departments, and the assignments of departments and corresponding positive integers may be pre-stored in the form of a lookup table. Therefore, when quantifying the department to which the patient sample belongs, the positive integer corresponding to the department to which the patient sample belongs is searched through the lookup table. Table 3 shows an example of a lookup table for quantifying departments.
[0107] Table 3 Lookup table for quantifying departments
[0108] Department Value Radiotherapy Clinic 1 Chemotherapy Clinic 2 Infectious Diseases Clinic 3 Blood clinic 4 Gynecology Clinic 5 … …
[0109] In some embodiments, in step S210, the average value of the actual test results for the target detection items 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 to reduce, for example, the daytime effects caused by the calibration of the detection instrument and the daytime effects caused by reagents.
[0110] The machine learning model is trained by the actual test results of the target detection items of multiple known patient samples (i.e., historical patient samples) and patient information. Here, the machine learning model can also further characterize the relationship between the patient information, the mean of the actual test results of the multiple known patient samples and the test results of the target detection items. In other words, if the patient information is input into the machine learning model, the predicted test results for the target detection items predicted by the machine learning model will be obtained.
[0111] In some embodiments, the quality control model is constructed according to a machine learning model and a computational model based on a process control SPC algorithm; wherein the step of obtaining monitoring indicators based on the actual test results and the predicted test results may include:
[0112] Calculating the difference between the actual detection result and the predicted detection result; and
[0113] The difference is input into a calculation model based on a process control SPC algorithm to obtain an output of the calculation model as the monitoring indicator.
[0114] 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.
[0115] In other embodiments, the step 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.
[0116] In some further embodiments, the step of acquiring monitoring indicators based on the actual detection results and the predicted detection results may further include:
[0117] Performing data processing on the actual detection result, wherein the data processing includes truncation processing and / or normalization processing; and
[0118] The monitoring index is obtained based on the actual detection result and the predicted detection result after data processing.
[0119] For example, Figure 5 As shown, the steps of obtaining monitoring indicators may include:
[0120] 1) Obtaining the actual test results of the patient sample obtained by the testing instrument for the target test items;
[0121] 2) performing truncation and normal transformation (such as Box-Cov transformation) on the actual detection results;
[0122] 3) The difference between the actual detection result and the predicted detection result after truncation and normal transformation is input into the process control SPC algorithm, and the calculation result of the SPC algorithm is output as the monitoring indicator.
[0123] Here, during the PBRTQC real-time monitoring process, if the detection instrument is out of control, the monitoring indicators obtained will exceed the preset control line.
[0124] In other embodiments, when a machine learning model is used, the actual detection results may not be normalized, thereby simplifying the data processing process.
[0125] In some embodiments, in the quality control step S120, when at least a second number of monitoring indicators among the first number of continuous monitoring indicators obtained in chronological order exceeds the control line of the model, information prompting to retrieve quality control products to the detection instrument for testing can be output. For example, quality control products for target detection items can be automatically retrieved to the detection instrument for detection to obtain the detection results of the quality control products, and based on the detection results of the quality control products, it can be determined whether the detection instrument is out of control. In other words, when it is determined that the detection instrument is out of control based on the monitoring indicators, the quality control products can be further used to test the detection instrument to determine whether the detection instrument is really out of control.
[0126] In some embodiments, Figure 2 The method 100 for performing real-time quality control based on patient samples may also include the following steps:
[0127] When it is detected at a predetermined time that a preset update rule is satisfied, the actual test results of the patient sample obtained before the predetermined time for the target test item are obtained, and the values of the first quantity and the second quantity are updated based on the actual test results.
[0128] In some embodiments, for different target detection items, the manner or model for obtaining monitoring indicators based on actual detection results of the target detection items of multiple patient samples is different.
[0129] In some embodiments, the first number and the second number are selected from a plurality of different alarm parameter value combinations based on the false alarm rate and the number of samples required for error detection of the quality control model under the first number and the second number of different alarm parameter value combinations, and may include:
[0130] Given a preset false alarm rate, a plurality of control line positions and the plurality of different alarm parameter value combinations;
[0131] For each model parameter value combination of each control line position and each alarm parameter value combination, a training data set is used in the quality control model having the model parameter value combination to calculate the monitoring index under the model parameter value combination, and a model false alarm rate is calculated based on the control line position in the model parameter value combination and the monitoring index under the model parameter value combination, wherein the training data set includes actual test results for the target test items of multiple historical patient samples that have been tested by the test instrument in a controlled state in chronological order;
[0132] Selecting a model parameter value combination whose model false alarm rate is less than the preset false alarm rate as a candidate model parameter value combination;
[0133] For each candidate model 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 in the quality control model having the candidate model parameter value combination to calculate the monitoring index of the existence of instrument out-of-control under the candidate model parameter value combination, and the monitoring index is compared with the control line position in the candidate model parameter value combination, so as 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, wherein the simulated data set is obtained by adding errors to the actual test results of the target test items of the patient samples in the training data set at different time points for multiple times, and the real data set is obtained by obtaining the actual test results of the target test items of multiple other historical patient samples tested by the testing instrument in chronological order, wherein the real data set includes the actual test results of the target test items of the patient samples tested when the testing instrument is out of control; and
[0134] The candidate model parameter value combination with the smallest number of samples required for average error detection is selected as the final model parameter value combination.
[0135] In some other embodiments, the first number and the second number are selected from a plurality of different alarm parameter value combinations based on the false alarm rate and the number of samples required for error detection of the quality control model under the first number and the second number of different alarm parameter value combinations, and may include:
[0136] Given a plurality of control line positions and the plurality of different alarm parameter value combinations;
[0137] The model false alarm rate and the average number of samples required for error detection are calculated for each model parameter value combination of each control line position and each alarm parameter value combination as follows:
[0138] In the quality control model having the model parameter value combination, a training data set is used to calculate the monitoring index under the model parameter value combination, and a model false alarm rate is calculated based on the control line position in the model parameter value combination and the monitoring index under the model parameter value combination, wherein the training data set includes actual test results for the target test items of multiple historical patient samples tested by the detection instrument in a controlled state in chronological order,
[0139] In the quality control model having the model 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 existence of instrument out-of-control under the model parameter value combination, and the monitoring index is compared with the control line position in the model parameter value combination, so as 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, wherein the simulated data set is obtained by adding errors to the actual test results of the target test items of the patient samples in the training data set at different time points for multiple times, and the real data set is obtained by obtaining the actual test results of the target test items of multiple other historical patient samples tested by the testing instrument in chronological order, wherein the real data set includes the actual test results of the patient samples tested for the target test items when the testing instrument is out of control; and
[0140] The final model parameter value combination is determined based on the model false alarm rate of each model parameter value combination and the number of samples required for average error detection.
[0141] For example, the model parameter value combination with the smallest number of samples required for average error detection among the model parameter value combinations whose model false alarm rate is lower than the preset false alarm rate can be selected as the final parameter value combination. Alternatively, the model false alarm rate and the number of samples required for average error detection of each model parameter value combination can be weighted summed, and the model parameter value combination with the smallest weighted sum value can be selected as the final model parameter value combination.
[0142] In some embodiments, the quality control model is constructed at least according to a calculation model based on a process control SPC algorithm. At this time, the first number and the second number are selected from the multiple different alarm parameter value combinations based on the false alarm rate and the number of samples required for error detection of the quality control model under the first number and the second number of multiple different alarm parameter value combinations, and may include:
[0143] Given a preset false alarm rate, a plurality of control line positions, a plurality of cutoff ratios of the cutoff process, a plurality of SPC parameter values of the process control SPC algorithm, and the plurality of different alarm parameter value combinations;
[0144] For each model parameter value combination of each control line position, each cutoff ratio, each SPC parameter value and each alarm parameter value combination, a training data set is used in the quality control model having the model parameter value combination to calculate the monitoring index under the model parameter value combination, and a model false alarm rate is calculated based on the control line position in the model parameter value combination and the monitoring index under the model parameter value combination, wherein the training data set includes actual test results for the target test items of multiple historical patient samples that have been tested by the detection instrument in a controlled state in chronological order;
[0145] Selecting a model parameter value combination whose model false alarm rate is less than the preset false alarm rate as a candidate model parameter value combination;
[0146] For each candidate model 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 in the quality control model having the candidate model parameter value combination to calculate the monitoring index of the existence of instrument out-of-control under the candidate model parameter value combination, and the monitoring index is compared with the control line position in the candidate model parameter value combination, so as 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, wherein the simulated data set is obtained by adding errors to the actual test results of the target test items of the patient samples in the training data set at different time points for multiple times, and the real data set is obtained by obtaining the actual test results of the target test items of multiple other historical patient samples tested by the testing instrument in chronological order, wherein the real data set includes the actual test results of the target test items of the patient samples tested when the testing instrument is out of control; and
[0147] The candidate model parameter value combination with the smallest number of samples required for average error detection is selected as the final model parameter value combination.
[0148] In some other embodiments, the first number and the second number are selected from a plurality of different alarm parameter value combinations based on the false alarm rate and the number of samples required for error detection of the quality control model under the first number and the second number of different alarm parameter value combinations, and may include:
[0149] Given a plurality of control line positions, a plurality of cutoff ratios of the cutoff process, a plurality of SPC parameter values of the process control SPC algorithm, and a plurality of different alarm parameter value combinations;
[0150] The model false alarm rate and the number of samples required for average error detection are calculated for each model parameter value combination for each control line position, each cutoff ratio, each SPC parameter value and each alarm parameter value combination as follows:
[0151] In the quality control model having the model parameter value combination, a training data set is used to calculate the monitoring index under the model parameter value combination, and a model false alarm rate is calculated based on the control line position in the model parameter value combination and the monitoring index under the model parameter value combination, wherein the training data set includes actual test results for the target test items of multiple historical patient samples tested by the detection instrument in a controlled state in chronological order,
[0152] In the quality control model having the model 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 existence of instrument out-of-control under the model parameter value combination, and the monitoring index is compared with the control line position in the model parameter value combination, so as 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, wherein the simulated data set is obtained by adding errors to the actual test results of the target test items of the patient samples in the training data set at different time points for multiple times, and the real data set is obtained by obtaining the actual test results of the target test items of multiple other historical patient samples tested by the testing instrument in chronological order, wherein the real data set includes the actual test results of the patient samples tested for the target test items when the testing instrument is out of control; and
[0153] The final model parameter value combination is determined based on the model false alarm rate of each model parameter value combination and the number of samples required for average error detection.
[0154] For example, the model parameter value combination with the smallest number of samples required for average error detection among the model parameter value combinations whose model false alarm rate is lower than the preset false alarm rate can be selected as the final parameter value combination. Alternatively, the model false alarm rate and the number of samples required for average error detection of each model parameter value combination can be weighted summed, and the model parameter value combination with the smallest weighted sum value can be selected as the final model parameter value combination.
[0155] Figure 6 Another method 200 for real-time quality control based on patient samples according to an embodiment of the present application is shown. Figure 6 As shown, the method 200 includes a data acquisition step S210, a monitoring indicator acquisition step S220, a determination step S230 and a quality control step S240.
[0156] In the data acquisition step S210, in the process of the detection instrument performing real-time detection on the patient sample for the target detection item, the actual detection result of the patient sample obtained by the detection instrument for the target detection item is obtained.
[0157] In the monitoring index acquisition step S220, the monitoring index is acquired based on the actual test results of the patient sample.
[0158] In the determination step S230 , it is determined whether at least a second number of monitoring indicators among the first number of continuous monitoring indicators obtained in chronological order exceed the control line, wherein the first number is greater than the second number and the second number is greater than 1.
[0159] In the quality control step S240, when at least a second number of monitoring indicators among the first number of continuous monitoring indicators obtained in chronological order exceed the control line, an alarm prompt indicating that the detection instrument is out of control is output.
[0160] In some embodiments, obtaining monitoring indicators based on the actual test results of the patient sample may include:
[0161] The actual detection results are preprocessed, preferably truncated and / or normalized, and
[0162] The actual detection results that have been preprocessed are input into a calculation model based on a process control SPC algorithm to obtain an output of the calculation model as the monitoring indicator.
[0163] In some embodiments, the alarm parameters (i.e., the first number M and the second number m) can be manually set. In other embodiments, the alarm parameters can be used as parameters to be optimized in the quality control model and optimized in the process of building the quality control model, for example, as described above and below.
[0164] The various embodiments and advantages of the method 100 provided in the embodiment of the present application can be correspondingly transferred to the method provided in the embodiment of the present application, and therefore will not be described in detail. Figure 7 FIG. 3 is a schematic block diagram of a system 300 for performing real-time quality control based on patient samples according to some embodiments of the present application. Figure 7 As shown, the system 300 includes a monitoring indicator acquisition module 310 and a quality control module 320 .
[0165] The monitoring indicator acquisition module 310 is configured to acquire the actual detection results of the patient samples detected by the detection instrument for the target detection items in real time, i.e., to input them into the quality control model in real time, so as to acquire the monitoring indicators output by the quality control model.
[0166] The quality control module 320 is configured to output an alarm indicating that the detection instrument is out of control when at least a second number of monitoring indicators among the first number of monitoring indicators obtained in a time sequence exceeds the control line of the quality control model. , wherein the first number is greater than the second number and the second number is greater than 1, wherein the first number and the second number are selected from the plurality of different alarm parameter value combinations based on the false alarm rate and the number of samples required for error detection under the plurality of different alarm parameter value combinations of the first number and the second number of the quality control model.
[0167] The system 300 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.
[0168] In some embodiments, the target detection 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 can be a blood cell analyzer.
[0169] In other embodiments, the target detection items may be biochemical detection items, such as thyroid function (such as thyroid stimulating hormone, etc.), liver function, kidney function, blood lipids, blood sugar, etc.; accordingly, the detection instrument may be a biochemical analyzer.
[0170] In some embodiments, the quality control model is constructed according to a calculation model based on a process control SPC algorithm; wherein the monitoring indicator acquisition module 310 can be further configured as follows:
[0171] The actual detection results are preprocessed, preferably truncated and / or normalized, and
[0172] The actual detection results that have been preprocessed are input into a calculation model based on a process control SPC algorithm to obtain an output of the calculation model as the monitoring indicator.
[0173] In some embodiments, the monitoring indicator acquisition module 310 may be further configured to:
[0174] The actual test results and the patient information of the patient sample are input into the quality control model to obtain the monitoring index, wherein the patient information includes at least one of the patient's disease, age, gender and the department to which the sample belongs.
[0175] 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.
[0176] 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.
[0177] In some embodiments, the quality control model is constructed according to a machine learning model; wherein the monitoring indicator acquisition module 310 can be further configured as follows:
[0178] Quantifying the patient information of the 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 of the patient sample for the target test item, wherein the machine learning model is trained by actual test results of a plurality of known patient samples for the target test item and patient information; and
[0179] Based on the actual detection result and the predicted detection result, monitoring indicators are obtained.
[0180] 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).
[0181] In some embodiments, the monitoring indicator acquisition module 310 can be further configured to quantify the patient information of the patient sample in the following manner: at least one of the patient information of the patient sample, especially at least one of the disease, gender and the department to which the sample belongs, is quantified into a matrix.
[0182] Furthermore, the monitoring indicator acquisition module 310 can be further configured to quantify the at least one information of the patient sample into a one-dimensional matrix having N elements, wherein each element of the one-dimensional matrix represents a category, and the at least one information belongs to one of the categories represented by the element.
[0183] Preferably, the monitoring indicator acquisition module 310 can be further configured to quantify the at least one information of the patient sample into a one-dimensional matrix with N elements composed of 0 and 1, wherein the value of the element representing the category to which the at least one information belongs is 1, and the values of the remaining elements are 0. In some embodiments, the monitoring indicator acquisition module 310 can be further configured to quantize at least one information of the patient information of the patient sample, especially the age, into a fixed value, preferably a fixed integer.
[0184] Alternatively or additionally, the monitoring index acquisition module 310 may be further configured to quantify at least one of the patient information of the plurality of patient samples by table lookup, thereby simplifying the construction of the machine learning model.
[0185] For specific quantization examples, reference may be made to the above detailed descriptions of various embodiments of the method 200 , which will not be repeated here.
[0186] In some embodiments, 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 monitoring indicator acquisition module 310 can be further configured as follows:
[0187] Calculating the difference between the actual detection result and the predicted detection result; and
[0188] The difference is input into a calculation model based on the SPC algorithm to obtain an output of the calculation model as the monitoring indicator.
[0189] In some embodiments, the SPC algorithm may include, for example, 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.
[0190] In some embodiments, the monitoring indicator acquisition module 310 may be further configured as follows:
[0191] Performing data processing on the actual detection result, wherein the data processing includes truncation processing and / or normalization processing; and
[0192] The monitoring index is obtained based on the actual detection result and the predicted detection result after data processing.
[0193] However, in the above embodiment, due to the use of a machine learning model, the actual detection results may not be normalized, thereby simplifying the data processing process.
[0194] In some embodiments, the quality control module 320 can be further configured to: when at least a second number of monitoring indicators among a first number of continuous monitoring indicators obtained in chronological order exceed the control line of the quality control model, output information prompting to retrieve the quality control product to the detection instrument for testing.
[0195] In some embodiments, the system 300 may further include an update module, which may be configured to: when it is detected at a predetermined time that a preset update rule is satisfied, obtain the actual test results for the target detection item of the patient sample obtained before the predetermined time, and update the values of the first quantity and the second quantity based on this.
[0196] In some embodiments, for different target detection items, the manner or model for obtaining monitoring indicators based on actual detection results of the target detection items of multiple patient samples is different.
[0197] In some embodiments, the first number and the second number are selected from a plurality of different alarm parameter value combinations based on the false alarm rate and the number of samples required for error detection of the quality control model under the first number and the second number of different alarm parameter value combinations, and may include:
[0198] Given a preset false alarm rate, a plurality of control line positions and the plurality of different alarm parameter value combinations;
[0199] For each model parameter value combination of each control line position and each alarm parameter value combination, a training data set is used in the quality control model having the model parameter value combination to calculate the monitoring index under the model parameter value combination, and a model false alarm rate is calculated based on the control line position in the model parameter value combination and the monitoring index under the model parameter value combination, wherein the training data set includes actual test results for the target test items of multiple historical patient samples that have been tested by the test instrument in a controlled state in chronological order;
[0200] Selecting a model parameter value combination whose model false alarm rate is less than the preset false alarm rate as a candidate model parameter value combination;
[0201] For each candidate model 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 in the quality control model having the candidate model parameter value combination to calculate the monitoring index of the existence of instrument out-of-control under the candidate model parameter value combination, and the monitoring index is compared with the control line position in the candidate model parameter value combination, so as 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, wherein the simulated data set is obtained by adding errors to the actual test results of the target test items of the patient samples in the training data set at different time points for multiple times, and the real data set is obtained by obtaining the actual test results of the target test items of multiple other historical patient samples tested by the testing instrument in chronological order, wherein the real data set includes the actual test results of the target test items of the patient samples tested when the testing instrument is out of control; and
[0202] Select the candidate model parameter value combination with the smallest number of samples required for average error detection as the final model parameter value combination
[0203] In some embodiments, the first number and the second number are selected from a plurality of different alarm parameter value combinations based on the false alarm rate and the number of samples required for error detection of the quality control model under the first number and the second number of different alarm parameter value combinations, and may include:
[0204] Given a preset false alarm rate, a plurality of control line positions, a plurality of cutoff ratios of the cutoff process, a plurality of SPC parameter values of the process control SPC algorithm, and the plurality of different alarm parameter value combinations;
[0205] For each model parameter value combination of each control line position, each cutoff ratio, each SPC parameter value and each alarm parameter value combination, a training data set is used in the quality control model having the model parameter value combination to calculate the monitoring index under the model parameter value combination, and a model false alarm rate is calculated based on the control line position in the model parameter value combination and the monitoring index under the model parameter value combination, wherein the training data set includes actual test results for the target test items of multiple historical patient samples that have been tested by the detection instrument in a controlled state in chronological order;
[0206] Selecting a model parameter value combination whose model false alarm rate is less than the preset false alarm rate as a candidate model parameter value combination;
[0207] For each candidate model 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 in the quality control model having the candidate model parameter value combination to calculate the monitoring index of the existence of instrument out-of-control under the candidate model parameter value combination, and the monitoring index is compared with the control line position in the candidate model parameter value combination, so as 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, wherein the simulated data set is obtained by adding errors to the actual test results of the target test items of the patient samples in the training data set at different time points for multiple times, and the real data set is obtained by obtaining the actual test results of the target test items of multiple other historical patient samples tested by the testing instrument in chronological order, wherein the real data set includes the actual test results of the target test items of the patient samples tested when the testing instrument is out of control; and
[0208] The candidate model parameter value combination with the smallest number of samples required for average error detection is selected as the final model parameter value combination.
[0209] The various embodiments and advantages of the methods 100 and 200 provided in the embodiments of the present application can be correspondingly transferred to the system 300 provided in the embodiments of the present application, and therefore will not be described in detail.
[0210] Figure 8 FIG. 3 is a schematic block diagram of a system 300' for real-time quality control based on patient samples according to other embodiments of the present application. Figure 8 As shown, the system 300' includes a data acquisition module 310', a monitoring indicator acquisition module 320', a judgment module 330' and a quality control module 340'.
[0211] The data acquisition module 310 ′ is configured to acquire actual test results of the patient sample obtained by the detection instrument for the target test item during the process of the detection instrument performing real-time detection on the patient sample for the target test item.
[0212] The monitoring index acquisition module 320' is configured to acquire monitoring indexes based on the actual test results of the patient samples.
[0213] The determination module 330 ′ is configured to determine whether at least a second number of monitoring indicators among the first number of monitoring indicators successively obtained in chronological order exceed the control line, wherein the first number is greater than the second number and the second number is greater than 1.
[0214] The quality control module 340' is configured to output an alarm indicating that the detection instrument is out of control when at least a second number of monitoring indicators among a first number of consecutive monitoring indicators obtained in chronological order exceed a control line.
[0215] In some embodiments, the monitoring indicator acquisition module 320' may be further configured to:
[0216] The actual detection results are preprocessed, preferably truncated and / or normalized, and
[0217] The actual detection results that have been preprocessed are input into a calculation model based on a process control SPC algorithm to obtain an output of the calculation model as the monitoring indicator.
[0218] The methods 100 and 200 provided in the embodiments of the present application and the various embodiments and advantages of the system 300 provided in the embodiments of the present application can be correspondingly transferred to the system 300 ′ provided in the embodiments of the present application, and thus will not be described in detail.
[0219] The following describes a method for constructing a quality control model for real-time quality control based on patient samples and a method for optimizing the above-mentioned alarm parameters M and m in conjunction with some embodiments.
[0220] Fig. 9 A method 400 for constructing a quality control model for real-time quality control based on patient samples according to an embodiment of the present application is shown, wherein the quality control model is configured to obtain actual test results of patient samples obtained by a detection instrument for a target test item, obtain monitoring indicators based on the actual test results, and when at least a second number m of monitoring indicators among a first number M of consecutive monitoring indicators obtained in chronological order exceed the control line of the quality control model, output an alarm prompt indicating that the detection instrument is out of control, wherein the first number is greater than the second number and the second number is greater than 1.
[0221] Fig. 9 The illustrated method 400 includes the following steps:
[0222] Step S410, obtaining actual test results for target test items of multiple patient samples tested by the test instrument in chronological order within a certain period of time and dividing the actual test results of the multiple patient samples into a training set, a first verification set and a second verification set, wherein the actual test results in the training set and the actual test results in the first verification set are obtained when the test instrument is in a controlled state, and the second verification set contains actual test results detected when the test instrument is out of control;
[0223] Step S420, given a preset false alarm rate of the quality control model and multiple parameter values of at least one parameter to be optimized of the quality control model, the at least one parameter to be optimized includes the control line and the first number and the second number of alarm parameter combinations;
[0224] Step S430, respectively calculating the model false alarm rate for each model parameter value combination between each parameter value of each parameter to be optimized, in the following manner: using the actual test results of the patient samples in the training set for the target test items in the quality control model having the model parameter value combination to calculate the monitoring index under the model parameter value combination, and calculating the model false alarm rate based on the control line in the model parameter value combination and the monitoring index under the model parameter value combination;
[0225] Step S440, 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;
[0226] Step S450, calculating the average number of samples required for error detection for each candidate parameter value combination, in the manner of using 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 in the quality control model having the candidate parameter value combination to calculate the monitoring index of the existence of instrument out-of-control under the candidate parameter value combination, and comparing it with the control line in the candidate parameter value combination, so as 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 for error detection, wherein the simulated data set is obtained by adding errors to the actual test results of the target items of the patient samples 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 test items of multiple other patient samples;
[0227] Step S460, using the candidate parameter value combination with the minimum number of samples required for average error detection to construct an optimized quality control model;
[0228] Step S470: Use the first validation set to verify the false alarm rate of the constructed quality control model, and use the second validation set to verify the average number of samples required for error detection of the constructed quality control model.
[0229] Fig.10Another method 500 for constructing a quality control model for real-time quality control based on patient samples according to an embodiment of the present application is shown, wherein the quality control model is configured to obtain actual test results of patient samples obtained by a test instrument for a target test item, obtain monitoring indicators based on the actual test results, and output an alarm indicating that the test instrument is out of control when at least a second number of monitoring indicators among a first number of continuous monitoring indicators obtained in chronological order exceeds a control line of the quality control model, wherein the first number is greater than the second number and the second number is greater than 1;
[0230] Fig.10 The illustrated method 500 includes:
[0231] S510, obtaining actual test results for target test items of multiple patient samples tested by the test instrument in chronological order within a certain period of time and dividing the actual test results of the multiple patient samples into a training set, a first verification set and a second verification set, wherein the actual test results in the training set and the actual test results in the first verification set are obtained when the test instrument is in a controlled state, and the second verification set contains actual test results detected when the test instrument is out of control;
[0232] S520, given a plurality of parameter values of at least one parameter to be optimized of the quality control model, the at least one parameter to be optimized comprising the control line and the first number and the second number of alarm parameter combinations;
[0233] S530, for each model parameter value combination between each parameter value of each parameter to be optimized, respectively calculate the model false alarm rate and the number of samples required for average error detection, in the following manner:
[0234] In the quality control model having the model parameter value combination, the actual detection results of the patient samples in the training set for the target detection items are used to calculate the monitoring index under the model parameter value combination, and the model false alarm rate is calculated based on the control line in the model parameter value combination and the monitoring index under the model parameter value combination,
[0235] 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 model parameter value combination, and the monitoring index is compared with the control line in the model parameter value combination, so as 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,
[0236] The simulated data set is obtained by adding errors to the actual test results of the target items of the patient samples 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.
[0237] to obtain;
[0238] S540, determining an optimal combination of model parameter values according to the model false alarm rate and the average number of samples required for error detection of each combination of model parameter values, so as to construct an optimized quality control model; and
[0239] S550: Use the first validation set to verify the false alarm rate of the constructed quality control model, and use the second validation set to verify the average number of samples required for error detection of the constructed quality control model.
[0240] In some embodiments, determining the optimal model parameter value combination according to the model false alarm rate and the average number of samples required for error detection of each model parameter value combination may include:
[0241] The model parameter value combination with the smallest number of samples required for average error detection among the model parameter value combinations with a model false alarm rate lower than a preset false alarm rate is selected as the final optimized parameter value combination of the quality control model; or
[0242] The model false alarm rate and the number of samples required for average error detection of each model parameter value combination are weightedly summed, and the model parameter value combination with the smallest weighted sum value is selected as the final optimized parameter value combination of the quality control model.
[0243] In some embodiments, the quality control model is constructed according to a calculation model based on an SPC algorithm, and the at least one parameter to be optimized further includes a cutoff ratio and an SPC algorithm parameter;
[0244] The multiple parameter values of at least one parameter to be optimized of the given quality control model include: multiple control line positions, multiple cutoff ratios, multiple SPC parameter values, and multiple alarm parameter value combinations of the given quality control model;
[0245] Using the training set in the quality control model having the parameter value combination to calculate the monitoring index under the model parameter value combination, comprising: using the truncation ratio in the model parameter value combination to perform truncation processing and normalization processing on the actual test results in the training set, inputting the processed actual test results into the calculation model based on the SPC algorithm, and calculating the monitoring index in the calculation model according to the SPC algorithm; and
[0246] The simulated data set or the real data set is used in the quality control model with the parameter value combination to calculate the monitoring index of the instrument out of control, including: using the truncation ratio in the model parameter value combination to truncate and normalize the actual detection results in the simulated data set or the real data set, inputting the processed actual detection results into the calculation model based on the SPC algorithm, and calculating the monitoring index of the detection instrument out of control in the calculation model according to the SPC algorithm.
[0247] Here, it can be understood that when optimizing the parameters to be optimized of the quality control model, the values of other parameters of the quality control model are selected to be fixed, for example, selected based on experience. For example, when optimizing the control line of the quality control model, the SPC parameters of the calculation model, and the alarm parameter combination, the truncation ratio of the truncation process can be selected to be fixed.
[0248] Taking the process control SPC algorithm as the floating mean method as an example, 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 sliding windows, cutoff ratios and M&N alarm combination parameters. Given the upper and lower control line positions (the percentage positions of the upper and lower S / 2 of the monitoring index, S values are 0.001%, 0.01%, 0.1%, 1%, 3%, 5%), given sliding window parameter values of 10, 20, 50, 70 and 100, given truncation ratio parameter values of truncation processing of ±0%, ±1%, ±2%, ±5% and given alarm combination parameters as shown in Table 4. Use the training set to calculate the monitoring index under different parameter value combinations of upper and lower control line positions, sliding windows, cutoff ratios and alarm combination parameters, and then calculate the false alarm rate based on the monitoring index and the upper and lower control lines. Then add errors randomly in multiple places in the training set, calculate the number of samples required for error detection each time, and then take the average to obtain the number of samples required for average error detection. The optimal parameter value combination is determined based on the false alarm rate of each parameter value combination and the number of samples required for average error detection.
[0249] Table 4 Combinations of different alarm parameters
[0250] Combination number M m 1 3 1 2 5 3 3 10 7 4 20 14 … … …
[0251] Fig.11 A method 600 for constructing a quality control model based on a machine learning model for real-time quality control based on patient samples according to an embodiment of the present application is shown, comprising the following steps:
[0252] S610, 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 include actual test results of the multiple patient samples for target test 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 the patient's disease, age, gender, and at least one of the departments to which the samples belong, wherein the data in the training set is obtained when the testing instrument is in a controlled state.
[0253] Here, for example, actual test results for target test items and patient information of a plurality of patient samples, especially all patient samples, tested by the testing instrument in chronological order within a certain period of time are obtained.
[0254] In step S610, the sample ratio of the training set and the test set can be set to 6:4 or 7:3, etc.
[0255] S620, using the training set 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 test results for the target test items,
[0256] X t =f(x 1t , x 2t , …, x nt )+ε t
[0257] Among them, X t is the actual test result of the patient sample for the target test item, f(x 1t , x 2t , …, x nt ) is a machine learning model, x 1t , x 2t , …, x nt represents the quantified input of patient information, ε t Represents the use of neural networks to estimate X t That is to say, the machine learning model f is regressed using the historical test results and patient information of the patient controlled by the test instrument. At this time, ε t Approximately a random distribution with mean 0.
[0258] In some embodiments, the machine learning model may be a neural network model, wherein the structure of the machine learning model is as follows: Fig.12 In some other embodiments, the machine learning model may be a machine learning model based on SVM (support vector machine) and / or LDA (support vector machine).
[0259] S630, constructing a quality control model for real-time quality control based on patient samples based on the machine learning model.
[0260] S640: Use the test set to verify the quality control model so as to verify the performance of the quality control model.
[0261] Since the machine learning model f is a nonlinear function of an artificial neural network, it can reasonably estimate 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 more stable, which improves the system quality control performance compared with the existing PBRTQC.
[0262] When the detection instrument is in a normal controlled state, the residual ε t Random fluctuation and minimum sum of square errors. In some embodiments, the loss function mtn∑||ε 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 , x 2t , …, x nt ).
[0263] In some embodiments, in step S630, constructing a quality control model for real-time quality control based on patient samples based on the machine learning model may include: calculating 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.
[0264] 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.
[0265] In some embodiments, in step S620, the average value of the actual test results of the target detection items of n patient samples (the value of n is, for example, the daily test throughput of the detection instrument) in the test set before a specific time can also be used as a variable of the machine learning model to reduce, for example, the daytime effects caused by the calibration of the detection instrument and the daytime effects caused by reagents.
[0266] Further, in step S630, the false alarm rate is given and the upper and lower control lines of the quality control model (i.e., the aforementioned preset control lines) 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.
[0267] 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.
[0268] In some embodiments, Fig.13 As shown, in step S630, the parameters of the calculation model can be optimized in the following manner:
[0269] Step S631a, setting a false alarm rate;
[0270] Step S632a, providing a plurality of SPC parameter values of the calculation model;
[0271] Step S633a, for each SPC parameter value, using a simulated data set including multiple simulated out-of-control locations or a real data set including multiple real out-of-control locations to obtain upper and lower control lines and the number of samples required for average error detection under the false alarm rate, in the following manner: using the actual test results of the patient samples in the training set for the target test items and the patient information to calculate the monitoring index under the SPC parameter value, and obtaining the upper and lower control lines based on the monitoring index and the false alarm rate under the SPC parameter value, inputting the simulated data set including multiple simulated out-of-control locations or the real data set including multiple real out-of-control locations into the quality control model, so as to calculate the upper and lower control lines under the SPC parameter value. The monitoring index of the presence of the detection instrument out of control under the C parameter value is compared with the upper and lower control lines, so as to calculate the average number of samples required from the start of the simulated out-of-control or real out-of-control at various locations to the actual monitoring of the simulated out-of-control or real out-of-control by the quality control model, that is, the average number of samples required for error detection, wherein the simulated data set is obtained by adding errors to the actual detection results in the training set at different time points, and the real data set is obtained from the data of the multiple patient samples or by obtaining the actual detection results of multiple other patient samples (including the actual detection results obtained when the detection instrument is out of control) and patient information; and
[0272] Step S634a, 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.
[0273] Here, the false alarm rate directly determines the upper and lower control lines, and the false alarm rate is usually set by the user in combination with the 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.
[0274] 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 cutoff ratio, are selected to be fixed, for example, selected based on experience.
[0275] 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 false alarm rate is given as 0.1%, and the parameter values of the given sliding window are 5, 10, 15, 20, 50 and 100. The monitoring indicators under different sliding windows are calculated using the training set, and then the upper and lower control lines are calculated based on the monitoring indicators and the false alarm rate. Next, errors are randomly added to multiple locations 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 average error detection is obtained, so as to find the parameter value that meets the given false alarm rate and the minimum average number of samples required for error detection.
[0276] For example, the actual test results of the target test items of N patient samples and the patient information are used to calculate the monitoring indicators. The number of false alarms is N*0.1%, and the upper and lower false alarm numbers are 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 that exceed the upper control line and the lower control line respectively.
[0277] In an example, assuming that the actual test results of 12,700 patient samples for the target test items and patient information are used to calculate the monitoring indicators, given a false alarm rate of 0.1%, the number of false alarms is: 12700*0.1%≈12 cases, and the upper and lower false alarm numbers are 12 / 2=6 cases. Based on this, the positions of the upper control line and the lower control line are found, that is, the positions of the monitoring indicators that exceed the upper control line and the lower control line by 6 cases, respectively, such as Fig.14 shown.
[0278] In some embodiments, steps S531a, S532a, S533a and S534a 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 (for example, 0.001%, 0.01%, 0.1%, 1%, 3%, 5%), so as to obtain the parameter value corresponding to the minimum average error detection required number of samples and the upper and lower control lines corresponding to the parameter value, so as to construct an optimized quality control model.
[0279] In some embodiments, the actual test results of the target test items of the patient samples in the training set may be truncated and optionally normalized before establishing the machine learning model.
[0280] In some embodiments, a fixed truncation ratio may be set for truncation processing.
[0281] In other embodiments, Fig.15 As shown, the parameters of the truncation process and the parameters of the calculation model can be optimized in the following manner:
[0282] Step S631b, setting a false alarm rate;
[0283] Step S632b, providing a plurality of truncation ratios of the truncation process and a plurality of SPC parameter values of the calculation model;
[0284] Step S633b, for each parameter value combination of each cutoff ratio and each SPC parameter value, use a simulated data set including multiple simulated out-of-control or a real data set including multiple real out-of-control to obtain the upper and lower control lines and the number of samples required for the average error detection under the false alarm rate, in the following manner: use the actual test results of the target test items of the patient samples in the training set and the patient information to calculate the monitoring indicators under the parameter value combination, and obtain the upper and lower control lines based on the monitoring indicators and the false alarm rate under the parameter value combination, input the simulated data set including multiple simulated out-of-control or the real data set including multiple real out-of-control into the quality control model, so as to obtain the upper and lower control lines. Then, the monitoring index of the presence of out-of-control of the detection instrument under the parameter value combination is calculated and compared with the upper and lower control lines, so as to calculate the average number of samples required from the start of the simulated out-of-control or real out-of-control at various locations to the actual monitoring of the simulated out-of-control or real out-of-control by the quality control model, that is, the average number of samples required for error detection, wherein the simulated data set is obtained by adding errors to the actual detection results in the training set at different time points, and the real data set is obtained from the data of the multiple patient samples or by obtaining the actual detection results of multiple other patient samples (including the actual detection results obtained when the detection instrument is out of control) and patient information; and
[0285] Step S634b, 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 construct an optimized quality control model.
[0286] Here, it can be understood that in the process of optimizing the parameters of the truncation processing 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.
[0287] Similarly, in some embodiments, steps S531b, S532b, S533b and S534b 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 (for example, 0.001%, 0.01%, 0.1%, 1%, 3%, 5%), so as to obtain 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, so as to construct an optimized quality control model.
[0288] Taking the process control SPC algorithm as the floating mean method as an example, 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 a sliding window and a truncation ratio. The given false alarm rate is 0.1%, and the parameter values of the given sliding window are 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 monitoring index under different parameter value combinations of the sliding window and the truncation ratio (in this example, there are 24 parameter value combinations) is calculated using the training set, and then the upper and lower control lines are calculated based on the monitoring index and the false alarm rate (for example, the actual test results of the target detection items for N patient samples and the patient information are used to calculate the monitoring index, then 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 control line and the lower control line are found, and there are N*0.1% / 2 monitoring indicators that exceed the upper control line and the lower control line respectively.). Then, errors are randomly added to multiple locations 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.
[0289] In an embodiment of the present application, when the above-mentioned quality control model is used for real-time quality control, the detection instrument is judged to be out of control and an alarm prompt is output only when m monitoring indicators among M consecutive monitoring indicators (obtained in chronological order) exceed the upper and lower control lines, wherein M and m are both natural numbers greater than 1.
[0290] In some embodiments, the values of M and m may be fixedly set.
[0291] In other embodiments, the alarm parameters M and m may be parameters to be optimized for the quality control model, that is, the parameters of the calculation model and M, m and the optional parameters of the truncation process are optimized in the following manner:
[0292] Given multiple cutoff ratios of the cutoff process, multiple SPC parameter values of the SPC algorithm, multiple control line positions, and multiple alarm combination parameter values of M&M;
[0293] For each parameter value combination of each cutoff ratio, each SPC parameter value, each control line position, and each alarm combination parameter value, perform the following sub-steps:
[0294] Using the cutoff ratio in the parameter value combination to perform truncation processing and normalization processing on the actual detection results in the training set;
[0295] Inputting the processed actual test results together with corresponding patient information into the machine learning model to obtain residuals;
[0296] The residual is input into a calculation model based on the SPC algorithm, and a monitoring index is calculated in the calculation model according to the SPC algorithm;
[0297] Calculate the false alarm rate under the parameter value combination based on the monitoring index under the parameter value combination and the upper and lower control lines in the parameter value combination;
[0298] A simulated data set including multiple simulated out-of-control locations or a real data set including multiple real out-of-control locations is used to calculate the false alarm rate and the average number of samples required for error detection under the parameter value combination, in which the actual detection results in the simulated data set or the real data set are input into a calculation model based on an SPC algorithm to obtain a monitoring indicator indicating the presence of out-of-control of the detection instrument and compare it with the control line in the parameter value combination, so as to calculate the average number of samples required from the start of the simulated out-of-control or real out-of-control at various locations to the actual monitoring of the simulated out-of-control or real out-of-control by the quality control model, that is, the average number of samples required for error detection, wherein the simulated data set is obtained by adding errors to the actual detection results in the training set at different time points, and the real data set is obtained from the actual detection results of the multiple patient samples or by obtaining the actual detection results of multiple other patient samples (including the actual detection results obtained when the detection instrument is out of control);
[0299] The optimal parameter value combination is calculated according to the false alarm rate and the number of samples required for average error detection under each parameter value combination, and the quality control model is constructed based on the optimal parameter value combination.
[0300] In some embodiments, the parameter value combination with the smallest number of samples required for average error detection among the parameter value combinations with a model false alarm rate lower than a preset false alarm rate may be selected as the final optimized parameter value combination of the quality control model.
[0301] In other embodiments, the model false alarm rate 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 is selected.
[0302] In some other embodiments not shown, M and m 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, m and the optional parameters of the truncation process are optimized in the following manner:
[0303] 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 m, and optionally a plurality of truncation ratios of the truncation process;
[0304] Calculating the 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, in the following manner: using the actual test results of the patient samples in the training set for the target item 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;
[0305] 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;
[0306] for each candidate parameter value combination, obtaining the average number of samples required for error detection, by using 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 in the quality control model having the candidate parameter value combination to calculate the monitoring index of the presence of instrument out-of-control under the candidate parameter value combination, and comparing it with the control line in the candidate parameter value combination, so as 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, 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 of the target items of the patient samples 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
[0307] The candidate parameter value combination with the smallest number of samples required for average error detection is used to construct an optimized quality control model.
[0308] Here, it can be understood that when optimizing the control line of the quality control model, the parameters of the calculation model, M, m, and the optional parameters of the truncation process, the values of other parameters of the quality control model are selected to 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, m, the truncation ratio of the truncation process can be selected to be fixed.
[0309] In some embodiments, in step S640, 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 S630, and the corresponding monitoring indicators are calculated 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 state 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 state 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 state 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.
[0310] In some embodiments, in step S620, quantizing the patient information of the patient samples in the training set may include: quantizing 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.
[0311] Furthermore, quantizing at least one kind of patient information of the patient samples in the training set into matrices may include: quantizing the at least one kind of information of the patient samples in the training set into one-dimensional matrices with N elements, wherein each element of the one-dimensional matrix represents a category, and the at least one information belongs to one of the categories represented by the element.
[0312] Preferably, quantizing the at least one information of the patient samples in the training set into a one-dimensional matrix with N elements may include:
[0313] The at least one information of the patient samples in the training set is quantified into a one-dimensional matrix with N elements consisting of 0 and 1, wherein the value of the element representing the category to which the at least one information belongs is 1, and the values of the remaining elements are 0.
[0314] 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.
[0315] Alternatively or additionally, the patient information of the patient samples in the training set may be quantified by a table lookup method.
[0316] For specific quantization examples, reference may be made to the above detailed descriptions of various embodiments of the method 200 , which will not be repeated here.
[0317] In some embodiments, the patient information includes the patient's disease, age, gender, and the department to which the sample belongs.
[0318] The various embodiments and advantages of the methods 100, 200 and systems 300, 300' provided in the embodiments of the present application can be correspondingly transferred to the model building methods 400, 500 and 600 provided in the embodiments of the present application, and therefore will not be described in detail.
[0319] It should be noted that the terms "first\second\third" involved in the embodiments of the present application are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged in a specific order or sequence where permitted.
[0320] The features or feature combinations mentioned in the specification, drawings and claims above, as long as they are meaningful within the scope of the present application and do not contradict each other, can be used in any combination or alone. The advantages and features described for the sample analyzer provided in the present application are applicable to the sample analysis method provided in the present application in a corresponding manner, and vice versa.
[0321] 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 transformations made by using the contents of the present application specification and drawings under the inventive concept of the present application, or direct / indirect application 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, comprising: In the process of the detection instrument performing real-time detection on the patient sample for the target detection item, the actual detection result of the patient sample obtained by the detection instrument for the target detection item is obtained and input into the quality control model to obtain the monitoring index output by the quality control model; When at least a second number of monitoring indicators among the first number of monitoring indicators obtained successively in chronological order exceeds the control line of the quality control model, 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, The first number and the second number are selected from a plurality of different alarm parameter value combinations based on the false alarm rate and the number of samples required for error detection of the quality control model under a plurality of different alarm parameter value combinations of the first number and the second number.
2. The method according to claim 1, characterized in that The quality control model is constructed according to a calculation model based on a process control SPC algorithm; wherein, Inputting the actual test results into the quality control model to obtain the monitoring indicators includes: The actual detection results are preprocessed, preferably truncated and / or normalized, and The actual detection results that have been preprocessed are input into a calculation model based on a process control SPC algorithm to obtain an output of the calculation model as the monitoring indicator.
3. The method according to claim 1, characterized in that Inputting the actual test results into the quality control model to obtain the monitoring indicators includes: The actual test results and the patient information of the patient sample are input into the quality control model to obtain the monitoring index, wherein the patient information includes at least one of the patient's disease, age, gender and the department to which the sample belongs.
4. The method according to claim 3, characterized in that The quality control model is constructed according to a machine learning model; wherein, Inputting the actual test result and the patient information of the patient sample into the quality control model to obtain the monitoring index includes: Quantifying the patient information of the 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 of the patient sample for the target test item, wherein the machine learning model is trained by actual test results of a plurality of known patient samples for the target test item and patient information; The monitoring indicator is obtained based on the actual detection result and the predicted detection result.
5. The method according to claim 4, characterized in that The quality control model is constructed based on a machine learning model and a calculation model based on a process control SPC algorithm; wherein, Based on the actual detection result and the predicted detection result, a monitoring indicator is obtained, including: 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 of the calculation model as the monitoring indicator.
6. The method according to any one of claims 1 to 5, characterized in that Also includes: When it is detected at a predetermined time that a preset update rule is satisfied, the actual test results of the patient sample obtained before the predetermined time for the target test item are obtained, and the values of the first quantity and the second quantity are updated based on the actual test results.
7. The method according to any one of claims 1 to 6, characterized in that Also includes: When at least a second number of monitoring indicators among a first number of continuous monitoring indicators obtained in chronological order exceed the control line of the quality control model, information prompting to retrieve the quality control product to the detection instrument for testing is output.
8. The method according to any one of claims 1 to 7, characterized in that The first number and the second number are selected from the plurality of different alarm parameter value combinations based on the false alarm rate and the number of samples required for error detection of the quality control model under the plurality of different alarm parameter value combinations of the first number and the second number, including: Given a preset false alarm rate, a plurality of control line positions and the plurality of different alarm parameter value combinations; For each model parameter value combination of each control line position and each alarm parameter value combination, a training data set is used in the quality control model having the model parameter value combination to calculate the monitoring index under the model parameter value combination, and a model false alarm rate is calculated based on the control line position in the model parameter value combination and the monitoring index under the model parameter value combination, wherein the training data set includes actual test results for the target test items of multiple historical patient samples that have been tested by the test instrument in a controlled state in chronological order; Selecting a model parameter value combination whose model false alarm rate is less than the preset false alarm rate as a candidate model parameter value combination; For each candidate model 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 in the quality control model having the candidate model parameter value combination to calculate the monitoring index of the existence of instrument out-of-control under the candidate model parameter value combination, and the monitoring index is compared with the control line position in the candidate model parameter value combination, so as 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, wherein the simulated data set is obtained by adding errors to the actual test results of the target test items of the patient samples in the training data set at different time points for multiple times, and the real data set is obtained by obtaining the actual test results of the target test items of multiple other historical patient samples tested by the testing instrument in chronological order, wherein the real data set includes the actual test results of the target test items of the patient samples tested when the testing instrument is out of control; and The candidate model parameter value combination with the smallest number of samples required for average error detection is taken as the final model parameter value combination.
9. The method according to claim 2 or 5, characterized in that: The first number and the second number are selected from the plurality of different alarm parameter value combinations based on the false alarm rate and the number of samples required for error detection of the quality control model under the plurality of different alarm parameter value combinations of the first number and the second number, including: Given a preset false alarm rate, a plurality of control line positions, a plurality of cutoff ratios of the cutoff process, a plurality of SPC parameter values of the process control SPC algorithm, and the plurality of different alarm parameter value combinations; For each model parameter value combination of each control line position, each cutoff ratio, each SPC parameter value and each alarm parameter value combination, a training data set is used in the quality control model having the model parameter value combination to calculate the monitoring index under the model parameter value combination, and a model false alarm rate is calculated based on the control line position in the model parameter value combination and the monitoring index under the model parameter value combination, wherein the training data set includes actual test results for the target test items of multiple historical patient samples that have been tested by the detection instrument in a controlled state in chronological order; Selecting a model parameter value combination whose model false alarm rate is less than the preset false alarm rate as a candidate model parameter value combination; For each candidate model 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 in the quality control model having the candidate model parameter value combination to calculate the monitoring index of the existence of instrument out-of-control under the candidate model parameter value combination, and the monitoring index is compared with the control line position in the candidate model parameter value combination, so as 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, wherein the simulated data set is obtained by adding errors to the actual test results of the target test items of the patient samples in the training data set at different time points for multiple times, and the real data set is obtained by obtaining the actual test results of the target test items of multiple other historical patient samples tested by the testing instrument in chronological order, wherein the real data set includes the actual test results of the target test items of the patient samples tested when the testing instrument is out of control; and The candidate model parameter value combination with the smallest number of samples required for average error detection is selected as the final model parameter value combination.
10. A method for real-time quality control based on patient samples, comprising: In the process of the detection instrument performing real-time detection on the patient sample for the target detection item, obtaining the actual detection result of the patient sample obtained by the detection instrument for the target detection item; Acquiring monitoring indicators based on actual test results of the patient samples; Determine whether at least a second number of monitoring indicators exceeds a control line among a first number of continuous monitoring indicators obtained in chronological order, wherein the first number is greater than the second number and the second number is greater than 1; When at least a second number of monitoring indicators among the first number of monitoring indicators successively obtained in chronological order exceed the control line, an alarm prompt indicating that the detection instrument is out of control is output.
11. The method according to claim 10, characterized in that Acquiring monitoring indicators based on the actual test results of the patient samples includes: The actual detection results are preprocessed, preferably truncated and / or normalized, and The actual detection results that have been preprocessed are input into a calculation model based on a process control SPC algorithm to obtain an output of the calculation model as the monitoring indicator.
12. A system for real-time quality control based on patient samples, comprising: A monitoring index acquisition module is configured to obtain the actual test results of the patient sample obtained by the detection instrument for the target test item during the process of the detection instrument performing real-time detection on the patient sample for the target test item and input the results into the quality control model to obtain the monitoring index output by the quality control model; The quality control module is configured to output an alarm prompt indicating that the detection instrument is out of control when at least a second number of monitoring indicators among a first number of continuous monitoring indicators obtained in chronological order exceeds the control line of the quality control model, wherein the first number is greater than the second number and the second number is greater than 1, and wherein the first number and the second number are selected from the multiple different alarm parameter value combinations based on the false alarm rate and the number of samples required for error detection of the quality control model under multiple different alarm parameter value combinations of the first number and the second number.
13. The system according to claim 12, characterized in that The quality control model is constructed according to a calculation model based on a process control SPC algorithm; wherein, The monitoring indicator acquisition module is further configured as follows: The actual detection results are preprocessed, preferably truncated and / or normalized, and The actual detection results that have been preprocessed are input into a calculation model based on a process control SPC algorithm to obtain an output of the calculation model as the monitoring indicator.
14. The system according to claim 12, characterized in that The monitoring indicator acquisition module is further configured as follows: The actual test results and the patient information of the patient sample are input into the quality control model to obtain the monitoring index, wherein the patient information includes at least one of the patient's disease, age, gender and the department to which the sample belongs.
15. The system according to claim 14, characterized in that The quality control model is constructed according to a machine learning model; wherein, The monitoring indicator acquisition module is further configured as follows: Quantifying the patient information of the 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 of the patient sample for the target test item, wherein the machine learning model is trained by actual test results of a plurality of known patient samples for the target test item and patient information; Based on the actual detection result and the predicted detection result, monitoring indicators are obtained.
16. The system according to claim 15, characterized in that 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 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 the SPC algorithm to obtain an output of the calculation model as the monitoring indicator.
17. The system according to any one of claims 12 to 16, characterized in that: Also includes: The updating module is configured to obtain the actual test results of the patient samples obtained before the predetermined time for the target detection items when it is detected that the preset update rules are met at the predetermined time, and update the values of the first quantity and the second quantity based on this.
18. The system according to any one of claims 12 to 17, characterized in that The quality control module is further configured to output information prompting the detection instrument to retrieve the quality control product for testing when at least a second number of monitoring indicators among a first number of continuous monitoring indicators obtained in chronological order exceed the control line of the quality control model.
19. The system according to any one of claims 12 to 18, characterized in that The first number and the second number are selected from the plurality of different alarm parameter value combinations based on the false alarm rate and the number of samples required for error detection of the quality control model under the plurality of different alarm parameter value combinations of the first number and the second number, including: Given a preset false alarm rate, a plurality of control line positions and the plurality of different alarm parameter value combinations; For each model parameter value combination of each control line position and each alarm parameter value combination, a training data set is used in the quality control model having the model parameter value combination to calculate the monitoring index under the model parameter value combination, and a model false alarm rate is calculated based on the control line position in the model parameter value combination and the monitoring index under the model parameter value combination, wherein the training data set includes actual test results for the target test items of multiple historical patient samples that have been tested by the test instrument in a controlled state in chronological order; Selecting a model parameter value combination whose model false alarm rate is less than the preset false alarm rate as a candidate model parameter value combination; For each candidate model 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 in the quality control model having the candidate model parameter value combination to calculate the monitoring index of the existence of instrument out-of-control under the candidate model parameter value combination, and the monitoring index is compared with the control line position in the candidate model parameter value combination, so as 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, wherein the simulated data set is obtained by adding errors to the actual test results of the target test items of the patient samples in the training data set at different time points for multiple times, and the real data set is obtained by obtaining the actual test results of the target test items of multiple other historical patient samples tested by the testing instrument in chronological order, wherein the real data set includes the actual test results of the target test items of the patient samples tested when the testing instrument is out of control; and The candidate model parameter value combination with the smallest number of samples required for average error detection is selected as the final model parameter value combination.
20. The system according to claim 13 or 16, characterized in that The first number and the second number are selected from the plurality of different alarm parameter value combinations based on the false alarm rate and the number of samples required for error detection of the quality control model under the plurality of different alarm parameter value combinations of the first number and the second number, including: Given a preset false alarm rate, a plurality of control line positions, a plurality of cutoff ratios of the cutoff process, a plurality of SPC parameter values of the process control SPC algorithm, and the plurality of different alarm parameter value combinations; For each model parameter value combination of each control line position, each cutoff ratio, each SPC parameter value and each alarm parameter value combination, a training data set is used in the quality control model having the model parameter value combination to calculate the monitoring index under the model parameter value combination, and a model false alarm rate is calculated based on the control line position in the model parameter value combination and the monitoring index under the model parameter value combination, wherein the training data set includes actual test results for the target test items of multiple historical patient samples that have been tested by the detection instrument in a controlled state in chronological order; Selecting a model parameter value combination whose model false alarm rate is less than the preset false alarm rate as a candidate model parameter value combination; For each candidate model 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 in the quality control model having the candidate model parameter value combination to calculate the monitoring index of the existence of instrument out-of-control under the candidate model parameter value combination, and the monitoring index is compared with the control line position in the candidate model parameter value combination, so as 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, wherein the simulated data set is obtained by adding errors to the actual test results of the target test items of the patient samples in the training data set at different time points for multiple times, and the real data set is obtained by obtaining the actual test results of the target test items of multiple other historical patient samples tested by the testing instrument in chronological order, wherein the real data set includes the actual test results of the target test items of the patient samples tested when the testing instrument is out of control; and The candidate model parameter value combination with the smallest number of samples required for average error detection is selected as the final model parameter value combination.
21. A system for real-time quality control based on patient samples, comprising: The data acquisition module is configured to acquire, during the process of the detection instrument performing real-time detection on the patient sample for the target detection item, the actual detection result of the patient sample obtained by the detection instrument for the target detection item; A monitoring index acquisition module, configured to acquire monitoring indicators based on actual test results of the patient samples; A determination module is configured to determine whether at least a second number of monitoring indicators exceeds a control line among a first number of continuous monitoring indicators obtained in chronological order, wherein the first number is greater than the second number and the second number is greater than 1; as well as The quality control module is configured to output an alarm indicating that the detection instrument is out of control when at least a second number of monitoring indicators among a first number of continuous monitoring indicators obtained in chronological order exceed a control line.
22. The method according to claim 21, characterized in that The monitoring indicator acquisition module is further configured as follows: The actual detection results are preprocessed, preferably truncated and / or normalized, and The actual detection results that have been preprocessed are input into a calculation model based on a process control SPC algorithm to obtain an output of the calculation model as the monitoring indicator.
23. A method for constructing a quality control model for real-time quality control based on patient samples, in, The quality control model is configured to obtain actual test results of patient samples obtained by the detection instrument for target test items, obtain monitoring indicators based on the actual test results, and output an alarm indicating that the detection instrument is out of control when at least a second number of monitoring indicators among the first number of consecutive monitoring indicators obtained in chronological order exceeds the control line of the quality control model, wherein the first number is greater than the second number and the second number is greater than 1; Wherein, the method comprises: Acquire actual test results for target test items of multiple patient samples tested by the test instrument in chronological order within a certain period of time and divide the actual test results of the multiple patient samples into a training set, a first verification set and a second verification set, wherein the actual test results in the training set and the actual test results in the first verification set are obtained when the test instrument is in a controlled state, and the second verification set contains actual test results detected when the test instrument is out of control; Given a preset false alarm rate of the quality control model and a plurality of parameter values of at least one parameter to be optimized of the quality control model, the at least one parameter to be optimized includes the control line and the first number and the second number of alarm parameter combinations; The model false alarm rate is calculated for each model parameter value combination between each parameter value of each parameter to be optimized, in the following manner: in the quality control model having the model parameter value combination, the actual detection results of the patient samples in the training set for the target detection items are used to calculate the monitoring index under the model parameter value combination, and the model false alarm rate is calculated based on the control line in the model parameter value combination and the monitoring index under the model parameter value combination; 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; Calculating the average number of samples required for error detection for each candidate parameter value combination, in the manner of using 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 in the quality control model having the candidate parameter value combination to calculate the monitoring index of the presence of instrument out-of-control under the candidate parameter value combination, and comparing it with the control line in the candidate parameter value combination, so as 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 for error detection, wherein the simulated data set is obtained by adding errors to the actual test results of the target items of the patient samples 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 test items of multiple other patient samples; 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; and The first validation set is used to validate the false alarm rate of the constructed quality control model, and the second validation set is used to validate the average number of samples required for error detection of the constructed quality control model.
24. A method for constructing a quality control model for real-time quality control based on patient samples, in, The quality control model is configured to obtain actual test results of patient samples obtained by the detection instrument for target test items, obtain monitoring indicators based on the actual test results, and output an alarm indicating that the detection instrument is out of control when at least a second number of monitoring indicators among the first number of consecutive monitoring indicators obtained in chronological order exceeds the control line of the quality control model, wherein the first number is greater than the second number and the second number is greater than 1; Wherein, the method comprises: Acquire actual test results for target test items of multiple patient samples tested by the test instrument in chronological order within a certain period of time and divide the actual test results of the multiple patient samples into a training set, a first verification set and a second verification set, wherein the actual test results in the training set and the actual test results in the first verification set are obtained when the test instrument is in a controlled state, and the second verification set contains actual test results detected when the test instrument is out of control; Given a plurality of parameter values of at least one parameter to be optimized of the quality control model, the at least one parameter to be optimized includes the control line and the first number and the second number of alarm parameter combinations; The model false alarm rate and the number of samples required for average error detection are calculated for each model parameter value combination between each parameter value of each parameter to be optimized, in the following way: In the quality control model having the model parameter value combination, the actual detection results of the patient samples in the training set for the target detection items are used to calculate the monitoring index under the model parameter value combination, and the model false alarm rate is calculated based on the control line in the model parameter value combination and the monitoring index under the model parameter value combination, 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 model parameter value combination, and the monitoring index is compared with the control line in the model parameter value combination, so as 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 of the target items of the patient samples 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; Determine the optimal combination of model parameter values according to the model false alarm rate and the average number of samples required for error detection of each combination of model parameter values to construct an optimized quality control model; and The first validation set is used to validate the false alarm rate of the constructed quality control model, and the second validation set is used to validate the average number of samples required for error detection of the constructed quality control model.
25. The method according to claim 24, characterized in that The optimal model parameter value combination is determined based on the model false alarm rate and the number of samples required for average error detection of each model parameter value combination, including: The model parameter value combination with the smallest number of samples required for average error detection among the model parameter value combinations with a model false alarm rate lower than a preset false alarm rate is selected as the final optimized parameter value combination of the quality control model; or The model false alarm rate and the number of samples required for average error detection of each model parameter value combination are weightedly summed, and the model parameter value combination with the smallest weighted sum value is selected as the final optimized parameter value combination of the quality control model.
26. The method according to any one of claims 23 to 25, characterized in that The quality control model is constructed according to a calculation model based on an SPC algorithm, and the at least one parameter to be optimized further includes a cutoff ratio and an SPC algorithm parameter; The multiple parameter values of at least one parameter to be optimized of the given quality control model include: multiple control line positions, multiple cutoff ratios, multiple SPC parameter values, and multiple alarm parameter value combinations of the given quality control model; Using the training set in the quality control model having the parameter value combination to calculate the monitoring index under the model parameter value combination, comprising: using the truncation ratio in the model parameter value combination to perform truncation processing and normalization processing on the actual test results in the training set, inputting the processed actual test results into the calculation model based on the SPC algorithm, and calculating the monitoring index in the calculation model according to the SPC algorithm; and The simulated data set or the real data set is used in the quality control model with the parameter value combination to calculate the monitoring index of the instrument out of control, including: using the truncation ratio in the model parameter value combination to truncate and normalize the actual detection results in the simulated data set or the real data set, inputting the processed actual detection results into the calculation model based on the SPC algorithm, and calculating the monitoring index of the detection instrument out of control in the calculation model according to the SPC algorithm.
Citation Information
Cited By
Intelligent blood glucose monitoring and early warning method and system based on multi-source data fusion
CN120713515A
