Exemple #1
0
        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);
        }
Exemple #2
0
        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);
        }