From d1150647533ff60d0d0e8988fe31e44815bef68c Mon Sep 17 00:00:00 2001 From: "Amir.H Khademi" Date: Tue, 28 Nov 2023 14:18:00 +0330 Subject: [PATCH] add version 1.3.2.1 add PublicPrintingPage , add code to medical history --- .version | 2 +- DocuMed.Api/DocuMed.Api.csproj | 4 +- DocuMed.Common/Extensions/StringExtensions.cs | 11 +- .../Dtos/LargDtos/MedicalHistoryLDto.cs | 1 + .../Dtos/SmallDtos/MedicalHistorySDto.cs | 1 + .../MedicalHistory.Aggregate.cs | 8 +- .../Entities/MedicalHistory/MedicalHistory.cs | 3 + .../Mappers/MedicalHistoryMapper.g.cs | 12 + DocuMed.PWA/DocuMed.PWA.csproj | 4 +- .../MedicalHistoryTemplateActionStep1.razor | 3 +- DocuMed.PWA/Pages/MedicalOrdersPage.razor | 2 +- DocuMed.PWA/Pages/PublicPrintingPage.razor | 229 +++++ .../MedicalHistoryItemTemplate.razor | 13 +- DocuMed.PWA/wwwroot/css/app.min.css | 173 ++++ DocuMed.PWA/wwwroot/css/app.output.css | 205 +++++ .../20231128085153_editMHAddCode.Designer.cs | 871 ++++++++++++++++++ .../20231128085153_editMHAddCode.cs | 31 + .../ApplicationContextModelSnapshot.cs | 4 + 18 files changed, 1562 insertions(+), 15 deletions(-) create mode 100644 DocuMed.PWA/Pages/PublicPrintingPage.razor create mode 100644 DocuMed.Repository/Migrations/20231128085153_editMHAddCode.Designer.cs create mode 100644 DocuMed.Repository/Migrations/20231128085153_editMHAddCode.cs diff --git a/.version b/.version index a334e79..4e31daf 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -1.3.1.1 \ No newline at end of file +1.3.2.1 \ No newline at end of file diff --git a/DocuMed.Api/DocuMed.Api.csproj b/DocuMed.Api/DocuMed.Api.csproj index 2eede13..62750c1 100644 --- a/DocuMed.Api/DocuMed.Api.csproj +++ b/DocuMed.Api/DocuMed.Api.csproj @@ -6,8 +6,8 @@ enable Linux ..\docker-compose.dcproj - 1.3.1.1 - 1.3.1.1 + 1.3.2.1 + 1.3.2.1 diff --git a/DocuMed.Common/Extensions/StringExtensions.cs b/DocuMed.Common/Extensions/StringExtensions.cs index d935650..e3af46d 100644 --- a/DocuMed.Common/Extensions/StringExtensions.cs +++ b/DocuMed.Common/Extensions/StringExtensions.cs @@ -1,4 +1,6 @@ -namespace DocuMed.Common.Extensions +using System.Numerics; + +namespace DocuMed.Common.Extensions { public static class StringExtensions { @@ -121,6 +123,13 @@ return Guid.NewGuid().ToString("N").Substring(0, length); } + public static string GetIntId(int length = 8) + { + var random = new Random(DateTime.Now.Millisecond); + var rand = random.Next(0, (int)Math.Pow(10,length)); + return rand.ToString(); + } + public static string ConvertTo3Digit(this string str) { str = string.Concat(str.Split(',')); diff --git a/DocuMed.Domain/Dtos/LargDtos/MedicalHistoryLDto.cs b/DocuMed.Domain/Dtos/LargDtos/MedicalHistoryLDto.cs index 099379b..c61f80a 100644 --- a/DocuMed.Domain/Dtos/LargDtos/MedicalHistoryLDto.cs +++ b/DocuMed.Domain/Dtos/LargDtos/MedicalHistoryLDto.cs @@ -11,6 +11,7 @@ public class MedicalHistoryLDto : BaseDto public string NationalId { get; set; } = string.Empty; public int Age { get; set; } = 30; public DateTime BirthDate { get; set; } + public string Code { get; set; } = string.Empty; public SectionSDto Section { get; set; } = new(); diff --git a/DocuMed.Domain/Dtos/SmallDtos/MedicalHistorySDto.cs b/DocuMed.Domain/Dtos/SmallDtos/MedicalHistorySDto.cs index 7b8e232..aa1faf3 100644 --- a/DocuMed.Domain/Dtos/SmallDtos/MedicalHistorySDto.cs +++ b/DocuMed.Domain/Dtos/SmallDtos/MedicalHistorySDto.cs @@ -13,6 +13,7 @@ public class MedicalHistorySDto : BaseDto public Guid MedicalHistoryTemplateId { get; set; } public int Age { get; set; } public DateTime BirthDate { get; set; } + public string Code { get; set; } = string.Empty; public string PresentIllnessDetail { get; set; } = string.Empty; public string PastDiseasesHistoryDetail { get; set; } = string.Empty; diff --git a/DocuMed.Domain/Entities/MedicalHistory/MedicalHistory.Aggregate.cs b/DocuMed.Domain/Entities/MedicalHistory/MedicalHistory.Aggregate.cs index f5c3b03..f58b6cb 100644 --- a/DocuMed.Domain/Entities/MedicalHistory/MedicalHistory.Aggregate.cs +++ b/DocuMed.Domain/Entities/MedicalHistory/MedicalHistory.Aggregate.cs @@ -1,4 +1,6 @@ -namespace DocuMed.Domain.Entities.MedicalHistory; +using DocuMed.Common.Extensions; + +namespace DocuMed.Domain.Entities.MedicalHistory; public partial class MedicalHistoryAnswer @@ -48,6 +50,7 @@ public partial class MedicalHistory Guid applicationUserId, Guid medicalHistoryTemplateId) { + var code = StringExtensions.GetIntId(6); return new MedicalHistory(presentIllnessDetail, pastDiseasesHistoryDetail, pastSurgeryHistoryDetail, @@ -70,7 +73,8 @@ public partial class MedicalHistory diastolicBloodPressure, pulseRate, sPO2, - temperature, + temperature, + code, applicationUserId, medicalHistoryTemplateId); } diff --git a/DocuMed.Domain/Entities/MedicalHistory/MedicalHistory.cs b/DocuMed.Domain/Entities/MedicalHistory/MedicalHistory.cs index 6ce9624..a43d9ee 100644 --- a/DocuMed.Domain/Entities/MedicalHistory/MedicalHistory.cs +++ b/DocuMed.Domain/Entities/MedicalHistory/MedicalHistory.cs @@ -34,6 +34,7 @@ public partial class MedicalHistory : ApiEntity double pulseRate, double spo2, double temperature, + string code, Guid applicationUserId, Guid medicalHistoryTemplateId) { @@ -60,6 +61,7 @@ public partial class MedicalHistory : ApiEntity PulseRate = pulseRate; SPO2 = spo2; Temperature = temperature; + Code = code; ApplicationUserId = applicationUserId; MedicalHistoryTemplateId = medicalHistoryTemplateId; } @@ -85,6 +87,7 @@ public partial class MedicalHistory : ApiEntity public string VitalSignDetail { get; internal set; } = string.Empty; public string GeneralAppearanceDetail { get; internal set; } = string.Empty; + public string Code { get; internal set; } = string.Empty; public double SystolicBloodPressure { get; internal set; } public double DiastolicBloodPressure { get; internal set; } diff --git a/DocuMed.Domain/Mappers/MedicalHistoryMapper.g.cs b/DocuMed.Domain/Mappers/MedicalHistoryMapper.g.cs index 9d929a3..79ac1af 100644 --- a/DocuMed.Domain/Mappers/MedicalHistoryMapper.g.cs +++ b/DocuMed.Domain/Mappers/MedicalHistoryMapper.g.cs @@ -40,6 +40,7 @@ namespace DocuMed.Domain.Mappers SystemReviewDetail = p1.SystemReviewDetail, VitalSignDetail = p1.VitalSignDetail, GeneralAppearanceDetail = p1.GeneralAppearanceDetail, + Code = p1.Code, SystolicBloodPressure = p1.SystolicBloodPressure, DiastolicBloodPressure = p1.DiastolicBloodPressure, PulseRate = p1.PulseRate, @@ -79,6 +80,7 @@ namespace DocuMed.Domain.Mappers result.SystemReviewDetail = p2.SystemReviewDetail; result.VitalSignDetail = p2.VitalSignDetail; result.GeneralAppearanceDetail = p2.GeneralAppearanceDetail; + result.Code = p2.Code; result.SystolicBloodPressure = p2.SystolicBloodPressure; result.DiastolicBloodPressure = p2.DiastolicBloodPressure; result.PulseRate = p2.PulseRate; @@ -117,6 +119,7 @@ namespace DocuMed.Domain.Mappers SystemReviewDetail = p8.SystemReviewDetail, VitalSignDetail = p8.VitalSignDetail, GeneralAppearanceDetail = p8.GeneralAppearanceDetail, + Code = p8.Code, SystolicBloodPressure = p8.SystolicBloodPressure, DiastolicBloodPressure = p8.DiastolicBloodPressure, PulseRate = p8.PulseRate, @@ -142,6 +145,7 @@ namespace DocuMed.Domain.Mappers MedicalHistoryTemplateId = p9.MedicalHistoryTemplateId, Age = p9.Age, BirthDate = p9.BirthDate, + Code = p9.Code, PresentIllnessDetail = p9.PresentIllnessDetail, PastDiseasesHistoryDetail = p9.PastDiseasesHistoryDetail, PastSurgeryHistoryDetail = p9.PastSurgeryHistoryDetail, @@ -180,6 +184,7 @@ namespace DocuMed.Domain.Mappers result.MedicalHistoryTemplateId = p10.MedicalHistoryTemplateId; result.Age = p10.Age; result.BirthDate = p10.BirthDate; + result.Code = p10.Code; result.PresentIllnessDetail = p10.PresentIllnessDetail; result.PastDiseasesHistoryDetail = p10.PastDiseasesHistoryDetail; result.PastSurgeryHistoryDetail = p10.PastSurgeryHistoryDetail; @@ -213,6 +218,7 @@ namespace DocuMed.Domain.Mappers MedicalHistoryTemplateId = p12.MedicalHistoryTemplateId, Age = p12.Age, BirthDate = p12.BirthDate, + Code = p12.Code, PresentIllnessDetail = p12.PresentIllnessDetail, PastDiseasesHistoryDetail = p12.PastDiseasesHistoryDetail, PastSurgeryHistoryDetail = p12.PastSurgeryHistoryDetail, @@ -261,6 +267,7 @@ namespace DocuMed.Domain.Mappers SystemReviewDetail = p13.SystemReviewDetail, VitalSignDetail = p13.VitalSignDetail, GeneralAppearanceDetail = p13.GeneralAppearanceDetail, + Code = p13.Code, SystolicBloodPressure = p13.SystolicBloodPressure, DiastolicBloodPressure = p13.DiastolicBloodPressure, PulseRate = p13.PulseRate, @@ -300,6 +307,7 @@ namespace DocuMed.Domain.Mappers result.SystemReviewDetail = p15.SystemReviewDetail; result.VitalSignDetail = p15.VitalSignDetail; result.GeneralAppearanceDetail = p15.GeneralAppearanceDetail; + result.Code = p15.Code; result.SystolicBloodPressure = p15.SystolicBloodPressure; result.DiastolicBloodPressure = p15.DiastolicBloodPressure; result.PulseRate = p15.PulseRate; @@ -340,6 +348,7 @@ namespace DocuMed.Domain.Mappers SystemReviewDetail = p21.SystemReviewDetail, VitalSignDetail = p21.VitalSignDetail, GeneralAppearanceDetail = p21.GeneralAppearanceDetail, + Code = p21.Code, SystolicBloodPressure = p21.SystolicBloodPressure, DiastolicBloodPressure = p21.DiastolicBloodPressure, PulseRate = p21.PulseRate, @@ -371,6 +380,7 @@ namespace DocuMed.Domain.Mappers NationalId = p23.NationalId, Age = p23.Age, BirthDate = p23.BirthDate, + Code = p23.Code, Section = p23.Section == null ? null : new SectionSDto() { Name = p23.Section.Name, @@ -416,6 +426,7 @@ namespace DocuMed.Domain.Mappers result.NationalId = p25.NationalId; result.Age = p25.Age; result.BirthDate = p25.BirthDate; + result.Code = p25.Code; result.Section = funcMain7(p25.Section, result.Section); result.PresentIllnessDetail = p25.PresentIllnessDetail; result.PastDiseasesHistoryDetail = p25.PastDiseasesHistoryDetail; @@ -450,6 +461,7 @@ namespace DocuMed.Domain.Mappers NationalId = p31.NationalId, Age = p31.Age, BirthDate = p31.BirthDate, + Code = p31.Code, Section = p31.Section == null ? null : new SectionSDto() { Name = p31.Section.Name, diff --git a/DocuMed.PWA/DocuMed.PWA.csproj b/DocuMed.PWA/DocuMed.PWA.csproj index 268c393..fb62618 100644 --- a/DocuMed.PWA/DocuMed.PWA.csproj +++ b/DocuMed.PWA/DocuMed.PWA.csproj @@ -7,8 +7,8 @@ enable enable service-worker-assets.js - 1.3.1.0 - 1.3.1.0 + 1.3.2.1 + 1.3.2.1 diff --git a/DocuMed.PWA/Pages/MedicalHistoryTemplateActionParts/MedicalHistoryTemplateActionStep1.razor b/DocuMed.PWA/Pages/MedicalHistoryTemplateActionParts/MedicalHistoryTemplateActionStep1.razor index 8c2bb37..8af6ac7 100644 --- a/DocuMed.PWA/Pages/MedicalHistoryTemplateActionParts/MedicalHistoryTemplateActionStep1.razor +++ b/DocuMed.PWA/Pages/MedicalHistoryTemplateActionParts/MedicalHistoryTemplateActionStep1.razor @@ -7,8 +7,7 @@ background="transparent" speed="1" class="m-auto w-64 h-64" loop autoplay />

افزودن پیش نویس شرح حال جدید

-

اطلاعات هر بخش شرح حال را میتوانید به صورت پیش نویس وارد کنید و در شرح حال نویسی خود را سریع و کارامد کنید -

+

اطلاعات هر بخش شرح حال را میتوانید به صورت پیش نویس وارد کنید و در شرح حال نویسی خود را سریع و کارامد کنید

diff --git a/DocuMed.PWA/Pages/MedicalOrdersPage.razor b/DocuMed.PWA/Pages/MedicalOrdersPage.razor index fab110c..1be8534 100644 --- a/DocuMed.PWA/Pages/MedicalOrdersPage.razor +++ b/DocuMed.PWA/Pages/MedicalOrdersPage.razor @@ -4,7 +4,7 @@ - +
+ .mud-input-label { + background-color: #356859; + color: #eee !important; + } + + .secondary-border > .mud-input-control-input-container > .mud-input.mud-input-outlined > input:focus ~ .mud-input-outlined-border { + border-color: rgba(253, 85, 35, 1); + color: white !important; + } + + inpute { + color: white !important + } + +
+
+ + +

شماره تلفن شما

+ + +

کد 6 رقمی شرح حال

+ +
+ + + + + + + + + + + + +
+
+ +
+ +
+
+ +
+ +
+ +
+

دریافتـــ فایل شرح حال

+

شماره تلفن فردی که شرح حال را ایجاد کرده است و کد شرح حال را وارد کنید تا فایل قابل چاپ شرح حال را دریافت کنید

+
+
+
+
+ +@code { + ElementReference? _otpAInput; + ElementReference? _otpBInput; + ElementReference? _otpCInput; + ElementReference? _otpDInput; + ElementReference? _otpEInput; + ElementReference? _otpFInput; + char[] _otpKey = new[] { '0', '0', '0', '0', '0', '0' }; + + public async Task OTPTextChangedAsync(ChangeEventArgs e, int step) + { + switch (step) + { + case 0: + if (e.Value != null && !e.Value.ToString().IsNullOrEmpty()) + { + _otpKey[0] = (e.Value.ToString())[0]; + await _otpBInput!.Value.FocusAsync(); + } + break; + case 1: + if (e.Value != null && !e.Value.ToString().IsNullOrEmpty()) + { + _otpKey[1] = (e.Value.ToString())[0]; + await _otpCInput!.Value.FocusAsync(); + } + else + { + await _otpAInput!.Value.FocusAsync(); + } + break; + case 2: + if (e.Value != null && !e.Value.ToString().IsNullOrEmpty()) + { + _otpKey[2] = (e.Value.ToString())[0]; + await _otpDInput!.Value.FocusAsync(); + } + else + { + await _otpBInput!.Value.FocusAsync(); + } + break; + case 3: + if (e.Value != null && !e.Value.ToString().IsNullOrEmpty()) + { + _otpKey[3] = (e.Value.ToString())[0]; + await _otpEInput!.Value.FocusAsync(); + } + else + { + await _otpCInput!.Value.FocusAsync(); + } + break; + case 4: + if (e.Value != null && !e.Value.ToString().IsNullOrEmpty()) + { + _otpKey[4] = (e.Value.ToString())[0]; + await _otpFInput!.Value.FocusAsync(); + } + else + { + await _otpDInput!.Value.FocusAsync(); + } + break; + case 5: + if (e.Value != null && !e.Value.ToString().IsNullOrEmpty()) + { + _otpKey[5] = (e.Value.ToString())[0]; + } + else + { + await _otpEInput!.Value.FocusAsync(); + } + break; + } + } + +} diff --git a/DocuMed.PWA/Shared/ItemTemplates/MedicalHistoryItemTemplate.razor b/DocuMed.PWA/Shared/ItemTemplates/MedicalHistoryItemTemplate.razor index 07d3d7c..84ad66b 100644 --- a/DocuMed.PWA/Shared/ItemTemplates/MedicalHistoryItemTemplate.razor +++ b/DocuMed.PWA/Shared/ItemTemplates/MedicalHistoryItemTemplate.razor @@ -6,9 +6,14 @@

@MedicalHistory.FullName

- - سن : @MedicalHistory.Age ساله - + + @* + سن : @MedicalHistory.Age ساله + *@ + + کد : @MedicalHistory.Code + +
@@ -20,7 +25,7 @@ - بخش @MedicalHistory.SectionName + @MedicalHistory.SectionName diff --git a/DocuMed.PWA/wwwroot/css/app.min.css b/DocuMed.PWA/wwwroot/css/app.min.css index e88ab08..e63dd3d 100644 --- a/DocuMed.PWA/wwwroot/css/app.min.css +++ b/DocuMed.PWA/wwwroot/css/app.min.css @@ -495,6 +495,12 @@ video { --tw-backdrop-saturate: ; --tw-backdrop-sepia: ; } +.visible { + visibility: visible; +} +.collapse { + visibility: collapse; +} .fixed { position: fixed; } @@ -586,6 +592,9 @@ video { .-mb-5 { margin-bottom: -1.25rem; } +.-mb-7 { + margin-bottom: -1.75rem; +} .-mb-8 { margin-bottom: -2rem; } @@ -610,6 +619,9 @@ video { .-mt-5 { margin-top: -1.25rem; } +.-mt-7 { + margin-top: -1.75rem; +} .-mt-8 { margin-top: -2rem; } @@ -628,6 +640,9 @@ video { .mb-4 { margin-bottom: 1rem; } +.mb-6 { + margin-bottom: 1.5rem; +} .mb-8 { margin-bottom: 2rem; } @@ -667,6 +682,9 @@ video { .mt-1\.5 { margin-top: 0.375rem; } +.mt-14 { + margin-top: 3.5rem; +} .mt-2 { margin-top: 0.5rem; } @@ -682,6 +700,9 @@ video { .mt-5 { margin-top: 1.25rem; } +.mt-6 { + margin-top: 1.5rem; +} .mt-9 { margin-top: 2.25rem; } @@ -697,6 +718,12 @@ video { .grid { display: grid; } +.hidden { + display: none; +} +.h-0 { + height: 0px; +} .h-10 { height: 2.5rem; } @@ -706,6 +733,9 @@ video { .h-2 { height: 0.5rem; } +.h-48 { + height: 12rem; +} .h-5 { height: 1.25rem; } @@ -730,6 +760,9 @@ video { .h-\[23rem\] { height: 23rem; } +.h-auto { + height: auto; +} .h-full { height: 100%; } @@ -745,6 +778,9 @@ video { .w-2 { width: 0.5rem; } +.w-48 { + width: 12rem; +} .w-5 { width: 1.25rem; } @@ -803,6 +839,9 @@ video { .basis-auto { flex-basis: auto; } +.basis-full { + flex-basis: 100%; +} .grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); } @@ -818,15 +857,24 @@ video { .flex-row { flex-direction: row; } +.flex-row-reverse { + flex-direction: row-reverse; +} .flex-col { flex-direction: column; } +.flex-col-reverse { + flex-direction: column-reverse; +} .items-center { align-items: center; } .justify-center { justify-content: center; } +.justify-between { + justify-content: space-between; +} .justify-stretch { justify-content: stretch; } @@ -845,6 +893,9 @@ video { .overflow-x-hidden { overflow-x: hidden; } +.overflow-y-hidden { + overflow-y: hidden; +} .overflow-y-scroll { overflow-y: scroll; } @@ -927,6 +978,9 @@ video { .bg-opacity-20 { --tw-bg-opacity: 0.2; } +.p-0 { + padding: 0px; +} .p-1 { padding: 0.25rem; } @@ -947,10 +1001,22 @@ video { padding-left: 0.75rem; padding-right: 0.75rem; } +.px-4 { + padding-left: 1rem; + padding-right: 1rem; +} +.px-5 { + padding-left: 1.25rem; + padding-right: 1.25rem; +} .px-6 { padding-left: 1.5rem; padding-right: 1.5rem; } +.px-8 { + padding-left: 2rem; + padding-right: 2rem; +} .py-0 { padding-top: 0px; padding-bottom: 0px; @@ -975,6 +1041,10 @@ video { padding-top: 1rem; padding-bottom: 1rem; } +.py-8 { + padding-top: 2rem; + padding-bottom: 2rem; +} .pb-10 { padding-bottom: 2.5rem; } @@ -1005,6 +1075,12 @@ video { .text-4xl { font-size: 2.25rem; } +.text-\[1\.8rem\] { + font-size: 1.8rem; +} +.text-\[2rem\] { + font-size: 2rem; +} .text-base { font-size: 1rem; } @@ -1078,6 +1154,11 @@ video { --tw-text-opacity: 1; color: rgb(255 255 255 / var(--tw-text-opacity)); } +.shadow-sm { + --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); + --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); +} .drop-shadow-md { --tw-drop-shadow: drop-shadow(0 4px 3px rgb(0 0 0 / 0.07)) drop-shadow(0 2px 2px rgb(0 0 0 / 0.06)); filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); @@ -1266,12 +1347,46 @@ a, .btn-link { content: var(--blazor-load-percentage-text, "Loading"); } + .focus\:border-teal-500:focus { + --tw-border-opacity: 1; + border-color: rgb(20 184 166 / var(--tw-border-opacity)); +} + + .focus\:ring-teal-500:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(20 184 166 / var(--tw-ring-opacity)); +} + .group:hover .group-hover\:text-\[--color-primary\] { color: var(--color-primary); } @media (min-width: 640px) { + .sm\:visible { + visibility: visible; + } + + .sm\:collapse { + visibility: collapse; + } + + .sm\:mt-6 { + margin-top: 1.5rem; + } + + .sm\:flow-root { + display: flow-root; + } + + .sm\:h-0 { + height: 0px; + } + + .sm\:h-auto { + height: auto; + } + .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } @@ -1279,10 +1394,31 @@ a, .btn-link { .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } + + .sm\:py-3 { + padding-top: 0.75rem; + padding-bottom: 0.75rem; + } + + .sm\:text-\[2\.3rem\] { + font-size: 2.3rem; + } } @media (min-width: 768px) { + .md\:h-20 { + height: 5rem; + } + + .md\:w-20 { + width: 5rem; + } + + .md\:basis-1\/2 { + flex-basis: 50%; + } + .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } @@ -1290,6 +1426,43 @@ a, .btn-link { .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } + + .md\:flex-row { + flex-direction: row; + } + + .md\:rounded-bl-xl { + border-bottom-left-radius: 0.75rem; + } + + .md\:rounded-tl-xl { + border-top-left-radius: 0.75rem; + } + + .md\:rounded-tr-none { + border-top-right-radius: 0px; + } + + .md\:px-10 { + padding-left: 2.5rem; + padding-right: 2.5rem; + } +} + + @media (min-width: 1024px) { + + .lg\:h-80 { + height: 20rem; + } + + .lg\:w-80 { + width: 20rem; + } + + .lg\:px-20 { + padding-left: 5rem; + padding-right: 5rem; + } } @media (min-width: 1280px) { diff --git a/DocuMed.PWA/wwwroot/css/app.output.css b/DocuMed.PWA/wwwroot/css/app.output.css index 28aacbf..738ff15 100644 --- a/DocuMed.PWA/wwwroot/css/app.output.css +++ b/DocuMed.PWA/wwwroot/css/app.output.css @@ -545,6 +545,14 @@ video { --tw-backdrop-sepia: ; } +.visible { + visibility: visible; +} + +.collapse { + visibility: collapse; +} + .fixed { position: fixed; } @@ -661,6 +669,10 @@ video { margin-bottom: -1.25rem; } +.-mb-7 { + margin-bottom: -1.75rem; +} + .-mb-8 { margin-bottom: -2rem; } @@ -693,6 +705,10 @@ video { margin-top: -1.25rem; } +.-mt-7 { + margin-top: -1.75rem; +} + .-mt-8 { margin-top: -2rem; } @@ -717,6 +733,10 @@ video { margin-bottom: 1rem; } +.mb-6 { + margin-bottom: 1.5rem; +} + .mb-8 { margin-bottom: 2rem; } @@ -769,6 +789,10 @@ video { margin-top: 0.375rem; } +.mt-14 { + margin-top: 3.5rem; +} + .mt-2 { margin-top: 0.5rem; } @@ -789,6 +813,10 @@ video { margin-top: 1.25rem; } +.mt-6 { + margin-top: 1.5rem; +} + .mt-9 { margin-top: 2.25rem; } @@ -809,6 +837,14 @@ video { display: grid; } +.hidden { + display: none; +} + +.h-0 { + height: 0px; +} + .h-10 { height: 2.5rem; } @@ -821,6 +857,10 @@ video { height: 0.5rem; } +.h-48 { + height: 12rem; +} + .h-5 { height: 1.25rem; } @@ -853,6 +893,10 @@ video { height: 23rem; } +.h-auto { + height: auto; +} + .h-full { height: 100%; } @@ -873,6 +917,10 @@ video { width: 0.5rem; } +.w-48 { + width: 12rem; +} + .w-5 { width: 1.25rem; } @@ -950,6 +998,10 @@ video { flex-basis: auto; } +.basis-full { + flex-basis: 100%; +} + .grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); } @@ -970,10 +1022,18 @@ video { flex-direction: row; } +.flex-row-reverse { + flex-direction: row-reverse; +} + .flex-col { flex-direction: column; } +.flex-col-reverse { + flex-direction: column-reverse; +} + .items-center { align-items: center; } @@ -982,6 +1042,10 @@ video { justify-content: center; } +.justify-between { + justify-content: space-between; +} + .justify-stretch { justify-content: stretch; } @@ -1006,6 +1070,10 @@ video { overflow-x: hidden; } +.overflow-y-hidden { + overflow-y: hidden; +} + .overflow-y-scroll { overflow-y: scroll; } @@ -1111,6 +1179,10 @@ video { --tw-bg-opacity: 0.2; } +.p-0 { + padding: 0px; +} + .p-1 { padding: 0.25rem; } @@ -1137,11 +1209,26 @@ video { padding-right: 0.75rem; } +.px-4 { + padding-left: 1rem; + padding-right: 1rem; +} + +.px-5 { + padding-left: 1.25rem; + padding-right: 1.25rem; +} + .px-6 { padding-left: 1.5rem; padding-right: 1.5rem; } +.px-8 { + padding-left: 2rem; + padding-right: 2rem; +} + .py-0 { padding-top: 0px; padding-bottom: 0px; @@ -1172,6 +1259,11 @@ video { padding-bottom: 1rem; } +.py-8 { + padding-top: 2rem; + padding-bottom: 2rem; +} + .pb-10 { padding-bottom: 2.5rem; } @@ -1196,6 +1288,14 @@ video { padding-top: 1rem; } +.pt-0 { + padding-top: 0px; +} + +.pt-0\.5 { + padding-top: 0.125rem; +} + .text-center { text-align: center; } @@ -1212,6 +1312,14 @@ video { font-size: 2.25rem; } +.text-\[1\.8rem\] { + font-size: 1.8rem; +} + +.text-\[2rem\] { + font-size: 2rem; +} + .text-base { font-size: 1rem; } @@ -1306,6 +1414,12 @@ video { color: rgb(255 255 255 / var(--tw-text-opacity)); } +.shadow-sm { + --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); + --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); +} + .drop-shadow-md { --tw-drop-shadow: drop-shadow(0 4px 3px rgb(0 0 0 / 0.07)) drop-shadow(0 2px 2px rgb(0 0 0 / 0.06)); filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); @@ -1527,11 +1641,45 @@ a, .btn-link { content: var(--blazor-load-percentage-text, "Loading"); } +.focus\:border-teal-500:focus { + --tw-border-opacity: 1; + border-color: rgb(20 184 166 / var(--tw-border-opacity)); +} + +.focus\:ring-teal-500:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(20 184 166 / var(--tw-ring-opacity)); +} + .group:hover .group-hover\:text-\[--color-primary\] { color: var(--color-primary); } @media (min-width: 640px) { + .sm\:visible { + visibility: visible; + } + + .sm\:collapse { + visibility: collapse; + } + + .sm\:mt-6 { + margin-top: 1.5rem; + } + + .sm\:flow-root { + display: flow-root; + } + + .sm\:h-0 { + height: 0px; + } + + .sm\:h-auto { + height: auto; + } + .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } @@ -1539,9 +1687,30 @@ a, .btn-link { .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } + + .sm\:py-3 { + padding-top: 0.75rem; + padding-bottom: 0.75rem; + } + + .sm\:text-\[2\.3rem\] { + font-size: 2.3rem; + } } @media (min-width: 768px) { + .md\:h-20 { + height: 5rem; + } + + .md\:w-20 { + width: 5rem; + } + + .md\:basis-1\/2 { + flex-basis: 50%; + } + .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } @@ -1549,6 +1718,42 @@ a, .btn-link { .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } + + .md\:flex-row { + flex-direction: row; + } + + .md\:rounded-bl-xl { + border-bottom-left-radius: 0.75rem; + } + + .md\:rounded-tl-xl { + border-top-left-radius: 0.75rem; + } + + .md\:rounded-tr-none { + border-top-right-radius: 0px; + } + + .md\:px-10 { + padding-left: 2.5rem; + padding-right: 2.5rem; + } +} + +@media (min-width: 1024px) { + .lg\:h-80 { + height: 20rem; + } + + .lg\:w-80 { + width: 20rem; + } + + .lg\:px-20 { + padding-left: 5rem; + padding-right: 5rem; + } } @media (min-width: 1280px) { diff --git a/DocuMed.Repository/Migrations/20231128085153_editMHAddCode.Designer.cs b/DocuMed.Repository/Migrations/20231128085153_editMHAddCode.Designer.cs new file mode 100644 index 0000000..49697e1 --- /dev/null +++ b/DocuMed.Repository/Migrations/20231128085153_editMHAddCode.Designer.cs @@ -0,0 +1,871 @@ +// +using System; +using DocuMed.Repository.Models; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace DocuMed.Repository.Migrations +{ + [DbContext(typeof(ApplicationContext))] + [Migration("20231128085153_editMHAddCode")] + partial class editMHAddCode + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasDefaultSchema("public") + .HasAnnotation("ProductVersion", "7.0.11") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("DocuMed.Domain.Entities.City.City", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("CreatedAt") + .HasColumnType("timestamp without time zone"); + + b.Property("CreatedBy") + .IsRequired() + .HasColumnType("text"); + + b.Property("IsRemoved") + .HasColumnType("boolean"); + + b.Property("ModifiedAt") + .HasColumnType("timestamp without time zone"); + + b.Property("ModifiedBy") + .IsRequired() + .HasColumnType("text"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text"); + + b.Property("RemovedAt") + .HasColumnType("timestamp without time zone"); + + b.Property("RemovedBy") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.ToTable("Cities", "public"); + }); + + modelBuilder.Entity("DocuMed.Domain.Entities.City.Section", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("CreatedAt") + .HasColumnType("timestamp without time zone"); + + b.Property("CreatedBy") + .IsRequired() + .HasColumnType("text"); + + b.Property("Detail") + .IsRequired() + .HasColumnType("text"); + + b.Property("IsRemoved") + .HasColumnType("boolean"); + + b.Property("ModifiedAt") + .HasColumnType("timestamp without time zone"); + + b.Property("ModifiedBy") + .IsRequired() + .HasColumnType("text"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text"); + + b.Property("RemovedAt") + .HasColumnType("timestamp without time zone"); + + b.Property("RemovedBy") + .IsRequired() + .HasColumnType("text"); + + b.Property("UniversityId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("UniversityId"); + + b.ToTable("Sections", "public"); + }); + + modelBuilder.Entity("DocuMed.Domain.Entities.City.University", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Address") + .IsRequired() + .HasColumnType("text"); + + b.Property("CityId") + .HasColumnType("uuid"); + + b.Property("CreatedAt") + .HasColumnType("timestamp without time zone"); + + b.Property("CreatedBy") + .IsRequired() + .HasColumnType("text"); + + b.Property("IsRemoved") + .HasColumnType("boolean"); + + b.Property("ModifiedAt") + .HasColumnType("timestamp without time zone"); + + b.Property("ModifiedBy") + .IsRequired() + .HasColumnType("text"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text"); + + b.Property("RemovedAt") + .HasColumnType("timestamp without time zone"); + + b.Property("RemovedBy") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("CityId"); + + b.ToTable("Universities", "public"); + }); + + modelBuilder.Entity("DocuMed.Domain.Entities.MedicalHistory.MedicalHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("AddictionHistoryDetail") + .IsRequired() + .HasColumnType("text"); + + b.Property("Age") + .HasColumnType("integer"); + + b.Property("AllergyDetail") + .IsRequired() + .HasColumnType("text"); + + b.Property("ApplicationUserId") + .HasColumnType("uuid"); + + b.Property("BirthDate") + .HasColumnType("timestamp without time zone"); + + b.Property("ChiefComplaint") + .IsRequired() + .HasColumnType("text"); + + b.Property("Code") + .IsRequired() + .HasColumnType("text"); + + b.Property("CreatedAt") + .HasColumnType("timestamp without time zone"); + + b.Property("CreatedBy") + .IsRequired() + .HasColumnType("text"); + + b.Property("DiastolicBloodPressure") + .HasColumnType("double precision"); + + b.Property("DrugHistoryDetail") + .IsRequired() + .HasColumnType("text"); + + b.Property("FamilyHistoryDetail") + .IsRequired() + .HasColumnType("text"); + + b.Property("FatherName") + .IsRequired() + .HasColumnType("text"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("text"); + + b.Property("GeneralAppearanceDetail") + .IsRequired() + .HasColumnType("text"); + + b.Property("IsRemoved") + .HasColumnType("boolean"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("text"); + + b.Property("MedicalHistoryTemplateId") + .HasColumnType("uuid"); + + b.Property("ModifiedAt") + .HasColumnType("timestamp without time zone"); + + b.Property("ModifiedBy") + .IsRequired() + .HasColumnType("text"); + + b.Property("NationalId") + .IsRequired() + .HasColumnType("text"); + + b.Property("PastDiseasesHistoryDetail") + .IsRequired() + .HasColumnType("text"); + + b.Property("PastSurgeryHistoryDetail") + .IsRequired() + .HasColumnType("text"); + + b.Property("PresentIllnessDetail") + .IsRequired() + .HasColumnType("text"); + + b.Property("PulseRate") + .HasColumnType("double precision"); + + b.Property("RemovedAt") + .HasColumnType("timestamp without time zone"); + + b.Property("RemovedBy") + .IsRequired() + .HasColumnType("text"); + + b.Property("SPO2") + .HasColumnType("double precision"); + + b.Property("SectionId") + .HasColumnType("uuid"); + + b.Property("SystemReviewDetail") + .IsRequired() + .HasColumnType("text"); + + b.Property("SystolicBloodPressure") + .HasColumnType("double precision"); + + b.Property("Temperature") + .HasColumnType("double precision"); + + b.Property("VitalSignDetail") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationUserId"); + + b.HasIndex("SectionId"); + + b.ToTable("MedicalHistories", "public"); + }); + + modelBuilder.Entity("DocuMed.Domain.Entities.MedicalHistory.MedicalHistoryAnswer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Answer") + .IsRequired() + .HasColumnType("text"); + + b.Property("CreatedAt") + .HasColumnType("timestamp without time zone"); + + b.Property("CreatedBy") + .IsRequired() + .HasColumnType("text"); + + b.Property("IsRemoved") + .HasColumnType("boolean"); + + b.Property("MedicalHistoryId") + .HasColumnType("uuid"); + + b.Property("ModifiedAt") + .HasColumnType("timestamp without time zone"); + + b.Property("ModifiedBy") + .IsRequired() + .HasColumnType("text"); + + b.Property("Part") + .HasColumnType("integer"); + + b.Property("Question") + .IsRequired() + .HasColumnType("text"); + + b.Property("QuestionType") + .HasColumnType("integer"); + + b.Property("RemovedAt") + .HasColumnType("timestamp without time zone"); + + b.Property("RemovedBy") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("MedicalHistoryId"); + + b.ToTable("MedicalHistoryAnswers", "public"); + }); + + modelBuilder.Entity("DocuMed.Domain.Entities.MedicalHistoryTemplate.MedicalHistoryQuestion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("BodySystem") + .HasColumnType("integer"); + + b.Property("CreatedAt") + .HasColumnType("timestamp without time zone"); + + b.Property("CreatedBy") + .IsRequired() + .HasColumnType("text"); + + b.Property("IsRemoved") + .HasColumnType("boolean"); + + b.Property("IsSign") + .HasColumnType("boolean"); + + b.Property("IsSymptom") + .HasColumnType("boolean"); + + b.Property("MedicalHistoryTemplateId") + .HasColumnType("uuid"); + + b.Property("ModifiedAt") + .HasColumnType("timestamp without time zone"); + + b.Property("ModifiedBy") + .IsRequired() + .HasColumnType("text"); + + b.Property("Part") + .HasColumnType("integer"); + + b.Property("Question") + .IsRequired() + .HasColumnType("text"); + + b.Property("QuestionType") + .HasColumnType("integer"); + + b.Property("RemovedAt") + .HasColumnType("timestamp without time zone"); + + b.Property("RemovedBy") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("MedicalHistoryTemplateId"); + + b.ToTable("MedicalHistoryQuestions", "public"); + }); + + modelBuilder.Entity("DocuMed.Domain.Entities.MedicalHistoryTemplate.MedicalHistoryTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("ApplicationUserId") + .HasColumnType("uuid"); + + b.Property("ChiefComplaint") + .IsRequired() + .HasColumnType("text"); + + b.Property("CreatedAt") + .HasColumnType("timestamp without time zone"); + + b.Property("CreatedBy") + .IsRequired() + .HasColumnType("text"); + + b.Property("IsRemoved") + .HasColumnType("boolean"); + + b.Property("ModifiedAt") + .HasColumnType("timestamp without time zone"); + + b.Property("ModifiedBy") + .IsRequired() + .HasColumnType("text"); + + b.Property("RemovedAt") + .HasColumnType("timestamp without time zone"); + + b.Property("RemovedBy") + .IsRequired() + .HasColumnType("text"); + + b.Property("SectionId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationUserId"); + + b.HasIndex("SectionId"); + + b.ToTable("MedicalHistoryTemplates", "public"); + }); + + modelBuilder.Entity("DocuMed.Domain.Entities.User.ApplicationRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("text"); + + b.Property("Description") + .IsRequired() + .HasColumnType("text"); + + b.Property("EnglishName") + .IsRequired() + .HasColumnType("text"); + + b.Property("Name") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("NormalizedName") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("PersianName") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName") + .IsUnique() + .HasDatabaseName("RoleNameIndex"); + + b.ToTable("Roles", "public"); + }); + + modelBuilder.Entity("DocuMed.Domain.Entities.User.ApplicationUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("AccessFailedCount") + .HasColumnType("integer"); + + b.Property("BirthDate") + .HasColumnType("timestamp without time zone"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("text"); + + b.Property("Email") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("EmailConfirmed") + .HasColumnType("boolean"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("text"); + + b.Property("Gender") + .HasColumnType("integer"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("text"); + + b.Property("LockoutEnabled") + .HasColumnType("boolean"); + + b.Property("LockoutEnd") + .HasColumnType("timestamp with time zone"); + + b.Property("NationalId") + .IsRequired() + .HasColumnType("text"); + + b.Property("NormalizedEmail") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("NormalizedUserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("PasswordHash") + .HasColumnType("text"); + + b.Property("PhoneNumber") + .HasColumnType("text"); + + b.Property("PhoneNumberConfirmed") + .HasColumnType("boolean"); + + b.Property("SectionId") + .HasColumnType("uuid"); + + b.Property("SecurityStamp") + .HasColumnType("text"); + + b.Property("SignUpStatus") + .HasColumnType("integer"); + + b.Property("StudentId") + .IsRequired() + .HasColumnType("text"); + + b.Property("TwoFactorEnabled") + .HasColumnType("boolean"); + + b.Property("UniversityId") + .HasColumnType("uuid"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedEmail") + .HasDatabaseName("EmailIndex"); + + b.HasIndex("NormalizedUserName") + .IsUnique() + .HasDatabaseName("UserNameIndex"); + + b.HasIndex("SectionId"); + + b.HasIndex("UniversityId"); + + b.ToTable("Users", "public"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ClaimType") + .HasColumnType("text"); + + b.Property("ClaimValue") + .HasColumnType("text"); + + b.Property("RoleId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("RoleClaims", "public"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ClaimType") + .HasColumnType("text"); + + b.Property("ClaimValue") + .HasColumnType("text"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("Claims", "public"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.Property("LoginProvider") + .HasColumnType("text"); + + b.Property("ProviderKey") + .HasColumnType("text"); + + b.Property("ProviderDisplayName") + .HasColumnType("text"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("LoginProvider", "ProviderKey"); + + b.HasIndex("UserId"); + + b.ToTable("Logins", "public"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("RoleId") + .HasColumnType("uuid"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId"); + + b.ToTable("UserRoles", "public"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("LoginProvider") + .HasColumnType("text"); + + b.Property("Name") + .HasColumnType("text"); + + b.Property("Value") + .HasColumnType("text"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("Tokens", "public"); + }); + + modelBuilder.Entity("DocuMed.Domain.Entities.City.Section", b => + { + b.HasOne("DocuMed.Domain.Entities.City.University", "University") + .WithMany("Sections") + .HasForeignKey("UniversityId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("University"); + }); + + modelBuilder.Entity("DocuMed.Domain.Entities.City.University", b => + { + b.HasOne("DocuMed.Domain.Entities.City.City", "City") + .WithMany("Universities") + .HasForeignKey("CityId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("City"); + }); + + modelBuilder.Entity("DocuMed.Domain.Entities.MedicalHistory.MedicalHistory", b => + { + b.HasOne("DocuMed.Domain.Entities.User.ApplicationUser", "ApplicationUser") + .WithMany() + .HasForeignKey("ApplicationUserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("DocuMed.Domain.Entities.City.Section", "Section") + .WithMany() + .HasForeignKey("SectionId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ApplicationUser"); + + b.Navigation("Section"); + }); + + modelBuilder.Entity("DocuMed.Domain.Entities.MedicalHistory.MedicalHistoryAnswer", b => + { + b.HasOne("DocuMed.Domain.Entities.MedicalHistory.MedicalHistory", "MedicalHistory") + .WithMany("Answers") + .HasForeignKey("MedicalHistoryId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("MedicalHistory"); + }); + + modelBuilder.Entity("DocuMed.Domain.Entities.MedicalHistoryTemplate.MedicalHistoryQuestion", b => + { + b.HasOne("DocuMed.Domain.Entities.MedicalHistoryTemplate.MedicalHistoryTemplate", "MedicalHistoryTemplate") + .WithMany("Questions") + .HasForeignKey("MedicalHistoryTemplateId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("MedicalHistoryTemplate"); + }); + + modelBuilder.Entity("DocuMed.Domain.Entities.MedicalHistoryTemplate.MedicalHistoryTemplate", b => + { + b.HasOne("DocuMed.Domain.Entities.User.ApplicationUser", "ApplicationUser") + .WithMany() + .HasForeignKey("ApplicationUserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("DocuMed.Domain.Entities.City.Section", "Section") + .WithMany() + .HasForeignKey("SectionId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ApplicationUser"); + + b.Navigation("Section"); + }); + + modelBuilder.Entity("DocuMed.Domain.Entities.User.ApplicationUser", b => + { + b.HasOne("DocuMed.Domain.Entities.City.Section", "Section") + .WithMany() + .HasForeignKey("SectionId"); + + b.HasOne("DocuMed.Domain.Entities.City.University", "University") + .WithMany() + .HasForeignKey("UniversityId"); + + b.Navigation("Section"); + + b.Navigation("University"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.HasOne("DocuMed.Domain.Entities.User.ApplicationRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.HasOne("DocuMed.Domain.Entities.User.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.HasOne("DocuMed.Domain.Entities.User.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.HasOne("DocuMed.Domain.Entities.User.ApplicationRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("DocuMed.Domain.Entities.User.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.HasOne("DocuMed.Domain.Entities.User.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + }); + + modelBuilder.Entity("DocuMed.Domain.Entities.City.City", b => + { + b.Navigation("Universities"); + }); + + modelBuilder.Entity("DocuMed.Domain.Entities.City.University", b => + { + b.Navigation("Sections"); + }); + + modelBuilder.Entity("DocuMed.Domain.Entities.MedicalHistory.MedicalHistory", b => + { + b.Navigation("Answers"); + }); + + modelBuilder.Entity("DocuMed.Domain.Entities.MedicalHistoryTemplate.MedicalHistoryTemplate", b => + { + b.Navigation("Questions"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/DocuMed.Repository/Migrations/20231128085153_editMHAddCode.cs b/DocuMed.Repository/Migrations/20231128085153_editMHAddCode.cs new file mode 100644 index 0000000..3805260 --- /dev/null +++ b/DocuMed.Repository/Migrations/20231128085153_editMHAddCode.cs @@ -0,0 +1,31 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace DocuMed.Repository.Migrations +{ + /// + public partial class editMHAddCode : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "Code", + schema: "public", + table: "MedicalHistories", + type: "text", + nullable: false, + defaultValue: ""); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "Code", + schema: "public", + table: "MedicalHistories"); + } + } +} diff --git a/DocuMed.Repository/Migrations/ApplicationContextModelSnapshot.cs b/DocuMed.Repository/Migrations/ApplicationContextModelSnapshot.cs index d98a2e0..92e2677 100644 --- a/DocuMed.Repository/Migrations/ApplicationContextModelSnapshot.cs +++ b/DocuMed.Repository/Migrations/ApplicationContextModelSnapshot.cs @@ -185,6 +185,10 @@ namespace DocuMed.Repository.Migrations .IsRequired() .HasColumnType("text"); + b.Property("Code") + .IsRequired() + .HasColumnType("text"); + b.Property("CreatedAt") .HasColumnType("timestamp without time zone");