|
|
|
|
@ -232,7 +232,7 @@ class BaseAppClient {
|
|
|
|
|
Map<String, String> headers = {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
'Accept': 'application/json',
|
|
|
|
|
'Authorization': token ?? '',
|
|
|
|
|
'Authorization': pharmacyToken ?? '',
|
|
|
|
|
'Mobilenumber': user != null ? Utils.getPhoneNumberWithoutZero(user['MobileNumber'].toString()) : "",
|
|
|
|
|
'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9',
|
|
|
|
|
'Username': user != null ? user['PatientID'].toString() : "",
|
|
|
|
|
@ -291,20 +291,21 @@ class BaseAppClient {
|
|
|
|
|
body['PatientID'] = body['PatientID'] != null ? body['PatientID'] : user['PatientID'];
|
|
|
|
|
body['PatientOutSA'] = user['OutSA'];
|
|
|
|
|
body['SessionID'] = SESSION_ID; //getSe
|
|
|
|
|
headers = {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
'Accept': 'application/json',
|
|
|
|
|
'Authorization': pharmacyToken,
|
|
|
|
|
'Mobilenumber': user['MobileNumber'].toString(),
|
|
|
|
|
'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9',
|
|
|
|
|
'Username': user['PatientID'].toString(),
|
|
|
|
|
};
|
|
|
|
|
// headers = {
|
|
|
|
|
// 'Content-Type': 'application/json',
|
|
|
|
|
// 'Accept': 'application/json',
|
|
|
|
|
// 'Authorization': pharmacyToken,
|
|
|
|
|
// 'Mobilenumber': user['MobileNumber'].toString(),
|
|
|
|
|
// 'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9',
|
|
|
|
|
// 'Username': user['PatientID'].toString(),
|
|
|
|
|
// };
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
print("URL : $url");
|
|
|
|
|
print("Body : ${json.encode(body)}");
|
|
|
|
|
print("Headers : ${json.encode(headers)}");
|
|
|
|
|
|
|
|
|
|
if (await Utils.checkConnection()) {
|
|
|
|
|
final response = await http.post(Uri.parse(url.trim()), body: json.encode(body), headers: headers);
|
|
|
|
|
@ -709,7 +710,6 @@ class BaseAppClient {
|
|
|
|
|
|
|
|
|
|
body['PatientTypeID'] = body.containsKey('PatientTypeID')
|
|
|
|
|
? body['PatientTypeID'] != null
|
|
|
|
|
|
|
|
|
|
? body['PatientTypeID']
|
|
|
|
|
: user['PatientType'] != null
|
|
|
|
|
? user['PatientType']
|
|
|
|
|
|