AI in Healthcare process improvement

The main aim of this simple example is to demonstrate the applications of machine learning in business process improvement in the healthcare sector. Many of the principles and ideas applied in this case study are also applicable in other sectors!

We will try to improve the post-operative patient care process in a hospital. After an operation, according to the current post-operative patient care process, patients need to be examined by a medical doctor to determine where the patients should be sent from the postoperative recovery area. The possibilities are the following:
  • The patient may go home,
  • The patient needs to go to the general care hospital floor (GC),
  • The patient needs to be transferred to intensive care (IC).
In order to improve this process (make the process much faster and more reliable) the hospital needs to collect all necessary data which is needed to make this decision for many patients and then use this data to train a machine learning model. After the machine learning model is successfully trained a hospital employee (e.g. a nurse) can simply feed the specific patient data to the model and the machine learning model will tell instantly (inference) what should happen with the patient. This improved process is much faster because the waiting time for the medical doctor is eliminated, in many cases the decision is more reliable because the machine learning model does not get tired or confused by external factors, the medical doctor or specialist can do other important things, and as last but not least the patient will be more satisfied with the faster process! Several important reasons to implement such a process improvement!

The dataset can be seen below (can be downloaded at the end of the article):

L-CORE

L-SURF

L-O2

L-BP

SURF-STBL

CORE-STBL

BP-STBL

COMFORT

DECISION

mid

low

excellent

mid

stable

stable

stable

15

GC

mid

high

excellent

high

stable

stable

stable

10

Home

high

low

excellent

high

stable

stable

mod-stable

10

GC

mid

low

good

high

stable

unstable

mod-stable

15

GC

mid

mid

excellent

high

stable

stable

stable

10

GC

high

low

good

mid

stable

stable

unstable

15

Home

mid

low

excellent

high

stable

stable

mod-stable

5

Home


Most of the numerical attributes such as the temperature, are grouped and converted to textual categories. This is one of the tricks which can be used while training a machine learning model. You may of course use numerical values but then you will give more freedom to the model! In many situations it is sufficient to group the data into well-chosen textual categories. The AI-TOOLKIT can handle both categorical and numerical attributes.

The collected attributes and groupings are the following:
  • L-CORE: the patient's internal temperature: high > 37°, 37° ≥ mid ≥ 36°, low < 36°.
  • L-SURF: the patient's surface temperature: high > 36.5°, 35° ≥ mid ≥ 36.5°, low < 35°.
  • L-O2: the oxygen saturation: excellent ≥ 98%, 98% > good ≥ 90%, 90% > fair ≥ 80%, poor < 80%.
  • L-BP: the last measurement of blood pressure: high > 130/90, 130/90 ≥ mid ≥ 90/70, low < 90/70.
  • SURF-STBL: the stability of patient's surface temperature: stable, mod-stable and unstable.
  • CORE-STBL: the stability of patient's core temperature: stable, mod-stable and unstable.
  • BP-STBL: the stability of patient's blood pressure: stable, mod-stable and unstable.
  • COMFORT: the patient's perceived comfort at discharge, measured as an integer between 0 and 20.
  • DECISION: the discharge decision: Home: the patient needs to be prepared to go Home, GC: the patient must be sent to the General Care hospital floor. IC: the patient must be sent to Intensive Care.
There is a huge imbalance in the data. There are 64 cases with a ‘Home’ decision, 24 cases with ‘GC’ decision and only 2 cases with ‘IC’ decision. The dataset is also very small with 90 records. We will need to take the imbalance into account while evaluating the machine learning model or we could also resample the data and remove the imbalance. We will try both in this example.

The first step is to create an AI-TOOLKIT database with the “Create New AI-TOOLKIT Database” command on the Database tab on the left taskbar. Save the database in a directory of your choice. The second step is to import all data into the database created in the former step with the “Import Data into Database” command. Do not forget to indicate the number of header rows (if any) and the correct zero based index of the decision column! We also have to select the two ‘Conversion/Resampling’ options for automatic conversion of the categorical values and in case we want to resample the dataset then the resample for imbalance reduction option also. 

In this example we will import the dataset two times, first without resampling and then with resampling in order to be able to test both cases. Both data can be imported into the same AI-TOOLKIT database but with a different name. For the categorical conversion we use the default option which is integer encoding. While resampling the dataset we must also set the ‘Majority Limit’ option to 64 (the number of cases with the majority class) in order to have 64 resampled cases for all three classes (Home, GC and IC).

