Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
Medic
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
hasan.bahjat
Medic
Commits
0aec6304
Commit
0aec6304
authored
Jun 23, 2024
by
hasan khaddour
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update ingredient service
parent
4eeb2db1
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
3 deletions
+11
-3
IIngredientService.cs
ApplicationCore/Interfaces/IServices/IIngredientService.cs
+1
-1
IPatientService.cs
ApplicationCore/Interfaces/IServices/IPatientService.cs
+3
-1
IngredientService.cs
...ationCore/Services/IngredientService/IngredientService.cs
+1
-1
PatientService.cs
ApplicationCore/Services/PatientService/PatientService.cs
+6
-0
ApplicationCore.csproj.AssemblyReference.cache
...bug/net5.0/ApplicationCore.csproj.AssemblyReference.cache
+0
-0
No files found.
ApplicationCore/Interfaces/IServices/IIngredientService.cs
View file @
0aec6304
...
...
@@ -11,7 +11,7 @@ namespace ApplicationCore.Interfaces.IServices
public
interface
IIngredientService
:
IService
<
IngredientModel
>
{
public
Task
<
MedicineIngredientModel
>
AddToMedicine
(
MedicineIngredientModel
medicineIngredientModel
);
public
void
RemoveFromMedicine
(
MedicineIngredientModel
medicineIngredientModel
);
public
Task
RemoveFromMedicine
(
MedicineIngredientModel
medicineIngredientModel
);
}
}
ApplicationCore/Interfaces/IServices/IPatientService.cs
View file @
0aec6304
...
...
@@ -15,7 +15,9 @@ namespace ApplicationCore.Interfaces.IServices
public
Task
<
IEnumerable
<
MedicalStateModel
>>
GetPatientMedicalStates
(
int
patientId
);
public
Task
<
MedicalStateModel
>
GetMedicalStateDetails
(
int
id
);
public
Task
<
PatientModel
>
GetByUserEmail
(
String
email
);
// public Task<IEnumerable<PatientModel>>GetAll();
public
Task
<
PatientModel
>
GetByUserId
(
String
email
);
// public Task<IEnumerable<PatientModel>>GetAll();
public
void
AddMedicalState
(
int
patientId
,
MedicalStateModel
medicalState
);
// public Patient GetDetails(int id);
// public void Insert(PatientModel patient);
...
...
ApplicationCore/Services/IngredientService/IngredientService.cs
View file @
0aec6304
...
...
@@ -34,7 +34,7 @@ namespace ApplicationCore.Services
_unitOfWork
.
Commit
();
return
medicineIngredientModel
;
}
public
async
void
RemoveFromMedicine
(
MedicineIngredientModel
medicineIngredientModel
)
public
async
Task
RemoveFromMedicine
(
MedicineIngredientModel
medicineIngredientModel
)
{
var
ingredient
=
await
_unitOfWork
.
Ingredients
.
GetById
(
medicineIngredientModel
.
IngredientId
,
_specification
);
...
...
ApplicationCore/Services/PatientService/PatientService.cs
View file @
0aec6304
...
...
@@ -66,5 +66,11 @@ namespace ApplicationCore.Services
return
_mapper
.
Map
<
PatientModel
>(
ps
.
Where
(
p
=>
p
.
User
.
Email
==
email
).
FirstOrDefault
());
}
public
async
Task
<
PatientModel
>
GetByUserId
(
string
id
)
{
var
ps
=
await
_unitOfWork
.
Entity
.
GetAll
(
_specification
);
return
_mapper
.
Map
<
PatientModel
>(
ps
.
Where
(
p
=>
p
.
User
.
Id
==
id
).
FirstOrDefault
());
}
}
}
ApplicationCore/obj/Debug/net5.0/ApplicationCore.csproj.AssemblyReference.cache
View file @
0aec6304
No preview for this file type
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