113 lines
4.0 KiB
Plaintext
113 lines
4.0 KiB
Plaintext
<MudStack class="pb-20 font-iranyekan">
|
|
<BasePartDivider Index="5" Title="تاریخچه بیماری های خانوادگی ( FH )" />
|
|
|
|
@foreach (var item in FamilyHistories)
|
|
{
|
|
<MedicalHistoryQuestionTemplateItemTemplate Question="item" QuestionRemoved="RemoveFamilyHistory" />
|
|
}
|
|
|
|
<MudSelect @bind-Value="@_familyHistoryQuestionType" T="MedicalHistoryQuestionType" Label="نوع سوال" Variant="Variant.Outlined">
|
|
|
|
<MudSelectItem Value="@MedicalHistoryQuestionType.Hourly" />
|
|
<MudSelectItem Value="@MedicalHistoryQuestionType.Interrogatively" />
|
|
<MudSelectItem Value="@MedicalHistoryQuestionType.YesOrNo" />
|
|
</MudSelect>
|
|
<MudTextField @bind-Value="@_familyHistoryQuestionTitle" Margin="Margin.None" T="string" Label="عنوان سوال" Lines="1"
|
|
Variant="Variant.Outlined" />
|
|
|
|
<MudButton @onclick="AddFamilyHistory" Variant="Variant.Filled" IconSize="Size.Large" DisableElevation="true"
|
|
class="font-extrabold text-lg rounded-md py-4 bg-[--color-medicalhistory] text-gray-800">
|
|
+ افزودن
|
|
</MudButton>
|
|
|
|
|
|
<BasePartDivider Index="6" class="mt-9" Title="داروهای مصرفی ( DH )" />
|
|
|
|
<div class="grid mx-1 gap-2 grid-cols-2 md:grid-cols-4">
|
|
@foreach (var item in DrugHistories)
|
|
{
|
|
<MudCard @onclick="()=>RemoveDrugHistory(item)" class="text-center">
|
|
<MudCardContent>
|
|
<p class="font-extrabold text-gray-600 text-md">@item</p>
|
|
</MudCardContent>
|
|
</MudCard>
|
|
}
|
|
</div>
|
|
|
|
<div class="flex flex-row">
|
|
<MudTextField @bind-Value="@_drugHistoryName" class="grow" T="string" Label="نام دارو مورد نظر" Variant="Variant.Outlined" />
|
|
|
|
<MudButton Variant="Variant.Outlined" @onclick="AddDrugHistory" Color="Color.Info" IconSize="Size.Large" DisableElevation="false" class="mx-2 mt-1.5 mb-0.5 pt-2 text-4xl rounded-md">
|
|
+
|
|
</MudButton>
|
|
</div>
|
|
|
|
<BasePartDivider Index="7" class="mt-9" Title="مواد مصرفی ( HH )" />
|
|
|
|
<div class="grid mx-1 gap-2 grid-cols-2 md:grid-cols-4">
|
|
@foreach (var item in HHMedicines)
|
|
{
|
|
<MudCard @onclick="()=>RemoveHHMedicine(item)" class="text-center">
|
|
<MudCardContent>
|
|
<p class="font-extrabold text-gray-600 text-md">@item</p>
|
|
</MudCardContent>
|
|
</MudCard>
|
|
}
|
|
</div>
|
|
|
|
<div class="flex flex-row">
|
|
<MudTextField @bind-Value="@_hhName" class="grow" T="string" Label="نام دارو مورد نظر" Variant="Variant.Outlined" />
|
|
|
|
<MudButton Variant="Variant.Outlined" @onclick="AddHHMedicine" Color="Color.Info" IconSize="Size.Large" DisableElevation="false" class="mx-2 mt-1.5 mb-0.5 pt-2 text-4xl rounded-md">
|
|
+
|
|
</MudButton>
|
|
</div>
|
|
|
|
|
|
|
|
</MudStack>
|
|
@code {
|
|
private string _familyHistoryQuestionTitle = string.Empty;
|
|
private MedicalHistoryQuestionType _familyHistoryQuestionType;
|
|
|
|
public List<MedicalHistoryQuestion> FamilyHistories { get; set; } = new();
|
|
|
|
private void RemoveFamilyHistory(MedicalHistoryQuestion question)
|
|
{
|
|
FamilyHistories.Remove(question);
|
|
}
|
|
private void AddFamilyHistory()
|
|
{
|
|
FamilyHistories.Add(new MedicalHistoryQuestion
|
|
{
|
|
Title = _familyHistoryQuestionTitle,
|
|
Type = _familyHistoryQuestionType
|
|
});
|
|
}
|
|
|
|
|
|
private string _drugHistoryName = string.Empty;
|
|
public List<string> DrugHistories { get; set; } = new();
|
|
private void RemoveDrugHistory(string medicine)
|
|
{
|
|
DrugHistories.Remove(medicine);
|
|
}
|
|
private void AddDrugHistory()
|
|
{
|
|
DrugHistories.Add(_drugHistoryName);
|
|
_drugHistoryName = string.Empty;
|
|
}
|
|
|
|
|
|
private string _hhName = string.Empty;
|
|
public List<string> HHMedicines { get; set; } = new();
|
|
private void RemoveHHMedicine(string medicine)
|
|
{
|
|
HHMedicines.Remove(medicine);
|
|
}
|
|
private void AddHHMedicine()
|
|
{
|
|
HHMedicines.Add(_hhName);
|
|
_hhName = string.Empty;
|
|
}
|
|
} |