|
|
|
|
import 'package:doctor_app_flutter/core/enum/filter_type.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/radiology_view_model.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/screens/patients/profile/radiology/radiology_details_page.dart';
|
|
|
|
|
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/patient-profile-header-new-design.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_expandable_notifier_new.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/doctor_card.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart';
|
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
|
|
class RadiologyHomePage extends StatelessWidget {
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
ProjectViewModel projectViewModel = Provider.of(context);
|
|
|
|
|
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
|
|
|
|
|
PatiantInformtion patient = routeArgs['patient'];
|
|
|
|
|
String patientType = routeArgs['patientType'];
|
|
|
|
|
String arrivalType = routeArgs['arrivalType'];
|
|
|
|
|
return BaseView<RadiologyViewModel>(
|
|
|
|
|
onModelReady: (model) => model.getPatientRadOrders(patient),
|
|
|
|
|
builder: (_, model, widget) => AppScaffold(
|
|
|
|
|
isShowAppBar: true,
|
|
|
|
|
appBarTitle: TranslationBase.of(context).radiology,
|
|
|
|
|
baseViewModel: model,
|
|
|
|
|
body: FractionallySizedBox(
|
|
|
|
|
widthFactor: 1.0,
|
|
|
|
|
child: ListView(
|
|
|
|
|
physics: BouncingScrollPhysics(),
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
PatientProfileHeaderNewDesign(patient,arrivalType??'0',patientType),
|
|
|
|
|
SizedBox(height: 12,),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Texts('Radiology',style: "caption2",color: Colors.black,fontSize: 13,),
|
|
|
|
|
Texts('Result',bold: true,fontSize: 22,),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
if(patientType!=null && patientType=='7')
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: (){
|
|
|
|
|
//TODO Hussam call the add page here
|
|
|
|
|
},
|
|
|
|
|
child: Container(
|
|
|
|
|
width: double.maxFinite,
|
|
|
|
|
height: 140,
|
|
|
|
|
margin: EdgeInsets.all(10),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.grey[300],
|
|
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
|
|
),
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Container(
|
|
|
|
|
height: 90,
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
height: 40,
|
|
|
|
|
width: 40,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.grey[600],
|
|
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
|
|
),
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Icon(Icons.add,color: Colors.white,),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 10,),
|
|
|
|
|
Texts('Apply for Radiology Order',color: Colors.grey[600],fontWeight: FontWeight.w600,)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
...List.generate(
|
|
|
|
|
model.finalRadiologyList.length,
|
|
|
|
|
(index) => AppExpandableNotifier(
|
|
|
|
|
title: model.finalRadiologyList[index].filterName,
|
|
|
|
|
bodyWidget: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: model
|
|
|
|
|
.finalRadiologyList[index].finalRadiologyList
|
|
|
|
|
.map((radiology) {
|
|
|
|
|
return InkWell(
|
|
|
|
|
onTap: () => Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: RadiologyDetailsPage(
|
|
|
|
|
finalRadiology: radiology,
|
|
|
|
|
patient: patient,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
child: DoctorCard(
|
|
|
|
|
doctorName: radiology.doctorName,
|
|
|
|
|
profileUrl: radiology.doctorImageURL,
|
|
|
|
|
invoiceNO: '${radiology.invoiceNo}',
|
|
|
|
|
branch: '${radiology.projectName}',
|
|
|
|
|
appointmentDate: radiology.orderDate,
|
|
|
|
|
orderNo: radiology.orderNo.toString(),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}).toList(),
|
|
|
|
|
)),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|