Disclosure of Invention
In view of the above, the present invention provides a quality control method for a pulmonary function inspection report, so as to solve the technical problems of low efficiency and low accuracy of the manual inspection report in the prior art. The method comprises the following steps:
identifying inspection parameter data and graphic data from a PDF file of a lung function inspection report;
Extracting coordinate data for each flow velocity capacity ring in the graph data according to the flow velocity capacity ring in the graph data;
Dividing the coordinate data of each flow rate capacity ring into a first section and a second section according to the change characteristics and the time characteristics of the flow rate based on the coordinate data of the expiration phase of each flow rate capacity ring;
Judging whether each flow velocity capacity ring has abnormal expiration conditions or not according to different sections where the coordinate data are located and whether the coordinate data form preset shape characteristics, wherein different preset shape characteristics correspond to different abnormal expiration conditions;
and judging whether the inspection parameter data of the multiple lung function inspection in the PDF file meets the consistency of the result or not based on the trend difference of the inspection parameter data.
Further, based on the coordinate data of the expiration phase of each flow rate capacity ring, dividing the coordinate data of each flow rate capacity ring into a first section and a second section according to the change characteristic and the time characteristic of the flow rate, including:
determining a maximum value of the flow rate value based on the coordinate data of the expiration phase of each flow rate capacity ring;
Determining a key time point according to the expiration time required by the lung function examination, and determining a flow velocity value corresponding to the key time point, wherein the key time point is the last time point when the flow velocity in the expiration time is kept to be increased;
And determining the minimum value of the maximum value of the flow velocity values and the flow velocity values corresponding to the key time points as turning points, determining coordinate data before the turning points as a first section according to the generation time sequence of the coordinate data in the expiration stage, and determining coordinate data after the turning points as a second section.
Further, according to whether the different sections where the coordinate data are located and the coordinate data form a preset shape feature, judging whether each flow velocity capacity ring has abnormal exhalation conditions or not includes:
Converting the coordinate data in the second section from time domain data into frequency domain data, and determining a high-frequency component in the frequency domain data;
Constructing a polar coordinate system, mapping a polar angle in the polar coordinate system into a vital capacity, mapping a polar diameter in the polar coordinate system into a flow velocity, respectively inputting the vital capacity and the flow velocity value in the coordinate data corresponding to the high-frequency component into the polar coordinate system, and generating a polar coordinate curve by adjusting the length of a time window and a scaling parameter;
and when the first preset shape characteristic of the polar coordinate curve which rises after the polar diameter is reduced exists, judging that the abnormal expiration condition of the cough exists in the flow velocity capacity ring.
Further, according to whether the different sections where the coordinate data are located and the coordinate data form a preset shape feature, judging whether each flow velocity capacity ring has abnormal exhalation conditions or not includes:
Calculating gradients of each coordinate data for the coordinate data in the first section, the gradients of each coordinate data forming a gradient vector;
constructing a gradient autocorrelation matrix based on the gradient vector;
Calculating a feature vector corresponding to the minimum feature value based on the gradient autocorrelation matrix;
According to the feature vector corresponding to the minimum feature value, determining the point with abrupt change of the gradient direction as a corner point, and determining at least one corner point;
And forming a connecting line by the coordinate data corresponding to the determined at least one angular point and the coordinate data before and after the coordinate data, and judging that the flow velocity capacity ring has abnormal expiration situations with expiration starting hesitation when the connecting line has a first preset shape characteristic of descending and then rising.
Further, according to whether different sections where the coordinate data are located and the coordinate data form preset shape features, judging whether each flow velocity capacity ring has abnormal exhalation conditions or not, wherein different preset shape features correspond to different abnormal exhalation conditions, and the method comprises the following steps:
Taking turning points as centers, and respectively taking a preset number of continuous coordinate data before and after the turning points according to the generation time sequence of the coordinate data to form local point clouds;
Constructing an alpha complex or Vietoris-Rips complex of the local point cloud, performing persistent coherent computation, and extracting topological characteristics;
Calculating curvatures of the local point cloud under different window size scales to obtain a plurality of curvatures;
calculating the coupling degree of the curvature and the topology according to the curvature and the topology characteristics;
determining whether a curve formed by the local point cloud is a second preset shape characteristic of a flat curve according to the curvatures, the topological characteristics and the coupling degree of the curvatures and the topology;
and when the curve formed by the local point cloud is a second preset shape characteristic of a flat curve and the turning point is smaller than the peak value of the standard flow velocity capacity ring, judging that the flow velocity capacity ring has the abnormal expiration condition of insufficient expiration initial effort.
Further, calculating a degree of coupling of the curvature to the topology based on the plurality of curvatures and the topological feature, comprising:
Calculating curvature stability indexes of the curvatures;
constructing a topological feature vector of the topological feature based on the continuous coherent death time distribution;
and determining the product of the curvature stability index and the topological feature vector as the coupling degree of the curvature and the topology.
Further, based on the trend difference of the inspection parameter data, judging whether the inspection parameter data of the multiple lung function inspection in the PDF file satisfies a result consistency, including:
Calculating the ratio between the examination parameter data of the same examination parameter of every two times of lung function examinations in multiple times of lung function examinations to obtain the ratio respectively corresponding to the multiple examination parameters;
calculating the average value P and the standard deviation q of a plurality of ratios;
Calculating the upper and lower limits of the confidence interval by the formula P+ -1.96×q;
Determining a difference range of the examination parameter data of each two lung function examinations according to a maximum value and a minimum value of the plurality of ratios in a confidence interval;
and when the difference range accords with a preset threshold range, judging that the inspection parameter data of each two lung function inspections meet the consistency of the result.
The invention also provides a quality control device of the lung function inspection report, which aims to solve the technical problems of low efficiency and low accuracy of the manual inspection report in the prior art. The device comprises:
the data identification module is used for identifying the examination parameter data and the graphic data from the PDF file of the lung function examination report;
The coordinate extraction module is used for extracting coordinate data for each flow velocity capacity ring in the graph data respectively;
The section dividing module is used for dividing the coordinate data of each flow velocity capacity ring into different sections according to the change characteristics and the time characteristics of the flow velocity based on the coordinate data of the expiration stage of each flow velocity capacity ring;
the abnormality judging module is used for judging whether each flow velocity capacity ring has abnormal expiration conditions according to different sections where the coordinate data are located and whether the coordinate data form preset shape characteristics, and different preset shape characteristics correspond to different abnormal expiration conditions;
And the consistency judging module is used for judging whether the inspection parameter data of the multiple lung function inspection in the PDF file meets the consistency of the result or not based on the trend difference of the inspection parameter data.
The invention also provides a computer device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the quality control method of any lung function inspection report when executing the computer program so as to solve the technical problems of low efficiency and low accuracy of the manual inspection report in the prior art.
The invention also provides a computer readable storage medium which stores a computer program for executing the quality control method of any lung function inspection report, so as to solve the technical problems of low efficiency and low accuracy of the manual inspection report in the prior art.
Compared with the prior art, the method has the advantages that the method provides inspection parameter data and graphic data from a PDF file of a lung function inspection report, extracts coordinate data for each flow rate capacity ring in the graphic data according to the flow rate capacity ring, divides the coordinate data of each flow rate capacity ring into different sections according to the change characteristics and time characteristics of the flow rate, judges whether each flow rate capacity ring has abnormal expiration conditions according to the different sections where the coordinate data is located and whether the coordinate data form preset shape characteristics, judges whether the inspection parameter data of multiple lung function inspection in the PDF file meets the consistency of results based on the trend difference of the inspection parameter data, realizes automatic and intelligent abnormal detection and quality control of the inspection parameter data and the graphic data of the lung function inspection report, can more effectively judge the lung function inspection report, is favorable for meeting the requirements of mass report quality control, and further realizes the requirements of mass report quality control of the lung function inspection report, has the advantages of personalized inspection quality control and is favorable for improving the quality control of quality control.
Detailed Description
Embodiments of the present application will be described in detail below with reference to the accompanying drawings.
Other advantages and effects of the present application will become apparent to those skilled in the art from the following disclosure, which describes the embodiments of the present application with reference to specific examples. It will be apparent that the described embodiments are only some, but not all, embodiments of the application. The application may be practiced or carried out in other embodiments that depart from the specific details, and the details of the present description may be modified or varied from the spirit and scope of the present application. It should be noted that the following embodiments and features in the embodiments may be combined with each other without conflict. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In the embodiment of the present invention, an example of a flow rate capacity loop curve acquired by using a forced vital capacity check is shown in fig. 1, wherein 1,2, and 3 represent flow rate capacity loops respectively formed by 3 forced vital capacity checks, B represents an optimal flow rate capacity loop obtained in 3 forced vital capacity checks, X-axis represents vital capacity, and Y-axis represents flow rate.
In an embodiment of the present invention, a quality control method for a lung function test report is provided, as shown in fig. 2, and the method includes:
step S201, identifying examination parameter data and graphic data from a PDF file of a lung function examination report;
Step S202, extracting coordinate data for each flow velocity capacity ring in the graph data according to the flow velocity capacity ring;
step S203, based on the coordinate data of the expiration phase of each flow velocity capacity ring (as shown in fig. 1, the curve phase above the X axis of the flow velocity capacity ring is the expiration phase), dividing the coordinate data of each flow velocity capacity ring into different sections according to the change characteristics and time characteristics of the flow velocity;
step S204, judging whether each flow velocity capacity ring has abnormal expiration conditions according to different sections where the coordinate data are located and whether the coordinate data form preset shape characteristics, wherein different preset shape characteristics correspond to different abnormal expiration conditions;
Step S205, judging whether the inspection parameter data of the multiple lung function inspection in the PDF file meets the consistency of the result or not based on the trend difference of the inspection parameter data.
As can be seen from the flow shown in FIG. 2, in the embodiment of the invention, the abnormal detection and quality control of the inspection parameter data and the graphic data of the lung function inspection report are realized automatically and intelligently, compared with the manual inspection in the prior art, the lung function inspection report can be interpreted more efficiently, which is beneficial to meeting the requirements of mass report quality control, and in addition, the abnormal detection and quality control standardization of the lung function inspection report are realized, the influence caused by personal difference is avoided, and the accuracy of report quality control is beneficial to being improved.
In the process of identifying the inspection parameter data and the graphic data from the PDF file of the lung function inspection report, the PDF-formatted lung function inspection report may be divided into a portion such as basic information, inspection parameter data and graphic data, as shown in fig. 3, the basic information of the patient may be the uppermost portion of fig. 3 including a name, an age, an inspection department and the like, the inspection parameter data may be the middle portion of fig. 3 including data corresponding to inspection parameters such as FVC and FEV, and the like, the graphic data may be the lowermost portion of fig. 3 including a curve such as a flow rate capacity ring, and further the inspection parameter data and the graphic data may be identified by OCR text and graphic identification for different portions.
In the specific implementation, in the process of extracting the coordinate data for each flow velocity capacity loop respectively, the different flow velocity capacity loop curves are separated according to different colors of the flow velocity capacity loop curves in the lung function inspection report (for example, original graph color restoration is carried out on pixels in the flow velocity capacity loop curves, corrosion operation is carried out on images, color characteristics of the curves are enlarged, the obtained corroded images are divided, the number of occurrence times of pixel values of different colors is counted, when the occurrence times of one color reaches a set threshold value, the curves of the whole graph are considered to contain the category color, the obtained color RGB values are screened, similar colors are deleted, only one main tone is reserved, the main tone is used as a pixel block according to the color in the extracted images, so that a curve corresponding to the main tone color is obtained, coordinate data are respectively extracted for each flow velocity capacity loop curve, abscissa data in the coordinate data are vital capacity, ordinate data are flow velocity capacity, each abscissa data can be formed into a first array according to the order of production time, and each ordinate data of the flow velocity capacity loop curve can be formed into a second array according to the production time of each ordinate capacity loop.
In specific implementation, the method for extracting the abscissa data and the ordinate data of each flow velocity capacity ring curve is not particularly limited, for example, the pixel coordinates of the X coordinate axis and the Y coordinate axis can be extracted based on the vertical relationship of the X coordinate axis and the Y coordinate axis based on the curve image, and then the pixel coordinates are converted into real coordinates through the following formula (1) and formula (2) to obtain the coordinate data:
Wherein X and Y represent the final converted coordinate values of the data of the real curve point, pX and pY are the coordinates of the pixel level of each point on the curve, Xmin and Ymin are the data values of the first detected digital coordinate data from the origin on the X axis and the Y axis respectively, when the character values on the coordinate axis are acquired, the character detection is required to be carried out, a rectangular detection frame is drawn for each digital character, pXi,pXj represents the horizontal coordinate of the top left corner vertex pixel of the rectangular frame in the front and rear coordinate axis value detection process, Xi,Xj is the specific value of the coordinate detection, pYi,pYj represents the vertical coordinate of the top left corner vertex pixel of the rectangular frame in the Y axis upper and lower coordinate axis value detection process, and Yi,Yj is the specific value after the character recognition is carried out in the coordinate detection process.
In specific implementation, in order to accurately and efficiently judge whether the flow velocity capacity ring has abnormal exhalation conditions based on the coordinate data, it is proposed that the coordinate data of the exhalation stage of each flow velocity capacity ring is divided into different sections according to the change characteristics and the time characteristics of the flow velocity, and whether each flow velocity capacity ring has abnormal exhalation conditions is further judged based on the different sections and the preset shape characteristics.
For example, the process of dividing the coordinate data of the expiration phase of each of the flow rate capacity loops into different segments according to the variation characteristics and time characteristics of the flow rate comprises the steps of:
determining a maximum value of flow rate values (i.e. determining a maximum value for a certain flow rate volume loop of ordinate data) based on said coordinate data of the exhalation phase of each of said flow rate volume loops;
Determining a key time point according to the expiration time period required by the lung function examination, and determining a flow velocity value corresponding to the key time point, wherein the key time point is the last time point in the expiration time period when the flow velocity keeps increasing (the determination of the key time point can be determined according to the curve trend of a flow velocity capacity ring in the expiration process, for example, for the expiration time period of the conventional lung function examination, the last time point in the expiration time period when the flow velocity keeps increasing is generally 1 second, and the key time point can be 1 second);
And determining the minimum value of the maximum value of the flow velocity values and the flow velocity values corresponding to the key time points as turning points, determining the coordinate data before the turning points as a first section according to the generation time sequence of the coordinate data in the expiration stage, and determining the coordinate data after the turning points as a second section.
In the implementation, in the process of determining the flow velocity value corresponding to the key time point, in order to adapt to the individual difference and improve accuracy, the flow velocity value corresponding to the key time point may be a dynamic value that is dynamically determined, for example, a mean value or a preset proportion of the mean value of the flow velocity values before the key time point may be determined as the flow velocity value corresponding to the key time point.
In the specific implementation, in order to realize that whether each flow rate capacity ring has abnormal exhalation conditions can be judged efficiently and accurately, the condition of cough can be detected by detecting whether a curve trend that the flow rate is firstly reduced and then is risen occurs, for example, if the last flow rate value is larger than the previous flow rate value in a plurality of continuous flow rate values, the curve is the flow rate rising trend, if the last flow rate value is smaller than the previous flow rate value in the plurality of continuous flow rate values, the curve is the flow rate falling trend, and if the flow rate value is the flow rate trend that the flow rate is firstly reduced and then is risen, the abnormal condition of cough is judged.
In addition, considering that the abnormal exhalation situation of the cough generally occurs in the second section, and the coordinate data of the second section is relatively more, in order to quickly and accurately determine whether the abnormal exhalation situation of the cough exists, the following method for detecting the cough is proposed:
Converting the coordinate data in the second section from time domain data to frequency domain data, determining a high frequency component in the frequency domain data, specifically, converting the coordinate data from time domain data to frequency domain data by adopting a fourier transform method (the longer the window length is, the higher the frequency resolution is, but the time domain details may be lost), determining a high frequency component part of the frequency domain data by analyzing a high frequency energy ratio of the high frequency component (for example, a high frequency range can be determined in a frequency spectrum, for example, a frequency band higher than a signal dominant frequency is determined as the high frequency range, energy of each frequency point in the high frequency range is calculated, and the high frequency component is calculated based on the energy of each frequency point;
Constructing a polar coordinate system, mapping a polar angle in the polar coordinate system into vital capacity, mapping a polar diameter in the polar coordinate system into flow velocity, respectively inputting the vital capacity and flow velocity values in the coordinate data corresponding to the high-frequency components into the polar coordinate system, and generating a polar coordinate curve by adjusting a time window length (a shorter time window length can be adopted to realize high time resolution so as to realize capturing rapid change, specific data of the time window length can be determined according to specific requirements) and scaling parameters (such as amplitude scaling and/or angle scaling, wherein the amplitude scaling is used for controlling a display range of the polar coordinate radius, such as normalization or logarithmic scaling, the angle scaling is used for adjusting a mapping proportion of an angle, and the specific adjustment proportion of the amplitude scaling and the angle scaling can be determined according to specific requirements);
and if the first preset shape characteristic of the polar coordinate curve which rises after the polar diameter of the polar coordinate curve is reduced, judging that the abnormal expiration condition of the cough exists in the flow velocity capacity ring.
The abnormal condition of cough in which part or region curve is highly probable is roughly and quickly determined by a high-frequency component mode, a polar coordinate curve is generated for the coordinate data corresponding to the high-frequency component in a polar coordinate mode, if the polar diameter of the polar coordinate curve is reduced and then risen, a first preset shape characteristic which indicates that the part of the coordinate data corresponding to the flow velocity capacity ring curve is firstly reduced and then risen, namely the abnormal condition of cough expiration exists, as shown by the curve in the circle of the graph (a) in fig. 4.
In specific implementation, considering that the abnormal condition of expiration with expiration hesitation generally occurs in the first section, and the coordinate data of the first section is relatively less, in order to quickly and accurately determine whether the abnormal condition of expiration with expiration hesitation exists, the following method for detecting expiration initiation hesitation is proposed:
Calculating a gradient of each of the coordinate data (e.g., a gradient of the coordinate data may be calculated using a differential method) for the coordinate data within the first section, the gradients of the respective coordinate data forming a gradient vector;
constructing a gradient autocorrelation matrix based on the gradient vector;
Calculating a feature vector corresponding to the minimum feature value based on the gradient autocorrelation matrix;
According to the feature vector corresponding to the minimum feature value, determining a point with abrupt gradient direction change (for example, a point with abrupt gradient direction change can be determined through non-maximum suppression and threshold screening, namely, a corner response value R of each point is calculated, a corner response threshold T is set, a point with R > T is screened to be used as a candidate corner point, a maximum value point in a candidate corner point in a preset neighborhood is used as a corner point in a neighborhood window taking a current point as a center through non-maximum suppression), and at least one corner point is determined;
And forming a connecting line by the coordinate data corresponding to the determined at least one angular point and the coordinate data before and after the coordinate data, and judging that the flow velocity capacity ring has the abnormal expiration condition of expiration starting hesitation if the connecting line has a first preset shape characteristic which rises after falling (namely, the first preset shape characteristic which shows that the rising after falling appears on the flow velocity capacity ring curve, as shown by an inner circle curve of a graph (d) in fig. 4).
In particular, the gradient of the coordinate data can be calculated by using the existing gradient calculation method, for example, the gradient can be approximately calculated by using a center difference quotient, which comprises the following steps:
step 1, inputting discrete coordinate data { (x1,y1),(x2,y2),...,(xN,yN) };
Step 2, setting a distance h:
h=xi+1-xi,
wherein h is the distance between the points, xi is the abscissa value of the i-th point, and xi+1 is the abscissa value of the i+1th point;
Step 3, calculating the gradient of each point in the middle:
Wherein gradienti is the gradient of the ith point, yi+1 and yi-1 are the longitudinal coordinate values of the (i+1) th point and the (i-1) th point respectively, and N is the total point number in the coordinate data;
step 4, calculating gradient by using forward difference and backward difference at boundary points:
Forward differential (i=1):
backward difference (i=n):
Wherein gradient1 is the gradient of the first coordinate point, y1 and y2 are the ordinate values of the first and second coordinate points respectively, gradientN is the gradient of the last coordinate point, and yN and yN-1 are the ordinate values of the nth and N-1 th points respectively;
step 5, sequentially arranging gradients of all points to form gradient vectors:
Where g is a gradient vector of the coordinate data.
In practice, the corner response value R may be calculated according to the Harris corner response function formula, r=lambda1λ2-k(λ1+λ2)2=det(M)-k·trace2 (M),
Wherein R is a corner response function value and represents the possibility intensity of a corner, lambda1 and lambda2 are eigenvalues of a structural matrix M and describe the gradient change condition, k is an empirical constant, 0.04-0.06 is generally taken, det (M) is a determinant of the matrix M, trace (M) is a trace of the matrix M, namely the sum of diagonal elements, M is a structural tensor, namely a Harris matrix, and Ix and Iy are gradients of coordinate data in x and y directions respectively.
In specific implementation, in order to rapidly and accurately judge whether the abnormal condition of the exhalation with insufficient exhalation starting force exists, the following method for detecting the insufficient exhalation starting force by combining the persistent coherent topological feature and the geometric feature of the curve (capturing a global structure by the persistent coherent feature and analyzing local changes by geometric features such as curvature) is provided, so that high robustness judgment is realized:
Taking the turning points as centers, respectively taking a preset number (for example, the preset number can be a numerical value of 10,20 and the like) of continuous coordinate data before and after the turning points according to the generation time sequence of the coordinate data to form local point clouds (for example, firstly, converting the preset number of two-dimensional coordinate data into three-dimensional coordinates (x, y, z) to obtain a plurality of point cloud data, for example, assuming that all points are on the same plane, namely z=0, or obtaining a z value through a monocular depth estimation algorithm (for example MonoDepth) or binocular parallax calculation, then, importing the plurality of point cloud data into ContextCapture software, and automatically executing a plurality of key links including data preprocessing, feature extraction and final model generation by the software to output a point cloud three-dimensional model;
Constructing an alpha complex or Vietoris-Rips complex of the local point cloud, performing persistent coherent computation, and extracting topological features (such as extracting topological features from the alpha complex or Vietoris-Rips complex through GUDHI TDA-tutorial, wherein the topological features can comprise a 0-maintenance-duration bar code and a 1-maintenance-duration bar code);
Calculating curvatures of the local point clouds under different window size scales (for example, under a certain window size scale, acquiring point cloud data under the window and forming a curved surface, calculating a normal vector of the curved surface at one point F on the curved surface, for example, respectively calculating partial derivatives of x, y and z axes of the point F (x, y and z) to obtain Fx、Fy、Fz, substituting the partial derivatives into the vector (Fx,Fy,Fz) to obtain the normal vector), and then calculating the curvature sigma at the one point on the curved surface through the following formula: Beta0 is the change of the curved surface along the normal vector, beta1 and beta1 are the distribution of the point on the tangent plane, and a plurality of curvatures are obtained;
Calculating the coupling degree of the curvature and the topology according to the curvatures and the topological characteristics;
determining whether a curve formed by the local point cloud is a second preset shape characteristic of a flat curve according to the curvatures, the topological characteristics and the coupling degree of the curvatures and the topology;
If (if the flow rate capacity ring curve has a flat curve, that is, if there is a second preset shape feature, as shown by the curve in the circle of fig. 4 (b)) and the turning point is smaller than the peak value of the standard flow rate capacity ring (may be the standard flow rate capacity ring under normal conditions), judging that the flow rate capacity ring has the abnormal exhalation condition of insufficient exhalation starting force.
In a specific implementation, calculating the coupling degree of the curvature and the topology according to the curvatures and the topological features comprises the following steps:
Calculating curvature stability indexes of the curvatures;
constructing a topological feature vector of the topological feature based on the continuous coherent death time distribution;
and determining the product of the curvature stability index and the topological feature vector as the coupling degree of the curvature and the topology.
In the implementation, after a plurality of curvatures, topological features and the coupling degree of the curvatures and the topologies are obtained, whether the curve formed by the local point cloud is a flat curve or not can be judged through the trained neural network model. For example, the relevant geometric features of the plurality of curvatures (e.g., average curvature, curvature variance, first derivative, etc.), topological features (e.g., 0 sustain-long barcode number, 1 sustain-long barcode number, topological feature vector, etc.), and the degree of coupling of curvature to topology may be input into a trained neural network model, which outputs characters or labels that represent whether or not it is a flat curve.
In practice, the curvature stability index may be calculated by the following formula:
wherein, theFor the curvature stability index, k is the average curvature of a plurality of curvatures, avg () is an aggregation function.
In specific implementation, the topological feature vector can be calculated by the following formula:
Where f is the topological feature vector, mr is the death time of the r-th persistent Barcode, nr is the birth time of the r-th persistent Barcode, and Barcode1 is the total number of persistent barcodes.
In specific implementation, in order to quickly and accurately judge whether an abnormal condition of expiration of early expiration exists, the following method for detecting early expiration is provided:
And (c) taking a plurality of coordinate data of the tail end of the second section, analyzing the slopes of the plurality of coordinate data, and judging that abnormal expiration conditions of early expiration termination exist if the slopes are continuously low, as shown by an inner circle curve on the right side of the graph (c) in fig. 4.
In the specific implementation, the regurgitation amount verification may be performed, and if the regurgitation amount is less than or equal to 5% fvc or 150ml, the expiration initiation is judged to be effective.
In specific implementation, the consistency of the results of the multiple test data can be verified through the difference value of the FVCs, for example, the two largest FVCs in the multiple tests are taken, the difference value of the two largest FVCs is calculated, and if the difference value is less than or equal to 150ml, the consistency of the results is met through judging the multiple test data.
In addition, the variability of the measurement system can be quantified to accurately verify the consistency of the results of the multiple test data, for example, calculating the ratio between the test parameter data of the same test parameter (such as FVC, FEV, PEF and the like) of each two times of lung function tests in multiple times of lung function tests, so as to obtain the ratio corresponding to each of the multiple test parameters;
calculating the average value P and the standard deviation q of a plurality of ratios;
Calculating the upper limit (i.e., P+1.96×q is the upper limit) and the lower limit (i.e., P-1.96×q is the lower limit) of the confidence interval by the formula P+ -1.96×q;
Determining a difference range of the examination parameter data of each two lung function examinations according to the maximum value and the minimum value of the plurality of ratios in the confidence interval (namely, finding the maximum value and the minimum value from the plurality of ratios in the confidence interval aiming at the data of a certain examination parameter, and taking the difference value of the maximum value and the minimum value as the difference range);
And if the difference range accords with a preset threshold range, judging that the inspection parameter data of each two lung function inspections meet the consistency of the result.
In specific implementation, whether the report is qualified or not can be obtained according to whether the abnormal condition of expiration exists in each flow velocity capacity ring and whether the inspection parameter data of multiple times of lung function inspection meet the result consistency, if the report is unqualified due to the existence of abnormal condition of expiration and/or the unsatisfied condition of the result consistency of the inspection parameter data, information reminding is pushed to a user, the patient is reminded of reporting that the unqualified report features exist, and a doctor is reminded of commanding the patient to inspect the report, so that the situation can be avoided.
In this embodiment, a computer device is provided, as shown in fig. 5, including a memory 501, a processor 502, and a computer program stored in the memory and capable of running on the processor, where the processor implements the quality control method of any of the above lung function inspection reports when executing the computer program.
In particular, the computer device may be a computer terminal, a server or similar computing means.
In the present embodiment, a computer-readable storage medium storing a computer program for executing the quality control method of any of the above-described lung function inspection reports is provided.
In particular, computer-readable storage media, including both permanent and non-permanent, removable and non-removable media, may be used to implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer-readable storage media include, but are not limited to, phase-change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable storage media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
Based on the same inventive concept, the embodiment of the invention also provides a quality control device for a lung function examination report, as described in the following embodiment. Since the principle of the quality control device for the lung function inspection report for solving the problem is similar to that of the quality control method for the lung function inspection report, the implementation of the quality control device for the lung function inspection report can be referred to the implementation of the quality control method for the lung function inspection report, and the repetition is omitted. As used below, the term "unit" or "module" may be a combination of software and/or hardware that implements the intended function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 6 is a block diagram of a quality control apparatus for lung function test report according to an embodiment of the present invention, as shown in fig. 6, including:
A data identification module 601 for identifying examination parameter data and graphic data from a PDF file of a lung function examination report;
A coordinate extraction module 602, configured to extract, for each flow rate capacity ring in the graphics data, coordinate data for each flow rate capacity ring;
A segment dividing module 603, configured to divide the coordinate data of each flow rate capacity ring into different segments according to a change characteristic and a time characteristic of a flow rate based on the coordinate data of an expiration phase of each flow rate capacity ring;
An abnormality determination module 604, configured to determine whether each flow velocity capacity ring has an abnormal exhalation condition according to whether different sections where the coordinate data are located and the coordinate data form preset shape features, where different preset shape features correspond to different abnormal exhalation conditions;
a consistency judging module 605, configured to judge whether the inspection parameter data of the multiple lung function inspection in the PDF file satisfies a result consistency based on the trend difference of the inspection parameter data.
In one embodiment, the system comprises a flow rate capacity ring, a section dividing module, a key time point, a minimum value, a coordinate data and a coordinate data, wherein the flow rate capacity ring is used for generating a coordinate data of an expiration period, the maximum value is used for determining a flow rate value based on the coordinate data of the expiration period of each flow rate capacity ring, the key time point is determined according to expiration time length required by lung function examination, the flow rate value corresponding to the key time point is determined, the key time point is the last time point in the expiration time length when the flow rate keeps increasing, the minimum value of the maximum value of the flow rate value and the flow rate value corresponding to the key time point is determined to be a turning point, the coordinate data before the turning point is determined to be a first section according to the generation time sequence of the coordinate data of the expiration period, and the coordinate data after the turning point is determined to be a second section.
In one embodiment, the abnormality judging module is configured to convert the coordinate data in the second section from time domain data to frequency domain data, determine a high-frequency component in the frequency domain data, construct a polar coordinate system, map a polar angle in the polar coordinate system to be a lung capacity, map a polar diameter in the polar coordinate system to be a flow velocity, respectively input the lung capacity and a flow velocity value in the coordinate data corresponding to the high-frequency component into the polar coordinate system, generate a polar coordinate curve by adjusting a time window length and a scaling parameter, and judge that the flow velocity capacity ring has the abnormal expiration condition of cough if a first preset shape feature of the polar diameter of the polar coordinate curve is raised after being lowered.
In one embodiment, the anomaly judgment module is configured to calculate, for the coordinate data in the first section, a gradient of each coordinate data, wherein the gradient of each coordinate data forms a gradient vector, construct a gradient autocorrelation matrix based on the gradient vector, calculate a feature vector corresponding to a minimum feature value based on the gradient autocorrelation matrix, determine a point with abrupt change of gradient direction as a corner point according to the feature vector corresponding to the minimum feature value, determine at least one corner point, and construct a connection line between the coordinate data corresponding to the determined at least one corner point and the coordinate data before and after the coordinate data, and if the connection line has a first preset shape feature rising after falling, judge that the flow velocity capacity ring has the abnormal exhalation condition with hesitation in the beginning of exhalation.
In one embodiment, the abnormality judgment module is configured to take the turning point as a center, take a preset number of continuous coordinate data before and after the turning point according to a time sequence of the coordinate data to form a local point cloud, construct an alpha complex or Vietoris-Rips complex of the local point cloud and perform persistent coherent computation to extract topological features, calculate curvatures of the local point cloud under a plurality of different window size scales to obtain a plurality of curvatures, calculate coupling degrees of the curvatures and the topology according to the plurality of curvatures and the topological features, determine whether a curve formed by the local point cloud is a second preset shape feature of a flat curve according to the plurality of curvatures, the topological features and the coupling degrees of the curvatures and the topology, and judge that the expiratory abnormal condition with insufficient expiratory force exists in the flow rate capacity ring if the turning point is smaller than a peak value of a standard flow rate capacity ring.
In one embodiment, the anomaly determination module is configured to calculate curvature stability indexes of the plurality of curvatures, construct a topological feature vector of the topological feature based on a death time distribution of continuous coherence, and determine a product of the curvature stability indexes and the topological feature vector as a coupling degree of the curvatures and the topology.
In one embodiment, the consistency judging module is used for calculating the ratio between the inspection parameter data of the same inspection parameter of every two times of the lung function inspection in a plurality of times of the lung function inspection to obtain the ratio corresponding to each of a plurality of inspection parameters, calculating the average value P and the standard deviation q of the plurality of ratios, calculating the upper limit and the lower limit of a confidence interval through a formula P+/-1.96 Xq, determining the difference range of the inspection parameter data of every two times of the lung function inspection according to the maximum value and the minimum value of the plurality of ratios in the confidence interval, and judging that the inspection parameter data of every two times of the lung function inspection meets the consistency of the result if the difference range meets a preset threshold range.
The embodiment of the invention has the following technical effects of realizing the automatic and intelligent abnormal detection and quality control of the inspection parameter data and the graphic data of the lung function inspection report, being capable of more efficiently interpreting the lung function inspection report compared with the manual inspection in the prior art, being beneficial to meeting the requirements of mass report quality control, and further realizing the standardization of the abnormal detection and quality control of the lung function inspection report, avoiding the influence caused by personal difference and being beneficial to improving the accuracy of report quality control.
It will be apparent to those skilled in the art that the modules or steps of the embodiments of the invention described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may alternatively be implemented in program code executable by computing devices, so that they may be stored in a storage device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than what is shown or described, or they may be separately fabricated into individual integrated circuit modules, or a plurality of modules or steps in them may be fabricated into a single integrated circuit module. Thus, embodiments of the invention are not limited to any specific combination of hardware and software.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, and various modifications and variations can be made to the embodiments of the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.