You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
93 lines
3.8 KiB
Dart
93 lines
3.8 KiB
Dart
import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart';
|
|
import 'package:diplomaticquarterapp/core/viewModels/medical/labs_view_model.dart';
|
|
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
|
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
|
import 'package:diplomaticquarterapp/theme/colors.dart';
|
|
import 'package:diplomaticquarterapp/uitl/utils.dart';
|
|
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
|
|
import 'package:diplomaticquarterapp/widgets/charts/show_chart.dart';
|
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
|
import 'package:flutter/cupertino.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:provider/provider.dart';
|
|
|
|
import 'LineChartCurved.dart';
|
|
import 'lab_result_chart_and_detials.dart';
|
|
|
|
class FlowChartPage extends StatelessWidget {
|
|
final PatientLabOrders patientLabOrder;
|
|
final String filterName;
|
|
|
|
FlowChartPage({this.patientLabOrder, this.filterName});
|
|
|
|
ProjectViewModel projectViewModel;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
projectViewModel = Provider.of(context);
|
|
return BaseView<LabsViewModel>(
|
|
onModelReady: (model) =>
|
|
model.getPatientLabOrdersResults(patientLabOrder: patientLabOrder, procedure: filterName, isVidaPlus: Utils.isVidaPlusProject(projectViewModel, num.parse(patientLabOrder.projectID))),
|
|
builder: (context, model, w) => AppScaffold(
|
|
isShowAppBar: true,
|
|
appBarTitle: filterName,
|
|
baseViewModel: model,
|
|
showNewAppBar: true,
|
|
showNewAppBarTitle: true,
|
|
backgroundColor: CustomColors.appBackgroudGrey2Color,
|
|
body: SingleChildScrollView(
|
|
child: model.labOrdersResultsList.isNotEmpty
|
|
? Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
Container(
|
|
width: double.infinity,
|
|
padding: EdgeInsets.only(left: 17, top: 12, right: 13, bottom: 12),
|
|
margin: EdgeInsets.only(left: 21, right: 21, top: 21),
|
|
decoration: BoxDecoration(
|
|
shape: BoxShape.rectangle,
|
|
color: Colors.white,
|
|
borderRadius: BorderRadius.all(
|
|
Radius.circular(10.0),
|
|
),
|
|
boxShadow: [
|
|
BoxShadow(
|
|
color: Color(0xff000000).withOpacity(.05),
|
|
//spreadRadius: 5,
|
|
blurRadius: 27,
|
|
offset: Offset(0, -3),
|
|
),
|
|
],
|
|
),
|
|
// child: LineChartCurved(
|
|
// title: filterName,
|
|
// labResult: model.labOrdersResultsList,
|
|
// ),
|
|
child: ShowChart(
|
|
title: filterName,
|
|
timeSeries: model.timeSeries,
|
|
indexes: model.timeSeries.length ~/ 5.5 ?? 0,
|
|
),
|
|
),
|
|
LabResultChartAndDetails(
|
|
name: filterName,
|
|
labResult: model.labOrdersResultsList,
|
|
),
|
|
],
|
|
)
|
|
: Center(
|
|
child: Container(
|
|
padding: EdgeInsets.only(top: MediaQuery.of(context).size.height * 0.32),
|
|
child: Center(
|
|
child: getNoDataWidget(context),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|