public async Task <ActionResult> AddExistingDiseaseHealthCard(AllDiseasesModel allDiseasesModel) { var disease = (await DiseaseFacade.GetDiseaseByNameAsync(allDiseasesModel.SelectedDisease)).First(); string identificationNum = await UpdateHealthCard(new HealthCardUpdateModel { DiseaseId = disease.Id }); return(RedirectToAction("PatientAskForGetInfoDoctor", "Patient", new { identificationNumber = identificationNum })); }
public async Task <ActionResult> AddExistingDiseaseHealthCard() { var queryResult = await DiseaseFacade.GetAllDiseasesAsync(); var diseases = queryResult.Items; var diseasesModel = new AllDiseasesModel { Diseases = diseases.Select(disease => disease.Name) }; return(View(diseasesModel)); }