Article
· Jan 13, 2022 2m read

Predict Maternal Health Risks

Hi community,

Prediction is a critical to the Maternal healthcare. The Health Dataset Application (https://openexchange.intersystems.com/package/Health-Dataset) has 10 real health datasets to predict the most important diseases and health problems, including Maternal Risk.

This article detail the steps to predict Maternal Risk using the InterSystems IRIS IntegratedML. This is a technology of InterSystems to do predictions using SQL Commnands! Great!

Follow these steps:

  1. Clone/git pull the repo into any local directory
$ git clone https://github.com/yurimarx/predict-maternal-risk.git
  1. Open a Docker terminal in this directory and run:
$ docker-compose build
  1. Run the IRIS container:
$ docker-compose up -d
  1. Go to the Management Portal (user _SYSTEM, password SYS). Do a Select to the Maternal Health Risk dataset to confirm the health dataset installation:
SELECT 
BS, BodyTemp, DiastolicBP, HeartRate, RiskLevel, SystolicBP, age
FROM dc_data_health.MaternalHealthRisk
  1. Inside the Management Portal (System > SQL) Execute the Creation of the view to train the model:
CREATE VIEW MaternalRiskTrain AS
SELECT BS, BodyTemp, DiastolicBP, HeartRate, RiskLevel, SystolicBP, age
FROM dc_data_health.MaternalHealthRisk WHERE ID < 801
  1. Inside the Management Portal (System > SQL) Execute the Creation of the view to validate, test and see the results of the prediction:
CREATE VIEW MaternalRiskValidate AS
SELECT BS, BodyTemp, DiastolicBP, HeartRate, RiskLevel, SystolicBP, age
FROM dc_data_health.MaternalHealthRisk WHERE ID > 801
  1. Inside the Management Portal (System > SQL) Execute the Creation of the Prediction model - predicting the maternal risk level:
CREATE MODEL MaternalRiskModel PREDICTING (RiskLevel) FROM MaternalRiskTrain
  1. Inside the Management Portal (System > SQL) Execute the train of the model:
TRAIN MODEL MaternalRiskModel
  1. Inside the Management Portal (System > SQL) Execute the validation of the model:
VALIDATE MODEL MaternalRiskModel From MaternalRiskValidate
  1. Inside the Management Portal (System > SQL) See the prediction in action:
SELECT PREDICT(MaternalRiskModel) AS PredictedMaternalRisk, RiskLevel AS RealMaternalRisk, age, BS, BodyTemp, DiastolicBP, HeartRate, SystolicBP FROM MaternalRiskValidate

Enjoy!

Discussion (0)1
Log in or sign up to continue