From 46b4ea25eaac13e1837bb45c3164d38daa6ad8ba Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Mon, 26 Apr 2021 18:35:46 +0300 Subject: [PATCH 01/10] fix search part --- .../patient_search/patients_screen_new.dart | 97 ++++++++++++------- 1 file changed, 61 insertions(+), 36 deletions(-) diff --git a/lib/screens/patients/patient_search/patients_screen_new.dart b/lib/screens/patients/patient_search/patients_screen_new.dart index 2597d397..714359f0 100644 --- a/lib/screens/patients/patient_search/patients_screen_new.dart +++ b/lib/screens/patients/patient_search/patients_screen_new.dart @@ -25,6 +25,7 @@ import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart'; import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_form_field.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/text_fields_utils.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:intl/intl.dart'; @@ -151,7 +152,7 @@ class _PatientsScreenNewState extends State { //TranslationBase.of(context).all, projectsProvider = Provider.of(context); final routeArgs = ModalRoute.of(context).settings.arguments as Map; - + int _activeTab = 0; // patient = widget.patientSearchForm != null // ? widget.patientSearchForm // : routeArgs['patientSearchForm']; @@ -180,6 +181,13 @@ class _PatientsScreenNewState extends State { // else // patientTypeTitle = SERVICES_PATIANT_HEADER_AR[int.parse(patientType)]; + List _tabs = [ + TranslationBase.of(context).inPatientAll.toUpperCase(), + TranslationBase.of(context).inPatient.toUpperCase(), + ]; + final screenSize = MediaQuery.of(context).size; + + return BaseView( onModelReady: (model) async { if(widget.isSearchWithKeyInfo) { @@ -278,47 +286,64 @@ class _PatientsScreenNewState extends State { ) : Column( children: [ + BottomSheetTitle(title: "Search for 1111",), - Container( - padding: EdgeInsets.only( - left: 0, right: 5, bottom: 5, top: 5), - decoration: BoxDecoration( - color: Colors.white, - ), - height: 115, - child: Container( - padding: EdgeInsets.only( - left: 10, right: 10), - margin: EdgeInsets.only(top: 60), - child: Column( - children: [ - Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - RichText( - text: TextSpan( - style: TextStyle( - fontSize:20, - color: Colors.black), - children: [ - new TextSpan( - - text: "Search for 1111", - style: TextStyle( - color: Color(0xFF2B353E), - fontWeight: FontWeight.bold, - fontFamily: 'Poppins', - fontSize: 22)), - ], + + Container( + // color: Colors.red, + height: screenSize.height * 0.070, + decoration: TextFieldsUtils.containerBorderDecoration( + Color(0Xffffffff), Color(0xFFCCCCCC), + borderRadius: 4, borderWidth: 0), + child: Row( + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: CrossAxisAlignment.center, + children: _locations.map((item) { + bool _isActive = _locations[_activeLocation] == item ? true : false; + + return Expanded( + child: InkWell( + onTap: () async { + // setState(() { + // _activeTab = _locations.indexOf(item); + // }); + setState(() { + _activeLocation = _locations.indexOf(item); + }); + GifLoaderDialogUtils.showMyDialog(context); + await model.getPatientBasedOnDate(item: item, + selectedPatientType: widget.selectedPatientType, + patientSearchRequestModel: widget + .patientSearchRequestModel, + isSearchWithKeyInfo: widget.isSearchWithKeyInfo); + GifLoaderDialogUtils.hideDialog(context); + }, + child: Center( + child: Container( + height: screenSize.height * 0.070, + decoration: TextFieldsUtils.containerBorderDecoration( + _isActive + ? Color(0xFFD02127 /*B8382B*/) + : Color(0xFFEAEAEA), + _isActive ? Color(0xFFD02127) : Color(0xFFEAEAEA), + borderRadius: 4, + borderWidth: 0), + child: Center( + child: AppText( + item, + fontSize: SizeConfig.textMultiplier * 1.8, + color: _isActive ? Colors.white : Color(0xFF2B353E), + fontWeight: FontWeight.w700, + ), ), ), - ], + ), ), - ], - ), + ); + }).toList(), ), ), + SizedBox(height: 18.5), Container( width: SizeConfig.screenWidth * 0.9, From 5daadc836934ef3cc6a593b7419a161033b7b932 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Mon, 26 Apr 2021 19:12:07 +0300 Subject: [PATCH 02/10] commit --- .../patients/patient_search/header.dart | 39 +++ .../patient_search_screen_new.dart | 1 + .../patient_search/patients_screen_new.dart | 296 +++++------------- 3 files changed, 114 insertions(+), 222 deletions(-) create mode 100644 lib/screens/patients/patient_search/header.dart diff --git a/lib/screens/patients/patient_search/header.dart b/lib/screens/patients/patient_search/header.dart new file mode 100644 index 00000000..eb404e70 --- /dev/null +++ b/lib/screens/patients/patient_search/header.dart @@ -0,0 +1,39 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:flutter/material.dart'; + +class HeaderInSearch extends StatelessWidget { + final String title; + + const HeaderInSearch({Key key, this.title}) : super(key: key); + + @override + Widget build(BuildContext context) { + return Container( + padding: EdgeInsets.only(left: 0, right: 5, bottom: 5, top: 5), + decoration: BoxDecoration( + color: Colors.white, + ), + child: Container( + padding: EdgeInsets.only(left: 10, right: 10, bottom: 10), + margin: EdgeInsets.only(top: 50), + child: Row(children: [ + IconButton( + icon: Icon(Icons.arrow_back_ios), + color: Colors.black, //Colors.black, + onPressed: () => Navigator.pop(context), + ), + Expanded( + child: AppText( + title, + fontSize: SizeConfig.textMultiplier * 2.8, + fontWeight: FontWeight.bold, + color: Color(0xFF2B353E), + fontFamily: 'Poppins', + ), + ), + ]), + ), + ); + } +} diff --git a/lib/screens/patients/patient_search/patient_search_screen_new.dart b/lib/screens/patients/patient_search/patient_search_screen_new.dart index f383cf40..5325a07e 100644 --- a/lib/screens/patients/patient_search/patient_search_screen_new.dart +++ b/lib/screens/patients/patient_search/patient_search_screen_new.dart @@ -294,6 +294,7 @@ class _PatientSearchScreenNewState extends State { patientSearchRequestModel: patientSearchRequestModel, isSearchWithKeyInfo: patientFileInfoController.text.isNotEmpty ? true : false, + isSearch: true, ), ), ); diff --git a/lib/screens/patients/patient_search/patients_screen_new.dart b/lib/screens/patients/patient_search/patients_screen_new.dart index 714359f0..32fa1766 100644 --- a/lib/screens/patients/patient_search/patients_screen_new.dart +++ b/lib/screens/patients/patient_search/patients_screen_new.dart @@ -15,7 +15,7 @@ import 'package:doctor_app_flutter/models/patient/patient_model.dart'; import 'package:doctor_app_flutter/models/patient/topten_users_res_model.dart'; import 'package:doctor_app_flutter/routes.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; -import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart'; +import 'package:doctor_app_flutter/screens/patients/patient_search/header.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/PatientCard.dart'; @@ -41,6 +41,8 @@ class PatientsScreenNew extends StatefulWidget { final PatientType selectedPatientType; final PatientSearchRequestModel patientSearchRequestModel; final bool isSearchWithKeyInfo; + final bool isSearch; + final bool isInpatient; PatientsScreenNew( {this.patientSearchForm, @@ -50,7 +52,9 @@ class PatientsScreenNew extends StatefulWidget { this.isView, this.selectedPatientType, this.patientSearchRequestModel, - this.isSearchWithKeyInfo = true}); + this.isSearchWithKeyInfo = true, + this.isSearch = false, + this.isInpatient = false}); @override _PatientsScreenNewState createState() => _PatientsScreenNewState(); @@ -78,9 +82,7 @@ class _PatientsScreenNewState extends State { List _locations = []; //['All', 'Today', 'Tomorrow', 'Next Week']; int _activeLocation = 0; - bool isInpatient = false; String patientType; - bool isSearch = false; String patientTypeTitle; var _isLoading = true; var selectedFilter = 1; @@ -205,144 +207,82 @@ class _PatientsScreenNewState extends State { appBarTitle: "Search Patient", isShowAppBar: false, baseViewModel: model, - body: model.patientList.isEmpty - ? Column( - children: [ - Column(children: [ - SizedBox( - height: 10.0, - ), - if (widget.selectedPatientType == - PatientType.OutPatient && - !widget.isSearchWithKeyInfo) - Container( - padding: EdgeInsets.all(5), - decoration: BoxDecoration( - color: Colors.white, - border: Border.all(color: Colors.grey), - borderRadius: BorderRadius.circular(10)), - child: ClinicList( - clinicId: clinicId, - onClinicChange: (newValue) { - clinicId = newValue; - changeClinic(newValue, context, model); - }, - )), - Padding( - padding: EdgeInsets.only( - top: MediaQuery.of(context).size.height * - 0.03), - // child: _locationBar(context) - child: - (widget.selectedPatientType == PatientType.OutPatient && - widget.isSearchWithKeyInfo) - ? _locationBar(context, model) - : Container(), - ) - ]), - Container( - margin: EdgeInsets.only( - top: MediaQuery.of(context).size.height * 0.10), - child: Center( - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - SizedBox( - height: 100, - ), - Image.asset('assets/images/no-data.png'), - Padding( - padding: const EdgeInsets.all(8.0), - child: AppText(TranslationBase.of(context) - .youDontHaveAnyPatient), - ) - ], - ), - ), - ), - ], - ) - : Container( + body: Container( color: Colors.grey[200], child: ListView( scrollDirection: Axis.vertical, children: [ Container( - child:model.patientList.isEmpty - ? Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Container( - child: Center( - child: Padding( - padding: const EdgeInsets.fromLTRB( - 0, 0, 0, 0), //250 - child: - DrAppCircularProgressIndeicator(), - )), - ), - ], - ) - : Column( + child: Column( children: [ - BottomSheetTitle(title: "Search for 1111",), - - - Container( - // color: Colors.red, - height: screenSize.height * 0.070, - decoration: TextFieldsUtils.containerBorderDecoration( - Color(0Xffffffff), Color(0xFFCCCCCC), - borderRadius: 4, borderWidth: 0), - child: Row( - mainAxisSize: MainAxisSize.max, - crossAxisAlignment: CrossAxisAlignment.center, - children: _locations.map((item) { - bool _isActive = _locations[_activeLocation] == item ? true : false; - - return Expanded( - child: InkWell( - onTap: () async { - // setState(() { - // _activeTab = _locations.indexOf(item); - // }); - setState(() { - _activeLocation = _locations.indexOf(item); - }); - GifLoaderDialogUtils.showMyDialog(context); - await model.getPatientBasedOnDate(item: item, - selectedPatientType: widget.selectedPatientType, - patientSearchRequestModel: widget - .patientSearchRequestModel, - isSearchWithKeyInfo: widget.isSearchWithKeyInfo); - GifLoaderDialogUtils.hideDialog(context); - }, - child: Center( - child: Container( - height: screenSize.height * 0.070, - decoration: TextFieldsUtils.containerBorderDecoration( - _isActive - ? Color(0xFFD02127 /*B8382B*/) - : Color(0xFFEAEAEA), - _isActive ? Color(0xFFD02127) : Color(0xFFEAEAEA), - borderRadius: 4, - borderWidth: 0), - child: Center( - child: AppText( - item, - fontSize: SizeConfig.textMultiplier * 1.8, - color: _isActive ? Colors.white : Color(0xFF2B353E), - fontWeight: FontWeight.w700, + if(widget.isSearch) + HeaderInSearch( + title: "Search for 1111", + ), + if(!widget.isSearch && !widget.isInpatient) + HeaderInSearch( + title: "Search for 1111", + ), + if(!widget.isInpatient) + Container( + // color: Colors.red, + height: screenSize.height * 0.070, + decoration: TextFieldsUtils + .containerBorderDecoration( + Color(0Xffffffff), + Color(0xFFCCCCCC), + borderRadius: 4, + borderWidth: 0), + child: Row( + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: CrossAxisAlignment.center, + children: _locations.map((item) { + bool _isActive = _locations[_activeLocation] == item + ? true + : false; + + return Expanded( + child: InkWell( + onTap: () async { + // setState(() { + // _activeTab = _locations.indexOf(item); + // }); + setState(() { + _activeLocation = _locations.indexOf(item); + }); + GifLoaderDialogUtils.showMyDialog(context); + await model.getPatientBasedOnDate(item: item, + selectedPatientType: widget.selectedPatientType, + patientSearchRequestModel: widget + .patientSearchRequestModel, + isSearchWithKeyInfo: widget.isSearchWithKeyInfo); + GifLoaderDialogUtils.hideDialog(context); + }, + child: Center( + child: Container( + height: screenSize.height * 0.070, + decoration: TextFieldsUtils.containerBorderDecoration( + _isActive + ? Color(0xFFD02127 /*B8382B*/) + : Color(0xFFEAEAEA), + _isActive ? Color(0xFFD02127) : Color(0xFFEAEAEA), + borderRadius: 4, + borderWidth: 0), + child: Center( + child: AppText( + item, + fontSize: SizeConfig.textMultiplier * 1.8, + color: _isActive ? Colors.white : Color(0xFF2B353E), + fontWeight: FontWeight.w700, + ), ), ), ), ), - ), - ); - }).toList(), + ); + }).toList(), + ), ), - ), SizedBox(height: 18.5), Container( @@ -390,18 +330,6 @@ class _PatientsScreenNewState extends State { SizedBox( height: 10.0, ), - Padding( - padding: EdgeInsets.only( - top: MediaQuery.of(context) - .size - .height * - 0.03), - // child: _locationBar(context) - child: widget.selectedPatientType == - PatientType.OutPatient && !widget.isSearchWithKeyInfo - ? _locationBar(context, model) - : Container(), - ), SizedBox( height: 10.0, ), @@ -419,7 +347,7 @@ class _PatientsScreenNewState extends State { arrivalType: arrivalType, isInpatient: - isInpatient, + widget.isInpatient, onTap: () { // TODO change the parameter to daynamic Navigator.of(context) @@ -432,9 +360,9 @@ class _PatientsScreenNewState extends State { "from": widget.patientSearchRequestModel.from, "to": widget.patientSearchRequestModel.from, "isSearch": - isSearch, + widget.isSearch, "isInpatient": - isInpatient, + widget.isInpatient, "arrivalType": "7", }); @@ -566,80 +494,4 @@ class _PatientsScreenNewState extends State { Helpers.showErrorToast(err); }); } - - //TODO Replace it with time bar. - Widget _locationBar(BuildContext _context, model) { - return Container( - height: MediaQuery.of(context).size.height * 0.0619, - width: SizeConfig.screenWidth * 0.94, - decoration: BoxDecoration( - color: Color(0Xffffffff), - borderRadius: BorderRadius.circular(12.5), - // border: Border.all( - // width: 0.5, - // ), - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - mainAxisSize: MainAxisSize.max, - crossAxisAlignment: CrossAxisAlignment.center, - children: _locations.map((item) { - bool _isActive = _locations[_activeLocation] == item ? true : false; - return Column(mainAxisSize: MainAxisSize.min, children: [ - InkWell( - child: Center( - child: Container( - height: MediaQuery.of(context).size.height * 0.058, - width: SizeConfig.screenWidth * 0.2334, - decoration: BoxDecoration( - borderRadius: BorderRadius.only( - bottomRight: Radius.circular(12.5), - topRight: Radius.circular(12.5), - topLeft: Radius.circular(9.5), - bottomLeft: Radius.circular(9.5)), - color: _isActive ? HexColor("#B8382B") : Colors.white, - ), - child: Center( - child: Text( - item, - style: TextStyle( - fontSize: 12, - color: _isActive - ? Colors.white - : Colors.black, //Colors.black, - - fontWeight: FontWeight.normal, - ), - ), - )), - ), - onTap: () async { - setState(() { - _activeLocation = _locations.indexOf(item); - }); - GifLoaderDialogUtils.showMyDialog(context); - await model.getPatientBasedOnDate(item: item, - selectedPatientType: widget.selectedPatientType, - patientSearchRequestModel: widget - .patientSearchRequestModel, - isSearchWithKeyInfo: widget.isSearchWithKeyInfo); - GifLoaderDialogUtils.hideDialog(context); - }), - _isActive - ? Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.only( - bottomRight: Radius.circular(10), - topRight: Radius.circular(10)), - color: Colors.white), - alignment: Alignment.center, - height: 1, - width: SizeConfig.screenWidth * 0.23, - ) - : Container() - ]); - }).toList(), - ), - ); - } } From 403fece0087ede7c76709318438e16fc5ecf6837 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Mon, 26 Apr 2021 20:40:48 +0300 Subject: [PATCH 03/10] commit things --- lib/screens/home/home_screen.dart | 25 +-- .../patient_search_screen_new.dart | 1 + .../patient_search/patients_screen_new.dart | 211 +----------------- lib/widgets/patients/PatientCard.dart | 2 +- 4 files changed, 21 insertions(+), 218 deletions(-) diff --git a/lib/screens/home/home_screen.dart b/lib/screens/home/home_screen.dart index 84cc7575..53a338a9 100644 --- a/lib/screens/home/home_screen.dart +++ b/lib/screens/home/home_screen.dart @@ -2,6 +2,8 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/core/enum/patient_type.dart'; +import 'package:doctor_app_flutter/core/model/PatientSearchRequestModel.dart'; import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/dashboard_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/hospital_view_model.dart'; @@ -13,11 +15,11 @@ import 'package:doctor_app_flutter/models/doctor/profile_req_Model.dart'; import 'package:doctor_app_flutter/models/patient/patient_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/medicine/medicine_search_screen.dart'; -import 'package:doctor_app_flutter/screens/medicine/search_medicine_patient_screen.dart'; import 'package:doctor_app_flutter/screens/patients/DischargedPatientPage.dart'; import 'package:doctor_app_flutter/screens/patients/PatientsInPatientScreen.dart'; import 'package:doctor_app_flutter/screens/patients/ReferralDischargedPatientPage.dart'; import 'package:doctor_app_flutter/screens/patients/patient_search/patient_search_screen_new.dart'; +import 'package:doctor_app_flutter/screens/patients/patient_search/patients_screen_new.dart'; import 'package:doctor_app_flutter/screens/patients/patient_search_screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/referral/patient_referral_screen.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; @@ -40,7 +42,6 @@ import 'package:flutter_swiper/flutter_swiper.dart'; import 'package:provider/provider.dart'; import 'package:sticky_headers/sticky_headers/widget.dart'; -import '../../routes.dart'; import '../../widgets/shared/app_texts_widget.dart'; import '../../widgets/shared/rounded_container_widget.dart'; import 'home_page_card.dart'; @@ -544,21 +545,19 @@ class _HomeScreenState extends State { ), hasBorder: false, onTap: () { - // getRequestHeader(false); - // Navigator.of(context) - // .pushNamed(PATIENTS, arguments: { - // "patientSearchForm": - // _patientSearchFormValues, - // "selectedType": "0", - // "arrivalType": "1", - // "isInpatient": false - // }); - Navigator.push( context, MaterialPageRoute( builder: (context) => - PatientSearchScreenNew(), + PatientsScreenNew( + isSearch: false, + isInpatient: false, + patientSearchRequestModel: + PatientSearchRequestModel(), + selectedPatientType: + PatientType.OutPatient, + isSearchWithKeyInfo: false, + ), )); }, ), diff --git a/lib/screens/patients/patient_search/patient_search_screen_new.dart b/lib/screens/patients/patient_search/patient_search_screen_new.dart index 5325a07e..f9fadbc5 100644 --- a/lib/screens/patients/patient_search/patient_search_screen_new.dart +++ b/lib/screens/patients/patient_search/patient_search_screen_new.dart @@ -295,6 +295,7 @@ class _PatientSearchScreenNewState extends State { isSearchWithKeyInfo: patientFileInfoController.text.isNotEmpty ? true : false, isSearch: true, + isInpatient: selectedPatientType == PatientType.OutPatient && patientFileInfoController.text.isEmpty?false: true, ), ), ); diff --git a/lib/screens/patients/patient_search/patients_screen_new.dart b/lib/screens/patients/patient_search/patients_screen_new.dart index 32fa1766..3e4819ea 100644 --- a/lib/screens/patients/patient_search/patients_screen_new.dart +++ b/lib/screens/patients/patient_search/patients_screen_new.dart @@ -1,5 +1,3 @@ -import 'package:doctor_app_flutter/config/config.dart'; -import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/patient_type.dart'; import 'package:doctor_app_flutter/core/model/PatientSearchRequestModel.dart'; @@ -7,28 +5,20 @@ import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart'; import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; -import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart'; -import 'package:doctor_app_flutter/models/doctor/profile_req_Model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; -import 'package:doctor_app_flutter/models/patient/patient_arrival/get_patient_arrival_list_request_model.dart'; import 'package:doctor_app_flutter/models/patient/patient_model.dart'; -import 'package:doctor_app_flutter/models/patient/topten_users_res_model.dart'; import 'package:doctor_app_flutter/routes.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/patient_search/header.dart'; -import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/PatientCard.dart'; -import 'package:doctor_app_flutter/widgets/patients/clinic_list_dropdwon.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart'; import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_form_field.dart'; import 'package:doctor_app_flutter/widgets/shared/text_fields/text_fields_utils.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; -import 'package:intl/intl.dart'; import 'package:provider/provider.dart'; // ignore: must_be_immutable @@ -72,76 +62,19 @@ class _PatientsScreenNewState extends State { AuthViewModel authProvider; Color sideColor = Colors.black; - List responseModelList; - List responseModelList2; - final String url = "assets/images/"; - final String avatarMale = "user_male.svg"; //'working_male.svg';//'user.svg'; - final String avatarFemale = 'user_female.svg'; - final String assetName = 'assets/image.svg'; - List _locations = []; //['All', 'Today', 'Tomorrow', 'Next Week']; int _activeLocation = 0; String patientType; String patientTypeTitle; - var _isLoading = true; var selectedFilter = 1; - bool _isError = false; - String error = ""; String arrivalType; ProjectViewModel projectsProvider; var isView; final _controller = TextEditingController(); PatientModel patient; - searchData(String str) { - this.responseModelList = this.responseModelList2; - var strExist = str.length > 0 ? true : false; - if (strExist) { - List filterData = []; - - for (var i = 0; i < responseModelList2.length; i++) { - String firstName = responseModelList[i].firstName.toUpperCase(); - String lastName = responseModelList[i].lastName.toUpperCase(); - String mobile = responseModelList[i].mobileNumber.toUpperCase(); - String patientID = responseModelList[i].patientId.toString(); - - if (firstName.contains(str.toUpperCase()) || - lastName.contains(str.toUpperCase()) || - mobile.contains(str) || - patientID.contains(str)) { - filterData.add(responseModelList[i]); - } - } - - setState(() { - this.responseModelList = filterData; - }); - } else { - setState(() { - this.responseModelList = this.responseModelList2; - }); - } - } - convertDateFormat(String str) { - String timeConvert; - const start = "/Date("; - const end = "+0300)"; - - final startIndex = str.indexOf(start); - final endIndex = str.indexOf(end, startIndex + start.length); - - var date = new DateTime.fromMillisecondsSinceEpoch( - int.parse(str.substring(startIndex + start.length, endIndex))); - String newDate = date.year.toString() + - "-" + - date.month.toString().padLeft(2, '0') + - "-" + - date.day.toString().padLeft(2, '0'); - - return newDate.toString(); - } @override Widget build(BuildContext context) { @@ -151,38 +84,6 @@ class _PatientsScreenNewState extends State { TranslationBase.of(context).tomorrow, TranslationBase.of(context).nextWeek, ]; - //TranslationBase.of(context).all, - projectsProvider = Provider.of(context); - final routeArgs = ModalRoute.of(context).settings.arguments as Map; - int _activeTab = 0; - // patient = widget.patientSearchForm != null - // ? widget.patientSearchForm - // : routeArgs['patientSearchForm']; - // - // patientType = widget.selectedType != null - // ? widget.selectedType - // : routeArgs['selectedType']; - // arrivalType = widget.arrivalType != null - // ? widget.arrivalType - // : routeArgs['arrivalType']; - // if (routeArgs != null && routeArgs.containsKey("isSearch")) { - // isSearch = routeArgs['isSearch']; - // } - // if (routeArgs != null && routeArgs.containsKey("isSearch")) { - // isView = routeArgs['isView']; - // } - // if (routeArgs != null && routeArgs.containsKey('activeFilter')) { - // _activeLocation = routeArgs['activeFilter']; - // } - // if (routeArgs != null && routeArgs.containsKey('isInpatient')) { - // isInpatient = routeArgs['isInpatient']; - // } - - // if (!projectsProvider.isArabic) - // patientTypeTitle = SERVICES_PATIANT_HEADER[int.parse(patientType)]; - // else - // patientTypeTitle = SERVICES_PATIANT_HEADER_AR[int.parse(patientType)]; - List _tabs = [ TranslationBase.of(context).inPatientAll.toUpperCase(), TranslationBase.of(context).inPatient.toUpperCase(), @@ -192,15 +93,12 @@ class _PatientsScreenNewState extends State { return BaseView( onModelReady: (model) async { - if(widget.isSearchWithKeyInfo) { - await model.getPatientFileInformation(widget.patientSearchRequestModel); + if(!widget.isSearchWithKeyInfo && widget.selectedPatientType == PatientType.OutPatient) { + await model.getOutPatient(widget.patientSearchRequestModel); + } else { - // ignore: unrelated_type_equality_checks - if(widget.selectedPatientType == PatientType.OutPatient) { - await model.getOutPatient(widget.patientSearchRequestModel); - } else { - // TODO handel inPatient case - } + await model.getPatientFileInformation(widget.patientSearchRequestModel); + } }, builder: (_, model, w) => AppScaffold( @@ -221,7 +119,7 @@ class _PatientsScreenNewState extends State { ), if(!widget.isSearch && !widget.isInpatient) HeaderInSearch( - title: "Search for 1111", + title: "My Out patient", ), if(!widget.isInpatient) Container( @@ -244,9 +142,6 @@ class _PatientsScreenNewState extends State { return Expanded( child: InkWell( onTap: () async { - // setState(() { - // _activeTab = _locations.indexOf(item); - // }); setState(() { _activeLocation = _locations.indexOf(item); }); @@ -324,7 +219,7 @@ class _PatientsScreenNewState extends State { bottom: 30), ), onChanged: (String str) { - this.searchData(str); + // this.searchData(str); }), ])), SizedBox( @@ -402,96 +297,4 @@ class _PatientsScreenNewState extends State { ), ); } - - changeClinic(clinicId, BuildContext context, model) async { - GifLoaderDialogUtils.showMyDialog(context); - Map profile = await sharedPref.getObj(DOCTOR_PROFILE); - DoctorProfileModel doctorProfile = new DoctorProfileModel.fromJson(profile); - ProfileReqModel docInfo = new ProfileReqModel( - doctorID: doctorProfile.doctorID, - clinicID: clinicId, - license: true, - projectID: doctorProfile.projectID, - tokenID: '', - languageID: 2); - - authProvider - .getDocProfiles(docInfo.toJson(), allowChangeProfile: false) - .then((profileList) async { - print(profileList['DoctorProfileList'][0]); - int val2 = int.parse(patientType); - - GetPatientArrivalListRequestModel getPatientArrivalListRequestModel = - GetPatientArrivalListRequestModel( - from: patient.From, - to: patient.To, - clinicID: profileList['DoctorProfileList'][0]['ClinicID'], - doctorID: - profileList['DoctorProfileList'][0]['DoctorID'].toString(), - patientMRN: patient.getPatientID, - pageIndex: 0, - pageSize: 0); - - model - .getPatientList( - getPatientArrivalListRequestModel.toJson(), patientType) - .then((res) { - setState(() { - if (res != null && res['MessageStatus'] == 1) { - if (val2 == 7) { - if (res[SERVICES_PATIANT2[val2]] == null) { - _isError = true; - _isLoading = false; - this.error = error.toString(); - } else { - var localList = []; - if (res["patientArrivalList"]["entityList"] == null) { - res["patientArrivalList"]["entityList"] = []; - } - res["patientArrivalList"]["entityList"].forEach((v) { - Map mergedPatient = { - ...v, - ...v["patientDetails"] - }; - localList.add(mergedPatient); - }); - lItems = localList; - } - } - parsed = lItems; - responseModelList = new ModelResponse.fromJson(parsed).list; - responseModelList.sort((a, b) { - DateTime now = DateTime.now(); - DateFormat dateFormat = DateFormat("yyyy-MM-dd HH:mm"); - String formattedDate = - DateFormat('yyyy-MM-dd ' + a.startTime).format(now); - DateTime dateTimeA = dateFormat.parse(formattedDate); - String formattedDateB = - DateFormat('yyyy-MM-dd ' + b.startTime).format(now); - DateTime dateTimeB = dateFormat.parse(formattedDateB); - var adate = dateTimeA; //a.startTime; - var bdate = dateTimeB; - return adate.compareTo(bdate); - }); - responseModelList2 = responseModelList; - _isError = false; - } else { - _isError = true; - error = model.error ?? - res['ErrorEndUserMessage'] ?? - res['ErrorMessage']; - } - - _isLoading = false; - }); - GifLoaderDialogUtils.hideDialog(context); - }).catchError((error) { - Helpers.showErrorToast(error.toString()); - GifLoaderDialogUtils.hideDialog(context); - }); - }).catchError((err) { - GifLoaderDialogUtils.hideDialog(context); - Helpers.showErrorToast(err); - }); - } } diff --git a/lib/widgets/patients/PatientCard.dart b/lib/widgets/patients/PatientCard.dart index dad33425..43a4b79d 100644 --- a/lib/widgets/patients/PatientCard.dart +++ b/lib/widgets/patients/PatientCard.dart @@ -265,7 +265,7 @@ class PatientCard extends StatelessWidget { fontWeight: FontWeight.w700, fontSize: 15)), ]))), - if (isInpatient == true) + if (patientInfo.admissionDate != null) Row( children: [ AppText( From b5a90bd6580d8d3fc59d2fbaf5f815e13a1d08ee Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Mon, 26 Apr 2021 20:55:26 +0300 Subject: [PATCH 04/10] finish search --- .../patient_search_screen_new.dart | 1 + .../patient_search/patients_screen_new.dart | 18 ++++-------------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/lib/screens/patients/patient_search/patient_search_screen_new.dart b/lib/screens/patients/patient_search/patient_search_screen_new.dart index f9fadbc5..14d65831 100644 --- a/lib/screens/patients/patient_search/patient_search_screen_new.dart +++ b/lib/screens/patients/patient_search/patient_search_screen_new.dart @@ -295,6 +295,7 @@ class _PatientSearchScreenNewState extends State { isSearchWithKeyInfo: patientFileInfoController.text.isNotEmpty ? true : false, isSearch: true, + searchKey: patientFileInfoController.text, isInpatient: selectedPatientType == PatientType.OutPatient && patientFileInfoController.text.isEmpty?false: true, ), ), diff --git a/lib/screens/patients/patient_search/patients_screen_new.dart b/lib/screens/patients/patient_search/patients_screen_new.dart index 3e4819ea..bd2920dc 100644 --- a/lib/screens/patients/patient_search/patients_screen_new.dart +++ b/lib/screens/patients/patient_search/patients_screen_new.dart @@ -33,6 +33,8 @@ class PatientsScreenNew extends StatefulWidget { final bool isSearchWithKeyInfo; final bool isSearch; final bool isInpatient; + final String searchKey; + PatientsScreenNew( {this.patientSearchForm, @@ -44,24 +46,16 @@ class PatientsScreenNew extends StatefulWidget { this.patientSearchRequestModel, this.isSearchWithKeyInfo = true, this.isSearch = false, - this.isInpatient = false}); + this.isInpatient = false, this.searchKey}); @override _PatientsScreenNewState createState() => _PatientsScreenNewState(); } class _PatientsScreenNewState extends State { - List lItems; - - List parsed; - - List date; - List unFilterDate; - int clinicId; AuthViewModel authProvider; - Color sideColor = Colors.black; List _locations = []; //['All', 'Today', 'Tomorrow', 'Next Week']; int _activeLocation = 0; @@ -84,10 +78,6 @@ class _PatientsScreenNewState extends State { TranslationBase.of(context).tomorrow, TranslationBase.of(context).nextWeek, ]; - List _tabs = [ - TranslationBase.of(context).inPatientAll.toUpperCase(), - TranslationBase.of(context).inPatient.toUpperCase(), - ]; final screenSize = MediaQuery.of(context).size; @@ -115,7 +105,7 @@ class _PatientsScreenNewState extends State { children: [ if(widget.isSearch) HeaderInSearch( - title: "Search for 1111", + title: "Search for ${widget.searchKey}", ), if(!widget.isSearch && !widget.isInpatient) HeaderInSearch( From 3927c40d7e3750163f639fd3ebe691d416b0f0ef Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Mon, 26 Apr 2021 21:09:15 +0300 Subject: [PATCH 05/10] Fix Patient Profile --- .../profile/patient_profile_screen.dart | 552 +++++++++++++----- .../patient-profile-header-new-design.dart | 3 +- ...-profile-header-new-design_in_patient.dart | 5 +- 3 files changed, 396 insertions(+), 164 deletions(-) diff --git a/lib/screens/patients/profile/patient_profile_screen.dart b/lib/screens/patients/profile/patient_profile_screen.dart index 9e011ce9..4e1c288f 100644 --- a/lib/screens/patients/profile/patient_profile_screen.dart +++ b/lib/screens/patients/profile/patient_profile_screen.dart @@ -1,40 +1,54 @@ -import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; -import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/PostEpisodeReqModel.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/PatientProfileButton.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design_in_patient.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/profile_medical_info_widget.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/profile_medical_info_widget_in_patient.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/profile_medical_info_widget_search.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; - import '../../../routes.dart'; -// ignore: must_be_immutable -class PatientProfileScreen extends StatelessWidget { + +class PatientProfileScreen extends StatefulWidget { + @override + _PatientProfileScreenState createState() => _PatientProfileScreenState(); +} + +class _PatientProfileScreenState extends Statewith SingleTickerProviderStateMixin { PatiantInformtion patient; + bool isFromSearch = false; + bool isInpatient = false; + bool isDischargedPatient = false; + String patientType; + String arrivalType; + String from; + String to; + TabController _tabController; + @override + void initState() { + _tabController = TabController(length: 2,vsync:this); + super.initState(); + } + @override + void dispose() { + _tabController.dispose(); + super.dispose(); + } @override - Widget build(BuildContext context) { + void didChangeDependencies() { + super.didChangeDependencies(); final routeArgs = ModalRoute.of(context).settings.arguments as Map; - ProjectViewModel projectViewModel = Provider.of(context); - - patient = routeArgs['patient']; - String patientType = routeArgs['patientType']; - String arrivalType = routeArgs['arrivalType']; - String from = routeArgs['from']; - String to = routeArgs['to']; + patient = routeArgs['patient']; + patientType = routeArgs['patientType']; + arrivalType = routeArgs['arrivalType']; + from = routeArgs['from']; + to = routeArgs['to']; if (routeArgs.containsKey("isSearch")) { isFromSearch = routeArgs['isSearch']; } @@ -44,156 +58,370 @@ class PatientProfileScreen extends StatelessWidget { if (routeArgs.containsKey("isDischargedPatient")) { isDischargedPatient = routeArgs['isDischargedPatient']; } + } + @override + Widget build(BuildContext context) { return BaseView( builder: (_, patientViewModel, w) => AppScaffold( - baseViewModel: patientViewModel, - appBarTitle: TranslationBase.of(context).patientProfile, - isShowAppBar: false, - body: Container( - color: Color(0XFFF2F2F2), - child: Stack( - children: [ - Container( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - !isFromSearch && isInpatient /*patientType == "1"*/ - ? PatientProfileHeaderNewDesignInPatient( - patient, patientType, arrivalType) - : PatientProfileHeaderNewDesign( - patient, patientType, arrivalType), - Expanded( - child: Padding( - padding: const EdgeInsets.all(16.0), - child: SingleChildScrollView( - child: Column( - children: [ - isInpatient - ? ProfileMedicalInfoWidgetInPatient( - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - from: from, - to: to, - isInpatient: isInpatient, - isDischargedPatient: - isDischargedPatient, - ) - : isFromSearch - ? ProfileMedicalInfoWidgetSearch( - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - from: from, - to: to, - isInpatient: false, - isDischargedPatient: - isDischargedPatient, - ) - : ProfileMedicalInfoWidget( - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - from: from, - to: to, - isInpatient: isInpatient), - ], + baseViewModel: patientViewModel, + appBarTitle: TranslationBase.of(context).patientProfile, + isShowAppBar: true, + appBar: PatientProfileHeaderNewDesignAppBar(patient,arrivalType??'0',patientType), + body: SingleChildScrollView( + child: Column( + children: [ + DefaultTabController( + length: 2, + initialIndex: isInpatient ? 0 : 1, + child: SizedBox( + height: MediaQuery.of(context).size.height * 1.0, + width: double.infinity, + child: Scaffold( + appBar: AppBar( + backgroundColor: Colors.white, + toolbarHeight: 65, + elevation: 0, + bottom: TabBar( + controller: _tabController, + indicator: BoxDecoration( + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(10), // Creates border + color: Color(0xffD02126), + ), + indicatorColor: Colors.red[500], + unselectedLabelColor: Color(0xff5A6168), + labelColor: Colors.white, + tabs: [ + Container( + width: MediaQuery.of(context).size.width * 0.35, + height: MediaQuery.of(context).size.height * 0.06, + child: Center( + child: Text('Inpatient Info'), ), ), - ), - ) - ], + Container( + width: MediaQuery.of(context).size.width * 0.35, + height: MediaQuery.of(context).size.height * 0.06, + child: Center( + child: Text('OutPatient Info'), + ), + ), + ]), + ), + body: Container( + margin: EdgeInsets.only(top: 10), + child: Padding( + padding: const EdgeInsets.symmetric(vertical: 15.0,horizontal: 15), + child: TabBarView( + physics: BouncingScrollPhysics(), + controller: _tabController, + children: [ + GridView.count( + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + crossAxisSpacing: 10, + mainAxisSpacing: 10, + childAspectRatio: 1 / 1.0, + crossAxisCount: 3, + children: [ + PatientProfileButton( + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + from: from, + to: to, + nameLine1: TranslationBase.of(context).vital, + nameLine2: TranslationBase.of(context).signs, + route: VITAL_SIGN_DETAILS, + isInPatient: true, + icon: 'patient/vital_signs.png'), + PatientProfileButton( + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: LAB_RESULT, + isInPatient: true, + nameLine1: TranslationBase.of(context).lab, + nameLine2: TranslationBase.of(context).result, + icon: 'patient/lab_results.png'), + PatientProfileButton( + + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + isInPatient: isInpatient, + route: RADIOLOGY_PATIENT, + nameLine1: TranslationBase.of(context).radiology, + nameLine2: TranslationBase.of(context).result, + icon: 'patient/health_summary.png'), + PatientProfileButton( + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: ORDER_PRESCRIPTION_NEW, + nameLine1: TranslationBase.of(context).patient, + nameLine2: TranslationBase.of(context).prescription, + icon: 'patient/order_prescription.png'), + PatientProfileButton( + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: PROGRESS_NOTE, + isDischargedPatient: isDischargedPatient, + nameLine1: TranslationBase.of(context).progress, + nameLine2: TranslationBase.of(context).note, + icon: 'patient/Progress_notes.png'), + PatientProfileButton( + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: ORDER_NOTE, + isDischargedPatient: isDischargedPatient, + nameLine1: "Order", //"Text", + nameLine2: + "Sheet", //TranslationBase.of(context).orders, + icon: 'patient/Progress_notes.png'), + PatientProfileButton( + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: ORDER_PROCEDURE, + nameLine1: TranslationBase.of(context).orders, + nameLine2: TranslationBase.of(context).procedures, + icon: 'patient/Order_Procedures.png'), + PatientProfileButton( + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: MEDICAL_FILE, + nameLine1: "Health", + //TranslationBase.of(context).medicalReport, + nameLine2: "Summary", + //TranslationBase.of(context).summaryReport, + icon: 'patient/health_summary.png'), + PatientProfileButton( + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + isDisable: true, + route: MEDICAL_FILE, + nameLine1: "Medical", //Health + //TranslationBase.of(context).medicalReport, + nameLine2: "Report", //Report + //TranslationBase.of(context).summaryReport, + icon: 'patient/health_summary.png'), + PatientProfileButton( + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: REFER_IN_PATIENT_TO_DOCTOR, + isInPatient: true, + nameLine1: TranslationBase.of(context).referral, + nameLine2: TranslationBase.of(context).patient, + icon: 'patient/refer_patient.png'), + PatientProfileButton( + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: PATIENT_INSURANCE_APPROVALS_NEW, + nameLine1: TranslationBase.of(context).insurance, + nameLine2: TranslationBase.of(context).approvals, + icon: 'patient/vital_signs.png'), + PatientProfileButton( + + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + isDisable: true, + route: null, + nameLine1: "Discharge", + nameLine2: "Summery", + icon: 'patient/patient_sick_leave.png'), + PatientProfileButton( + + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: ADD_SICKLEAVE, + nameLine1: TranslationBase.of(context).patientSick, + nameLine2: TranslationBase.of(context).leave, + icon: 'patient/patient_sick_leave.png'), + ], + ), + + GridView.count( + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + crossAxisSpacing: 10, + mainAxisSpacing: 10, + childAspectRatio: 1 / 1.0, + crossAxisCount: 3, + children: [ + PatientProfileButton( + + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + from: from, + to: to, + nameLine1: TranslationBase.of(context).vital, + nameLine2: TranslationBase.of(context).signs, + route: VITAL_SIGN_DETAILS, + icon: 'patient/vital_signs.png'), + // if (selectedPatientType != 7) + PatientProfileButton( + + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: MEDICAL_FILE, + nameLine1: + "Health", //TranslationBase.of(context).medicalReport, + nameLine2: + "Summary", //TranslationBase.of(context).summaryReport, + icon: 'patient/health_summary.png'), + PatientProfileButton( + + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: LAB_RESULT, + nameLine1: TranslationBase.of(context).lab, + nameLine2: TranslationBase.of(context).result, + icon: 'patient/lab_results.png'), + // if (int.parse(patientType) == 7 || int.parse(patientType) == 6) + PatientProfileButton( + + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + isInPatient: isInpatient, + route: RADIOLOGY_PATIENT, + nameLine1: TranslationBase.of(context).radiology, + nameLine2: TranslationBase.of(context).service, + icon: 'patient/health_summary.png'), + PatientProfileButton( + + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: PATIENT_ECG, + nameLine1: TranslationBase.of(context).patient, + nameLine2: "ECG", + icon: 'patient/patient_sick_leave.png'), + PatientProfileButton( + + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: ORDER_PRESCRIPTION_NEW, + nameLine1: TranslationBase.of(context).orders, + nameLine2: TranslationBase.of(context).prescription, + icon: 'patient/order_prescription.png'), + // if (int.parse(patientType) == 7 || int.parse(patientType) == 6) + PatientProfileButton( + + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: ORDER_PROCEDURE, + nameLine1: TranslationBase.of(context).orders, + nameLine2: TranslationBase.of(context).procedures, + icon: 'patient/Order_Procedures.png'), + //if (int.parse(patientType) == 7 || int.parse(patientType) == 6) + PatientProfileButton( + + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: PATIENT_INSURANCE_APPROVALS_NEW, + nameLine1: TranslationBase.of(context).insurance, + nameLine2: TranslationBase.of(context).service, + icon: 'patient/vital_signs.png'), + // if (int.parse(patientType) == 7 || int.parse(patientType) == 6) + PatientProfileButton( + + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: ADD_SICKLEAVE, + nameLine1: TranslationBase.of(context).patientSick, + nameLine2: TranslationBase.of(context).leave, + icon: 'patient/patient_sick_leave.png'), + if (patient.appointmentNo != null && + patient.appointmentNo != 0) + PatientProfileButton( + + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: PATIENT_UCAF_REQUEST, + isDisable: + patient.patientStatusType != 43 ? true : false, + nameLine1: TranslationBase.of(context).patient, + nameLine2: TranslationBase.of(context).ucaf, + icon: 'patient/ucaf.png'), + if (patient.appointmentNo != null && + patient.appointmentNo != 0) + PatientProfileButton( + + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: REFER_PATIENT_TO_DOCTOR, + isDisable: + patient.patientStatusType != 43 ? true : false, + nameLine1: TranslationBase.of(context).referral, + nameLine2: TranslationBase.of(context).patient, + icon: 'patient/refer_patient.png'), + if (patient.appointmentNo != null && + patient.appointmentNo != 0) + PatientProfileButton( + + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: PATIENT_ADMISSION_REQUEST, + isDisable: + patient.patientStatusType != 43 ? true : false, + nameLine1: TranslationBase.of(context).admission, + nameLine2: TranslationBase.of(context).request, + icon: 'patient/admission_req.png'), + if (isInpatient) + PatientProfileButton( + + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: PROGRESS_NOTE, + nameLine1: TranslationBase.of(context).progress, + nameLine2: TranslationBase.of(context).note, + icon: 'patient/Progress_notes.png'), + if (isInpatient) + PatientProfileButton( + + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: ORDER_NOTE, + nameLine1: "Order", //"Text", + nameLine2: "Sheet", + icon: 'patient/Progress_notes.png'), + ], + ), + ], + ), + ), ), ), - if (patient.patientStatusType != null && - patient.patientStatusType == 43) - BaseView( - onModelReady: (model) async {}, - builder: (_, model, w) => Positioned( - top: 175, - left: 20, - right: 20, - child: Row( - children: [ - Expanded(child: Container()), - if (patient.episodeNo == 0) - AppButton( - title: - "${TranslationBase.of(context).createNew}\n${TranslationBase.of(context).episode}", - color: patient.patientStatusType == 43 - ? Colors.red.shade700 - : Colors.grey.shade700, - fontColor: Colors.white, - vPadding: 8, - radius: 30, - hPadding: 20, - fontWeight: FontWeight.normal, - fontSize: 1.6, - icon: Image.asset( - "assets/images/create-episod.png", - color: Colors.white, - height: 30, - ), - onPressed: () async { - if (patient.patientStatusType == 43) { - PostEpisodeReqModel - postEpisodeReqModel = - PostEpisodeReqModel( - appointmentNo: - patient.appointmentNo, - patientMRN: - patient.patientMRN); - GifLoaderDialogUtils.showMyDialog( - context); - await model.postEpisode( - postEpisodeReqModel); - GifLoaderDialogUtils.hideDialog( - context); - patient.episodeNo = model.episodeID; - Navigator.of(context).pushNamed( - CREATE_EPISODE, - arguments: { - 'patient': patient - }); - } - }, - ), - if (patient.episodeNo != 0) - AppButton( - title: - "${TranslationBase.of(context).update}\n${TranslationBase.of(context).episode}", - color: patient.patientStatusType == 43 - ? Colors.red.shade700 - : Colors.grey.shade700, - fontColor: Colors.white, - vPadding: 8, - radius: 30, - hPadding: 20, - fontWeight: FontWeight.normal, - fontSize: 1.6, - icon: Image.asset( - "assets/images/modilfy-episode.png", - color: Colors.white, - height: 30, - ), - onPressed: () { - if (patient.patientStatusType == - 43) { - Navigator.of(context).pushNamed( - UPDATE_EPISODE, - arguments: { - 'patient': patient - }); - } - }), - ], - ), - )), - ], + ), + ), - ), - )); + ], + ), + ), + )); } } diff --git a/lib/widgets/patients/profile/patient-profile-header-new-design.dart b/lib/widgets/patients/profile/patient-profile-header-new-design.dart index 27984614..b4d8ce17 100644 --- a/lib/widgets/patients/profile/patient-profile-header-new-design.dart +++ b/lib/widgets/patients/profile/patient-profile-header-new-design.dart @@ -16,10 +16,11 @@ class PatientProfileHeaderNewDesign extends StatelessWidget { final String patientType; final String arrivalType; final double height; + final bool isHaveMargin; PatientProfileHeaderNewDesign( this.patient, this.patientType, this.arrivalType, - {this.height = 0.0}); + {this.height = 0.0, this.isHaveMargin=true}); @override Widget build(BuildContext context) { diff --git a/lib/widgets/patients/profile/patient-profile-header-new-design_in_patient.dart b/lib/widgets/patients/profile/patient-profile-header-new-design_in_patient.dart index 272fc238..557f78ce 100644 --- a/lib/widgets/patients/profile/patient-profile-header-new-design_in_patient.dart +++ b/lib/widgets/patients/profile/patient-profile-header-new-design_in_patient.dart @@ -40,7 +40,7 @@ class PatientProfileHeaderNewDesignInPatient extends StatelessWidget { height: height == 0 ? 200 : height, child: Container( padding: EdgeInsets.only(left: 10, right: 10, bottom: 10), - margin: EdgeInsets.only(top: 50), + // margin: EdgeInsets.only(top: 50), child: Column( children: [ Container( @@ -121,6 +121,7 @@ class PatientProfileHeaderNewDesignInPatient extends StatelessWidget { fontWeight: FontWeight.w700), ], ), + if(patient.admissionDate!=null) Row( children: [ AppText( @@ -136,6 +137,7 @@ class PatientProfileHeaderNewDesignInPatient extends StatelessWidget { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ + if(patient.admissionDate!=null) Row( children: [ AppText( @@ -177,6 +179,7 @@ class PatientProfileHeaderNewDesignInPatient extends StatelessWidget { ) ], ), + if(patient.admissionDate!=null) Row( children: [ AppText( From 686c81463bce93664b31e627752540644a2ecda9 Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Mon, 26 Apr 2021 21:11:52 +0300 Subject: [PATCH 06/10] Fix Patient Profile --- lib/screens/sick-leave/add-sickleave.dart | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/lib/screens/sick-leave/add-sickleave.dart b/lib/screens/sick-leave/add-sickleave.dart index 444e76bd..3b05d8f4 100644 --- a/lib/screens/sick-leave/add-sickleave.dart +++ b/lib/screens/sick-leave/add-sickleave.dart @@ -188,10 +188,9 @@ class AddSickLeavScreen extends StatelessWidget { ), Flexible( child: AppText( - DateUtils - .convertStringToDateFormat( - item.startDate, - 'dd-MMM-yyyy'), + DateUtils.getDayMonthYearDateFormatted(DateUtils + .convertStringToDate( + item.startDate)), fontWeight: FontWeight.bold, ), @@ -208,10 +207,10 @@ class AddSickLeavScreen extends StatelessWidget { ), Flexible( child: AppText( - DateUtils - .convertStringToDateFormat( - item.endDate, - 'dd-MMM-yyyy'), + DateUtils.getDayMonthYearDateFormatted(DateUtils + .convertStringToDate( + item.endDate, + )), fontWeight: FontWeight.bold, ), From 50a240122da93f0148019950eb69b4442ee8386f Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Mon, 26 Apr 2021 21:35:46 +0300 Subject: [PATCH 07/10] fix date issue --- lib/screens/home/home_screen.dart | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/screens/home/home_screen.dart b/lib/screens/home/home_screen.dart index 53a338a9..1435c942 100644 --- a/lib/screens/home/home_screen.dart +++ b/lib/screens/home/home_screen.dart @@ -545,6 +545,12 @@ class _HomeScreenState extends State { ), hasBorder: false, onTap: () { + + String date = DateUtils.convertDateToFormat( + DateTime(DateTime.now().year, DateTime.now().month, + DateTime.now().day ), + 'yyyy-MM-dd'); + Navigator.push( context, MaterialPageRoute( @@ -553,7 +559,7 @@ class _HomeScreenState extends State { isSearch: false, isInpatient: false, patientSearchRequestModel: - PatientSearchRequestModel(), + PatientSearchRequestModel(from: date, to: date), selectedPatientType: PatientType.OutPatient, isSearchWithKeyInfo: false, From b6e698d4e47c329a6a2c73df4b4c92ef2f9b37b4 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Mon, 26 Apr 2021 21:38:27 +0300 Subject: [PATCH 08/10] fix header --- .../patient_search/patients_screen_new.dart | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/lib/screens/patients/patient_search/patients_screen_new.dart b/lib/screens/patients/patient_search/patients_screen_new.dart index bd2920dc..1e5f7339 100644 --- a/lib/screens/patients/patient_search/patients_screen_new.dart +++ b/lib/screens/patients/patient_search/patients_screen_new.dart @@ -93,7 +93,12 @@ class _PatientsScreenNewState extends State { }, builder: (_, model, w) => AppScaffold( appBarTitle: "Search Patient", - isShowAppBar: false, + isShowAppBar: true, + appBar: !widget.isSearch && !widget.isInpatient?HeaderInSearch( + title: "My Out patient", + ):HeaderInSearch( + title: "Search for ${widget.searchKey}", + ), baseViewModel: model, body: Container( color: Colors.grey[200], @@ -103,14 +108,6 @@ class _PatientsScreenNewState extends State { Container( child: Column( children: [ - if(widget.isSearch) - HeaderInSearch( - title: "Search for ${widget.searchKey}", - ), - if(!widget.isSearch && !widget.isInpatient) - HeaderInSearch( - title: "My Out patient", - ), if(!widget.isInpatient) Container( // color: Colors.red, From f4fd4b26d627bcb7798d318c4b2ef799daee8b8a Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Mon, 26 Apr 2021 21:41:41 +0300 Subject: [PATCH 09/10] Add filter in outpatient --- .../viewModel/PatientSearchViewModel.dart | 33 ++++++++++++++++--- .../patient_search/patients_screen_new.dart | 4 +-- .../profile/patient_profile_screen.dart | 20 ----------- 3 files changed, 31 insertions(+), 26 deletions(-) diff --git a/lib/core/viewModel/PatientSearchViewModel.dart b/lib/core/viewModel/PatientSearchViewModel.dart index 45b73329..816918cd 100644 --- a/lib/core/viewModel/PatientSearchViewModel.dart +++ b/lib/core/viewModel/PatientSearchViewModel.dart @@ -19,6 +19,32 @@ class PatientSearchViewModel extends BaseViewModel{ List get patientList => _outPatientService.patientList; + List filterData = []; + + searchData(String str) { + var strExist = str.length > 0 ? true : false; + if (strExist) { + filterData = []; + for (var i = 0; i < _outPatientService.patientList.length; i++) { + String firstName = _outPatientService.patientList[i].firstName.toUpperCase(); + String lastName = _outPatientService.patientList[i].lastName.toUpperCase(); + String mobile = _outPatientService.patientList[i].mobileNumber.toUpperCase(); + String patientID = _outPatientService.patientList[i].patientId.toString(); + + if (firstName.contains(str.toUpperCase()) || + lastName.contains(str.toUpperCase()) || + mobile.contains(str) || + patientID.contains(str)) { + filterData.add(_outPatientService.patientList[i]); + } + } + notifyListeners(); + } else { + filterData = _outPatientService.patientList; + notifyListeners(); + } + } + getOutPatient(PatientSearchRequestModel patientSearchRequestModel , {bool isLocalBusy = false}) async { if(isLocalBusy) { setState(ViewState.BusyLocal); @@ -37,6 +63,7 @@ class PatientSearchViewModel extends BaseViewModel{ } setState(ViewState.Error); } else { + filterData = _outPatientService.patientList; setState(ViewState.Idle); } } @@ -49,6 +76,7 @@ class PatientSearchViewModel extends BaseViewModel{ error = _outPatientService.error; setState(ViewState.Error); } else { + filterData = _outPatientService.patientList; setState(ViewState.Idle); } } @@ -103,12 +131,9 @@ class PatientSearchViewModel extends BaseViewModel{ if(isSearchWithKeyInfo) { await getPatientFileInformation(currentModel); } else { - if(selectedPatientType == PatientType.OutPatient) { await getOutPatient(currentModel, isLocalBusy: true); - } else { - // TODO handel inPatient case } - } + filterData = _outPatientService.patientList; } diff --git a/lib/screens/patients/patient_search/patients_screen_new.dart b/lib/screens/patients/patient_search/patients_screen_new.dart index bd2920dc..ade1e47e 100644 --- a/lib/screens/patients/patient_search/patients_screen_new.dart +++ b/lib/screens/patients/patient_search/patients_screen_new.dart @@ -219,10 +219,10 @@ class _PatientsScreenNewState extends State { height: 10.0, ), Container( - child: (model.patientList.isNotEmpty) + child: model.patientList.isNotEmpty ? Column( // mainAxisAlignment: MainAxisAlignment.center, - children: model.patientList + children: model.filterData .map((PatiantInformtion item) { return PatientCard( diff --git a/lib/screens/patients/profile/patient_profile_screen.dart b/lib/screens/patients/profile/patient_profile_screen.dart index 4e1c288f..9cb8a0d4 100644 --- a/lib/screens/patients/profile/patient_profile_screen.dart +++ b/lib/screens/patients/profile/patient_profile_screen.dart @@ -378,7 +378,6 @@ class _PatientProfileScreenState extends Statewith SingleT if (patient.appointmentNo != null && patient.appointmentNo != 0) PatientProfileButton( - patient: patient, patientType: patientType, arrivalType: arrivalType, @@ -388,26 +387,7 @@ class _PatientProfileScreenState extends Statewith SingleT nameLine1: TranslationBase.of(context).admission, nameLine2: TranslationBase.of(context).request, icon: 'patient/admission_req.png'), - if (isInpatient) - PatientProfileButton( - - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: PROGRESS_NOTE, - nameLine1: TranslationBase.of(context).progress, - nameLine2: TranslationBase.of(context).note, - icon: 'patient/Progress_notes.png'), - if (isInpatient) - PatientProfileButton( - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: ORDER_NOTE, - nameLine1: "Order", //"Text", - nameLine2: "Sheet", - icon: 'patient/Progress_notes.png'), ], ), ], From 85288cc01413bad45608d309f2b06937db0d170d Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Mon, 26 Apr 2021 21:58:04 +0300 Subject: [PATCH 10/10] Add filter in outpatient --- .../patients/patient_search/header.dart | 8 +- .../patient_search/patients_screen_new.dart | 2 +- lib/widgets/patients/PatientCard.dart | 202 +++++++++--------- 3 files changed, 106 insertions(+), 106 deletions(-) diff --git a/lib/screens/patients/patient_search/header.dart b/lib/screens/patients/patient_search/header.dart index eb404e70..0fbcdf1a 100644 --- a/lib/screens/patients/patient_search/header.dart +++ b/lib/screens/patients/patient_search/header.dart @@ -2,7 +2,7 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; -class HeaderInSearch extends StatelessWidget { +class HeaderInSearch extends StatelessWidget with PreferredSizeWidget { final String title; const HeaderInSearch({Key key, this.title}) : super(key: key); @@ -16,7 +16,7 @@ class HeaderInSearch extends StatelessWidget { ), child: Container( padding: EdgeInsets.only(left: 10, right: 10, bottom: 10), - margin: EdgeInsets.only(top: 50), + margin: EdgeInsets.only(top: 35), child: Row(children: [ IconButton( icon: Icon(Icons.arrow_back_ios), @@ -36,4 +36,8 @@ class HeaderInSearch extends StatelessWidget { ), ); } + + @override + + Size get preferredSize => Size(double.maxFinite,65); } diff --git a/lib/screens/patients/patient_search/patients_screen_new.dart b/lib/screens/patients/patient_search/patients_screen_new.dart index e4e1ed4c..8786bc48 100644 --- a/lib/screens/patients/patient_search/patients_screen_new.dart +++ b/lib/screens/patients/patient_search/patients_screen_new.dart @@ -206,7 +206,7 @@ class _PatientsScreenNewState extends State { bottom: 30), ), onChanged: (String str) { - // this.searchData(str); + model.searchData(str); }), ])), SizedBox( diff --git a/lib/widgets/patients/PatientCard.dart b/lib/widgets/patients/PatientCard.dart index 43a4b79d..f7f39d95 100644 --- a/lib/widgets/patients/PatientCard.dart +++ b/lib/widgets/patients/PatientCard.dart @@ -35,18 +35,18 @@ class PatientCard extends StatelessWidget { color: Colors.white, ), child: Stack(children: [ - // if (SERVICES_PATIANT2[int.parse(patientType)] != "List_MyInPatient") - // Container( - // height: MediaQuery.of(context).size.height * .20, - // width: 5, - // decoration: BoxDecoration( - // borderRadius: BorderRadius.only( - // topLeft: Radius.circular(10), - // bottomLeft: Radius.circular(10)), - // color: patientInfo.patientStatusType == 43 - // ? Colors.green[500] - // : Colors.red[800], - // )), + if (isInpatient) + Container( + height: MediaQuery.of(context).size.height * .20, + width: 5, + decoration: BoxDecoration( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(10), + bottomLeft: Radius.circular(10)), + color: patientInfo.patientStatusType == 43 + ? Colors.green[500] + : Colors.red[800], + )), Container( padding: EdgeInsets.only(left: 10, right: 0, bottom: 0), child: InkWell( @@ -55,48 +55,47 @@ class PatientCard extends StatelessWidget { SizedBox( height: 10, ), - // SERVICES_PATIANT2[int.parse(patientType)] == - // "List_MyOutPatient" - // ? Padding( - // padding: EdgeInsets.only(left: 12.0), - // child: Row( - // mainAxisAlignment: MainAxisAlignment.spaceBetween, - // children: [ - // patientInfo.patientStatusType == 43 - // ? AppText( - // TranslationBase.of(context).arrivedP, - // color: Colors.green, - // fontWeight: FontWeight.bold, - // fontFamily: 'Poppins', - // fontSize: 12, - // ) - // : AppText( - // TranslationBase.of(context).notArrived, - // color: Colors.red[800], - // fontWeight: FontWeight.bold, - // fontFamily: 'Poppins', - // fontSize: 12, - // ), - // this.arrivalType == '1' - // ? AppText( - // patientInfo.startTime != null - // ? patientInfo.startTime - // : patientInfo.startTimes, - // fontFamily: 'Poppins', - // fontWeight: FontWeight.w600, - // ) - // : patientInfo.arrivedOn != null - // ? AppText( - // DateUtils.convertStringToDateFormat( - // patientInfo.arrivedOn, - // 'MM-dd-yyyy HH:mm'), - // fontFamily: 'Poppins', - // fontWeight: FontWeight.w600, - // ) - // : SizedBox() - // ], - // )) - // : SizedBox(), + !isInpatient + ? Padding( + padding: EdgeInsets.only(left: 12.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + patientInfo.patientStatusType == 43 + ? AppText( + TranslationBase.of(context).arrivedP, + color: Colors.green, + fontWeight: FontWeight.bold, + fontFamily: 'Poppins', + fontSize: 12, + ) + : AppText( + TranslationBase.of(context).notArrived, + color: Colors.red[800], + fontWeight: FontWeight.bold, + fontFamily: 'Poppins', + fontSize: 12, + ), + this.arrivalType == '1' + ? AppText( + patientInfo.startTime != null + ? patientInfo.startTime + : patientInfo.startTimes, + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + ) + : patientInfo.arrivedOn != null + ? AppText( + DateUtils.getDayMonthYearDateFormatted(DateUtils.convertStringToDate( + patientInfo.arrivedOn, + )), + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + ) + : SizedBox() + ], + )) + : SizedBox(), Padding( padding: EdgeInsets.only(left: 12.0), child: Row( @@ -213,33 +212,32 @@ class PatientCard extends StatelessWidget { ), ), ), - // if (SERVICES_PATIANT2[int.parse(patientType)] != - // "List_MyInPatient") - // Container( - // child: RichText( - // text: new TextSpan( - // style: new TextStyle( - // fontSize: 2.0 * SizeConfig.textMultiplier, - // color: Colors.black, - // fontFamily: 'Poppins', - // ), - // children: [ - // new TextSpan( - // text: - // TranslationBase.of(context).age + - // " : ", - // style: TextStyle(fontSize: 14)), - // new TextSpan( - // text: - // "${DateUtils.getAgeByBirthday(patientInfo.dateofBirth, context)}", - // style: TextStyle( - // fontWeight: FontWeight.w700, - // fontSize: 15)), - // ], - // ), - // ), - // ), - if (isInpatient == true) + if (isInpatient) + Container( + child: RichText( + text: new TextSpan( + style: new TextStyle( + fontSize: 2.0 * SizeConfig.textMultiplier, + color: Colors.black, + fontFamily: 'Poppins', + ), + children: [ + new TextSpan( + text: + TranslationBase.of(context).age + + " : ", + style: TextStyle(fontSize: 14)), + new TextSpan( + text: + "${DateUtils.getAgeByBirthday(patientInfo.dateofBirth, context)}", + style: TextStyle( + fontWeight: FontWeight.w700, + fontSize: 15)), + ], + ), + ), + ), + if (isInpatient ) Container( child: RichText( text: new TextSpan( @@ -370,28 +368,26 @@ class PatientCard extends StatelessWidget { //) ])) ]), - // SERVICES_PATIANT2[int.parse(patientType)] == - // "List_MyOutPatient" - // ? Row( - // mainAxisAlignment: MainAxisAlignment.end, - // children: [ - // Container( - // padding: EdgeInsets.all(4), - // child: Image.asset( - // patientInfo.appointmentType == - // 'Regular' && - // patientInfo.visitTypeId == 100 - // ? 'assets/images/livecare.png' - // : patientInfo.appointmentType == - // 'Walkin' - // ? 'assets/images/walkin.png' - // : 'assets/images/booked.png', - // height: 25, - // width: 35, - // )), - // ]) - // : - (isInpatient == true) + !isInpatient + ? Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Container( + padding: EdgeInsets.all(4), + child: Image.asset( + patientInfo.appointmentType == + 'Regular' && + patientInfo.visitTypeId == 100 + ? 'assets/images/livecare.png' + : patientInfo.appointmentType == + 'Walkin' + ? 'assets/images/walkin.png' + : 'assets/images/booked.png', + height: 25, + width: 35, + )), + ]) + : (isInpatient == true) ? Row( mainAxisAlignment: MainAxisAlignment.end, children: [