public static bool HOHCheck(HealthCard newHCN, String newLastName, String newFirstName, String newDateBirth, char newSex, HealthCard newHeadOfHouse, char newMInitial) { bool allValid = false; if (newHCN.validateNumber(newHCN.ToString())) { if (ValidatePatient.validateLastName(newLastName)) { if (ValidatePatient.validateFirstName(newFirstName)) { if (ValidatePatient.validateDateBirth(newDateBirth)) { if (ValidatePatient.validateSex(newSex)) { if (ValidatePatient.validateHeadOfHouse(newHeadOfHouse)) { if ((newMInitial == '\0') || (ValidatePatient.validateMInitial(newMInitial))) { allValid = true; } } } } } } } return(allValid); }
/// \method validateHeadOfHouse /// ///Confirms that headOfHouse is a valid value to be entered into the Demographics database public static bool validateHeadOfHouse(HealthCard newHOH)////////////////////////////////////////////////////////////////////////////////// { bool retCode = false; string newHOHStr = newHOH.ToString(); retCode = false; return(retCode); }
/// \method ToString /// /// \param void /// /// \return void /// ///This method Converts the object to a formatted string for the database to read public override String ToString() { string hohPlaceholderValue = ""; string hohPlaceholderKey = ""; if (headOfHouse != null && !headOfHouse.ToString().Equals("")) { hohPlaceholderValue = headOfHouse.ToString() + " "; hohPlaceholderKey = "headOfHouse "; } String PersonInfoString = "`" + hcn.ToString() + "` `" + lastName + "` `" + firstName + "` `" + mInitial + "` `" + dateBirth + "` `" + sex + "` `" + hohPlaceholderValue + "` `" + patientAdress.AddressLine1 + "` `" + patientAdress.AddressLine2 + "` `" + patientAdress.City + "` `" + patientAdress.StateProvince + "` `" + numPhone + "` | `HCN` `lastName` `firstName` `mInitial` `dateBirth` `sex` `headOfHouse" + "` `addressLine1` `addressLine2` `city` `province` `numPhone`"; return(PersonInfoString); }
public static bool noHOHCheck(HealthCard newHCN, String newLastName, String newFirstName, String newDateBirth, char newSex, String newAddressLine1, String newAddressLine2, String newCity, String newProvince, String newNumPhone, char newMInitial) { bool allValid = false; if (newHCN.validateNumber(newHCN.ToString())) { if (ValidatePatient.validateLastName(newLastName)) { if (ValidatePatient.validateFirstName(newFirstName)) { if (ValidatePatient.validateDateBirth(newDateBirth)) { if (ValidatePatient.validateSex(newSex)) { if (ValidatePatient.validateAddressLine1(newAddressLine1)) { if ((newAddressLine2 == "") || (ValidatePatient.validateAddressLine2(newAddressLine2))) { if (ValidatePatient.validateCity(newCity)) { if ((newProvince == null) || (newProvince == "")) { newProvince = "ON"; } if (ValidatePatient.validateProvince(newProvince)) { if (ValidatePatient.validateNumPhone(newNumPhone)) { if ((newMInitial == '\0') || (ValidatePatient.validateMInitial(newMInitial))) { allValid = true; } } } } } } } } } } } return(allValid); }
/// \method search /// /// \param HealthCard searchPatient /// /// \return foundPatient - All patients information /// ///This method takes a object of PatientInfo and searches for it in the patient database public List <PatientInfo> search(HealthCard searchPatient) { //bool found = false; List <PatientRecord> foundPatients = DAL.GetRecords(PatientRecordsAccessor.GETREQUEST.HEALTH_CARD_NUMBER, searchPatient.ToString()); List <PatientInfo> patientInfoList = new List <PatientInfo>(); foreach (PatientRecord record in foundPatients) { patientInfoList.Add(record.GetPatientInfo()); } return(patientInfoList); }