diff --git a/lib/screens/prescription/add_prescription/add_drug_widget.dart b/lib/screens/prescription/add_prescription/add_drug_widget.dart index 67970691..00a5a841 100644 --- a/lib/screens/prescription/add_prescription/add_drug_widget.dart +++ b/lib/screens/prescription/add_prescription/add_drug_widget.dart @@ -13,9 +13,8 @@ import '../../../core/model/search_drug/get_medication_response_model.dart'; import '../../../core/viewModel/prescription_view_model.dart'; import '../../../util/dr_app_toast_msg.dart'; import '../../../util/helpers.dart'; -import '../../../widgets/shared/buttons/app_buttons_widget.dart'; import '../../patients/profile/soap_update/shared_soap_widgets/bottom_sheet_dialog_button.dart'; -import 'drugtodrug.dart'; +import 'drug_to_drug.dart'; class AddDrugWidget extends StatefulWidget { final PatiantInformtion patient; diff --git a/lib/screens/prescription/add_prescription/add_prescription_form.dart b/lib/screens/prescription/add_prescription/add_prescription.dart similarity index 96% rename from lib/screens/prescription/add_prescription/add_prescription_form.dart rename to lib/screens/prescription/add_prescription/add_prescription.dart index ba283b1a..ab32b9f5 100644 --- a/lib/screens/prescription/add_prescription/add_prescription_form.dart +++ b/lib/screens/prescription/add_prescription/add_prescription.dart @@ -13,19 +13,19 @@ import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:flutter/material.dart'; import 'package:speech_to_text/speech_to_text.dart' as stt; -class AddPrescriptionForm extends StatefulWidget { +class AddPrescription extends StatefulWidget { final PrescriptionViewModel prescriptionViewModel; final PatiantInformtion patient; final List prescriptionList; - AddPrescriptionForm( + AddPrescription( this.prescriptionViewModel, this.patient, this.prescriptionList); @override - _AddPrescriptionFormState createState() => _AddPrescriptionFormState(); + _AddPrescriptionState createState() => _AddPrescriptionState(); } -class _AddPrescriptionFormState extends State { +class _AddPrescriptionState extends State { String routeError; String frequencyError; String doseTimeError; diff --git a/lib/screens/prescription/add_prescription/drugtodrug.dart b/lib/screens/prescription/add_prescription/drug_to_drug.dart similarity index 100% rename from lib/screens/prescription/add_prescription/drugtodrug.dart rename to lib/screens/prescription/add_prescription/drug_to_drug.dart diff --git a/lib/screens/prescription/prescription_item_in_patient_page.dart b/lib/screens/prescription/prescriptions_items/prescription_items_in_patient.dart similarity index 100% rename from lib/screens/prescription/prescription_item_in_patient_page.dart rename to lib/screens/prescription/prescriptions_items/prescription_items_in_patient.dart diff --git a/lib/screens/prescription/prescription_items_page.dart b/lib/screens/prescription/prescriptions_items/prescription_items_out_patient.dart similarity index 100% rename from lib/screens/prescription/prescription_items_page.dart rename to lib/screens/prescription/prescriptions_items/prescription_items_out_patient.dart diff --git a/lib/screens/prescription/prescriptions_page.dart b/lib/screens/prescription/prescriptions_page.dart index 8ae6148e..72d45d46 100644 --- a/lib/screens/prescription/prescriptions_page.dart +++ b/lib/screens/prescription/prescriptions_page.dart @@ -2,8 +2,8 @@ import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/prescription_view_model.dart'; import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; -import 'package:doctor_app_flutter/screens/prescription/prescription_item_in_patient_page.dart'; -import 'package:doctor_app_flutter/screens/prescription/prescription_items_page.dart'; +import 'package:doctor_app_flutter/screens/prescription/prescriptions_items/prescription_items_in_patient.dart'; +import 'package:doctor_app_flutter/screens/prescription/prescriptions_items/prescription_items_out_patient.dart'; import 'package:doctor_app_flutter/screens/procedures/ProcedureType.dart'; import 'package:doctor_app_flutter/screens/procedures/base_add_procedure_tab_page.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; @@ -21,6 +21,7 @@ import 'package:doctor_app_flutter/widgets/transitions/slide_up_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import '../../util/helpers.dart'; import '../../widgets/shared/errors/error_message.dart'; class PrescriptionsPage extends StatelessWidget { @@ -112,8 +113,7 @@ class PrescriptionsPage extends StatelessWidget { context, FadePage( page: PrescriptionItemsPage( - prescriptions: - model.prescriptionsList[index], + prescriptions: model.prescriptionsList[index], patient: patient, patientType: patientType, arrivalType: arrivalType, @@ -124,7 +124,7 @@ class PrescriptionsPage extends StatelessWidget { children: [ DoctorCard( doctorName: - model.prescriptionsList[index].doctorName, + Helpers.convertToTitleCase(model.prescriptionsList[index].doctorName), profileUrl: model .prescriptionsList[index].doctorImageURL, branch: model.prescriptionsList[index].name, diff --git a/lib/screens/procedures/ExpansionProcedure.dart b/lib/screens/procedures/ExpansionProcedure.dart index 228ca33e..b0593b06 100644 --- a/lib/screens/procedures/ExpansionProcedure.dart +++ b/lib/screens/procedures/ExpansionProcedure.dart @@ -1,4 +1,5 @@ import 'package:doctor_app_flutter/client/base_app_client.dart'; +import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/model/procedure/procedure_templateModel.dart'; import 'package:doctor_app_flutter/core/model/procedure/procedure_template_details_model.dart'; import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart'; @@ -59,14 +60,16 @@ class _ExpansionProcedureState extends State { Radius.circular(5.0), )), child: Row( + crossAxisAlignment: CrossAxisAlignment.start, children: [ Expanded( child: Row( - children: [ + crossAxisAlignment: CrossAxisAlignment.start, + children: [ Icon( Icons.folder, size: 20, - color: Color(0xff575757), + color: AppGlobal.appTextColor, ), Expanded( child: Padding( @@ -78,10 +81,12 @@ class _ExpansionProcedureState extends State { widget.procedureTempleteModel.templateName : "Prescription for " + widget.procedureTempleteModel.templateName, + letterSpacing: -0.72, fontSize: 16.0, - variant: "bodyText", - bold: true, - color: Color(0xff575757)), + color: AppGlobal.appTextColor, + fontWeight: FontWeight.w600, + ), + ), ), ], @@ -93,8 +98,8 @@ class _ExpansionProcedureState extends State { _isShowMore ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down, - color: Colors.grey[800], - size: 22, + color: AppGlobal.appTextColor, + size: 28, ), ) ], diff --git a/lib/screens/procedures/base_add_procedure_tab_page.dart b/lib/screens/procedures/base_add_procedure_tab_page.dart index 271baff9..b8d1605d 100644 --- a/lib/screens/procedures/base_add_procedure_tab_page.dart +++ b/lib/screens/procedures/base_add_procedure_tab_page.dart @@ -1,17 +1,13 @@ -import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/prescription_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart'; import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.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/prescription/add_prescription/add_prescription_form.dart'; +import 'package:doctor_app_flutter/screens/prescription/add_prescription/add_prescription.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/network_base_view.dart'; -import 'package:doctor_app_flutter/widgets/shared/text_fields/text_fields_utils.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; - import '../../core/viewModel/project_view_model.dart'; import '../../util/tab_helper.dart'; import 'ProcedureType.dart'; @@ -132,7 +128,7 @@ class _BaseAddProcedureTabPageState extends State ), if (widget.procedureType == ProcedureType.PRESCRIPTION) - AddPrescriptionForm( + AddPrescription( widget.prescriptionModel, widget.patient, widget.prescriptionModel.prescriptionList, diff --git a/lib/screens/procedures/entity_list_fav_procedure.dart b/lib/screens/procedures/entity_list_fav_procedure.dart index a9fa5ddf..4c8308f4 100644 --- a/lib/screens/procedures/entity_list_fav_procedure.dart +++ b/lib/screens/procedures/entity_list_fav_procedure.dart @@ -7,8 +7,10 @@ import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import '../../config/config.dart'; +import '../../widgets/shared/text_fields/app_text_field_custom_serach.dart'; import 'ExpansionProcedure.dart'; class EntityListCheckboxSearchFavProceduresWidget extends StatefulWidget { @@ -75,6 +77,8 @@ class _EntityListCheckboxSearchFavProceduresWidgetState } TextEditingController remarksController = TextEditingController(); + TextEditingController patientFileInfoController = TextEditingController(); + @override Widget build(BuildContext context) { @@ -91,14 +95,30 @@ class _EntityListCheckboxSearchFavProceduresWidgetState color: Colors.white), child: ListView( children: [ - TextFields( - hintText: 'Search Favourite templates', - suffixIcon: EvaIcons.search, - suffixIconColor: Color(0xff2B353E), - onChanged: (value) { + // TextFields( + // hintText: 'Search Favourite templates', + // suffixIcon: EvaIcons.search, + // suffixIconColor: Color(0xff2B353E), + // onChanged: (value) { + // filterSearchResults(value); + // }, + // hasBorder: false, + // ), + + AppTextFieldCustomSearch( + searchController: patientFileInfoController, + onChangeFun: (value) { filterSearchResults(value); }, - hasBorder: false, + marginTop: 5, + inputFormatters: [ + FilteringTextInputFormatter.allow( + RegExp(ONLY_LETTERS)) + ], + inputType: TextInputType.text, + hintText: 'Search Favourite templates', + // validationError: TranslationBase.of(context).emptyMessage + // : null, ), SizedBox( height: 15, diff --git a/lib/widgets/shared/doctor_card.dart b/lib/widgets/shared/doctor_card.dart index cc54330c..d4f34326 100644 --- a/lib/widgets/shared/doctor_card.dart +++ b/lib/widgets/shared/doctor_card.dart @@ -3,11 +3,14 @@ import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/large_avatar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/user-guid/CusomRow.dart'; import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; +import '../../config/size_config.dart'; + class DoctorCard extends StatelessWidget { final String doctorName; final String branch; @@ -140,43 +143,22 @@ class DoctorCard extends StatelessWidget { ], ), if (clinic != null) - Row( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).clinic + - ": ", - color: Colors.grey[500], - fontSize: 14, - ), - Expanded( - child: AppText( - clinic, - fontSize: 14, - ), - ) - ], + CustomRow( + label: TranslationBase.of(context).clinic + + ": ", + value: clinic, + valueSize: 13, + labelSize: 13, ), if (branch != null) - Row( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).branch + - ": ", - fontSize: 14, - color: Colors.grey[500], - ), - Expanded( - child: AppText( - branch, - fontSize: 14, - ), - ) - ], - ) + CustomRow( + label: TranslationBase.of(context).branch + + ": ", + value: branch, + valueSize: 13, + labelSize: 13, + ), + ]), ), ),