|
|
|
@ -10,7 +10,6 @@ import 'package:flutter/cupertino.dart';
|
|
|
|
|
import 'package:http/http.dart' as http;
|
|
|
|
|
import 'dart:io' show Platform;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
|
|
|
|
|
Helpers helpers = new Helpers();
|
|
|
|
|
//ProjectProvider projectsProvider = new ProjectProvider();
|
|
|
|
@ -86,7 +85,7 @@ class BaseAppClient {
|
|
|
|
|
|
|
|
|
|
print("URL : $url");
|
|
|
|
|
print("Body : ${json.encode(body)}");
|
|
|
|
|
String asd= json.encode(body);
|
|
|
|
|
|
|
|
|
|
if (await Helpers.checkConnection()) {
|
|
|
|
|
final response = await http.post(url,
|
|
|
|
|
body: json.encode(body),
|
|
|
|
@ -170,13 +169,12 @@ class BaseAppClient {
|
|
|
|
|
: IS_DENTAL_ALLOWED_BACKEND;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
body['DeviceTypeID'] = Platform.isAndroid ? 1: 2;
|
|
|
|
|
|
|
|
|
|
body['DeviceTypeID'] = Platform.isAndroid ? 1 : 2;
|
|
|
|
|
|
|
|
|
|
body['PatientType'] = body.containsKey('PatientType')
|
|
|
|
|
? body['PatientType'] != null
|
|
|
|
|
? body['PatientType']
|
|
|
|
|
: patient.patientType!= null
|
|
|
|
|
: patient.patientType != null
|
|
|
|
|
? patient.patientType
|
|
|
|
|
: PATIENT_TYPE
|
|
|
|
|
: PATIENT_TYPE;
|
|
|
|
@ -184,7 +182,7 @@ class BaseAppClient {
|
|
|
|
|
body['PatientTypeID'] = body.containsKey('PatientTypeID')
|
|
|
|
|
? body['PatientTypeID'] != null
|
|
|
|
|
? body['PatientTypeID']
|
|
|
|
|
: patient.patientType!= null
|
|
|
|
|
: patient.patientType != null
|
|
|
|
|
? patient.patientType
|
|
|
|
|
: PATIENT_TYPE_ID
|
|
|
|
|
: PATIENT_TYPE_ID;
|
|
|
|
@ -192,12 +190,11 @@ class BaseAppClient {
|
|
|
|
|
body['TokenID'] = token;
|
|
|
|
|
body['PatientID'] = body['PatientID'] != null
|
|
|
|
|
? body['PatientID']
|
|
|
|
|
: patient.patientId?? patient.patientMRN;
|
|
|
|
|
: patient.patientId ?? patient.patientMRN;
|
|
|
|
|
|
|
|
|
|
body['PatientOutSA'] = 0;//user['OutSA']; //TODO change it
|
|
|
|
|
body['PatientOutSA'] = 0; //user['OutSA']; //TODO change it
|
|
|
|
|
body['SessionID'] = SESSION_ID; //getSe
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print("URL : $url");
|
|
|
|
|
print("Body : ${json.encode(body)}");
|
|
|
|
|
|
|
|
|
|