Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

renamed route paths and names to use user group names #103

Merged
merged 2 commits into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions app/api/routes/intakes/delete_intake_uuid.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from sqlalchemy.orm import Session

from . import router
from api.constants import SANCTUARY

from api.main.database import get_db_sanctuary as get_db
from api.models.intake import (
Expand All @@ -17,9 +18,10 @@


@router.delete(
"/intake",
f"/{SANCTUARY}/form",
status_code=204,
name="delete-intake",
name=f"delete-{SANCTUARY}-form",
tags=[SANCTUARY],
)
def delete_intake(
uuid: UUID,
Expand Down
6 changes: 4 additions & 2 deletions app/api/routes/intakes/get_intake_uuid.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from sqlalchemy.orm import Session

from . import router
from api.constants import SANCTUARY

from api.main.database import get_db_sanctuary as get_db
from api.models.intake import get_intake_by_uuid
Expand All @@ -15,10 +16,11 @@


@router.get(
"/intake",
f"/{SANCTUARY}/form",
status_code=200,
response_model=IntakeResponseSchema,
name="get-intake",
name=f"get-{SANCTUARY}-form",
tags=[SANCTUARY],
)
def get_intake(
uuid: UUID,
Expand Down
6 changes: 4 additions & 2 deletions app/api/routes/intakes/get_intakes.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from sqlalchemy.orm import Session

from . import router
from api.constants import SANCTUARY

from api.main.database import get_db_sanctuary as get_db
from api.models.intake import get_all_intakes
Expand All @@ -15,10 +16,11 @@


@router.get(
"/intakes",
f"/{SANCTUARY}/form",
status_code=200,
response_model=List[IntakeResponseSchema],
name="get-intakes",
name=f"get-{SANCTUARY}-form",
tags=[SANCTUARY],
)
def get_intakes(
db: Session = Depends(get_db),
Expand Down
6 changes: 4 additions & 2 deletions app/api/routes/intakes/get_latest_intake_rfid.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from sqlalchemy.orm import Session

from . import router
from api.constants import SANCTUARY

from api.main.database import get_db_sanctuary as get_db
from api.models.intake import get_latest_intake_by_guest_rfid
Expand All @@ -14,10 +15,11 @@


@router.get(
"/latest-intake-rfid",
f"/{SANCTUARY}/latest-form-rfid",
status_code=200,
response_model=IntakeResponseSchema,
name="get-latest-intake-rfid",
name=f"get-latest-{SANCTUARY}-rfid",
tags=[SANCTUARY],
)
def get_latest_intake_rfid(
guest_rfid: str,
Expand Down
6 changes: 4 additions & 2 deletions app/api/routes/intakes/submit_intake.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from sqlalchemy.orm import Session

from . import router
from api.constants import SANCTUARY

from api.main.auth import load_current_user
from api.main.database import get_db_sanctuary as get_db
Expand All @@ -19,10 +20,11 @@


@router.post(
"/create-intake",
f"/{SANCTUARY}/form",
status_code=200,
response_model=IntakeResponseSchema,
name="create-intake",
name=f"create-{SANCTUARY}-form",
tags=[SANCTUARY],
)
def post_intake(
data: IntakeSchema,
Expand Down
6 changes: 4 additions & 2 deletions app/api/routes/intakes/update_intake.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from sqlalchemy.orm import Session

from . import router
from api.constants import SANCTUARY

from api.main.database import get_db_sanctuary as get_db
from api.models.intake import (
Expand All @@ -19,10 +20,11 @@


@router.put(
"/intake",
f"/{SANCTUARY}/form",
status_code=200,
response_model=IntakeResponseSchema,
name="update-intake",
name=f"update-{SANCTUARY}-form",
tags=[SANCTUARY],
)
def update_intake(
data: IntakeResponseSchema,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
from sqlalchemy.orm import Session

from . import router
from api.constants import MEDICAL


from api.main.database import get_db
from api.models.patient_encounter import (
Expand All @@ -17,9 +19,10 @@


@router.delete(
"/patient-encounter",
f"/{MEDICAL}/form",
status_code=204,
name="delete-patient-encounter",
name=f"delete-{MEDICAL}-form",
tags=[MEDICAL],
)
def delete_patient_encounter(
uuid: UUID,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from sqlalchemy.orm import Session

from . import router
from api.constants import MEDICAL

from api.main.database import get_db
from api.models.patient_encounter import get_latest_patient_encounter_by_patient_rfid
Expand All @@ -14,10 +15,11 @@


@router.get(
"/latest-patient-encounter-rfid",
f"/{MEDICAL}/latest-form-rfid",
status_code=200,
response_model=PatientEncounterResponseSchema,
name="get-latest-patient-encounter-rfid",
name=f"get-latest-{MEDICAL}-form-rfid",
tags=[MEDICAL],
)
def get_latest_patient_encounter_rfid(
patient_rfid: str,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from sqlalchemy.orm import Session

from . import router
from api.constants import MEDICAL

from api.main.database import get_db
from api.models.patient_encounter import get_patient_encounter_by_uuid
Expand All @@ -15,10 +16,11 @@


@router.get(
"/patient-encounter",
f"/{MEDICAL}/form",
status_code=200,
response_model=PatientEncounterResponseSchema,
name="get-patient-encounter",
name=f"get-{MEDICAL}-form",
tags=[MEDICAL],
)
def get_patient_encounter(
uuid: UUID,
Expand Down
6 changes: 4 additions & 2 deletions app/api/routes/patient_encounter/get_patient_encounters.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from sqlalchemy.orm import Session

from . import router
from api.constants import MEDICAL

from api.main.database import get_db
from api.models.patient_encounter import get_all_patient_encounters
Expand All @@ -15,10 +16,11 @@


@router.get(
"/patient-encounters",
f"/{MEDICAL}/forms",
status_code=200,
response_model=List[PatientEncounterResponseSchema],
name="get-patient-encounters",
name="get-{MEDCIAL}-forms",
tags=[MEDICAL],
)
def get_patient_encounters(
db: Session = Depends(get_db),
Expand Down
6 changes: 4 additions & 2 deletions app/api/routes/patient_encounter/submit_patient_encounter.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from sqlalchemy.orm import Session

from . import router
from api.constants import MEDICAL

from api.main.auth import load_current_user
from api.main.database import get_db
Expand All @@ -19,10 +20,11 @@


@router.post(
"/create-patient-encounter",
f"/{MEDICAL}/form",
status_code=200,
response_model=PatientEncounterResponseSchema,
name="create-patient-encounter",
name=f"create-{MEDICAL}-form",
tags=[MEDICAL],
)
def post_patient_encounter(
data: PatientEncounterSchema,
Expand Down
6 changes: 4 additions & 2 deletions app/api/routes/patient_encounter/update_patient_encounter.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from sqlalchemy.orm import Session

from . import router
from api.constants import MEDICAL

from api.main.database import get_db
from api.models.patient_encounter import (
Expand All @@ -19,10 +20,11 @@


@router.put(
"/patient-encounter",
f"/{MEDICAL}/form",
status_code=200,
response_model=PatientEncounterResponseSchema,
name="update-patient-encounter",
name=f"update-{MEDICAL}-form",
tags=[MEDICAL],
)
def update_encounter(
data: PatientEncounterResponseSchema,
Expand Down
Loading