public async Task<DosCheckCapacitySummaryRequest> BuildCheckCapacitySummaryRequest( OutcomeViewModel outcomeViewModel, Surgery surgery) { var model = _mappingEngine.Map<DosViewModel>(outcomeViewModel); var dosCase = _mappingEngine.Map<OutcomeViewModel, DosCase>(outcomeViewModel); dosCase.Surgery = surgery.SurgeryId; return new DosCheckCapacitySummaryRequest(_configuration.DosUsername, _configuration.DosPassword, dosCase); }
private async Task<Surgery> GetSelectedSurgery(DosViewModel model) { var surgery = new Surgery(); if (!string.IsNullOrEmpty(model.SelectedSurgery)) surgery = JsonConvert.DeserializeObject<Surgery>( await _restfulHelper.GetAsync(string.Format(_configuration.GPSearchApiUrl, model.SelectedSurgery))); else surgery.SurgeryId = "UKN"; return surgery; }