Add new patient access route, add new db connection for data_access DB, add security to notification apis, create new patient access apis (get, add, update), update patient queue api to remove access and revoke date

This commit is contained in:
2024-11-06 10:43:07 +02:00
parent cad6f01b08
commit 1262d22a30
5 changed files with 290 additions and 103 deletions

View File

@@ -42,7 +42,7 @@ class notificationInsertRequest(BaseModel):
# Get Notifications By app ID
@router.get("/notifications/{app_id}", tags=["Notifications"])
async def read_notifications_By_app_ID(app_id: str, amount: int): # , session: SessionContainer = Depends(verify_session())
async def read_notifications_By_app_ID(app_id: str, amount: int, session: SessionContainer = Depends(verify_session())): # , session: SessionContainer = Depends(verify_session())
db = database.dbConnection.dbAppDataConnect()
cursor = db.cursor()
#query = "SELECT * FROM patients"
@@ -102,7 +102,7 @@ async def insert_Patient(itemRequest : notificationInsertRequest, session: Sessi
# Update Patient on table
@router.put("/notifications/update/{notification_id}", tags=["Notifications"])
async def Update_Patient(notification_id : str): #, session: SessionContainer = Depends(verify_session())
async def Update_Patient(notification_id : str, session: SessionContainer = Depends(verify_session())): #, session: SessionContainer = Depends(verify_session())
db = database.dbConnection.dbAppDataConnect()
cursor = db.cursor()
query = "update notifications "