コード例 #1
0
        public bool ValidateAddPatienInfo(List <string> errors, PatientInformation patient)
        {
            bool isValid = true;

            if (!PatientValidation.ValidateFirstName(patient.firstname))
            {
                isValid = false;
                errors.Add("Error: Invalid First Name.");
            }
            if (!PatientValidation.ValidateLastName(patient.LastName))
            {
                isValid = false;
                errors.Add("Error: Invalid Last Name.");
            }
            if (!PatientValidation.ValidateHCN(patient.HCN))
            {
                isValid = false;
                errors.Add("Error: Invalid Health Card Number.");
            }
            if (!PatientValidation.ValidateMInitial(patient.MInitial))
            {
                isValid = false;
                errors.Add("Error: Invalid Middle Initial.");
            }
            if (!PatientValidation.ValidateDOB(patient.DOB))
            {
                isValid = false;
                errors.Add("Error: Invalid Birth Date.");
            }
            return(isValid);
        }
コード例 #2
0
 public PatientInformation(PatientInformation originalPatient)
 {
     HCN          = originalPatient.HCN;
     LastName     = originalPatient.LastName;
     FirstName    = originalPatient.FirstName;
     MInitial     = originalPatient.MInitial;
     DOB          = originalPatient.DOB;
     Gender       = originalPatient.Gender;
     HoH          = originalPatient.HoH;
     AddressLine1 = originalPatient.AddressLine1;
     AddressLine2 = originalPatient.AddressLine2;
     City         = originalPatient.City;
     PostalCode   = originalPatient.PostalCode;
     Prov         = originalPatient.Prov;
     Phone        = originalPatient.Phone;
 }