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_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders';
const GET_PATIENT_LAB_ORDERS_BY_APPOINTMENT = 'Services/Patients.svc/REST/GetPatientLabResultsByAppointmentNo';
const GET_PATIENT_ORDERS_DETAILS = const GET_PATIENT_ORDERS_DETAILS =
'Services/Patients.svc/REST/Rad_UpdatePatientRadOrdersToRead'; 'Services/Patients.svc/REST/Rad_UpdatePatientRadOrdersToRead';
const GET_RAD_IMAGE_URL = 'Services/Patients.svc/Rest/GetRadImageURL'; 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 REPORTS = 'Services/Doctors.svc/REST/GetPatientMedicalReportStatusInfo';
const INSERT_REQUEST_FOR_MEDICAL_REPORT = const INSERT_REQUEST_FOR_MEDICAL_REPORT =
'Services/Doctors.svc/REST/InsertRequestForMedicalReport'; 'Services/Doctors.svc/REST/InsertRequestForMedicalReport';
const SEND_MEDICAL_REPORT_EMAIL =
'Services/Notifications.svc/REST/SendMedicalReportEmail';
///Rate ///Rate
const IS_LAST_APPOITMENT_RATED = 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.", "en": "This service allows you to chat with customer service directly without the need to call.",
"ar": "المحادثة المباشرة: هذه الخدمة تمكنك التحدث كتابياً مع خدمة العملاء مباشرة دون الحاجة الى الاتصال هاتفياً." "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": { "send-email": {
"en": "Send a copy of this report to the email", "en": "Send a copy of this report to the email",
"ar": "أرسل نسخة من هذا التقرير إلى البريد الإلكتروني" "ar": "أرسل نسخة من هذا التقرير إلى البريد الإلكتروني"

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

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

@ -9,11 +9,11 @@ class ReportsService extends BaseService {
List<AppointmentHistory> appointHistoryList = List(); List<AppointmentHistory> appointHistoryList = List();
String userAgreementContent = ""; String userAgreementContent = "";
RequestReports _requestReports = RequestReports( RequestReports _requestReports = RequestReports(
isReport: true, isReport: true,
encounterType: 1, encounterType: 1,
requestType: 1, requestType: 1,
patientOutSA: 0, patientOutSA: 0,
); );
Future getReports() async { Future getReports() async {
hasError = false; hasError = false;
@ -56,22 +56,18 @@ class ReportsService extends BaseService {
}, body: Map<String, dynamic>()); }, body: Map<String, dynamic>());
} }
Future updatePatientHealthSummaryReport({bool isSummary}) async { Future updatePatientHealthSummaryReport({bool isSummary}) async {
Map<String, dynamic> body = Map<String, dynamic>(); Map<String, dynamic> body = Map<String, dynamic>();
body['RSummaryReport'] = isSummary; body['RSummaryReport'] = isSummary;
hasError = false; hasError = false;
await baseAppClient.post(UPDATE_HEALTH_TERMS, await baseAppClient.post(UPDATE_HEALTH_TERMS,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {},
onFailure: (String error, int statusCode) {
}, onFailure: (String error, int statusCode) { hasError = true;
hasError = true; super.error = error;
super.error = error; }, body: body);
}, body: body);
} }
Future insertRequestForMedicalReport( Future insertRequestForMedicalReport(
AppointmentHistory appointmentHistory) async { AppointmentHistory appointmentHistory) async {
Map<String, dynamic> body = new Map<String, dynamic>(); Map<String, dynamic> body = new Map<String, dynamic>();
@ -96,4 +92,44 @@ class ReportsService extends BaseService {
super.error = error; super.error = error;
}, body: body); }, 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 { class ToDoCountProviderModel with ChangeNotifier {
int _count; int _count;
bool _isShowBadge = false;
int get count => _count == null ? 0 : _count; int get count => _count == null ? 0 : _count;
void setState(int count) { bool get isShowBadge => _isShowBadge;
void setState(int count, bool isShowBadge) {
_count = count; _count = count;
_isShowBadge = isShowBadge;
notifyListeners(); notifyListeners();
} }
} }

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

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

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

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

@ -84,17 +84,19 @@ class _MyAppointmentsState extends State<MyAppointments>
color: Colors.grey[600], color: Colors.grey[600],
thickness: 0.5, thickness: 0.5,
), ),
Expanded( isDataLoaded
child: new TabBarView( ? Expanded(
physics: NeverScrollableScrollPhysics(), child: new TabBarView(
children: [ physics: NeverScrollableScrollPhysics(),
isDataLoaded ? getBookedAppointments() : Container(), children: [
isDataLoaded ? getConfirmedAppointments() : Container(), getBookedAppointments(),
isDataLoaded ? getArrivedAppointments() : Container() getConfirmedAppointments(),
], getArrivedAppointments()
controller: _tabController, ],
), controller: _tabController,
), ),
)
: Container(),
]), ]),
), ),
); );
@ -114,22 +116,23 @@ class _MyAppointmentsState extends State<MyAppointments>
service.getPatientAppointmentHistory(false, context).then((res) { service.getPatientAppointmentHistory(false, context).then((res) {
print(res['AppoimentAllHistoryResultList'].length); print(res['AppoimentAllHistoryResultList'].length);
if (res['MessageStatus'] == 1) { GifLoaderDialogUtils.hideDialog(context);
GifLoaderDialogUtils.hideDialog(context); setState(() {
setState(() { if (res['MessageStatus'] == 1) {
isDataLoaded = true; // setState(() {
if (res['AppoimentAllHistoryResultList'].length != 0) { if (res['AppoimentAllHistoryResultList'].length != 0) {
isDataLoaded = true; // isDataLoaded = true;
res['AppoimentAllHistoryResultList'].forEach((v) { res['AppoimentAllHistoryResultList'].forEach((v) {
widget.appoList widget.appoList.add(new AppoitmentAllHistoryResultList.fromJson(v));
.add(new AppoitmentAllHistoryResultList.fromJson(v));
}); });
sortAppointmentList(); sortAppointmentList();
} else {} } else {}
}); // });
} else { } else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
isDataLoaded = true;
});
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
print(err); 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 { class ArrivedButtons {
static var buttons = [ static var buttons = [
{ // {
"title": TranslationBase.of(AppGlobal.context).arrived, // "title": TranslationBase.of(AppGlobal.context).arrived,
"subtitle": TranslationBase.of(AppGlobal.context).status, // "subtitle": TranslationBase.of(AppGlobal.context).status,
"icon": "assets/images/new-design/waiting-room.png", // "icon": "assets/images/new-design/waiting-room.png",
"caller": "openReschedule" // "caller": "openReschedule"
}, // },
{ {
"title": TranslationBase.of(AppGlobal.context).medicines, "title": TranslationBase.of(AppGlobal.context).medicines,
"subtitle": TranslationBase.of(AppGlobal.context).medicinesSubtitle, "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/prescriptions/prescription_report_enh.dart';
import 'package:diplomaticquarterapp/core/model/radiology/final_radiology.dart'; import 'package:diplomaticquarterapp/core/model/radiology/final_radiology.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.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/MyAppointments/widgets/reminder_dialog.dart';
import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart'; import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.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/radiology/radiology_details_page.dart';
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart'; import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
@ -62,8 +64,8 @@ class _AppointmentActionsState extends State<AppointmentActions> {
toDoProvider = Provider.of<ToDoCountProviderModel>(context); toDoProvider = Provider.of<ToDoCountProviderModel>(context);
var size = MediaQuery.of(context).size; var size = MediaQuery.of(context).size;
final double itemHeight = projectViewModel.isArabic final double itemHeight = projectViewModel.isArabic
? ((size.height - kToolbarHeight - 24) * 0.47) / 2 ? ((size.height - kToolbarHeight - 24) * 0.5) / 2
: ((size.height - kToolbarHeight - 24) * 0.4) / 2; : ((size.height - kToolbarHeight - 24) * 0.45) / 2;
final double itemWidth = size.width / 2; final double itemWidth = size.width / 2;
return Container( return Container(
@ -83,7 +85,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
_handleButtonClicks(e); _handleButtonClicks(e);
}, },
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.max,
children: [ children: [
Container( Container(
// height: 100.0, // height: 100.0,
@ -100,7 +102,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
color: Colors.white), color: Colors.white),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.max,
children: <Widget>[ children: <Widget>[
Container( Container(
margin: margin:
@ -196,6 +198,10 @@ class _AppointmentActionsState extends State<AppointmentActions> {
openAppointmentRadiology(); openAppointmentRadiology();
break; break;
case "labResult":
openAppointmentLabResults();
break;
case "prescriptions": case "prescriptions":
openPrescriptionReport(); openPrescriptionReport();
break; break;
@ -391,18 +397,48 @@ class _AppointmentActionsState extends State<AppointmentActions> {
} }
getToDoCount() { getToDoCount() {
toDoProvider.setState(0); toDoProvider.setState(0, true);
ClinicListService service = new ClinicListService(); ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) { service.getActiveAppointmentNo(context).then((res) {
print(res['AppointmentActiveNumber']); print(res['AppointmentActiveNumber']);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
toDoProvider.setState(res['AppointmentActiveNumber']); toDoProvider.setState(res['AppointmentActiveNumber'], true);
} else {} } else {}
}).catchError((err) { }).catchError((err) {
print(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() { openAppointmentRadiology() {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
@ -438,10 +474,12 @@ class _AppointmentActionsState extends State<AppointmentActions> {
prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(report)); prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(report));
}); });
print(prescriptionReportEnhList.length); print(prescriptionReportEnhList.length);
navigateToMedicinePrescriptionReport(prescriptionReportEnhList, res['ListPRM']);
} else { } else {
AppToast.showErrorToast(message: TranslationBase.of(context).noRecords); AppToast.showErrorToast(message: TranslationBase.of(context).noRecords);
} }
}).catchError((err) { }).catchError((err) {
print(err);
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err);
}); });
@ -459,6 +497,15 @@ class _AppointmentActionsState extends State<AppointmentActions> {
appo: widget.appo))); appo: widget.appo)));
} }
Future navigateToLabResults(PatientLabOrders patientLabOrders) async {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
LaboratoryResultPage(patientLabOrders: patientLabOrders)))
.then((value) {});
}
Future navigateToRadiologyDetails(FinalRadiology finalRadiology) async { Future navigateToRadiologyDetails(FinalRadiology finalRadiology) async {
Navigator.push( Navigator.push(
context, context,

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

@ -167,7 +167,8 @@ class _InsuranceCardState extends State<InsuranceCard> {
onTap: () => { onTap: () => {
getDetails(model.insurance[index]) getDetails(model.insurance[index])
}, },
label: TranslationBase.of(context).seeDetails, label: TranslationBase.of(context)
.seeDetails,
textColor: Colors.white, textColor: Colors.white,
), ),
width: double.infinity, 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/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.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/material.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import '../base/base_view.dart'; import '../base/base_view.dart';
@ -15,6 +20,7 @@ class InsuranceUpdate extends StatefulWidget {
class _InsuranceUpdateState extends State<InsuranceUpdate> class _InsuranceUpdateState extends State<InsuranceUpdate>
with SingleTickerProviderStateMixin { with SingleTickerProviderStateMixin {
TabController _tabController; TabController _tabController;
InsuranceCardService _insuranceCardService = locator<InsuranceCardService>();
@override @override
void initState() { void initState() {
@ -103,94 +109,109 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
itemCount: model.getAllSharedRecordsByStatusResponse itemCount: model.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList.length, .getAllSharedRecordsByStatusList.length,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
return Container( return model
margin: EdgeInsets.all(10.0), .getAllSharedRecordsByStatusResponse
child: Card( .getAllSharedRecordsByStatusList[
margin: index]
EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0), .status ==
color: Colors.white, 3
shape: RoundedRectangleBorder( ? Container(
borderRadius: BorderRadius.circular(10), margin: EdgeInsets.all(10.0),
), child: Card(
child: Container( margin: EdgeInsets.fromLTRB(
width: MediaQuery.of(context).size.width, 8.0, 16.0, 8.0, 8.0),
padding: EdgeInsets.all(10.0), color: Colors.white,
child: Row( shape: RoundedRectangleBorder(
crossAxisAlignment: borderRadius:
CrossAxisAlignment.start, BorderRadius.circular(10),
mainAxisSize: MainAxisSize.max, ),
children: <Widget>[ child: Container(
Expanded( width:
flex: 3, MediaQuery.of(context).size.width,
child: Container( padding: EdgeInsets.all(10.0),
margin: EdgeInsets.only( child: Row(
top: 2.0, crossAxisAlignment:
left: 10.0, CrossAxisAlignment.start,
right: 20.0), mainAxisSize: MainAxisSize.max,
child: Column( children: <Widget>[
crossAxisAlignment: Expanded(
CrossAxisAlignment.start, flex: 3,
children: <Widget>[ child: Container(
Texts( margin: EdgeInsets.only(
model top: 2.0,
.getAllSharedRecordsByStatusResponse left: 10.0,
.getAllSharedRecordsByStatusList[ right: 20.0),
index] child: Column(
.patientName, crossAxisAlignment:
fontSize: 14, CrossAxisAlignment
color: Colors.black, .start,
fontWeight: FontWeight.w500, 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, : Container();
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, Navigator.push(context,
MaterialPageRoute(builder: (context) => CovidDrivethruLocation())); 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 { class DashboardItem extends StatelessWidget {

@ -430,13 +430,13 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
children: [ children: [
HomePage( HomePage(
goToMyProfile: () { goToMyProfile: () {
// _changeCurrentTab(1); _changeCurrentTab(1);
}, },
), ),
MedicalProfilePage(), MedicalProfilePage(),
BookingOptions(), BookingOptions(),
MyFamily(isAppbarVisible: false), MyFamily(isAppbarVisible: false),
ToDo(), ToDo(isShowAppBar: false),
], // Please do not remove the BookingOptions from this array ], // Please do not remove the BookingOptions from this array
), ),
bottomNavigationBar: BottomNavBar( 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/appointment_rate_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.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_activation_code_response.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.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/select_device_imei_res.dart';
import 'package:diplomaticquarterapp/models/Authentication/send_activation_request.dart'; import 'package:diplomaticquarterapp/models/Authentication/send_activation_request.dart';
import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.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_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
@ -74,6 +76,8 @@ class _ConfirmLogin extends State<ConfirmLogin> {
locator<AppointmentRateViewModel>(); locator<AppointmentRateViewModel>();
ProjectViewModel projectViewModel; ProjectViewModel projectViewModel;
ToDoCountProviderModel toDoProvider;
@override @override
void initState() { void initState() {
_getAvailableBiometrics(); _getAvailableBiometrics();
@ -84,6 +88,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
toDoProvider = Provider.of<ToDoCountProviderModel>(context);
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).confirm, appBarTitle: TranslationBase.of(context).confirm,
isShowAppBar: true, 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() { goToHome() {
authenticatedUserObject.isLogin = true; authenticatedUserObject.isLogin = true;
appointmentRateViewModel.isLogin = true; appointmentRateViewModel.isLogin = true;
projectViewModel.isLogin = true; projectViewModel.isLogin = true;
getToDoCount();
Navigator.of(context).pushNamed(HOME); 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/appointment_rate_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.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_activation_code_response.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.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/pages/rateAppointment/rate_appointment_doctor.dart';
import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.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_shared_preferences.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';
@ -48,6 +50,7 @@ class _Login extends State<Login> {
locator<AuthenticatedUserObject>(); locator<AuthenticatedUserObject>();
ProjectViewModel projectViewModel; ProjectViewModel projectViewModel;
ToDoCountProviderModel toDoProvider;
@override @override
void initState() { void initState() {
@ -64,6 +67,7 @@ class _Login extends State<Login> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
toDoProvider = Provider.of<ToDoCountProviderModel>(context);
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).login, appBarTitle: TranslationBase.of(context).login,
isShowAppBar: true, isShowAppBar: true,
@ -252,6 +256,7 @@ class _Login extends State<Login> {
appointmentRateViewModel appointmentRateViewModel
.getIsLastAppointmentRatedList() .getIsLastAppointmentRatedList()
.then((value) => { .then((value) => {
getToDoCount(),
GifLoaderDialogUtils.hideDialog(context), GifLoaderDialogUtils.hideDialog(context),
if (appointmentRateViewModel.isHaveAppointmentNotRate) 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) { // showLoader(bool isTrue) {
// setState(() { // setState(() {
// isLoading = isTrue; // isLoading = isTrue;

@ -1,11 +1,14 @@
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; 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/core/viewModels/medical/patient_sick_leave_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.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/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart'; import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class PatientSickLeavePage extends StatefulWidget { class PatientSickLeavePage extends StatefulWidget {
@override @override
@ -14,9 +17,14 @@ class PatientSickLeavePage extends StatefulWidget {
class _PatientSickLeavePageState extends State<PatientSickLeavePage> { class _PatientSickLeavePageState extends State<PatientSickLeavePage> {
List<ImagesInfo> imagesInfo = List(); List<ImagesInfo> imagesInfo = List();
@override @override
Widget build(BuildContext context) { 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>( return BaseView<PatientSickLeaveViewMode>(
onModelReady: (model) => model.getSickLeave(), onModelReady: (model) => model.getSickLeave(),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
@ -37,16 +45,16 @@ class _PatientSickLeavePageState extends State<PatientSickLeavePage> {
profileUrl: model.sickLeaveList[index].doctorImageURL, profileUrl: model.sickLeaveList[index].doctorImageURL,
rat: model.sickLeaveList[index].actualDoctorRate.toDouble(), rat: model.sickLeaveList[index].actualDoctorRate.toDouble(),
subName: model.sickLeaveList[index].projectName, subName: model.sickLeaveList[index].projectName,
isInOutPatient: isInOutPatient: model.sickLeaveList[index].isInOutPatient,
model.sickLeaveList[index].isInOutPatient,
onEmailTap: () { onEmailTap: () {
model.sendSickLeaveEmail( showConfirmMessage(model, index);
message: TranslationBase.of(context).emailSentSuccessfully, // model.sendSickLeaveEmail(
requestNo: model.sickLeaveList[index].requestNo, // message: TranslationBase.of(context).emailSentSuccessfully,
doctorName: model.sickLeaveList[index].doctorName, // requestNo: model.sickLeaveList[index].requestNo,
projectName: model.sickLeaveList[index].projectName, // doctorName: model.sickLeaveList[index].doctorName,
setupID: model.sickLeaveList[index].setupID, // projectName: model.sickLeaveList[index].projectName,
projectID: model.sickLeaveList[index].projectID); // 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/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/radiology/final_radiology.dart'; import 'package:diplomaticquarterapp/core/model/radiology/final_radiology.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/radiology_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/radiology_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.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/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
@ -51,29 +53,32 @@ class RadiologyDetailsPage extends StatelessWidget {
), ),
bottomSheet: Container( bottomSheet: Container(
width: double.infinity, 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], color: Colors.grey[100],
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
Divider(), 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( Container(
width: MediaQuery.of(context).size.width * 0.8, width: MediaQuery.of(context).size.width * 0.8,
child: Button( child: Button(
onTap: () { 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, label: TranslationBase.of(context).sendCopyRad,
loading: model.state == ViewState.BusyLocal, loading: model.state == ViewState.BusyLocal,
backgroundColor: Theme.of(context).primaryColor, 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 @override
Widget build(BuildContext context) { 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(
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')); imageEn:
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')); '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>( return BaseView<ReportsViewModel>(
onModelReady: (model) => model.getReports(), //model.getPrescriptions(), onModelReady: (model) => model.getReports(), //model.getPrescriptions(),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
@ -93,7 +105,8 @@ class _HomeReportPageState extends State<HomeReportPage>
Container( Container(
width: MediaQuery.of(context).size.width * 0.22, width: MediaQuery.of(context).size.width * 0.22,
child: Center( child: Center(
child: Texts(TranslationBase.of(context).requested), child:
Texts(TranslationBase.of(context).requested),
), ),
), ),
Container( Container(
@ -105,13 +118,15 @@ class _HomeReportPageState extends State<HomeReportPage>
Container( Container(
width: MediaQuery.of(context).size.width * 0.22, width: MediaQuery.of(context).size.width * 0.22,
child: Center( child: Center(
child: Texts(TranslationBase.of(context).completed), child:
Texts(TranslationBase.of(context).completed),
), ),
), ),
Container( Container(
width: MediaQuery.of(context).size.width * 0.22, width: MediaQuery.of(context).size.width * 0.22,
child: Center( 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>[ children: <Widget>[
ReportListWidget( ReportListWidget(
reportList: model.reportsOrderRequestList, reportList: model.reportsOrderRequestList,
emailAddress: model.user.emailAddress
), ),
ReportListWidget( ReportListWidget(
reportList: model.reportsOrderReadyList, reportList: model.reportsOrderReadyList,
emailAddress: model.user.emailAddress
), ),
ReportListWidget( ReportListWidget(
reportList: model.reportsOrderCompletedList, reportList: model.reportsOrderCompletedList,
emailAddress: model.user.emailAddress
), ),
ReportListWidget( ReportListWidget(
reportList: model.reportsOrderCanceledList, reportList: model.reportsOrderCanceledList,
emailAddress: model.user.emailAddress
), ),
], ],
), ),
), ),
SizedBox(height: 110,) SizedBox(
height: 110,
)
], ],
), ),
bottomSheet: Container( bottomSheet: Container(

@ -1,4 +1,12 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/reports/Reports.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/avatar/large_avatar.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -6,8 +14,9 @@ import 'package:flutter/material.dart';
class ReportListWidget extends StatelessWidget { class ReportListWidget extends StatelessWidget {
final List<Reports> reportList; final List<Reports> reportList;
final String emailAddress;
ReportListWidget({@required this.reportList}); ReportListWidget({@required this.reportList, this.emailAddress});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -16,7 +25,8 @@ class ReportListWidget extends StatelessWidget {
itemBuilder: (context, index) => Padding( itemBuilder: (context, index) => Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Container( 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( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
border: Border.all(color: Colors.white, width: 2), border: Border.all(color: Colors.white, width: 2),
@ -40,15 +50,39 @@ class ReportListWidget extends StatelessWidget {
flex: 4, flex: 4,
child: Padding( child: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Column( child: Row(
crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[ children: [
SizedBox(height: 12,), Column(
Texts(reportList[index].projectName), crossAxisAlignment: CrossAxisAlignment.start,
Texts(reportList[index].clinicDescription), children: <Widget>[
Texts('invoice No: ${reportList[index].invoiceNo}'), SizedBox(
SizedBox(height: 12,), 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, fontSize: 14,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
), ),
SizedBox(height: 12,), SizedBox(
height: 12,
),
Container( Container(
margin: EdgeInsets.only(left: 10,right: 10), margin: EdgeInsets.only(left: 10, right: 10),
child: Image.asset( child: Image.asset(
'assets/images/online_payment_icon.png', 'assets/images/online_payment_icon.png',
fit: BoxFit.fill, fit: BoxFit.fill,
@ -67,37 +69,43 @@ class PaymentService extends StatelessWidget {
), ),
), ),
Expanded( Expanded(
child: Container( child: InkWell(
margin: EdgeInsets.all(5.0), onTap: () =>
padding: EdgeInsets.all(9), Navigator.push(context, FadePage(page: ToDo(isShowAppBar: true))),
decoration: BoxDecoration( child: Container(
color: Colors.white, margin: EdgeInsets.all(5.0),
borderRadius: BorderRadius.circular(8.0), padding: EdgeInsets.all(9),
shape: BoxShape.rectangle), decoration: BoxDecoration(
child: Column( color: Colors.white,
crossAxisAlignment: CrossAxisAlignment.start, borderRadius: BorderRadius.circular(8.0),
children: [ shape: BoxShape.rectangle),
Texts( child: Column(
TranslationBase.of(context).onlineCheckIn, crossAxisAlignment: CrossAxisAlignment.start,
color: HexColor('#B61422'), children: [
bold: true, Texts(
), TranslationBase.of(context).onlineCheckIn,
Texts( color: HexColor('#B61422'),
TranslationBase.of(context).appointment, bold: true,
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,
), ),
), 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, fontSize: 14,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
), ),
SizedBox(height: 12,), SizedBox(
height: 12,
),
Align( Align(
alignment: !projectViewModel.isArabic alignment: !projectViewModel.isArabic
? Alignment.centerRight ? 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/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.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/avatar/large_avatar.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
@ -72,7 +73,7 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
height: 25, height: 25,
), ),
Texts( Texts(
'How would you rate your last visit to the Clinic', TranslationBase.of(context).lastAppointment,
bold: true, bold: true,
color: Colors.black, color: Colors.black,
), ),
@ -122,7 +123,7 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
), ),
Center( Center(
child: Texts( child: Texts(
'Please rate the Clinic', TranslationBase.of(context).rateClinic,
textAlign: TextAlign.center, textAlign: TextAlign.center,
)), )),
SizedBox( SizedBox(
@ -206,7 +207,7 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
message: 'please rate the clinic'); message: 'please rate the clinic');
} }
}, },
label: "Rate", label: TranslationBase.of(context).submit,
disabled: model.state == ViewState.BusyLocal, disabled: model.state == ViewState.BusyLocal,
loading: model.state == ViewState.BusyLocal, loading: model.state == ViewState.BusyLocal,
textColor: Theme.of(context).backgroundColor), textColor: Theme.of(context).backgroundColor),
@ -224,7 +225,7 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
); );
}, },
child: Texts( child: Texts(
'Later', TranslationBase.of(context).later,
decoration: TextDecoration.underline, decoration: TextDecoration.underline,
color: HexColor('#151DFE'), color: HexColor('#151DFE'),
fontSize: 18, fontSize: 18,

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

@ -1087,6 +1087,44 @@ class DoctorsListService extends BaseService {
return Future.value(localRes); 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( Future<Map> getPatientPrescriptionReports(
AppoitmentAllHistoryResultList appo, BuildContext context) async { AppoitmentAllHistoryResultList appo, BuildContext context) async {
Map<String, dynamic> request; Map<String, dynamic> request;

@ -23,8 +23,9 @@ class DateUtil {
if (date != null) { if (date != null) {
try { try {
var dateT = date.split('/'); var dateT = date.split('/');
var year = dateT[2].substring(0,4); var year = dateT[2].substring(0, 4);
var dateP = DateTime(int.parse(year),int.parse(dateT[1]),int.parse(dateT[0])); var dateP =
DateTime(int.parse(year), int.parse(dateT[1]), int.parse(dateT[0]));
return dateP; return dateP;
} catch (e) { } catch (e) {
print(e); print(e);
@ -277,6 +278,24 @@ class DateUtil {
return ""; 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 /// get data formatted like 26/4/2020
/// [dateTime] convert DateTime to data formatted /// [dateTime] convert DateTime to data formatted
static String getDayMonthYearDateFormatted(DateTime dateTime) { static String getDayMonthYearDateFormatted(DateTime dateTime) {

@ -1015,6 +1015,12 @@ class TranslationBase {
String get lastVisit => localizedValues['last-visit'][locale.languageCode]; String get lastVisit => localizedValues['last-visit'][locale.languageCode];
String get tapTitle => localizedValues['tap-title'][locale.languageCode]; String get tapTitle => localizedValues['tap-title'][locale.languageCode];
String get later => localizedValues['later'][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 sendConfEmail => localizedValues['send-email'][locale.languageCode];
String get updateEmail => localizedValues['update-email'][locale.languageCode]; String get updateEmail => localizedValues['update-email'][locale.languageCode];
String get noDataAvailable => localizedValues['noDataAvailable'][locale.languageCode]; String get noDataAvailable => localizedValues['noDataAvailable'][locale.languageCode];

@ -103,6 +103,6 @@ class _BottomNavBarState extends State<BottomNavBar> {
} }
Future navigateToToDoList(context) async { 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( ? Stack(
alignment: AlignmentDirectional.center, alignment: AlignmentDirectional.center,
children: [ children: [

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

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

@ -51,8 +51,12 @@ class TimeLineWidget extends StatelessWidget {
LargeAvatar( LargeAvatar(
onTap: () { onTap: () {
//AppointmentDetails //AppointmentDetails
Navigator.push(context, Navigator.push(
FadePage(page: AppointmentDetails(appo: appoitmentAllHistoryResul,))); context,
FadePage(
page: AppointmentDetails(
appo: appoitmentAllHistoryResul,
)));
}, },
name: appoitmentAllHistoryResul.doctorNameObj, name: appoitmentAllHistoryResul.doctorNameObj,
url: appoitmentAllHistoryResul.doctorImageURL, url: appoitmentAllHistoryResul.doctorImageURL,
@ -69,7 +73,8 @@ class TimeLineWidget extends StatelessWidget {
height: 15, height: 15,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context).primaryColor, 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, shape: BoxShape.rectangle,
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(25.0), Radius.circular(25.0),
@ -80,7 +85,10 @@ class TimeLineWidget extends StatelessWidget {
height: 4, height: 4,
), ),
Texts( Texts(
DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(appoitmentAllHistoryResul.appointmentDate)), DateUtil.getMonthDayYearLangDateFormatted(
DateUtil.convertStringToDate(
appoitmentAllHistoryResul.appointmentDate),
projectViewModel.isArabic ? "ar" : "en"),
color: Colors.white, color: Colors.white,
fontSize: 12.5, fontSize: 12.5,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
@ -97,7 +105,7 @@ class TimeLineWidget extends StatelessWidget {
) )
else else
Positioned( Positioned(
top:projectViewModel.isArabic ? 35 : 50, top: projectViewModel.isArabic ? 35 : 50,
child: Container( child: Container(
margin: EdgeInsets.only(left: 2, right: 2), margin: EdgeInsets.only(left: 2, right: 2),
child: Column( child: Column(
@ -109,9 +117,10 @@ class TimeLineWidget extends StatelessWidget {
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
), ),
Texts( Texts(
DateUtil.getMonthDayYearDateFormatted( DateUtil.getMonthDayYearLangDateFormatted(
DateUtil.convertStringToDate( DateUtil.convertStringToDate(
appoitmentAllHistoryResul.appointmentDate)), appoitmentAllHistoryResul.appointmentDate),
projectViewModel.isArabic ? "ar" : "en"),
color: Colors.white, color: Colors.white,
fontSize: 12.5, fontSize: 12.5,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
@ -124,7 +133,8 @@ class TimeLineWidget extends StatelessWidget {
height: 15, height: 15,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context).primaryColor, 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, shape: BoxShape.rectangle,
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(25.0), Radius.circular(25.0),
@ -137,9 +147,13 @@ class TimeLineWidget extends StatelessWidget {
color: Colors.white, color: Colors.white,
), ),
LargeAvatar( LargeAvatar(
onTap: (){ onTap: () {
Navigator.push(context, Navigator.push(
FadePage(page: AppointmentDetails(appo: appoitmentAllHistoryResul,))); context,
FadePage(
page: AppointmentDetails(
appo: appoitmentAllHistoryResul,
)));
}, },
name: appoitmentAllHistoryResul.doctorNameObj, name: appoitmentAllHistoryResul.doctorNameObj,
url: appoitmentAllHistoryResul.doctorImageURL, 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/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart'; import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.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/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart';
import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
@ -44,8 +45,11 @@ class _AppDrawerState extends State<AppDrawer> {
locator<AuthenticatedUserObject>(); locator<AuthenticatedUserObject>();
VitalSignService _vitalSignService = locator<VitalSignService>(); VitalSignService _vitalSignService = locator<VitalSignService>();
ToDoCountProviderModel toDoProvider;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
toDoProvider = Provider.of<ToDoCountProviderModel>(context);
projectProvider = Provider.of(context); projectProvider = Provider.of(context);
return SizedBox( return SizedBox(
width: MediaQuery.of(context).size.width * 0.75, width: MediaQuery.of(context).size.width * 0.75,
@ -257,7 +261,7 @@ class _AppDrawerState extends State<AppDrawer> {
padding: EdgeInsets.only(left: 5, right: 5), padding: EdgeInsets.only(left: 5, right: 5),
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[ child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[
AppText(result.patientName, color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black), 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 = ""; _vitalSignService.weightKg = "";
await sharedPref.clear(); await sharedPref.clear();
this.user = null; this.user = null;
toDoProvider.setState(0, false);
Navigator.of(context).pushNamed(HOME); Navigator.of(context).pushNamed(HOME);
} }
login() async { login() async {
var data = await sharedPref.getObject(IMEI_USER_DATA); var data = await sharedPref.getObject(IMEI_USER_DATA);
sharedPref.remove(REGISTER_DATA_FOR_LOGIIN); sharedPref.remove(REGISTER_DATA_FOR_LOGIIN);

Loading…
Cancel
Save