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.
98 lines
4.6 KiB
Dart
98 lines
4.6 KiB
Dart
import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart';
|
|
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
|
import 'package:doctor_app_flutter/util/date-utils.dart';
|
|
import 'package:doctor_app_flutter/widgets/patients/patient-referral-item-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/transitions/fade_page.dart';
|
|
import 'package:flutter/cupertino.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
|
|
|
import 'ReferralDischargedPatientDetails.dart';
|
|
|
|
class ReferralDischargedPatientPage extends StatefulWidget {
|
|
@override
|
|
_ReferralDischargedPatientPageState createState() => _ReferralDischargedPatientPageState();
|
|
}
|
|
|
|
class _ReferralDischargedPatientPageState extends State<ReferralDischargedPatientPage> {
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return BaseView<PatientReferralViewModel>(
|
|
onModelReady: (model) => model.gtMyDischargeReferralPatient(),
|
|
builder: (_, model, w) => AppScaffold(
|
|
appBarTitle: 'Referral Discharged ',
|
|
backgroundColor: Colors.grey[200],
|
|
isShowAppBar: true,
|
|
baseViewModel: model,
|
|
body: model.myDischargeReferralPatient.isEmpty?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(
|
|
'No Discharged Patient',
|
|
color: Theme.of(context).errorColor,
|
|
),
|
|
)
|
|
],
|
|
),
|
|
):Padding(
|
|
padding: const EdgeInsets.all(8.0),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
children: [
|
|
SizedBox(height: 5,),
|
|
Expanded(
|
|
child: ListView.builder(
|
|
itemCount: model.myDischargeReferralPatient.length,
|
|
itemBuilder: (context,index)=>InkWell(
|
|
onTap: () {
|
|
Navigator.push(
|
|
context,
|
|
FadePage(
|
|
page: ReferralDischargedPatientDetails(model.myDischargeReferralPatient[index]),
|
|
),
|
|
);
|
|
},
|
|
child: PatientReferralItemWidget(
|
|
referralStatus: model.getReferralStatusNameByCode(model.myDischargeReferralPatient[index].referralStatus,context),
|
|
referralStatusCode: model.myDischargeReferralPatient[index].referralStatus,
|
|
patientName: model.myDischargeReferralPatient[index].firstName+" "+model.myDischargeReferralPatient[index].lastName,
|
|
patientGender: model.myDischargeReferralPatient[index].gender,
|
|
referredDate: AppDateUtils.getDayMonthYearDateFormatted(model.myDischargeReferralPatient[index].referralDate),
|
|
referredTime: AppDateUtils.getTimeHHMMA(model.myDischargeReferralPatient[index].referralDate),
|
|
patientID: "${model.myDischargeReferralPatient[index].patientID}",
|
|
isSameBranch: false,
|
|
isReferral: true,
|
|
isReferralClinic: true,
|
|
referralClinic:"${model.myDischargeReferralPatient[index].referringClinicDescription}",
|
|
remark: model.myDischargeReferralPatient[index].referringDoctorRemarks,
|
|
nationality: model.myDischargeReferralPatient[index].nationalityName,
|
|
nationalityFlag: '',//model.myDischargeReferralPatient[index].nationalityFlagURL, //TODO From backend
|
|
doctorAvatar: '',//model.myDischargeReferralPatient[index].doctorImageURL, //TODO From backend
|
|
referralDoctorName: model.myDischargeReferralPatient[index].referringDoctorName,
|
|
clinicDescription: model.myDischargeReferralPatient[index].referringClinicDescription,
|
|
infoIcon: Icon(FontAwesomeIcons.arrowRight,
|
|
size: 25, color: Colors.black),
|
|
),
|
|
)),
|
|
),
|
|
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
|
|
|
|
}
|