A method, device, equipment and medium for controlling sample quality

CN122361835APending Publication Date: 2026-07-10SHANDONG MARINE RESOURCE AND ENVIRONMENT RESEARCH INSTITUTE (SHANDONG MARINE ENVIRONMENTAL MONITORING CENTER SHANDONG AQUATIC PRODUCTS QUALITY INSPECTION CENTER)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610525812.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-21
Publication Date
2026-07-10

Smart Images

  • Figure CN122361835A_ABST
    Figure CN122361835A_ABST
Patent Text Reader

Abstract

This invention relates to the field of sample quality control, specifically to a method, apparatus, equipment, and medium for sample quality control. This application simultaneously associates a first sample with its original sample label with a second sample with a quality control label, achieving the binding of the test sample and the quality control sample, avoiding the errors and confusion caused by manual registration and coding matching. Secondly, it relies on a unified testing process to complete standardized data measurement of the two types of samples, eliminating the need for human experience intervention, ensuring the objectivity and controllability of the testing process, and preventing data deviations caused by human prediction. Finally, it automatically retrieves quality control judgment criteria to complete data calculation and threshold comparison, replacing manual calculation and subjective judgment, effectively improving the efficiency and accuracy of quality control calculation, and ensuring the consistency of quality control results. Furthermore, it evaluates the credibility of the quality control results based on the aforementioned credibility index, enabling the automatic assessment of the credibility of the quality control results while outputting automated quality control results, thereby obtaining accurate quality control results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of sample quality control, and specifically to a method, apparatus, equipment, and medium for sample quality control. Background Technology

[0002] In the field of laboratory sample testing, sample quality control is the core link to ensure the accuracy and reliability of test results. Traditional sample quality control management relies entirely on manual paper records and operation. The specific process is as follows: After samples collected by field sampling personnel or submitted by commissioned testing units are delivered to the sample room, quality control personnel need to manually register all sample information and fill out paper receiving forms; in the process of adding quality control samples, the number of quality control samples to be added needs to be calculated manually based on experience or simple rules, quality control sample codes need to be manually written, and the correspondence between quality control samples and original samples needs to be recorded, which is prone to problems such as duplicate codes and confusion of correspondence; when testing personnel receive samples, the sample order needs to be manually arranged, and random sorting of samples is not possible. Testing personnel can easily prejudge quality control samples based on coding, sample appearance, etc., leading to human intervention in the testing process and affecting the objectivity of the test results. After the testing personnel submit the test results, the quality control personnel need to manually calculate the quality control results and judge their compliance with the quality control standards. Manual calculation is inefficient and prone to errors, and different quality control personnel may have different interpretations of the judgment standards, resulting in poor consistency of the quality control results. Finally, the quality control report requires manual organization of various data and manual application of templates, which is not only time-consuming and labor-intensive, but also difficult to meet the needs of different scenarios with paper reports or single-format reports. In addition, paper records have poor traceability and cannot quickly query the data of the entire quality control process, making it difficult to adapt to the requirements of standardized and efficient laboratory management.

[0003] In the existing technology, although some LIMS systems have achieved digital management of sample information, they have not designed automated and intelligent solutions for the sample quality control process. They still rely on manual operation to complete core operations such as adding quality control samples, calculating quality control results, and generating reports. Furthermore, in the existing technology, it is difficult to accurately record the data of the quality control process such as adding quality control samples and calculating quality control results manually, which makes it impossible to evaluate the accuracy, stability, and consistency of the generated quality control results. Summary of the Invention

[0004] In view of this, embodiments of the present invention provide a method, apparatus, equipment and medium for controlling sample quality, in order to solve the problems of low efficiency, poor accuracy and insufficient consistency of results caused by the lack of automated and intelligent solutions in the laboratory sample quality control process and the reliance on manual operation.

[0005] In a first aspect, embodiments of the present invention provide a method for controlling sample quality, the method comprising: Obtain the first sample carrying the original sample label associated with the current testing item, and the second sample carrying the quality control sample label; Obtain the detection process of the current detection item, and perform data measurement on the first sample and the second sample respectively according to the detection process to obtain detection result data and detection process data; The corresponding quality control judgment criteria are retrieved to calculate the test result data, and the quality control evaluation value is obtained. The quality control evaluation value is then compared with the preset qualified threshold to obtain the quality control result. Based on the test result data and the test process data, calculate the reliability index of the quality control results; The credibility of the quality control results is evaluated based on the credibility index.

[0006] Furthermore, the calculation of the reliability index of the quality control result based on the test result data and the test process data includes: A consistency analysis is performed on the test result data to obtain the consistency index of the test result data. Extract fluctuation data from the detection process data; Stability analysis was performed on the fluctuation data to obtain process stability indicators; The consistency index and the process stability index are weighted to obtain the credibility index.

[0007] Furthermore, before obtaining the first sample carrying the original sample label associated with the current testing item, and the second sample carrying the quality control sample label, the method further includes: Obtain the original samples in the sample library that are in a state of pending quality control, and the quality control type associated with the original samples; Based on the quality control type, a preset quality control addition rule is matched, and the number of quality control samples is determined using the quality control addition rule; The quality control samples corresponding to the number of samples are coded to obtain the sample code of the quality control sample. The sample code, the quality control type, and the basic information of the original sample are associated and stored, wherein the basic information of the original sample includes the detection items corresponding to the original sample.

[0008] Furthermore, determining the sample quantity of the quality control sample using the quality control addition rule includes: Obtain the total number of original samples and the preset addition ratio in the quality control addition rules; Based on the total number of samples and the preset addition ratio, the basic quantity of quality control samples required for the current batch is calculated. The base quantity is adjusted for batch balance, and dynamic replenishment is performed according to the instrument throughput and batch grouping of the corresponding test items, so that each group of original samples matches the corresponding quality control samples, thus obtaining the sample quantity of the quality control samples.

[0009] Furthermore, the step of performing data measurements on the first sample and the second sample according to the aforementioned detection procedure to obtain detection result data includes: Obtain the detection process and instrument operating parameters for the current detection item to obtain the basis for detection execution; According to the detection execution criteria, the first sample and the second sample are pre-processed to obtain a test sample that can be tested on the machine; The instrument is used to perform instrument testing on the sample to be tested according to the instrument operating parameters, and the original test result data is obtained. Baseline drift correction and noise filtering are performed on the original detection result data to obtain effective detection result data.

[0010] Furthermore, the process of retrieving the corresponding quality control judgment criteria to calculate the test result data and obtain a quality control evaluation value includes: Retrieve from the quality control rule table the formula for calculating the relative deviation of parallel samples or the formula for calculating the spiked recovery rate, along with the corresponding judgment criteria, that match the current quality control sample type. Substitute the test results into the corresponding parallel sample relative deviation calculation formula or spike recovery rate calculation formula for each item to obtain the initial quality control calculation value; The initial quality control calculation values ​​are compared and verified item by item with the corresponding judgment criteria, and abnormal deviation values ​​are removed to obtain the quality control evaluation value.

[0011] Furthermore, after comparing the quality control evaluation value with the preset pass threshold to obtain the quality control result, the method further includes: Based on the basic information of the first sample, the basic information of the second sample, and the quality control results, a data source is constructed; Obtain the initial template file containing placeholders and cell formatting; According to the entries in the initial template file, the corresponding data is pulled from the data source, the placeholders are replaced and the corresponding cells are filled respectively, and the quality control pass rate is calculated to obtain a quality control report; Name and save the quality control report according to the preset naming rules, and store the storage path and key information of the named quality control report in the report information table.

