-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcystic fibrosis app code
82 lines (73 loc) · 2.4 KB
/
cystic fibrosis app code
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
'''
development for the Time A-Cyst app
how will the app help patients and their parents?
a login needs to be established for each patient
'''
#add constants next
admins = {'patient_last_name':'parents_last_name'}
#Like the admins above is a dictionary but of patients and parents. In this case, eachh patient's first name is a key.
patients = {'Hannah': [New Patient],
'Sally':[Existing Patient],
'Nboke':[Existing]}
# define function
def show_data():
data = cycsticfibrosis.patients
patient_name = input('Patient name:')
parent_name = input('Parent name:' )
treatment = data.get_treatment_by_patient_name(patient_name)
regime = treatment['New Patient']
pt2.insert(0,current_schedule_plan)
regime = treatment ['Old Patient']
pt3.insert(0,develop_schedule_plan)
print(status)
else:
print('Patient not found. Please check your spelling or go back and add if new.')
#removing patients who no longer use app
def removePatients():
nameToRemove = input('Who do you want to remove? ')
if nameToRemove in patients:
print('Removing '+nameToRemove)
del patients[nameToRemove]
print(patients)
else:
print('Patient not found.')
def main():
print("User: " + login)
#What a patient or the parent will see once they have logged in to the app successfully.
print("""
Welcome to Time A-Cyst
[1] - New Patient
[2] - Existing Patient
[3] - Universal cycsticfibrosis regime
[4] - Modified cysticfibrosis regime
[5] - Exit
""")
action = input('How to develop new patient regime? (Enter a number) ')
#Here we process their choice of what they want to do.
if action == '1':
#print('1 selected')
enterNewPatient()
elif action == '2':
#print('2 selected')
enterExistingPatient()
elif action == '3':
#print('3 selected')
enterUniversalcysticfribrosisregime
elif action == '5':
#print('5 selected')
exit()
else:
print('Valid option not selected.') #need to cause it to reprompt
# How to login to Time A-Cyst app
login = input('Username: ')
if login in app:
password = input('Patient_last_name: ')
if app[login] == Patient_last_name:
print('Welcome,',login)
#now run the code
while True:
main()
else:
print('Invalid password.')
else:
print('Invalid user.')