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
dev_v3.13.6_voipcall
devamirsaleemahmad 12 months ago
commit 4231c85055

@ -32,6 +32,7 @@ target 'Runner' do
use_modular_headers!
pod 'OpenTok', '~> 2.22.0'
pod 'VTO2Lib'
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
@ -53,9 +54,34 @@ post_install do |installer|
]
build_configuration.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64 i386'
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'
build_configuration.build_settings['DEVELOPMENT_TEAM'] = '3A359E86ZF'
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

@ -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_ORDER_HISTORY = '/api/orders/items';
var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara';
// var BASE_URL = 'http://10.50.100.198:2018/';
var BASE_URL = 'https://uat.hmgwebservices.com/';
// var BASE_URL = 'http://10.50.100.198:2018/';
var BASE_URL = 'https://uat.hmgwebservices.com/';
// var BASE_URL = 'https://hmgwebservices.com/';
// var BASE_URL = 'https://orash.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 GENERAL_ID = 'Cs2020@2016\$2958';
var IP_ADDRESS = '10.20.10.20';
var VERSION_ID = 10.9;
var VERSION_ID = 10.8;
var SETUP_ID = '91877';
var LANGUAGE = 2;
// 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': 'تمرير الكود من خلال اجهزة تسجيل الحضور المتوفرة في الفرع.'},
'sitWaitingQR': {'en': 'Sit in the waiting rooms until called by the nurse.', '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 لتسجيل الوصول'},
"sendEmail": {"en": "Send Email", "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,
onSuccess: (response, statusCode) async {
sickLeaveList.clear();
response['List_SickLeave'].forEach((sickLeave) {
sickLeaveList.add(SickLeave.fromJson(sickLeave));
});
if(response['List_SickLeave'] != null && response['List_SickLeave'].length != 0) {
response['List_SickLeave'].forEach((sickLeave) {
sickLeaveList.add(SickLeave.fromJson(sickLeave));
});
}
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;

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

@ -75,6 +75,7 @@ class LabsViewModel extends BaseViewModel {
List<LabResultList> labResultLists =[];
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);
await _labsService.getLaboratoryResult(invoiceNo: invoiceNo,
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);
await _labsService.getPatientLabOrdersResults(patientLabOrder: patientLabOrder, procedure: procedure);
await _labsService.getPatientLabOrdersResults(patientLabOrder: patientLabOrder, procedure: procedure, isVidaPlus: isVidaPlus);
if (_labsService.hasError) {
error = _labsService.error!;
setState(ViewState.Error);
@ -135,14 +136,14 @@ class LabsViewModel extends BaseViewModel {
_labsService.labOrdersResultsList.forEach((element) {
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) {}
});
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);
if (_labsService.hasError) {
error = _labsService.error!;

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

@ -1,6 +1,5 @@
import 'dart:io';
import "package:collection/collection.dart";
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/viewModels/ancillary_orders_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/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class AnicllaryOrdersDetails extends StatefulWidget {
final dynamic appoNo;
@ -134,9 +132,13 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
SizedBox(height: 12),
DefaultButton(
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,
color: CustomColors.green,
@ -207,7 +209,7 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
),
mWidth(3),
Text(
projectViewModel.user!.firstName! + " " + projectViewModel.user!.lastName!,
projectViewModel.user.firstName + " " + projectViewModel.user.lastName,
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 12,
@ -499,7 +501,7 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
openPayment(selectedPaymentMethod, projectViewModel.user!, double.parse(getTotalValue()), AppoitmentAllHistoryResultList(), model, selectedInstallmentPlan);
},
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) {
// 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,
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)
// 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)
.then((res) {
addAdvancedNumberRequest(
@ -677,6 +686,8 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
});
});
GifLoaderDialogUtils.showMyDialog(localContext);
DoctorsListService service = new DoctorsListService();
service.autoGenerateAncillaryOrdersInvoice(widget.orderNo, widget.projectID, widget.appoNo, selectedProcListAPI, localContext).then((res) {
GifLoaderDialogUtils.hideDialog(localContext);
@ -714,7 +725,7 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
addToSelectedProcedures(AnciallryOrdersViewModel model) {
if (model.ancillaryListsDetails.isNotEmpty) {
selectedProcList.clear();
model.ancillaryListsDetails[0].ancillaryOrderProcDetailsList!.forEach((element) {
model.ancillaryListsDetails[0].ancillaryOrderProcDetailsList.forEach((element) {
if (!isProcedureDisabled(element)) {
selectedProcList.add(element);
}

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

@ -1,5 +1,6 @@
import 'dart:typed_data';
import 'package:barcode_scan2/barcode_scan2.dart';
import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.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/gif_loader_dialog_utils.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/data_display/medical/medical_profile_item.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.dart';
import 'package:diplomaticquarterapp/widgets/nfc/nfc_reader_sheet.dart';
@ -55,7 +58,7 @@ class _QRCodeState extends State<QRCode> {
});
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
startNFCScan();
// startNFCScan();
});
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
Widget build(BuildContext context) {
_context = context;
List<Widget> checkInOptionsList = getCheckInOptionsList(context);
return AppScaffold(
appBarTitle: TranslationBase.of(context).onlineCheckIn,
isShowAppBar: true,
@ -149,42 +161,95 @@ class _QRCodeState extends State<QRCode> {
),
],
),
],
),
),
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,
)),
),
mHeight(21),
Padding(
padding: EdgeInsets.only(left: 21, right: 21),
child: GridView.builder(
shrinkWrap: true,
primary: false,
physics: NeverScrollableScrollPhysics(),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12),
padding: EdgeInsets.zero,
itemCount: checkInOptionsList.length,
itemBuilder: (BuildContext context, int index) {
return checkInOptionsList[index];
},
),
),
],
),
),
// 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 {
DoctorsListService service = new DoctorsListService();

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