[0012] Furthermore, the method also includes: Historical test result data of the target sample in different instruments and laboratories were extracted based on the target sample number, and a multi-dimensional test result dataset was constructed based on the historical test result data of the target sample in different instruments and laboratories. Deviation calculation and consistency verification are performed on the multi-dimensional detection result dataset to obtain cross-laboratory comparison data and cross-instrument consistency verification data. Based on the cross-instrument consistency verification data and the completion status of the corresponding test items, a capability score is calculated to obtain the capability assessment result. A proficiency testing report is generated by filling the report template with the cross-laboratory comparison data, the cross-instrument consistency verification data, and the capability assessment results.

[0013] Secondly, embodiments of the present invention provide a sample quality control device, the device comprising: The acquisition module is used to acquire the first sample carrying the original sample label associated with the current test item, and the second sample carrying the quality control sample label; The detection module is used to acquire the detection process of the current detection item, and to measure the data of the first sample and the second sample according to the detection process, including the detection result data and the detection process data. The analysis module is used to retrieve the corresponding quality control judgment criteria, calculate the test result data, obtain the quality control evaluation value, and compare the quality control evaluation value with the preset qualified threshold to obtain the quality control result. The evaluation module is used to calculate the reliability index of the quality control result based on the detection result data and the detection process data, and to evaluate the reliability of the quality control result according to the reliability index.

[0014] Thirdly, embodiments of the present invention provide a computer device, including: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to perform the method described in the first aspect or any corresponding embodiment thereof.

[0015] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing computer instructions that cause a computer to perform the method described in the first aspect or any of its corresponding embodiments.

[0016] This application simultaneously associates a first sample with its original sample label with a second sample with a quality control label, achieving the binding of the test sample and the quality control sample, avoiding the errors and confusion caused by manual registration and coding matching. Secondly, it relies on a unified testing process to complete standardized data measurement for both types of samples, eliminating the need for human experience intervention, ensuring the objectivity and controllability of the testing process, and preventing data deviations caused by human prediction. Subsequently, it automatically retrieves the quality control judgment criteria to complete data calculation and threshold comparison, replacing manual calculation and subjective judgment, effectively improving the efficiency and accuracy of quality control calculation, and ensuring the consistency of quality control results. Based on the test result data and the test process data, it calculates the reliability index of the quality control results and evaluates the reliability of the quality control results according to the reliability index. This allows for the automatic evaluation of the reliability of the quality control results while outputting automated quality control results, thus obtaining accurate quality control results. This addresses the shortcomings of existing LIMS systems in intelligent quality control, solving the problems of low efficiency, large errors, and difficulty in traceability caused by reliance on manual processes throughout the entire process, and achieving standardized and automated management of the entire sample quality control chain. Attached Figure Description

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

[0018] Figure 1 This is a schematic flowchart of a sample quality control method according to some embodiments of the present invention; Figure 2 This is a schematic flowchart of another sample quality control method according to some embodiments of the present invention; Figure 3 This is a flowchart illustrating another quality control method according to some embodiments of the present invention; Figure 4 This is a structural block diagram of a sample quality control device according to an embodiment of the present invention; Figure 5 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed Implementation

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

[0020] According to embodiments of the present invention, a method, apparatus, device, and medium for controlling sample quality are provided. It should be noted that the steps shown in the flowcharts in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowcharts, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0021] This embodiment provides a method for controlling sample quality. Figure 1 This is a flowchart of a sample quality control method according to an embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps: Step S101: Obtain the first sample carrying the original sample label associated with the current testing item, and the second sample carrying the quality control sample label.

[0022] In this embodiment, firstly, based on the testing project number selected by the currently logged-in testing personnel, all sample data belonging to the testing project and in a pending status are selected from the Sample Task and Sample Info tables in the SQL Server database. A first sample set with the original sample code and basic attribute identifier is then extracted from this first sample set. Simultaneously, the Quality Control Sample table is queried to obtain quality control sample data that is bound to the first sample, thus acquiring a second sample set with a unique quality control sample code and type identifier. Through a foreign key association mechanism, the original sample and the corresponding quality control sample are accurately matched, ensuring that each second sample can be traced back to the corresponding first sample, while fully preserving label information such as sample code, sample type, and association relationship.

[0023] The Sample Assign Service class in the business logic layer calls the Get Random SampleList method, taking the current testing item and user ID as input parameters. It performs a multi-table join query in the database to locate the original sample and quality control sample data belonging to the current testing item. Objects with the original sample label are defined as the first sample, and objects with the quality control sample label are defined as the second sample. During the acquisition process, the sample status is checked to see if it is "awaiting collection," excluding samples with abnormal statuses such as "tested" or "discarded," while retaining all label information such as sample code, testing item, associated number, and quality control type.

[0024] In this embodiment of the application, Table 1 is used to store the basic information of the original sample. The sample is uniquely identified by the auto-incrementing primary key Sample ID. At the same time, it records core fields such as Sample Code, Sample Name, Sample Type, Submit Unit, Receive Time, Receiver, and Status, which provide basic data support for sample reception, quality control sample matching, and detection process flow.

