-
Notifications
You must be signed in to change notification settings - Fork 0
/
Phase_one_razak
115 lines (85 loc) · 2.58 KB
/
Phase_one_razak
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
## hospital laboratory systems
##GROUP SHOULD CONSIDER TRACKING VERY IMPORTANT
##Take or receive lab request
##Take the apppropriate sample(stool,blood,urine etc) for the test
##Test is being performed on the sample
##Test results are generated
##Print out results
import datetime
## VARAIBLE
patientlist={}
## CHANCE OF CREATING A DICTIONARY THAT HAS KEY PATIENT ID AND THE VALUE TO BE EQUAL TO
## NAME AND TRACKING ID
test=""
##STEP ONE
## IDEA OF THIS STEP IS TO CREATE A TRACKING ID FOR EACH LAB REQUEST
def patient_record :
print "+--------------------------------------------------+"
print " PATIENT DATA QUERY "
print "+--------------------------------------------------+"
print "****ENTER PATIENT NAME ****"
pname=raw_input(">")
print ""
print "*** ENTER PATIENT ID **"
pid=input(">")
print "* please enter the test to be be conducted *"
tests=raw_input(">")
##adding patient to database
patientlist[pname]="""patient id: %r/track id :%r"""
## NOTE TRACKING ID IS REPORT GENERATED ID ,IE WHAT WOULD BE REFERRED TO , TO FIND THE REPORT
## ITS A COMBINATION OF PATIENT ID AND DATE .
now = datetime.datetime.now()
d=now.date()
## NEED TO CONVERT DATE OBJECT TO TYPE INT TO COMBINE WITH PID VARAIBLE
trackid=
##STEP TWO
print """
""""
##NEED MORE INFORMATION ABOUT THE SAMPLE TAKEN TO ANAYLSE
##STEP three
print "+----------------------------------------------------+"
print " TEST PROFILE
print "+----------------------------------------------------+"
fod=open("a.txt','w')
fod.write("*******GENERATED TEST SLIP*******")
fod.close()
print " "
while quit==1:
fod=open("a.txt","w")
print " to quit enter 1 at /n **quit > **below "
print "*** ENTER TEST NAME ***"
testname=raw_input(">")
print "*** ENTER RESULT """
testresult=raw_input(">")
fod.write(testname, testresult)
fod.write("\n")
print "ENTER 1 TO QUIT 2 TO ADD MORE TEST"
quit=input(">")
print "+---------------------------------------------------+"
print " GENERATOR PATIENT REPORT AND TRACKING ID "
print "+---------------------------------------------------+"
##REPORT
print """
PATIENT NAME : %r PATIENT ID : %r
TRACK ID : %r
----------------------------------------------------
SAMPLES TAKEN
----------------------------------------------------
BLOOD SAMPLE:
Amount : &r
sample label : &r
operation performed :% r
URINE SAMPLE:
amount : $r
sample label : %r
operation performed :%r
MORE SPECIFIC TEST HERE **
....
......
....
--------------
TEST CONDUCTED
--------------
GENERATING RESULT HERE
%r
""" %(pname,pid,testresults,bamt,bid,bpf,uamt,uid,upf)