@ -371,6 +371,7 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
}),
isInOutPatient: _appointmentResult.isInOutPatient,
name: _appointmentResult.doctorTitle! + " " + _appointmentResult.doctorNameObj!,
projectID: _appointmentResult.projectID,
// billNo: _appointmentResult.invoiceNo,
profileUrl: _appointmentResult.doctorImageURL,
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/gif_loader_dialog_utils.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/in_app_browser/InAppBrowser.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -74,6 +75,11 @@ class _AppointmentActionsState extends State<AppointmentActions> {
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) && 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(
onTap: shouldEnable
? null
@ -111,7 +117,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
GAnalytics.APPOINTMENT_DETAIL_FLOW_TYPE = 'my appointment';
showReminderDialog(
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!),
//DateUtil.convertStringToDate(widget.appo.appointmentDate),
widget.appo.doctorNameObj!,
@ -152,12 +158,12 @@ class _AppointmentActionsState extends State<AppointmentActions> {
locator<GAnalytics>().appointment.appointment_detail_action(appointment: widget.appo, action: 'survey');
break;
case "Insurance":
navigateToInsuranceApprovals(widget.appo.appointmentNo!);
navigateToInsuranceApprovals(widget.appo.appointmentNo);
locator<GAnalytics>().appointment.appointment_detail_action(appointment: widget.appo, action: 'insurance');
break;
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');
break;
@ -583,12 +589,26 @@ class _AppointmentActionsState extends State<AppointmentActions> {
navigateToToDoPage(BuildContext context, ToDoCountProviderModel model) {
if (widget.projectViewModel!.isLogin) {
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 {
AppToast.showErrorToast(message: TranslationBase.of(context).upcomingEmpty);
}
} 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;
Function()? onBackClick;
bool isFromMyAppointments;
AppoitmentAllHistoryResultList appointment;
ToDo({required this.isShowAppBar, this.onBackClick});
ToDo({@required this.isShowAppBar, this.onBackClick, this.isFromMyAppointments = false, this.appointment});
@override
_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();
if (doctorByHospital.length != 0) {
_patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element);
_patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList.add(element);
} else {
_patientDoctorAppointmentListHospital
.add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element));
@ -854,6 +856,9 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
});
}
dataLoaded = true;
if(widget.isFromMyAppointments) {
getPatientShare(context, widget.appointment);
}
});
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);

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