[0025] Table 2 serves as a dedicated information table for quality control samples. It uses an auto-incrementing primary key, QCSample ID, to uniquely identify each quality control sample. The QCSample Code includes both field-based and laboratory-based codes. Field-based codes follow the format of year, month, day + bottle number, while laboratory-based codes follow the format of ZK + Arabic numerals (i.e., "ZK" (abbreviation for quality control) + serial number (e.g., ZK000001, ZK000002, etc.). The table also includes fields such as Original SampleID (a foreign key linking to the Sample ID in the Sample Info table), QCType, Create Time, and Creator. These fields accurately record the quality control sample code, its association with the original sample, type attributes, and creation information, enabling traceability between the quality control sample and the original sample.

[0026]

[0027] Step S102: Obtain the detection process for the current detection item, and perform data measurement on the first and second samples according to the detection process to obtain the detection result data.

[0028] In this embodiment of the application, data is measured on the first sample and the second sample according to the detection procedure to obtain detection result data, including: Step A1: Obtain the testing process and instrument operating parameters for the current testing item to obtain the basis for testing execution.

[0029] Based on the test item number selected by the currently logged-in testing personnel, the business logic layer calls the test process configuration service to read corresponding data from the test item parameter table and instrument configuration table in the SQL Server database. This accurately extracts the standard test process, pretreatment specifications, test step requirements, and associated instrument operating parameters for that test item, including key operating parameters such as detection wavelength, flow rate, temperature, injection volume, and integration time. The above process specifications and parameter information are integrated and encapsulated to form a standardized, directly executable test execution basis. Simultaneously, the completeness of the parameters is verified to ensure no omissions or errors.

[0030] When retrieving testing procedures and instrument operating parameters, the system automatically associates the equipment model and testing method standard corresponding to the current testing task. It retrieves compliant procedures and parameters that have been filed according to laboratory accreditation requirements, prohibiting the use of uncalibrated or unverified parameter information. After retrieval, the testing execution basis is stored in a structured data format in the memory cache, while key process nodes and parameter summaries are displayed on the front-end interface for quick review and confirmation by testing personnel.

[0031] Step A2: Pre-process the first and second samples according to the detection execution criteria to obtain the test samples that can be tested on the machine.

[0032] Based on the obtained testing guidelines, standardized pretreatment procedures were initiated for the first and second samples. Following the testing requirements, digestion, extraction, filtration, dilution, and volume adjustment were sequentially performed. Key conditions such as processing time, reagent dosage, temperature, and rotation speed were controlled to ensure all samples under identical conditions, avoiding data deviations due to processing differences. During pretreatment, the processing nodes and operating parameters for each sample were recorded in real time and linked to the sample's unique identification code to ensure accurate traceability after processing. Abnormal samples that did not meet the instrument's requirements were discarded, ensuring that all samples entering the testing stage met the instrument's testing standards.

[0033] A standardized operating procedure is adopted in the sample pretreatment stage. The LIMS system issues instructions to the pretreatment equipment to automatically control operations such as reagent addition, reaction time, and centrifugation speed, reducing errors caused by human intervention. After processing, the sample status is verified. Once it is confirmed that there is no turbidity, no residue, and no contamination, it is marked as a sample ready for testing. The samples to be tested are arranged in random order to generate a list of test sequences and transmitted to the detection instrument. At the same time, the entire pretreatment process operation record is retained to meet the requirements of laboratory auditing and data traceability.

[0034] Step A3: Perform instrument testing on the sample to be tested according to the instrument operating parameters to obtain the raw test result data.

[0035] Based on the acquired instrument operating parameters, a start command is issued to the instrument to initiate the test. The instrument then injects the samples one by one according to the preset injection sequence, performing signal conversion, data acquisition, and other operations in the testing process. Throughout the process, the testing environment remains stable and the parameters are not altered, ensuring that each sample is tested under the same conditions. During the testing process, the instrument provides real-time feedback on its operating status and acquired data, continuously receiving and temporarily storing the raw acquired information output by the instrument, including spectra, chromatographic peaks, response values, time points, and other original content, without making any modifications or calculations, thus completely preserving the true data of the testing process.

[0036] During instrument testing, the entire testing process is monitored, automatically determining whether the instrument is operating normally, whether sample injection is smooth, and whether data acquisition is complete. If any abnormality occurs, the testing is immediately paused and an early warning message is sent. After all samples have been tested, all data output by the instrument, response values, and acquired spectra are compiled into raw, unprocessed test results data, which are then categorized and stored according to the sample's unique identification code.

[0037] Step A4: Baseline drift correction and noise filtering are performed on the original detection result data to obtain valid detection result data.

[0038] The data correction service processes the raw test results. First, a baseline fitting algorithm is used to correct baseline drift, eliminating baseline shifts caused by temperature and voltage fluctuations during instrument operation, bringing the data benchmark back to the standard level. Then, digital filtering algorithms, such as low-pass filtering, are used to remove high-frequency random noise, impurity interference peaks, and abnormal fluctuations, retaining the true and valid sample response data and improving the smoothness and accuracy of the data. The correction and filtering process is executed according to preset algorithms, without changing the values ​​or trends, only removing interfering factors, ensuring that the processed data truly reflects the actual test results of the sample.

[0039] After baseline drift correction and noise filtering are completed, the purified data undergoes validity verification to determine if it meets the testing requirements. Invalid data is removed, and abnormal records are marked. Once verification is passed, the processed data is standardized in format and units, converting it into valid test result data that can be directly used for quality control calculations. The valid test result data is then bound and stored with sample labels.

[0040] In one embodiment, fluctuations in a single detection task may occur due to factors such as temperature and voltage fluctuations, baseline shifts caused by prolonged instrument operation, and changes in the detection environment. Therefore, in this embodiment, during the detection process, it is necessary to acquire detection process data in real time to extract fluctuation data. This detection process data includes data generated during the detection process, such as the real-time temperature of the sample, the real-time voltage of the detection instrument, real-time detection environment data (ambient temperature, humidity, etc.), and detection result data for blank samples or standard samples at different time intervals within the same batch. The detection result data for the blank sample or standard sample can be characterized by spectra, chromatographic peaks, response values, etc., output by the detection instrument.

[0041] The fluctuation data can include temperature fluctuation data, voltage fluctuation data, baseline offset data, and fluctuation data of test results for blank samples or standard samples at different time sequences in the same batch.

[0042] Step S103: Retrieve the corresponding quality control judgment criteria to calculate the test result data, obtain the quality control evaluation value, and compare the quality control evaluation value with the preset qualified threshold to obtain the quality control result.

[0043] In this embodiment of the application, the corresponding quality control judgment criteria are retrieved to calculate the test result data and obtain the quality control evaluation value, including: Step B1: Retrieve from the quality control rule table the formula for calculating the relative deviation of parallel samples or the formula for calculating the spiked recovery rate, along with the corresponding judgment criteria, that matches the current quality control sample type.

[0044] When entering the automatic calculation stage of quality control results, the system first locates the quality control sample type corresponding to the current testing task. Through the business logic layer, it calls the QCResult Service class, using the testing task number and quality control sample type as query conditions, to accurately retrieve the pre-configured calculation formula and pass / fail criteria from the QCResult Rule table in the database. For parallel sample type quality control samples, it retrieves the parallel sample relative deviation calculation formula; for spiked sample type quality control samples, it retrieves the spike recovery rate calculation formula. Simultaneously, it extracts the corresponding formula's pass / fail threshold, allowable deviation range, and valid data interval, among other judgment criteria. The retrieval process is completed automatically by the system, requiring no manual input or selection.

[0045] When retrieving quality control accounting rules, the rule status in the QCResultRule table is first verified to exclude rules that are invalid, ineffective, or have failed review. Only the parallel sample relative deviation calculation formula, spike recovery rate calculation formula, and supporting judgment criteria that are valid are retrieved. After retrieval, the formula expression, calculation parameters, upper and lower limits of the acceptable range, and outlier judgment conditions are encapsulated into a structured rule object and stored in the runtime memory for the calculation module to call. The entire process follows the standard execution flow of C# backend services and maintains real-time correlation with the LIMS system's testing task data and quality control sample binding relationship.

[0046] Step B2 involves substituting the test result data into the corresponding parallel sample relative deviation calculation formula or spike recovery rate calculation formula for each item to obtain the initial quality control calculation value.

[0047] After obtaining the compliant calculation formula, the test result data of the original sample and corresponding quality control sample of the current batch are extracted from the Sample Info table, Quality Control Sample table, and QCResult table. The corresponding calculation formula is automatically matched according to the quality control sample type, and the test result data is substituted into the formula sequentially for item-by-item calculation. For parallel sample quality control data, the parallel sample relative deviation formula is used for calculation; for spiked sample quality control data, the spike recovery rate formula is used. The calculation process follows preset mathematical logic, automatically completing the complete operations such as numerical reading, difference calculation, average value calculation, and percentage conversion without human intervention, ensuring that each calculation process is traceable and reproducible. After the calculation is completed, the single calculation result is temporarily stored to form the initial quality control calculation value that has not been validated.

[0048] When performing quality control data calculations, the test results are grouped according to the batch of testing tasks. The test results of each original sample and the corresponding quality control sample are sequentially substituted into the matching calculation formula, completing the calculations for each sample and each group to avoid data misalignment or omissions. During the calculation process, the validity of the test results is automatically verified, excluding invalid data such as null values, negative numbers, and values ​​exceeding the instrument's range. Calculations are only performed on valid test values, and the calculation logic follows the LIMS system's preset algorithm, retaining the calculation precision to a specified number of decimal places to ensure the accuracy and standardization of the initial quality control calculation values. All calculation operations are completed uniformly on the backend; the frontend only displays the final calculation results.

[0049] Step B3 involves comparing and verifying the initial quality control calculation values ​​with the corresponding judgment criteria item by item, and removing abnormal deviation values ​​to obtain the quality control evaluation value.

[0050] The initial quality control calculation values ​​are compared and verified item by item with the judgment criteria retrieved from the QCResult Rule table. Values ​​are judged to be within the allowable range according to the preset acceptable range. Simultaneously, abnormal data exceeding the reasonable deviation range is identified based on the abnormal deviation judgment conditions. Identified abnormal deviation values ​​are automatically removed and not included in the statistical range of valid quality control evaluation values. The verification and removal process is executed according to the judgment rules corresponding to the relative deviation of parallel samples and the spike recovery rate. Each initial quality control calculation value is independently judged, marking qualified data, suspicious data, and abnormal data, retaining valid calculation results and removing abnormal interference values.

[0051] After comparing and verifying the initial quality control calculations and removing outliers, the remaining valid calculations are standardized and normalized. Following the statistical methods set by the LIMS system, a final usable quality control evaluation value is generated. This evaluation value accurately reflects the testing quality level of the current batch of samples. The quality control evaluation value is associated with and stored with the corresponding testing task, sample information, and quality control sample information, and synchronously written to the QCResult table. Simultaneously, verification records and outlier removal logs are generated for subsequent review, traceability, and report generation. The entire comparison, removal, and normalization process is completed automatically by the system. The process is standardized, the results are stable, and it effectively avoids problems such as inconsistent standard implementation and judgment errors caused by manual judgment.

[0052] In this embodiment of the application, after comparing the quality control evaluation value with the preset pass threshold to obtain the quality control result, the method further includes: Step C1: Construct a data source based on the basic information of the first sample, the basic information of the second sample, and the quality control results.

[0053] After the quality control results are determined, using the test task number as the core index, all basic information of the first sample (i.e., the original sample) is extracted from the Sample Info table, including sample code, sample name, sample type, submitting unit, test items, and receiving time. Simultaneously, detailed information of the second sample (i.e., the quality control sample) is retrieved from the Quality Control Sample table, including quality control sample code, quality control type, associated original sample number, and creation time. This data, combined with the established quality control evaluation values, pass / fail conclusions, and anomaly removal records from the QCResult table, is integrated and aggregated to form a complete and well-structured report generation data source. The validity of each data point within the data source is verified, checking for missing fields, accurate values, and correct relationships, and invalid or erroneous data is removed.

[0054] Through the Report Generate Service class in the business logic layer, the basic information of the first sample, the basic information of the second sample, and the quality control results are structurally encapsulated. They are categorized and organized according to the fields required by the report template, classifying and storing basic sample information, quality control sample configuration information, detailed test result data, quality control calculation process, and conformity judgment results separately, forming a standardized data source that can be directly called by the report generation module. During the construction process, process information such as testing personnel, reviewers, testing time, and quality control review time is automatically associated, supplementing the management fields required for the report. This ensures that the data source covers all dimensions of sample information, quality control information, testing process, and review results, while maintaining the correlation and correspondence between data.

[0055] Step C2: Obtain the initial template file containing placeholders and cell formatting.

[0056] Upon receiving the report generation instruction, based on the current testing project type and report purpose, the system retrieves the corresponding initial template file from the server's specified template storage directory. This includes pre-formatted Word and Excel quality control report templates. The Word template includes a fixed layout with a built-in report title, testing unit information, testing task description, quality control rule description, and result table. It also sets data placeholders such as {Testing Task Number}, {Total Samples}, {Total Quality Control Samples}, {Number of Qualified Quality Control Samples}, and {Quality Control Result Details}. The Excel template is configured according to specifications, with headers, cell styles, borders, alignment, and data column correspondences, and includes target cells for filling in sample information, quality control results, and statistical data. During template file retrieval, the system verifies the template's integrity and validity, ensuring it is not damaged, formatted correctly, and that placeholders and cell configurations conform to specifications. This prevents report generation failures due to template anomalies. Simultaneously, the retrieved template file is loaded into the runtime memory.

[0057] The initial Word and Excel templates are parsed using the DocX and EPPlus libraries respectively. All placeholder fields in the Word template are identified, and the cell positions and formatting requirements for data to be filled in the Excel template are located. The template's layout, font style, table size, statistical formulas, and other configuration information are read and cached to ensure accurate matching of preset template positions during subsequent data filling. After acquisition, the original template format is preserved without modification; no fixed content or formatting settings are added, deleted, or adjusted. Only the data filling entry point is retained, ensuring that the generated quality control report adheres to preset specifications, maintains a consistent format and style, and meets the archiving and submission requirements of formal laboratory reports. It also supports flexible switching between different templates for different testing items, improving the applicability of the generated report.

[0058] Step C3: Based on the entries in the initial template file, pull the corresponding data from the data source, replace the placeholders and fill the corresponding cells respectively, calculate the quality control pass rate, and obtain the quality control report.

[0059] Following the requirements of the initial template file's entries and fields, the system accurately retrieves corresponding data from the established standardized data source. For Word templates, it replaces placeholders with information such as test task number, total number of samples, total number of quality control samples, number of qualified and unqualified samples, and quality control result details. It then fills in the corresponding text positions and result tables with information such as testing personnel, reviewers, testing time, and quality control conclusions, completely restoring the report text and table content. For Excel templates, it fills in the original sample information, quality control sample information, test values, quality control calculation results, and judgment conclusions into the designated cells according to the preset cell correspondence, maintaining the data arrangement order consistent with the template format. During the filling process, the system automatically executes the quality control pass rate calculation formula, dividing the number of qualified quality control samples by the total number of quality control samples and then multiplying by 100% to complete the statistical value calculation. The pass rate result is then simultaneously filled into the corresponding positions in the report, generating a complete, accurate, and formatted quality control report.

[0060] During data entry and statistical calculations, template format constraints are followed, maintaining consistent font, font size, alignment, table borders, and other styles. The data is formatted uniformly, including preserving numerical precision, standardizing date formats, and ensuring text content is well-organized, preventing issues such as data misalignment and formatting errors. The report content undergoes completeness verification, checking that all placeholders have been replaced, all cells are filled correctly, and the quality control pass rate is calculated accurately. Once confirmed, the generated report file is temporarily stored in the server's temporary directory. At this point, the quality control report contains all the necessary information and can be directly archived, queried, and downloaded. The entire data entry and calculation process is automated, requiring no manual intervention, significantly improving report generation efficiency and data accuracy.

[0061] Step C4: Name and save the quality control report according to the preset naming rules, and store the storage path and key information of the named quality control report in the report information table.

[0062] Following the pre-defined naming convention of "Test Task Number + Report Type + Generation Time," the generated Word and Excel quality control reports are named separately to ensure that the names of the two reports correspond, are unique, and do not duplicate. After naming, the report files are transferred from the temporary directory to the designated official storage directory on the server for persistent storage, ensuring secure storage and preventing loss. After saving, the complete physical storage path of the report files on the server is obtained, and key information such as the report name, generation time, report format, and corresponding test task number are extracted. This information is then organized into standardized data records and persistently written to the ReportInfo table in the database using the EFCore framework. This establishes a relationship between report information and test tasks, facilitating quick querying, location, and retrieval of report files later.

[0063] After storing the report storage path and key report information in the ReportInfo table, the status of the current testing task is automatically updated to "Report Generated," and the written data undergoes uniqueness verification to prevent duplicate storage of the same report information. Simultaneously, the storage operation time and execution log are recorded to meet laboratory data traceability and auditing requirements. After all saving and data entry operations are completed, the report file and related information become available for use. Authorized users can query the corresponding report through the front-end interface based on conditions such as the testing task number and generation time, and perform operations such as downloading and printing. The entire naming, saving, and data entry process is executed in a closed loop, ensuring standardized processes and data traceability. This achieves fully automated management of quality control reports from generation to storage to use, effectively improving the standardization and efficiency of laboratory report management.

[0064] After obtaining quality control results, only a pass or fail result is often output. If the result is obtained during a process with significant instrument fluctuations or environmental interference, the risk of randomness is higher than that of results obtained during a stable process. Therefore, in this embodiment, the reliability of the quality control results can be evaluated based on the monitoring of the testing process data. Thus, it is possible to automatically assess the reliability of the quality control results while outputting automated quality control results, thereby obtaining accurate quality control results. Based on this, the embodiments of this application also include: Step S104: Based on the detection result data and the detection process data, calculate the reliability index of the quality control result, and evaluate the reliability of the quality control result according to the reliability index.

[0065] A consistency analysis is performed on the test result data to obtain a consistency index. In this embodiment, the consistency of the data distributions in the test result data of the current sample and other samples in the same batch is calculated. The consistency of the test result data characterizes the dynamic consistency across samples / instruments. In this embodiment, the test result data can be normalized; the standard deviation or relative standard deviation between normalized values ​​is calculated as a consistency index.

[0066] Alternatively, after obtaining the test results data of the current sample, compare it with the measured values ​​of parallel samples to obtain the relative deviation; after traversing all samples, use the relative deviation as a consistency index.

[0067] To determine the process stability index, fluctuation data is extracted from the detection process data, and stability analysis is performed on this fluctuation data to obtain the process stability index. The process stability index is used to quantify the fluctuations during a single detection task. A qualified quality control result obtained during a process with significant instrument fluctuations and environmental interference carries a higher risk of randomness than a result obtained during a stable process. During the detection process, real-time signals or time-series data from the instrument can be acquired in real time. Real-time signal data may include the sample's real-time temperature, the instrument's real-time voltage, and real-time environmental data (ambient temperature, humidity, etc.). Time-series data may include blank samples or standard samples inserted at intervals within the detection sample. The standard samples can be standard substances of known concentrations, pre-calibrated to produce theoretical or baseline response values ​​under the current instrument and detection procedure. By acquiring blank samples or standard samples inserted at different times, fluctuation data of the baseline response values ​​at different times are obtained, characterizing the fluctuations that occur during the detection process over time. Specifically, the process stability index can be determined by calculating the standard deviation of the real-time signal or by calculating the standard deviation of the time-series data.

[0068] The consistency index and the process stability index are weighted to obtain the credibility index.

[0069] In this embodiment, the process stability index and consistency index can be mapped to a score range of 0-1, with higher scores indicating higher reliability risk, resulting in normalized process stability index scores and consistency index scores. For example, fluctuations within the allowable range score 0.1, near the critical range score 0.5, and exceeding the limit score 0.9. The allowable fluctuation range can be set based on the historical average standard deviation. For instance, if the average temperature standard deviation in the past N normal tests is 0.2℃, then the corresponding allowable temperature fluctuation range is 0.2℃ × K, where K ranges from 1.5 to 3. Correspondingly, if the average real-time voltage standard deviation in the past N normal tests is 0.1V, then the corresponding allowable voltage fluctuation range is 0.1V × K. Therefore, in this embodiment, the allowable fluctuation range can be set by multiplying the average standard deviation from historical tests by K.

[0070] The credibility index score is obtained by weighting the normalized process stability index and consistency index. For example, weights can be assigned to each dimension component based on the laboratory's focus on different risk types, and a weighted calculation can be performed to obtain a comprehensive credibility index score between 0 and 1. For example, the credibility index score = W1 × process stability index score + W2 × consistency index score, where W1 + W2 = 1. For example, based on historical verification, the process stability weight W1 = 0.6 and the consistency weight W2 = 0.4 are set. The higher the corresponding process stability index score and consistency index score, the higher the credibility risk of the corresponding item. In this embodiment, a higher credibility index score corresponds to a higher credibility risk.

[0071] In this embodiment, the credibility of the quality control results is evaluated based on the credibility index. Cross-analysis of the quality control evaluation value and the credibility index can be used to classify and identify risks in the quality control results.

[0072] For example, when the quality control evaluation value is qualified, the final credibility and risk level of the result are determined by the credibility index; when the quality control evaluation value is unqualified, it is necessary to further distinguish whether it is a systematic deviation or an accidental loss of control based on the credibility index.

[0073] Specific cross-analysis can be as follows: If the quality control evaluation value is qualified and the credibility index score is less than the preset value (low credibility risk), then the cross-analysis conclusion is that the quality control result is qualified and the credibility is high. If the quality control evaluation value is qualified and the credibility index score is greater than the preset value (high credibility risk), the cross-analysis conclusion is that there are unconventional fluctuations in the testing process or fluctuations in the testing results, and the reliability and reproducibility risk increases.

[0074] If the quality control evaluation value is unqualified and the reliability index score is less than the preset value (low reliability risk), the cross-analysis conclusion is that there is a systematic deviation in quality control, that is, the quality control result is unqualified, which may indicate that there is a systematic error in the method, instrument calibration or standard.

[0075] If the quality control evaluation value is unqualified and the reliability index score is greater than the preset value (high reliability risk), then the cross-analysis conclusion is that the unqualified quality control result may be related to fluctuations in the testing process.

[0076] In this embodiment of the application, before obtaining the first sample carrying the original sample label associated with the current testing item, and the second sample carrying the quality control sample label, as follows: Figure 2 As shown, the method also includes: Step S201: Obtain the original samples in the sample library that are in the state of pending quality control and the quality control type associated with the original samples.

[0077] The business logic layer calls the sample query service, using sample status as the query condition. It filters all original sample data marked "pending quality control" from the Sample Info table in the SQL Server database, simultaneously retrieving complete basic information such as sample name, sample type, and testing items to form a set of original samples to be processed. Based on the corresponding testing items and sample type of the original sample, it automatically queries the Quality Control Rule table to match the permitted quality control types for that type of sample, including field parallel samples, field blank samples, field coded parallel samples, laboratory parallel samples (autonomous control), laboratory parallel samples (external control), standard samples (autonomous control), and standard samples (external control). Among these, laboratory parallel samples (external control) can be understood as laboratory coded parallel samples, etc. A temporary association is established between the original samples and the corresponding quality control types to ensure that subsequent addition of quality control samples accurately matches the testing requirements. The entire acquisition process is executed automatically, without manual screening or matching.

[0078] When acquiring the original sample to be quality controlled, the sample status is first verified to exclude non-target status data such as already quality controlled, already received, already invalidated, or already tested. Only original samples with valid status and complete information are retained for subsequent processes. When determining the quality control type, the preset configuration rules in the database are followed. The applicable quality control method is automatically matched according to different sample types and testing items. Arbitrary changes to the quality control type are not allowed. At the same time, the acquired original sample information and quality control type are temporarily stored in the running memory in the form of structured data.

[0079] In this embodiment, the evaluation value is compared item by item with the preset pass threshold and allowable deviation range. The laboratory determines whether the sample test result is within the pass range according to the laboratory specifications. Data that exceeds the range is marked as abnormal and its validity is verified. Abnormal values ​​that deviate significantly are removed. Finally, a standardized quality control result containing two categories of conclusions, pass and fail, is formed. The entire calculation and judgment process is automatically executed, standardized, and reproducible, effectively avoiding the problems of human calculation errors and inconsistencies with standard execution.

[0080] Step S202: Match the preset quality control addition rules based on the quality control type, and use the quality control addition rules to determine the number of quality control samples.

[0081] The system retrieves the corresponding preset quality control addition rules from the Quality Control Rule table based on the determined quality control type. These rules include key configuration details such as the addition ratio, minimum batch addition quantity, and applicable testing scope, ensuring precise matching between rules and types. For example, the addition ratio can be 5%, 10%, etc., and the minimum batch addition quantity can be 2 to 10. The system reads the total quantity of original samples in the current batch and automatically calculates the basic quality control sample quantity based on the addition ratio set in the rules. Then, it performs balance adjustments based on the instrument throughput and batch grouping of the testing items, dynamically supplementing any insufficient samples to ensure that each group of original samples can be matched with the corresponding quality control sample. Finally, it obtains the determined quantity of quality control samples that meet the testing specifications and laboratory requirements.

[0082] When adding rules for quality control, the validity and activation status of the rules are first verified. Only approved and effective rules are used in the calculation to avoid errors in quantity calculation caused by using expired or invalid rules. In determining the quantity of quality control samples, the actual testing conditions, such as the original sample batch distribution, testing process grouping, and instrument testing capacity, are comprehensively considered. The basic calculated value is reasonably adjusted to make the distribution of quality control samples more uniform and more in line with the requirements of blind sample testing and quality control. The quantity determination result is automatically synchronized to the backend service.

[0083] Step S203: Encode the quality control samples corresponding to the sample quantity to obtain the sample code of the quality control sample, and store the sample code, quality control type, and basic information of the original sample in association. The basic information of the original sample includes the detection items corresponding to the original sample.

[0084] In this embodiment, after determining the number of quality control samples required for the current batch, the Generate ZKCode method in the Quality Control Service class is called through the backend business logic layer to perform automatic encoding. The encoding rules adopt a unified standard format, with a fixed prefix "ZK" as the identifier and a 6-digit serial number as the suffix for unique identification. The serial number value is taken from the maximum ID value currently existing in the Quality Control Sample table in the database plus 1, ensuring that the code obtained by each quality control sample is unique and there will be no duplicate or conflict issues.

[0085] The coding process is fully automated by the system, requiring no manual input or modification. Once generated, the code is immediately bound to the corresponding original sample ID, quality control type, and other information, providing a stable and unique identifier for subsequent sample identification, test result data matching, and full-process traceability. Meanwhile, the coding rules can be viewed on the system front end, ensuring complete consistency with laboratory management standards and data storage requirements.

[0086] In this embodiment of the application, the number of quality control samples is determined using quality control addition rules, including: Step D1: Obtain the total number of original samples and the preset addition ratio in the quality control addition rules.

[0087] The backend, through the Quality Control Service class, first iterates through and counts all original samples in the current batch that are in a state of pending quality control. It reads the original sample data that meets the conditions from the Sample Info table and counts them to accurately obtain the total number of original samples in the batch. At the same time, using the current test item and the selected quality control sample type as query conditions, it retrieves the configured and effective quality control addition rules from the Quality Control Rule table in the database and extracts the preset addition ratio value. This ratio is configured in advance by the laboratory on the front end according to the test specifications. Only the rule data with a valid status is read.

[0088] When obtaining the total number of original samples, samples in abnormal states such as invalid, tested, or removed are first filtered out. Only the number of valid original samples to be tested is counted to ensure the accuracy and validity of the counting results. When obtaining the preset addition ratio, multiple checks are performed on the rule's activation status, applicable sample type, and associated test items to exclude unapproved, expired, or mismatched rule entries. Only the addition ratio that completely corresponds to the current sample type and test item is extracted to avoid calculation errors caused by rule mismatch. After obtaining the results, the total number of samples and the addition ratio are temporarily stored in the runtime memory to form the core parameter set required for quantity calculation.

[0089] Step D2: Calculate the basic quantity of quality control samples required for the current batch based on the total number of samples and the preset addition ratio.

[0090] The total number of original samples and the preset addition ratio in the quality control addition rules are substituted into the quantity calculation formula. Standardized arithmetic operations are performed, multiplying the total number of samples by the addition ratio to obtain the theoretically required basic number of quality control samples for the current batch. The calculation process is executed uniformly by the backend without human intervention, ensuring calculation accuracy and consistency of results. After calculation, the basic number is rounded up according to laboratory specifications or directly retained as an integer to ensure that the number of quality control samples is a positive integer, meeting the actual testing configuration requirements. At the same time, the calculation results are recorded synchronously with the calculation log for subsequent traceability and verification.

[0091] During the calculation process, the validity of the total sample quantity and addition ratio is first verified to ensure that the values ​​are not empty, not negative, and within a reasonable range, thus preventing invalid data from causing abnormal results. The calculation logic follows a preset mathematical model, and the operation process is stable and reproducible. The resulting basic quantity is only a theoretical calculation value and does not consider actual detection conditions such as batch grouping and instrument throughput. It serves only as the initial basis for subsequent balance correction and dynamic supplementation, and is stored in conjunction with the current detection task number.

[0092] Step D3 involves batch balance correction of the basic quantity, dynamically supplementing the quantity according to the instrument throughput and batch grouping of the corresponding testing items, so that each group of original samples matches the corresponding quality control samples, thus obtaining the sample quantity of the quality control samples.

[0093] Based on the instrument throughput parameters corresponding to the current testing items and the batch grouping rules set by the laboratory, the basic quantity of quality control samples is adjusted for balance. Following the requirement that each group of original samples should be equipped with at least one quality control sample, the quantity of original samples after grouping is matched one by one to determine whether the existing basic quantity can meet the configuration requirements of each group. Groups with insufficient samples are dynamically supplemented to ensure that each group of original samples corresponds to a quality control sample, achieving a uniform distribution of quality control samples across batches. This adjustment and supplementation process, combined with the instrument's single-pass testing capacity, ensures that the distribution of quality control samples conforms to the actual testing flow logic, improving the effectiveness of blind sample testing and quality control.

[0094] After completing the balance correction and dynamic supplementation, the validity of the final quality control sample quantity is verified to confirm that the quantity meets the testing specification requirements and completely matches the original sample batch and group, with no missing or incomplete samples. The final quantity of quality control samples that can be directly used for coding and configuration is then determined. This final quantity is synchronized to the Quality ControlService module for subsequent quality control sample coding, information binding, and database storage. The entire correction and supplementation process is completed automatically by the system, requiring no manual adjustment.

[0095] In the embodiments of this application, such as Figure 3 As shown, the method also includes: Step S301: Extract historical test result data of the sample in different instruments and laboratories according to the target sample number, and construct a multi-dimensional test result dataset based on the historical test result data of the sample in different instruments and laboratories.

[0096] Using the target sample number as the sole search criterion, the EFCore framework at the data layer accesses the corresponding database tables and historical test result tables for different laboratories and testing instruments. It iterates through and extracts all valid historical test result data generated for that sample number across various laboratories and instruments, including complete information such as test values, test time, instrument number, operator number, and test parameters. Invalid records that are expired, unapproved, or marked as abnormal are filtered out to ensure that all extracted data are compliant and valid official test results. Historical test result data from different sources and dimensions are collected and organized according to a unified field format to construct a multi-dimensional test result dataset encompassing laboratory, instrument, personnel, and time dimensions. Each record in the dataset retains its original source identifier, providing a complete, standardized, and traceable data foundation for subsequent deviation calculations and consistency verification.

[0097] When extracting historical test results data, the system accesses the test results data of the corresponding laboratories and instruments according to preset data permission ranges, adhering to data security and traceability management requirements, and avoiding the acquisition of unauthorized cross-institutional data. Simultaneously, the extracted data undergoes format standardization processing, unifying numerical precision, units of measurement, and time formats to eliminate data format differences between different instruments and laboratories. After data extraction and format standardization are completed, the multi-dimensional test result dataset is loaded into the business logic layer's memory for temporary storage, and an association index is established between sample numbers and data from each dimension.

[0098] Step S302: Perform deviation calculation and consistency verification on the multi-dimensional detection result dataset to obtain cross-laboratory comparison data and cross-instrument consistency verification data.

[0099] The data verification service module is invoked to perform cross-laboratory deviation calculations and cross-instrument consistency verifications on multi-dimensional test result datasets. For test result data of the same sample generated by different laboratories, statistical methods such as relative deviation and absolute deviation are used to calculate the degree of difference between laboratory test results, forming objective cross-laboratory comparison data. For test result data of the same sample generated by different instruments, consistency is judged according to instrument accuracy standards and allowable error ranges, calculating response deviation, repeatability, and stability indicators between instruments to obtain standardized cross-instrument consistency verification data. The entire calculation and verification process follows laboratory proficiency testing standards and specifications, with fixed and reproducible calculation logic, without introducing manual adjustments, ensuring that the results truly reflect the differences in testing levels between laboratories and instruments.

[0100] After completing the deviation calculation and consistency verification, the calculation results are marked as valid, with data exceeding the allowable deviation range identified as abnormal deviation data. The complete calculation process and judgment criteria are retained. Cross-laboratory comparison data emphasizes the consistency of results between different institutions, while cross-instrument consistency verification data emphasizes the testing stability and accuracy between different devices. Both types of verification data are stored in a structured manner, clearly distinguishing data types and uses to ensure accurate retrieval in subsequent personnel competency assessments and report generation.

[0101] Step S303: Calculate the capability score based on the cross-instrument consistency verification data and the completion status of the corresponding testing items to obtain the capability assessment result.

[0102] Using cross-instrument consistency verification data as the core evaluation basis, and combining it with indicators such as the completion rate of testing personnel's tasks, data pass rate, and timely handling of anomalies in the corresponding testing projects, a standardized capability scoring model is established. Quantitative indicators such as deviation values, stability, and number of pass rates in the verification data are converted into scoring items, and weighted according to preset weights to obtain the initial capability score of the testing personnel. Capability levels are then divided according to the scoring range, and the rationality of the scoring results is verified to eliminate the interference of single abnormal data on the overall evaluation. This results in a complete capability assessment result that includes the score value, capability level, and evaluation explanation, objectively reflecting the testing personnel's operational standardization, instrument proficiency, and data accuracy.

[0103] When calculating competency scores, the evaluation standards corresponding to the testing items are followed. Different scoring weights and passing scores are set for different testing items to ensure that the evaluation results match the job requirements and testing difficulty. At the same time, the competency assessment results are linked to the testing personnel number, instrument number, and laboratory number to form a traceable personnel competency file.

[0104] For example, the average absolute value of the Z-score of the test results of the same sample on multiple instruments by the testing personnel is used as the core quantitative item. It is converted into a consistency base score of 100 points through a preset linear or piecewise mapping rule. Combined with the personnel's task completion rate, quality control data pass rate and anomaly handling timeliness rate in the same testing project cycle, the core scoring dimensions are formed. Preset weights are assigned to each dimension (such as 0.4, 0.2, 0.3 and 0.1 respectively), and the initial capability score is calculated by weighted summation. Then, the capability level is divided according to the general level of reference laboratory performance assessment (such as 90 points, 80 points and 70 points). The Grubbs test is used to identify and exclude single outliers in the historical scoring sequence. Finally, a complete capability assessment result containing numerical value, level and evaluation description is output and stored in conjunction with personnel, instrument and laboratory information.

[0105] Step S304: Fill the report template with cross-laboratory comparison data, cross-instrument consistency verification data and capability assessment results to generate a capability verification report.

[0106] The system retrieves a pre-configured proficiency testing report template stored in a specified directory on the server. This template includes a fixed layout, statistical tables, data placeholders, and format specifications. It then retrieves cross-laboratory comparison data, cross-instrument consistency verification data, and proficiency assessment results, filling in the corresponding positions according to the template items. The system fully incorporates deviation calculation results, consistency judgment conclusions, personnel competency scores, and level evaluations into the corresponding areas of the report, automatically generating a standardized and complete proficiency testing report. The report generation process maintains the original template format, ensuring consistent fonts, layouts, and table styles to guarantee that the output report complies with official laboratory documents and regulatory reporting requirements.

[0107] After completing the report, name the report file according to the naming rule of "Proficiency Testing + Sample Number + Generation Time", save it to the designated archive directory on the server, and write the report storage path, generation time, associated sample number, and other information into the report information table to achieve unified management and rapid retrieval of reports. The generated proficiency testing report can be directly used for interlaboratory comparison result publication, instrument performance evaluation, personnel competency assessment, and quality system audit, comprehensively presenting multi-dimensional test result data comparison, instrument consistency status, and personnel comprehensive competency level. Example

[0108] Quality control personnel use a wireless barcode scanner to scan the barcodes of 15 samples to be received in sequence. The system calls the Check Sample Code method of the SampleReceive Service class to verify the uniqueness of the barcode. After successful verification, the system automatically parses the sample information embedded in the barcode, combines the receiving time and recipient information, and stores the data in the Sample Info table through EFCore, updating the sample status to "Pending Quality Control". Quality control personnel select samples and choose the parallel password sample type on the system front end. The system reads the preset addition rules in the Quality Control Rule table to automatically calculate the number of quality control samples, and then calls the Generate ZKCode() method to generate a unique quality control sample code that starts with ZK and adds a 6-digit serial number. The quality control sample information is stored in the Quality Control Sample table and a binding relationship is established with the original sample through the Original SampleID field. Finally, the status of the original sample and the quality control sample are uniformly updated to "Pending Collection" and simultaneously stored in the Sample Task table. Example

[0109] The testing personnel log in to the system and select the corresponding testing item. The system calls the GetRandom Sample List method of the Sample Assign Service class to filter samples to be collected from the Sample Task table. The C# Random class randomly sorts the samples and hides the quality control sample identifier before displaying them. After the testing personnel complete the sample collection, the system records the collection information and updates the sample status to "Testing". The testing personnel complete the test and submit the data. After the proofreader and the auditor conduct a preliminary review, the data is transferred to the quality control audit interface. The quality control manager triggers the automatic calculation instruction. The system calls the Calculate QC Result method of the QCResultService class to read the judgment rules and the parallel sample relative deviation calculation formula in the QCResult Rule table, automatically completes the numerical calculation and pass / fail judgment. After the quality control manager reviews and clicks "Approved", the system updates the testing task status to "Quality Control Passed" and triggers the report generation logic. Example

[0110] The `Generate QCReport` method of the `Report Generate Service` class is called to extract all relevant data corresponding to the current testing task from the `SampleInfo`, `Quality Control Sample`, `QCResult`, and `Sample Task` tables. A Word quality control report template is read from the server using the `DocX` library, and data is used to replace placeholders in the template one by one. A Word report is generated according to the specified naming rules and saved to the specified directory on the server. Simultaneously, an Excel quality control report template is read from the `EPPlus` library, and corresponding data is filled into preset cells. The quality control pass rate is automatically calculated, and an Excel report is generated according to the same naming rules and saved to the same directory. Finally, the storage path, report name, generation time, and testing task number of both reports are stored in the `ReportInfo` table. Authorized users can perform query, download, and online printing operations on the system front end.

[0111] This embodiment also provides a sample quality control device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0112] This embodiment provides a sample quality control device, such as... Figure 4 As shown, it includes: The acquisition module 401 is used to acquire the first sample carrying the original sample label associated with the current test item, and the second sample carrying the quality control sample label; The detection module 402 is used to acquire the detection process of the current detection item, and to measure the data of the first sample and the second sample according to the detection process, including the detection result data and the detection process data. Analysis module 403 is used to retrieve the corresponding quality control judgment criteria to calculate the test result data, obtain the quality control evaluation value, and compare the quality control evaluation value with the preset qualified threshold to obtain the quality control result; The evaluation module 404 is used to calculate the reliability index of the quality control result based on the detection result data and the detection process data, and to evaluate the reliability of the quality control result according to the reliability index.

