Updates & fixes

merge-requests/400/head
haroon amjad 5 years ago
parent e5a636b704
commit b1128be94f

@ -132,7 +132,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
onTap: (index) { onTap: (index) {
setState(() { setState(() {
if (index == 1) { if (index == 1) {
if (widget.appo.clinicID == 17 || widget.appo.clinicID == 23 || widget.appo.isExecludeDoctor) { if (widget.appo.clinicID == 17 || widget.appo.clinicID == 23 || widget.appo.isExecludeDoctor || widget.appo.isLiveCareAppointment) {
_tabController.index = _tabController.previousIndex; _tabController.index = _tabController.previousIndex;
AppointmentDetails.showFooterButton = false; AppointmentDetails.showFooterButton = false;
} else { } else {
@ -143,7 +143,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
}, },
tabs: [ tabs: [
Tab(child: Text(TranslationBase.of(context).appoActions, style: TextStyle(color: Colors.black))), Tab(child: Text(TranslationBase.of(context).appoActions, style: TextStyle(color: Colors.black))),
widget.appo.clinicID == 17 || widget.appo.clinicID == 23 || widget.appo.isExecludeDoctor widget.appo.clinicID == 17 || widget.appo.clinicID == 23 || widget.appo.isExecludeDoctor || widget.appo.isLiveCareAppointment
? Tab( ? Tab(
child: Text(TranslationBase.of(context).availableAppo, style: TextStyle(color: Colors.grey)), child: Text(TranslationBase.of(context).availableAppo, style: TextStyle(color: Colors.grey)),
) )

@ -1,5 +1,5 @@
import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart'; 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/Prescriptions.dart';
import 'package:diplomaticquarterapp/core/model/radiology/final_radiology.dart'; import 'package:diplomaticquarterapp/core/model/radiology/final_radiology.dart';
import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
@ -13,11 +13,11 @@ import 'package:diplomaticquarterapp/pages/MyAppointments/models/BookedButtons.d
import 'package:diplomaticquarterapp/pages/MyAppointments/models/BookedButtonsAllowCheckIn.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/models/BookedButtonsAllowCheckIn.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/ConfirmedButtons.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/models/ConfirmedButtons.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/ConfirmedButtonsAllowCheckIn.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/models/ConfirmedButtonsAllowCheckIn.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/PrescriptionReport.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/askDocDialog.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/askDocDialog.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/labs/laboratory_result_page.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescription_items_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';
@ -391,29 +391,24 @@ class _AppointmentActionsState extends State<AppointmentActions> {
} }
openPrescriptionReport() { openPrescriptionReport() {
GifLoaderDialogUtils.showMyDialog(context); Prescriptions prescriptions = new Prescriptions();
List<PrescriptionReportEnh> prescriptionReportEnhList = List();
DoctorsListService service = new DoctorsListService(); prescriptions.doctorName = widget.appo.doctorNameObj;
service.getPatientPrescriptionReports(widget.appo, context).then((res) { prescriptions.doctorImageURL = widget.appo.doctorImageURL;
GifLoaderDialogUtils.hideDialog(context); prescriptions.speciality = widget.appo.doctorSpeciality;
if (res['ListPRM'].length != 0) { prescriptions.name = widget.appo.projectName;
res['ListPRM'].forEach((report) { prescriptions.appointmentDate = widget.appo.appointmentDate;
prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(report)); prescriptions.nationalityFlagURL = null;
}); prescriptions.doctorRate = widget.appo.doctorRate;
print(prescriptionReportEnhList.length); prescriptions.actualDoctorRate = widget.appo.actualDoctorRate;
navigateToMedicinePrescriptionReport(prescriptionReportEnhList, res['ListPRM']); prescriptions.noOfPatientsRate = widget.appo.noOfPatientsRate;
} else { prescriptions.isInOutPatient = widget.appo.isInOutPatient;
AppToast.showErrorToast(message: TranslationBase.of(context).noRecords);
} navigateToMedicinePrescriptionReport(prescriptions);
}).catchError((err) {
print(err);
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
});
} }
Future navigateToMedicinePrescriptionReport(List<PrescriptionReportEnh> prescriptionReportEnhList, dynamic listPres) async { Future navigateToMedicinePrescriptionReport(Prescriptions prescriptions) async {
Navigator.push(context, FadePage(page: PrescriptionReportPage(prescriptionReportEnhList: prescriptionReportEnhList, listPres: listPres, appo: widget.appo))); Navigator.push(context, FadePage(page: PrescriptionItemsPage(prescriptions: prescriptions)));
} }
Future navigateToLabResults(PatientLabOrders patientLabOrders) async { Future navigateToLabResults(PatientLabOrders patientLabOrders) async {
@ -557,6 +552,8 @@ class _AppointmentActionsState extends State<AppointmentActions> {
rateAppointment() { rateAppointment() {
widget.browser = new MyInAppBrowser(); widget.browser = new MyInAppBrowser();
widget.browser.openBrowser('http://hmg.com/SitePages/pso.aspx?p=' + widget.appo.projectID.toString() + '.' + widget.appo.appointmentNo.toString() + '&c=1'); var url = 'http://hmg.com/SitePages/pso.aspx?p=' + widget.appo.projectID.toString() + '.' + widget.appo.appointmentNo.toString() + '&c=1';
print(url);
launch(url);
} }
} }

@ -202,7 +202,7 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
Texts( Texts(
convertDateFormat(model.insuranceApproval[index].receiptOn), model.insuranceApproval[index].receiptOn != null ? convertDateFormat(model.insuranceApproval[index].receiptOn) : "",
fontSize: 17.5, fontSize: 17.5,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),

@ -545,7 +545,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
pageController.jumpToPage(0); pageController.jumpToPage(0);
}, },
), ),
notificationCount != '' projectViewModel.isLogin && notificationCount != ''
? new Positioned( ? new Positioned(
right: projectViewModel.isArabic ? 35 : 0, right: projectViewModel.isArabic ? 35 : 0,
top: 5, top: 5,

@ -8,6 +8,7 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -182,7 +183,17 @@ class InvoiceDetail extends StatelessWidget {
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
// height: 70.0, // height: 70.0,
margin: EdgeInsets.only(left: 15.0, right: 15.0, top: 10.0, bottom: 20.0), margin: EdgeInsets.only(left: 15.0, right: 15.0, top: 10.0, bottom: 20.0),
child: DefaultButton(TranslationBase.of(context).sendEmail, () => {sendInvoiceEmail()}), child: DefaultButton(TranslationBase.of(context).sendEmail, () {
showDialog(
context: context,
child: ConfirmSendEmailDialog(
email: projectViewModel.user.emailAddress,
onTapSendEmail: () {
sendInvoiceEmail();
},
),
);
}),
), ),
); );
} }

@ -0,0 +1,38 @@
import 'dart:io';
import 'package:flutter/cupertino.dart';
import 'package:http/io_client.dart';
import 'package:signalr_core/signalr_core.dart';
class SignalRUtil {
String hubName;
BuildContext context;
SignalRUtil({@required this.hubName, @required this.context});
HubConnection connectionBuilder;
void startSignalRConnection() async {
connectionBuilder = HubConnectionBuilder()
.withUrl(
hubName,
HttpConnectionOptions(
client: IOClient(HttpClient()..badCertificateCallback = (x, y, z) => true),
logging: (level, message) => print(message),
))
.build();
await connectionBuilder.start();
connectionBuilder.on('ReceiveMessage', (message) {
print(message.toString());
});
await connectionBuilder.invoke('SendMessage', args: ['Bob', 'Says hi!']);
}
bool getConnectionState() {
if (connectionBuilder.state == HubConnectionState.connected) return true;
if (connectionBuilder.state == HubConnectionState.connected) return true;
}
}

@ -292,7 +292,7 @@ class Utils {
title: TranslationBase.of(context).myMedical, title: TranslationBase.of(context).myMedical,
imagePath: 'active_medication.svg', imagePath: 'active_medication.svg',
subTitle: TranslationBase.of(context).myMedicalSubtitle, subTitle: TranslationBase.of(context).myMedicalSubtitle,
isEnable: false, isEnable: projectViewModel.havePrivilege(48),
), ),
)); ));

Loading…
Cancel
Save