@ -1,4 +1,3 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart';
@ -277,7 +276,6 @@ class _Login extends State<Login> {
if (value['IsAuthenticated']) {
this.checkActivationCode();
}
}
// } else {
// ConfirmDialog activationDialog = new ConfirmDialog(
// context: context,

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/AllergiesViewModel.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.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/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
@ -22,7 +23,7 @@ class AllergiesPage extends StatelessWidget {
baseViewModel: model,
description: TranslationBase.of(context).infoAllergies,
imagesInfo: imagesInfo,
body: ListView.builder(
body: model.allergies.isNotEmpty ? ListView.builder(
itemCount: model.allergies.length,
itemBuilder: (context, index) => Container(
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/pages/base/base_view.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/others/app_expandable_notifier.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';

@ -83,34 +83,34 @@ class _LaboratoryResultPageState extends State<LaboratoryResultPage> {
],
),
),
// bottomSheet: Container(
// color: Colors.white,
// height: MediaQuery.of(context).size.height * 0.081,
// width: double.infinity,
// padding: EdgeInsets.all(12.0),
// child: Column(
// children: <Widget>[
// Container(
// width: MediaQuery.of(context).size.width * 0.9,
// child: DefaultButton(
// TranslationBase.of(context).downloadReport,
// () async {
// 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);
// GifLoaderDialogUtils.hideDialog(context);
// try {
// String path = await _createFileFromString(model.labReportPDF, "pdf");
// OpenFilex.open(path);
// } catch (ex) {
// AppToast.showErrorToast(message: "Cannot open file.");
// }
// },
// textColor: Colors.white,
// ),
// ),
// ],
// ),
// ),
bottomSheet: Container(
color: Colors.white,
height: MediaQuery.of(context).size.height * 0.081,
width: double.infinity,
padding: EdgeInsets.all(12.0),
child: Column(
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width * 0.9,
child: DefaultButton(
TranslationBase.of(context).downloadReport,
() async {
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);
GifLoaderDialogUtils.hideDialog(context);
try {
String path = await _createFileFromString(model.labReportPDF, "pdf");
OpenFilex.open(path);
} catch (ex) {
AppToast.showErrorToast(message: "Cannot open file.");
}
},
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/translations_delegate_base.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/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart';
@ -49,7 +50,7 @@ class _PatientSickLeavePageState extends State<PatientSickLeavePage> {
backgroundColor: Color(0xffF7F7F7),
imagesInfo: imagesInfo,
baseViewModel: model,
body: ListView.separated(
body: model.sickLeaveList.isNotEmpty ? ListView.separated(
physics: BouncingScrollPhysics(),
itemCount: model.sickLeaveList.length,
padding: EdgeInsets.all(21),
@ -69,7 +70,7 @@ class _PatientSickLeavePageState extends State<PatientSickLeavePage> {
showConfirmMessage(model, index);
},
),
),
) : getNoDataWidget(context),
),
);
}

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

@ -71,7 +71,7 @@ class RadiologyHomePage extends StatelessWidget {
physics: NeverScrollableScrollPhysics(),
padding: EdgeInsets.only(bottom: 14, top: 14, left: 21, right: 21),
itemBuilder: (context, _index) {
FinalRadiology radiology = model.finalRadiologyList[index].finalRadiologyList![_index];
FinalRadiology radiology = model.finalRadiologyList[index].finalRadiologyList[_index];
bool _isSortByClinic = model.filterType == FilterType.Clinic;
return DoctorCard(
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:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class PaymentService extends StatelessWidget {
ToDoCountProviderModel? model;
@ -96,12 +95,12 @@ class PaymentService extends StatelessWidget {
left: 8,
top: 4,
child: badge_import.Badge(
// toAnimate: false,
// elevation: 0,
toAnimate: false,
elevation: 0,
position: badge_import.BadgePosition.topEnd(),
// shape: badge_import.BadgeShape.circle,
// badgeColor: secondaryColor.withOpacity(1.0),
// borderRadius: BorderRadius.circular(8),
shape: badge_import.BadgeShape.circle,
badgeColor: secondaryColor.withOpacity(1.0),
borderRadius: BorderRadius.circular(8),
badgeContent: Container(
padding: EdgeInsets.all(2.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,
top: 4,
child: badge_import.Badge(
// toAnimate: false,
// elevation: 0,
toAnimate: false,
elevation: 0,
position: badge_import.BadgePosition.topEnd(),
// shape: badge_import.BadgeShape.circle,
// badgeColor: secondaryColor.withOpacity(1.0),
// borderRadius: BorderRadius.circular(8),
shape: badge_import.BadgeShape.circle,
badgeColor: secondaryColor.withOpacity(1.0),
borderRadius: BorderRadius.circular(8),
badgeContent: Container(
padding: EdgeInsets.all(2.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);
}
}

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

@ -329,7 +329,7 @@ class Utils {
.radiologySubtitle,
isEnable: projectViewModel.havePrivilege(7),
),
));
);
medical.add(InkWell(
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);
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
@ -921,16 +921,10 @@ class Utils {
children: [
SizedBox(height: 12),
Text(
isCapitable && !projectViewModel.isArabic ? text
.toLowerCase()
.capitalizeFirstofEach : text,
isCapitable && !projectViewModel.isArabic ? text.toLowerCase().capitalizeFirstofEach : text,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(fontSize: 12,
fontWeight: FontWeight.w600,
color: Color(0xff575757),
letterSpacing: -0.4,
height: 16 / 10),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10),
),
SizedBox(height: 12),
if (!isLast)
@ -945,10 +939,7 @@ class Utils {
static Future<bool> isGoogleServicesAvailable() async {
GooglePlayServicesAvailability availability = await GoogleApiAvailability.instance.checkGooglePlayServicesAvailability();
String status = availability
.toString()
.split('.')
.last;
String status = availability.toString().split('.').last;
if (status == "success") {
return true;
}
@ -963,17 +954,10 @@ class Utils {
children: [
SizedBox(height: 14),
AutoSizeText(
isCapitable ? text
.toLowerCase()
.capitalizeFirstofEach : text,
isCapitable ? text.toLowerCase().capitalizeFirstofEach : text,
maxLines: 1,
minFontSize: 6,
style: TextStyle(decoration: TextDecoration.underline,
fontSize: 12,
fontWeight: FontWeight.w600,
color: Color(0xffD02127),
letterSpacing: -0.48,
height: 18 / 12),
style: TextStyle(decoration: TextDecoration.underline, fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xffD02127), letterSpacing: -0.48, height: 18 / 12),
),
SizedBox(height: 10),
if (!isLast)
@ -990,22 +974,13 @@ class Utils {
return crypto.md5.convert(utf8.encode(input)).toString();
}
static bool isVidaPlusProject(ProjectViewModel projectViewModel, int projectID) {
bool isVidaPlus = false;
projectViewModel.vidaPlusProjectList.forEach((element) {
if (element.projectID == projectID) {
isVidaPlus = true;
}
});
return isVidaPlus;
static String generateSignature() {
}
// 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(
decoration: BoxDecoration(
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) {
assert(!(androidPackageName == null), "Should have valid value in androidPackageName parameter");
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]');
String result = className.replaceAllMapped(exp, (m) {

@ -1,13 +1,16 @@
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/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/charts/show_chart.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'LineChartCurved.dart';
import 'lab_result_chart_and_detials.dart';
@ -18,10 +21,15 @@ class FlowChartPage extends StatelessWidget {
FlowChartPage({this.patientLabOrder, this.filterName});
ProjectViewModel projectViewModel;
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return BaseView<LabsViewModel>(
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(
isShowAppBar: true,
appBarTitle: filterName!,
@ -72,7 +80,7 @@ class FlowChartPage extends StatelessWidget {
)
: Center(
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: getNoDataWidget(context),
),

@ -151,6 +151,7 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
],
),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Row(
children: <Widget>[
@ -170,6 +171,7 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
if (_isShowMore)
Container(
width: double.infinity,
// height: 450.0,
child: Html(
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/uitl/date_uitl.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:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -32,6 +33,7 @@ class DoctorCard extends StatelessWidget {
final String vaccineName;
final bool isSickLeave;
final int sickLeaveStatus;
final int projectID;
DoctorCard(
{this.name,
@ -51,9 +53,10 @@ class DoctorCard extends StatelessWidget {
this.vaccineName = "",
this.isParentAppointment = false,
this.isSickLeave = false,
this.sickLeaveStatus = 0});
this.sickLeaveStatus = 0,
this.projectID = 0});
ProjectViewModel? projectViewModel;
late ProjectViewModel projectViewModel;
@override
Widget build(BuildContext context) {
@ -87,11 +90,14 @@ class DoctorCard extends StatelessWidget {
decoration: isShowInOutPatient!
? BoxDecoration(
//Colors.red[900] Color(0xff404545)
color: isLiveCareAppointment!
? Color(0xff2E303A)
: !isInOutPatient!
? Color(0xffD02127)
: Color(0xffa9a089),
color: Utils.isHMCProject(projectViewModel, projectID)
? Color(0xff3FACC8)
: isLiveCareAppointment
? Color(0xff2E303A)
: !isInOutPatient
? Color(0xffD02127)
: Color(0xffa9a089),
borderRadius: BorderRadius.only(
topLeft: projectViewModel!.isArabic ? Radius.circular(0) : Radius.circular(10),
bottomLeft: projectViewModel!.isArabic ? Radius.circular(0) : Radius.circular(10),

Loading…
Cancel
Save