@using DocuMed.Domain.Entities.MedicalHistoryTemplate @foreach (var item in FamilyHistories) { } + افزودن
@foreach (var item in DrugHistories) {

@item.Question

}
+
@foreach (var item in AhMedicines) {

@item.Question

}
+
@code { private string _familyHistoryQuestionTitle = string.Empty; private MedicalHistoryQuestionType _familyHistoryQuestionType; [Parameter] public List FamilyHistories { get; set; } = new(); private void RemoveFamilyHistory(MedicalHistoryQuestionSDto question) { FamilyHistories.Remove(question); } private void AddFamilyHistory() { FamilyHistories.Add(new MedicalHistoryQuestionSDto { Question = _familyHistoryQuestionTitle, QuestionType = _familyHistoryQuestionType, Part = MedicalHistoryPart.FamilyHistory }); _familyHistoryQuestionTitle = String.Empty; } private string _drugHistoryName = string.Empty; [Parameter] public List DrugHistories { get; set; } = new(); private void RemoveDrugHistory(MedicalHistoryQuestionSDto medicine) { DrugHistories.Remove(medicine); } private void AddDrugHistory() { DrugHistories.Add(new MedicalHistoryQuestionSDto { Question = _drugHistoryName, QuestionType = MedicalHistoryQuestionType.Selective, Part = MedicalHistoryPart.DrugHistory }); _drugHistoryName = string.Empty; } private string _hhName = string.Empty; [Parameter] public List AhMedicines { get; set; } = new(); private void RemoveHhMedicine(MedicalHistoryQuestionSDto medicine) { AhMedicines.Remove(medicine); } private void AddHhMedicine() { AhMedicines.Add(new MedicalHistoryQuestionSDto { Part = MedicalHistoryPart.AddictionHistory, Question = _hhName, QuestionType = MedicalHistoryQuestionType.Selective }); _hhName = string.Empty; } }