Merge branch 'development_v3.3' into dev_v3.13.6

# Conflicts:
#	lib/config/config.dart
#	lib/core/model/labs/patient_lab_orders.dart
#	lib/core/model/labs/request_patient_lab_special_result.dart
#	lib/core/model/labs/request_send_lab_report_email.dart
#	lib/core/model/privilege/VidaPlusProjectListModel.dart
#	lib/core/model/radiology/final_radiology.dart
#	lib/core/model/radiology/request_send_rad_report_email.dart
#	lib/core/service/client/base_app_client.dart
#	lib/core/service/medical/labs_service.dart
#	lib/core/service/medical/radiology_service.dart
#	lib/core/service/privilege_service.dart
#	lib/core/viewModels/medical/labs_view_model.dart
#	lib/core/viewModels/medical/radiology_view_model.dart
#	lib/core/viewModels/project_view_model.dart
#	lib/models/anicllary-orders/ancillary_order_list_model.dart
#	lib/models/anicllary-orders/ancillary_orders_proc_list.dart
#	lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart
#	lib/pages/Blood/confirm_payment_page.dart
#	lib/pages/BookAppointment/BookConfirm.dart
#	lib/pages/BookAppointment/BookSuccess.dart
#	lib/pages/BookAppointment/QRCode.dart
#	lib/pages/Covid-DriveThru/covid-payment-summary.dart
#	lib/pages/MyAppointments/MyAppointments.dart
#	lib/pages/MyAppointments/widgets/AppointmentActions.dart
#	lib/pages/ToDoList/ToDo.dart
#	lib/pages/feedback/send_feedback_page.dart
#	lib/pages/insurance/insurance_update_screen.dart
#	lib/pages/login/login.dart
#	lib/pages/medical/ask_doctor/doctor_response.dart
#	lib/pages/medical/balance/confirm_payment_page.dart
#	lib/pages/medical/balance/my_balance_page.dart
#	lib/pages/medical/labs/laboratory_result_page.dart
#	lib/pages/medical/radiology/radiology_details_page.dart
#	lib/pages/medical/radiology/radiology_home_page.dart
#	lib/pages/paymentService/payment_service.dart
#	lib/splashPage.dart
#	lib/uitl/utils.dart
#	lib/widgets/bottom_navigation/bottom_navigation_item.dart
#	lib/widgets/data_display/medical/LabResult/FlowChartPage.dart
#	lib/widgets/data_display/medical/LabResult/laboratory_result_widget.dart
#	lib/widgets/data_display/medical/doctor_card.dart
#	lib/widgets/data_display/medical/medical_profile_item.dart
#	pubspec.yaml
merge-update-with-lab-changes
devamirsaleemahmad 2 years ago
commit 4231c85055

@ -32,6 +32,7 @@ target 'Runner' do
use_modular_headers! use_modular_headers!
pod 'OpenTok', '~> 2.22.0' pod 'OpenTok', '~> 2.22.0'
pod 'VTO2Lib'
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end end
@ -53,9 +54,34 @@ post_install do |installer|
] ]
build_configuration.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64 i386' build_configuration.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64 i386'
build_configuration.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0' build_configuration.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
xcconfig_path = build_configuration.base_configuration_reference.real_path
xcconfig = File.read(xcconfig_path)
xcconfig_mod = xcconfig.gsub(/DT_TOOLCHAIN_DIR/, "TOOLCHAIN_DIR")
File.open(xcconfig_path, "w") { |file| file << xcconfig_mod }
if build_configuration.build_settings['WRAPPER_EXTENSION'] == 'bundle' if build_configuration.build_settings['WRAPPER_EXTENSION'] == 'bundle'
build_configuration.build_settings['DEVELOPMENT_TEAM'] = '3A359E86ZF' build_configuration.build_settings['DEVELOPMENT_TEAM'] = '3A359E86ZF'
end end
end end
end end
end
post_integrate do |installer|
compiler_flags_key = 'COMPILER_FLAGS'
project_path = 'Pods/Pods.xcodeproj'
project = Xcodeproj::Project.open(project_path)
project.targets.each do |target|
target.build_phases.each do |build_phase|
if build_phase.is_a?(Xcodeproj::Project::Object::PBXSourcesBuildPhase)
build_phase.files.each do |file|
if !file.settings.nil? && file.settings.key?(compiler_flags_key)
compiler_flags = file.settings[compiler_flags_key]
file.settings[compiler_flags_key] = compiler_flags.gsub(/-DOS_OBJECT_USE_OBJC=0\s*/, '')
end
end
end
end
end
project.save()
end end

@ -0,0 +1,97 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<CommandLineArguments>
<CommandLineArgument
argument = "-FIRAnalyticsDebugEnabled"
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "-v"
isEnabled = "NO">
</CommandLineArgument>
</CommandLineArguments>
</LaunchAction>
<ProfileAction
buildConfiguration = "Profile"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

@ -19,8 +19,8 @@ var PACKAGES_SHOPPING_CART = '/api/shopping_cart_items';
var PACKAGES_ORDERS = '/api/orders'; var PACKAGES_ORDERS = '/api/orders';
var PACKAGES_ORDER_HISTORY = '/api/orders/items'; var PACKAGES_ORDER_HISTORY = '/api/orders/items';
var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara';
// var BASE_URL = 'http://10.50.100.198:2018/'; // var BASE_URL = 'http://10.50.100.198:2018/';
var BASE_URL = 'https://uat.hmgwebservices.com/'; var BASE_URL = 'https://uat.hmgwebservices.com/';
// var BASE_URL = 'https://hmgwebservices.com/'; // var BASE_URL = 'https://hmgwebservices.com/';
// var BASE_URL = 'https://orash.cloudsolutions.com.sa/'; // var BASE_URL = 'https://orash.cloudsolutions.com.sa/';
// var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/';
@ -335,7 +335,7 @@ var UPDATE_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnari
var CHANNEL = 3; var CHANNEL = 3;
var GENERAL_ID = 'Cs2020@2016\$2958'; var GENERAL_ID = 'Cs2020@2016\$2958';
var IP_ADDRESS = '10.20.10.20'; var IP_ADDRESS = '10.20.10.20';
var VERSION_ID = 10.9; var VERSION_ID = 10.8;
var SETUP_ID = '91877'; var SETUP_ID = '91877';
var LANGUAGE = 2; var LANGUAGE = 2;
// var PATIENT_OUT_SA = 0; // var PATIENT_OUT_SA = 0;

