продолжение редактирования отчетов

This commit is contained in:
ValAnn 2024-05-01 10:52:24 +04:00
parent b6904e72fb
commit 57d2d06843
3 changed files with 31 additions and 5 deletions

View File

@ -32,9 +32,34 @@ namespace HospitalBusinessLogic.BusinessLogics
_diseaseStorage = diseaseStorage;
}
public List<ReportPatientViewModel> GetPatients(ReportBindingModel model)
public List<ReportPatientViewModel> GetPatients(ReportBindingModel model, PatientBindingModel patientModel)
{
throw new NotImplementedException();
var list = new List<ReportPatientViewModel>();
var patients = _patientStorage.GetFilteredList(new PatientSearchModel { DateFrom = model.DateFrom, DateTo = model.DateTo, Id = patientModel.Id });
foreach (var patient in patients)
{
var record = new ReportPatientViewModel
{
Id = patient.Id,
Medicines = new List<string>(),
Diseases = new List<string>()
};
var allRecipes = _recipeStorage.GetFullList();
var patientRecipes = new List<RecipeViewModel>();
foreach (var recipe in allRecipes)
{
if (recipe.Id == patient.Id)
{
record.Diseases.Add(_diseaseStorage.GetElement(new DiseaseSearchModel { Id = recipe.DiseaseId }).Description);
}
}
list.Add(record);
}
return list;
}
public List<ReportProcedureRecipeViewModel> GetProcedureRecipes()

View File

@ -11,7 +11,7 @@ namespace HospitalContracts.BusinessLogicContracts
public interface IDoctorReportLogic
{
List<ReportProcedureRecipeViewModel> GetProcedureRecipes();
List<ReportPatientViewModel> GetPatients(ReportBindingModel model);
List<ReportPatientViewModel> GetPatients(ReportBindingModel model, PatientBindingModel patientModel);
void SaveProcedureRecipesToWordFile(ReportBindingModel model);
void SaveProcedureRecipesToExcelFile(ReportBindingModel model);
void SavePatientsToPdfFile(ReportBindingModel model);

View File

@ -9,7 +9,8 @@ namespace HospitalContracts.ViewModels
public class ReportPatientViewModel
{
public int Id { get; set; }
public string MedicineName { get; set; } = string.Empty;
public List<string> Patients { get; set; } = new();
public string FIO { get; set; } = string.Empty;
public List<string> Medicines { get; set; } = new();
public List<string> Diseases { get; set; } = new();
}
}