update Patient Profile nav pt2

This commit is contained in:
2025-08-21 19:36:27 +02:00
parent 94ae6dd5d2
commit 2126cfdf88
3 changed files with 190 additions and 58 deletions

View File

@@ -64,4 +64,43 @@ class MihPatientServices {
);
return response.statusCode;
}
Future<int> updatePatientService(
String app_id,
String id_no,
String fname,
String lname,
String email,
String cell,
String medAid,
String medMainMem,
String medNo,
String medAidCode,
String medName,
String medScheme,
String address,
) async {
var response = await http.put(
Uri.parse("$baseAPI/patients/update/"),
headers: <String, String>{
"Content-Type": "application/json; charset=UTF-8"
},
body: jsonEncode(<String, dynamic>{
"id_no": id_no,
"first_name": fname,
"last_name": lname,
"email": email,
"cell_no": cell,
"medical_aid": medAid,
"medical_aid_main_member": medMainMem,
"medical_aid_no": medNo,
"medical_aid_code": medAidCode,
"medical_aid_name": medName,
"medical_aid_scheme": medScheme,
"address": address,
"app_id": app_id,
}),
);
return response.statusCode;
}
}