@ -182,7 +182,7 @@ const Map localizedValues = {
'passQRAppoAttend': {'en': 'Pass the QR code through the attendance devices available in the Hospital.', 'ar': 'تمرير الكود من خلال اجهزة تسجيل الحضور المتوفرة في الفرع.'}, 'passQRAppoAttend': {'en': 'Pass the QR code through the attendance devices available in the Hospital.', 'ar': 'تمرير الكود من خلال اجهزة تسجيل الحضور المتوفرة في الفرع.'},
'sitWaitingQR': {'en': 'Sit in the waiting rooms until called by the nurse.', 'ar': 'الجلوس في غرف الانتظار لحين منادتك من قبل الممرضة.'}, 'sitWaitingQR': {'en': 'Sit in the waiting rooms until called by the nurse.', 'ar': 'الجلوس في غرف الانتظار لحين منادتك من قبل الممرضة.'},
'attendRegisterCode': {'en': 'Attendance registration code', 'ar': 'رمز تسجيل الحضور'}, 'attendRegisterCode': {'en': 'Attendance registration code', 'ar': 'رمز تسجيل الحضور'},
'scanQRHospital': {'en': 'Approach the Online Check-In board in the hospital & scan via NFC to Check-In', 'ar': 'اقترب من لوحة تسجيل الوصول عبر الإنترنت في المستشفى وافحصها عبر NFC لتسجيل الوصول'}, 'scanQRHospital': {'en': 'Approach the Online Check-In board in the hospital & scan via NFC or QR Code to Check-In', 'ar': 'اقترب من لوحة تسجيل الوصول عبر الإنترنت في المستشفى وقم بالمسح الضوئي عبر NFC أو رمز الاستجابة السريعة لتسجيل الوصول'},
'scanNFC': {'en': 'Scan NFC to Check-In', 'ar': 'مسح NFC لتسجيل الوصول'}, 'scanNFC': {'en': 'Scan NFC to Check-In', 'ar': 'مسح NFC لتسجيل الوصول'},
"sendEmail": {"en": "Send Email", "ar": "ارسال نسخة"}, "sendEmail": {"en": "Send Email", "ar": "ارسال نسخة"},
"success": {"en": "Done successfully", "ar": "تم تنفذ الطلب بنجاح"}, "success": {"en": "Done successfully", "ar": "تم تنفذ الطلب بنجاح"},

@ -0,0 +1,15 @@
class HMCProjectListModel {
int projectID;
HMCProjectListModel({this.projectID});
HMCProjectListModel.fromJson(Map<String, dynamic> json) {
projectID = json['ProjectID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ProjectID'] = this.projectID;
return data;
}
}

@ -11,9 +11,11 @@ class PatientSickLeaveService extends BaseService {
await baseAppClient.post(GET_PATIENT_SICK_LEAVE_STATUS, await baseAppClient.post(GET_PATIENT_SICK_LEAVE_STATUS,
onSuccess: (response, statusCode) async { onSuccess: (response, statusCode) async {
sickLeaveList.clear(); sickLeaveList.clear();
response['List_SickLeave'].forEach((sickLeave) { if(response['List_SickLeave'] != null && response['List_SickLeave'].length != 0) {
sickLeaveList.add(SickLeave.fromJson(sickLeave)); response['List_SickLeave'].forEach((sickLeave) {
}); sickLeaveList.add(SickLeave.fromJson(sickLeave));
});
}
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/privilege/HMCProjectListModel.dart';
import 'package:diplomaticquarterapp/core/model/privilege/PrivilegeModel.dart'; import 'package:diplomaticquarterapp/core/model/privilege/PrivilegeModel.dart';
import 'package:diplomaticquarterapp/core/model/privilege/VidaPlusProjectListModel.dart'; import 'package:diplomaticquarterapp/core/model/privilege/VidaPlusProjectListModel.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart';
@ -7,30 +8,30 @@ import 'package:diplomaticquarterapp/main.dart';
class PrivilegeService extends BaseService { class PrivilegeService extends BaseService {
List<PrivilegeModel> privilegeModelList = []; List<PrivilegeModel> privilegeModelList = [];
List<VidaPlusProjectListModel> vidaPlusProjectListModel = []; List<VidaPlusProjectListModel> vidaPlusProjectListModel = [];
List<HMCProjectListModel> hMCProjectListModel = [];
Future getPrivilege() async { Future getPrivilege() async {
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['PatientType'] = 4; body['PatientType'] = 4;
await baseAppClient.post( await baseAppClient.post(GET_PRIVILEGE, onSuccess: (dynamic response, int statusCode) {
GET_PRIVILEGE, response['ServicePrivilegeList'].forEach((item) {
onSuccess: (dynamic response, int statusCode) { privilegeModelList.add(PrivilegeModel.fromJson(item));
response['ServicePrivilegeList'].forEach((item) { });
privilegeModelList.add(PrivilegeModel.fromJson(item));
if (response['ProjectListVidaPlus'].length != 0) {
response['ProjectListVidaPlus'].forEach((item) {
vidaPlusProjectListModel.add(VidaPlusProjectListModel.fromJson(item));
}); });
}
if (response['ProjectListVidaPlus'].length != 0) { if (response['HMCProjectList'].length != 0) {
response['ProjectListVidaPlus'].forEach((item) { response['HMCProjectList'].forEach((item) {
vidaPlusProjectListModel.add(VidaPlusProjectListModel.fromJson(item)); hMCProjectListModel.add(HMCProjectListModel.fromJson(item));
}); });
} }
}, }, onFailure: (String error, int statusCode) {
onFailure: (String error, int statusCode) { hasError = true;
print(error); super.error = error;
print(statusCode); }, body: body);
hasError = true;
super.error = error;
},
body: body,
);
} }
} }

@ -75,6 +75,7 @@ class LabsViewModel extends BaseViewModel {
List<LabResultList> labResultLists =[]; List<LabResultList> labResultLists =[];
getLaboratoryResult({required String projectID, required int clinicID, required String invoiceNo, required String orderNo, required String setupID, required bool isVidaPlus}) async { getLaboratoryResult({required String projectID, required int clinicID, required String invoiceNo, required String orderNo, required String setupID, required bool isVidaPlus}) async {
getLaboratoryResult({String projectID, int clinicID, String invoiceNo, String orderNo, String setupID, bool isVidaPlus}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _labsService.getLaboratoryResult(invoiceNo: invoiceNo, await _labsService.getLaboratoryResult(invoiceNo: invoiceNo,
orderNo: orderNo, orderNo: orderNo,
@ -114,9 +115,9 @@ class LabsViewModel extends BaseViewModel {
} }
} }
getPatientLabOrdersResults({required PatientLabOrders patientLabOrder, required String procedure}) async { getPatientLabOrdersResults({PatientLabOrders patientLabOrder, String procedure, bool isVidaPlus}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _labsService.getPatientLabOrdersResults(patientLabOrder: patientLabOrder, procedure: procedure); await _labsService.getPatientLabOrdersResults(patientLabOrder: patientLabOrder, procedure: procedure, isVidaPlus: isVidaPlus);
if (_labsService.hasError) { if (_labsService.hasError) {
error = _labsService.error!; error = _labsService.error!;
setState(ViewState.Error); setState(ViewState.Error);
@ -135,14 +136,14 @@ class LabsViewModel extends BaseViewModel {
_labsService.labOrdersResultsList.forEach((element) { _labsService.labOrdersResultsList.forEach((element) {
try { try {
timeSeries.add(new TimeSeriesSales2(DateUtil.convertStringToDate(element.verifiedOnDateTime!), double.parse(element.resultValue!))); timeSeries.add(new TimeSeriesSales2(DateUtil.convertStringToDate(element.verifiedOnDateTime), double.parse(element.resultValue)));
} catch (e) {} } catch (e) {}
}); });
setState(ViewState.Idle); setState(ViewState.Idle);
} }
} }
sendLabReportEmail({PatientLabOrders? patientLabOrder, String? mes, AuthenticatedUser? userObj, required bool isVidaPlus, bool isDownload = false}) async { sendLabReportEmail({PatientLabOrders? patientLabOrder, String? mes, AuthenticatedUser? userObj, required bool isVidaPlus, bool isDownload = false}) async {
await _labsService.sendLabReportEmail(patientLabOrder: patientLabOrder, userObj: userObj, isVidaPlus: isVidaPlus, isDownload: isDownload); await _labsService.sendLabReportEmail(patientLabOrder: patientLabOrder, userObj: userObj, isVidaPlus: isVidaPlus, isDownload: isDownload);
if (_labsService.hasError) { if (_labsService.hasError) {
error = _labsService.error!; error = _labsService.error!;

@ -3,6 +3,7 @@ import 'dart:async';
import 'package:connectivity_plus/connectivity_plus.dart'; import 'package:connectivity_plus/connectivity_plus.dart';
import 'package:diplomaticquarterapp/analytics/google-analytics.dart'; import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/privilege/HMCProjectListModel.dart';
import 'package:diplomaticquarterapp/core/model/privilege/PrivilegeModel.dart'; import 'package:diplomaticquarterapp/core/model/privilege/PrivilegeModel.dart';
import 'package:diplomaticquarterapp/core/model/privilege/VidaPlusProjectListModel.dart'; import 'package:diplomaticquarterapp/core/model/privilege/VidaPlusProjectListModel.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
@ -51,12 +52,14 @@ class ProjectViewModel extends BaseViewModel {
List<PrivilegeModel> privilegeRootUser = []; List<PrivilegeModel> privilegeRootUser = [];
List<PrivilegeModel> privilegeChildUser = []; List<PrivilegeModel> privilegeChildUser = [];
List<VidaPlusProjectListModel> _vidaPlusProjectListModel = []; List<VidaPlusProjectListModel> _vidaPlusProjectListModel = [];
List<HMCProjectListModel> _hMCProjectListModel = [];
List<VidaPlusProjectListModel> get vidaPlusProjectList => _vidaPlusProjectListModel;
List<LaserBodyPart> selectedBodyPartList = [];
List<PrivilegeModel> get privileges => isLoginChild ? privilegeChildUser : privilegeChildUser; List<PrivilegeModel> get privileges => isLoginChild ? privilegeChildUser : privilegeChildUser;
List<VidaPlusProjectListModel> get vidaPlusProjectList => _vidaPlusProjectListModel;
List<HMCProjectListModel> get hMCProjectListModel => _hMCProjectListModel;
List<LaserBodyPart> selectedBodyPartList = [];
late StreamSubscription subscription; late StreamSubscription subscription;
late double _latitude; late double _latitude;
@ -119,6 +122,16 @@ class ProjectViewModel extends BaseViewModel {
notifyListeners(); notifyListeners();
} }
setVidaPlusProjectList(List<VidaPlusProjectListModel> vidaPlusProjectListModelInput) {
_vidaPlusProjectListModel = vidaPlusProjectListModelInput;
notifyListeners();
}
setHMCProjectList(List<HMCProjectListModel> hMCProjectListModel) {
_hMCProjectListModel = hMCProjectListModel;
notifyListeners();
}
setPrivilege({privilegeList, bool isLoginChild = false}) { setPrivilege({privilegeList, bool isLoginChild = false}) {
List<PrivilegeModel> privilege = []; List<PrivilegeModel> privilege = [];
@ -140,10 +153,7 @@ class ProjectViewModel extends BaseViewModel {
notifyListeners(); notifyListeners();
} }
setVidaPlusProjectList(List<VidaPlusProjectListModel> vidaPlusProjectListModelInput) {
_vidaPlusProjectListModel = vidaPlusProjectListModelInput;
notifyListeners();
}
bool havePrivilege(int id) { bool havePrivilege(int id) {
bool isHavePrivilege = false; bool isHavePrivilege = false;
@ -173,7 +183,7 @@ class ProjectViewModel extends BaseViewModel {
searchvalue = data; searchvalue = data;
notifyListeners(); notifyListeners();
} }
void setLatitudeLongitude(double lat, double long) { void setLatitudeLongitude(double lat, double long) {
_latitude = lat; _latitude = lat;
_longitude = long; _longitude = long;

@ -1,6 +1,5 @@
import 'dart:io'; import 'dart:io';
import "package:collection/collection.dart";
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/viewModels/ancillary_orders_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/ancillary_orders_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
@ -23,7 +22,6 @@ import 'package:diplomaticquarterapp/widgets/dragable_sheet.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.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';
import 'package:provider/provider.dart';
class AnicllaryOrdersDetails extends StatefulWidget { class AnicllaryOrdersDetails extends StatefulWidget {
final dynamic appoNo; final dynamic appoNo;
@ -134,9 +132,13 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
SizedBox(height: 12), SizedBox(height: 12),
DefaultButton( DefaultButton(
TranslationBase.of(context).payNow.toUpperCase(), TranslationBase.of(context).payNow.toUpperCase(),
selectedProcList.length > 0 && getTotalValue() != "0.00" selectedProcList!.length > 0
? () { ? () {
makePayment(model); if (getTotalValue() != "0.00") {
makePayment(model);
} else {
autoGenerateInvoice();
}
} }
: null, : null,
color: CustomColors.green, color: CustomColors.green,
@ -207,7 +209,7 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
), ),
mWidth(3), mWidth(3),
Text( Text(
projectViewModel.user!.firstName! + " " + projectViewModel.user!.lastName!, projectViewModel.user.firstName + " " + projectViewModel.user.lastName,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 12, fontSize: 12,
@ -499,7 +501,7 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
openPayment(selectedPaymentMethod, projectViewModel.user!, double.parse(getTotalValue()), AppoitmentAllHistoryResultList(), model, selectedInstallmentPlan); openPayment(selectedPaymentMethod, projectViewModel.user!, double.parse(getTotalValue()), AppoitmentAllHistoryResultList(), model, selectedInstallmentPlan);
}, },
patientShare: double.parse(getTotalValue()), patientShare: double.parse(getTotalValue()),
isFromAdvancePayment: !projectViewModel.havePrivilege(94), isFromAdvancePayment: !projectViewModel!.havePrivilege(94),
)); ));
} }
@ -637,8 +639,15 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
// selectedProcList.forEach((element) { // selectedProcList.forEach((element) {
// ancillaryOrdersProcedureList.add(new AncillaryOrdersProcedureList(procedureID: num.parse(element.procedureID), procedureDescription: element.procedureName)); // ancillaryOrdersProcedureList.add(new AncillaryOrdersProcedureList(procedureID: num.parse(element.procedureID), procedureDescription: element.procedureName));
// }); // });
service.HIS_createAdvancePayment(appo, widget.projectID.toString(), res['Amount'], res['Fort_id'], res['PaymentMethod'], projectViewModel.user!.patientType, service.HIS_createAdvancePayment(appo, widget.projectID.toString(), res['Amount'], res['Fort_id'], res['PaymentMethod'], projectViewModel.user.patientType,
projectViewModel.user!.firstName! + " " + projectViewModel.user!.lastName!, projectViewModel.user!.patientID!, localContext, projectViewModel.user.firstName + " " + projectViewModel.user.lastName, projectViewModel.user.patientID, localContext,
isAncillaryOrder: true)
// List<AncillaryOrdersProcedureList> ancillaryOrdersProcedureList = [];
// selectedProcList.forEach((element) {
// ancillaryOrdersProcedureList.add(new AncillaryOrdersProcedureList(procedureID: num.parse(element.procedureID), procedureDescription: element.procedureName));
// });
service.HIS_createAdvancePayment(appo, widget.projectID.toString(), res['Amount'], res['Fort_id'], res['PaymentMethod'], projectViewModel.user.patientType,
projectViewModel.user.firstName + " " + projectViewModel.user.lastName, projectViewModel.user.patientID, localContext,
isAncillaryOrder: true) isAncillaryOrder: true)
.then((res) { .then((res) {
addAdvancedNumberRequest( addAdvancedNumberRequest(
@ -677,6 +686,8 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
}); });
}); });
GifLoaderDialogUtils.showMyDialog(localContext);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service.autoGenerateAncillaryOrdersInvoice(widget.orderNo, widget.projectID, widget.appoNo, selectedProcListAPI, localContext).then((res) { service.autoGenerateAncillaryOrdersInvoice(widget.orderNo, widget.projectID, widget.appoNo, selectedProcListAPI, localContext).then((res) {
GifLoaderDialogUtils.hideDialog(localContext); GifLoaderDialogUtils.hideDialog(localContext);
@ -714,7 +725,7 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
addToSelectedProcedures(AnciallryOrdersViewModel model) { addToSelectedProcedures(AnciallryOrdersViewModel model) {
if (model.ancillaryListsDetails.isNotEmpty) { if (model.ancillaryListsDetails.isNotEmpty) {
selectedProcList.clear(); selectedProcList.clear();
model.ancillaryListsDetails[0].ancillaryOrderProcDetailsList!.forEach((element) { model.ancillaryListsDetails[0].ancillaryOrderProcDetailsList.forEach((element) {
if (!isProcedureDisabled(element)) { if (!isProcedureDisabled(element)) {
selectedProcList.add(element); selectedProcList.add(element);
} }

@ -335,11 +335,11 @@ class _BookConfirmState extends State<BookConfirm> {
AppToast.showSuccessToast(message: TranslationBase.of(context).bookedSuccess); AppToast.showSuccessToast(message: TranslationBase.of(context).bookedSuccess);
Future.delayed(new Duration(milliseconds: 500), () { Future.delayed(new Duration(milliseconds: 500), () {
// checkPatientNphiesEligibility(docObject, res['AppointmentNo'], context); // checkPatientNphiesEligibility(docObject, res['AppointmentNo'], context);
getToDoCount(); getToDoCount();
getPatientShare(context, res['AppointmentNo'], docObject.clinicID!, docObject.projectID!, docObject); getPatientShare(context, res['AppointmentNo'], docObject.clinicID!, docObject.projectID!, docObject);
}); });
widget.service.logDoctorFreeSlots(docObject.doctorID!, docObject.clinicID!, docObject.projectID!, decodedLogs, res['AppointmentNo'], context).then((res) { widget.service.logDoctorFreeSlots(docObject.doctorID!, docObject.clinicID!, docObject.projectID!, decodedLogs, res['AppointmentNo'], context).then((res) {
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
print("Logs Saved"); print("Logs Saved");

@ -1,5 +1,6 @@
import 'dart:typed_data'; import 'dart:typed_data';
import 'package:barcode_scan2/barcode_scan2.dart';
import 'package:diplomaticquarterapp/analytics/google-analytics.dart'; import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/locator.dart';
@ -16,7 +17,9 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.dart'; import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.dart';
import 'package:diplomaticquarterapp/widgets/nfc/nfc_reader_sheet.dart'; import 'package:diplomaticquarterapp/widgets/nfc/nfc_reader_sheet.dart';
@ -55,7 +58,7 @@ class _QRCodeState extends State<QRCode> {
}); });
WidgetsBinding.instance.addPostFrameCallback((timeStamp) { WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
startNFCScan(); // startNFCScan();
}); });
super.initState(); super.initState();
@ -75,9 +78,18 @@ class _QRCodeState extends State<QRCode> {
}); });
} }
startQRCodeScan() async {
String onlineCheckInQRCode = (await BarcodeScanner.scan())?.rawContent;
if (onlineCheckInQRCode != "") {
sendNfcCheckInRequest(onlineCheckInQRCode);
locator<GAnalytics>().todoList.to_do_list_nfc(widget.appointment);
} else {}
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
_context = context; _context = context;
List<Widget> checkInOptionsList = getCheckInOptionsList(context);
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).onlineCheckIn, appBarTitle: TranslationBase.of(context).onlineCheckIn,
isShowAppBar: true, isShowAppBar: true,
@ -149,42 +161,95 @@ class _QRCodeState extends State<QRCode> {
), ),
], ],
), ),
], mHeight(21),
), Padding(
), padding: EdgeInsets.only(left: 21, right: 21),
bottomSheet: Container( child: GridView.builder(
color: CustomColors.appBackgroudGreyColor, shrinkWrap: true,
padding: EdgeInsets.all(21), primary: false,
// height: 45.0, physics: NeverScrollableScrollPhysics(),
child: Row( gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12),
children: [ padding: EdgeInsets.zero,
Expanded( itemCount: checkInOptionsList.length,
flex: 1, itemBuilder: (BuildContext context, int index) {
child: ButtonTheme( return checkInOptionsList[index];
shape: RoundedRectangleBorder( },
borderRadius: BorderRadius.circular(10.0),
),
height: 45.0,
child: CustomTextButton(
backgroundColor: CustomColors.green,
elevation: 0,
onPressed: () {
startNFCScan();
},
child: Text(TranslationBase.of(context).scanNFC,
style: TextStyle(
fontSize: 18.0,
color: Colors.white,
)),
),
), ),
), ),
], ],
), ),
), ),
// bottomSheet: Container(
// color: CustomColors.appBackgroudGreyColor,
// padding: EdgeInsets.all(21),
// // height: 45.0,
// child: Row(
// children: [
// Expanded(
// flex: 1,
// child: ButtonTheme(
// shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.circular(10.0),
// ),
// height: 45.0,
// child: CustomTextButton(
// backgroundColor: CustomColors.green,
// elevation: 0,
// onPressed: () {
// startNFCScan();
// },
// child: Text(TranslationBase.of(context).scanNFC,
// style: TextStyle(
// fontSize: 18.0,
// color: Colors.white,
// )),
// ),
// ),
// ),
// ],
// ),
// ),
); );
} }
List<Widget> getCheckInOptionsList(BuildContext context) {
List<Widget> optionsList = [];
optionsList.add(
InkWell(
onTap: () {
startNFCScan();
},
child: MedicalProfileItem(
title: TranslationBase.of(context).scanNFC,
imagePath: 'contactless.svg',
subTitle: "",
isEnable: true,
width: 80.0,
height: 80.0,
),
),
);
optionsList.add(
InkWell(
onTap: () {
startQRCodeScan();
},
child: MedicalProfileItem(
title: TranslationBase.of(context).pharmaLiveCareScanQR,
imagePath: 'qr_code.svg',
subTitle: "",
isEnable: true,
width: 80.0,
height: 80.0,
),
),
);
return optionsList;
}
sendEmail() async { sendEmail() async {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();

@ -265,7 +265,7 @@ class _CovidPaymentSummaryState extends State<CovidPaymentSummary> {
MyInAppBrowser.errorURLS.forEach((element) { MyInAppBrowser.errorURLS.forEach((element) {
if (url.contains(element)) { if (url.contains(element)) {
if (widget.browser!.isOpened()) widget.browser!.close(); if (widget.browser.isOpened()) widget.browser.close();
MyInAppBrowser.isPaymentDone = false; MyInAppBrowser.isPaymentDone = false;
return; return;
} }
@ -276,7 +276,7 @@ class _CovidPaymentSummaryState extends State<CovidPaymentSummary> {
print("onBrowserExit Called!!!!"); print("onBrowserExit Called!!!!");
try { try {
if (widget.selectedPaymentMethod == "TAMARA") { if (widget.selectedPaymentMethod == "TAMARA") {
checkTamaraPaymentStatus(Utils.getAppointmentTransID(appo.projectID!, appo.clinicID!, appo.appointmentNo!), appo); checkTamaraPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), appo);
// if (tamaraPaymentStatus != null && tamaraPaymentStatus.toLowerCase() == "approved") { // if (tamaraPaymentStatus != null && tamaraPaymentStatus.toLowerCase() == "approved") {
// updateTamaraRequestStatus("success", "14", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID, num.parse(widget.selectedInstallmentPlan), appo); // updateTamaraRequestStatus("success", "14", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID, num.parse(widget.selectedInstallmentPlan), appo);
// } else { // } else {

@ -371,6 +371,7 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
}), }),
isInOutPatient: _appointmentResult.isInOutPatient, isInOutPatient: _appointmentResult.isInOutPatient,
name: _appointmentResult.doctorTitle! + " " + _appointmentResult.doctorNameObj!, name: _appointmentResult.doctorTitle! + " " + _appointmentResult.doctorNameObj!,
projectID: _appointmentResult.projectID,
// billNo: _appointmentResult.invoiceNo, // billNo: _appointmentResult.invoiceNo,
profileUrl: _appointmentResult.doctorImageURL, profileUrl: _appointmentResult.doctorImageURL,
subName: _isSortByClinic ? _appointmentResult.projectName : _appointmentResult.clinicName, subName: _isSortByClinic ? _appointmentResult.projectName : _appointmentResult.clinicName,

@ -29,6 +29,7 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart'; import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -74,6 +75,11 @@ class _AppointmentActionsState extends State<AppointmentActions> {
itemBuilder: (context, index) { itemBuilder: (context, index) {
// bool shouldEnable = ((widget.appo.clinicID == 17 || widget.appo.clinicID == 47) || (widget.appo.isLiveCareAppointment && appoButtonsList[index].caller == "askDoc") || appoButtonsList[index].caller == "openReschedule"); // bool shouldEnable = ((widget.appo.clinicID == 17 || widget.appo.clinicID == 47) || (widget.appo.isLiveCareAppointment && appoButtonsList[index].caller == "askDoc") || appoButtonsList[index].caller == "openReschedule");
bool shouldEnable = (((widget.appo.clinicID == 17 || widget.appo.clinicID == 47) && appoButtonsList[index].caller == "openReschedule") || (widget.appo.isLiveCareAppointment! && appoButtonsList[index].caller == "askDoc")); bool shouldEnable = (((widget.appo.clinicID == 17 || widget.appo.clinicID == 47) && appoButtonsList[index].caller == "openReschedule") || (widget.appo.isLiveCareAppointment! && appoButtonsList[index].caller == "askDoc"));
bool shouldEnable = (((widget.appo.clinicID == 17 || widget.appo.clinicID == 47) && appoButtonsList[index].caller == "openReschedule") ||
(widget.appo.isLiveCareAppointment && appoButtonsList[index].caller == "askDoc") ||
(Utils.isVidaPlusProject(projectViewModel, widget.appo.projectID) &&
widget.appo.clinicID == 10 &&
(appoButtonsList[index].caller == "prescriptions" || appoButtonsList[index].caller == "radiology" || appoButtonsList[index].caller == "labResult")));
return InkWell( return InkWell(
onTap: shouldEnable onTap: shouldEnable
? null ? null
@ -111,7 +117,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
GAnalytics.APPOINTMENT_DETAIL_FLOW_TYPE = 'my appointment'; GAnalytics.APPOINTMENT_DETAIL_FLOW_TYPE = 'my appointment';
showReminderDialog( showReminderDialog(
context, context,
new DateFormat("dd MMM yyyy hh:mm") DateFormat("dd MMM yyyy hh:mm")
.parse(DateUtil.formatDateToDate(DateUtil.convertStringToDate(widget.appo.appointmentDate!), widget.projectViewModel!.isArabic) + " " + widget.appo.startTime!), .parse(DateUtil.formatDateToDate(DateUtil.convertStringToDate(widget.appo.appointmentDate!), widget.projectViewModel!.isArabic) + " " + widget.appo.startTime!),
//DateUtil.convertStringToDate(widget.appo.appointmentDate), //DateUtil.convertStringToDate(widget.appo.appointmentDate),
widget.appo.doctorNameObj!, widget.appo.doctorNameObj!,
@ -152,12 +158,12 @@ class _AppointmentActionsState extends State<AppointmentActions> {
locator<GAnalytics>().appointment.appointment_detail_action(appointment: widget.appo, action: 'survey'); locator<GAnalytics>().appointment.appointment_detail_action(appointment: widget.appo, action: 'survey');
break; break;
case "Insurance": case "Insurance":
navigateToInsuranceApprovals(widget.appo.appointmentNo!); navigateToInsuranceApprovals(widget.appo.appointmentNo);
locator<GAnalytics>().appointment.appointment_detail_action(appointment: widget.appo, action: 'insurance'); locator<GAnalytics>().appointment.appointment_detail_action(appointment: widget.appo, action: 'insurance');
break; break;
case "VitalSigns": case "VitalSigns":
navigateToVitalSigns(widget.appo.appointmentNo!, widget.appo.projectID!); navigateToVitalSigns(widget.appo.appointmentNo, widget.appo.projectID);
locator<GAnalytics>().appointment.appointment_detail_action(appointment: widget.appo, action: 'vital sign'); locator<GAnalytics>().appointment.appointment_detail_action(appointment: widget.appo, action: 'vital sign');
break; break;
@ -583,12 +589,26 @@ class _AppointmentActionsState extends State<AppointmentActions> {
navigateToToDoPage(BuildContext context, ToDoCountProviderModel model) { navigateToToDoPage(BuildContext context, ToDoCountProviderModel model) {
if (widget.projectViewModel!.isLogin) { if (widget.projectViewModel!.isLogin) {
if (model.count != 0) { if (model.count != 0) {
Navigator.push(context, FadePage(page: ToDo(isShowAppBar: true))); Navigator.push(
context,
FadePage(
page: ToDo(
isShowAppBar: true,
isFromMyAppointments: true,
appointment: widget.appo,
)));
} else { } else {
AppToast.showErrorToast(message: TranslationBase.of(context).upcomingEmpty); AppToast.showErrorToast(message: TranslationBase.of(context).upcomingEmpty);
} }
} else { } else {
Navigator.push(context, FadePage(page: ToDo(isShowAppBar: true))); Navigator.push(
context,
FadePage(
page: ToDo(
isShowAppBar: true,
isFromMyAppointments: true,
appointment: widget.appo,
)));
} }
} }

@ -55,8 +55,10 @@ class ToDo extends StatefulWidget {
bool isShowAppBar = true; bool isShowAppBar = true;
Function()? onBackClick; Function()? onBackClick;
bool isFromMyAppointments;
AppoitmentAllHistoryResultList appointment;
ToDo({required this.isShowAppBar, this.onBackClick}); ToDo({@required this.isShowAppBar, this.onBackClick, this.isFromMyAppointments = false, this.appointment});
@override @override
_ToDoState createState() => _ToDoState(); _ToDoState createState() => _ToDoState();
@ -802,7 +804,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
List<PatientDoctorAppointmentList> doctorByHospital = _patientDoctorAppointmentListHospital.where((elementClinic) => elementClinic.filterName == element.projectName).toList(); List<PatientDoctorAppointmentList> doctorByHospital = _patientDoctorAppointmentListHospital.where((elementClinic) => elementClinic.filterName == element.projectName).toList();
if (doctorByHospital.length != 0) { if (doctorByHospital.length != 0) {
_patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element); _patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList.add(element);
} else { } else {
_patientDoctorAppointmentListHospital _patientDoctorAppointmentListHospital
.add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element)); .add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element));
@ -854,6 +856,9 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
}); });
} }
dataLoaded = true; dataLoaded = true;
if(widget.isFromMyAppointments) {
getPatientShare(context, widget.appointment);
}
}); });
} else { } else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);

@ -407,8 +407,8 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
color: Color(0xff575757), color: Color(0xff575757),
letterSpacing: -0.56, letterSpacing: -0.56,
), ),
suffixIconConstraints: BoxConstraints(minWidth: 50), // suffixIconConstraints: BoxConstraints(minWidth: 50),
suffixIcon: suffixTap == null ? null : IconButton(icon: Icon(Icons.mic, color: Color(0xff2E303A)), onPressed: suffixTap), // suffixIcon: suffixTap == null ? null : IconButton(icon: Icon(Icons.mic, color: Color(0xff2E303A)), onPressed: suffixTap),
contentPadding: EdgeInsets.zero, contentPadding: EdgeInsets.zero,
border: InputBorder.none, border: InputBorder.none,
focusedBorder: InputBorder.none, focusedBorder: InputBorder.none,
@ -493,10 +493,10 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
if (res['AppoimentAllHistoryResultList'].length != 0) { if (res['AppoimentAllHistoryResultList'].length != 0) {
res['AppoimentAllHistoryResultList'].forEach((v) { res['AppoimentAllHistoryResultList'].forEach((v) {
appoList.add(AppoitmentAllHistoryResultList.fromJson(v)); appoList.add(new AppoitmentAllHistoryResultList.fromJson(v));
}); });
setState(() { setState(() {
appointHistory = AppoitmentAllHistoryResultList(); appointHistory = null;
isShowListAppointHistory = true; isShowListAppointHistory = true;
}); });
} else {} } else {}
@ -519,25 +519,25 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
return; return;
} }
openSpeechReco() async { // openSpeechReco() async {
new RoboSearch(context: context).showAlertDialog(context); // new RoboSearch(context: context).showAlertDialog(context);
_currentLocaleId = TranslationBase.of(AppGlobal.context).locale.languageCode; // _currentLocaleId = TranslationBase.of(AppGlobal.context).locale.languageCode;
// bool available = await speech.initialize(onStatus: statusListener, onError: errorListener); // bool available = await speech.initialize(onStatus: statusListener, onError: errorListener);
// if (available) { // if (available) {
// speech.listen( // speech.listen(
// onResult: resultListener, // onResult: resultListener,
// listenMode: stt.ListenMode.confirmation, // listenMode: stt.ListenMode.confirmation,
// localeId: _currentLocaleId == 'en' ? 'en-US' : 'ar-SA', // localeId: _currentLocaleId == 'en' ? 'en-US' : 'ar-SA',
// ); // );
// } else { // } else {
// print("The user has denied the use of speech recognition."); // print("The user has denied the use of speech recognition.");
// } // }
} // }
//
// void errorListener(SpeechRecognitionError error) { // void errorListener(SpeechRecognitionError error) {
// event.setValue({"searchText": 'null'}); // event.setValue({"searchText": 'null'});
// SpeechToText.closeAlertDialog(context); // //SpeechToText.closeAlertDialog(context);
// print(error); // print(error);
// } // }
void statusListener(String status) { void statusListener(String status) {
@ -563,9 +563,9 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
} }
} }
Future<void> initSpeechState() async { // Future<void> initSpeechState() async {
// bool hasSpeech = await speech.initialize(onError: errorListener, onStatus: statusListener); // bool hasSpeech = await speech.initialize(onError: errorListener, onStatus: statusListener);
// print(hasSpeech); // print(hasSpeech);
// if (!mounted) return; // if (!mounted) return;
} // }
} }

