2023-10-20 19:40:23 +03:30
|
|
|
|
@using DocuMed.Domain.Entities.MedicalHistoryTemplate
|
2023-10-10 17:02:38 +03:30
|
|
|
|
<MudStack class="pb-20 font-iranyekan">
|
|
|
|
|
|
<BasePartDivider Index="2" Title="تاریخچه بیماری فعلی ( PI )" />
|
|
|
|
|
|
|
|
|
|
|
|
<MudAlert Severity="Severity.Info">شما میتوانید سوال های هر بخش ها را به صورت کامل تنظیم نمایید</MudAlert>
|
|
|
|
|
|
|
2023-10-24 10:43:48 +03:30
|
|
|
|
@foreach (var item in PiQuestions)
|
2023-10-10 17:02:38 +03:30
|
|
|
|
{
|
2023-10-22 15:51:11 +03:30
|
|
|
|
<MedicalHistoryQuestionTemplateItemTemplate Question="@item" QuestionRemoved="RemoveQuestion" />
|
2023-10-10 17:02:38 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
2023-10-22 15:51:11 +03:30
|
|
|
|
<MudSelect @bind-Value="@_questionType" T="MedicalHistoryQuestionType" ToStringFunc="(e=>e.ToDisplay())" Label="نوع سوال" Variant="Variant.Outlined">
|
2023-10-10 17:02:38 +03:30
|
|
|
|
|
|
|
|
|
|
<MudSelectItem Value="@MedicalHistoryQuestionType.Hourly" />
|
|
|
|
|
|
<MudSelectItem Value="@MedicalHistoryQuestionType.Interrogatively" />
|
|
|
|
|
|
<MudSelectItem Value="@MedicalHistoryQuestionType.YesOrNo" />
|
|
|
|
|
|
</MudSelect>
|
|
|
|
|
|
<MudTextField @bind-Value="@_questionTitle" Margin="Margin.None" T="string" Label="عنوان سوال" Lines="1"
|
2023-10-22 15:51:11 +03:30
|
|
|
|
Variant="Variant.Outlined" />
|
2023-10-10 17:02:38 +03:30
|
|
|
|
|
2023-10-22 15:51:11 +03:30
|
|
|
|
@* <MudAutocomplete T="string" Label="وابستگی به سوال قبلی" Variant="Variant.Outlined" /> *@
|
|
|
|
|
|
|
|
|
|
|
|
<MudButton @onclick="AddQuestion" Variant="Variant.Filled" DisableElevation="true"
|
|
|
|
|
|
class="font-extrabold text-lg right-0 rounded-md py-3 bg-[--color-medicalhistory] text-gray-800">
|
2023-10-10 17:02:38 +03:30
|
|
|
|
+ افزودن
|
|
|
|
|
|
</MudButton>
|
|
|
|
|
|
|
|
|
|
|
|
</MudStack>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@code
|
|
|
|
|
|
{
|
|
|
|
|
|
private MedicalHistoryQuestionType _questionType;
|
|
|
|
|
|
private string _questionTitle = string.Empty;
|
2023-10-22 15:51:11 +03:30
|
|
|
|
private MedicalHistoryPart _questionPart = MedicalHistoryPart.PresentIllness;
|
2023-10-10 17:02:38 +03:30
|
|
|
|
|
2023-10-24 10:43:48 +03:30
|
|
|
|
[Parameter]
|
|
|
|
|
|
public List<MedicalHistoryQuestionSDto> PiQuestions { get; set; } = new();
|
2023-10-10 17:02:38 +03:30
|
|
|
|
|
2023-10-24 10:43:48 +03:30
|
|
|
|
private void RemoveQuestion(MedicalHistoryQuestionSDto question)
|
2023-10-10 17:02:38 +03:30
|
|
|
|
{
|
2023-10-24 10:43:48 +03:30
|
|
|
|
PiQuestions.Remove(question);
|
2023-10-10 17:02:38 +03:30
|
|
|
|
}
|
|
|
|
|
|
private void AddQuestion()
|
|
|
|
|
|
{
|
2023-10-24 10:43:48 +03:30
|
|
|
|
PiQuestions.Add(new MedicalHistoryQuestionSDto
|
|
|
|
|
|
{
|
|
|
|
|
|
Part = _questionPart,
|
|
|
|
|
|
Question = _questionTitle,
|
|
|
|
|
|
QuestionType = _questionType
|
|
|
|
|
|
});
|
|
|
|
|
|
_questionTitle = string.Empty;
|
2023-10-10 17:02:38 +03:30
|
|
|
|
}
|
|
|
|
|
|
}
|