Next we must create the AI-TOOLKIT project file. Use the “Open AI-TOOLKIT Editor” command and then insert the chosen model template with the “Insert ML Template” button. We will train a simple neural network classification model with three internal layers. The project file and the optimal parameters are as follows:
model:
    id: 'ID-BBEMTNTNEY'
    type: FFNN1_C 
    path: 'postoperative.sl3'
    params:
        - layers:
            - Linear: 
            - TanHLayer: 
                nodes: 100
            - Linear: 
            - TanHLayer: 
                nodes: 80
            - Linear: 
            - TanHLayer: 
                nodes: 40
            - Linear: 
        - iterations_per_cycle: 1000
        - num_cycles: 10
        - step_size: 5e-5
        - batch_size: 1
        - optimizer: SGD_ADAM 
        - stop_tolerance: 1e-5
        - sarah_gamma: 0.125
    training: 
        - data_id: 'postoperative' 
        - dec_id: 'decision'
    test: 
        - data_id: 'postoperative' 
        - dec_id: 'decision'
    input: 
        - data_id: 'po_input_data' 
        - dec_id: 'decision'
    output:
        - data_id: 'po_output_data'
        - col_id: 'decision'
The training process and the extended evaluation results with the original (not resampled) dataset are as follows:
AI Training... (Model ID: ID-BBEMTNTNEY).
0 - training accuracy = 71.11 % (Model ID: ID-BBEMTNTNEY) (training time: 0m 2s ).
1 - training accuracy = 81.11 % (Model ID: ID-BBEMTNTNEY) (training time: 0m 0s ).
2 - training accuracy = 90.00 % (Model ID: ID-BBEMTNTNEY) (training time: 0m 0s ).
3 - training accuracy = 91.11 % (Model ID: ID-BBEMTNTNEY) (training time: 0m 0s ).
4 - training accuracy = 92.22 % (Model ID: ID-BBEMTNTNEY) (training time: 0m 0s ).
5 - training accuracy = 92.22 % (Model ID: ID-BBEMTNTNEY) (training time: 0m 0s ).
6 - training accuracy = 92.22 % (Model ID: ID-BBEMTNTNEY) (training time: 0m 0s ).
7 - training accuracy = 93.33 % (Model ID: ID-BBEMTNTNEY) (training time: 0m 0s ).
8 - training accuracy = 93.33 % (Model ID: ID-BBEMTNTNEY) (training time: 0m 0s ).
9 - training accuracy = 93.33 % (Model ID: ID-BBEMTNTNEY) (training time: 0m 0s ).
10 - training accuracy = 93.33 % (Model ID: ID-BBEMTNTNEY) (training time: 0m 0s ).

The best model is chosen with training accuracy = 93.33 % (Model ID: ID-BBEMTNTNEY). 

Performance Evaluation Results
 

  Confusion Matrix [predicted x original] (number of classes: 3):

  GC Home IC
GC63 5 0
Home 1 19 0
IC0 0 2
       
Accuracy 93.33%   
Error 6.67%    
C.Kappa 83.46%   
       
  GC HomeIC
Precision 92.65%  95.00% 100.00%
Recall 98.44% 79.17% 100.00%
FNR 1.56% 20.83% 0.00%
F1 95.45% 86.36% 100.00%
TNR 80.77% 98.48% 100.00%
FPR 19.23% 1.52% 0.00%
Despite the fact that there is not enough data and that there is an imbalance in the data the results are quite good. Sending patients to general care when they could go home is less dangerous for the patients and the doctor can still send them home from general care, therefore this kind of error is preferred compared to the other errors. The model does not make the worst mistake and send a patient home or to general care when he/she should go to intensive care. This is very important in this case!

A simple visual form could be presented to a nurse who must enter the appropriate attributes and push the Ask AI button to get the instant answer from the machine learning model.

For further explanation of the results and for the results with the resampled dataset read the book “The Application of Artificial Intelligence”. 


This article is a slightly modified excerpt from the book “The Application of Artificial Intelligence”. If you are interested in the subject then it is strongly recommended to read the book which contains many more details and real world case studies for several sectors and disciplines! The book explains  several examples step-by-step by using the AI-TOOLKIT. The book is going through the publishing process at the time of writing this article. You may use the contact form for info about pre-ordering the book.

References

  1. The Application of Artificial Intelligence, Zoltan Somogyi.
  2. Post-Operative Patient Data Set: Sharon Summers, School of Nursing, University of Kansas. Medical Center, Kansas City, KS 66160. Linda Woolery, School of Nursing, University of Missouri, Columbia, MO 65211.
    You can download the data here: Post-Operative Patient Care Process Decision AI data set
For in case you are also interested in some BUSINESS PROCESS IMPROVEMENT Cloud computing tools visit the following links:




Contact

Please use the contact form:

Address

Antwerp, Belgium

Helpdesk

You may contact the AI-TOOLKIT helpdesk:


Search This Website