private void CreateTeacherFromInputData() { _teacher.User.UserType = UserType.Teacher; _teacher.User.Account.Password = PasswordBoxPassword.Password; _teacher.User.Gender = GenderParser.ParseFromRadioButtonsToObject(ManRadioButton); _teacher.User.Account.Password = PasswordBoxPassword.Password; _teacher.RegistrationDate = DateTime.Now; }
private void ParseEligibilityModule(ref Study result) { XmlNode eligibilityModule = doc.SelectSingleNode("/FullStudiesResponse/FullStudyList/FullStudy/Struct/Struct[@Name='ProtocolSection']/Struct[@Name='EligibilityModule']"); result.Design.EligibilityText = ParseSingleNode(eligibilityModule, "./Field[@Name='EligibilityCriteria']"); result.Design.GenderType = GenderParser.Parse(ParseSingleNode(eligibilityModule, "./Field[@Name='Gender']")); result.Design.HasHealthyPatients = ParseSingleNode(eligibilityModule, "./Field[@Name='HealthyVolunteers']") == "Yes"; result.Design.MinAge = ParseSingleNode(eligibilityModule, "./Field[@Name='MinimumAge']"); result.Design.MaxAge = ParseSingleNode(eligibilityModule, "./Field[@Name='MaximunAge']"); }
private void CreateCoordinatorFromInputData() { Coordinator.User.Gender = GenderParser.ParseFromRadioButtonsToObject(ManRadioButton); int selectedTag = int.Parse(((ComboBoxItem)ComboBoxCoordinatorStatus.SelectedItem).Tag.ToString()); if (selectedTag == 0) { Coordinator.User.UserStatus = UserStatus.INACTIVE; } else { Coordinator.User.UserStatus = UserStatus.ACTIVE; } }
private PatientInfo ParsePatientInfo(DataRow row, int rowIndex) { bool hasAtLeastOneFieldsFilled = false; for (int i = 0; i <= 6; i++) { if (!DBNull.Value.Equals(row[i])) { hasAtLeastOneFieldsFilled = true; } } if (!hasAtLeastOneFieldsFilled) { return(null); } var patientNumber = ParseInt(row[0]) ?? rowIndex; var gender = GenderParser.Parse(ToSafeText(row[1])); var age = ParseAge(row[2]); var domicile = ToSafeText(row[3]); var infectionContact = ToSafeText(row[4]); var hospitalizationLocation = ToSafeText(row[5]); (bool isCured, string healthObservation) = ParseHealthSate(row[6]); return(new PatientInfo { PatientNumber = patientNumber, Gender = gender, Domicile = domicile, InfectionContact = infectionContact, InfectionSourceType = InfectionSourceParser.Parse(infectionContact), Age = age, HospitalizationLocation = hospitalizationLocation, HealthState = healthObservation, IsCured = isCured, Condition = ConditionParser.Parse(isCured, hospitalizationLocation) }); }
private PatientInfo ParsePatientInfo(DataRow row, int rowIndex) { bool hasAtLeastOneFieldsFilled = false; for (int i = 0; i <= 6; i++) { if (!DBNull.Value.Equals(row[i])) { hasAtLeastOneFieldsFilled = true; } } if (!hasAtLeastOneFieldsFilled) { return(null); } var patientNumber = ParseInt(row[0]) ?? rowIndex; var gender = GenderParser.Parse(TextNormalizer.ToSafeText(row[1])); var age = AgeParser.Parse(TextNormalizer.ToSafeText(row[2])); var domicile = TextNormalizer.ToSafeText(row[3]); var infectionContact = TextNormalizer.ToSafeText(row[4]); var confirmedOn = DateParser.Parse(TextNormalizer.ToSafeText(row[5])); return(new PatientInfo { PatientNumber = patientNumber, Gender = gender, Domicile = domicile.ToUpper(), InfectionContact = infectionContact, InfectionSourceType = InfectionSourceParser.Parse(infectionContact), Age = age, ConfirmedOn = confirmedOn }); }
private void CreateCoordinatorFromInputData() { Coordinator.User.UserType = UserType.Coordinator; Coordinator.User.Account.Password = PasswordBoxPassword.Password; Coordinator.User.Gender = GenderParser.ParseFromRadioButtonsToObject(ManRadioButton); }
internal void GenderParse(ExtractFileInfo fileInfo) { GenderParser sectionParser = new GenderParser(_log, fileInfo, IsPreservation, DatabasePreservationNoPrefix, Version); WriteTables(sectionParser); }
public CustomerController(ILogger <CustomerController> logger, BikeContext context) { _logger = logger; _context = context; genderParser = new GenderParser(); }
public void MapToGenderCorrectly(string genderInfo, Gender expectedMap) { GenderParser.Parse(genderInfo).ShouldBe(expectedMap); }