Change to Patient Update and Add Patient Notes Instert & Update

This commit is contained in:
2024-03-23 12:42:44 +02:00
parent 2a3cee5da6
commit 63b6f564a4
13 changed files with 61 additions and 4 deletions

View File

@@ -145,9 +145,8 @@ async def insertPatient(itemRequest : patientInsertRequest):
return {"message": "Successfully Created Record"}
# Update Patient on table
@router.put("/patients/update/{idpatient}", tags="patients")
async def UpdatePatient(idpatient: int,
itemRequest : patientUpdateRequest):
@router.put("/patients/update/", tags="patients")
async def UpdatePatient(itemRequest : patientUpdateRequest):
db = dbConnect()
cursor = db.cursor()
query = "update patients "
@@ -164,7 +163,7 @@ async def UpdatePatient(idpatient: int,
itemRequest.medical_aid_scheme,
itemRequest.address,
itemRequest.doc_office_id,
idpatient)
itemRequest.idpatients)
try:
cursor.execute(query, patientData)
except Exception as error: