Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
HIAST-Clinics
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
almohanad.hafez
HIAST-Clinics
Commits
f55bf66c
Commit
f55bf66c
authored
Aug 19, 2024
by
Almouhannad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(B) Edit result errors
parent
c4245ed6
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
14 additions
and
14 deletions
+14
-14
Medicine.cs
...cs.Backend/Domain/Entities/Medicals/Medicines/Medicine.cs
+1
-1
Doctor.cs
Clinics.Backend/Domain/Entities/People/Doctors/Doctor.cs
+2
-2
Employee.cs
Clinics.Backend/Domain/Entities/People/Employees/Employee.cs
+2
-2
EmployeeFamilyMember.cs
...s/Relations/EmployeeFamilyMembers/EmployeeFamilyMember.cs
+1
-1
FamilyMember.cs
...kend/Domain/Entities/People/FamilyMembers/FamilyMember.cs
+1
-1
Patient.cs
Clinics.Backend/Domain/Entities/People/Patients/Patient.cs
+4
-4
Visit.cs
Clinics.Backend/Domain/Entities/Visits/Visit.cs
+3
-3
No files found.
Clinics.Backend/Domain/Entities/Medicals/Medicines/Medicine.cs
View file @
f55bf66c
...
...
@@ -65,7 +65,7 @@ public sealed class Medicine : Entity
selectedMedicineForm
=
Result
.
Success
<
MedicineForm
>(
syrup
);
if
(
selectedMedicineForm
.
IsFailure
)
return
Result
.
Failure
<
Medicine
>(
Errors
.
DomainErrors
.
InvalidValues
Error
);
return
Result
.
Failure
<
Medicine
>(
selectedMedicineForm
.
Error
);
#
endregion
return
new
Medicine
(
0
,
selectedMedicineForm
.
Value
,
amount
,
name
,
dosage
);
...
...
Clinics.Backend/Domain/Entities/People/Doctors/Doctor.cs
View file @
f55bf66c
...
...
@@ -46,7 +46,7 @@ public sealed class Doctor : Entity
{
Result
<
PersonalInfo
>
personalInfo
=
PersonalInfo
.
Create
(
firstName
,
middleName
,
lastName
);
if
(
personalInfo
.
IsFailure
)
return
Result
.
Failure
<
Doctor
>(
Errors
.
DomainErrors
.
InvalidValues
Error
);
return
Result
.
Failure
<
Doctor
>(
personalInfo
.
Error
);
return
new
Doctor
(
0
,
personalInfo
.
Value
);
}
...
...
@@ -58,7 +58,7 @@ public sealed class Doctor : Entity
#
region
Create
number
to
attach
Result
<
DoctorPhone
>
doctorPhone
=
DoctorPhone
.
Create
(
phone
,
name
);
if
(
doctorPhone
.
IsFailure
)
return
Result
.
Failure
(
Errors
.
DomainErrors
.
InvalidValues
Error
);
return
Result
.
Failure
(
doctorPhone
.
Error
);
#
endregion
#
region
Check
duplicate
...
...
Clinics.Backend/Domain/Entities/People/Employees/Employee.cs
View file @
f55bf66c
...
...
@@ -79,7 +79,7 @@ public sealed class Employee : Entity
#
region
Create
patient
Result
<
Patient
>
patient
=
Patient
.
Create
(
firstName
,
middleName
,
lastName
,
dateOfBirth
,
gender
);
if
(
patient
.
IsFailure
)
return
Result
.
Failure
<
Employee
>(
Errors
.
DomainErrors
.
InvalidValues
Error
);
return
Result
.
Failure
<
Employee
>(
patient
.
Error
);
#
endregion
#
region
Check
employee
'
s
required
details
...
...
@@ -110,7 +110,7 @@ public sealed class Employee : Entity
Result
<
EmployeeFamilyMember
>
employeeFamilyMember
=
EmployeeFamilyMember
.
Create
(
Id
,
familyMember
.
Id
,
role
);
if
(
employeeFamilyMember
.
IsFailure
)
return
Result
.
Failure
(
Errors
.
DomainErrors
.
InvalidValues
Error
);
return
Result
.
Failure
(
employeeFamilyMember
.
Error
);
#
endregion
#
region
Check
valid
relation
...
...
Clinics.Backend/Domain/Entities/People/Employees/Relations/EmployeeFamilyMembers/EmployeeFamilyMember.cs
View file @
f55bf66c
...
...
@@ -69,7 +69,7 @@ public sealed class EmployeeFamilyMember : Entity
selectedRole
=
Result
.
Success
<
FamilyRole
>(
daughter
);
if
(
selectedRole
.
IsFailure
)
return
Result
.
Failure
<
EmployeeFamilyMember
>(
Errors
.
DomainErrors
.
InvalidValues
Error
);
return
Result
.
Failure
<
EmployeeFamilyMember
>(
selectedRole
.
Error
);
#
endregion
...
...
Clinics.Backend/Domain/Entities/People/FamilyMembers/FamilyMember.cs
View file @
f55bf66c
...
...
@@ -34,7 +34,7 @@ public sealed class FamilyMember : Entity
#
region
Create
patient
Result
<
Patient
>
patient
=
Patient
.
Create
(
firstName
,
middleName
,
lastName
,
dateOfBirth
,
gender
);
if
(
patient
.
IsFailure
)
return
Result
.
Failure
<
FamilyMember
>(
Errors
.
DomainErrors
.
InvalidValues
Error
);
return
Result
.
Failure
<
FamilyMember
>(
patient
.
Error
);
#
endregion
return
new
FamilyMember
(
0
,
patient
.
Value
);
...
...
Clinics.Backend/Domain/Entities/People/Patients/Patient.cs
View file @
f55bf66c
...
...
@@ -83,7 +83,7 @@ public sealed class Patient : Entity
#
region
Personal
info
Result
<
PersonalInfo
>
personalInfo
=
PersonalInfo
.
Create
(
firstName
,
middleName
,
lastName
);
if
(
personalInfo
.
IsFailure
)
return
Result
.
Failure
<
Patient
>(
Errors
.
DomainErrors
.
InvalidValues
Error
);
return
Result
.
Failure
<
Patient
>(
personalInfo
.
Error
);
#
endregion
#
region
Gender
...
...
@@ -98,7 +98,7 @@ public sealed class Patient : Entity
selectedGender
=
Result
.
Success
<
Gender
>(
female
);
if
(
selectedGender
.
IsFailure
)
return
Result
.
Failure
<
Patient
>(
Errors
.
DomainErrors
.
InvalidValues
Error
);
return
Result
.
Failure
<
Patient
>(
selectedGender
.
Error
);
#
endregion
return
new
Patient
(
0
,
personalInfo
.
Value
,
dateOfBirth
,
selectedGender
.
Value
);
...
...
@@ -112,7 +112,7 @@ public sealed class Patient : Entity
#
region
Create
medicine
to
attach
Result
<
PatientMedicine
>
entry
=
PatientMedicine
.
Create
(
Id
,
medicine
.
Id
,
number
);
if
(
entry
.
IsFailure
)
return
Result
.
Failure
(
Errors
.
DomainErrors
.
InvalidValues
Error
);
return
Result
.
Failure
(
entry
.
Error
);
#
endregion
#
region
Check
duplication
...
...
@@ -131,7 +131,7 @@ public sealed class Patient : Entity
#
region
Create
disease
to
attach
Result
<
PatientDisease
>
entry
=
PatientDisease
.
Create
(
Id
,
disease
.
Id
);
if
(
entry
.
IsFailure
)
return
Result
.
Failure
(
Errors
.
DomainErrors
.
InvalidValues
Error
);
return
Result
.
Failure
(
entry
.
Error
);
#
endregion
#
region
Check
duplication
...
...
Clinics.Backend/Domain/Entities/Visits/Visit.cs
View file @
f55bf66c
...
...
@@ -103,7 +103,7 @@ public sealed class Visit : Entity
#
region
Create
medical
image
to
attach
Result
<
VisitMedicalImage
>
entry
=
VisitMedicalImage
.
Create
(
Id
,
medicalImage
.
Id
);
if
(
entry
.
IsFailure
)
return
Result
.
Failure
(
Errors
.
DomainErrors
.
InvalidValues
Error
);
return
Result
.
Failure
(
entry
.
Error
);
#
endregion
#
region
Check
duplicate
...
...
@@ -122,7 +122,7 @@ public sealed class Visit : Entity
#
region
Create
medical
test
to
attach
Result
<
VisitMedicalTest
>
entry
=
VisitMedicalTest
.
Create
(
Id
,
medicalTest
.
Id
);
if
(
entry
.
IsFailure
)
return
Result
.
Failure
(
Errors
.
DomainErrors
.
InvalidValues
Error
);
return
Result
.
Failure
(
entry
.
Error
);
#
endregion
#
region
Check
duplicate
...
...
@@ -141,7 +141,7 @@ public sealed class Visit : Entity
#
region
Create
medicine
to
attach
Result
<
VisitMedicine
>
entry
=
VisitMedicine
.
Create
(
Id
,
medicine
.
Id
,
number
);
if
(
entry
.
IsFailure
)
return
Result
.
Failure
(
Errors
.
DomainErrors
.
InvalidValues
Error
);
return
Result
.
Failure
(
entry
.
Error
);
#
endregion
#
region
Check
duplicate
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment