fix small bug

merge-requests/49/head
Elham Rababah 6 years ago
parent 7a370c29dc
commit 3a9b2d46b8

@ -81,6 +81,13 @@ class PatientsProvider with ChangeNotifier {
} }
} }
setBasicData() {
isLoading = true;
isError = false;
error = '';
notifyListeners();
}
/* /*
*@author: Elham Rababah *@author: Elham Rababah
*@Date:27/4/2020 *@Date:27/4/2020
@ -89,8 +96,7 @@ class PatientsProvider with ChangeNotifier {
*@desc: getPatientVitalSign *@desc: getPatientVitalSign
*/ */
getPatientVitalSign(patient) async { getPatientVitalSign(patient) async {
isLoading = true; setBasicData();
notifyListeners();
try { try {
if (await Helpers.checkConnection()) { if (await Helpers.checkConnection()) {
@ -143,8 +149,9 @@ class PatientsProvider with ChangeNotifier {
*@desc: getLabResult Orders *@desc: getLabResult Orders
*/ */
getLabResultOrders(patient) async { getLabResultOrders(patient) async {
isLoading = true; // isLoading = true;
notifyListeners(); // notifyListeners();
setBasicData();
try { try {
if (await Helpers.checkConnection()) { if (await Helpers.checkConnection()) {
@ -188,8 +195,9 @@ class PatientsProvider with ChangeNotifier {
*@desc: getPatientPrescriptions *@desc: getPatientPrescriptions
*/ */
getPatientPrescriptions(patient) async { getPatientPrescriptions(patient) async {
isLoading = true; // isLoading = true;
notifyListeners(); // notifyListeners();
setBasicData();
try { try {
if (await Helpers.checkConnection()) { if (await Helpers.checkConnection()) {
@ -234,8 +242,9 @@ class PatientsProvider with ChangeNotifier {
*@desc: getPatientRadiology *@desc: getPatientRadiology
*/ */
getPatientRadiology(patient) async { getPatientRadiology(patient) async {
isLoading = true; // isLoading = true;
notifyListeners(); // notifyListeners();
setBasicData();
try { try {
if (await Helpers.checkConnection()) { if (await Helpers.checkConnection()) {
final response = final response =

Loading…
Cancel
Save