|
Last change
on this file since 84249b1 was 20468d3, checked in by MBK <marija.karapandzova@…>, 4 months ago |
|
Add pages and routing for patients, doctors, departments and appointments with api services
|
-
Property mode
set to
100644
|
|
File size:
508 bytes
|
| Line | |
|---|
| 1 | import apiClient from './api';
|
|---|
| 2 |
|
|---|
| 3 | const ENDPOINT = '/patients';
|
|---|
| 4 |
|
|---|
| 5 | export const patientService = {
|
|---|
| 6 | getAllPatients: () => apiClient.get(ENDPOINT),
|
|---|
| 7 |
|
|---|
| 8 | getPatientById: (id) => apiClient.get(`${ENDPOINT}/${id}`),
|
|---|
| 9 |
|
|---|
| 10 | getPatientByEmbg: (embg) => apiClient.get(`${ENDPOINT}/embg/${embg}`),
|
|---|
| 11 |
|
|---|
| 12 | getPatientByEmail: (email) => apiClient.get(`${ENDPOINT}/email/${email}`),
|
|---|
| 13 |
|
|---|
| 14 | createPatient: (patient) => apiClient.post(ENDPOINT, patient),
|
|---|
| 15 |
|
|---|
| 16 | updatePatient: (id, patient) => apiClient.put(`${ENDPOINT}/${id}`, patient),
|
|---|
| 17 | };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.