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 dcac10e4..98984cbc 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/'; @@ -407,7 +407,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/config/localized_values.dart b/lib/config/localized_values.dart index 2f2cd4c9..5546e8e6 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1245,6 +1245,7 @@ const Map> localizedValues = { "authorizedBy": {"en": "Authorized By", "ar":"مرخص من قبل"}, "dosageDetails": {"en": "Dosage Details", "ar":"تفاصيل الجرعة"}, "accessLevel": {"en": "Access Level", "ar":"مستوى الوصول"}, + "stable": {"en": "Stable", "ar":"مستقر"}, "resolved": {"en": "Resolved", "ar":"تم الحل"}, "diagnosisAlreadyDeleted": {"en": "Diagnosis Already Deleted", "ar":"تم حذف التشخيص بالفعل"}, "diagnosisAlreadyResolved": {"en": "Diagnosis Already Resolved", "ar":"تم حل التشخيص بالفعل"}, diff --git a/lib/core/model/SOAP/assessment/audit_diagnosis.dart b/lib/core/model/SOAP/assessment/audit_diagnosis.dart index ac7abbdc..f98205dc 100644 --- a/lib/core/model/SOAP/assessment/audit_diagnosis.dart +++ b/lib/core/model/SOAP/assessment/audit_diagnosis.dart @@ -6,6 +6,7 @@ class AuditDiagnosis { String? deletedBy; String? deletedOn; String? deletedRemarks; + String? doctorName; String? diagnosisType; bool? isEventIdentifiedExternally; bool? isResolved; @@ -23,6 +24,7 @@ class AuditDiagnosis { createdOn = json['createdOn']; deletedBy = json['deletedBy']; deletedOn = json['deletedOn']; + doctorName = json['doctorName']; deletedRemarks = json['deletedRemarks']; diagnosisType = json['diagnosisType']; isEventIdentifiedExternally = json['isEventIdentifiedExternally']; 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 3977673d..9f378c72 100644 --- a/lib/screens/home/home_screen.dart +++ b/lib/screens/home/home_screen.dart @@ -125,117 +125,69 @@ class _HomeScreenState extends State { children: [ Container( width: MediaQuery.of(context).size.width * .6, - child: projectsProvider.doctorClinicsList.length > - 0 + child: projectsProvider.doctorClinicsList.length > 0 ? Stack( children: [ DropdownButtonHideUnderline( child: DropdownButton( dropdownColor: Colors.white, - iconEnabledColor: - AppGlobal.appTextColor, + iconEnabledColor: AppGlobal.appTextColor, icon: Icon(Icons.keyboard_arrow_down), isExpanded: true, - value: clinicId == null - ? projectsProvider - .doctorClinicsList[0].clinicID - : clinicId, + value: clinicId == null ? projectsProvider.doctorClinicsList[0].clinicID : clinicId, iconSize: 25, elevation: 16, - selectedItemBuilder: - (BuildContext context) { - return projectsProvider - .doctorClinicsList - .map((item) { + selectedItemBuilder: (BuildContext context) { + return projectsProvider.doctorClinicsList.map((item) { return Row( mainAxisSize: MainAxisSize.max, - mainAxisAlignment: - MainAxisAlignment.end, + mainAxisAlignment: MainAxisAlignment.end, children: [ Column( - mainAxisAlignment: - MainAxisAlignment - .center, + mainAxisAlignment: MainAxisAlignment.center, children: [ Container( - padding: - EdgeInsets.all(0), - margin: - EdgeInsets.all(2), - decoration: - new BoxDecoration( - color: AppGlobal - .appRedColor, - borderRadius: - BorderRadius - .circular( - 20), + padding: EdgeInsets.all(0), + margin: EdgeInsets.all(2), + decoration: new BoxDecoration( + color: AppGlobal.appRedColor, + borderRadius: BorderRadius.circular(20), ), - constraints: - BoxConstraints( + constraints: BoxConstraints( minWidth: 20, minHeight: 20, ), child: Center( child: AppText( - projectsProvider - .doctorClinicsList - .length - .toString(), - color: - Colors.white, - letterSpacing: - -0.72, - fontWeight: - FontWeight - .w600, - fontSize: - projectsProvider - .isArabic - ? 10 - : 12, - textAlign: - TextAlign - .center, + projectsProvider.doctorClinicsList.length.toString(), + color: Colors.white, + letterSpacing: -0.72, + fontWeight: FontWeight.w600, + fontSize: projectsProvider.isArabic ? 10 : 12, + textAlign: TextAlign.center, ), )), ], ), - AppText( - Utils.convertToTitleCase( - item.clinicName), - fontSize: 14, - letterSpacing: -0.96, - color: AppGlobal - .appTextColor, - fontWeight: - FontWeight.bold, - textAlign: TextAlign.end), + AppText(Utils.convertToTitleCase(item.clinicName), + fontSize: 14, letterSpacing: -0.96, color: AppGlobal.appTextColor, fontWeight: FontWeight.bold, textAlign: TextAlign.end), ], ); }).toList(); }, onChanged: (newValue) async { clinicId = newValue; - GifLoaderDialogUtils.showMyDialog( - context); - await model.changeClinic(newValue, - authenticationViewModel); - GifLoaderDialogUtils.hideDialog( - context); - if (model.state == - ViewState.ErrorLocal) { - DrAppToastMsg.showErrorToast( - model.error); + GifLoaderDialogUtils.showMyDialog(context); + await model.changeClinic(newValue, authenticationViewModel); + GifLoaderDialogUtils.hideDialog(context); + if (model.state == ViewState.ErrorLocal) { + DrAppToastMsg.showErrorToast(model.error); } }, - items: projectsProvider - .doctorClinicsList - .map((item) { + items: projectsProvider.doctorClinicsList.map((item) { return DropdownMenuItem( child: AppText( - Utils.convertToTitleCase( - item.clinicName), + Utils.convertToTitleCase(item.clinicName), fontSize: 14, letterSpacing: -0.96, color: AppGlobal.appTextColor, @@ -248,8 +200,7 @@ class _HomeScreenState extends State { )), ], ) - : AppText( - TranslationBase.of(context).noClinic), + : AppText(TranslationBase.of(context).noClinic), ), ], ), @@ -279,22 +230,16 @@ class _HomeScreenState extends State { ? FractionallySizedBox( widthFactor: 0.90, child: Container( - child: Column( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - SizedBox( - height: 10, - ), - sliderActiveIndex == 1 - ? DashboardSliderItemWidget( - model.dashboardItemsList[4]) - : sliderActiveIndex == 0 - ? DashboardSliderItemWidget( - model.dashboardItemsList[3]) - : DashboardSliderItemWidget( - model.dashboardItemsList[6]), - ]))) + child: Column(mainAxisAlignment: MainAxisAlignment.start, children: [ + SizedBox( + height: 10, + ), + sliderActiveIndex == 1 + ? DashboardSliderItemWidget(model.dashboardItemsList[4]) + : sliderActiveIndex == 0 + ? DashboardSliderItemWidget(model.dashboardItemsList[3]) + : DashboardSliderItemWidget(model.dashboardItemsList[6]), + ]))) : SizedBox(), ], ) @@ -333,12 +278,9 @@ class _HomeScreenState extends State { : SizeConfig.isHeightLarge ? 15 : 13), - child: ListView( - scrollDirection: Axis.horizontal, - children: [ - ...homePatientsCardsWidget( - model, projectsProvider), - ])), + child: ListView(scrollDirection: Axis.horizontal, children: [ + ...homePatientsCardsWidget(model, projectsProvider), + ])), SizedBox( height: 20, ), @@ -469,25 +411,29 @@ 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( + 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(); + } if (model.isInfectiousDiseaseConsultant) { patientCards.add(HomePatientCard( diff --git a/lib/screens/patients/profile/soap_update_vida_plus/assessment/widget/audit_item.dart b/lib/screens/patients/profile/soap_update_vida_plus/assessment/widget/audit_item.dart index 3fc197f7..79a7e297 100644 --- a/lib/screens/patients/profile/soap_update_vida_plus/assessment/widget/audit_item.dart +++ b/lib/screens/patients/profile/soap_update_vida_plus/assessment/widget/audit_item.dart @@ -20,7 +20,7 @@ class AuditItem extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ AppText( - auditDiagnosis.createdBy ?? '', + auditDiagnosis.doctorName ?? '', fontWeight: FontWeight.w600, fontSize: 12, color: Color(0xFF2B353E), diff --git a/lib/screens/patients/profile/soap_update_vida_plus/objective/list_of_examination.dart b/lib/screens/patients/profile/soap_update_vida_plus/objective/list_of_examination.dart index 6e0eedab..082221f5 100644 --- a/lib/screens/patients/profile/soap_update_vida_plus/objective/list_of_examination.dart +++ b/lib/screens/patients/profile/soap_update_vida_plus/objective/list_of_examination.dart @@ -28,7 +28,7 @@ class ListOfExamination extends StatelessWidget { ///todo handle the event as per the actiion /// the action is [SoapDetailItemActions] }, - status: 'active', + status: TranslationBase.of(context).active, showActions: false, ), separatorBuilder: (_, __) => Divider(), diff --git a/lib/screens/patients/profile/soap_update_vida_plus/subjective/allergies/update_allergies_widget.dart b/lib/screens/patients/profile/soap_update_vida_plus/subjective/allergies/update_allergies_widget.dart index 82c6a943..755e49a6 100644 --- a/lib/screens/patients/profile/soap_update_vida_plus/subjective/allergies/update_allergies_widget.dart +++ b/lib/screens/patients/profile/soap_update_vida_plus/subjective/allergies/update_allergies_widget.dart @@ -5,6 +5,7 @@ import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_al import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update_vida_plus/subjective/allergies/reactions_selection.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/widgets/add_soap_item.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/soap_update_vida_plus/widgets/SoapDetailItem.dart'; import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart'; import 'package:doctor_app_flutter/utils/utils.dart'; @@ -102,11 +103,23 @@ class _UpdateAllergiesWidgetState extends State { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - AppText( - selectedAllergy.allergyName!, - fontSize: 12, - fontWeight: FontWeight.w800, - letterSpacing: -0.48, + Row( + children: [ + Expanded( + child: AppText( + selectedAllergy.allergyName!, + fontSize: 12, + fontWeight: FontWeight.w800, + letterSpacing: -0.48, + ), + ), + SizedBox( + width: 8, + ), + Status( + status: (selectedAllergy.isActivePatientsAllergy == true ) ? TranslationBase.of(context).active : TranslationBase.of(context).resolved, + ) + ], ), selectedAllergy.patientsAllergyReactionsDTOs! .isNotEmpty && diff --git a/lib/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/chief_complaints.dart b/lib/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/chief_complaints.dart index 3297a83b..732fb50f 100644 --- a/lib/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/chief_complaints.dart +++ b/lib/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/chief_complaints.dart @@ -6,6 +6,7 @@ import 'package:doctor_app_flutter/screens/patients/profile/soap_update/subjecti import 'package:doctor_app_flutter/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/AddChiefComplaints.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/widgets/add_soap_item.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/widgets/complaint_items.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/widgets/empty_complaints.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart'; import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; @@ -50,24 +51,27 @@ class UpdateChiefComplaints extends StatelessWidget { title: TranslationBase.of(context).addChiefComplaint, ), SizedBox(height: 16), - Container(width: MediaQuery.of(context).size.width, - height: 40, - child: - ListView.builder( - shrinkWrap: true, - scrollDirection: Axis.horizontal, - itemCount: model.getChiefComplaintListVidaPlus.length, - itemBuilder: (_, index) => - ComplaintItems( - complaint: model.getChiefComplaintListVidaPlus[index]!, - onCrossClicked: (complaints) { - - }) - - )), - - ]), - )); + if (model.getChiefComplaintListVidaPlus.isEmpty) ...{ + SizedBox( + width: MediaQuery.sizeOf(context).width, + child: EmptyComplaints(), + ) + } else ...{ + Container( + width: MediaQuery.of(context).size.width, + height: 40, + child: ListView.builder( + shrinkWrap: true, + scrollDirection: Axis.horizontal, + itemCount: + model.getChiefComplaintListVidaPlus.length, + itemBuilder: (_, index) => ComplaintItems( + complaint: model + .getChiefComplaintListVidaPlus[index]!, + onCrossClicked: (complaints) {}))), + } + ]), + )); } getChiefComplaints(SOAPViewModel model){ model.getChiefComplaint(patientInfo); diff --git a/lib/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/widgets/empty_complaints.dart b/lib/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/widgets/empty_complaints.dart index 1c8d4802..44412e8d 100644 --- a/lib/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/widgets/empty_complaints.dart +++ b/lib/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/widgets/empty_complaints.dart @@ -16,6 +16,7 @@ class EmptyComplaints extends StatelessWidget{ TranslationBase.of(context).noComplaintsFound, fontSize: 12, fontWeight: FontWeight.w400, + textAlign: TextAlign.center, color: Color(0xFFADADAD), ) ], diff --git a/lib/screens/patients/profile/soap_update_vida_plus/widgets/SoapDetailItem.dart b/lib/screens/patients/profile/soap_update_vida_plus/widgets/SoapDetailItem.dart index d4d9a4b0..26b2d8f2 100644 --- a/lib/screens/patients/profile/soap_update_vida_plus/widgets/SoapDetailItem.dart +++ b/lib/screens/patients/profile/soap_update_vida_plus/widgets/SoapDetailItem.dart @@ -204,16 +204,23 @@ class Status extends StatelessWidget { borderRadius: BorderRadius.circular(3), ), // color: Color(0xFF359846), - color: (status.toLowerCase() == 'active' || - status.toLowerCase() == 'stable') + color: (status.toLowerCase() == + TranslationBase.of(context).active.toLowerCase() || + status.toLowerCase() == + TranslationBase.of(context).stable.toLowerCase()) ? Color(0xFFD8E8DB) - : Color(0x98d02127), + : (status.toLowerCase() == + TranslationBase.of(context).resolved.toLowerCase()) + ? Colors.lightBlue + : Color(0x98d02127), child: Padding( padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 6), child: AppText( status, - color: (status.toLowerCase() == 'active' || - status.toLowerCase() == 'stable') + color: (status.toLowerCase() == + TranslationBase.of(context).active.toLowerCase() || + status.toLowerCase() == + TranslationBase.of(context).stable.toLowerCase()) ? Color(0xFF359846) : Colors.white, fontSize: 8, 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/translations_delegate_base_utils.dart b/lib/utils/translations_delegate_base_utils.dart index f275e001..224ce272 100644 --- a/lib/utils/translations_delegate_base_utils.dart +++ b/lib/utils/translations_delegate_base_utils.dart @@ -1186,6 +1186,7 @@ class TranslationBase { localizedValues['onlyOfftimeHoliday']![locale.languageCode]!; String get active => localizedValues['active']![locale.languageCode]!; + String get stable => localizedValues['stable']![locale.languageCode]!; String get hold => localizedValues['hold']![locale.languageCode]!; diff --git a/lib/utils/utils.dart b/lib/utils/utils.dart index bce2f9b0..728199de 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 2dcd7b8b..51e0de51 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.