[0113] In this embodiment of the application, the device further includes: a storage module, used to acquire original samples in the sample library that are in the state of pending quality control and the quality control type associated with the original samples; match the quality control type with a preset quality control addition rule, and use the quality control addition rule to determine the sample quantity of the quality control samples; encode the quality control samples corresponding to the sample quantity to obtain the sample code of the quality control samples, and associate and store the sample code, quality control type, and basic information of the original samples, wherein the basic information of the original samples includes the detection items corresponding to the original samples.

[0114] In this embodiment, the storage module is used to obtain the total number of original samples and the preset addition ratio in the quality control addition rules; calculate the basic number of quality control samples required for the current batch based on the total number of samples and the preset addition ratio; perform batch balance correction on the basic number, and dynamically supplement according to the instrument throughput and batch grouping of the corresponding detection items, so that each group of original samples matches the corresponding quality control samples, thereby obtaining the number of quality control samples.

[0115] In this embodiment, the detection module 402 is used to obtain the detection process and instrument operation parameters of the current detection item to obtain the detection execution basis; to preprocess the first sample and the second sample according to the detection execution basis to obtain the test sample that can be tested on the instrument; to perform instrument detection on the test sample according to the instrument operation parameters to obtain the original detection result data; and to perform baseline drift correction and noise filtering on the original detection result data to obtain the effective detection result data.