@ -1,4 +1,3 @@
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/AuthenticatedUserObject.dart'; 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';
@ -277,7 +276,6 @@ class _Login extends State<Login> {
if (value['IsAuthenticated']) { if (value['IsAuthenticated']) {
this.checkActivationCode(); this.checkActivationCode();
} }
}
// } else { // } else {
// ConfirmDialog activationDialog = new ConfirmDialog( // ConfirmDialog activationDialog = new ConfirmDialog(
// context: context, // context: context,

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/AllergiesViewModel.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/AllergiesViewModel.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.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';
@ -22,7 +23,7 @@ class AllergiesPage extends StatelessWidget {
baseViewModel: model, baseViewModel: model,
description: TranslationBase.of(context).infoAllergies, description: TranslationBase.of(context).infoAllergies,
imagesInfo: imagesInfo, imagesInfo: imagesInfo,
body: ListView.builder( body: model.allergies.isNotEmpty ? ListView.builder(
itemCount: model.allergies.length, itemCount: model.allergies.length,
itemBuilder: (context, index) => Container( itemBuilder: (context, index) => Container(
margin: EdgeInsets.all(15), margin: EdgeInsets.all(15),
@ -54,7 +55,7 @@ class AllergiesPage extends StatelessWidget {
], ],
), ),
), ),
), ) : getNoDataWidget(context),
), ),
); );
} }

