public PatientRecord(PatientInfo patient) { HealthCardNumber = patient.HCN.ToString(); LastName = patient.LastName; FirstName = patient.FirstName; MiddleInitial = patient.MInitial; try { DateTime dob = DateTime.Parse(patient.DateBirth); DateOfBirth = dob; } catch (Exception ex) { DateOfBirth = DateTime.MaxValue; } Sex = patient.Sex; HeadOfHousehold = patient.HeadOfHouse.ToString(); // Get the phone number string[] split = patient.splitPhoneNum(); AreaCode = split[0]; PhoneNumber = split[1]; // Get the address info Address = new AddressRecord(); Address.HouseNumber = patient.PatientAdress.HouseNumber; Address.StreetName = patient.PatientAdress.StreetName; Address.StreetSuffix = patient.PatientAdress.AddressSuffix; Address.AddressLine2 = patient.PatientAdress.AddressLine2; Address.City = patient.PatientAdress.City; Address.Province = patient.PatientAdress.StateProvince; }
public PatientRecord() { HealthCardNumber = ""; LastName = ""; FirstName = ""; MiddleInitial = '\0'; DateOfBirth = DateTime.MaxValue; Sex = '\0'; HeadOfHousehold = ""; AreaCode = ""; PhoneNumber = ""; Address = new AddressRecord(); }