Medical report changes, Loading added in Location Check-In

dev_3.3_faiz_payfort
haroon amjad 2 years ago
parent 63621b5fed
commit b39357a497

@ -20,8 +20,8 @@ var PACKAGES_ORDERS = '/api/orders';
var PACKAGES_ORDER_HISTORY = '/api/orders/items'; var PACKAGES_ORDER_HISTORY = '/api/orders/items';
var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara';
// var BASE_URL = 'http://10.50.100.198:4422/'; // var BASE_URL = 'http://10.50.100.198:4422/';
// var BASE_URL = 'https://uat.hmgwebservices.com/'; var BASE_URL = 'https://uat.hmgwebservices.com/';
var BASE_URL = 'https://hmgwebservices.com/'; // var BASE_URL = 'https://hmgwebservices.com/';
// var BASE_URL = 'http://10.20.200.111:1010/'; // var BASE_URL = 'http://10.20.200.111:1010/';
// var BASE_URL = 'https://uat.hmgwebservices.com/'; // var BASE_URL = 'https://uat.hmgwebservices.com/';
// var BASE_URL = 'https://hmgwebservices.com/'; // var BASE_URL = 'https://hmgwebservices.com/';

@ -5,6 +5,7 @@ class Reports {
DateTime encounterDate; DateTime encounterDate;
int projectID; int projectID;
int invoiceNo; int invoiceNo;
int invoiceNo_VP;
int encounterNo; int encounterNo;
String procedureId; String procedureId;
int requestType; int requestType;
@ -35,6 +36,7 @@ class Reports {
this.encounterDate, this.encounterDate,
this.projectID, this.projectID,
this.invoiceNo, this.invoiceNo,
this.invoiceNo_VP,
this.encounterNo, this.encounterNo,
this.procedureId, this.procedureId,
this.requestType, this.requestType,
@ -67,6 +69,7 @@ class Reports {
json['EncounterDate']); //json['EncounterDate']; json['EncounterDate']); //json['EncounterDate'];
projectID = json['ProjectID']; projectID = json['ProjectID'];
invoiceNo = json['InvoiceNo']; invoiceNo = json['InvoiceNo'];
invoiceNo_VP = json['InvoiceNo_VP'];
encounterNo = json['EncounterNo']; encounterNo = json['EncounterNo'];
procedureId = json['ProcedureId']; procedureId = json['ProcedureId'];
requestType = json['RequestType']; requestType = json['RequestType'];
@ -104,6 +107,7 @@ class Reports {
data['EncounterDate'] = this.encounterDate; data['EncounterDate'] = this.encounterDate;
data['ProjectID'] = this.projectID; data['ProjectID'] = this.projectID;
data['InvoiceNo'] = this.invoiceNo; data['InvoiceNo'] = this.invoiceNo;
data['InvoiceNo_VP'] = this.invoiceNo_VP;
data['EncounterNo'] = this.encounterNo; data['EncounterNo'] = this.encounterNo;
data['ProcedureId'] = this.procedureId; data['ProcedureId'] = this.procedureId;
data['RequestType'] = this.requestType; data['RequestType'] = this.requestType;

@ -175,7 +175,7 @@ class BaseAppClient {
// body['IdentificationNo'] = 1023854217; // body['IdentificationNo'] = 1023854217;
// body['MobileNo'] = "531940021"; // body['MobileNo'] = "531940021";
// body['PatientID'] = 1018977; //3844083 // body['PatientID'] = 1400563; //3844083
// body['TokenID'] = "@dm!n"; // body['TokenID'] = "@dm!n";
// Patient ID: 3027574 // Patient ID: 3027574

@ -93,16 +93,21 @@ class _QRCodeState extends State<QRCode> {
} }
startLocationCheckIn() async { startLocationCheckIn() async {
GifLoaderDialogUtils.showMyDialog(context);
locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context); locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context);
locationUtils.getCurrentLocation(callBack: (value) { locationUtils.getCurrentLocation(callBack: (value) {
projectDetailListModel = Utils.getProjectDetailObj(projectViewModel, widget.appointment.projectID); projectDetailListModel = Utils.getProjectDetailObj(projectViewModel, widget.appointment.projectID);
double dist = Utils.distance(value.latitude, value.longitude, double.parse(projectDetailListModel.latitude), double.parse(projectDetailListModel.longitude)).ceilToDouble() * 1000; double dist = Utils.distance(value.latitude, value.longitude, double.parse(projectDetailListModel.latitude), double.parse(projectDetailListModel.longitude)).ceilToDouble() * 1000;
print(dist); print(dist);
if (dist <= projectDetailListModel.geofenceRadius) { if (dist <= projectDetailListModel.geofenceRadius) {
GifLoaderDialogUtils.hideDialog(context);
sendNfcCheckInRequest(projectDetailListModel.checkInQrCode, 3); sendNfcCheckInRequest(projectDetailListModel.checkInQrCode, 3);
} else { } else {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: TranslationBase.of(context).locationCheckInError); AppToast.showErrorToast(message: TranslationBase.of(context).locationCheckInError);
} }
}, failureCallBack: () {
GifLoaderDialogUtils.hideDialog(context);
}); });
} }

