|
|
|
@ -5,6 +5,7 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
|
|
|
import 'package:doctor_app_flutter/models/patient/prescription_req_model.dart';
|
|
|
|
import 'package:doctor_app_flutter/models/patient/prescription_req_model.dart';
|
|
|
|
import 'package:doctor_app_flutter/models/patient/prescription_res_model.dart';
|
|
|
|
import 'package:doctor_app_flutter/models/patient/prescription_res_model.dart';
|
|
|
|
import 'package:doctor_app_flutter/models/patient/radiology_res_model.dart';
|
|
|
|
import 'package:doctor_app_flutter/models/patient/radiology_res_model.dart';
|
|
|
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/auth/login_form.dart';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:http/http.dart';
|
|
|
|
import 'package:http/http.dart';
|
|
|
|
import 'package:http_interceptor/http_client_with_interceptor.dart';
|
|
|
|
import 'package:http_interceptor/http_client_with_interceptor.dart';
|
|
|
|
@ -23,6 +24,7 @@ const GET_PATIENT_LAB_OREDERS =
|
|
|
|
const GET_PRESCRIPTION = BASE_URL + 'Patients.svc/REST/GetPrescriptionApptList';
|
|
|
|
const GET_PRESCRIPTION = BASE_URL + 'Patients.svc/REST/GetPrescriptionApptList';
|
|
|
|
const GET_RADIOLOGY =
|
|
|
|
const GET_RADIOLOGY =
|
|
|
|
BASE_URL + 'DoctorApplication.svc/REST/GetPatientRadResult';
|
|
|
|
BASE_URL + 'DoctorApplication.svc/REST/GetPatientRadResult';
|
|
|
|
|
|
|
|
Helpers helpers = Helpers();
|
|
|
|
|
|
|
|
|
|
|
|
class PatientsProvider with ChangeNotifier {
|
|
|
|
class PatientsProvider with ChangeNotifier {
|
|
|
|
bool isLoading = false;
|
|
|
|
bool isLoading = false;
|
|
|
|
@ -77,8 +79,8 @@ class PatientsProvider with ChangeNotifier {
|
|
|
|
//***********************
|
|
|
|
//***********************
|
|
|
|
|
|
|
|
|
|
|
|
return Future.value(json.decode(response.body));
|
|
|
|
return Future.value(json.decode(response.body));
|
|
|
|
} catch (error) {
|
|
|
|
} catch (err) {
|
|
|
|
throw error;
|
|
|
|
throw err;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -129,8 +131,8 @@ class PatientsProvider with ChangeNotifier {
|
|
|
|
error = 'Please Check The Internet Connection';
|
|
|
|
error = 'Please Check The Internet Connection';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
notifyListeners();
|
|
|
|
notifyListeners();
|
|
|
|
} catch (error) {
|
|
|
|
} catch (err) {
|
|
|
|
throw error;
|
|
|
|
handelCatchErrorCase(err);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -183,8 +185,8 @@ class PatientsProvider with ChangeNotifier {
|
|
|
|
error = 'Please Check The Internet Connection';
|
|
|
|
error = 'Please Check The Internet Connection';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
notifyListeners();
|
|
|
|
notifyListeners();
|
|
|
|
} catch (error) {
|
|
|
|
} catch (err) {
|
|
|
|
throw error;
|
|
|
|
handelCatchErrorCase(err);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -229,11 +231,25 @@ class PatientsProvider with ChangeNotifier {
|
|
|
|
error = 'Please Check The Internet Connection';
|
|
|
|
error = 'Please Check The Internet Connection';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
notifyListeners();
|
|
|
|
notifyListeners();
|
|
|
|
} catch (error) {
|
|
|
|
} catch (err) {
|
|
|
|
throw error;
|
|
|
|
handelCatchErrorCase(err);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*@author: Elham Rababah
|
|
|
|
|
|
|
|
*@Date:12/5/2020
|
|
|
|
|
|
|
|
*@param: patient
|
|
|
|
|
|
|
|
*@return:
|
|
|
|
|
|
|
|
*@desc: getPatientRadiology
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
handelCatchErrorCase(err) {
|
|
|
|
|
|
|
|
isLoading = false;
|
|
|
|
|
|
|
|
isError = true;
|
|
|
|
|
|
|
|
error = helpers.generateContactAdminMsg(err);
|
|
|
|
|
|
|
|
notifyListeners();
|
|
|
|
|
|
|
|
throw err;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*@author: Elham Rababah
|
|
|
|
/*@author: Elham Rababah
|
|
|
|
*@Date:3/5/2020
|
|
|
|
*@Date:3/5/2020
|
|
|
|
*@param: patient
|
|
|
|
*@param: patient
|
|
|
|
@ -273,8 +289,8 @@ class PatientsProvider with ChangeNotifier {
|
|
|
|
error = 'Please Check The Internet Connection';
|
|
|
|
error = 'Please Check The Internet Connection';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
notifyListeners();
|
|
|
|
notifyListeners();
|
|
|
|
} catch (error) {
|
|
|
|
} catch (err) {
|
|
|
|
throw error;
|
|
|
|
handelCatchErrorCase(err);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|