|
|
|
|
@ -37,19 +37,21 @@ class _MyReferralInPatientScreenState extends State<MyReferralInPatientScreen> {
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 70),
|
|
|
|
|
child: PatientTypeRadioWidget(
|
|
|
|
|
(patientType) async {
|
|
|
|
|
setState(() {
|
|
|
|
|
this.patientType = patientType;
|
|
|
|
|
});
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
if (patientType == PatientType.IN_PATIENT) {
|
|
|
|
|
await model.getMyReferralPatientService(localBusy: true);
|
|
|
|
|
} else {
|
|
|
|
|
await model.getMyReferralOutPatientService(localBusy: true);
|
|
|
|
|
}
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
},
|
|
|
|
|
child: Container(
|
|
|
|
|
child: PatientTypeRadioWidget(
|
|
|
|
|
(patientType) async {
|
|
|
|
|
setState(() {
|
|
|
|
|
this.patientType = patientType;
|
|
|
|
|
});
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
if (patientType == PatientType.IN_PATIENT) {
|
|
|
|
|
await model.getMyReferralPatientService(localBusy: true);
|
|
|
|
|
} else {
|
|
|
|
|
await model.getMyReferralOutPatientService(localBusy: true);
|
|
|
|
|
}
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
model.myReferralPatients.isEmpty
|
|
|
|
|
@ -74,91 +76,93 @@ class _MyReferralInPatientScreenState extends State<MyReferralInPatientScreen> {
|
|
|
|
|
: Expanded(
|
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
|
child: Container(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
ListView.builder(
|
|
|
|
|
itemCount: model.myReferralPatients.length,
|
|
|
|
|
scrollDirection: Axis.vertical,
|
|
|
|
|
physics: ScrollPhysics(),
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
return InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
if (patientType ==
|
|
|
|
|
PatientType.OUT_PATIENT) {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: MyReferralDetailScreen(
|
|
|
|
|
referralPatient: model
|
|
|
|
|
.myReferralPatients[index]),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: ReferralPatientDetailScreen(
|
|
|
|
|
model.myReferralPatients[index],
|
|
|
|
|
model),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
child: PatientReferralItemWidget(
|
|
|
|
|
referralStatus:
|
|
|
|
|
model.getReferralStatusNameByCode(
|
|
|
|
|
model.myReferralPatients[index]
|
|
|
|
|
.referralStatus,
|
|
|
|
|
context),
|
|
|
|
|
referralStatusCode: model
|
|
|
|
|
.myReferralPatients[index]
|
|
|
|
|
.referralStatus,
|
|
|
|
|
patientName: model
|
|
|
|
|
.myReferralPatients[index]
|
|
|
|
|
.patientName,
|
|
|
|
|
patientGender: model
|
|
|
|
|
.myReferralPatients[index].gender,
|
|
|
|
|
referredDate: AppDateUtils
|
|
|
|
|
.getDayMonthYearDateFormatted(model
|
|
|
|
|
.myReferralPatients[index]
|
|
|
|
|
.referralDate),
|
|
|
|
|
referredTime: AppDateUtils.getTimeHHMMA(
|
|
|
|
|
model.myReferralPatients[index]
|
|
|
|
|
.referralDate),
|
|
|
|
|
patientID:
|
|
|
|
|
"${model.myReferralPatients[index].patientID}",
|
|
|
|
|
isSameBranch: false,
|
|
|
|
|
isReferral: true,
|
|
|
|
|
isReferralClinic: true,
|
|
|
|
|
referralClinic:
|
|
|
|
|
"${model.myReferralPatients[index].referringClinicDescription}",
|
|
|
|
|
remark: model.myReferralPatients[index]
|
|
|
|
|
.referringDoctorRemarks,
|
|
|
|
|
nationality: model
|
|
|
|
|
.myReferralPatients[index]
|
|
|
|
|
.nationalityName,
|
|
|
|
|
nationalityFlag: model
|
|
|
|
|
.myReferralPatients[index]
|
|
|
|
|
.nationalityFlagURL,
|
|
|
|
|
doctorAvatar: model
|
|
|
|
|
.myReferralPatients[index]
|
|
|
|
|
.doctorImageURL,
|
|
|
|
|
referralDoctorName: model
|
|
|
|
|
.myReferralPatients[index]
|
|
|
|
|
.referringDoctorName,
|
|
|
|
|
clinicDescription: model
|
|
|
|
|
.myReferralPatients[index]
|
|
|
|
|
.referringClinicDescription,
|
|
|
|
|
infoIcon: Icon(
|
|
|
|
|
FontAwesomeIcons.arrowRight,
|
|
|
|
|
size: 25,
|
|
|
|
|
color: Colors.black),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
})
|
|
|
|
|
],
|
|
|
|
|
child: Container(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
ListView.builder(
|
|
|
|
|
itemCount: model.myReferralPatients.length,
|
|
|
|
|
scrollDirection: Axis.vertical,
|
|
|
|
|
physics: ScrollPhysics(),
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
return InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
if (patientType ==
|
|
|
|
|
PatientType.OUT_PATIENT) {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: MyReferralDetailScreen(
|
|
|
|
|
referralPatient: model
|
|
|
|
|
.myReferralPatients[index]),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: ReferralPatientDetailScreen(
|
|
|
|
|
model.myReferralPatients[index],
|
|
|
|
|
model),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
child: PatientReferralItemWidget(
|
|
|
|
|
referralStatus:
|
|
|
|
|
model.getReferralStatusNameByCode(
|
|
|
|
|
model.myReferralPatients[index]
|
|
|
|
|
.referralStatus,
|
|
|
|
|
context),
|
|
|
|
|
referralStatusCode: model
|
|
|
|
|
.myReferralPatients[index]
|
|
|
|
|
.referralStatus,
|
|
|
|
|
patientName: model
|
|
|
|
|
.myReferralPatients[index]
|
|
|
|
|
.patientName,
|
|
|
|
|
patientGender: model
|
|
|
|
|
.myReferralPatients[index].gender,
|
|
|
|
|
referredDate: AppDateUtils
|
|
|
|
|
.getDayMonthYearDateFormatted(model
|
|
|
|
|
.myReferralPatients[index]
|
|
|
|
|
.referralDate),
|
|
|
|
|
referredTime: AppDateUtils.getTimeHHMMA(
|
|
|
|
|
model.myReferralPatients[index]
|
|
|
|
|
.referralDate),
|
|
|
|
|
patientID:
|
|
|
|
|
"${model.myReferralPatients[index].patientID}",
|
|
|
|
|
isSameBranch: false,
|
|
|
|
|
isReferral: true,
|
|
|
|
|
isReferralClinic: true,
|
|
|
|
|
referralClinic:
|
|
|
|
|
"${model.myReferralPatients[index].referringClinicDescription}",
|
|
|
|
|
remark: model.myReferralPatients[index]
|
|
|
|
|
.referringDoctorRemarks,
|
|
|
|
|
nationality: model
|
|
|
|
|
.myReferralPatients[index]
|
|
|
|
|
.nationalityName,
|
|
|
|
|
nationalityFlag: model
|
|
|
|
|
.myReferralPatients[index]
|
|
|
|
|
.nationalityFlagURL,
|
|
|
|
|
doctorAvatar: model
|
|
|
|
|
.myReferralPatients[index]
|
|
|
|
|
.doctorImageURL,
|
|
|
|
|
referralDoctorName: model
|
|
|
|
|
.myReferralPatients[index]
|
|
|
|
|
.referringDoctorName,
|
|
|
|
|
clinicDescription: model
|
|
|
|
|
.myReferralPatients[index]
|
|
|
|
|
.referringClinicDescription,
|
|
|
|
|
infoIcon: Icon(
|
|
|
|
|
FontAwesomeIcons.arrowRight,
|
|
|
|
|
size: 25,
|
|
|
|
|
color: Colors.black),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
})
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
|