Api-PWA/DocuMed.PWA/Pages/MedicalHistoryTemplateActio.../MedicalHistoryTemplateActio...

106 lines
4.5 KiB
Plaintext

<MudStack class="pb-20 font-iranyekan">
<BasePartDivider Index="8" Title="ظاهر کلی بیمار ( GA )" />
<div class="grid mx-1 gap-2 grid-cols-1 md:grid-cols-2">
@foreach (var item in GeneralAppearances)
{
<MudCard @onclick="()=>RemoveGeneralAppearance(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="@_generalAppearance" class="grow" T="string" Label="نام دارو مورد نظر" Variant="Variant.Outlined" />
<MudButton Variant="Variant.Outlined" @onclick="AddGeneralAppearance" 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 class="mt-9" Index="9" Title="مرور سیستماتیک ( ROS )" />
@foreach (var item in ReviewOfSystems)
{
<MudPaper class="px-3 py-2 mx-1">
<div class="flex flex-row">
<div>
<p>@item.Title</p>
<div class="flex flex-row">
<MudPaper Elevation="0" Class="mx-1 mt-1 bg-gray-200 w-fit text-center rounded-full py-0.5 px-3 text-gray-800 text-xs">
@item.System
</MudPaper>
@if(@item.IsSign)
{
<MudPaper Elevation="0" Class="mx-1 mt-1 bg-gray-200 w-fit text-center rounded-full py-0.5 px-3 text-gray-800 text-xs">
Sign
</MudPaper>
}
@if (@item.IsSymptom)
{
<MudPaper Elevation="0" Class="mx-1 mt-1 bg-gray-200 w-fit text-center rounded-full py-0.5 px-3 text-gray-800 text-xs">
Symptom
</MudPaper>
}
</div>
</div>
<MudIconButton @onclick="()=>RemoveReviewOfSystems(item)" class="mr-auto" Color="Color.Error" Icon="@Icons.Material.Filled.Close" />
</div>
</MudPaper>
}
<MudTextField @bind-Value="@_reviewOfSystemTitle" class="grow" T="string" Label="علامت مورد نظر" Variant="Variant.Outlined" />
<MudTextField @bind-Value="@_reviewOfSystemSystem" class="grow" T="string" Label="سیستم مورد نظر" Variant="Variant.Outlined" />
<div class="flex flex-row">
<MudCheckBox @bind-Checked="@_reviewOfSystemIsSign" Color="Color.Primary" UnCheckedColor="Color.Default" Size="Size.Large" T="bool"
class="my-auto" Label="Sign"></MudCheckBox>
<MudCheckBox @bind-Checked="@_reviewOfSystemIsSymptom" Color="Color.Primary" UnCheckedColor="Color.Default" Size="Size.Large" T="bool"
class="my-auto" Label="Symptom"></MudCheckBox>
<MudButton @onclick="AddReviewOfSystems" Variant="Variant.Outlined" Color="Color.Info" IconSize="Size.Large" DisableElevation="false"
class="mr-auto mt-1.5 mb-0.5 pt-2 text-4xl rounded-md">
+
</MudButton>
</div>
</MudStack>
@code {
private string _generalAppearance = string.Empty;
public List<string> GeneralAppearances { get; set; } = new();
private void RemoveGeneralAppearance(string medicine)
{
GeneralAppearances.Remove(medicine);
}
private void AddGeneralAppearance()
{
GeneralAppearances.Add(_generalAppearance);
_generalAppearance = string.Empty;
}
private string _reviewOfSystemTitle = string.Empty;
private string _reviewOfSystemSystem = string.Empty;
private bool _reviewOfSystemIsSign;
private bool _reviewOfSystemIsSymptom;
public List<MedicalHistorySystemReview> ReviewOfSystems { get; set; } = new();
private void RemoveReviewOfSystems(MedicalHistorySystemReview review)
{
ReviewOfSystems.Remove(review);
}
private void AddReviewOfSystems()
{
ReviewOfSystems.Add(new MedicalHistorySystemReview
{
Title = _reviewOfSystemTitle,
IsSign = _reviewOfSystemIsSign,
IsSymptom = _reviewOfSystemIsSymptom,
System = _reviewOfSystemSystem
});
_reviewOfSystemTitle = string.Empty;
}
}