This application is a divisional application, parent application number: 2019104167815, case name: medical resource management method, device and electronic equipment, application date of the mother application: year 2019, month 05 and day 20.
Disclosure of Invention
In view of the above, an object of the present invention is to provide a method, an apparatus and an electronic device for allocating medical resources, so as to solve the problems in the prior art.
In order to achieve the above purpose, the embodiment of the invention adopts the following technical scheme:
a medical resource allocation method, comprising:
acquiring user information of a user, wherein the user information comprises description information, registration information and disease information of the user;
obtaining characteristic data of the user according to the user information;
calculating according to a pre-constructed target calculation model and the characteristic data to obtain a resource allocation parameter;
and performing medical resource allocation processing on the user according to the resource allocation parameters and the current medical resource information.
In a preferred option of the embodiment of the present invention, the step of calculating to obtain the resource allocation parameter according to the pre-constructed target calculation model and the feature data includes:
calculating the classification performance of a plurality of preset classification algorithms according to historical user information, and selecting a target classification algorithm according to the classification performance;
calculating a weight coefficient of each predetermined evaluation index according to historical user information and the target classification algorithm, wherein the description information, the registration information and the disease information respectively have at least one evaluation index;
calculating according to a pre-constructed target calculation model, the weight coefficient and the characteristic data to obtain a resource distribution parameter;
wherein the target calculation model is:
wherein P is the resource allocation parameter, n is the number of the evaluation indexes, aiCharacteristic data corresponding to the ith evaluation index, ciThe weight coefficient of the ith evaluation index.
In a preferred option of the embodiment of the present invention, the step of performing medical resource allocation processing on the user according to the resource allocation parameter and the current medical resource information includes:
judging whether medical resources meeting preset conditions exist according to the disease information of the user and the current medical resource information;
when the medical resource meeting the preset condition exists, distributing the medical resource to the user;
and when no medical resource meeting the preset condition exists, adjusting the medical resource reservation queuing list according to the user information of the user.
In a preferred option of the embodiment of the present invention, the medical resource allocation method further includes:
calculating the daily increase of the medical resources meeting the preset conditions according to a pre-constructed prediction model;
and performing pre-allocation processing on the medical resources for the users in the medical resource reservation queuing list according to the daily increment.
In a preferred option of the embodiment of the present invention, the medical resource allocation method further includes a step of constructing the prediction model in advance, and the step includes:
obtaining relative error data through an MSARIMA model and historical daily increment of medical resources meeting preset conditions;
a predictive model is constructed from the weighted markov chains and the relative error data.
In a preferred option of the embodiment of the present invention, the step of obtaining the relative error data through the msnarima model and the historical daily increment of the medical resource meeting the preset condition includes:
processing the historical daily increment of the medical resources meeting the preset conditions to obtain training data;
fitting the training data through an MSARIMA model to obtain fitting data;
and obtaining relative error data according to the training data and the fitting data.
In a preferred alternative of the embodiment of the present invention, the step of constructing a prediction model from the weighted markov chain and the relative error data includes:
processing the relative error data by a mean-square error grading method to obtain state sequence data;
calculating a one-step state transition probability matrix according to the state sequence data;
when the relative error data is in a Markov process, calculating a weight coefficient of a transition probability matrix of a corresponding time step of a Markov chain according to an autocorrelation coefficient of the relative error data in each time step;
and constructing a prediction model according to the weight coefficient and the one-step state transition probability matrix.
In a preferred option of the embodiment of the present invention, the step of performing medical resource allocation processing on the user according to the resource allocation parameter and the current medical resource information further includes:
judging whether the resource allocation parameters are in a preset interval or not;
when the resource allocation parameters are in a preset interval, allocating medical resources for the user according to the current medical resource information, and updating the current medical resource information;
and when the resource allocation parameter is not in the preset interval, adding the user into the medical resource reservation list according to the resource allocation parameter.
An embodiment of the present invention further provides a medical resource allocation apparatus, including:
the system comprises a user information acquisition module, a registration module and a disease information acquisition module, wherein the user information acquisition module is used for acquiring user information of a user, and the user information comprises description information, registration information and disease information of the user;
the characteristic data acquisition module is used for acquiring the characteristic data of the user according to the user information;
the resource allocation parameter calculation module is used for calculating to obtain resource allocation parameters according to a pre-constructed target calculation model and the characteristic data;
and the medical resource allocation module is used for allocating medical resources to the user according to the resource allocation parameters and the current medical resource information.
An embodiment of the present invention further provides an electronic device, which includes a memory and a processor, where the processor is configured to execute an executable computer program stored in the memory, so as to implement the medical resource allocation method described above.
According to the medical resource allocation method, the medical resource allocation device and the electronic equipment, the user information of the user is calculated according to the pre-constructed target calculation model to obtain the resource allocation parameters, and the medical resource allocation processing is performed on the user according to the resource allocation parameters, so that the operation efficiency of a hospital is improved.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
As shown in fig. 1, an embodiment of the invention provides an electronic device 10. The electronic device 10 may include a memory 12, a processor 14, and a medical asset management device 100. The memory 12 and the processor 14 are electrically connected, directly or indirectly, to enable the transfer or interaction of data. For example, they may be electrically connected to each other via one or more communication buses or signal lines. The medical resource management apparatus 100 includes at least one software function module which can be stored in the memory 12 in the form of software or firmware (firmware). The processor 14 is configured to execute executable computer programs stored in the memory 12, such as software functional modules and computer programs included in the medical asset management device 100, so as to implement a medical asset management method.
The Memory 12 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like.
The processor 14 may be an integrated circuit chip having signal processing capabilities. The Processor 14 may be a general-purpose Processor including a Central Processing Unit (CPU), a Network Processor (NP), a System on Chip (SoC), and the like.
It will be appreciated that the configuration shown in FIG. 1 is merely illustrative and that the electronic device 10 may include more or fewer components than shown in FIG. 1 or may have a different configuration than shown in FIG. 1.
With reference to fig. 2, an embodiment of the present invention further provides a medical resource allocation method applicable to the electronic device 10. Wherein the method steps defined by the flow related to the medical resource allocation method may be implemented by the electronic device 10. The specific process shown in fig. 2 will be described in detail below.
Step S100, user information of the user is obtained.
The user information may include description information, registration information, and disease information of the user. In particular, the descriptive information may include, but is not limited to, the user's gender, age, location of ownership, type of medical insurance, and clinician. The registration information may include, but is not limited to, season of admission, month of admission, date of admission, week of admission, time of admission, week of registration, time of registration, interval of registration, waiting time, remark information, and appointment care unit information. The disease information may include, but is not limited to, disease type and number of diseases.
And step S200, obtaining the characteristic data of the user according to the user information.
In detail, the user information of the user is subjected to data preprocessing to obtain the characteristic data of the user. For example, gender is divided into male and female, which may be assigned 1 and 2, respectively. The attribution areas are divided into provinces and provinces, and are respectively assigned with 1 and 2. Medical insurance types can be divided into 3 categories: medical insurance is provided; no medical insurance and other types, assigned values of 1, 2 and 3, respectively. The registration time and admission time can be divided into two periods: morning (00:00 am-12: 00am) and afternoon (12:01 am-23: 59pm), assigned values of 1 and 2, respectively. For disease types, physicians in the nephrology department and admission center managers can classify admitted patients for nephrology department into five subgroups based on outpatient diagnosis: vascular access (type 1), renal biopsy (type 2), peritoneal dialysis (type 3), post-renal transplant (type 4) and other diseases (type 5), assigned values of 1-5, respectively. The number of diseases is obtained by statistical calculation, and is divided into 4 types: contains only one disease, assigned a value of 1; two diseases are included, the value is 2, and the rest is similar; three diseases are included, with a value of 3, four and more diseases, with a value of 4.
And step S300, calculating according to a pre-constructed target calculation model and the characteristic data to obtain a resource allocation parameter.
In detail, the resource allocation parameter corresponds to a priority of the user.
And step S400, performing medical resource allocation processing on the user according to the resource allocation parameters and the current medical resource information.
The specific type of the medical resource is not limited, and the medical resource can be set according to the actual application requirement. For example, in this embodiment, the medical resource may be a bed.
Through the setting, the user information of the user is calculated according to the pre-constructed target calculation model to obtain the resource allocation parameter, and the medical resource allocation processing is carried out on the user according to the resource allocation parameter, so that the operation efficiency of the hospital is improved.
With reference to fig. 3, the step S300 may include a step S310, a step S320, and a step S330.
Step S310, calculating the classification performance of a plurality of preset classification algorithms according to historical user information, and selecting a target classification algorithm according to the classification performance.
In detail, the preset plurality of classification algorithms may include a logistic regression algorithm, a random forest rf (random forest) algorithm, a GBDT algorithm, and an xgboost (extreme Gradient boosting) algorithm.
The historical user information can include historical user information of 2014, 2015 and 2016, and the historical user information of 2014 can be used as a training set, the historical user information of 2015 can be used as a verification set, and the historical user information of 2016 can be used as a test set.
The classification performance of the four classification algorithms can be expressed by the area under the ROC curve, i.e., AUC. Among them, ROC (Receiver Operating Characteristic) is a relation curve depicting detection rate and false alarm rate under various threshold settings. AUC values calculated from the historical user information for the four classification algorithms are shown below.
The classification performance of the XGboost algorithm is relatively good.
Further, the calculation results of the models of all classification algorithms can be averaged by using an Averaging method to obtain a fusion model Ensemble, and the formula for calculating the fusion model is as follows:
where n represents the number of models, WeightiWeight, P, representing model iiAUC for model i is shown.
With reference to fig. 4, the models and the fusion models of the four algorithms can be cross-validated by ten folds to verify the classification performance. In detail, the historical user information is randomly divided into ten data subsets having the same capacity, one of which is used as a validation set and nine of which are used as a training set. The verification process was repeated ten times, each subset being used only once for verification. And after the verification process is finished, calculating the average value of the ten generated results to obtain the classification performance of each model.
As can be seen from fig. 4, the classification performance of the XGBoost algorithm is relatively good, and the XGBoost algorithm may be selected as the target classification algorithm.
Step S320, calculating the weight coefficient of each predetermined evaluation index according to the historical user information and the target classification algorithm.
Wherein the description information, the registration information, and the disease information each have at least one evaluation index. For example, the disease information may include two evaluation indicators, i.e., a disease type and a disease number.
And step S330, calculating to obtain resource distribution parameters according to a pre-constructed target calculation model, the weight coefficient and the characteristic data.
Wherein the target calculation model is:
wherein P is the resource allocation parameter, n is the number of the evaluation indexes, aiCharacteristic data corresponding to the ith evaluation index, ciThe weight coefficient of the ith evaluation index.
Further, the step S400 specifically includes the following steps: judging whether medical resources meeting preset conditions exist according to the disease information of the user and the current medical resource information; when the medical resource meeting the preset condition exists, distributing the medical resource to the user; and when no medical resource meeting the preset condition exists, adjusting the medical resource reservation queuing list according to the user information of the user.
In detail, the preset condition may be that a department corresponding to the disease information of the user has an empty bed. If the corresponding department has an empty bed, distributing the empty bed of the department to the user; if the corresponding department does not have a vacant bed and other departments have vacant beds, the vacant beds of other departments are allocated to the user; and if no vacant bed exists in all departments, adding the user information of the user into a medical resource reservation queuing list.
Further, the medical resource allocation method further includes: calculating the daily increase of the medical resources meeting the preset conditions according to a pre-constructed prediction model; and performing pre-allocation processing on the medical resources for the users in the medical resource reservation queuing list according to the daily increment.
In detail, the daily gain specifically refers to a bed gain corresponding to a daily discharge amount. By predicting the daily increment, the pre-allocation processing of medical resources can be carried out on the users in the medical resource reservation queuing list, a basis is provided for hospital bed allocation and patient admission scheduling decisions, and the hospital operation efficiency is further improved.
Further, the medical resource allocation method further includes a step of constructing the prediction model in advance, the step including: obtaining relative error data through an MSARIMA model and historical daily increment of medical resources meeting preset conditions; a predictive model is constructed from the weighted markov chains and the relative error data.
In detail, the step of obtaining relative error data through the msnaria model and the historical daily increase of medical resources meeting the preset conditions includes: processing the historical daily increment of the medical resources meeting the preset conditions to obtain training data; fitting the training data through an MSARIMA model to obtain fitting data; and obtaining relative error data according to the training data and the fitting data.
Specifically, training data with N observations is selected from the historical daily gain, and is represented as follows:
X={X(1),X(2),……,X(N)};
fitting the training data by an MSARIMA model to obtain an increase variation relationship, which is expressed as follows:
in detail, the relative error data is represented as follows:
wherein the relative error data reflects the degree of fluctuation of the fitted sequence around the training data curve and also reflects the degree of dynamic time variation of the sequence.
Further, the step of constructing a predictive model from the weighted markov chains and the relative error data comprises: processing the relative error data by a mean-square error grading method to obtain state sequence data; calculating a one-step state transition probability matrix according to the state sequence data; when the relative error data is in a Markov process, calculating a weight coefficient of a transition probability matrix of a corresponding time step of a Markov chain according to an autocorrelation coefficient of the relative error data in each time step; and constructing a prediction model according to the weight coefficient and the one-step state transition probability matrix.
The mean-square-error classification divides the relative error data Y into i different states, the general form of the i-th state being E
i=[Π
i1,Π
i2]. According to the central limit theorem, the sequence can be divided into five states:
and
therefore, which state each Y (k) in the sequence belongs to can be determined, and a one-step state transition probability matrix can be calculated according to the obtained state sequence data. Wherein
And S respectively represent a sample mean and a sample standard deviation of the relative error data Y, and the expression is as follows:
further, whether a stochastic process is a Markov process requires verification by statistical hypothesis testing. Typically, a discrete Markov chain sequence can be examined using the chi-square statistic. Suppose that
Representing the transfer frequency matrix (n)
ij)
q×qThe sum of all row elements in the jth row and the transfer frequency matrix (n)
ij)
q×qThe ratio of the sum of all elements. Recombination system slave state E
iTransition to State E
jProbability P of
ijObtaining:
because the statistics obey a degree of freedom of (q-1)
2Determining the significance level alpha to obtain
The value of (c). Defining:
wherein N isiTo representState EiThe total frequency of occurrence.
If it is not
The stochastic process is considered a markov process. If the relative error data Y is a Markov process, a weighted Markov chain model is introduced to obtain the predicted value of the verification set
Further, the autocorrelation coefficient and weight coefficient calculation expression is as follows:
wherein r is(m)The autocorrelation coefficient with the time step length of M is represented, and the maximum value of M is M. The vector to which the weight coefficients correspond can be represented as:
W(m)=(w(1),w(2),…,w(m),…,w(M))。
further, the predictive model may be represented as:
wherein,
indicating that the system is in state E at time k
iTransition to state E at time k + m by m steps
jAnd satisfy
Indicating that the system is passing through m steps from state E
iTransition to State E
jFrequency of (1), N
iRepresents state E
iThe total frequency of occurrence.
Further, the step S400 may further include: judging whether the resource allocation parameters are in a preset interval or not; when the resource allocation parameters are in a preset interval, allocating medical resources for the user according to the current medical resource information, and updating the current medical resource information; and when the resource allocation parameter is not in the preset interval, adding the user into the medical resource reservation list according to the resource allocation parameter.
Specifically, the preset interval may be set according to experience of medical staff, and re-screening may be performed according to the emergency of the user, so as to allocate medical resources to the emergency user.
In another embodiment, the step S400 may further include: judging whether the resource allocation parameter is larger than a preset value; when the resource allocation parameter is larger than a preset value, allocating medical resources for the user according to the current medical resource information, and updating the current medical resource information; and when the resource distribution parameter is smaller than a preset value, adding the user into a medical resource reservation list according to the resource distribution parameter.
Further, an embodiment of the present invention further provides a medical resource management apparatus 100, which can be applied to the electronic device 10. The medical resource management apparatus 100 may include a user information acquisition module, a characteristic data acquisition module, a resource allocation parameter calculation module, and a medical resource allocation module.
The user information acquisition module is used for acquiring the user information of the user. In this embodiment, the user information acquiring module may be configured to perform step S100 shown in fig. 2, and reference may be made to the foregoing description of step S100 for relevant content of the user information acquiring module.
And the characteristic data acquisition module is used for acquiring the characteristic data of the user according to the user information. In this embodiment, the feature data acquiring module may be configured to execute step S200 shown in fig. 2, and reference may be made to the foregoing description of step S200 for relevant content of the feature data acquiring module.
And the resource allocation parameter calculation module is used for calculating and obtaining resource allocation parameters according to a pre-constructed target calculation model and the characteristic data. In this embodiment, the resource allocation parameter calculation module may be configured to execute step S300 shown in fig. 2, and reference may be made to the foregoing description of step S300 for relevant contents of the resource allocation parameter calculation module.
And the medical resource allocation module is used for allocating medical resources to the user according to the resource allocation parameters and the current medical resource information. In this embodiment, the medical resource allocation module may be configured to perform step S400 shown in fig. 2, and reference may be made to the foregoing description of step S400 for relevant contents of the medical resource allocation module.
In summary, according to the medical resource allocation method, the medical resource allocation device, and the electronic device 10 provided in the embodiments of the present invention, the user information of the user is calculated according to the pre-constructed target calculation model to obtain the resource allocation parameter, and the medical resource allocation processing is performed on the user according to the resource allocation parameter, so as to improve the operation efficiency of the hospital.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.