[0116] In this embodiment, the analysis module 403 is used to retrieve the parallel sample relative deviation calculation formula or spike recovery rate calculation formula and corresponding judgment criteria that match the current quality control sample type from the quality control rule table; substitute the test result data into the corresponding parallel sample relative deviation calculation formula or spike recovery rate calculation formula for item-by-item calculation to obtain the initial quality control calculation value; compare and verify the initial quality control calculation value with the corresponding judgment criteria item by item, and remove abnormal deviation values ​​to obtain the quality control evaluation value.

[0117] In this embodiment of the application, the evaluation module 404 is further configured to perform consistency analysis on the detection result data to obtain a consistency index of the detection result data; extract fluctuation data from the detection process data; perform stability analysis on the fluctuation data to obtain a process stability index; and weight the consistency index and the process stability index to obtain the reliability index.

[0118] In this embodiment of the application, the device further includes: a generation module, used to construct a data source based on the basic information of the first sample, the basic information of the second sample, and the quality control results; obtain an initial template file carrying placeholders and cell formats; pull corresponding data from the data source according to the entries in the initial template file, replace the placeholders and fill the corresponding cells respectively, and calculate the quality control pass rate to obtain a quality control report; name and save the quality control report according to a preset naming rule, and store the storage path and key information of the named quality control report in the report information table.

