Example
PatientDir = []
class Patient_Data(object):
def __init__(self,first_name,last_name,SSN,more,PatientDir):
self.fn = first_name
self.ln = last_name
self.ssn = SSN
self.more = more
self.pd = PatientDir
print("Patient Created with credentials: ",self.fn,",",self.ln)
def update(self):
PatientDir.append(self.pd)
def getit(self):
print("First Name: ",self.fn)
print("Last NameL ",self.ln)
print("SSN: ",self.ssn)
print("more fields:,",self.more)
patient00000005 = Patient_Data("Julie","Roberton",123121234,
"More fields will be here",PatientDir)
patient00000048 = Patient_Data("Andrew","Johnson",987989876,
"More fields will be here",PatientDir)
Now I was curious if I could save the two patients, in a list, then i wanted to see a dictionary just to see how it works. I want to see if I could access the data through the list or dictionary, when I assigned them to the list
print(PatientDir)
[[...], [...]]
, when I try to print the first position,
PatientDir[1]
[[...], [...]]
when I try to search in google I get no results. So I can't find the next step if there is a step, if you can do this? I like to try to figure things out myself but I can't find results... So what does it mean? How would I extract the information if I can? Lastly I of course would not make a program without encryption with medical data, or other sensitive data, just trying this out.