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_TAMARA_OPT = '/api/orders/paymentoptions/tamara';
// var BASE_URL = 'http://10.50.100.198:4422/';
// var BASE_URL = 'https://uat.hmgwebservices.com/';
var BASE_URL = 'https://hmgwebservices.com/';
var BASE_URL = 'https://uat.hmgwebservices.com/';
// var BASE_URL = 'https://hmgwebservices.com/';
// var BASE_URL = 'http://10.20.200.111:1010/';
// var BASE_URL = 'https://uat.hmgwebservices.com/';
// var BASE_URL = 'https://hmgwebservices.com/';

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

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

@ -93,16 +93,21 @@ class _QRCodeState extends State<QRCode> {
}
startLocationCheckIn() async {
GifLoaderDialogUtils.showMyDialog(context);
locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context);
locationUtils.getCurrentLocation(callBack: (value) {
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;
print(dist);
if (dist <= projectDetailListModel.geofenceRadius) {
GifLoaderDialogUtils.hideDialog(context);
sendNfcCheckInRequest(projectDetailListModel.checkInQrCode, 3);
} else {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: TranslationBase.of(context).locationCheckInError);
}
}, failureCallBack: () {
GifLoaderDialogUtils.hideDialog(context);
});
}

@ -650,7 +650,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
authService.getDashboard().then((value) async {
setState(() {
if (value != null) {
notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString();
notificationCount = value ['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString();
model.setState(model.count, 0, true, notificationCount);
sharedPref.setString(NOTIFICATION_COUNT, notificationCount);
FlutterAppIconBadge.updateBadge(num.parse(notificationCount));

@ -12,6 +12,7 @@ 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';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart';
@ -197,7 +198,9 @@ class ReportListWidget extends StatelessWidget {
GifLoaderDialogUtils.showMyDialog(AppGlobal.context);
ReportsService _reportsService = locator<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)
.then((value) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);

@ -28,7 +28,7 @@ class LocationUtils {
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) {
_getHMSCurrentLocation(callBack);
} else {
@ -68,7 +68,7 @@ class LocationUtils {
print(err);
});
} else {
if (isShowConfirmDialog) showErrorLocationDialog(false);
if (isShowConfirmDialog) showErrorLocationDialog(false, failureCallBack: failureCallBack);
}
}).catchError((err) {
print(err);
@ -141,14 +141,28 @@ class LocationUtils {
}
}
showErrorLocationDialog(bool isPermissionError) {
showErrorLocationDialog(bool isPermissionError, {Function() failureCallBack}) {
ConfirmDialog dialog = new ConfirmDialog(
context: context,
confirmMessage: TranslationBase.of(context).locationDialogMessage,
okText: TranslationBase.of(context).confirm,
cancelText: TranslationBase.of(context).cancel_nocaps,
okFunction: () => {ConfirmDialog.closeAlertDialog(context), if (isPermissionError) Geolocator.openAppSettings() else Geolocator.openLocationSettings(), Navigator.of(context).canPop()},
cancelFunction: () => {});
okFunction: () {
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);
}

Loading…
Cancel
Save