[0119] In this embodiment, the apparatus further includes: a generation module, configured to extract historical test result data of the sample in different instruments and laboratories based on the target sample number, and construct a multi-dimensional test result dataset based on the historical test result data of the sample in different instruments and laboratories; perform deviation calculation and consistency verification on the multi-dimensional test result dataset to obtain cross-laboratory comparison data and cross-instrument consistency verification data; perform capability scoring calculation based on the cross-instrument consistency verification data and the completion status of the corresponding test items to obtain capability assessment results; and fill the report template based on the cross-laboratory comparison data, cross-instrument consistency verification data and capability assessment results to generate a capability verification report.

[0120] Please see Figure 5 , Figure 5 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 5 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system).

[0121] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GPA), or any combination thereof.

[0122] The memory 20 stores instructions executable by at least one processor 10 to cause the at least one processor 10 to perform the method shown in the above embodiments.

[0123] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device as shown by a landing page for an app. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, which can be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0124] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0125] The computer device also includes a communication interface 30 for communicating with other devices or communication networks.

[0126] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.

[0127] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A method for controlling sample quality, characterized in that, The method includes: Obtain the first sample carrying the original sample label associated with the current testing item, and the second sample carrying the quality control sample label; Obtain the detection process of the current detection item, and perform data measurement on the first sample and the second sample respectively according to the detection process to obtain detection result data and detection process data; The corresponding quality control judgment criteria are retrieved to calculate the test result data, and the quality control evaluation value is obtained. The quality control evaluation value is then compared with the preset qualified threshold to obtain the quality control result. Based on the test result data and the test process data, the reliability index of the quality control result is calculated, and the reliability of the quality control result is evaluated according to the reliability index.

