продолжение редактирования отчетов
This commit is contained in:
parent
b6904e72fb
commit
57d2d06843
@ -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()
|
||||
|
@ -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);
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user