Patient Class implementation in Python | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Patient Class implementation in Python

Am trying to implement a patient class in python. The class has the following properties: -first name of the patient -last name of the patient -year of birth of the patient -unique ID number of the patient -patient email address -patient phone number The class should be able to printout/display each of the mentioned properties above. The patient class will have to inherit from a generic person class. I have to determine which of one of the properties stated above should be declared within the person class and which ones should be specifically declared within the patient class. Am a novice and trying to learn these things on my own. Can someone help?

21st Jul 2018, 8:09 AM
Symon
Symon - avatar
1 Answer
+ 9
Seems like the person class should naturally include the name, surname and yob (inherently linked to a person), while the contact details and id should only be in the patients class (those are being assigned by the clinic/outpatient office).
21st Jul 2018, 9:00 AM
Kuba Siekierzyński
Kuba Siekierzyński - avatar