-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhealth-analytics.py
43 lines (41 loc) · 2.13 KB
/
health-analytics.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import pandas as pd
import numpy as np
varNumber = 90
varString = 'breathing information'
varList = ['o2 level', 'respiration rate', 'lung capacity']
varDictionary = {
"patient" : "Frank Gallagher",
"age" : "50",
"symptoms" : ['cough', 'dizziness', 'headache'],
"emergencycontact" : {
'emergencycontact1' : 'fiona gallagher',
'emergencycontact2' : 'philip gallagher',
'emergencycontact3' : 'sheila jackson'
}
}
oxygenSaturation = 89
respiratoryRate = 22
if oxygenSaturation >=95 and respiratoryRate <12:
print('You do not need oxygen treatment, your percentage is at: ', oxygenSaturation)
print('Your respiratory rate is low at: ', respiratoryRate)
elif oxygenSaturation >=95 and respiratoryRate >=12 and respiratoryRate <=20:
print('You do not need oxygen treatment, your percentage is at: ', oxygenSaturation)
print('Your respiratory rate is normal at: ', respiratoryRate)
elif oxygenSaturation >=95 and respiratoryRate >20:
print('You do not need oxygen treatment, your percentage is at: ', oxygenSaturation)
print ('Your respiratory rate is high at: ', respiratoryRate)
elif oxygenSaturation <=94 and respiratoryRate <12:
print('You need oxygen treatment, your percentage is at: ', oxygenSaturation)
percentageUntilNormal = 95 - oxygenSaturation
print('Your oxygen saturation level is this percent away from normal: ', percentageUntilNormal)
print('Your respiratory rate is low at: ', respiratoryRate)
elif oxygenSaturation <=94 and respiratoryRate >=12 and respiratoryRate <=20:
print('You need oxygen treatment, your percentage is at: ', oxygenSaturation)
percentageUntilNormal = 95 - oxygenSaturation
print('Your oxygen saturation level is this percent away from normal: ', percentageUntilNormal)
print('Your respiratory rate is normal at: ', respiratoryRate)
else:
print('You need oxygen treatment, your percentage is at: ', oxygenSaturation)
percentageUntilNormal = 95 - oxygenSaturation
print('Your oxygen saturation level is this percent away from normal: ', percentageUntilNormal)
print('Your respiratory rate is high at: ', respiratoryRate)