@ -2,7 +2,6 @@ import 'package:diplomaticquarterapp/core/viewModels/medical/ask_doctor_view_mod
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.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';

@ -83,34 +83,34 @@ class _LaboratoryResultPageState extends State<LaboratoryResultPage> {
], ],
), ),
), ),
// bottomSheet: Container( bottomSheet: Container(
// color: Colors.white, color: Colors.white,
// height: MediaQuery.of(context).size.height * 0.081, height: MediaQuery.of(context).size.height * 0.081,
// width: double.infinity, width: double.infinity,
// padding: EdgeInsets.all(12.0), padding: EdgeInsets.all(12.0),
// child: Column( child: Column(
// children: <Widget>[ children: <Widget>[
// Container( Container(
// width: MediaQuery.of(context).size.width * 0.9, width: MediaQuery.of(context).size.width * 0.9,
// child: DefaultButton( child: DefaultButton(
// TranslationBase.of(context).downloadReport, TranslationBase.of(context).downloadReport,
// () async { () async {
// GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
// await model.sendLabReportEmail(patientLabOrder: widget.patientLabOrders, mes: TranslationBase.of(context).sendSuc, userObj: projectViewModel.user, isVidaPlus: Utils.isVidaPlusProject(projectViewModel, num.parse(widget.patientLabOrders.projectID)), isDownload: true); await model.sendLabReportEmail(patientLabOrder: widget.patientLabOrders, mes: TranslationBase.of(context).sendSuc, userObj: projectViewModel.user, isVidaPlus: Utils.isVidaPlusProject(projectViewModel, num.parse(widget.patientLabOrders.projectID)), isDownload: true);
// GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
// try { try {
// String path = await _createFileFromString(model.labReportPDF, "pdf"); String path = await _createFileFromString(model.labReportPDF, "pdf");
// OpenFilex.open(path); OpenFilex.open(path);
// } catch (ex) { } catch (ex) {
// AppToast.showErrorToast(message: "Cannot open file."); AppToast.showErrorToast(message: "Cannot open file.");
// } }
// }, },
// textColor: Colors.white, textColor: Colors.white,
// ), ),
// ), ),
// ], ],
// ), ),
// ), ),
), ),
); );
} }