@ -12,6 +12,7 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart'; import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart';
@ -197,7 +198,9 @@ class ReportListWidget extends StatelessWidget {
GifLoaderDialogUtils.showMyDialog(AppGlobal.context); GifLoaderDialogUtils.showMyDialog(AppGlobal.context);
ReportsService _reportsService = locator<ReportsService>(); ReportsService _reportsService = locator<ReportsService>();
_reportsService _reportsService
.sendEmailForMedicalReport(report.projectName, report.clinicDescription, report.doctorName, DateUtil.convertDateToString(report.requestDate), report.invoiceNo.toString(), report.projectID, .sendEmailForMedicalReport(report.projectName, report.clinicDescription, report.doctorName, DateUtil.convertDateToString(report.requestDate),
Utils.isVidaPlusProject(projectViewModel, report.projectID) ? report.invoiceNo_VP.toString() : report.invoiceNo.toString(),
report.projectID,
DateUtil.convertDateToString(report.requestDate), report.setupId) DateUtil.convertDateToString(report.requestDate), report.setupId)
.then((value) { .then((value) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context); GifLoaderDialogUtils.hideDialog(AppGlobal.context);

@ -28,7 +28,7 @@ class LocationUtils {
LocationUtils({@required this.isShowConfirmDialog, @required this.context, this.isHuawei = false}); LocationUtils({@required this.isShowConfirmDialog, @required this.context, this.isHuawei = false});
void getCurrentLocation({Function(LatLng) callBack}) async { void getCurrentLocation({Function(LatLng) callBack, Function() failureCallBack}) async {
if (Platform.isAndroid && isHuawei) { if (Platform.isAndroid && isHuawei) {
_getHMSCurrentLocation(callBack); _getHMSCurrentLocation(callBack);
} else { } else {
@ -68,7 +68,7 @@ class LocationUtils {
print(err); print(err);
}); });
} else { } else {
if (isShowConfirmDialog) showErrorLocationDialog(false); if (isShowConfirmDialog) showErrorLocationDialog(false, failureCallBack: failureCallBack);
} }
}).catchError((err) { }).catchError((err) {
print(err); print(err);
@ -141,14 +141,28 @@ class LocationUtils {
} }
} }
showErrorLocationDialog(bool isPermissionError) { showErrorLocationDialog(bool isPermissionError, {Function() failureCallBack}) {
ConfirmDialog dialog = new ConfirmDialog( ConfirmDialog dialog = new ConfirmDialog(
context: context, context: context,
confirmMessage: TranslationBase.of(context).locationDialogMessage, confirmMessage: TranslationBase.of(context).locationDialogMessage,
okText: TranslationBase.of(context).confirm, okText: TranslationBase.of(context).confirm,
cancelText: TranslationBase.of(context).cancel_nocaps, cancelText: TranslationBase.of(context).cancel_nocaps,
okFunction: () => {ConfirmDialog.closeAlertDialog(context), if (isPermissionError) Geolocator.openAppSettings() else Geolocator.openLocationSettings(), Navigator.of(context).canPop()}, okFunction: () {
cancelFunction: () => {}); ConfirmDialog.closeAlertDialog(context);
if (isPermissionError)
Geolocator.openAppSettings();
else
Geolocator.openLocationSettings();
Navigator.of(context).canPop();
if (failureCallBack != null) {
failureCallBack();
}
},
cancelFunction: () {
if (failureCallBack != null) {
failureCallBack();
}
});
return dialog.showAlertDialog(context); return dialog.showAlertDialog(context);
} }

Loading…
Cancel
Save