updates & fixes

development_v2.5
haroon amjad 3 years ago
parent dfa88b7de7
commit 106334c9cf

@ -408,7 +408,7 @@ var UPDATE_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnar
var CHANNEL = 3;
var GENERAL_ID = 'Cs2020@2016\$2958';
var IP_ADDRESS = '10.20.10.20';
var VERSION_ID = 9.1;
var VERSION_ID = 9.2;
var SETUP_ID = '91877';
var LANGUAGE = 2;
// var PATIENT_OUT_SA = 0;

@ -92,21 +92,37 @@ class BaseAppClient {
body['DeviceTypeID'] = Platform.isIOS ? 1 : 2;
if (!body.containsKey('IsPublicRequest')) {
body['PatientType'] = body.containsKey('PatientType')
? body['PatientType'] != null
? body['PatientType']
: user['PatientType'] != null
? user['PatientType']
: PATIENT_TYPE
: PATIENT_TYPE;
body['PatientTypeID'] = body.containsKey('PatientTypeID')
? body['PatientTypeID'] != null
? body['PatientTypeID']
: user['PatientType'] != null
? user['PatientType']
: PATIENT_TYPE_ID
: PATIENT_TYPE_ID;
// if (!body.containsKey('PatientType')) {
if (user != null && user['PatientType'] != null) {
body['PatientType'] = user['PatientType'];
} else {
body['PatientType'] = PATIENT_TYPE;
}
// }
// body['PatientType'] = body.containsKey('PatientType')
// ? body['PatientType'] != null
// ? body['PatientType']
// : user['PatientType'] != null
// ? user['PatientType']
// : PATIENT_TYPE
// : PATIENT_TYPE;
// if (!body.containsKey('PatientTypeID')) {
if (user != null && user['PatientType'] != null) {
body['PatientTypeID'] = user['PatientType'];
} else {
body['PatientType'] = PATIENT_TYPE_ID;
}
// }
// body['PatientTypeID'] = body.containsKey('PatientTypeID')
// ? body['PatientTypeID'] != null
// ? body['PatientTypeID']
// : user['PatientType'] != null
// ? user['PatientType']
// : PATIENT_TYPE_ID
// : PATIENT_TYPE_ID;
if (user != null) {
body['TokenID'] = body['TokenID'] != null ? body['TokenID'] : token;

@ -40,7 +40,7 @@ class PharmacyModuleService extends BaseService {
}
}
Future createUser() async {
Future<int> createUser() async {
var data = await sharedPref.getObject(USER_PROFILE);
var languageID = await sharedPref.getString(APP_LANGUAGE);
Map<String, String> queryParams = {
@ -59,7 +59,6 @@ class PharmacyModuleService extends BaseService {
await sharedPref.setObject(PHARMACY_CUSTOMER_ID, customerInfo.customerId);
await sharedPref.setObject(PHARMACY_CUSTOMER_GUID, response['customerDto']['customerGuid']);
}
// await generatePharmacyToken();
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
@ -67,6 +66,7 @@ class PharmacyModuleService extends BaseService {
} catch (error) {
throw error;
}
return Future.value(1);
}
Future generatePharmacyToken() async {

@ -1,11 +1,11 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'dart:async';
import 'package:diplomaticquarterapp/core/enum/OrderService.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_request_modle.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/PatientERHHCInsertServicesList.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hhc_all_pres_orders_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart';
@ -38,6 +38,7 @@ class HomeHealthCareViewModel extends BaseViewModel {
GetCMCAllOrdersResponseModel pendingOrder;
List<PatientERHHCInsertServicesList> patientERHHCInsertServicesList = List();
dynamic get hhcResponse => _homeHealthCareService.hhcResponse;
Future getHHCAllServices() async {
@ -107,7 +108,7 @@ class HomeHealthCareViewModel extends BaseViewModel {
}
}
Future getCustomerInfo() async {
Future<int> getCustomerInfo() async {
setState(ViewState.Busy);
await _pharmacyModuleService.generatePharmacyToken();
@ -116,16 +117,19 @@ class HomeHealthCareViewModel extends BaseViewModel {
await _pharmacyModuleService.createUser();
setState(ViewState.ErrorLocal);
} else {
await _pharmacyModuleService.createUser();
await getCustomerAddresses();
await _pharmacyModuleService.createUser().then((value) async {
if (!_pharmacyModuleService.hasError) await getCustomerAddresses();
setState(ViewState.Idle);
}).catchError((err) {});
}
return Future.value(1);
}
Future addAddressInfo({AddNewAddressRequestModel addNewAddressRequestModel}) async {
setState(ViewState.Busy);
// await _pharmacyModuleService.generatePharmacyToken().then((value) async {
await _customerAddressesService.addAddressInfo(addNewAddressRequestModel: addNewAddressRequestModel);
await _customerAddressesService.addAddressInfo(addNewAddressRequestModel: addNewAddressRequestModel);
// });
if (_customerAddressesService.hasError) {

@ -24,7 +24,7 @@ class _RRTServiceData {
List<GetCMCAllOrdersResponseModel> completedOrders = [];
ServicePrice servicePrice;
// RRTProcedureList rrtProcedureList;
// RRTProcedureList rrtProcedureList;
}
class RRTViewModel extends BaseViewModel {
@ -230,7 +230,7 @@ class RRTViewModel extends BaseViewModel {
setState(ViewState.ErrorLocal);
} else {
await _pharmacy_service.createUser();
await getCustomerAddresses();
if (!_pharmacy_service.hasError) await getCustomerAddresses();
}
// setState(ViewState.Busy);

@ -550,6 +550,8 @@ class _BookSuccessState extends State<BookSuccess> {
appo.appointmentNo = widget.patientShareResponse.appointmentNo;
appo.isLiveCareAppointment = widget.patientShareResponse.isLiveCareAppointment;
appo.doctorID = widget.patientShareResponse.doctorID;
appo.appointmentDate = widget.patientShareResponse.appointmentDate;
appo.serviceID = widget.patientShareResponse.serviceID;
Navigator.push(
context,

@ -25,13 +25,10 @@ class Search extends StatefulWidget {
class _SearchState extends State<Search> with TickerProviderStateMixin {
TabController _tabController;
LocationUtils locationUtils;
@override
void initState() {
_tabController = new TabController(length: 2, vsync: this, initialIndex: widget.type);
locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context);
WidgetsBinding.instance.addPostFrameCallback((_) => locationUtils.getCurrentLocation());
super.initState();
}

@ -18,6 +18,7 @@ import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/location_util.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart';
@ -63,8 +64,11 @@ class _SearchByClinicState extends State<SearchByClinic> {
String radioValue = null;
LocationUtils locationUtils;
@override
void initState() {
locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context);
WidgetsBinding.instance.addPostFrameCallback((_) => getClinicsList());
super.initState();
}
@ -509,6 +513,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
} else {
isProjectLoaded = false;
}
locationUtils.getCurrentLocation();
})
.catchError((err) {})
.catchError((err) {

@ -8,7 +8,6 @@ import 'package:diplomaticquarterapp/pages/ErService/widgets/StepsWidget.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';

@ -501,12 +501,12 @@ class _PickupLocationState extends State<PickupLocation> {
else
setState(() {
widget.patientER_RC.transportationDetails.pickupSpot = _isInsideHome ? 1 : 0;
if (widget.patientER_RC.transportationDetails.direction == 0) {
if (widget.patientER_RC.transportationDetails.direction == 0) { // From Hospital
widget.patientER_RC.transportationDetails.dropoffLatitude = _result.lat.toStringAsFixed(6);
widget.patientER_RC.transportationDetails.dropoffLongitude = _result.long.toStringAsFixed(6);
widget.patientER_RC.transportationDetails.pickupLatitude = _selectedHospital.latitude;
widget.patientER_RC.transportationDetails.pickupLongitude = _selectedHospital.longitude;
} else {
} else { // To Hospital
widget.patientER_RC.transportationDetails.pickupLatitude = _selectedHospital.latitude;
widget.patientER_RC.transportationDetails.pickupLongitude = _selectedHospital.longitude;
widget.patientER_RC.transportationDetails.dropoffLatitude = _result.lat.toStringAsFixed(6);

@ -155,7 +155,7 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
width: double.infinity,
height: MediaQuery.of(context).size.width * 0.26,
child: ListView.separated(
itemCount: 5,
itemCount: myMedicalList.length,
padding: EdgeInsets.zero,
scrollDirection: Axis.horizontal,
physics: BouncingScrollPhysics(),

@ -7,6 +7,7 @@ import 'package:diplomaticquarterapp/pages/livecare/widgets/clinic_list.dart';
import 'package:diplomaticquarterapp/pages/livecare/widgets/livecare_logs.dart';
import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -164,6 +165,7 @@ class _LiveCareHomeState extends State<LiveCareHome> with SingleTickerProviderSt
});
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err);
});
}

@ -388,9 +388,9 @@ class PrescriptionItemsPage extends StatelessWidget {
child: DefaultButton(
TranslationBase.of(context).resendOrder,
() {
// if (model.isMedDeliveryAllowed == false) {
// AppToast.showErrorToast(message: TranslationBase.of(context).prescriptionDeliveryError);
// } else {
if (model.isMedDeliveryAllowed == false) {
AppToast.showErrorToast(message: TranslationBase.of(context).prescriptionDeliveryError);
} else {
Navigator.push(
context,
FadePage(
@ -401,7 +401,7 @@ class PrescriptionItemsPage extends StatelessWidget {
),
),
);
// }
}
},
color: model.isMedDeliveryAllowed == false ? Color(0xff575757) : Color(0xff359846),
disabledColor: Color(0xff575757),

@ -615,7 +615,6 @@ class DoctorsListService extends BaseService {
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": 0,
"SessionID": "YckwoXhUmWBsnHKEKig",
"isDentalAllowedBackend": false,
"DeviceTypeID": req.DeviceTypeID,
@ -647,7 +646,6 @@ class DoctorsListService extends BaseService {
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": 0,
"SessionID": "YckwoXhUmWBsnHKEKig",
"isDentalAllowedBackend": false,
"DeviceTypeID": req.DeviceTypeID,
@ -688,7 +686,6 @@ class DoctorsListService extends BaseService {
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": 0,
"SessionID": "YckwoXhUmWBsnHKEKig",
"isDentalAllowedBackend": false,
"DeviceTypeID": req.DeviceTypeID,

@ -27,7 +27,6 @@ class ClinicListService extends BaseService {
"VersionID": req.VersionID,
"Channel": req.Channel,
"generalid": 'Cs2020@2016\$2958',
"PatientOutSA": 0,
"TokenID": "",
"DeviceTypeID": req.DeviceTypeID,
"SessionID": null
@ -83,7 +82,6 @@ class ClinicListService extends BaseService {
"VersionID": req.VersionID,
"Channel": req.Channel,
"generalid": 'Cs2020@2016\$2958',
"PatientOutSA": 0,
"TokenID": "",
"DeviceTypeID": req.DeviceTypeID,
"SessionID": null
@ -121,7 +119,6 @@ class ClinicListService extends BaseService {
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20",
"generalid": "Cs2020@2016\$2958",
"PatientOutSA": 0,
"SessionID": null,
"isDentalAllowedBackend": true,
"DeviceTypeID": 1,
@ -163,7 +160,6 @@ class ClinicListService extends BaseService {
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": 0,
"SessionID": null,
"isDentalAllowedBackend": true,
"Latitude": lat != null ? lat.toString() : "0.0",

@ -4,7 +4,7 @@ import '../widgets/Loader/gif_loader_container.dart';
class GifLoaderDialogUtils {
static showMyDialog(BuildContext context) {
showDialog(context: context, barrierDismissible: true, builder: (cxt) => GifLoaderContainer());
showDialog(context: context, builder: (cxt) => GifLoaderContainer());
}
static hideDialog(BuildContext context) {

@ -25,7 +25,7 @@ class LocationUtils {
BuildContext context;
bool isHuawei;
LocationUtils({@required this.isShowConfirmDialog, @required this.context, @required this.isHuawei = false});
LocationUtils({@required this.isShowConfirmDialog, @required this.context, this.isHuawei = false});
void getCurrentLocation({Function(LatLng) callBack}) async {
if (Platform.isAndroid && isHuawei) {
@ -57,12 +57,6 @@ class LocationUtils {
if (isShowConfirmDialog) showErrorLocationDialog(false);
}
}
// if(await Permission.location.request().isGranted) {
// getCurrentLocation();
// } else {
// setZeroLocation();
// if (isShowConfirmDialog) showErrorLocationDialog(false);
// }
}
}).catchError((err) {
print(err);

@ -654,16 +654,15 @@ class Utils {
),
));
if (projectViewModel.havePrivilege(10)) {
medical.add(InkWell(
onTap: () => Navigator.push(context, FadePage(page: LabsHomePage())),
child: MedicalProfileItem(
title: TranslationBase.of(context).lab,
imagePath: 'lab_result.svg',
subTitle: TranslationBase.of(context).labSubtitle,
),
));
}
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(10) ? Navigator.push(context, FadePage(page: LabsHomePage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).lab,
imagePath: 'lab_result.svg',
subTitle: TranslationBase.of(context).labSubtitle,
isEnable: projectViewModel.havePrivilege(10),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(7) ? Navigator.push(context, FadePage(page: RadiologyHomePage())) : null,
@ -756,7 +755,9 @@ class Utils {
children: [
SizedBox(height: 12),
Text(
isCapitable && !projectViewModel.isArabic ? text.toLowerCase().capitalizeFirstofEach : text, maxLines: 2, overflow: TextOverflow.ellipsis,
isCapitable && !projectViewModel.isArabic ? text.toLowerCase().capitalizeFirstofEach : text,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10),
),
SizedBox(height: 12),

@ -29,17 +29,14 @@ class _GifLoaderContainerState extends State<GifLoaderContainer> with TickerProv
@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () async => false,
child: Center(
//progress-loading.gif
child: Container(
// margin: EdgeInsets.only(bottom: 40),
child: GifImage(
controller: controller1,
image: AssetImage("assets/images/progress-loading-red.gif"), //NetworkImage("http://img.mp.itc.cn/upload/20161107/5cad975eee9e4b45ae9d3c1238ccf91e.jpg"),
),
)),
);
return Center(
//progress-loading.gif
child: Container(
// margin: EdgeInsets.only(bottom: 40),
child: GifImage(
controller: controller1,
image: AssetImage("assets/images/progress-loading-red.gif"), //NetworkImage("http://img.mp.itc.cn/upload/20161107/5cad975eee9e4b45ae9d3c1238ccf91e.jpg"),
),
));
}
}

@ -1,8 +1,9 @@
import 'dart:async';
import 'dart:io';
import 'package:diplomaticquarterapp/services/pharmacy_services/writeReview_service.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
// import 'package:flutter_hms_gms_availability/flutter_hms_gms_availability.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:huawei_hmsavailability/huawei_hmsavailability.dart';
@ -54,7 +55,8 @@ class AppMapState extends State<AppMap> {
@override
void initState() {
hmsApiAvailability = HmsApiAvailability();
checkIsHuawei();
if (Platform.isAndroid) checkIsHuawei();
super.initState();
}
@override

@ -50,8 +50,10 @@ class _PickupLocationFromMapState extends State<PickupLocationFromMap> {
@override
void initState() {
hmsApiAvailability = HmsApiAvailability();
if(Platform.isAndroid) checkIsHuawei();
if(Platform.isAndroid) {
hmsApiAvailability = HmsApiAvailability();
checkIsHuawei();
}
appMap = AppMap(
kGooglePlex.toMap(),

Loading…
Cancel
Save