Merge branch 'diplomatic-quarter-live' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into hot_fix

dq_and_master
Mohammad Aljammal 4 years ago
commit 19f12116c4

@ -43,6 +43,8 @@ const GET_Patient_LAB_ORDERS_RESULT = 'Services/Patients.svc/REST/GetPatientLabO
///
const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders';
const GET_PATIENT_LAB_ORDERS_BY_APPOINTMENT = 'Services/Patients.svc/REST/GetPatientLabResultsByAppointmentNo';
const GET_PATIENT_ORDERS_DETAILS =
'Services/Patients.svc/REST/Rad_UpdatePatientRadOrdersToRead';
const GET_RAD_IMAGE_URL = 'Services/Patients.svc/Rest/GetRadImageURL';
@ -115,6 +117,8 @@ const GET_BLOOD_REQUEST =
const REPORTS = 'Services/Doctors.svc/REST/GetPatientMedicalReportStatusInfo';
const INSERT_REQUEST_FOR_MEDICAL_REPORT =
'Services/Doctors.svc/REST/InsertRequestForMedicalReport';
const SEND_MEDICAL_REPORT_EMAIL =
'Services/Notifications.svc/REST/SendMedicalReportEmail';
///Rate
const IS_LAST_APPOITMENT_RATED =

@ -1154,6 +1154,18 @@ const Map localizedValues = {
"en": "This service allows you to chat with customer service directly without the need to call.",
"ar": "المحادثة المباشرة: هذه الخدمة تمكنك التحدث كتابياً مع خدمة العملاء مباشرة دون الحاجة الى الاتصال هاتفياً."
},
"last-appointment": {
"en": "How was your appointment?",
"ar": "كيف كان موعدك الطبي ؟"
},
"rate-clinic": {
"en": "Please rate the clinic",
"ar": "يرجى تقييم العيادة"
},
"fetch-data": {
"en": "Fetch Data",
"ar": "تحديث الان"
},
"send-email": {
"en": "Send a copy of this report to the email",
"ar": "أرسل نسخة من هذا التقرير إلى البريد الإلكتروني"

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:flutter/cupertino.dart';
@ -165,8 +166,10 @@ class BaseAppClient {
await authenticatedUserObject.getUser();
Provider.of<ProjectViewModel>(AppGlobal.context, listen: false).isLogin =
false;
var model = Provider.of<ToDoCountProviderModel>(AppGlobal.context);
_vitalSignService.weightKg = "";
_vitalSignService.heightCm = "";
model.setState(0, false);
Navigator.of(AppGlobal.context).pushReplacementNamed(HOME);
}

@ -21,7 +21,11 @@ class PatientSickLeaveService extends BaseService {
}
sendSickLeaveEmail(
{int requestNo, String projectName, String doctorName, int projectID,String setupID}) async {
{int requestNo,
String projectName,
String doctorName,
int projectID,
String setupID}) async {
hasError = false;
super.error = "";
Map<String, dynamic> body = Map();
@ -33,8 +37,8 @@ class PatientSickLeaveService extends BaseService {
body['PatientName'] = user.firstName + " " + user.firstName;
body['ProjectName'] = projectName;
body['DoctorName'] = doctorName;
body['ProjectID'] = 12;
body['SetupID'] = 12;
body['ProjectID'] = projectID;
body['SetupID'] = setupID;
await baseAppClient
.post(SendSickLeaveEmail, onSuccess: (response, statusCode) async {},
onFailure: (String error, int statusCode) {

@ -9,11 +9,11 @@ class ReportsService extends BaseService {
List<AppointmentHistory> appointHistoryList = List();
String userAgreementContent = "";
RequestReports _requestReports = RequestReports(
isReport: true,
encounterType: 1,
requestType: 1,
patientOutSA: 0,
);
isReport: true,
encounterType: 1,
requestType: 1,
patientOutSA: 0,
);
Future getReports() async {
hasError = false;
@ -56,22 +56,18 @@ class ReportsService extends BaseService {
}, body: Map<String, dynamic>());
}
Future updatePatientHealthSummaryReport({bool isSummary}) async {
Map<String, dynamic> body = Map<String, dynamic>();
body['RSummaryReport'] = isSummary;
hasError = false;
await baseAppClient.post(UPDATE_HEALTH_TERMS,
onSuccess: (dynamic response, int statusCode) {
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
onSuccess: (dynamic response, int statusCode) {},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
Future insertRequestForMedicalReport(
AppointmentHistory appointmentHistory) async {
Map<String, dynamic> body = new Map<String, dynamic>();
@ -96,4 +92,44 @@ class ReportsService extends BaseService {
super.error = error;
}, body: body);
}
Future sendEmailForMedicalReport(
String projectName,
String clinicName,
String doctorName,
String requestDate,
String invoiceNo,
int projectID,
String stamp,
String setupID) async {
Map<String, dynamic> body = new Map<String, dynamic>();
body['SetupID'] = setupID;
body['PrintDate'] = requestDate;
body['ProcedureID'] = "05005009";
body['Reporttype'] = "MEDICAL REPORT";
body['stamp'] = stamp;
body['To'] = user.emailAddress;
body['DateofBirth'] = user.dateofBirth;
body['PatientIditificationNum'] = user.patientIdentificationNo;
body['PatientMobileNumber'] = user.mobileNumber;
body['PatientName'] = user.firstName + " " + user.lastName;
body['ProjectName'] = projectName;
body['ClinicName'] = clinicName;
body['ProjectID'] = projectID;
body['InvoiceNo'] = invoiceNo;
body['PrintedByName'] = user.firstName + " " + user.lastName;
dynamic response;
hasError = false;
await baseAppClient.post(SEND_MEDICAL_REPORT_EMAIL,
onSuccess: (dynamic res, int statusCode) {
response = res;
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
return response;
}
}

@ -2,11 +2,15 @@ import 'package:flutter/cupertino.dart';
class ToDoCountProviderModel with ChangeNotifier {
int _count;
bool _isShowBadge = false;
int get count => _count == null ? 0 : _count;
void setState(int count) {
bool get isShowBadge => _isShowBadge;
void setState(int count, bool isShowBadge) {
_count = count;
_isShowBadge = isShowBadge;
notifyListeners();
}
}

@ -208,7 +208,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
onTap: () => Navigator.push(
context,
FadePage(
page: ToDo(),
page: ToDo(isShowAppBar: true),
),
),
imageLocation:
@ -233,22 +233,22 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
'assets/images/new-design/virtual_tour_icon.png',
title: TranslationBase.of(context).vTour,
),
ServicesContainer(
onTap: () {
Navigator.of(context).push(
MaterialPageRoute(
builder: (BuildContext context) => MyWebView(
title: TranslationBase.of(context).hmgNews,
selectedUrl:
"https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live",
),
),
);
},
imageLocation:
'assets/images/new-design/twitter_dashboard_icon.png',
title: TranslationBase.of(context).latestNews,
),
// ServicesContainer(
// onTap: () {
// Navigator.of(context).push(
// MaterialPageRoute(
// builder: (BuildContext context) => MyWebView(
// title: TranslationBase.of(context).hmgNews,
// selectedUrl:
// "https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live",
// ),
// ),
// );
// },
// imageLocation:
// 'assets/images/new-design/twitter_dashboard_icon.png',
// title: TranslationBase.of(context).latestNews,
// ),
ServicesContainer(
onTap: () => Navigator.push(
context,

@ -513,12 +513,12 @@ class _BookConfirmState extends State<BookConfirm> {
}
getToDoCount() {
toDoProvider.setState(0);
toDoProvider.setState(0, true);
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
print(res['AppointmentActiveNumber']);
if (res['MessageStatus'] == 1) {
toDoProvider.setState(res['AppointmentActiveNumber']);
toDoProvider.setState(res['AppointmentActiveNumber'], true);
} else {}
}).catchError((err) {
print(err);

@ -37,7 +37,7 @@ class _SearchResultsState extends State<SearchResults> {
...List.generate(
widget.patientDoctorAppointmentListHospital.length,
(index) => AppExpandableNotifier(
isExpand: index == 1 ? true : false,
// isExpand: index == 0 ? true : false,
title: widget.patientDoctorAppointmentListHospital[index]
.filterName +
" - " +

@ -5,7 +5,7 @@ import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart
import 'package:diplomaticquarterapp/models/Appointments/SearchInfoModel.dart';
import 'package:diplomaticquarterapp/models/Clinics/ClinicListResponse.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/DentalComplaints.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/BranchView.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
@ -216,6 +216,9 @@ class _SearchByClinicState extends State<SearchByClinic> {
List<String> arrDistance = [];
List<String> result;
int numAll;
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital =
List();
DoctorsListService service = new DoctorsListService();
service
.getDoctorsList(
@ -228,23 +231,48 @@ class _SearchByClinicState extends State<SearchByClinic> {
if (res['MessageStatus'] == 1) {
setState(() {
if (res['DoctorList'].length != 0) {
print(res['DoctorList']);
// print(res['DoctorList']);
doctorsList.clear();
res['DoctorList'].forEach((v) {
doctorsList.add(new DoctorList.fromJson(v));
// arr.add(new DoctorList.fromJson(v).projectName);
// arrDistance.add(new DoctorList.fromJson(v)
// .projectDistanceInKiloMeters
// .toString());
});
doctorsList.forEach((element) {
List<PatientDoctorAppointmentList> doctorByHospital =
_patientDoctorAppointmentListHospital
.where(
(elementClinic) =>
elementClinic.filterName == element.projectName,
)
.toList();
arr.add(new DoctorList.fromJson(v).projectName);
arrDistance.add(new DoctorList.fromJson(v)
.projectDistanceInKiloMeters
.toString());
if (doctorByHospital.length != 0) {
_patientDoctorAppointmentListHospital[
_patientDoctorAppointmentListHospital
.indexOf(doctorByHospital[0])]
.patientDoctorAppointmentList
.add(element);
} else {
_patientDoctorAppointmentListHospital.add(
PatientDoctorAppointmentList(
filterName: element.projectName,
distanceInKMs:
element.projectDistanceInKiloMeters.toString(),
patientDoctorAppointment: element));
}
});
} else {}
});
result = LinkedHashSet<String>.from(arr).toList();
numAll = result.length;
// navigateToSearchResults(
// context, doctorsList, result, numAll, arrDistance);
navigateToSearchResults(
context, doctorsList, result, numAll, arrDistance);
context, doctorsList, _patientDoctorAppointmentListHospital);
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
@ -267,17 +295,18 @@ class _SearchByClinicState extends State<SearchByClinic> {
}
Future navigateToSearchResults(
context, docList, result, numAll, resultDistance) async {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => BranchView(
doctorsList: docList,
result: result,
num: numAll,
resultDistance: resultDistance),
),
).then((value) {
List<DoctorList> docList,
List<PatientDoctorAppointmentList>
patientDoctorAppointmentListHospital) async {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => SearchResults(
isLiveCareAppointment: false,
doctorsList: docList,
patientDoctorAppointmentListHospital:
patientDoctorAppointmentListHospital))).then((value) {
getProjectsList();
});
}

@ -84,17 +84,19 @@ class _MyAppointmentsState extends State<MyAppointments>
color: Colors.grey[600],
thickness: 0.5,
),
Expanded(
child: new TabBarView(
physics: NeverScrollableScrollPhysics(),
children: [
isDataLoaded ? getBookedAppointments() : Container(),
isDataLoaded ? getConfirmedAppointments() : Container(),
isDataLoaded ? getArrivedAppointments() : Container()
],
controller: _tabController,
),
),
isDataLoaded
? Expanded(
child: new TabBarView(
physics: NeverScrollableScrollPhysics(),
children: [
getBookedAppointments(),
getConfirmedAppointments(),
getArrivedAppointments()
],
controller: _tabController,
),
)
: Container(),
]),
),
);
@ -114,22 +116,23 @@ class _MyAppointmentsState extends State<MyAppointments>
service.getPatientAppointmentHistory(false, context).then((res) {
print(res['AppoimentAllHistoryResultList'].length);
if (res['MessageStatus'] == 1) {
GifLoaderDialogUtils.hideDialog(context);
setState(() {
isDataLoaded = true;
GifLoaderDialogUtils.hideDialog(context);
setState(() {
if (res['MessageStatus'] == 1) {
// setState(() {
if (res['AppoimentAllHistoryResultList'].length != 0) {
isDataLoaded = true;
// isDataLoaded = true;
res['AppoimentAllHistoryResultList'].forEach((v) {
widget.appoList
.add(new AppoitmentAllHistoryResultList.fromJson(v));
widget.appoList.add(new AppoitmentAllHistoryResultList.fromJson(v));
});
sortAppointmentList();
} else {}
});
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
// });
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
isDataLoaded = true;
});
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
@ -419,6 +422,4 @@ class _MyAppointmentsState extends State<MyAppointments>
),
);
}
}

@ -3,12 +3,12 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
class ArrivedButtons {
static var buttons = [
{
"title": TranslationBase.of(AppGlobal.context).arrived,
"subtitle": TranslationBase.of(AppGlobal.context).status,
"icon": "assets/images/new-design/waiting-room.png",
"caller": "openReschedule"
},
// {
// "title": TranslationBase.of(AppGlobal.context).arrived,
// "subtitle": TranslationBase.of(AppGlobal.context).status,
// "icon": "assets/images/new-design/waiting-room.png",
// "caller": "openReschedule"
// },
{
"title": TranslationBase.of(AppGlobal.context).medicines,
"subtitle": TranslationBase.of(AppGlobal.context).medicinesSubtitle,

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_enh.dart';
import 'package:diplomaticquarterapp/core/model/radiology/final_radiology.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
@ -16,6 +17,7 @@ import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/askDocDialog.d
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/reminder_dialog.dart';
import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart';
import 'package:diplomaticquarterapp/pages/medical/labs/laboratory_result_page.dart';
import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_details_page.dart';
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
@ -62,8 +64,8 @@ class _AppointmentActionsState extends State<AppointmentActions> {
toDoProvider = Provider.of<ToDoCountProviderModel>(context);
var size = MediaQuery.of(context).size;
final double itemHeight = projectViewModel.isArabic
? ((size.height - kToolbarHeight - 24) * 0.47) / 2
: ((size.height - kToolbarHeight - 24) * 0.4) / 2;
? ((size.height - kToolbarHeight - 24) * 0.5) / 2
: ((size.height - kToolbarHeight - 24) * 0.45) / 2;
final double itemWidth = size.width / 2;
return Container(
@ -83,7 +85,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
_handleButtonClicks(e);
},
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisSize: MainAxisSize.max,
children: [
Container(
// height: 100.0,
@ -100,7 +102,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Container(
margin:
@ -196,6 +198,10 @@ class _AppointmentActionsState extends State<AppointmentActions> {
openAppointmentRadiology();
break;
case "labResult":
openAppointmentLabResults();
break;
case "prescriptions":
openPrescriptionReport();
break;
@ -391,18 +397,48 @@ class _AppointmentActionsState extends State<AppointmentActions> {
}
getToDoCount() {
toDoProvider.setState(0);
toDoProvider.setState(0, true);
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
print(res['AppointmentActiveNumber']);
if (res['MessageStatus'] == 1) {
toDoProvider.setState(res['AppointmentActiveNumber']);
toDoProvider.setState(res['AppointmentActiveNumber'], true);
} else {}
}).catchError((err) {
print(err);
});
}
openAppointmentLabResults() {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
PatientLabOrders patientLabOrders = new PatientLabOrders();
service
.getPatientLabOrdersByAppoNo(widget.appo.appointmentNo,
widget.appo.projectID, widget.appo.clinicID, context)
.then((res) {
print(res['ListLabResultsByAppNo']);
GifLoaderDialogUtils.hideDialog(context);
if (res['ListLabResultsByAppNo'] != null) {
patientLabOrders.orderNo =
res['ListLabResultsByAppNo'][0]['OrderNo'].toString();
patientLabOrders.invoiceNo =
res['ListLabResultsByAppNo'][0]['InvoiceNo'].toString();
patientLabOrders.clinicID = widget.appo.clinicID;
patientLabOrders.projectID = widget.appo.projectID.toString();
print(patientLabOrders.invoiceNo);
print(patientLabOrders.orderNo);
navigateToLabResults(patientLabOrders);
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
AppToast.showErrorToast(message: err);
});
}
openAppointmentRadiology() {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
@ -438,10 +474,12 @@ class _AppointmentActionsState extends State<AppointmentActions> {
prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(report));
});
print(prescriptionReportEnhList.length);
navigateToMedicinePrescriptionReport(prescriptionReportEnhList, res['ListPRM']);
} else {
AppToast.showErrorToast(message: TranslationBase.of(context).noRecords);
}
}).catchError((err) {
print(err);
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
});
@ -459,6 +497,15 @@ class _AppointmentActionsState extends State<AppointmentActions> {
appo: widget.appo)));
}
Future navigateToLabResults(PatientLabOrders patientLabOrders) async {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
LaboratoryResultPage(patientLabOrders: patientLabOrders)))
.then((value) {});
}
Future navigateToRadiologyDetails(FinalRadiology finalRadiology) async {
Navigator.push(
context,

@ -4,12 +4,14 @@ import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/QRCode.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/AppointmentDetails.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/widgets/paymentDialog.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
@ -22,6 +24,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_countdown_timer/current_remaining_time.dart';
import 'package:flutter_countdown_timer/flutter_countdown_timer.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
import 'package:rating_bar/rating_bar.dart';
class ToDo extends StatefulWidget {
@ -30,6 +33,10 @@ class ToDo extends StatefulWidget {
var languageID;
MyInAppBrowser browser;
bool isShowAppBar = true;
ToDo({@required this.isShowAppBar});
@override
_ToDoState createState() => _ToDoState();
}
@ -43,6 +50,8 @@ class _ToDoState extends State<ToDo> {
List<ImagesInfo> imagesInfo = List();
ToDoCountProviderModel toDoProvider;
@override
void initState() {
widget.patientShareResponse = new PatientShareResponse();
@ -59,10 +68,11 @@ class _ToDoState extends State<ToDo> {
@override
Widget build(BuildContext context) {
toDoProvider = Provider.of<ToDoCountProviderModel>(context);
return AppScaffold(
appBarTitle: TranslationBase.of(context).todoList,
imagesInfo: imagesInfo,
isShowAppBar: false,
isShowAppBar: widget.isShowAppBar,
isShowDecPage: true,
description: TranslationBase.of(context).infoTodo,
body: SingleChildScrollView(
@ -510,6 +520,19 @@ class _ToDoState extends State<ToDo> {
});
}
getToDoCount() {
toDoProvider.setState(0, true);
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
print(res['AppointmentActiveNumber']);
if (res['MessageStatus'] == 1) {
toDoProvider.setState(res['AppointmentActiveNumber'], true);
} else {}
}).catchError((err) {
print(err);
});
}
getPatientAppointmentHistory() {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
@ -525,11 +548,7 @@ class _ToDoState extends State<ToDo> {
});
} else {}
});
widget.appoList.forEach((element) {
print(element.isLiveCareAppointment);
print(element.nextAction);
print(element.remaniningHoursTocanPay);
});
getToDoCount();
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}

@ -167,7 +167,8 @@ class _InsuranceCardState extends State<InsuranceCard> {
onTap: () => {
getDetails(model.insurance[index])
},
label: TranslationBase.of(context).seeDetails,
label: TranslationBase.of(context)
.seeDetails,
textColor: Colors.white,
),
width: double.infinity,

@ -1,5 +1,10 @@
import 'package:diplomaticquarterapp/core/service/insurance_service.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_details.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import '../base/base_view.dart';
@ -15,6 +20,7 @@ class InsuranceUpdate extends StatefulWidget {
class _InsuranceUpdateState extends State<InsuranceUpdate>
with SingleTickerProviderStateMixin {
TabController _tabController;
InsuranceCardService _insuranceCardService = locator<InsuranceCardService>();
@override
void initState() {
@ -103,94 +109,109 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
itemCount: model.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList.length,
itemBuilder: (BuildContext context, int index) {
return Container(
margin: EdgeInsets.all(10.0),
child: Card(
margin:
EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
),
child: Container(
width: MediaQuery.of(context).size.width,
padding: EdgeInsets.all(10.0),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Expanded(
flex: 3,
child: Container(
margin: EdgeInsets.only(
top: 2.0,
left: 10.0,
right: 20.0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Texts(
model
.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList[
index]
.patientName,
fontSize: 14,
color: Colors.black,
fontWeight: FontWeight.w500,
return model
.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList[
index]
.status ==
3
? Container(
margin: EdgeInsets.all(10.0),
child: Card(
margin: EdgeInsets.fromLTRB(
8.0, 16.0, 8.0, 8.0),
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(10),
),
child: Container(
width:
MediaQuery.of(context).size.width,
padding: EdgeInsets.all(10.0),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Expanded(
flex: 3,
child: Container(
margin: EdgeInsets.only(
top: 2.0,
left: 10.0,
right: 20.0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: <Widget>[
Texts(
model
.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList[
index]
.patientName,
fontSize: 14,
color: Colors.black,
fontWeight:
FontWeight.w500,
),
SizedBox(
height: 8,
),
Texts(
TranslationBase.of(
context)
.fileno +
": " +
model
.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList[
index]
.patientID
.toString(),
fontSize: 14,
color: Colors.black,
fontWeight:
FontWeight.w500,
)
],
),
),
SizedBox(
height: 8,
),
if (false)
Expanded(
flex: 2,
child: Container(
margin:
EdgeInsets.only(top: 2.0),
child: Column(
children: <Widget>[
Container(
child: SecondaryButton(
label: TranslationBase
.of(context)
.fetchData,
small: true,
textColor:
Colors.white,
onTap: () {
getDetails(
model);
},
),
),
],
),
),
Texts(
TranslationBase.of(context)
.fileno +
": " +
model
.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList[
index]
.patientID
.toString(),
fontSize: 14,
color: Colors.black,
fontWeight: FontWeight.w500,
)
],
),
)
],
),
),
if (false)
Expanded(
flex: 2,
child: Container(
// height: MediaQuery.of(context).size.height * 0.12,
margin: EdgeInsets.only(top: 2.0),
child: Column(
children: <Widget>[
Container(
child: SecondaryButton(
label: TranslationBase.of(
context)
.updateInsurance,
small: true,
textColor: Colors.white,
// color: Colors.grey,
),
//height: 45,
// width:90
),
],
),
),
)
],
),
),
),
);
),
)
: Container();
})
: Container(),
),
@ -309,4 +330,13 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
),
);
}
getDetails(data) {
GifLoaderDialogUtils.showMyDialog(context);
_insuranceCardService.getInsuranceDetails(data).then((value) => {
GifLoaderDialogUtils.hideDialog(context),
Navigator.push(context,
FadePage(page: InsuranceCardDetails(data: value[0]['CheckList'])))
});
}
}

@ -758,23 +758,6 @@ class _HomePageState extends State<HomePage> {
Navigator.push(context,
MaterialPageRoute(builder: (context) => CovidDrivethruLocation()));
}
getToDoCount() {
toDoProvider.setState(0);
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
print(res['AppointmentActiveNumber']);
if (res['MessageStatus'] == 1) {
setState(() {
toDoProvider.setState(res['AppointmentActiveNumber']);
});
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
print(err);
});
}
}
class DashboardItem extends StatelessWidget {

@ -430,13 +430,13 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
children: [
HomePage(
goToMyProfile: () {
// _changeCurrentTab(1);
_changeCurrentTab(1);
},
),
MedicalProfilePage(),
BookingOptions(),
MyFamily(isAppbarVisible: false),
ToDo(),
ToDo(isShowAppBar: false),
], // Please do not remove the BookingOptions from this array
),
bottomNavigationBar: BottomNavBar(

@ -4,12 +4,14 @@ import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart';
import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart';
import 'package:diplomaticquarterapp/models/Authentication/send_activation_request.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
@ -74,6 +76,8 @@ class _ConfirmLogin extends State<ConfirmLogin> {
locator<AppointmentRateViewModel>();
ProjectViewModel projectViewModel;
ToDoCountProviderModel toDoProvider;
@override
void initState() {
_getAvailableBiometrics();
@ -84,6 +88,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
toDoProvider = Provider.of<ToDoCountProviderModel>(context);
return AppScaffold(
appBarTitle: TranslationBase.of(context).confirm,
isShowAppBar: true,
@ -568,10 +573,24 @@ class _ConfirmLogin extends State<ConfirmLogin> {
});
}
getToDoCount() {
toDoProvider.setState(0, true);
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
print(res['AppointmentActiveNumber']);
if (res['MessageStatus'] == 1) {
toDoProvider.setState(res['AppointmentActiveNumber'], true);
} else {}
}).catchError((err) {
print(err);
});
}
goToHome() {
authenticatedUserObject.isLogin = true;
appointmentRateViewModel.isLogin = true;
projectViewModel.isLogin = true;
getToDoCount();
Navigator.of(context).pushNamed(HOME);
}

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
@ -11,6 +12,7 @@ import 'package:diplomaticquarterapp/pages/login/login-type.dart';
import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@ -48,6 +50,7 @@ class _Login extends State<Login> {
locator<AuthenticatedUserObject>();
ProjectViewModel projectViewModel;
ToDoCountProviderModel toDoProvider;
@override
void initState() {
@ -64,6 +67,7 @@ class _Login extends State<Login> {
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
toDoProvider = Provider.of<ToDoCountProviderModel>(context);
return AppScaffold(
appBarTitle: TranslationBase.of(context).login,
isShowAppBar: true,
@ -252,6 +256,7 @@ class _Login extends State<Login> {
appointmentRateViewModel
.getIsLastAppointmentRatedList()
.then((value) => {
getToDoCount(),
GifLoaderDialogUtils.hideDialog(context),
if (appointmentRateViewModel.isHaveAppointmentNotRate)
{
@ -280,6 +285,19 @@ class _Login extends State<Login> {
});
}
getToDoCount() {
toDoProvider.setState(0, true);
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
print(res['AppointmentActiveNumber']);
if (res['MessageStatus'] == 1) {
toDoProvider.setState(res['AppointmentActiveNumber'], true);
} else {}
}).catchError((err) {
print(err);
});
}
// showLoader(bool isTrue) {
// setState(() {
// isLoading = isTrue;

@ -1,11 +1,14 @@
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/model/sick_leave/sick_leave.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/patient_sick_leave_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/confirm_send_email_dialog.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class PatientSickLeavePage extends StatefulWidget {
@override
@ -14,9 +17,14 @@ class PatientSickLeavePage extends StatefulWidget {
class _PatientSickLeavePageState extends State<PatientSickLeavePage> {
List<ImagesInfo> imagesInfo = List();
@override
Widget build(BuildContext context) {
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/sick-leaves/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/sick-leaves/ar/0.png'));
imagesInfo.add(ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileApp/imges-info/sick-leaves/en/0.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/imges-info/sick-leaves/ar/0.png'));
return BaseView<PatientSickLeaveViewMode>(
onModelReady: (model) => model.getSickLeave(),
builder: (_, model, w) => AppScaffold(
@ -37,16 +45,16 @@ class _PatientSickLeavePageState extends State<PatientSickLeavePage> {
profileUrl: model.sickLeaveList[index].doctorImageURL,
rat: model.sickLeaveList[index].actualDoctorRate.toDouble(),
subName: model.sickLeaveList[index].projectName,
isInOutPatient:
model.sickLeaveList[index].isInOutPatient,
isInOutPatient: model.sickLeaveList[index].isInOutPatient,
onEmailTap: () {
model.sendSickLeaveEmail(
message: TranslationBase.of(context).emailSentSuccessfully,
requestNo: model.sickLeaveList[index].requestNo,
doctorName: model.sickLeaveList[index].doctorName,
projectName: model.sickLeaveList[index].projectName,
setupID: model.sickLeaveList[index].setupID,
projectID: model.sickLeaveList[index].projectID);
showConfirmMessage(model, index);
// model.sendSickLeaveEmail(
// message: TranslationBase.of(context).emailSentSuccessfully,
// requestNo: model.sickLeaveList[index].requestNo,
// doctorName: model.sickLeaveList[index].doctorName,
// projectName: model.sickLeaveList[index].projectName,
// setupID: model.sickLeaveList[index].setupID,
// projectID: model.sickLeaveList[index].projectID);
},
),
),
@ -54,4 +62,22 @@ class _PatientSickLeavePageState extends State<PatientSickLeavePage> {
),
);
}
void showConfirmMessage(PatientSickLeaveViewMode model, int index) {
showDialog(
context: context,
child: ConfirmSendEmailDialog(
email: model.user.emailAddress,
onTapSendEmail: () {
model.sendSickLeaveEmail(
message: TranslationBase.of(context).emailSentSuccessfully,
requestNo: model.sickLeaveList[index].requestNo,
doctorName: model.sickLeaveList[index].doctorName,
projectName: model.sickLeaveList[index].projectName,
setupID: model.sickLeaveList[index].setupID,
projectID: model.sickLeaveList[index].projectID);
},
),
);
}
}

@ -1,7 +1,9 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/radiology/final_radiology.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/radiology_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/confirm_send_email_dialog.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
@ -51,29 +53,32 @@ class RadiologyDetailsPage extends StatelessWidget {
),
bottomSheet: Container(
width: double.infinity,
height: model.radImageURL.isNotEmpty ? MediaQuery.of(context).size.height * 0.2:MediaQuery.of(context).size.height * 0.15,
height: finalRadiology.dIAPACSURL != ""
? MediaQuery.of(context).size.height * 0.2
: MediaQuery.of(context).size.height * 0.15,
color: Colors.grey[100],
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Divider(),
if(model.radImageURL.isNotEmpty)
if (finalRadiology.dIAPACSURL != "")
Container(
width: MediaQuery.of(context).size.width * 0.8,
child: Button(
onTap: () {
launch(model.radImageURL);
},
label: TranslationBase.of(context).openRad,
backgroundColor: Colors.grey[800],
),
),
Container(
width: MediaQuery.of(context).size.width * 0.8,
child: Button(
onTap: () {
launch(model.radImageURL);
showConfirmMessage(
finalRadiology: finalRadiology, model: model);
},
label: TranslationBase.of(context).openRad,
backgroundColor: Colors.grey[800],
),
),
Container(
width: MediaQuery.of(context).size.width * 0.8,
child: Button(
onTap: () => model.sendRadReportEmail(
mes: TranslationBase.of(context).sendSuc,
finalRadiology: finalRadiology),
label: TranslationBase.of(context).sendCopyRad,
loading: model.state == ViewState.BusyLocal,
backgroundColor: Theme.of(context).primaryColor,
@ -84,4 +89,19 @@ class RadiologyDetailsPage extends StatelessWidget {
)),
);
}
void showConfirmMessage(
{FinalRadiology finalRadiology, RadiologyViewModel model}) {
showDialog(
context: AppGlobal.context,
child: ConfirmSendEmailDialog(
email: model.user.emailAddress,
onTapSendEmail: () {
model.sendRadReportEmail(
mes: TranslationBase.of(AppGlobal.context).sendSuc,
finalRadiology: finalRadiology);
},
),
);
}
}

@ -37,9 +37,21 @@ class _HomeReportPageState extends State<HomeReportPage>
@override
Widget build(BuildContext context) {
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/medical-reorts/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/medical-reorts/ar/0.png'));
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/medical-reorts/en/1.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/medical-reorts/ar/1.png'));
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/medical-reorts/en/2.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/medical-reorts/ar/2.png'));
imagesInfo.add(ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileApp/imges-info/medical-reorts/en/0.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/imges-info/medical-reorts/ar/0.png'));
imagesInfo.add(ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileApp/imges-info/medical-reorts/en/1.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/imges-info/medical-reorts/ar/1.png'));
imagesInfo.add(ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileApp/imges-info/medical-reorts/en/2.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/imges-info/medical-reorts/ar/2.png'));
return BaseView<ReportsViewModel>(
onModelReady: (model) => model.getReports(), //model.getPrescriptions(),
builder: (_, model, widget) => AppScaffold(
@ -93,7 +105,8 @@ class _HomeReportPageState extends State<HomeReportPage>
Container(
width: MediaQuery.of(context).size.width * 0.22,
child: Center(
child: Texts(TranslationBase.of(context).requested),
child:
Texts(TranslationBase.of(context).requested),
),
),
Container(
@ -105,13 +118,15 @@ class _HomeReportPageState extends State<HomeReportPage>
Container(
width: MediaQuery.of(context).size.width * 0.22,
child: Center(
child: Texts(TranslationBase.of(context).completed),
child:
Texts(TranslationBase.of(context).completed),
),
),
Container(
width: MediaQuery.of(context).size.width * 0.22,
child: Center(
child: Texts(TranslationBase.of(context).cancelled),
child:
Texts(TranslationBase.of(context).cancelled),
),
),
],
@ -131,20 +146,26 @@ class _HomeReportPageState extends State<HomeReportPage>
children: <Widget>[
ReportListWidget(
reportList: model.reportsOrderRequestList,
emailAddress: model.user.emailAddress
),
ReportListWidget(
reportList: model.reportsOrderReadyList,
emailAddress: model.user.emailAddress
),
ReportListWidget(
reportList: model.reportsOrderCompletedList,
emailAddress: model.user.emailAddress
),
ReportListWidget(
reportList: model.reportsOrderCanceledList,
emailAddress: model.user.emailAddress
),
],
),
),
SizedBox(height: 110,)
SizedBox(
height: 110,
)
],
),
bottomSheet: Container(

@ -1,4 +1,12 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/reports/Reports.dart';
import 'package:diplomaticquarterapp/core/service/medical/reports_service.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/confirm_send_email_dialog.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/widgets/avatar/large_avatar.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart';
@ -6,8 +14,9 @@ import 'package:flutter/material.dart';
class ReportListWidget extends StatelessWidget {
final List<Reports> reportList;
final String emailAddress;
ReportListWidget({@required this.reportList});
ReportListWidget({@required this.reportList, this.emailAddress});
@override
Widget build(BuildContext context) {
@ -16,7 +25,8 @@ class ReportListWidget extends StatelessWidget {
itemBuilder: (context, index) => Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
width: double.infinity,margin: EdgeInsets.only(left: 8,right: 8,top: 3),
width: double.infinity,
margin: EdgeInsets.only(left: 8, right: 8, top: 3),
decoration: BoxDecoration(
color: Colors.white,
border: Border.all(color: Colors.white, width: 2),
@ -40,15 +50,39 @@ class ReportListWidget extends StatelessWidget {
flex: 4,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(height: 12,),
Texts(reportList[index].projectName),
Texts(reportList[index].clinicDescription),
Texts('invoice No: ${reportList[index].invoiceNo}'),
SizedBox(height: 12,),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 12,
),
Texts(reportList[index].projectName),
Texts(reportList[index].clinicDescription),
Texts(TranslationBase.of(context).invoiceNo +
': ${reportList[index].invoiceNo}'),
SizedBox(height: 12),
],
),
reportList[index].status == 2
? Container(
margin:
EdgeInsets.only(left: 15.0, right: 15.0),
child: InkWell(
onTap: () {
showConfirmMessage(reportList[index]);
// sendReportEmail(reportList[index]);
},
child: Icon(
Icons.email,
color: Theme.of(context).primaryColor,
size: 35.0,
),
),
)
: Container(),
],
),
),
@ -61,4 +95,39 @@ class ReportListWidget extends StatelessWidget {
),
);
}
void showConfirmMessage(Reports report) {
showDialog(
context: AppGlobal.context,
child: ConfirmSendEmailDialog(
email: emailAddress,
onTapSendEmail: () {
sendReportEmail(report);
},
),
);
}
sendReportEmail(Reports report) {
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,
DateUtil.convertDateToString(report.requestDate),
report.setupId)
.then((value) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
AppToast.showSuccessToast(
message: TranslationBase.of(AppGlobal.context).emailSentSuccessfully);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
print(err);
});
}
}

@ -51,9 +51,11 @@ class PaymentService extends StatelessWidget {
fontSize: 14,
fontWeight: FontWeight.normal,
),
SizedBox(height: 12,),
SizedBox(
height: 12,
),
Container(
margin: EdgeInsets.only(left: 10,right: 10),
margin: EdgeInsets.only(left: 10, right: 10),
child: Image.asset(
'assets/images/online_payment_icon.png',
fit: BoxFit.fill,
@ -67,37 +69,43 @@ class PaymentService extends StatelessWidget {
),
),
Expanded(
child: Container(
margin: EdgeInsets.all(5.0),
padding: EdgeInsets.all(9),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8.0),
shape: BoxShape.rectangle),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
TranslationBase.of(context).onlineCheckIn,
color: HexColor('#B61422'),
bold: true,
),
Texts(
TranslationBase.of(context).appointment,
fontSize: 14,
fontWeight: FontWeight.normal,
),
SizedBox(height: 12,),
Align(
alignment: !projectViewModel.isArabic
? Alignment.centerRight
: Alignment.centerLeft,
child: Image.asset(
'assets/images/device_icon.png',
height: 55,
child: InkWell(
onTap: () =>
Navigator.push(context, FadePage(page: ToDo(isShowAppBar: true))),
child: Container(
margin: EdgeInsets.all(5.0),
padding: EdgeInsets.all(9),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8.0),
shape: BoxShape.rectangle),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
TranslationBase.of(context).onlineCheckIn,
color: HexColor('#B61422'),
bold: true,
),
),
],
Texts(
TranslationBase.of(context).appointment,
fontSize: 14,
fontWeight: FontWeight.normal,
),
SizedBox(
height: 12,
),
Align(
alignment: !projectViewModel.isArabic
? Alignment.centerRight
: Alignment.centerLeft,
child: Image.asset(
'assets/images/device_icon.png',
height: 55,
),
),
],
),
),
),
)
@ -130,7 +138,9 @@ class PaymentService extends StatelessWidget {
fontSize: 14,
fontWeight: FontWeight.normal,
),
SizedBox(height: 12,),
SizedBox(
height: 12,
),
Align(
alignment: !projectViewModel.isArabic
? Alignment.centerRight

@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
@ -72,7 +73,7 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
height: 25,
),
Texts(
'How would you rate your last visit to the Clinic',
TranslationBase.of(context).lastAppointment,
bold: true,
color: Colors.black,
),
@ -122,7 +123,7 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
),
Center(
child: Texts(
'Please rate the Clinic',
TranslationBase.of(context).rateClinic,
textAlign: TextAlign.center,
)),
SizedBox(
@ -206,7 +207,7 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
message: 'please rate the clinic');
}
},
label: "Rate",
label: TranslationBase.of(context).submit,
disabled: model.state == ViewState.BusyLocal,
loading: model.state == ViewState.BusyLocal,
textColor: Theme.of(context).backgroundColor),
@ -224,7 +225,7 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
);
},
child: Texts(
'Later',
TranslationBase.of(context).later,
decoration: TextDecoration.underline,
color: HexColor('#151DFE'),
fontSize: 18,

@ -162,15 +162,15 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
Form(
key: formKey,
child: TextFields(
hintText: "Notes",
hintText: TranslationBase.of(context).notes,
minLines: 4,
maxLines: 4,
validator: (value) {
if (value.isEmpty)
return 'Please enter your note';
else if (rating == 0) return 'Rating cannot be \"0\"';
return null;
},
// validator: (value) {
// if (value.isEmpty)
// return 'Please enter your note';
// else if (rating == 0) return 'Rating cannot be \"0\"';
// return null;
// },
onChanged: (value) {
setState(() {
note = value;

@ -1087,6 +1087,44 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
Future<Map> getPatientLabOrdersByAppoNo(dynamic appoNo, dynamic projID, dynamic clinicID, BuildContext context) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(
await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"AppointmentNo": appoNo,
"ProjectID": projID,
"ClinicID": clinicID,
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
"SessionID": "YckwoXhUmWBsnHKEKig",
"isDentalAllowedBackend": false,
"DeviceTypeID": req.DeviceTypeID,
"PatientID": authUser.patientID,
"TokenID": "@dm!n",
"PatientTypeID": authUser.patientType,
"PatientType": authUser.patientType
};
dynamic localRes;
await baseAppClient.post(GET_PATIENT_LAB_ORDERS_BY_APPOINTMENT,
onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
Future<Map> getPatientPrescriptionReports(
AppoitmentAllHistoryResultList appo, BuildContext context) async {
Map<String, dynamic> request;

@ -23,8 +23,9 @@ class DateUtil {
if (date != null) {
try {
var dateT = date.split('/');
var year = dateT[2].substring(0,4);
var dateP = DateTime(int.parse(year),int.parse(dateT[1]),int.parse(dateT[0]));
var year = dateT[2].substring(0, 4);
var dateP =
DateTime(int.parse(year), int.parse(dateT[1]), int.parse(dateT[0]));
return dateP;
} catch (e) {
print(e);
@ -277,6 +278,24 @@ class DateUtil {
return "";
}
static String getMonthDayYearLangDateFormatted(
DateTime dateTime, String lang) {
if (dateTime != null)
return lang == 'en'
? getMonth(dateTime.month) +
" " +
dateTime.day.toString() +
" " +
dateTime.year.toString()
: dateTime.day.toString() +
" " +
getMonthArabic(dateTime.month) +
" " +
dateTime.year.toString();
else
return "";
}
/// get data formatted like 26/4/2020
/// [dateTime] convert DateTime to data formatted
static String getDayMonthYearDateFormatted(DateTime dateTime) {

@ -1015,6 +1015,12 @@ class TranslationBase {
String get lastVisit => localizedValues['last-visit'][locale.languageCode];
String get tapTitle => localizedValues['tap-title'][locale.languageCode];
String get later => localizedValues['later'][locale.languageCode];
String get lastAppointment => localizedValues['last-appointment'][locale.languageCode];
String get rateClinic => localizedValues['rate-clinic'][locale.languageCode];
String get fetchData => localizedValues['fetch-data'][locale.languageCode];
String get sendConfEmail => localizedValues['send-email'][locale.languageCode];
String get updateEmail => localizedValues['update-email'][locale.languageCode];
String get noDataAvailable => localizedValues['noDataAvailable'][locale.languageCode];

@ -103,6 +103,6 @@ class _BottomNavBarState extends State<BottomNavBar> {
}
Future navigateToToDoList(context) async {
Navigator.push(context, MaterialPageRoute(builder: (context) => ToDo()));
Navigator.push(context, MaterialPageRoute(builder: (context) => ToDo(isShowAppBar: false)));
}
}

@ -69,7 +69,7 @@ class BottomNavigationItem extends StatelessWidget {
),
],
)
: authenticatedUserObject.isLogin
: (authenticatedUserObject.isLogin && model.isShowBadge)
? Stack(
alignment: AlignmentDirectional.center,
children: [

@ -236,7 +236,7 @@ class _SecondaryButtonState extends State<SecondaryButton>
widget.label,
style: TextStyle(
color: widget.textColor,
fontSize: 17.0,
fontSize: widget.small ? 12.0 : 17.0,
fontWeight: FontWeight.w800,
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans'),
),

@ -142,7 +142,7 @@ class DoctorCard extends StatelessWidget {
Icons.email,
color: Theme.of(context).primaryColor,
),
)
),
],
),
),

@ -51,8 +51,12 @@ class TimeLineWidget extends StatelessWidget {
LargeAvatar(
onTap: () {
//AppointmentDetails
Navigator.push(context,
FadePage(page: AppointmentDetails(appo: appoitmentAllHistoryResul,)));
Navigator.push(
context,
FadePage(
page: AppointmentDetails(
appo: appoitmentAllHistoryResul,
)));
},
name: appoitmentAllHistoryResul.doctorNameObj,
url: appoitmentAllHistoryResul.doctorImageURL,
@ -69,7 +73,8 @@ class TimeLineWidget extends StatelessWidget {
height: 15,
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
border: Border.all(color: Theme.of(context).primaryColor, width: 2),
border: Border.all(
color: Theme.of(context).primaryColor, width: 2),
shape: BoxShape.rectangle,
borderRadius: BorderRadius.all(
Radius.circular(25.0),
@ -80,7 +85,10 @@ class TimeLineWidget extends StatelessWidget {
height: 4,
),
Texts(
DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(appoitmentAllHistoryResul.appointmentDate)),
DateUtil.getMonthDayYearLangDateFormatted(
DateUtil.convertStringToDate(
appoitmentAllHistoryResul.appointmentDate),
projectViewModel.isArabic ? "ar" : "en"),
color: Colors.white,
fontSize: 12.5,
fontWeight: FontWeight.normal,
@ -97,7 +105,7 @@ class TimeLineWidget extends StatelessWidget {
)
else
Positioned(
top:projectViewModel.isArabic ? 35 : 50,
top: projectViewModel.isArabic ? 35 : 50,
child: Container(
margin: EdgeInsets.only(left: 2, right: 2),
child: Column(
@ -109,9 +117,10 @@ class TimeLineWidget extends StatelessWidget {
fontWeight: FontWeight.normal,
),
Texts(
DateUtil.getMonthDayYearDateFormatted(
DateUtil.getMonthDayYearLangDateFormatted(
DateUtil.convertStringToDate(
appoitmentAllHistoryResul.appointmentDate)),
appoitmentAllHistoryResul.appointmentDate),
projectViewModel.isArabic ? "ar" : "en"),
color: Colors.white,
fontSize: 12.5,
fontWeight: FontWeight.normal,
@ -124,7 +133,8 @@ class TimeLineWidget extends StatelessWidget {
height: 15,
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
border: Border.all(color: Theme.of(context).primaryColor, width: 2),
border: Border.all(
color: Theme.of(context).primaryColor, width: 2),
shape: BoxShape.rectangle,
borderRadius: BorderRadius.all(
Radius.circular(25.0),
@ -137,9 +147,13 @@ class TimeLineWidget extends StatelessWidget {
color: Colors.white,
),
LargeAvatar(
onTap: (){
Navigator.push(context,
FadePage(page: AppointmentDetails(appo: appoitmentAllHistoryResul,)));
onTap: () {
Navigator.push(
context,
FadePage(
page: AppointmentDetails(
appo: appoitmentAllHistoryResul,
)));
},
name: appoitmentAllHistoryResul.doctorNameObj,
url: appoitmentAllHistoryResul.doctorImageURL,

@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart';
import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
@ -44,8 +45,11 @@ class _AppDrawerState extends State<AppDrawer> {
locator<AuthenticatedUserObject>();
VitalSignService _vitalSignService = locator<VitalSignService>();
ToDoCountProviderModel toDoProvider;
@override
Widget build(BuildContext context) {
toDoProvider = Provider.of<ToDoCountProviderModel>(context);
projectProvider = Provider.of(context);
return SizedBox(
width: MediaQuery.of(context).size.width * 0.75,
@ -257,7 +261,7 @@ class _AppDrawerState extends State<AppDrawer> {
padding: EdgeInsets.only(left: 5, right: 5),
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[
AppText(result.patientName, color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black),
AppText(TranslationBase.of(context).fileno + ": " + result.iD.toString(), color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black),
AppText(TranslationBase.of(context).fileno + ": " + result.responseID.toString(), color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black),
]))),
],
)))
@ -458,9 +462,12 @@ class _AppDrawerState extends State<AppDrawer> {
_vitalSignService.weightKg = "";
await sharedPref.clear();
this.user = null;
toDoProvider.setState(0, false);
Navigator.of(context).pushNamed(HOME);
}
login() async {
var data = await sharedPref.getObject(IMEI_USER_DATA);
sharedPref.remove(REGISTER_DATA_FOR_LOGIIN);

Loading…
Cancel
Save