diff --git a/lib/core/viewModel/labs_view_model.dart b/lib/core/viewModel/labs_view_model.dart index 592b9c90..2ddd70d1 100644 --- a/lib/core/viewModel/labs_view_model.dart +++ b/lib/core/viewModel/labs_view_model.dart @@ -96,10 +96,6 @@ class LabsViewModel extends BaseViewModel { List labResultLists = List(); - List get labResultListsCoustom { - return labResultLists; - } - getLaboratoryResult( {String projectID, int clinicID, diff --git a/lib/routes.dart b/lib/routes.dart index b4d2c171..b97aece0 100644 --- a/lib/routes.dart +++ b/lib/routes.dart @@ -9,7 +9,7 @@ import 'package:doctor_app_flutter/screens/patients/profile/admission-orders/adm import 'package:doctor_app_flutter/screens/patients/profile/diabetic_chart/diabetic_chart.dart'; import 'package:doctor_app_flutter/screens/patients/profile/diagnosis/diagnosis_screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/discharge_summary/discharge_summary.dart'; -import 'package:doctor_app_flutter/screens/patients/profile/lab_result/all_lab_special_result_page.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/lab_result/special_result/all_lab_special_result_page.dart'; import 'package:doctor_app_flutter/screens/patients/profile/lab_result/labs_home_page.dart'; import 'package:doctor_app_flutter/screens/patients/profile/medical_report/AddVerifyMedicalReport.dart'; import 'package:doctor_app_flutter/screens/patients/profile/medical_report/MedicalReportDetailPage.dart'; diff --git a/lib/screens/patients/profile/lab_result/LabResultHistoryPage.dart b/lib/screens/patients/profile/lab_result/LabResultHistoryPage.dart deleted file mode 100644 index 832af648..00000000 --- a/lib/screens/patients/profile/lab_result/LabResultHistoryPage.dart +++ /dev/null @@ -1,163 +0,0 @@ -import 'package:doctor_app_flutter/config/size_config.dart'; -import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart'; -import 'package:doctor_app_flutter/core/viewModel/labs_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/utils/translations_delegate_base_utils.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/errors/error_message.dart'; -import 'package:flutter/material.dart'; - -class LabResultHistoryPage extends StatelessWidget { - final PatientLabOrders patientLabOrder; - final String filterName; - final PatiantInformtion patient; - - LabResultHistoryPage({this.patientLabOrder, this.filterName, this.patient}); - -// TODO Elham* UI changes and add translation - @override - Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => model.getPatientLabResultHistoryByDescription( - patientLabOrder: patientLabOrder, - procedureDescription: filterName, - patient: patient), - builder: (context, model, w) => AppScaffold( - isShowAppBar: true, - appBarTitle: filterName, - baseViewModel: model, - body: model.labOrdersResultHistoryList.length > 0 - ? SingleChildScrollView( - child: Column( - children: [ - ...List.generate(model.labOrdersResultHistoryList.length, - (index) { - return Container( - margin: EdgeInsets.symmetric( - vertical: 8.0, horizontal: 16.0), - child: Column( - children: [ - Row( - children: [ - AppText( - TranslationBase.of(context).description, - fontSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 3, - color: Color(0xFF575757), - fontWeight: FontWeight.w600, - ), - SizedBox( - width: 1, - ), - AppText( - model.labOrdersResultHistoryList[index] - .description, - fontSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 3.5, - color: Color(0xFF2E303A), - fontWeight: FontWeight.w700, - isCopyable: true, - ), - ], - ), - Row( - children: [ - AppText( - "Reference Range", - fontSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 3, - color: Color(0xFF575757), - fontWeight: FontWeight.w600, - ), - SizedBox( - width: 1, - ), - AppText( - model.labOrdersResultHistoryList[index] - .referanceRange, - fontSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 3.5, - color: Color(0xFF2E303A), - fontWeight: FontWeight.w700, - isCopyable: true, - ), - ], - ), - Row( - children: [ - AppText( - "Result Value", - fontSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 3, - color: Color(0xFF575757), - fontWeight: FontWeight.w600, - ), - SizedBox( - width: 1, - ), - AppText( - model.labOrdersResultHistoryList[index] - .resultValue, - fontSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 3.5, - color: Color(0xFF2E303A), - fontWeight: FontWeight.w700, - isCopyable: true, - ), - ], - ), - Row( - children: [ - AppText( - "Verified On", - fontSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 3, - color: Color(0xFF575757), - fontWeight: FontWeight.w600, - ), - SizedBox( - width: 1, - ), - AppText( - model.labOrdersResultHistoryList[index] - .verifiedOn, - fontSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 3.5, - color: Color(0xFF2E303A), - fontWeight: FontWeight.w700, - isCopyable: true, - ), - ], - ), - Divider( - color: Colors.grey, - height: 0.75, - thickness: 0.75, - ), - SizedBox( - height: 10, - ), - ], - ), - ); - }), - ], - ), - ) - : ErrorMessage( - error: "No data", - ), - ), - ); - } -} diff --git a/lib/screens/patients/profile/lab_result/LineChartCurved.dart b/lib/screens/patients/profile/lab_result/LineChartCurved.dart deleted file mode 100644 index 6e47e466..00000000 --- a/lib/screens/patients/profile/lab_result/LineChartCurved.dart +++ /dev/null @@ -1,232 +0,0 @@ -import 'package:doctor_app_flutter/config/size_config.dart'; -import 'package:doctor_app_flutter/utils/date-utils.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; -import 'package:fl_chart/fl_chart.dart'; -import 'package:flutter/material.dart'; - -import '../../../../core/model/labs/LabOrderResult.dart'; - -class LineChartCurved extends StatefulWidget { - final String title; - final List labResult; - - LineChartCurved({this.title, this.labResult}); - - @override - State createState() => LineChartCurvedState(); -} - -class LineChartCurvedState extends State { - bool isShowingMainData; - List xAxixs = List(); - int indexes = 0; - - @override - void initState() { - super.initState(); - getXaxix(); - isShowingMainData = true; - } - - getXaxix() { - indexes = widget.labResult.length ~/ 3.5; - for (int index = 0; index < widget.labResult.length; index++) { - int mIndex = indexes * index; - if (mIndex < widget.labResult.length) { - xAxixs.add(mIndex); - } - } - } - - @override - Widget build(BuildContext context) { - return AspectRatio( - aspectRatio: 1.23, - child: Container( - decoration: const BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(18)), - // color: Colors.white, - ), - child: Stack( - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - const SizedBox( - height: 4, - ), - AppText( - widget.title, - fontSize: SizeConfig.textMultiplier * 2.1, - fontWeight: FontWeight.bold, - fontFamily: 'Poppins', - textAlign: TextAlign.center, - ), - Expanded( - child: Padding( - padding: const EdgeInsets.only(right: 16.0, left: 8.0), - child: LineChart( - sampleData1(), - swapAnimationDuration: const Duration(milliseconds: 250), - ), - ), - ), - const SizedBox( - height: 10, - ), - ], - ), - ], - ), - ), - ); - } - - LineChartData sampleData1() { - return LineChartData( - lineTouchData: LineTouchData( - touchTooltipData: LineTouchTooltipData( - tooltipBgColor: Colors.white, - ), - touchCallback: (LineTouchResponse touchResponse) {}, - handleBuiltInTouches: true, - ), - gridData: FlGridData( - show: true, drawVerticalLine: true, drawHorizontalLine: true), - titlesData: FlTitlesData( - bottomTitles: SideTitles( - showTitles: true, - getTextStyles: (context, value) { - return TextStyle( - color: Colors.black, - fontSize: 10, - ); - }, - margin: 28, - rotateAngle: -65, - getTitles: (value) { - print(value); - DateTime date = AppDateUtils.convertStringToDate( - widget.labResult[value.toInt()].verifiedOnDateTime); - if (widget.labResult.length < 8) { - if (widget.labResult.length > value.toInt()) { - return '${date.day}/ ${date.year}'; - } else - return ''; - } else { - if (value.toInt() == 0) return '${date.day}/ ${date.year}'; - if (value.toInt() == widget.labResult.length - 1) - return '${date.day}/ ${date.year}'; - if (xAxixs.contains(value.toInt())) { - return '${date.day}/ ${date.year}'; - } - } - - return ''; - }, - ), - leftTitles: SideTitles( - showTitles: true, - getTextStyles: (context, value) { - return TextStyle( - color: Colors.black, - fontSize: 10, - ); - }, - getTitles: (value) { - return '${value.toInt()}'; - }, - margin: 8, - //reservedSize: 30, - ), - ), - borderData: FlBorderData( - show: true, - border: const Border( - bottom: BorderSide( - color: Colors.black, - width: 0.5, - ), - left: BorderSide( - color: Colors.black, - ), - right: BorderSide( - color: Colors.black, - ), - top: BorderSide( - color: Colors.transparent, - ), - ), - ), - minX: 0, - maxX: (widget.labResult.length - 1).toDouble(), - maxY: getMaxY() + 2, - minY: getMinY(), - lineBarsData: getData(), - ); - } - - double getMaxY() { - double max = 0; - widget.labResult.forEach((element) { - try { - double resultValueDouble = double.parse(element.resultValue); - if (resultValueDouble > max) max = resultValueDouble; - } catch (e) { - print(e); - } - }); - - return max.roundToDouble(); - } - - double getMinY() { - double min = 0; - try { - min = double.parse(widget.labResult[0].resultValue); - - widget.labResult.forEach((element) { - double resultValueDouble = double.parse(element.resultValue); - if (resultValueDouble < min) min = resultValueDouble; - }); - } catch (e) { - print(e); - } - int value = min.toInt(); - - return value.toDouble(); - } - - List getData() { - List spots = List(); - for (int index = 0; index < widget.labResult.length; index++) { - try { - var resultValueDouble = - double.parse(widget.labResult[index].resultValue); - spots.add(FlSpot(index.toDouble(), resultValueDouble)); - } catch (e) { - print(e); - spots.add(FlSpot(index.toDouble(), 0.0)); - } - } - - final LineChartBarData lineChartBarData1 = LineChartBarData( - spots: spots, - isCurved: true, - colors: [Colors.red], - barWidth: 3, - isStrokeCapRound: true, - curveSmoothness: 0.12, - dotData: FlDotData( - show: false, - ), - belowBarData: BarAreaData( - show: false, - ), - ); - - return [ - lineChartBarData1, - ]; - } -} diff --git a/lib/screens/patients/profile/lab_result/lab_result_history_chart_and_detials.dart b/lib/screens/patients/profile/lab_result/history/lab_result_history_chart_and_detials.dart similarity index 95% rename from lib/screens/patients/profile/lab_result/lab_result_history_chart_and_detials.dart rename to lib/screens/patients/profile/lab_result/history/lab_result_history_chart_and_detials.dart index 168ff176..474c92bd 100644 --- a/lib/screens/patients/profile/lab_result/lab_result_history_chart_and_detials.dart +++ b/lib/screens/patients/profile/lab_result/history/lab_result_history_chart_and_detials.dart @@ -4,8 +4,8 @@ import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; -import 'Lab_Result_history_details_wideget.dart'; -import 'LineChartCurvedLabHistory.dart'; +import 'lab_result_history_details_wideget.dart'; +import 'line_chart_curved_lab_history.dart'; class LabResultHistoryChartAndDetails extends StatelessWidget { LabResultHistoryChartAndDetails({ diff --git a/lib/screens/patients/profile/lab_result/Lab_Result_history_details_wideget.dart b/lib/screens/patients/profile/lab_result/history/lab_result_history_details_wideget.dart similarity index 100% rename from lib/screens/patients/profile/lab_result/Lab_Result_history_details_wideget.dart rename to lib/screens/patients/profile/lab_result/history/lab_result_history_details_wideget.dart diff --git a/lib/screens/patients/profile/lab_result/LineChartCurvedLabHistory.dart b/lib/screens/patients/profile/lab_result/history/line_chart_curved_lab_history.dart similarity index 100% rename from lib/screens/patients/profile/lab_result/LineChartCurvedLabHistory.dart rename to lib/screens/patients/profile/lab_result/history/line_chart_curved_lab_history.dart diff --git a/lib/screens/patients/profile/lab_result/lab_result_chart_and_detials.dart b/lib/screens/patients/profile/lab_result/lab_result_chart_and_detials.dart deleted file mode 100644 index b58eb9f1..00000000 --- a/lib/screens/patients/profile/lab_result/lab_result_chart_and_detials.dart +++ /dev/null @@ -1,63 +0,0 @@ -import 'package:doctor_app_flutter/config/size_config.dart'; -import 'package:doctor_app_flutter/core/model/labs/LabOrderResult.dart'; -import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; -import 'package:flutter/material.dart'; - -import 'Lab_Result_details_wideget.dart'; -import 'LineChartCurved.dart'; - -class LabResultChartAndDetails extends StatelessWidget { - LabResultChartAndDetails({ - Key key, - @required this.labResult, - @required this.name, - }) : super(key: key); - - final List labResult; - final String name; - - @override - Widget build(BuildContext context) { - return Padding( - padding: const EdgeInsets.all(10.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - margin: EdgeInsets.symmetric(horizontal: 8), - decoration: BoxDecoration( - color: Colors.white, borderRadius: BorderRadius.circular(12)), - child: LineChartCurved( - title: name, - labResult: labResult, - ), - ), - Container( - margin: EdgeInsets.symmetric(horizontal: 8, vertical: 16), - padding: EdgeInsets.only(top: 16, right: 18.0, left: 16.0), - decoration: BoxDecoration( - color: Colors.white, borderRadius: BorderRadius.circular(12)), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).graphDetails, - fontSize: SizeConfig.textMultiplier * 2.1, - fontWeight: FontWeight.bold, - fontFamily: 'Poppins', - ), - SizedBox( - height: 8, - ), - LabResultDetailsWidget( - labResult: labResult.reversed.toList(), - ), - ], - ), - ), - ], - ), - ); - } -} diff --git a/lib/screens/patients/profile/lab_result/lab_result_secreen.dart b/lib/screens/patients/profile/lab_result/lab_result_secreen.dart deleted file mode 100644 index 84ca68be..00000000 --- a/lib/screens/patients/profile/lab_result/lab_result_secreen.dart +++ /dev/null @@ -1,86 +0,0 @@ -import 'package:doctor_app_flutter/config/size_config.dart'; -import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; -import 'package:doctor_app_flutter/core/model/patient/lab_orders/lab_orders_res_model.dart'; -import 'package:doctor_app_flutter/screens/base/base_view.dart'; -import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart'; -import 'package:doctor_app_flutter/widgets/doctor/lab_result_widget.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/card_with_bgNew_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; - -class LabResult extends StatefulWidget { - final LabOrdersResModel labOrders; - - LabResult({Key key, this.labOrders}); - - @override - _LabResultState createState() => _LabResultState(); -} - -class _LabResultState extends State { - @override - Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => model.getLabResult(widget.labOrders), - builder: (_, model, w) => AppScaffold( - baseViewModel: model, - appBarTitle: TranslationBase.of(context).labOrders, - body: model.labResultList.length == 0 - ? DrAppEmbeddedError( - error: TranslationBase.of(context).errorNoLabOrders) - : Container( - margin: EdgeInsets.fromLTRB(SizeConfig.realScreenWidth * 0.05, - 0, SizeConfig.realScreenWidth * 0.05, 0), - child: ListView( - children: [ - CardWithBgWidgetNew( - widget: Column( - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).orderNo, - fontSize: 2 * SizeConfig.textMultiplier, - color: Colors.grey[800], - ), - AppText( - ' ${widget.labOrders.orderNo}', - fontSize: 2 * SizeConfig.textMultiplier, - color: Colors.grey[800], - ), - ], - ), - Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).invoiceNo, - fontSize: 2 * SizeConfig.textMultiplier, - color: Colors.grey[800], - ), - AppText( - ' ${widget.labOrders.invoiceNo}', - fontSize: 2 * SizeConfig.textMultiplier, - color: Colors.grey[800], - ), - ], - ), - ], - ), - ), - CardWithBgWidgetNew( - widget: LabResultWidget( - labResult: model.labResultList, - ), - ) - ], - ), - ), - ), - ); - } -} diff --git a/lib/screens/patients/profile/lab_result/FlowChartPage.dart b/lib/screens/patients/profile/lab_result/laboratory_result/flow_chart_page.dart similarity index 79% rename from lib/screens/patients/profile/lab_result/FlowChartPage.dart rename to lib/screens/patients/profile/lab_result/laboratory_result/flow_chart_page.dart index fc65e777..685478eb 100644 --- a/lib/screens/patients/profile/lab_result/FlowChartPage.dart +++ b/lib/screens/patients/profile/lab_result/laboratory_result/flow_chart_page.dart @@ -7,8 +7,8 @@ import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import '../../../../widgets/shared/errors/error_message.dart'; -import 'lab_result_history_chart_and_detials.dart'; +import '../../../../../widgets/shared/errors/error_message.dart'; +import '../history/lab_result_history_chart_and_detials.dart'; class FlowChartPage extends StatelessWidget { final PatientLabOrders patientLabOrder; @@ -26,10 +26,6 @@ class FlowChartPage extends StatelessWidget { patientLabOrder: patientLabOrder, procedureDescription: filterName, patient: patient), - // onModelReady: (model) => model.getPatientLabOrdersResults( - // patientLabOrder: patientLabOrder, - // procedure: filterName, - // patient: patient), builder: (context, model, w) => AppScaffold( isShowAppBar: true, appBarTitle: filterName, @@ -41,10 +37,6 @@ class FlowChartPage extends StatelessWidget { name: filterName, labResultHistory: model.labOrdersResultHistoryList, ), - // child: LabResultChartAndDetails( - // name: filterName, - // labResult: model.labOrdersResultsList, - // ), ), ) : Container( diff --git a/lib/screens/patients/profile/lab_result/Lab_Result_details_wideget.dart b/lib/screens/patients/profile/lab_result/laboratory_result/lab_result_details_wideget.dart similarity index 100% rename from lib/screens/patients/profile/lab_result/Lab_Result_details_wideget.dart rename to lib/screens/patients/profile/lab_result/laboratory_result/lab_result_details_wideget.dart diff --git a/lib/screens/patients/profile/lab_result/LabResultWidget.dart b/lib/screens/patients/profile/lab_result/laboratory_result/lab_result_widget.dart similarity index 87% rename from lib/screens/patients/profile/lab_result/LabResultWidget.dart rename to lib/screens/patients/profile/lab_result/laboratory_result/lab_result_widget.dart index b89a85b1..8ec84997 100644 --- a/lib/screens/patients/profile/lab_result/LabResultWidget.dart +++ b/lib/screens/patients/profile/lab_result/laboratory_result/lab_result_widget.dart @@ -3,7 +3,7 @@ import 'package:doctor_app_flutter/core/model/labs/lab_result.dart'; import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; -import 'package:doctor_app_flutter/screens/patients/profile/lab_result/FlowChartPage.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/lab_result/laboratory_result/flow_chart_page.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; @@ -50,26 +50,6 @@ class LabResultWidget extends StatelessWidget { ), ], ), - // InkWell( - // onTap: () { - // Navigator.push( - // context, - // FadePage( - // page: FlowChartPage( - // filterName: filterName, - // patientLabOrder: patientLabOrder, - // patient: patient, - // isInpatient: isInpatient, - // ), - // ), - // ); - // }, - // // child: AppText( - // // TranslationBase.of(context).showMoreBtn, - // // textDecoration: TextDecoration.underline, - // // color: Colors.blue, - // // ), - // ), ], ), SizedBox( @@ -148,7 +128,6 @@ class LabResultWidget extends StatelessWidget { padding: EdgeInsets.all(10), child: Center( child: AppText( - /*'${patientLabResultList[index].testCode}\n' +*/ patientLabResultList[index].description, textAlign: TextAlign.center, fontSize: SizeConfig.textMultiplier * 1.8, @@ -168,9 +147,6 @@ class LabResultWidget extends StatelessWidget { decoration: BoxDecoration( shape: BoxShape.circle, color: Colors.red.shade700, - // borderRadius: BorderRadius.all( - // Radius.circular(25.0), - // ), ), child: Icon( patientLabResultList[index] @@ -233,11 +209,6 @@ class LabResultWidget extends StatelessWidget { patient: patient, isInpatient: isInpatient, ), - // page: LabResultHistoryPage( - // filterName: patientLabResultList[index].description, - // patientLabOrder: patientLabOrder, - // patient: patient, - // ), ), ); }, @@ -269,12 +240,6 @@ class LabResultWidget extends StatelessWidget { height: 8, ), Divider(), - // Table( - // border: TableBorder.symmetric( - // inside: BorderSide(width: 2.0, color: Colors.grey[300],style: BorderStyle.solid), - // ), - // children: fullData(patientLabResultList,context), - // ), ], ), ); diff --git a/lib/screens/patients/profile/lab_result/laboratory_result_page.dart b/lib/screens/patients/profile/lab_result/laboratory_result/laboratory_result_page.dart similarity index 100% rename from lib/screens/patients/profile/lab_result/laboratory_result_page.dart rename to lib/screens/patients/profile/lab_result/laboratory_result/laboratory_result_page.dart diff --git a/lib/screens/patients/profile/lab_result/laboratory_result_widget.dart b/lib/screens/patients/profile/lab_result/laboratory_result/laboratory_result_widget.dart similarity index 99% rename from lib/screens/patients/profile/lab_result/laboratory_result_widget.dart rename to lib/screens/patients/profile/lab_result/laboratory_result/laboratory_result_widget.dart index b41d792d..97d10d88 100644 --- a/lib/screens/patients/profile/lab_result/laboratory_result_widget.dart +++ b/lib/screens/patients/profile/lab_result/laboratory_result/laboratory_result_widget.dart @@ -4,7 +4,7 @@ import 'package:doctor_app_flutter/core/viewModel/labs_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_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/lab_result/LabResultWidget.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/lab_result/laboratory_result/lab_result_widget.dart'; import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; diff --git a/lib/screens/patients/profile/lab_result/labs_home_page.dart b/lib/screens/patients/profile/lab_result/labs_home_page.dart index 05e86a7f..fde2dfdb 100644 --- a/lib/screens/patients/profile/lab_result/labs_home_page.dart +++ b/lib/screens/patients/profile/lab_result/labs_home_page.dart @@ -2,7 +2,7 @@ import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_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/lab_result/laboratory_result_page.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/lab_result/laboratory_result/laboratory_result_page.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/utils/translations_delegate_base_utils.dart'; @@ -68,18 +68,13 @@ class _LabsHomePageState extends State { SizedBox( height: 12, ), - if (model.patientLabOrdersList.isNotEmpty && - patient.patientStatusType != 43) + if ((model.patientLabOrdersList.isNotEmpty && + patient.patientStatusType != 43)|| (patient.patientStatusType != null && + patient.patientStatusType == 43)) ServiceTitle( title: TranslationBase.of(context).lab, subTitle: TranslationBase.of(context).result, ), - if (patient.patientStatusType != null && - patient.patientStatusType == 43) - ServiceTitle( - title:TranslationBase.of(context).lab, - subTitle: TranslationBase.of(context).result, - ), if ((patient.patientStatusType != null && patient.patientStatusType == 43) || (isFromLiveCare && patient.appointmentNo != null)) diff --git a/lib/screens/patients/profile/lab_result/all_lab_special_result_page.dart b/lib/screens/patients/profile/lab_result/special_result/all_lab_special_result_page.dart similarity index 98% rename from lib/screens/patients/profile/lab_result/all_lab_special_result_page.dart rename to lib/screens/patients/profile/lab_result/special_result/all_lab_special_result_page.dart index ab05548b..9233b453 100644 --- a/lib/screens/patients/profile/lab_result/all_lab_special_result_page.dart +++ b/lib/screens/patients/profile/lab_result/special_result/all_lab_special_result_page.dart @@ -2,7 +2,7 @@ import 'package:doctor_app_flutter/core/viewModel/labs_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_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/lab_result/special_lab_result_details_page.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/lab_result/special_result/special_lab_result_details_page.dart'; import 'package:doctor_app_flutter/utils/date-utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart'; @@ -15,7 +15,7 @@ import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; -import '../../../../widgets/shared/errors/error_message.dart'; +import '../../../../../widgets/shared/errors/error_message.dart'; class AllLabSpecialResult extends StatefulWidget { const AllLabSpecialResult({Key key}) : super(key: key); diff --git a/lib/screens/patients/profile/lab_result/special_lab_result_details_page.dart b/lib/screens/patients/profile/lab_result/special_result/special_lab_result_details_page.dart similarity index 100% rename from lib/screens/patients/profile/lab_result/special_lab_result_details_page.dart rename to lib/screens/patients/profile/lab_result/special_result/special_lab_result_details_page.dart diff --git a/lib/screens/prescription/add_prescription/prescription_form_widget.dart b/lib/screens/prescription/add_prescription/prescription_form_widget.dart index afb70e2e..e498262f 100644 --- a/lib/screens/prescription/add_prescription/prescription_form_widget.dart +++ b/lib/screens/prescription/add_prescription/prescription_form_widget.dart @@ -65,8 +65,7 @@ class _PrescriptionFormWidgetState extends State { bool visibilityPrescriptionForm = false; bool visibilitySearch = true; - final myController = TextEditingController(); - DateTime selectedDate; + DateTime selectedDate = DateTime.now(); int strengthChar; GlobalKey key = new GlobalKey>();