2. The method according to claim 1, characterized in that, The calculation of the reliability index of the quality control result based on the test result data and the test process data includes: A consistency analysis is performed on the test result data to obtain the consistency index of the test result data. Extract fluctuation data from the detection process data; Stability analysis was performed on the fluctuation data to obtain process stability indicators; The consistency index and the process stability index are weighted to obtain the credibility index.

3. The method according to claim 1, characterized in that, Before acquiring the first sample carrying the original sample label associated with the current testing item, and the second sample carrying the quality control sample label, the method further includes: Obtain the original samples in the sample library that are in a state of pending quality control, and the quality control type associated with the original samples; Based on the quality control type, a preset quality control addition rule is matched, and the number of quality control samples is determined using the quality control addition rule; The quality control samples corresponding to the number of samples are coded to obtain the sample code of the quality control sample. The sample code, the quality control type, and the basic information of the original sample are associated and stored, wherein the basic information of the original sample includes the detection items corresponding to the original sample.

4. The method according to claim 3, characterized in that, The step of determining the number of quality control samples using the quality control addition rules includes: Obtain the total number of original samples and the preset addition ratio in the quality control addition rules; Based on the total number of samples and the preset addition ratio, the basic quantity of quality control samples required for the current batch is calculated. The base quantity is adjusted for batch balance, and dynamic replenishment is performed according to the instrument throughput and batch grouping of the corresponding test items, so that each group of original samples matches the corresponding quality control samples, thus obtaining the sample quantity of the quality control samples.