@ -10,6 +10,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/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.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/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart';
@ -49,7 +50,7 @@ class _PatientSickLeavePageState extends State<PatientSickLeavePage> {
backgroundColor: Color(0xffF7F7F7), backgroundColor: Color(0xffF7F7F7),
imagesInfo: imagesInfo, imagesInfo: imagesInfo,
baseViewModel: model, baseViewModel: model,
body: ListView.separated( body: model.sickLeaveList.isNotEmpty ? ListView.separated(
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
itemCount: model.sickLeaveList.length, itemCount: model.sickLeaveList.length,
padding: EdgeInsets.all(21), padding: EdgeInsets.all(21),
@ -69,7 +70,7 @@ class _PatientSickLeavePageState extends State<PatientSickLeavePage> {
showConfirmMessage(model, index); showConfirmMessage(model, index);
}, },
), ),
), ) : getNoDataWidget(context),
), ),
); );
} }

@ -18,7 +18,7 @@ import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
class RadiologyDetailsPage extends StatelessWidget { class RadiologyDetailsPage extends StatelessWidget {
final FinalRadiology? finalRadiology; final FinalRadiology? finalRadiology;
bool? isRadiologyVidaPlus; bool? isRadiologyVidaPlus;
RadiologyDetailsPage({Key? key, this.finalRadiology, this.isRadiologyVidaPlus}); RadiologyDetailsPage({Key? key, this.finalRadiology, this.isRadiologyVidaPlus});
@ -32,6 +32,7 @@ class RadiologyDetailsPage extends StatelessWidget {
lineItem: finalRadiology!.invoiceLineItemNo!, lineItem: finalRadiology!.invoiceLineItemNo!,
invoiceNo: Utils.isVidaPlusProject(projectViewModel, finalRadiology!.projectID!) ? finalRadiology!.invoiceNo_VP : finalRadiology!.invoiceNo, invoiceNo: Utils.isVidaPlusProject(projectViewModel, finalRadiology!.projectID!) ? finalRadiology!.invoiceNo_VP : finalRadiology!.invoiceNo,
isVidaPlus: Utils.isVidaPlusProject(projectViewModel, finalRadiology!.projectID!)), isVidaPlus: Utils.isVidaPlusProject(projectViewModel, finalRadiology!.projectID!)),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
appBarTitle: TranslationBase.of(context).report, appBarTitle: TranslationBase.of(context).report,
isShowAppBar: true, isShowAppBar: true,

@ -71,7 +71,7 @@ class RadiologyHomePage extends StatelessWidget {
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
padding: EdgeInsets.only(bottom: 14, top: 14, left: 21, right: 21), padding: EdgeInsets.only(bottom: 14, top: 14, left: 21, right: 21),
itemBuilder: (context, _index) { itemBuilder: (context, _index) {
FinalRadiology radiology = model.finalRadiologyList[index].finalRadiologyList![_index]; FinalRadiology radiology = model.finalRadiologyList[index].finalRadiologyList[_index];
bool _isSortByClinic = model.filterType == FilterType.Clinic; bool _isSortByClinic = model.filterType == FilterType.Clinic;
return DoctorCard( return DoctorCard(
onTap: () => Navigator.push( onTap: () => Navigator.push(

@ -12,7 +12,6 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class PaymentService extends StatelessWidget { class PaymentService extends StatelessWidget {
ToDoCountProviderModel? model; ToDoCountProviderModel? model;
@ -96,12 +95,12 @@ class PaymentService extends StatelessWidget {
left: 8, left: 8,
top: 4, top: 4,
child: badge_import.Badge( child: badge_import.Badge(
// toAnimate: false, toAnimate: false,
// elevation: 0, elevation: 0,
position: badge_import.BadgePosition.topEnd(), position: badge_import.BadgePosition.topEnd(),
// shape: badge_import.BadgeShape.circle, shape: badge_import.BadgeShape.circle,
// badgeColor: secondaryColor.withOpacity(1.0), badgeColor: secondaryColor.withOpacity(1.0),
// borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
badgeContent: Container( badgeContent: Container(
padding: EdgeInsets.all(2.0), padding: EdgeInsets.all(2.0),
child: Text(model!.count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)), child: Text(model!.count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)),
@ -112,12 +111,12 @@ class PaymentService extends StatelessWidget {
right: 8, right: 8,
top: 4, top: 4,
child: badge_import.Badge( child: badge_import.Badge(
// toAnimate: false, toAnimate: false,
// elevation: 0, elevation: 0,
position: badge_import.BadgePosition.topEnd(), position: badge_import.BadgePosition.topEnd(),
// shape: badge_import.BadgeShape.circle, shape: badge_import.BadgeShape.circle,
// badgeColor: secondaryColor.withOpacity(1.0), badgeColor: secondaryColor.withOpacity(1.0),
// borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
badgeContent: Container( badgeContent: Container(
padding: EdgeInsets.all(2.0), padding: EdgeInsets.all(2.0),
child: Text(model!.count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)), child: Text(model!.count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)),

@ -1841,4 +1841,6 @@ class DoctorsListService extends BaseService {
return Future.value(localRes); return Future.value(localRes);
} }
} }

@ -57,6 +57,7 @@ class _SplashScreenState extends State<SplashScreen> {
ProjectViewModel projectProvider = Provider.of<ProjectViewModel>(context, listen: false); ProjectViewModel projectProvider = Provider.of<ProjectViewModel>(context, listen: false);
projectProvider.setPrivilegeModelList(privilege: _privilegeService.privilegeModelList); projectProvider.setPrivilegeModelList(privilege: _privilegeService.privilegeModelList);
projectProvider.setVidaPlusProjectList(_privilegeService.vidaPlusProjectListModel); projectProvider.setVidaPlusProjectList(_privilegeService.vidaPlusProjectListModel);
projectProvider.setHMCProjectList(_privilegeService.hMCProjectListModel);
AppSharedPreferences().clear(); // Clearing Shared Preferences On App Launch AppSharedPreferences().clear(); // Clearing Shared Preferences On App Launch
AppSharedPreferences().setString(APP_LANGUAGE, projectProvider.isArabic ? "ar" : "en"); AppSharedPreferences().setString(APP_LANGUAGE, projectProvider.isArabic ? "ar" : "en");
var themeNotifier = Provider.of<ThemeNotifier>(context, listen: false); var themeNotifier = Provider.of<ThemeNotifier>(context, listen: false);

@ -329,7 +329,7 @@ class Utils {
.radiologySubtitle, .radiologySubtitle,
isEnable: projectViewModel.havePrivilege(7), isEnable: projectViewModel.havePrivilege(7),
), ),
)); );
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(12) ? Navigator.push(context, FadePage(page: HomePrescriptionsPage())) : null, onTap: () => projectViewModel.havePrivilege(12) ? Navigator.push(context, FadePage(page: HomePrescriptionsPage())) : null,
@ -913,7 +913,7 @@ class Utils {
); );
} }
static Widget tableColumnValue(String text, {bool isLast = false, bool isCapitable = true, ProjectViewModel? mProjectViewModel}) { static Widget tableColumnValue(String text, {bool isLast = false, bool isCapitable = true, ProjectViewModel mProjectViewModel}) {
ProjectViewModel projectViewModel = mProjectViewModel ?? Provider.of(AppGlobal.context); ProjectViewModel projectViewModel = mProjectViewModel ?? Provider.of(AppGlobal.context);
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -921,16 +921,10 @@ class Utils {
children: [ children: [
SizedBox(height: 12), SizedBox(height: 12),
Text( Text(
isCapitable && !projectViewModel.isArabic ? text isCapitable && !projectViewModel.isArabic ? text.toLowerCase().capitalizeFirstofEach : text,
.toLowerCase()
.capitalizeFirstofEach : text,
maxLines: 2, maxLines: 2,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: TextStyle(fontSize: 12, style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10),
fontWeight: FontWeight.w600,
color: Color(0xff575757),
letterSpacing: -0.4,
height: 16 / 10),
), ),
SizedBox(height: 12), SizedBox(height: 12),
if (!isLast) if (!isLast)
@ -945,10 +939,7 @@ class Utils {
static Future<bool> isGoogleServicesAvailable() async { static Future<bool> isGoogleServicesAvailable() async {
GooglePlayServicesAvailability availability = await GoogleApiAvailability.instance.checkGooglePlayServicesAvailability(); GooglePlayServicesAvailability availability = await GoogleApiAvailability.instance.checkGooglePlayServicesAvailability();
String status = availability String status = availability.toString().split('.').last;
.toString()
.split('.')
.last;
if (status == "success") { if (status == "success") {
return true; return true;
} }
@ -963,17 +954,10 @@ class Utils {
children: [ children: [
SizedBox(height: 14), SizedBox(height: 14),
AutoSizeText( AutoSizeText(
isCapitable ? text isCapitable ? text.toLowerCase().capitalizeFirstofEach : text,
.toLowerCase()
.capitalizeFirstofEach : text,
maxLines: 1, maxLines: 1,
minFontSize: 6, minFontSize: 6,
style: TextStyle(decoration: TextDecoration.underline, style: TextStyle(decoration: TextDecoration.underline, fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xffD02127), letterSpacing: -0.48, height: 18 / 12),
fontSize: 12,
fontWeight: FontWeight.w600,
color: Color(0xffD02127),
letterSpacing: -0.48,
height: 18 / 12),
), ),
SizedBox(height: 10), SizedBox(height: 10),
if (!isLast) if (!isLast)
@ -990,22 +974,13 @@ class Utils {
return crypto.md5.convert(utf8.encode(input)).toString(); return crypto.md5.convert(utf8.encode(input)).toString();
} }
static bool isVidaPlusProject(ProjectViewModel projectViewModel, int projectID) { static String generateSignature() {
bool isVidaPlus = false;
projectViewModel.vidaPlusProjectList.forEach((element) {
if (element.projectID == projectID) {
isVidaPlus = true;
}
});
return isVidaPlus;
} }
// static String generateSignature() {
//
// }
} }
Widget applyShadow({Color color = Colors.grey, double shadowOpacity = 0.5, double spreadRadius = 2, double blurRadius = 7, Offset offset = const Offset(2, 2), required Widget child}) { Widget applyShadow({Color color = Colors.grey, double shadowOpacity = 0.5, double spreadRadius = 2, double blurRadius = 7, Offset offset = const Offset(2, 2), @required Widget child}) {
return Container( return Container(
decoration: BoxDecoration( decoration: BoxDecoration(
boxShadow: [ boxShadow: [
@ -1034,7 +1009,7 @@ extension IndexedIterable<E> on Iterable<E> {
} }
} }
openAppStore({String? androidPackageName, String? iOSAppID, bool isHuawei = false}) async { openAppStore({String androidPackageName, String iOSAppID, bool isHuawei = false}) async {
if (Platform.isAndroid) { if (Platform.isAndroid) {
assert(!(androidPackageName == null), "Should have valid value in androidPackageName parameter"); assert(!(androidPackageName == null), "Should have valid value in androidPackageName parameter");
if (isHuawei) { if (isHuawei) {
@ -1048,7 +1023,7 @@ openAppStore({String? androidPackageName, String? iOSAppID, bool isHuawei = fals
} }
} }
String labelFrom({required String className}) { String labelFrom({@required String className}) {
RegExp exp = RegExp(r'(?<=[a-z])[A-Z]'); RegExp exp = RegExp(r'(?<=[a-z])[A-Z]');
String result = className.replaceAllMapped(exp, (m) { String result = className.replaceAllMapped(exp, (m) {

@ -1,13 +1,16 @@
import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart'; import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/labs_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/labs_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/charts/show_chart.dart'; import 'package:diplomaticquarterapp/widgets/charts/show_chart.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.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'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'LineChartCurved.dart'; import 'LineChartCurved.dart';
import 'lab_result_chart_and_detials.dart'; import 'lab_result_chart_and_detials.dart';
@ -18,10 +21,15 @@ class FlowChartPage extends StatelessWidget {
FlowChartPage({this.patientLabOrder, this.filterName}); FlowChartPage({this.patientLabOrder, this.filterName});
ProjectViewModel projectViewModel;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return BaseView<LabsViewModel>( return BaseView<LabsViewModel>(
onModelReady: (model) => model.getPatientLabOrdersResults(patientLabOrder: patientLabOrder!, procedure: filterName!), onModelReady: (model) => model.getPatientLabOrdersResults(patientLabOrder: patientLabOrder!, procedure: filterName!),
onModelReady: (model) =>
model.getPatientLabOrdersResults(patientLabOrder: patientLabOrder, procedure: filterName, isVidaPlus: Utils.isVidaPlusProject(projectViewModel, num.parse(patientLabOrder.projectID))),
builder: (context, model, w) => AppScaffold( builder: (context, model, w) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: filterName!, appBarTitle: filterName!,
@ -72,7 +80,7 @@ class FlowChartPage extends StatelessWidget {
) )
: Center( : Center(
child: Container( child: Container(
padding: EdgeInsets.only(top: MediaQuery.of(context).size.height * 0.32), padding: EdgeInsets.only(top: MediaQuery.of(context).size.height * 0.32),
child: Center( child: Center(
child: getNoDataWidget(context), child: getNoDataWidget(context),
), ),

@ -151,6 +151,7 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
], ],
), ),
child: Column( child: Column(
mainAxisSize: MainAxisSize.min,
children: [ children: [
Row( Row(
children: <Widget>[ children: <Widget>[
@ -170,6 +171,7 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
if (_isShowMore) if (_isShowMore)
Container( Container(
width: double.infinity, width: double.infinity,
// height: 450.0,
child: Html( child: Html(
data: widget.details ?? TranslationBase.of(context).noDataAvailable, data: widget.details ?? TranslationBase.of(context).noDataAvailable,
), ),

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/extensions/string_extensions.dart'; import 'package:diplomaticquarterapp/extensions/string_extensions.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/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart'; import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -32,6 +33,7 @@ class DoctorCard extends StatelessWidget {
final String vaccineName; final String vaccineName;
final bool isSickLeave; final bool isSickLeave;
final int sickLeaveStatus; final int sickLeaveStatus;
final int projectID;
DoctorCard( DoctorCard(
{this.name, {this.name,
@ -51,9 +53,10 @@ class DoctorCard extends StatelessWidget {
this.vaccineName = "", this.vaccineName = "",
this.isParentAppointment = false, this.isParentAppointment = false,
this.isSickLeave = false, this.isSickLeave = false,
this.sickLeaveStatus = 0}); this.sickLeaveStatus = 0,
this.projectID = 0});
ProjectViewModel? projectViewModel; late ProjectViewModel projectViewModel;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -87,11 +90,14 @@ class DoctorCard extends StatelessWidget {
decoration: isShowInOutPatient! decoration: isShowInOutPatient!
? BoxDecoration( ? BoxDecoration(
//Colors.red[900] Color(0xff404545) //Colors.red[900] Color(0xff404545)
color: isLiveCareAppointment!
? Color(0xff2E303A) color: Utils.isHMCProject(projectViewModel, projectID)
: !isInOutPatient! ? Color(0xff3FACC8)
? Color(0xffD02127) : isLiveCareAppointment
: Color(0xffa9a089), ? Color(0xff2E303A)
: !isInOutPatient
? Color(0xffD02127)
: Color(0xffa9a089),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: projectViewModel!.isArabic ? Radius.circular(0) : Radius.circular(10), topLeft: projectViewModel!.isArabic ? Radius.circular(0) : Radius.circular(10),
bottomLeft: projectViewModel!.isArabic ? Radius.circular(0) : Radius.circular(10), bottomLeft: projectViewModel!.isArabic ? Radius.circular(0) : Radius.circular(10),

Loading…
Cancel
Save