Method for real-time quality control based on patient sample, method for constructing quality control model, and computer-readable storage medium
By using a real-time quality control method based on patient samples and a machine learning model, the problems of discontinuous quality control and high cost were solved, achieving stable and sensitive quality control results, reducing false alarm rates, and improving the accuracy of uncontrolled detection by testing instruments.
Patent Information
- Application Number
- PCT/CN2025/104543
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-06-28
- Filing Date
- 2025-06-27
- Publication Date
- 2026-01-02
AI Technical Summary
Existing quality control materials suffer from discontinuity, matrix effects, and high costs in internal quality control, making it difficult to meet clinical IQC requirements.
A real-time quality control method based on patient samples is adopted. Patient samples are grouped through a machine learning model, and patient data is used for real-time quality control, which reduces the complexity of the machine learning model and achieves stable and sensitive quality control.
It achieves real-time, stable, and low-cost quality control, reduces the false alarm rate, and improves the sensitivity and accuracy of uncontrolled detection of testing instruments.
Smart Images

Figure CN2025104543_02012026_PF_FP_ABST
Abstract
Description
Method for real-time quality control based on patient samples, method for constructing a quality control model, and computer-readable storage medium TECHNICAL FIELD
[0001] The present application relates to the field of quality control of in-vitro diagnostic instruments, in particular to a method for quality control, in particular real-time quality control, based on patient samples, a method for constructing a quality control model for quality control, in particular real-time quality control, based on patient samples, and a computer-readable storage medium. BACKGROUND
[0002] In the process of clinical diagnosis and treatment of diseases, the quality of medical examination directly affects the diagnosis and treatment of diseases by doctors. High-quality medical examination results depend on the perfect quality control system of medical examination laboratories. Medical examination laboratory quality control includes three aspects of pre-analysis, in-analysis and post-analysis quality control, among which, in-analysis quality control is the most critical process in the quality management system. In-analysis quality control includes internal quality control (IQC). The current common IQC implementation is that the testing personnel detects the quality control product at a certain frequency, uses statistical theory to calculate and evaluate the reliability of the detection result, and then observes and eliminates the out-of-control factors in the detection. 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 detected at a single time point to estimate whether the analysis process is out of control; 2) the quality control product is not a patient sample, so there is a matrix effect that affects the IQC result; 3) using quality control products for IQC requires additional quality control products, reagents, manpower and other cost inputs, and the cost is high. SUMMARY
[0003] In order to at least partially solve the above technical problems, the task of the present application is to provide an improved quality control based on patient data, in particular a PBRTQC-based technical solution, which can simply realize relatively stable and sensitive internal quality control based on patient data, in particular PBRTQC.
[0004] In order to achieve the above-mentioned tasks of the present application, the first aspect of the present application provides a method for real-time quality control based on patient samples, comprising:
[0005] In the process of real-time detection of the current patient sample by the detection instrument for the target item, the actual detection result of the current patient sample detected by the detection instrument for the target item is obtained;
[0006] select a group matched with the current patient sample from a plurality of groups based on at least the actual detection result of the current patient sample, wherein the plurality of groups are divided based on preset criteria, and the preset criteria comprise a plurality of threshold ranges for detection results of the target item;
[0007] input the actual detection result of the current patient sample into a machine learning model corresponding to the selected group and based on patient data-based real-time quality control to obtain a monitoring indicator; and
[0008] determine whether the detection instrument is controlled based on the monitoring indicator.
[0009] To achieve the above-mentioned tasks of the present application, the second aspect of the present application provides a method for constructing a quality control model for patient sample-based real-time quality control, comprising:
[0010] obtaining data of a plurality of patient samples and dividing the data into a training set and a test set, wherein the data comprises actual detection results of the plurality of patient samples for a target item, and the actual detection results are obtained by detecting the patient samples by a detection instrument, and the data in the training set is obtained when the detection instrument is in a controlled state;
[0011] dividing the patient samples in the training set into a plurality of groups based on preset criteria, and for each group in the plurality of groups, constructing a machine learning model corresponding to the group based on data of patient samples belonging to the group, wherein the preset criteria comprise a plurality of threshold ranges for detection results of the target item;
[0012] constructing a quality control model for patient sample-based real-time quality control based on the machine learning models corresponding to the plurality of groups; and
[0013] verifying the quality control model using the test set.
[0014] To achieve the above-mentioned tasks of the present application, the third aspect of the present application further provides a method for quality control based on patient samples, comprising:
[0015] obtaining an actual detection result obtained when a detection instrument detects a current patient sample for a target item;
[0016] selecting a group matched with the current patient sample from a plurality of groups based on at least the actual detection result of the current patient sample, wherein the plurality of groups are divided based on preset criteria, and the preset criteria comprise a plurality of threshold ranges for detection results of the target item;
[0017] inputting an actual detection result of the current patient sample into a machine learning model for quality control based on patient data corresponding to the selected group to obtain a monitoring index; and
[0018] judging whether the detection instrument is controlled based on the monitoring index.
[0019] To achieve the above-mentioned tasks of the present application, the fourth aspect of the present application provides a computer readable storage medium, which stores a computer program, the computer program, when executed by a processor, implements one of the methods according to the first aspect, the second aspect and the third aspect of the present application.
[0020] In the technical solutions provided in the aspects of the present application, by grouping the samples, the difficulty of constructing the machine learning model can be reduced, and the shortcomings of using quality control products for quality control can be overcome, and compared with the quality control model based on patient data in the prior art, especially the PBRTQC, more stable and more sensitive indoor quality control can be achieved. BRIEF DESCRIPTION OF DRAWINGS
[0021] Fig. 1 is a schematic flow chart of a method for quality control based on patient samples according to an embodiment of the present application.
[0022] Fig. 2 is a schematic diagram of grouping patient samples according to the clinical decision level of FT4.
[0023] Fig. 3 is a schematic diagram of obtaining the number of samples required for error detection.
[0024] Fig. 4 is a schematic diagram of a monitoring index obtained according to an embodiment of the present application and a monitoring index obtained according to the prior art.
[0025] Fig. 5 is a schematic flow chart of a method for constructing a quality control model for quality control based on patient samples according to an embodiment of the present application.
[0026] Fig. 6 is a schematic diagram of one structure of a neural network model according to an embodiment of the present application.
[0027] Fig. 7 is a schematic flow chart of a method for optimizing a quality control model according to an embodiment of the present application.
[0028] Fig. 8 is a schematic flow chart of another method for optimizing a quality control model according to an embodiment of the present application.
[0029] Fig. 9 is a schematic flow chart of still another method for optimizing a quality control model according to an embodiment of the present application. DETAILED DESCRIPTION
[0030] With reference to the drawings of the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of the present application.
[0031] In recent years, patient-based real-time quality control (PBRTQC) can make up for some defects of the current IQC due to its characteristics. The advantages of PBRTQC are as follows: 1) patient samples can be used to monitor the system in real time, and the instrument out-of-control state can be found in time; 2) since patient samples are used, there is no influence of matrix effect; 3) PBRTQC is analysis software, and no additional quality control products, reagents, and labor costs are needed, and the cost is low.
[0032] With the in-depth research and application of PBRTQC, it is found that the existing PBRTQC has insufficient error detection performance for some conventional indicators, and cannot well meet the clinical IQC requirements.
[0033] Therefore, the related art proposes a machine learning model based on PBRTQC for quality control of a detection instrument. However, such a machine learning model has great fitting difficulty and high complexity.
[0034] Therefore, the present application proposes a real-time quality monitoring scheme based on patient sample grouping, which can realize a machine learning model based on patient data for quality control, especially real-time quality control, such as PBRTQC.
[0035] FIG. 1 shows a method 100 for quality control based on patient samples, especially real-time quality control, according to an embodiment of the present application. As shown in FIG. 1, the method 100 includes a data acquisition step S110, a data processing step S120, a monitoring index acquisition step S130, and a quality control step S140.
[0036] In the data acquisition step S110, the actual detection result obtained by the detection instrument when detecting the current patient sample for the target item is acquired.
[0037] Preferably, the actual detection result of the current patient sample detected by the detection instrument for the target item is acquired in real time during the real-time detection of the current patient sample for the target item by the detection instrument, that is, in real time. In other embodiments, the actual detection result of the corresponding patient sample can also be acquired after the detection instrument runs for a period of time, for example, after the detection instrument detects a plurality of patient samples.
[0038] In the data processing step S120, a group matched with the current patient sample is selected from a plurality of groups based on at least the actual detection result of the current patient sample, wherein the plurality of groups are divided based on preset criteria, and the preset criteria include a plurality of threshold ranges for the detection result of the target item. That is, the current patient sample is grouped in this step so as to subsequently select a machine learning model corresponding to the group to which the current patient belongs.
[0039] In the monitoring index obtaining step S130, the actual detection result of the current patient sample is input into a machine learning model for quality control based on patient data corresponding to the selected group, especially a machine learning model based on real-time quality control based on patient data, to obtain a monitoring index.
[0040] In the quality control step S140, it is determined whether the detection instrument is controlled based on the monitoring index and / or whether an alarm prompt indicating that the detection instrument is out of control is given based on the monitoring index. For example, when it is determined that the detection instrument is out of control based on the monitoring index, an alarm prompt indicating that the detection instrument is out of control is output.
[0041] In the embodiments of the present application, the detection instrument being controlled means that the detection instrument is in a normal state and no fault occurs, and the detection instrument being out of control means that the detection instrument is in an abnormal state and a fault may occur.
[0042] In the solution proposed in the present application, after obtaining the actual detection result of the current patient sample, the current patient sample is grouped based on at least the actual detection result of the current patient sample to determine the group to which the current patient sample belongs. Then, according to the group to which the current patient sample belongs, a corresponding machine learning model for quality control based on patient data, especially a machine learning model based on PBRTQC, is found, so that the monitoring index for determining whether the detection instrument is controlled is obtained based on the machine learning model. Thus, the method for quality control, especially real-time quality control, based on patient samples proposed in the present application can be realized more accurately and simply.
[0043] In some embodiments, the plurality of groups and the preset criteria are determined and pre-stored in the memory of the computer system in association, for example, in the form of a lookup table.
[0044] In some embodiments, the plurality of threshold ranges include a reference range or a clinical decision level for the detection result of the target item. That is, the plurality of threshold ranges are obtained based on the reference range or the clinical decision level.
[0045] It should be understood that the reference range of the detection result of the target item is an interval range based on the statistical data of the test results of a healthy population or a specific population, which is used to reflect the distribution of the test results of most normal individuals under a specific physiological state, and generally refers to the test result distribution range of 95% of the normal population. That is, the reference range is generally obtained by statistical analysis of the test results of a healthy population or a specific population, and is mainly based on the physiological characteristics of the population and the distribution law of the test results. The reference range is an interval range with a certain width, which is used to include the test results of most normal individuals and reflect the physiological variation of the normal population. The reference range mainly provides a reference standard for clinicians to help judge whether the test result is abnormal, so as to further consider whether there is a possibility of disease.
[0046] It should be understood that the clinical decision level is a test result threshold related to clinical decision-making and having specific clinical significance. When the test result reaches or exceeds this level, it may indicate that certain specific clinical intervention measures need to be taken, such as starting treatment, adjusting treatment plan, close follow-up, etc. That is, the clinical decision level is usually based on a large amount of clinical research and determination of practical experience, and needs to consider many factors such as the natural course of the disease, the effect of treatment methods, cost-effectiveness, etc. The clinical decision level is usually one or more specific numerical points, which has clear clinical significance and decision-making direction. For example, the clinical decision level of serum creatinine can be used to determine whether kidney replacement therapy is needed. The clinical decision level is mainly used to guide clinicians to make decisions, and is a direct basis for disease diagnosis, treatment and prognosis. For example, the clinical decision level of blood glucose can help doctors determine whether the patient needs insulin treatment. It can be understood that the reference range is the basis of the clinical decision level, and the determination of the clinical decision level often needs to refer to the reference range. The reference range can provide a preliminary judgment standard for clinicians to help them understand the general situation of the test result. The clinical decision level is a supplement and improvement of the reference range. The reference range itself cannot directly guide clinical decision-making, and the clinical decision level, on the basis of the reference range, further clarifies the relationship between the test result and the clinical intervention measures by combining the clinical characteristics of the disease and the treatment needs, and provides more targeted and operational guidance for clinicians. In the actual clinical diagnosis and treatment process, doctors usually compare the test result with the reference range first to preliminarily judge whether the result is abnormal, and then determine whether the corresponding clinical measures need to be taken according to the clinical decision level. The two complement each other and jointly provide the basis for clinical decision-making.
[0047] In some embodiments, the plurality of threshold ranges correspond to the plurality of groups one-to-one. Accordingly, the step S120 of selecting a group matched with the current patient sample from the plurality of groups based on the actual detection result of the current patient sample comprises: selecting a threshold range in which the actual detection result of the current patient sample falls from the plurality of threshold ranges, so as to obtain a sample type group matched with the current patient sample corresponding to the selected threshold range.
[0048] That is, each threshold range corresponds to a group. For example, the preset criteria comprise a first threshold range S1, a second threshold range S2 and a third threshold range S3 which are different from each other, wherein a patient sample whose actual detection result of the target item falls into the first threshold range belongs to a first group, a patient sample whose actual detection result of the target item falls into the second threshold range belongs to a second group, and a patient sample whose actual detection result of the target item falls into the third threshold range belongs to a third group.
[0049] As some implementations, the plurality of threshold ranges are obtained based on a reference range of the detection result of the target item. For example, the first threshold range S1 is a range smaller than the reference range, the second threshold range S2 is the reference range, and the third threshold range S3 is a second range larger than the reference range. Taking FT4 (free thyroxine in serum) as an example, the reference range of the detection result of the target item is 0.7-1.8 ng / dL, then the first threshold range S1 is smaller than 0.7 ng / dL, the second threshold range S2 is 0.7-1.8 ng / dL, and the third threshold range S3 is larger than 1.8 ng / dL. At this time, the FT4 detection result of the patient sample smaller than 0.7 ng / dl is the first group, the FT4 detection result of the patient sample between 0.7 ng / dl and 1.8 ng / dl is the second group, and the FT4 detection result of the patient sample larger than 1.8 ng / dl is the third group.
[0050] As another implementation manner, the plurality of threshold ranges are obtained based on clinical decision levels of the detection result of the target item. For example, FIG. 2 is a schematic diagram of grouping patient samples according to clinical decision levels of FT4 (free thyroxine in serum). Assuming that the clinical decision level point 1 of FT4 is 0.5 ng / dl and the clinical decision level point 2 of FT4 is 1.4 ng / dl, accordingly, the first threshold range S1 is less than 0.5 ng / dL, the second threshold range S2 is 0.5-1.4 ng / dL, and the third threshold range S3 is greater than 1.4 ng / dL. At this time, the FT4 detection result of the patient sample is less than 0.5 ng / dl, which is the first group, the FT4 detection result of the patient sample is between 0.5 ng / dl and 1.4 ng / dl, which is the second group, and the FT4 detection result of the patient sample is greater than 1.4 ng / dl, which is the third group. In another embodiment, the current patient sample can be further grouped based on patient information of the current patient sample. That is, the preset criterion further includes patient information, and the patient information includes at least one of a disease, an age, a gender, a department of ordering the target item, and a visit type of the patient.
[0051] Accordingly, the step S120, that is, selecting a group matched with the current patient sample from the plurality of groups based on the actual detection result of the current patient sample, includes: selecting a group matched with the current patient sample from the plurality of groups based on the actual detection result of the current patient sample and patient information of the current patient.
[0052] In the embodiment of the present application, the department of the sample refers to a department of ordering the target item, that is, a hospital department requesting to use the detection instrument to detect the current patient sample for the target item.
[0053] In the embodiment of the present application, the visit type refers to whether the patient is an inpatient or an outpatient, or whether the patient is an inpatient, an outpatient or an emergency patient.
[0054] Here, by combining the actual detection result of the current patient sample and the patient information to group the current patient sample, further balance between model complexity and model accuracy can be achieved.
[0055] It should be understood herein that the patient information used for dividing the groups in the preset criteria and the patient information used for selecting the matched group for the current patient refer to the same information. For example, when the groups are divided based on the plurality of preset thresholds and the disease of the patient, step S120 comprises selecting the group matched with the current patient sample from the plurality of groups based on the actual detection result of the current patient sample and the disease of the current patient. For another example, when the groups are divided based on the plurality of preset thresholds and the ordering department of the patient, step S120 comprises selecting the group matched with the current patient sample from the plurality of groups based on the actual detection result of the current patient sample and the ordering department of the current patient. For yet another example, when the groups are divided based on the plurality of preset thresholds and the disease and the ordering department of the patient, step S120 comprises selecting the group matched with the current patient sample from the plurality of groups based on the actual detection result of the current patient sample and the disease and the ordering department of the current patient.
[0056] In some embodiments, the preset criteria comprises only one or only two of the disease of the patient, the age of the patient, the gender of the patient, the ordering department of the target item and the type of visit.
[0057] As some implementations, the patient information can comprise only the disease of the patient or the ordering department of the target item. Accordingly, in step S120, selecting the group matched with the current patient sample from the plurality of groups based on at least the actual detection result of the current patient sample comprises: selecting the group matched with the current patient sample from the plurality of groups based on only the actual detection result of the current patient sample and the disease of the current patient, or selecting the group matched with the current patient sample from the plurality of groups based on only the actual detection result of the current patient sample and the ordering department of the target item of the current patient.
[0058] Here, the groups are additionally divided by the disease of the patient or the ordering department of the target item, so that the discrimination between the groups is large, thereby being able to detect errors more quickly. In one example, the patient information can comprise only the disease of the patient, that is, the current patient sample is grouped based on only the actual detection result of the current patient sample and the disease of the patient to which the current patient sample belongs. For example, the disease of the patient in the preset criteria comprises a plurality of disease types, and each group corresponds to a disease type. For example, the preset criteria can comprise internal system diseases and surgical system diseases, and the internal system diseases and the surgical system diseases each correspond to three threshold ranges, respectively, and then six groups can be obtained based on such preset criteria.
[0059] In another example, the patient information can only include the ordering department of the target item, that is, the current patient sample is only clustered based on the actual detection result of the current patient sample and the ordering department of the target item of the current patient sample. For example, the preset criteria include multiple ordering departments of the target item, and each group corresponds to at least one ordering department.
[0060] As some other implementations, the current patient sample can be additionally clustered based on the age of the patient to which the current patient sample belongs. For example, the preset criteria include multiple age ranges, such as less than 17 years old, 18 to 45 years old, 46 to 69 years old, and over 70 years old, and each group corresponds to an age range. For example, less than 17 years old corresponds to a first group, 18 to 45 years old corresponds to a second group, 46 to 69 years old corresponds to a third group, and over 70 years old corresponds to a fourth group, and each group is further divided into multiple subgroups according to the multiple threshold ranges. The current patient sample can also be clustered based on the gender of the patient to which the current patient sample belongs. For example, the preset criteria include male and female, male corresponds to a first group, and female corresponds to a second group, and each group is further divided into multiple subgroups according to the multiple threshold ranges.
[0061] As yet other embodiments, the patient information can only include the disease of the patient and the ordering department of the target item. Accordingly, in step S120, selecting the group matched with the current patient sample from the multiple groups based on at least the actual detection result of the current patient sample includes: selecting the group matched with the current patient sample from the multiple groups based on only the actual detection result of the current patient sample, the disease of the current patient, and the ordering department of the target item of the current patient.
[0062] Here, the groups are additionally divided by the disease of the patient and the ordering department of the target item, so that the degree of differentiation between the groups is further increased, thereby enabling faster detection of errors.
[0063] Some embodiments of using patient information to obtain a machine learning model are described below.
[0064] For patients with diseases, the parameter results fluctuate greatly, and the existing PBRTQC requires a large number of continuous samples to identify errors and system out-of-control states, which cannot meet the clinical IQC requirements. In particular, the inventors of the present application found that for conventional indicators such as white blood cell count, red blood cell count, hemoglobin content, and thyroid stimulating hormone, due to factors such as the patient's disease, age, and gender, the parameter indicator distribution and fluctuation are large, resulting in the existing PBRTQC method requiring more samples to detect the average error of the system.
[0065] Therefore, the embodiments of the present application further propose a technical solution for real-time quality monitoring based on patient samples and a machine learning model, in particular a neural network model, so as to reduce the influence of patient factors such as disease, age, and gender on the performance of PBRTQC quality control (i.e., improve quality control stability), while reducing the number of samples required for error detection compared to existing PBRTQC quality control (i.e., improve sensitivity).
[0066] In some embodiments, step S130 comprises:
[0067] obtaining patient information of the current patient sample, wherein the patient information comprises at least one of disease, age, gender of the patient, and department to which the sample belongs;
[0068] quantifying the patient information of the current patient sample and inputting the quantified patient information into the machine learning model to obtain an output result of the machine learning model as a predicted detection result for the target item, wherein the machine learning model is trained by a plurality of actual detection results for the target item and patient information of patient samples belonging to the selected group (i.e., historical patient samples); and
[0069] obtaining a monitoring index based on the actual detection result and the predicted detection result.
[0070] Here, the machine learning model proposed by the embodiments of the present application represents the relationship between patient information and the detection result of the target item. That is, if the patient information is input into the machine learning model, a predicted detection result for the target item predicted by the machine learning model will be obtained.
[0071] The number of samples NPed required for error detection under the same false alarm rate is used to verify 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. The fewer the number of samples required for error detection, the better the sensitivity performance of error detection. Wherein, the false alarm rate FAR refers to the number of false alarms (the number of exceeding the preset control line) / the number of samples * 100% of the monitoring index calculated based on the data obtained under the controlled state of the detection instrument. The number of samples NPed required for error detection refers to the number of samples required from the detection instrument to lose control to the monitoring index exceeding the preset control line, as shown in FIG. 3.
[0072] Take creatinine (Cr), urea (UA), thyroid stimulating hormone (TSH), and free thyroxine (FT4) as examples for verification, respectively use the Cr verification data set, the UA verification data set, the TSH verification data set, and the FT4 verification data set obtained under the controlled state of the detection instrument, simulate the PBRTQC-based quality control method of the present application and the PBRTQC-based quality control method of the prior art by adding errors multiple times, and obtain the average error detection sample number ANPed shown in Table 1. As shown in Table 1, the PBRTQC-based quality control method proposed in the present application significantly improves the quality control sensitivity compared with the prior art.
[0073] Table 1 ANPed of different target items
[0074] In addition, under the same alarm rate, take FT4 as an example, calculate the monitoring indicators of the present application and the monitoring indicators of the prior art PBRTQC based on the FT4 data set obtained under the controlled state of the detection instrument, as shown in FIG. 4 (the upper part of FIG. 4 is the monitoring indicators of the prior art PBRTQC, and the lower part of FIG. 4 is the monitoring indicators of the present application). As shown in FIG. 4, the monitoring indicators calculated according to the present application are more stable than the monitoring indicators calculated according to the prior art PBRTQC, and under the same alarm rate, the control line obtained according to the present application is smaller than the control line obtained according to the prior art PBRTQC.
[0075] In some embodiments, the machine learning model can be a neural network model. In other embodiments, the machine learning model can be a machine learning model based on SVM (support vector machine) and / or LDA (support vector machine).
[0076] In some embodiments, the target item can be a blood routine test item, such as cell count (e.g., white blood cell count, platelet count, red blood cell count, etc.) and classification (e.g., white blood cell classification, etc.), hemoglobin content, etc.; accordingly, the detection instrument is a blood cell analyzer.
[0077] In other embodiments, the target item can be a biochemical test item, such as thyroid function (e.g., thyroid stimulating hormone, etc.), liver function, kidney function, blood lipid, blood sugar, creatinine (Cr), urea (UA), thyroid stimulating hormone (TSH), free thyroxine (FT4), etc.; accordingly, the detection instrument is a biochemical analyzer.
[0078] In some embodiments, the patient information can include multiple of the disease, age, gender, and department to which the sample belongs of the patient. Preferably, the patient information can include the disease, age, gender, and department to which the sample belongs of the patient.
[0079] In some embodiments, the patient information can be obtained from a laboratory (laboratory) information system of a hospital where the detection instrument is located.
[0080] In some embodiments, obtaining a monitoring index based on the actual detection result and the predicted detection result can comprise:
[0081] calculating a difference between the actual detection result and the predicted detection result; and
[0082] inputting the difference into a calculation model based on a process control SPC algorithm to obtain an output result of the calculation model as the monitoring index.
[0083] The process control SPC algorithm may, for example, comprise 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 outliers.
[0084] In other embodiments, obtaining a monitoring index based on the actual detection result and the predicted detection result can also comprise obtaining the monitoring index based on a ratio of the actual detection result to the predicted detection result.
[0085] In some embodiments, quantifying the patient information of the current patient sample can comprise: quantifying at least one of the patient information of the current patient sample, in particular at least one of a disease, a gender, and a department to which the sample belongs, into a matrix, respectively.
[0086] In one example, quantifying at least one of the patient information of the current patient sample into a matrix, respectively, can comprise: quantifying each of the at least one of the patient information of the current patient sample into a one-dimensional matrix having a plurality of elements, wherein the at least one of the patient information of the current patient sample belongs to at least one of a plurality of categories, each element of the one-dimensional matrix representing one of the plurality of categories, respectively, and different elements correspond to different categories.
[0087] For example, when the patient information comprises disease information, if the disease can be classified into 33 disease categories, the disease information can be quantified into a one-dimensional matrix having 33 elements, wherein each element represents one disease.
[0088] For another example, when the patient information comprises gender information, since the gender is classified into 2 categories, i.e., male and female, the gender information can be quantified into a one-dimensional matrix having 2 elements, wherein one element represents male and the other element represents female.
[0089] For another example, when the patient information includes information of a department to which a sample belongs, if the department to which the sample belongs can be classified into 32 department categories, the information of the department to which the sample belongs can be quantified into a one-dimensional matrix with 32 elements, where each element represents a department.
[0090] Preferably, the values of the elements of the one-dimensional matrix are composed of 0 and 1, and the value of the element representing the category of the patient information is 1, and the values of the remaining elements are 0. That is, quantifying each of the at least one patient information of the current patient sample into a one-dimensional matrix with a plurality of elements can include quantifying each of the at least one patient information of the current patient sample into a one-dimensional matrix with a plurality of elements such that the value of the element representing the category of the patient information of the current patient sample is set to 1, and the values of the remaining elements are set to 0. Thereby, the construction of the machine learning model is simplified.
[0091] For example, when the patient information includes disease information, if the disease can be classified into 33 disease categories, the disease information can be quantified into a one-dimensional matrix [X1, X2, …, X33] with 33 elements, where each element X represents a disease, for example, X1 represents hyperthyroidism, X2 represents hypertension, etc. If the disease information of a certain current patient sample is hyperthyroidism, the disease information of the patient sample is quantified as [1, 0, 0, 0, …, 0], i.e. the value of element X1 is 1, and the values of the remaining elements are 0. If the disease information of a certain current patient sample includes hyperthyroidism and hypertension, the disease information of the patient sample is quantified as [1, 1, 0, 0, …, 0], i.e. the values of elements X1 and X2 are 1, and the values of the remaining elements are 0.
[0092] For another example, when the patient information includes gender information, since gender is classified into 2 categories, i.e. male and female, the gender information can be quantified into a one-dimensional matrix [Y1, Y2] with 2 elements, where element Y1 represents male and element Y2 represents female. If the gender information of a certain patient sample is male, the gender information of the patient sample is quantified as [1, 0], i.e. the value of element Y1 is 1, and the value of element Y2 is 0.
[0093] For another example, when the patient information includes information of a department to which a sample belongs, if the department to which the sample belongs can be classified into 32 department categories, the information of the department to which the sample belongs can be quantified into a one-dimensional matrix [Z1, Z2, …, Z32] with 32 elements, wherein each element represents a department, for example, Z1 represents an endocrinology department, Z2 represents a kidney department, and so on. If the information of the department to which a sample of a patient belongs is an endocrinology department, the information of the department to which the sample of the patient belongs is quantified into [1, 0, 0, 0, …, 0], that is, the value of element Z1 is 1, and the values of the remaining elements are 0.
[0094] In some other embodiments, quantifying the patient information of the current patient sample can include: quantifying at least one of the patient information of the current patient sample, in particular at least one of a disease, a gender, and a department of ordering of the target item, into a string, preferably a numerical string, more preferably a binary numerical string, respectively.
[0095] For example, when the patient information includes disease information, if a disease can be classified into 33 disease categories, a numerical string "a1a2···an" can be assigned to each disease category, wherein a1…an is selected from one of the numbers 1 to 9, and each disease category corresponds to a different numerical string. For example, the numerical string "1100" is assigned to hyperthyroidism, the numerical string "1110" is assigned to hypertension, and so on.
[0096] In some other embodiments, quantifying the patient information of the current patient sample can include: quantifying at least one of the patient information of the current patient sample, in particular at least one of a disease, a gender, and a department of ordering of the target item, into a string, preferably a numerical string, more preferably a binary numerical string, respectively.
[0097] In one example, the age can be quantified into a fixed value of 0 to 150, that is, if the age of a patient is 30, the age of the patient is quantified into 30. In other examples, the age can be quantified into a percentage. For example, if the age of a patient is 30, the age of the patient is quantified into 30 / 100.
[0098] In one example, the gender can be quantified into a first positive integer or a second positive integer, wherein the first positive integer represents male and the second positive integer represents female. For example, the first positive integer is 1 and the second positive integer is 2, but the application is not limited thereto.
[0099] Alternatively or additionally, at least one of the patient information of the current patient sample can be quantified by a lookup table method. In this way, the construction of a machine learning model can be simplified.
[0100] In one example, different positive integers corresponding to different diseases can be assigned, and the assignment of diseases to corresponding positive integers can be pre-stored in the form of a lookup table. Therefore, when quantifying the disease of a patient, the positive integer corresponding to the disease of the patient is searched through the lookup table. Table 2 shows one example of a lookup table for quantifying diseases.
[0101] Table 2: Lookup table for quantifying diseases
[0102] In one example, different positive integers corresponding to different departments can also be assigned, and the assignment of departments to corresponding positive integers can be pre-stored in the form of a lookup table. Therefore, when quantifying the department to which a patient sample belongs, the positive integer corresponding to the department to which the patient sample belongs is searched through the lookup table. Table 3 shows one example of a lookup table for quantifying departments.
[0103] Table 3: Lookup table for quantifying departments
[0104] In some embodiments, the average of the actual detection results for the target item of n patient samples (n is for example the daily test throughput of the detection instrument) of the plurality of known patient samples before a certain time can also be used as a variable of the machine learning model, so as to reduce the day-to-day effects caused by the calibration of the detection instrument and the day-to-day effects caused by reagents, for example.
[0105] The machine learning model is trained by the actual detection results for the target item of a plurality of known patient samples (i.e. historical patient samples) and patient information. Here, the machine learning model can also further represent the relationship between the patient information, the average of the actual detection results of the plurality of known patient samples and the detection result of the target item. That is, if the patient information is input into the machine learning model, the predicted detection result for the target item predicted by the machine learning model will be obtained.
[0106] In some embodiments, acquiring the monitoring index based on the actual detection result and the predicted detection result can include
[0107] performing data processing on the actual detection result, wherein the data processing includes truncation processing and / or normalization processing; and
[0108] acquiring the monitoring index based on the data-processed actual detection result and the predicted detection result.
[0109] However, in the embodiments of the present application, since the machine learning model is adopted, the actual detection result can not be normalized. Thus, the data processing is simplified.
[0110] In some embodiments, in step S140, the detection instrument is determined to be out of control and an alarm is outputted when one of the monitoring indicators exceeds the preset control line.
[0111] In some other embodiments, in step S140, the detection instrument is determined to be out of control and an alarm is outputted when M consecutive monitoring indicators (obtained in time sequence) exceed the preset control line, where M is a natural number greater than 1. Compared with the case of alarming when one monitoring indicator exceeds the preset control line, the false alarm rate can be reduced.
[0112] In yet some other embodiments, in step S140, M consecutive monitoring indicators of the current patient samples are obtained in time sequence, and whether the detection instrument is under control is determined based on the M consecutive monitoring indicators of the current patient samples. The detection instrument is determined to be out of control and an alarm indicating that the detection instrument is out of control is outputted when at least N of the M consecutive monitoring indicators of the current patient samples exceed the preset control line, where M and N are both natural numbers greater than 1 and M is greater than N. Thus, false alarms and true alarms can be significantly distinguished. Compared with the case of alarming when one monitoring indicator exceeds the preset control line, the false alarm rate can be reduced, and the number of samples required for error detection can be kept as small as possible.
[0113] In some embodiments, in step S140, when the detection instrument is determined to be out of control based on the monitoring indicators, a quality control sample for the target item can be automatically called to the detection instrument for detection to obtain a detection result of the quality control sample, and whether the detection instrument is out of control is determined based on the detection result of the quality control sample. That is, when the detection instrument is determined to be out of control based on the detection result of the actual patient sample, the detection instrument is further tested by using the quality control sample to determine whether the detection instrument is really out of control.
[0114] In some embodiments, the parameters of the calculation model can be optimized in the following manner:
[0115] obtaining actual detection results of a plurality of historical patient samples for the target item and patient information, where the actual detection results are obtained by detecting the plurality of historical patient samples by the detection instrument under a controlled state;
[0116] a false alarm rate is given;
[0117] a plurality of SPC parameter values of the calculation model are given;
[0118] for each SPC parameter value, the upper and lower control lines and the average number of samples required for error detection at the false alarm rate are calculated in the following manner:
[0119] calculating a monitoring index under the SPC parameter value using the actual detection results of the plurality of historical patient samples and patient information in the calculation model with the SPC parameter value, and obtaining the upper and lower control lines based on the monitoring index under the SPC parameter value and the false alarm rate,
[0120] calculating a monitoring index under the SPC parameter value using a simulated data set containing a plurality of simulated instrument malfunctions or a real data set containing a plurality of real instrument malfunctions in the calculation model with the SPC parameter value, and comparing it with the upper and lower control lines, so as to calculate the average number of samples required from each simulated instrument malfunction or real instrument malfunction to the actual monitoring of the simulated instrument malfunction or real instrument malfunction, i.e. the average error detection sample number,
[0121] wherein the simulated data set is obtained by adding errors to the actual detection results of the plurality of historical patient samples at different time points multiple times, the real data set is obtained from the actual detection results of the plurality of historical patient samples and patient information or by obtaining the actual detection results of a plurality of additional historical patient samples for the target item and patient information thereof, and
[0122] selecting the SPC parameter value with the minimum average error detection sample number and the upper and lower control lines corresponding to the SPC parameter value to construct the optimized calculation model.
[0123] In some other embodiments, the parameters of the truncation processing and the calculation model can be optimized in the following way:
[0124] obtaining the actual detection results of a plurality of historical patient samples for the target item and patient information, wherein the actual detection results are obtained by detecting the historical patient samples by the detection instrument in a controlled state;
[0125] a given false alarm rate;
[0126] a plurality of truncation ratios of the truncation processing and a plurality of SPC parameter values of the calculation model are given;
[0127] for each parameter value combination of each truncation ratio and each SPC parameter value, the upper and lower control lines and the average error detection sample number under the false alarm rate are calculated in the following way:
[0128] calculating a monitoring index under the parameter value combination using the actual detection results of the plurality of historical patient samples and patient information in the calculation model with the parameter value combination, and obtaining the upper and lower control lines based on the monitoring index under the parameter value combination and the false alarm rate,
[0129] using the simulated data set containing multiple simulated instrument malfunctions or the real data set containing multiple real instrument malfunctions in the calculation model with the parameter value combination to calculate the monitoring indicator of the instrument malfunction under the parameter value combination, and comparing it with the upper and lower control lines, so as to calculate the average number of samples required from each simulated instrument malfunction or real instrument malfunction to the actual monitoring of the simulated instrument malfunction or real instrument malfunction, i.e. the average number of samples required for error detection,
[0130] wherein the simulated data set is obtained by adding errors to the actual detection results of the plurality of historical patient samples at different time points for a plurality of times, and the real data set is obtained from the actual detection results of the plurality of historical patient samples and patient information or by obtaining the actual detection results of a plurality of additional historical patient samples for the target item and patient information thereof; and
[0131] selecting the parameter value combination with the minimum average number of samples required for error detection and the upper and lower control lines corresponding to the parameter value combination to construct the optimized truncation processing and calculation model.
[0132] FIG. 5 shows a method 300 of constructing a quality control model for quality control based on patient samples, especially real-time quality control, according to an embodiment of the present application, comprising the following steps:
[0133] S310, obtaining data of a plurality of 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 according to time sequence), the data comprising actual detection results of the plurality of patient samples for a target item, wherein the actual detection results are obtained by detecting the patient samples by a detection instrument, and wherein the data in the training set is obtained when the detection instrument is in a controlled state. Here, for example, actual detection results of a plurality of patient samples, especially all patient samples, for a target item detected by a detection instrument in a certain time period are obtained.
[0134] In step S310, the sample ratio of the training set and the test set can be set to 6:4 or 7:3, etc.
[0135] S320, dividing the patient samples in the training set into a plurality of groups based on a preset criterion, and for each group of the plurality of groups, constructing a machine learning model corresponding to the group based on the data of the patient samples belonging to the group, wherein the preset criterion comprises a plurality of threshold ranges of detection results for the target item.
[0136] S330, constructing a quality control model for real-time quality control based on patient samples based on the machine learning models corresponding to the plurality of groups.
[0137] S340 verifies the quality control model using the test set.
[0138] In some embodiments, the preset criteria include a reference range or a clinical decision level of the detection result of the target item.
[0139] In some embodiments, the plurality of threshold ranges correspond to the plurality of groups one by one.
[0140] In some embodiments, the preset criteria further include patient information, the patient information including at least one of a disease, an age, a gender, a department of ordering of the target item, and a type of visit of a patient.
[0141] In some embodiments, the patient information only includes the disease of the patient or the department of ordering of the target item; or the patient information only includes the disease of the patient and the department of ordering of the target item.
[0142] In some embodiments, the data of the plurality of patient samples further include patient information of the plurality of patient samples, wherein the patient information includes at least one of a disease, an age, a gender, and a department of ordering of the target item of a patient, and preferably the patient information includes the disease, the age, the gender, and the department of ordering of the target item of the patient. Accordingly, in step S320, the machine learning model corresponding to the group is constructed based on the data of the patient samples belonging to the group, including
[0143] The machine learning model is established using the data of the patient samples belonging to the group in the training set in such a manner that the patient information of the patient samples belonging to the group in the training set is quantized, and a machine learning model satisfying the following formula is established between the quantized patient information and the actual detection result in the training set,
[0144] X t =f(x 1t ,x 2t ,…,x nt )+ε t
[0145] wherein X t is the actual detection result in the training set, f(x 1t ,x 2t ,…,x nt ) is a machine learning model, x 1t ,x 2t ,...,x nt represent the quantized patient information, and ε t represents an estimation of X tThe residual. That is, using controlled patient historical test results and patient information from the testing instrument, a machine learning model f is learned and regressed, where ε is the residual. t It approximates a random distribution with a mean of 0. Here, the residual ε t The sequence order remains the original testing time order of the patient samples.
[0146] 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 built based on the machine learning model are stable, which improves the performance of system error detection compared with the existing PBRTQC technology.
[0147] When the testing instrument is in a normal and controlled state, then the residual ε t Random fluctuations with minimal sum of squared errors. In some embodiments, a loss function min∑‖ε can be established based on this principle. t || 2 By taking the training samples, namely the actual detection results of the aforementioned multiple patient samples, and patient information as input, the machine learning model f(x) with the minimum loss function is calculated. 1t ,x 2t ,...,x nt ).
[0148] In some embodiments, the machine learning model can be a neural network model, the structure of which is shown in Figure 6. In other embodiments, the machine learning model can be a machine learning model based on SVM (Support Vector Machine) and / or LDA (Support Vector Machine).
[0149] In some embodiments, in step S330, constructing a quality control model for real-time quality control based on patient samples using machine learning models corresponding to the multiple groups may include: constructing the quality control model according to the machine learning models corresponding to the multiple groups and a common computational model based on a process control SPC algorithm, wherein the difference between the actual detection result and the detection result predicted by the machine learning model f, i.e., the residual ε, is used. t The data is input into the common computational model based on the process control SPC algorithm, and the output of the computational model is used as the monitoring indicator of the quality control model. That is, firstly, based on the machine learning model corresponding to each group, the difference between the actual test results and the predicted test results of the patient samples in each group, i.e., the residual ε, is obtained. t Then the residuals ε of all patient samples t The data are input into a common computational model based on the process control SPC algorithm to obtain monitoring indicators.
[0150] However, in other embodiments, the monitoring indicator of the quality control model can also be calculated from the actual detection results and the detection results predicted by the machine learning model f in other ways, for example, in a proportional manner.
[0151] In some embodiments, the average of the actual detection results of the target item of the n patient samples before a certain time in the test set (n is for example the daily test throughput of the detection instrument) can also be used as a variable of the machine learning model in order to reduce the day-to-day effects, for example, caused by the calibration of the detection instrument and the day-to-day effects caused by the reagent.
[0152] Further, in step S330, the upper and lower control lines of the quality control model are obtained based on the monitoring indicator and the false alarm rate. Here, in the process of real-time quality control using the quality control model described above, if the detection instrument is out of control, the residual error ε t will produce a non-random feature, and after calculation based on the process control SPC algorithm, the monitoring indicator will exceed the upper control line or the lower control line, thus producing an alarm, prompting that the detection instrument is out of control.
[0153] In some embodiments, the process control SPC algorithm can 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 abnormal patients.
[0154] In some embodiments, as shown in FIG. 7, the parameters of the calculation model can be optimized in step S330 in the following manner:
[0155] Step S331a, a false alarm rate FAR is given;
[0156] Step S332a, a plurality of SPC parameter values of the calculation model are given;
[0157] Step S333a, for each SPC parameter value, the upper and lower control lines and the average error detection required sample number at the false alarm rate are calculated in the following manner:
[0158] The actual detection results and patient information in the training set are used in the quality control model with the SPC parameter value to calculate the monitoring indicator at the SPC parameter value, and the upper and lower control lines are obtained based on the monitoring indicator at the SPC parameter value and the false alarm rate,
[0159] using the simulated data set containing multiple simulated instrument malfunctions or the real data set containing multiple real instrument malfunctions in the quality control model with the SPC parameter value to calculate the monitoring index of the presence of instrument malfunction at the parameter value and compare it with the upper and lower control lines, so as to calculate the average number of samples required from the start of each simulated instrument malfunction or real instrument malfunction to the actual monitoring of the simulated instrument malfunction or real instrument malfunction by the quality control model, i.e. the average number of samples required for error detection ANPed, wherein the simulated data set is obtained by adding errors to the actual detection results in the training set at different time points for multiple times, the real data set is obtained from the data of the multiple patient samples or by obtaining the actual detection results of target items and patient information of multiple additional patient samples, and
[0160] Step S334a, selecting the SPC parameter value with the minimum average number of samples required for error detection and the upper and lower control lines corresponding to the SPC parameter value to construct an optimized quality control model.
[0161] Here, the false alarm rate directly determines the upper and lower control lines, and the false alarm rate is usually set by the user according to the use case, for example, set to 0.1%. Once the false alarm rate is determined, the upper and lower control lines can also be determined.
[0162] Here, it can be understood that in the process of optimizing the parameters of the calculation model, the values of other parameters of the quality control model, such as the cutoff ratio, are selected to be fixed, for example, selected according to experience.
[0163] Preferably, the average number of samples required for error detection ANPed is calculated using a simulated data set containing multiple simulated instrument malfunctions, i.e.: using the actual detection results in the training set and patient information in the quality control model with the SPC parameter value to calculate the monitoring index at the SPC parameter value, and obtaining the upper and lower control lines based on the monitoring index at the parameter value and the false alarm rate; adding errors to the actual detection results of target items of patient samples in the training set at different time points for multiple times, inputting the actual detection results of target items of patient samples in the training set after adding errors together with the corresponding patient information into the quality control model with the SPC parameter value to obtain the monitoring index after adding errors and compare it with the upper and lower control lines, so as to calculate the average number of samples required from the start of adding errors to the actual monitoring of the errors by the quality control model, i.e. the average number of samples required for error detection ANPed.
[0164] As an example, the process control SPC algorithm is the moving average method, and the parameter of the calculation model of the moving average method is the sliding window. Given a false alarm rate of 0.1%, and given the parameter values of the sliding window as 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 (for example, using N patient samples, the actual detection results of the target item and patient information are used to calculate the monitoring indicators, and the number of false alarms is N*0.1%, and the number of false alarms on the upper and lower control lines is N*0.1% / 2, and accordingly the upper and lower control lines are found, and there are N*0.1% / 2 monitoring indicators exceeding the upper and lower control lines, respectively.). Then, errors are randomly added to multiple places in the training set, the number of samples required for error detection each time is calculated, and then the average number of samples required for error detection is obtained by averaging, so as to obtain the parameter value that meets the given false alarm rate and the minimum average number of samples required for error detection.
[0165] In some embodiments, steps S331a, S332a, S333a, and S334a can be repeated, and then the minimum average number of samples required for error detection ANPedmin is selected from the average number of samples required for error detection under each false alarm rate FAR (for example, 0.001%, 0.01%, 0.1%, 1%, 3%, 5%), so as to obtain the parameter value corresponding to the minimum average number of samples required for error detection and the upper and lower control lines corresponding to the parameter value, thereby constructing an optimized quality control model. Of course, in other embodiments, the false alarm rate FAR and the minimum average number of samples required for error detection ANPedmin under the false alarm rate FAR can be weighted and then summed, i.e., sum=FAR*a+ANPedmin*b, where a is the weight of the false alarm rate FAR, and b is the weight of the minimum average number of samples required for error detection ANPedmin. The sum of each false alarm rate FAR and the minimum average number of samples required for error detection ANPedmin under the corresponding false alarm rate FAR is calculated, and then the minimum average number of samples required for error detection corresponding to the minimum sum and the parameter value corresponding to the minimum average number of samples required for error detection are selected.
[0166] In some embodiments, the test set can be used to calculate the upper and lower control lines and the average number of samples needed for error detection ANPed at the false alarm rate for each SPC parameter value in the following way: the monitoring indicators at the SPC parameter value are calculated in the quality control model with the SPC parameter value using the actual test results in the training set and the patient information, and the upper and lower control lines are obtained based on the monitoring indicators at the SPC parameter value and the false alarm rate; the actual test results in the test set are input into the quality control model with the SPC parameter value together with the corresponding patient information to obtain the monitoring indicators corresponding to the test set and compare them with the upper and lower control lines, so as to calculate the average number of samples needed for error detection ANPed from the start of instrument failure to the actual monitoring of the failure by the quality control model.
[0167] In yet other embodiments, another test set can be obtained, which includes actual test results of a plurality of patient samples for a target item and patient information, wherein the actual test results are obtained by detecting the patient samples by a detection instrument, and the patient information includes at least one of a disease, an age, a gender of the patient, and a department to which the sample belongs, and the another test set includes data of instrument failure. In this case, the another test set can be used to calculate the upper and lower control lines and the average number of samples needed for error detection ANPed at the false alarm rate for each SPC parameter value in the following way: the monitoring indicators at the SPC parameter value are calculated in the quality control model with the SPC parameter value using the actual test results in the training set and the patient information, and the upper and lower control lines are obtained based on the monitoring indicators at the SPC parameter value and the false alarm rate; the actual test results in the another test set are input into the quality control model with the SPC parameter value together with the corresponding patient information to obtain the monitoring indicators corresponding to the another test set and compare them with the upper and lower control lines, so as to calculate the average number of samples needed for error detection ANPed from the start of instrument failure to the actual monitoring of the failure by the quality control model. In some embodiments, the actual test results of the patient samples for the target item in the training set can be truncated and optionally normalized before the machine learning model is established.
[0168] In some embodiments, a fixed truncation ratio can be set for the truncation.
[0169] In some embodiments, the parameters of the truncation and the parameters of the calculation model can be optimized in the following way as shown in FIG. 8:
[0170] Step S331b, a false alarm rate FAR is given;
[0171] Step S332b, given the plurality of cut-off ratios of the cut-off processing and the plurality of SPC parameter values of the calculation model;
[0172] Step S333b, for each cut-off ratio and each parameter value combination of each SPC parameter value, calculating the upper and lower control lines and the average error detection required sample number at the false alarm rate in the following way:
[0173] calculating the monitoring index at the parameter value combination in the quality control model with the parameter value combination using the actual detection results in the training set and patient information, and obtaining the upper and lower control lines based on the monitoring index at the parameter value combination and the false alarm rate,
[0174] calculating the monitoring index of the presence of instrument failure at the parameter value combination in the quality control model with the parameter value combination using the simulated data set containing a plurality of simulated instrument failures or the real data set containing a plurality of real instrument failures, and comparing it with the upper and lower control lines, so as to calculate the average sample number required from each simulated instrument failure or real instrument failure to the actual monitoring of the quality control model to the simulated instrument failure or real instrument failure, i.e. the average error detection required sample number,
[0175] wherein the simulated data set is obtained by adding errors to the actual detection results in the training set at different time points multiple times, and the real data set is obtained from the data of the plurality of patient samples or by obtaining the actual detection results of a plurality of additional patient samples for the target item and their patient information; and
[0176] Step S334b, selecting the parameter value combination with the smallest average error detection required sample number and the upper and lower control lines corresponding to the parameter value combination to construct an optimized quality control model.
[0177] Here, it can be understood that in the process of optimizing the parameters of the cut-off 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 according to experience.
[0178] Preferably, the average number of samples needed for error detection ANPed is calculated using simulated data sets containing multiple simulated instrument out-of-control, i.e. the monitoring index at the parameter value combination is calculated using the actual detection results in the training set and patient information in the monitoring model with the parameter value combination, and the upper and lower control lines are obtained based on the monitoring index at the parameter value and the false alarm rate; errors are added to the actual detection results of the patient samples in the training set for the target item at different time points, and the actual detection results of the patient samples in the training set for the target item after adding the errors are input into the monitoring model with the parameter value combination together with the corresponding patient information to obtain the monitoring index after adding the errors and compare it with the upper and lower control lines, so as to calculate the average number of samples needed from adding the errors to the time when the monitoring model actually detects the errors, i.e. the average number of samples needed for error detection ANPed.
[0179] Similarly, in some embodiments, steps S331b, S332b, S333b and S334b can be repeated, and then the minimum average number of samples needed for error detection is selected from the average number of samples needed for error detection at each of the multiple false alarm rates (for example, 0.001%, 0.01%, 0.1%, 1%, 3%, 5%), so as to obtain the parameter value combination corresponding to the minimum average number of samples needed for error detection and the upper and lower control lines corresponding to the parameter value combination, to construct an optimized monitoring model. Of course, in other embodiments, the false alarm rate FAR and the minimum average number of samples needed for error detection ANPedmin at the false alarm rate FAR can also be weighted and then summed, i.e. sum = FAR*a + ANPedmin*b, where a is the weight of the false alarm rate FAR and b is the weight of the minimum average number of samples needed for error detection ANPedmin. The sum value of each false alarm rate FAR and the minimum average number of samples needed for error detection ANPedmin at the corresponding false alarm rate FAR is calculated, and then the minimum average number of samples needed for error detection corresponding to the minimum sum value and the parameter value combination corresponding thereto are selected.
[0180] The process control SPC algorithm is taken as an example of the floating mean method, and the parameter of the calculation model of the floating mean method is a sliding window. The parameters to be optimized of the quality control model include the sliding window and the cutoff ratio. Given a false alarm rate of 0.1%, and given the parameter values of the sliding window as 5, 10, 15, 20, 50 and 100, and given the parameter values of the cutoff ratio of the cutoff processing as ±0%, ±1%, ±2% and ±5%. The monitoring indicators under different parameter value combinations of the sliding window and the cutoff ratio (a total of 24 parameter value combinations in this example) 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 (for example, the monitoring indicators are calculated using N patient samples of actual test results of the target item and patient information, and the number of false alarms is N*0.1%, and the number of false alarms on the upper and lower sides is N*0.1% / 2, and accordingly the upper control line and the lower control line are found, and there are N*0.1% / 2 monitoring indicators exceeding the upper control line and the lower control line, respectively. )). Then, errors are randomly added to multiple places in the training set, the number of samples required for error detection each time is calculated, and then the average number of samples required for error detection is obtained by averaging, so as to obtain the parameter value combination that meets the given false alarm rate and the minimum average number of samples required for error detection.
[0181] In some embodiments, if there is data of instrument out-of-control in the test set, the test set can be used to obtain the upper and lower control lines under the false alarm rate and the average number of samples required for error detection for each parameter value combination in the following manner: the actual test results in the training set and patient information are used to calculate the monitoring indicators under the parameter value combination in the quality control model with the parameter value combination, and the upper and lower control lines under the parameter value combination are obtained based on the monitoring indicators under the parameter value combination and the false alarm rate. The actual test results in the test set are input into the quality control model with the parameter value combination together with the corresponding patient information to obtain the corresponding monitoring indicators of the test set and compare them with the upper and lower control lines, so as to calculate the average number of samples required for error detection from the start of instrument quality control to the actual monitoring of the quality control required by the quality control model, i.e. the average number of samples required for error detection ANPed.
[0182] In yet other embodiments, a further test set comprising actual detection results of a plurality of patient samples for a target item and patient information, wherein the actual detection results are obtained by detecting the patient samples by a detection instrument, and the patient information comprises at least one of disease, age, gender of the patient and department to which the sample belongs, can be obtained, wherein the further test set comprises data of instrument out-of-control. Here, the upper and lower control lines and the average number of samples needed for error detection at the false alarm rate can be calculated for each parameter value combination using the further test set in the following way: the monitoring indicators at the parameter value combination are calculated in the quality control model with the parameter value combination using the actual detection results in the training set and the patient information, and the upper and lower control lines at the parameter value combination are obtained based on the monitoring indicators at the parameter value combination and the false alarm rate, the actual detection results in the further test set are input into the quality control model with the parameter value combination together with the corresponding patient information to obtain the monitoring indicators corresponding to the further test set and compare them with the upper and lower control lines, so as to calculate the average number of samples needed for error detection, i.e. the average number of samples needed for error detection ANPed, from the start of instrument out-of-control to the time when the quality control model actually monitors the quality control.
[0183] In some embodiments, when using the above quality control model for real-time quality control, the detection instrument can be judged to be out-of-control and an alarm prompt can be output only when at least N monitoring indicators among the consecutive M monitoring indicators (obtained in time sequence) exceed the upper and lower control lines, wherein M and N are both natural numbers greater than 1 and M is greater than N.
[0184] In some embodiments, as shown in FIG. 9, M and N can also be the parameters to be optimized for the quality control model, i.e. the parameters of the calculation model and the parameters of M, N and the optional truncation processing are optimized in the following way:
[0185] S331c, a false alarm rate is given;
[0186] S332c, a plurality of SPC parameter values of the calculation model, a plurality of parameter values of M, a plurality of parameter values of N and optionally a plurality of truncation ratios of the truncation processing are given;
[0187] S333c, the upper and lower control lines and the average number of samples needed for error detection at the false alarm rate are calculated for each parameter value combination of each SPC parameter value, each parameter value of M, each parameter value of N and optionally each parameter value of each truncation ratio in the following way:
[0188] the monitoring indicators at the parameter value combination are calculated in the quality control model with the parameter value combination using the actual detection results in the training set and the patient information, and the upper and lower control lines at the parameter value combination are obtained based on the monitoring indicators at the parameter value combination and the false alarm rate,
[0189] using the simulated data set containing multiple simulated instrument malfunctions or the real data set containing multiple real instrument malfunctions in the quality control model with the parameter value combination to calculate the monitoring indicator of the presence of instrument malfunction under the parameter value combination, and comparing it with the upper and lower control lines, so as to calculate the average number of samples required from each simulated instrument malfunction or real instrument malfunction to the actual monitoring of the simulated instrument malfunction or real instrument malfunction by the quality control model, i.e. the average error detection required sample number,
[0190] wherein the simulated data set is obtained by adding errors to the actual detection results in the training set at different time points for multiple times, and the real data set is obtained from the data of the multiple patient samples or by obtaining the actual detection results of the target item and the patient information of multiple additional patient samples; and
[0191] S334c, selecting the parameter value combination with the minimum average error detection required sample number and the upper and lower control lines corresponding to the parameter value combination to construct the optimized quality control model.
[0192] It can be understood here that when the parameters of the calculation model and the parameters of M, N and the optional truncation processing are optimized, the values of other parameters of the quality control model are selected to be fixed, for example, selected according to experience. For example, when the parameters of the calculation model and M, N are optimized, the truncation ratio of the truncation processing can be selected to be fixed.
[0193] Similarly, in some embodiments, steps S331c, S332c, S333c and S334c can be repeated, and then the minimum average error detection required sample number is selected from the average error detection required sample numbers under multiple false alarm rates (for example, 0.001%, 0.01%, 0.1%, 1%, 3%, 5%), so as to obtain the parameter value combination corresponding to the minimum average error detection required sample number and the upper and lower control lines corresponding to the parameter value combination to construct the optimized quality control model. Of course, in other embodiments, the false alarm rate FAR and the minimum average error detection required sample number ANPedmin under the false alarm rate FAR can also be weighted and then summed, i.e. sum = FAR * a + ANPedmin * b, wherein a is the weight of the false alarm rate FAR, and b is the weight of the minimum average error detection required sample number ANPedmin. The sum value of each false alarm rate FAR and the minimum average error detection required sample number ANPedmin under the corresponding false alarm rate FAR is calculated, and then the minimum average error detection required sample number corresponding to the minimum sum value and the parameter value combination corresponding to the minimum average error detection required sample number are selected.
[0194] Preferably, the average number of samples needed for error detection ANPed is calculated using simulated data sets containing multiple simulated instrument out-of-control, i.e. the monitoring index at the parameter value is calculated using the actual detection results in the training set and patient information in the quality control model with the parameter value combination, and the upper and lower control lines are obtained based on the monitoring index at the parameter value and the false alarm rate; errors are added to the actual detection results in the training set at different time points, and the actual detection results in the training set after adding errors are input into the quality control model with the parameter value combination together with the corresponding patient information to obtain the monitoring index after adding errors and compare it with the upper and lower control lines, so as to calculate the average number of samples needed for error detection from the beginning of adding errors to the actual monitoring of the quality control model to the errors, i.e. the average number of samples needed for error detection ANPed.
[0195] Taking the process control SPC algorithm as an example of the floating mean method, the parameters of the calculation model based on the floating mean method are the sliding window. The parameters to be optimized of the quality control model include the sliding window, the truncation ratio and M, N. Given the false alarm rate of 0.1%, and given the parameter values of the sliding window of 10, 20, 50, 70 and 100, given the parameter values of the truncation ratio of the truncation processing of ±0%, ±1%, ±2%, ±5%, and given the parameter values of M and N as shown in Table 4. The monitoring index at different parameter value combinations of the sliding window, the truncation ratio and M, N 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. Then errors are randomly added to the training set at multiple places, the number of samples needed for error detection each time is calculated, and then the average number of samples needed for error detection is obtained by averaging. Different multiple false alarm rates are given again, for example, 0.001%, 0.01%, 1%, 3%, 5%, etc., and the above process is repeated to obtain the parameter value combination that meets the minimum average number of samples needed for error detection.
[0196] Table 4 Parameter values of alarm parameters
[0197] In some embodiments, if there is data of instrument out-of-control in the test set, the test set can be used to calculate the upper and lower control lines and the average number of samples needed for error detection at the false alarm rate for each parameter value combination in the following way: the monitoring indicators at the parameter value combination are calculated in the quality control model with the parameter value combination using the actual detection results in the training set and the patient information, and the upper and lower control lines are obtained based on the monitoring indicators at the parameter value combination and the false alarm rate, the actual detection results in the test set are input into the quality control model with the parameter value combination together with the corresponding patient information to obtain the corresponding monitoring indicators of the test set and compare them with the upper and lower control lines, so as to calculate the average number of samples needed for error detection, i.e. the average number of samples needed for error detection ANPed, from the beginning of instrument out-of-control to the actual monitoring of the quality control model to the out-of-control.
[0198] In yet other embodiments, another test set can be obtained, which includes actual detection results of a target item of a plurality of patient samples and patient information, wherein the actual detection results are obtained by detecting the patient samples by a detection instrument, and the patient information includes at least one of a disease, an age, a gender of the patient, and a department to which the sample belongs, and the another test set includes data of instrument out-of-control. Here, the another test set can be used to calculate the upper and lower control lines and the average number of samples needed for error detection at the false alarm rate for each parameter value combination in the following way: the monitoring indicators at the parameter value combination are calculated in the quality control model with the parameter value combination using the actual detection results in the training set and the patient information, and the upper and lower control lines are obtained based on the monitoring indicators at the parameter value combination and the false alarm rate, the actual detection results in the another test set are input into the quality control model with the parameter value combination together with the corresponding patient information to obtain the corresponding monitoring indicators of the another test set and compare them with the upper and lower control lines, so as to calculate the average number of samples needed for error detection, i.e. the average number of samples needed for error detection ANPed, from the beginning of instrument out-of-control to the actual monitoring of the quality control model to the out-of-control.
[0199] In some other embodiments not shown, M and N can also be parameters to be optimized for the quality control model, and the parameters of the calculation model and the parameters of the optional truncation processing are optimized in the following way:
[0200] Given the plurality of control line positions of the quality control model, the plurality of SPC parameter values of the calculation model, the plurality of alarm parameter value combinations of M and N, and optionally the plurality of truncation ratios of the truncation processing;
[0201] For each parameter value combination, the false alarm rate and the average number of samples needed for error detection are calculated for each control line position, each SPC parameter value, and optionally each cut-off ratio in the following way:
[0202] The monitoring indicator under the parameter value combination is calculated using the actual detection results in the training set and patient information in the quality control model with the parameter value combination, and the model false alarm rate is calculated based on the upper and lower control lines in the parameter value combination and the monitoring indicator under the parameter value combination,
[0203] The monitoring indicator under the parameter value combination is calculated using the actual detection results in the training set and patient information in the quality control model with the parameter value combination, and the model false alarm rate is calculated based on the upper and lower control lines in the parameter value combination and the monitoring indicator under the parameter value combination,
[0204] The monitoring indicator under the parameter value combination is calculated using the actual detection results in the training set and patient information in the quality control model with the parameter value combination, and the model false alarm rate is calculated based on the upper and lower control lines in the parameter value combination and the monitoring indicator under the parameter value combination,
[0205] The optimal parameter value combination is determined according to the model false alarm rate and the average number of samples needed for error detection of each parameter value combination, so as to construct an optimized quality control model.
[0206] In some embodiments, the parameter value combination with the minimum average number of samples needed for error detection in the parameter value combination with a model false alarm rate lower than a preset false alarm rate can be selected as the final optimized parameter value combination of the quality control model.
[0207] In other embodiments, the model false alarm rate and the average number of samples needed for error detection of each parameter value combination can also be weighted and summed, and then the parameter value combination corresponding to the minimum sum value is selected.
[0208] The process control SPC algorithm is taken as an example of the floating mean method, and the parameter of the calculation model of the floating mean method is a sliding window. The parameters to be optimized of the quality control model include a sliding window, a cutoff ratio, and an M&N alarm parameter combination. Given the upper and lower control line positions (obtained from the percentage positions of S / 2 of the upper and lower monitoring indicators, S is 0.001%, 0.01%, 0.1%, 1%, 3%, or 5%), the parameter value of the sliding window is 10, 20, 50, 70, or 100, the parameter value of the cutoff ratio of the cutoff processing is ±0%, ±1%, ±2%, or ±5%, and the parameter value of the alarm parameter combination is as shown in Table 4. The monitoring indicators under different parameter value combinations of the upper and lower control line positions, the sliding window, the cutoff ratio, and the alarm parameter combination are calculated using the training set, and then the model false alarm rate is calculated based on the monitoring indicators and the upper and lower control line positions. Then, errors are randomly added to multiple places in the training set, the number of samples required for error detection each time is calculated, and then the average number of samples required for error detection is obtained. The parameter value combination with the smallest average number of samples required for error detection is selected as the final optimized parameter value combination of the quality control model from the parameter value combinations with a model false alarm rate lower than the preset false alarm rate.
[0209] In yet other embodiments not shown, M and N can also be the parameters to be optimized of the quality control model, and the control lines of the quality control model, the parameters of the calculation model, and M, N, and the parameters of the optional cutoff processing are optimized in the following manner:
[0210] Given the preset false alarm rate of the quality control model, multiple control line positions, multiple SPC parameter values of the calculation model, multiple alarm parameter value combinations of M and N, and optionally multiple cutoff ratios of the cutoff processing;
[0211] For each control line position, each SPC parameter value, each alarm parameter value combination, and optionally each cutoff ratio, the false alarm rate is calculated in the following manner: the monitoring indicators under the parameter value combination are calculated using the actual detection results and patient information in the training set in the quality control model with the parameter value combination, and the model false alarm rate is calculated based on the control line position in the parameter value combination and the monitoring indicators under the parameter value combination;
[0212] The model parameter value combination with a model false alarm rate less than the preset false alarm rate is selected as a candidate parameter value combination;
[0213] For each candidate parameter value combination, the average number of samples required for error detection is calculated in the following way: using a simulated data set containing multiple simulated instrument out-of-control or a real data set containing multiple real instrument out-of-control in the quality control model with the candidate parameter value combination to calculate the monitoring index under the candidate parameter value combination, and compare it with the control line in the candidate parameter value combination, so as to calculate the average number of samples required for error detection, i.e. the average number of samples required for error detection, from each simulated instrument out-of-control or real instrument out-of-control to the actual monitoring of the simulated instrument out-of-control or real instrument out-of-control by the quality control model, wherein the simulated data set is obtained by adding errors to the actual detection results in the training set at different time points multiple times, and the real data set is obtained from the data of the multiple patient samples or by obtaining the actual detection results of the target item and patient information of multiple additional patient samples; and
[0214] The candidate parameter value combination with the minimum average number of samples required for error detection is used to construct the optimized quality control model.
[0215] In this case, it is understood that when the control line of the quality control model, the parameters of the calculation model, and the parameters of M, N and the optional truncation processing are optimized, the values of other parameters of the quality control model are selected to be fixed, for example, selected according to experience. For example, when the control line of the quality control model, the parameters of the calculation model, and M, N are optimized, the truncation ratio of the truncation processing can be selected to be fixed.
[0216] In some embodiments, in step S330, the quality control model can be verified by inputting the data in the test set into the quality control model, calculating whether the corresponding monitoring index is within the upper and lower control lines, and if it exceeds the upper and lower control lines, it means that the system has a non-random deviation, the detection instrument is out of control, and an out-of-control alarm is generated; if the monitoring index does not exceed the upper and lower control lines, it means that the system is normal and the detection instrument is controlled. If there is instrument out-of-control state data in the test set, it can be directly used to verify the effectiveness of the algorithm. For the case where there is no detection instrument out-of-control state data in the test set, the allowable error can be added at a specified time in the test set to simulate the detection instrument out-of-control state data, so as to verify the detection performance of the algorithm model. By multiple simulations (adding errors at different time points in the test set), the average number of samples required for error detection of all simulated errors can be calculated to obtain the average number of samples required for error detection, which is used to verify the performance of the quality control model.
[0217] In some embodiments, quantifying the patient information of the patient samples belonging to the group in the training set in step S330 can comprise quantifying at least one of the patient information of the patient samples belonging to the group in the training set, in particular at least one of the disease, the gender, and the department of the patient samples, into a matrix, respectively.
[0218] Further, quantifying at least one of the patient information of the patient samples belonging to the group in the training set into a matrix, respectively, can comprise quantifying each of the at least one of the patient information of each of the patient samples belonging to the group in the training set into a one-dimensional matrix having a plurality of elements, wherein each of the at least one of the patient information of the patient sample belongs to at least one of a plurality of categories, each element of the one-dimensional matrix representing one of the at least one of the plurality of categories, respectively, different elements corresponding to different categories.
[0219] Preferably, the values of the elements of the one-dimensional matrix are composed of 0 and 1, the value of the element representing the category of the patient information is 1, and the values of the remaining elements are 0. That is, quantifying each of the at least one of the patient information of the patient sample into a one-dimensional matrix having a plurality of elements can comprise:
[0220] quantifying each of the at least one of the patient information of the patient sample into a one-dimensional matrix having a plurality of elements, such that the value of the element representing the category of the patient information of the patient sample is set to 1, and the values of the remaining elements are set to 0.
[0221] In other embodiments, quantifying the patient information of the patient samples belonging to the group in the training set can comprise quantifying at least one of the patient information of the patient samples belonging to the group in the training set, in particular at least one of the disease, the gender, and the department of the patient samples, into a string, preferably a numerical string, more preferably a binary numerical string, respectively.
[0222] For example, when the patient information comprises disease information, if the disease can be classified into 33 disease categories, a numerical string "a1a2···an" can be assigned to each disease category, wherein a1…an is selected from one of the numbers 1 to 9, and each disease category corresponds to a different numerical string. For example, the numerical string "1100" is assigned to hyperthyroidism, the numerical string "1110" is assigned to hypertension, and so on.
[0223] Alternatively or additionally, quantifying the patient information of the patient samples belonging to the group in the training set can comprise quantifying the patient information of the patient samples in the training set into a fixed value, preferably a fixed integer.
[0224] Alternatively or additionally, the patient information of the patient samples belonging to the cluster in the training set can be quantified by a lookup table method.
[0225] For specific quantification examples, reference can be made to the detailed description of the various embodiments of the method 100 above, which will not be repeated here.
[0226] In some embodiments, the patient information includes the disease, age, gender of the patient, and department to which the sample belongs.
[0227] The various embodiments of the method 100 and the advantages thereof provided by the embodiments of the present application can be correspondingly applied to the model construction method 300 provided by the embodiments of the present application, and thus will not be repeated here.
[0228] The embodiments of the present application also relate to a computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement one of the above methods 100 or 300.
[0229] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the embodiments of the present application can be in the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present application can be in the form of a computer program product implemented on one or more computer-usable storage media (including magnetic disks and optical storage media, etc.) containing computer-usable program code.
[0230] The embodiments of the present application are described with reference to flowcharts and / or block diagrams according to the methods, devices (systems), and computer program products of the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program operations. These computer program operations can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the operations performed by the processor of the computer or other programmable data processing apparatus implement the functions specified in one or more flows in the flowcharts and / or one or more blocks in the block diagrams.
[0231] These computer program operations can also be stored in a computer-readable memory that can direct the computer or other programmable data processing apparatus to work in a specific manner, so that the operations stored in the computer-readable memory produce a manufactured product including an operating device that implements the functions specified in one or more flows in the flowcharts and / or one or more blocks in the block diagrams.
[0232] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart and / or block diagram block or blocks.
[0233] Any combination of the features mentioned in the specification or any combination of the features mentioned in the claims, which are within the scope of the present application and which can be technically feasible, are also part of the present application. The advantages and features described in relation to the methods provided by the embodiments of the present application apply in corresponding manner to the systems and applications provided by the embodiments of the present application and vice versa.
[0234] The preferred embodiments of the present application are described above with the specific details. However, it is not intended that the present application be limited to the above instruments, methods, conditions, or parameters. Those skilled in the art will recognize the value of the present application and its intended advantages from the description. Those skilled in the art will recognize, or be able to ascertain using no more than routine experimentation, many equivalents to the specific embodiments described herein. It is therefore intended that the present application covers any and all such equivalents. The disclosure hereof is to be interpreted in the broadest possible sense, consistent with the specification and claims.
Claims
1. A method for real-time quality control based on patient samples, comprising: During the process of the detection instrument performing real-time detection of the target item on the current patient sample, the actual detection result of the current patient sample obtained by the detection instrument for the target item is acquired; Based at least on the actual test results of the current patient sample, a group matching the current patient sample is selected from multiple groups, wherein the multiple groups are divided based on preset criteria, and the preset criteria include multiple threshold ranges for the test results of the target item; The actual test results of the current patient sample are input into a machine learning model based on real-time quality control of patient data, corresponding to the selected group, to obtain monitoring indicators; and The monitoring indicators are used to determine whether the detection instrument is under control.
2. The method according to claim 1, wherein, The threshold range includes a reference range or clinical decision level for the test results of the target item.
3. The method according to claim 1 or 2, wherein, The multiple threshold ranges correspond one-to-one with the multiple groups; Based at least on the actual test results of the current patient sample, select a group from multiple groups that matches the current patient sample, including: Select the threshold range into which the actual detection result of the current patient sample falls from the plurality of threshold ranges, thereby obtaining a group that matches the current patient sample corresponding to the selected threshold range.
4. The method according to claim 1 or 2, wherein, The preset criteria also include patient information, which includes at least one of the patient's disease, age, gender, the department that prescribes the target item, and the type of visit. Based at least on the actual test results of the current patient sample, select a group from multiple groups that matches the current patient sample, including: Based on the actual test results of the current patient sample and the patient information of the current patient, a group matching the current patient sample is selected from the multiple groups.
5. The method according to claim 4, wherein, The patient information includes only the patient's disease or the department that issued the prescription for the target item; Based at least on the actual test results of the current patient sample, select a group from multiple groups that matches the current patient sample, including: Based solely on the actual test results of the current patient sample and the current patient's disease, or solely on the actual test results of the current patient sample and the department that issued the target item for the current patient, a group matching the current patient sample is selected from the multiple groups.
6. The method according to claim 4, wherein, The patient information includes only the patient's disease and the department that issued the target item; Based at least on the actual test results of the current patient sample, select a group from multiple groups that matches the current patient sample, including: Based solely on the actual test results of the current patient sample, the current patient's disease, and the department that issued the target item for the current patient, a group matching the current patient sample is selected from the multiple groups.
7. The method according to any one of claims 1 to 6, wherein, The actual test results of the current patient sample are input into a machine learning model based on real-time quality control of patient data, corresponding to the selected group, to obtain monitoring indicators, including... Obtain patient information for the current patient sample, wherein the patient information includes at least one of the patient's disease, age, gender, and the department that issued the order for the target item; preferably, the patient information includes the patient's disease, age, gender, and the department that issued the order for the target item. The patient information of the current patient sample is quantified, and the quantified patient information is input into the machine learning model to obtain the output of the machine learning model as the predicted detection result for the target item. The machine learning model is trained using actual detection results for the target item from multiple historical patient samples belonging to the selected group, along with patient information. Based on the actual detection results and the predicted detection results, monitoring indicators are obtained. Preferably, monitoring indicators are obtained based on the actual detection results and the predicted detection results, including... Calculate the difference between the actual detection result and the predicted detection result; and The difference is input into a calculation model based on the process control SPC algorithm to obtain the output of the calculation model as the monitoring indicator.
8. The method according to claim 7, wherein, The patient information of the current patient sample is quantified, including: Quantize at least one piece of patient information from the current patient sample, particularly disease, gender, and at least one of the departments that issued the target item, into matrices; or At least one patient information in the current patient sample, particularly the disease, gender, and at least one of the departments that issued the order for the target item, is quantized into a string, preferably a numeric string, and more preferably a binary numeric string.
9. The method according to claim 8, wherein, Convert at least one patient information quantity from the patient information of the current patient sample into matrices, including: Each type of patient information in the at least one type of patient information in the current patient sample is quantified into a one-dimensional matrix with multiple elements, wherein the patient information of the current patient sample belongs to at least one of multiple categories, and each element of the one-dimensional matrix represents one of the multiple categories, with different elements corresponding to different categories; The values of the elements of the preferred one-dimensional matrix are composed of a combination of 0 and 1, with the element representing the category of the patient information having a value of 1 and the other elements having a value of 0.
10. The method according to claim 7, wherein, The patient information of the current patient sample is quantified, including: At least one patient information in the current patient sample, especially age, is quantized into a fixed value, preferably a fixed integer.
11. The method according to any one of claims 7 to 10, wherein, At least one patient information from the current patient sample is quantified using a lookup table method.
12. The method according to any one of claims 7 to 11, wherein, Calculate the difference between the actual detection result and the predicted detection result, including The actual detection results are processed, including truncation and / or normalization; and Calculate the difference between the actual detection result and the predicted detection result after the data processing.
13. The method according to any one of claims 7 to 12, wherein, The machine learning model is a neural network model, an SVM-based machine learning model, or an LDA-based machine learning model.
14. The method according to any one of claims 1 to 13, wherein, Determining whether the detection instrument is under control based on the monitoring indicators includes: The monitoring indicators of the first consecutive number of current patient samples are obtained sequentially in time, and the detection instrument is determined to be under control based on the monitoring indicators of the first consecutive number of current patient samples. Specifically, when at least a second number of the monitoring indicators of the first consecutive number of current patient samples exceed the control line, an alarm 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.
15. A method for constructing a quality control model for real-time quality control based on patient samples, comprising: Data from multiple patient samples is acquired and divided into a training set and a test set. The data includes actual test results of the multiple patient samples for the target item. The actual test results are obtained by testing the patient samples with a testing instrument. The data in the training set is obtained when the testing instrument is in a controlled state. Based on preset criteria, the patient samples in the training set are divided into multiple groups, and for each of the multiple groups, a machine learning model corresponding to that group is constructed based on the data of the patient samples belonging to that group. The preset criteria include multiple threshold ranges for the detection results of the target item. A quality control model for real-time quality control based on patient samples is constructed based on machine learning models corresponding to the multiple groups; and The quality control model was validated using the test set.
16. The method according to claim 15, wherein, The threshold range includes a reference range or clinical decision level for the test results of the target item.
17. The method according to claim 15 or 16, wherein, The multiple threshold ranges correspond one-to-one with the multiple groups.
18. The method according to claim 15 or 16, wherein, The preset criteria also include patient information, which includes at least one of the following: the patient's disease, age, gender, the department that issued the target item, and the type of visit.
19. The method according to claim 18, wherein, The patient information includes only the patient's disease or the department that issued the order for the target item; or The patient information includes only the patient's disease and the department that issued the order for the target item.
20. The method according to any one of claims 15 to 19, wherein, The data of the multiple patient samples also includes patient information of the multiple patient samples, wherein the patient information includes at least one of the patient's disease, age, gender, and the department that issued the order for the target item; preferably, the patient information includes the patient's disease, age, gender, and the department that issued the order for the target item. Based on data from patient samples belonging to this group, a machine learning model corresponding to this group is constructed, including: A machine learning model is built using data from patient samples belonging to this group in the training set. This is achieved by quantifying the patient information of these samples and then establishing a machine learning model that satisfies the following formula between the quantified patient information and the actual detection results in the training set. X t =f(x 1t ,x 2t ,…,x nt )+ε t Among them, X t It is the actual detection result in the training set, f(x) 1t ,x 2t ,…,x nt ) is a machine learning model, x 1t ,x 2t ,…,x nt ε represents the quantified patient information. t This indicates that the machine learning model is used to estimate X. t The residual.
21. The method according to claim 20, wherein, The machine learning model is a neural network model; or The machine learning model is a machine learning model based on SVM and / or LDA.
22. The method according to claim 20 or 21, wherein, A quality control model for real-time quality control based on patient samples is constructed based on the machine learning models corresponding to the multiple groups, including: The quality control model is constructed based on the machine learning models corresponding to the multiple groups and a common computational model based on the process control SPC algorithm, wherein the residual ε t The input is fed into the common computational model based on the process control SPC algorithm to obtain the output of the computational model as the monitoring indicator of the quality control model.
23. The method according to claim 22, wherein, The parameters of the computational model are optimized in the following way: Given a false alarm rate; Given multiple SPC parameter values for the computational model; The method for determining the upper and lower control limits and the number of samples required for average error detection under the false alarm rate for each SPC parameter value is as follows: In the quality control model with the SPC parameter value, the actual detection results in the training set and patient information are used to calculate the monitoring index under the SPC parameter value, and the upper and lower control lines are obtained based on the monitoring index under the SPC parameter value and the false alarm rate. In the quality control model with the SPC parameter value, a simulated dataset containing multiple simulated instrument failures or a real dataset containing multiple real instrument failures is used to calculate the monitoring index of instrument failure under the SPC parameter value. This index is then compared with the upper and lower control lines to calculate the average number of samples required from the start of each simulated or real instrument failure until the quality control model actually detects the failure, i.e., the average number of samples required for error detection. The simulated dataset is obtained by adding errors to the actual detection results in the training set multiple times at different time points. The real dataset is obtained from the data of the multiple patient samples or by acquiring the actual detection results of multiple other patient samples for the target item and their patient information. Select the SPC parameter value that minimizes the number of samples required to detect the average error, and the corresponding upper and lower control lines for that SPC parameter value, to construct an optimized quality control model.
24. The method according to claim 22 or 23, wherein, Before building the machine learning model, the actual detection results of the patient samples in the training set for the target item are processed, wherein the data processing includes truncation and / or normalization.
25. The method according to claim 24, wherein, The parameters of the truncation process and the parameters of the calculation model are optimized in the following way: Given a false alarm rate; Given multiple truncation ratios for the truncation process and multiple SPC parameter values for the computational model; For each cutoff ratio and each combination of SPC parameter values, the upper and lower control lines and the number of samples required for average error detection under the false alarm rate are determined as follows: In the quality control model with the specified parameter value combination, the actual detection results from the training set and patient information are used to calculate the monitoring index under the specified parameter value combination, and the upper and lower control lines are obtained based on the monitoring index under the specified parameter value combination and the false alarm rate. In the quality control model with this parameter value combination, a simulated dataset containing multiple simulated instrument failures or a real dataset containing multiple real instrument failures is used to calculate the monitoring index for the existence of instrument failures under this parameter value combination. This index is then compared with the upper and lower control lines to calculate the average number of samples required from the start of each simulated or real instrument failure until the quality control model actually detects the failure, i.e., the average number of samples required for error detection. The simulated dataset is obtained by adding errors to the actual detection results in the training set multiple times at different time points, while the real dataset is obtained from the data of the multiple patient samples or by obtaining the actual detection results of multiple other patient samples for the target item and their patient information. as well as Select the parameter value combination that minimizes the number of samples required to detect the average error, and the corresponding upper and lower control lines for that parameter value combination, to construct an optimized quality control model.
26. The method according to any one of claims 20 to 25, wherein, The patient information of the patient samples belonging to this group in the training set is quantified, including: Quantize at least one patient information from the patient samples belonging to the group in the training set, especially the disease, gender, and at least one of the departments that prescribe the target item, into matrices; or At least one patient information in the current patient sample, particularly the disease, gender, and at least one of the departments that issued the order for the target item, is quantized into a string, preferably a numeric string, and more preferably a binary numeric string.
27. The method according to claim 26, wherein, Quantizing at least one patient information from the patient information of the patient samples belonging to the group in the training set into matrices, including: for each patient sample in the patient samples belonging to the group in the training set... Each type of patient information in the at least one patient information of the patient sample is quantified into a one-dimensional matrix with multiple elements, wherein the patient information of the patient sample belongs to at least one of multiple categories, and each element of the one-dimensional matrix represents one of the multiple categories, with different elements corresponding to different categories. The values of the elements of the preferred one-dimensional matrix are composed of a combination of 0 and 1, with the element representing the category of the patient information having a value of 1 and the other elements having a value of 0.
28. The method according to any one of claims 20 to 25, wherein, The patient information of the patient samples belonging to this group in the training set is quantified, including: The patient information of the patient samples belonging to this group in the training set is quantized into fixed values, preferably fixed integers.
29. The method according to any one of claims 20 to 25, wherein, The patient information of the patient samples belonging to this group in the training set is quantified by using a lookup table method.
30. A method for quality control based on patient samples, comprising: To obtain the actual test results obtained when the testing instrument performs a targeted test on the current patient sample; Based at least on the actual test results of the current patient sample, a group matching the current patient sample is selected from multiple groups, wherein the multiple groups are divided based on preset criteria, and the preset criteria include multiple threshold ranges for the test results of the target item; The actual test results of the current patient sample are input into a machine learning model for quality control based on patient data, corresponding to the selected group, to obtain monitoring indicators; and The monitoring indicators are used to determine whether the detection instrument is under control.
31. The method according to claim 30, wherein, The threshold range includes a reference range or clinical decision level for the test results of the target item.
32. The method according to claim 30 or 31, wherein, The multiple threshold ranges correspond one-to-one with the multiple groups; Based at least on the actual test results of the current patient sample, select a group from multiple groups that matches the current patient sample, including: Select the threshold range into which the actual detection result of the current patient sample falls from the plurality of threshold ranges, thereby obtaining a group that matches the current patient sample corresponding to the selected threshold range.
33. The method according to claim 30 or 31, wherein, The preset criteria also include patient information, which includes at least one of the patient's disease, age, gender, the department that prescribes the target item, and the type of visit. Based at least on the actual test results of the current patient sample, select a group from multiple groups that matches the current patient sample, including: Based on the actual test results of the current patient sample and the patient information of the current patient, a group matching the current patient sample is selected from the multiple groups.
34. The method according to claim 33, wherein, The patient information includes only the patient's disease or the department that issued the prescription for the target item; Based at least on the actual test results of the current patient sample, select a group from multiple groups that matches the current patient sample, including: Based solely on the actual test results of the current patient sample and the current patient's disease, or solely on the actual test results of the current patient sample and the department that issued the target item for the current patient, a group matching the current patient sample is selected from the multiple groups.
35. The method according to claim 33, wherein, The patient information includes only the patient's disease and the department that issued the target item; Based at least on the actual test results of the current patient sample, select a group from multiple groups that matches the current patient sample, including: Based solely on the actual test results of the current patient sample, the current patient's disease, and the department that issued the target item for the current patient, a group matching the current patient sample is selected from the multiple groups.
36. A computer-readable storage medium having a computer program stored thereon, the computer program implementing the method according to any one of claims 1 to 35 when executed by a processor.
Citation Information
Patent Citations
Quality control system based on clinical laboratory detection result
CN112102903A
Optimization method, system and equipment for real-time quality control
CN114330859A
Quality control system for clinical laboratory
CN115169986A
Medical examination quality control model training method and medical examination quality control method and system
CN115910364A
Quality control support method, quality control support system, quality control support device, and program
US20220034922A1