5. The method according to claim 1, characterized in that, The step of measuring data on the first sample and the second sample according to the aforementioned detection procedure to obtain detection result data includes: Obtain the detection process and instrument operating parameters for the current detection item to obtain the basis for detection execution; According to the detection execution criteria, the first sample and the second sample are pre-processed to obtain a test sample that can be tested on the machine; The instrument is used to perform instrument testing on the sample to be tested according to the instrument operating parameters, and the original test result data is obtained. Baseline drift correction and noise filtering are performed on the original detection result data to obtain effective detection result data.

6. The method according to claim 1, characterized in that, The process of retrieving the corresponding quality control judgment criteria and calculating the test result data to obtain a quality control evaluation value includes: Retrieve from the quality control rule table the formula for calculating the relative deviation of parallel samples or the formula for calculating the spiked recovery rate, along with the corresponding judgment criteria, that match the current quality control sample type. Substitute the test results into the corresponding parallel sample relative deviation calculation formula or spike recovery rate calculation formula for each item to obtain the initial quality control calculation value; The initial quality control calculation values ​​are compared and verified item by item with the corresponding judgment criteria, and abnormal deviation values ​​are removed to obtain the quality control evaluation value.

7. The method according to claim 1, characterized in that, The method further includes: Based on the target sample number, extract the historical test result data of the target sample in different instruments and laboratories, and construct a multi-dimensional test result dataset based on the historical test result data of the target sample in different instruments and laboratories; Deviation calculation and consistency verification are performed on the multi-dimensional detection result dataset to obtain cross-laboratory comparison data and cross-instrument consistency verification data. Based on the cross-instrument consistency verification data and the completion status of the corresponding test items, a capability score is calculated to obtain the capability assessment result. A proficiency testing report is generated by filling the report template with the cross-laboratory comparison data, the cross-instrument consistency verification data, and the capability assessment results.

8. A sample quality control device, characterized in that, The device includes: The acquisition module is used to acquire the first sample carrying the original sample label associated with the current test item, and the second sample carrying the quality control sample label; The detection module is used to acquire the detection process of the current detection item, and to perform data measurement on the first sample and the second sample respectively according to the detection process to obtain detection result data and detection process data; The analysis module is used to retrieve the corresponding quality control judgment criteria, calculate the test result data, obtain the quality control evaluation value, and compare the quality control evaluation value with the preset qualified threshold to obtain the quality control result; The evaluation module is used to calculate the reliability index of the quality control result based on the detection result data and the detection process data, and to evaluate the reliability of the quality control result according to the reliability index.

9. A computer device, characterized in that, include: A memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, the processor executing the computer instructions to perform the method of any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the method of any one of claims 1 to 7.