public static bool IsMBovisQuestionnaireComplete(MBovisDetails mBovisDetails) { return(mBovisDetails.ExposureToKnownCasesStatus.HasValue && mBovisDetails.UnpasteurisedMilkConsumptionStatus.HasValue && mBovisDetails.OccupationExposureStatus.HasValue && mBovisDetails.AnimalExposureStatus.HasValue); }
public static bool IsMbovis(DrugResistanceProfile profile, MBovisDetails mBovisDetails) { // If the lab results point to M. bovis species, or if some of the M. bovis questionnaire has already been filled in // This might occur with non-M. bovis lab results if the questionnaire was done in a legacy system and migrated in. return(string.Equals("M. bovis", profile.Species, StringComparison.InvariantCultureIgnoreCase) || mBovisDetails.DataEntered); }
protected override async Task <IActionResult> PrepareAndDisplayPageAsync(bool isBeingSubmitted) { if (!Notification.IsMBovis) { return(NotFound()); } MBovisDetails = Notification.MBovisDetails; await SetNotificationProperties(isBeingSubmitted, MBovisDetails); if (MBovisDetails.ShouldValidateFull) { TryValidateModel(MBovisDetails, nameof(MBovisDetails)); } return(Page()); }
public async Task UpdateMBovisDetailsAnimalExposureAsync(Notification notification, MBovisDetails mBovisDetails) { _context.SetValues(notification.MBovisDetails, new { mBovisDetails.HasAnimalExposure }); await _notificationRepository.SaveChangesAsync(); }
public async Task UpdateMBovisDetailsUnpasteurisedMilkConsumptionAsync(Notification notification, MBovisDetails mBovisDetails) { _context.SetValues(notification.MBovisDetails, new { mBovisDetails.HasUnpasteurisedMilkConsumption }); await _notificationRepository.SaveChangesAsync(); }