diff --git a/android/app/build.gradle b/android/app/build.gradle index e87052e9..2b7f59f8 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -59,7 +59,7 @@ android { buildTypes { release { // TODO: Add your own signing config for the release build. - signingConfig signingConfigs.debug + signingConfig signingConfigs.release } debug { diff --git a/android/build.gradle b/android/build.gradle index 98c26f7a..6d2ee078 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -27,6 +27,19 @@ rootProject.buildDir = '../build' subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" } + +subprojects { + afterEvaluate { project -> + if (project.plugins.hasPlugin("com.android.application") || + project.plugins.hasPlugin("com.android.library")) { + project.android { + compileSdkVersion 34 + buildToolsVersion "34.0.0" + } + } + } +} +// to here subprojects { project.evaluationDependsOn(':app') } diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift index 8ebd4235..34cf8386 100644 --- a/ios/Runner/AppDelegate.swift +++ b/ios/Runner/AppDelegate.swift @@ -4,7 +4,7 @@ import OpenTok // Created by Mohammad Aljammal & Elham Rababah on 24/06/20. // Copyright © 2020 Cloud. All rights reserved. -@UIApplicationMain +@main @objc class AppDelegate: FlutterAppDelegate ,ICallProtocol { var result: FlutterResult? diff --git a/lib/config/config.dart b/lib/config/config.dart index 9effc423..6f1b3387 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -7,9 +7,9 @@ const ONLY_DATE = "[0-9/]"; const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/'; const DOCTOR_ROTATION = 'https://doctorrota.hmg.com/'; // const BASE_URL_LIVE_CARE = 'https://livecareuat.hmg.com/'; -// const BASE_URL = 'https://hmgwebservices.com/'; +const BASE_URL = 'https://hmgwebservices.com/'; -const BASE_URL = 'https://uat.hmgwebservices.com/'; +// const BASE_URL = 'https://uat.hmgwebservices.com/'; // const BASE_URL = 'https://webservices.hmg.com/'; @@ -399,7 +399,7 @@ const TRANSACTION_NO = 0; const LANGUAGE_ID = 2; const STAMP = '2020-04-27T12:17:17.721Z'; const IP_ADDRESS = '9.9.9.9'; -const VERSION_ID = 9.3; +const VERSION_ID = 9.4; const CHANNEL = 9; const SESSION_ID = 'BlUSkYymTt'; const IS_LOGIN_FOR_DOCTOR_APP = true; diff --git a/lib/core/viewModel/project_view_model.dart b/lib/core/viewModel/project_view_model.dart index 123482d7..608dca2e 100644 --- a/lib/core/viewModel/project_view_model.dart +++ b/lib/core/viewModel/project_view_model.dart @@ -37,8 +37,12 @@ class ProjectViewModel with ChangeNotifier { List _vidaPlusProjectListModel = []; + List _vidaPlusInPatientsProjectListModel = []; + List get vidaPlusProjectList => _vidaPlusProjectListModel; + List get vidaPlusInPatientsProjectListModel => _vidaPlusInPatientsProjectListModel; + ProjectViewModel() { loadSharedPrefLanguage(); @@ -63,6 +67,11 @@ class ProjectViewModel with ChangeNotifier { notifyListeners(); } + setVidaPlusInPatientProjectList(List vidaPlusInPatientProjectListModelInput) { + _vidaPlusInPatientsProjectListModel = vidaPlusInPatientProjectListModelInput; + notifyListeners(); + } + void loadSharedPrefLanguage() async { currentLanguage = await sharedPref.getString(APP_Language); _appLocale = Locale(currentLanguage ?? 'en'); @@ -117,6 +126,15 @@ class ProjectViewModel with ChangeNotifier { }); setVidaPlusProjectList(_vidaPlusProjectListModel); } + + _vidaPlusInPatientsProjectListModel.clear(); + if (response['ProjectListHMCForDoctorAppInPatient'].length != 0) { + response['ProjectListHMCForDoctorAppInPatient'].forEach((item) { + _vidaPlusInPatientsProjectListModel.add(VidaPlusProjectListModel.fromJson(item)); + }); + setVidaPlusInPatientProjectList(_vidaPlusInPatientsProjectListModel); + } + localRes = response; }, onFailure: (String error, int statusCode) { throw error; diff --git a/lib/screens/home/home_screen.dart b/lib/screens/home/home_screen.dart index 491efdd1..e3709e3f 100644 --- a/lib/screens/home/home_screen.dart +++ b/lib/screens/home/home_screen.dart @@ -289,7 +289,7 @@ class _HomeScreenState extends State { List homePatientsCardsWidget(DashboardViewModel model, projectsProvider) { colorIndex = 0; - List backgroundColors =[]; + List backgroundColors = []; backgroundColors.add(LinearGradient(begin: Alignment(-1.0, -2.0), end: Alignment(1.0, 2.0), colors: [ AppGlobal.appRedColor, Color(0xFFAD3B3B), @@ -301,9 +301,9 @@ class _HomeScreenState extends State { backgroundColors.add(LinearGradient(begin: Alignment.center, end: Alignment.center, colors: [Color(0xFF71787E), AppGlobal.appTextColor])); List backgroundIconColors = []; backgroundIconColors.add(Colors.white12); - backgroundIconColors.add( Colors.white38); + backgroundIconColors.add(Colors.white38); backgroundIconColors.add(Colors.white10); - List textColors =[]; + List textColors = []; textColors.add(Colors.white); textColors.add(Color(0xFF353E47)); textColors.add(Colors.white); @@ -364,24 +364,28 @@ class _HomeScreenState extends State { )); changeColorIndex(); - patientCards.add(HomePatientCard( - gradient: backgroundColors[colorIndex], - backgroundIconColor: backgroundIconColors[colorIndex], - cardIcon: DoctorApp.inpatient, - textColor: textColors[colorIndex], - text: TranslationBase.of(context).myInPatient, - onTap: () { - Navigator.push( - context, - FadePage( - page: InPatientScreen( - specialClinic: model.getSpecialClinic(clinicId ?? projectsProvider.doctorClinicsList[0].clinicID), + if (!Utils.isVidaPlusInPatientProject(projectsProvider, model.doctorProfile!.projectID!)) { + patientCards.add(HomePatientCard( + gradient: backgroundColors[colorIndex], + backgroundIconColor: backgroundIconColors[colorIndex], + cardIcon: DoctorApp.inpatient, + textColor: textColors[colorIndex], + text: TranslationBase + .of(context) + .myInPatient, + onTap: () { + Navigator.push( + context, + FadePage( + page: InPatientScreen( + specialClinic: model.getSpecialClinic(clinicId ?? projectsProvider.doctorClinicsList[0].clinicID), + ), ), - ), - ); - }, - )); - changeColorIndex(); + ); + }, + )); + changeColorIndex(); + } //TODO Keep commented // patientCards.add(HomePatientCard( // gradient: backgroundColors[colorIndex], diff --git a/lib/screens/procedures/procedure_screen.dart b/lib/screens/procedures/procedure_screen.dart index 447de6f9..2cf35779 100644 --- a/lib/screens/procedures/procedure_screen.dart +++ b/lib/screens/procedures/procedure_screen.dart @@ -39,16 +39,10 @@ class ProcedureScreen extends StatelessWidget { bool isInpatient = routeArgs['isInpatient']; return BaseView( onModelReady: (model) { - model.getProcedure( - mrn: patient.patientId, - patientType: patientType, - appointmentNo: patient.appointmentNo); + model.getProcedure(mrn: patient.patientId, patientType: patientType, appointmentNo: patient.appointmentNo); model.isPrincipalCovered(patient: patient); - }, - - builder: (BuildContext context, ProcedureViewModel model, Widget? child) => - AppScaffold( + builder: (BuildContext context, ProcedureViewModel model, Widget? child) => AppScaffold( isShowAppBar: true, backgroundColor: Colors.grey[100]!, baseViewModel: model, @@ -64,23 +58,16 @@ class ProcedureScreen extends StatelessWidget { SizedBox( height: 12, ), - if ((model.procedureList.length == 0 && - patient.patientStatusType != 43) || - patient.patientStatusType != null && - patient.patientStatusType == 43) + if ((model.procedureList.length == 0 && patient.patientStatusType != 43) || patient.patientStatusType != null && patient.patientStatusType == 43) ServiceTitle( title: TranslationBase.of(context).orderTestOr, subTitle: TranslationBase.of(context).procedure, ), - if ((patient.patientStatusType != null && - patient.patientStatusType == 43) || - (isFromLiveCare && patient.appointmentNo != null)) + if ((patient.patientStatusType != null && patient.patientStatusType == 43) || (isFromLiveCare && patient.appointmentNo != null)) AddNewOrder( onTap: () async { GifLoaderDialogUtils.showMyDialog(context); - await model.getProcedureTemplate( - categoryID: ProcedureType.PROCEDURE.getCategoryId(), - isLocalBusy: true); + await model.getProcedureTemplate(categoryID: ProcedureType.PROCEDURE.getCategoryId(), isLocalBusy: true); GifLoaderDialogUtils.hideDialog(context); Navigator.push( @@ -96,9 +83,17 @@ class ProcedureScreen extends StatelessWidget { }, label: TranslationBase.of(context).addMoreProcedure, ), - - !model.isPrincipalCovered_ ? Center(child: AppText(TranslationBase.of(context).principalCoveredOrNot,color: Colors.red, textAlign: TextAlign.center, )) :SizedBox(), - SizedBox(height: 20,), + !model.isPrincipalCovered_ + ? Center( + child: AppText( + TranslationBase.of(context).principalCoveredOrNot, + color: Colors.red, + textAlign: TextAlign.center, + )) + : SizedBox(), + SizedBox( + height: 20, + ), if (model.procedureList.isNotEmpty) ListView.builder( scrollDirection: Axis.vertical, @@ -107,45 +102,28 @@ class ProcedureScreen extends StatelessWidget { physics: BouncingScrollPhysics(), itemBuilder: (BuildContext ctxt, int index) { return ProcedureCard( - categoryID: model - .procedureList[0].entityList![index].categoryID, + categoryID: model.procedureList[0].entityList![index].categoryID, entityList: model.procedureList[0].entityList![index], onTap: () { - if (model.procedureList[0].entityList![index] - .categoryID == - 2 || - model.procedureList[0].entityList![index] - .categoryID == - 4) + if (model.procedureList[0].entityList![index].categoryID == 2 || model.procedureList[0].entityList![index].categoryID == 4) updateProcedureForm( context, model: model, patient: patient, - remarks: model.procedureList[0] - .entityList![index].remarks!, - orderType: model.procedureList[0] - .entityList![index].orderType - .toString(), - orderNo: model.procedureList[0] - .entityList![index].orderNo!, - procedureName: model.procedureList[0] - .entityList![index].procedureName!, - categoreId: model.procedureList[0] - .entityList![index].categoryID - .toString(), - procedureId: model.procedureList[0] - .entityList![index].procedureId!, - limetNo: model.procedureList[0] - .entityList![index].lineItemNo!, + remarks: model.procedureList[0].entityList![index].remarks!, + orderType: model.procedureList[0].entityList![index].orderType.toString(), + orderNo: model.procedureList[0].entityList![index].orderNo!, + procedureName: model.procedureList[0].entityList![index].procedureName!, + categoreId: model.procedureList[0].entityList![index].categoryID.toString(), + procedureId: model.procedureList[0].entityList![index].procedureId!, + limetNo: model.procedureList[0].entityList![index].lineItemNo!, ); }, patient: patient, doctorID: model.doctorProfile?.doctorID, ); }), - if (model.state == ViewState.ErrorLocal || - (model.procedureList.isNotEmpty && - model.procedureList[0].entityList!.isEmpty)) + if (model.state == ViewState.ErrorLocal || (model.procedureList.isNotEmpty && model.procedureList[0].entityList!.isEmpty)) Center( child: ErrorMessage( error: TranslationBase.of(context).noDataAvailable, diff --git a/lib/utils/utils.dart b/lib/utils/utils.dart index 148474f0..1db194da 100644 --- a/lib/utils/utils.dart +++ b/lib/utils/utils.dart @@ -349,4 +349,14 @@ class Utils { }); return isVidaPlus; } + + static bool isVidaPlusInPatientProject(ProjectViewModel projectViewModel, int projectID) { + bool isVidaPlusInPatientProject = false; + projectViewModel.vidaPlusInPatientsProjectListModel.forEach((element) { + if (element.projectID == projectID) { + isVidaPlusInPatientProject = true; + } + }); + return isVidaPlusInPatientProject; + } } diff --git a/pubspec.yaml b/pubspec.yaml index 45856f38..760c31a6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,7 +11,7 @@ description: A new Flutter project. # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.4.16+1 +version: 1.4.17+1 environment: @@ -57,7 +57,7 @@ dependencies: barcode_scan2: ^4.3.0 # permissions permission_handler: ^11.1.0 - device_info: ^2.0.2 +# device_info: ^2.0.2 # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons.