-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTable_last_ids.py
More file actions
37 lines (31 loc) · 1.55 KB
/
Copy pathTable_last_ids.py
File metadata and controls
37 lines (31 loc) · 1.55 KB
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
class Table_last_ids():
def __init__(self,filename):
self.filename=filename
def load(self):
with open(self.filename,"r") as f:
line=f.readline()
ids=line.split(",")
self.last_caresite_id=int(ids[0])
self.last_person_id = int(ids[1])
self.last_visitoccurrence_id = int(ids[2])
self.last_conditionoccurrence_id = int(ids[3])
self.last_observation_id = int(ids[4])
self.last_death_id = int(ids[5])
self.last_sequencing_id = int(ids[6])
self.last_variantoccurrence_id = int(ids[7])
self.last_procedureoccurrence_id = int(ids[8])
self.last_drugexposure_id = int(ids[9])
self.last_measurement_id = int(ids[10])
def save(self):
with open(self.filename,"w") as f_out:
f_out.write('{0},'.format(self.last_caresite_id))
f_out.write('{0},'.format(self.last_person_id))
f_out.write('{0},'.format(self.last_visitoccurrence_id))
f_out.write('{0},'.format(self.last_conditionoccurrence_id))
f_out.write('{0},'.format(self.last_observation_id))
f_out.write('{0},'.format(self.last_death_id))
f_out.write('{0},'.format(self.last_sequencing_id))
f_out.write('{0},'.format(self.last_variantoccurrence_id))
f_out.write('{0},'.format(self.last_procedureoccurrence_id))
f_out.write('{0},'.format(self.last_drugexposure_id))
f_out.write('{0}'.format(self.last_measurement_id))