|
|
|
|
@ -19,7 +19,8 @@ import 'package:flutter/material.dart';
|
|
|
|
|
class MyReferralDetailScreen extends StatelessWidget {
|
|
|
|
|
final MyReferralPatientModel referralPatient;
|
|
|
|
|
|
|
|
|
|
const MyReferralDetailScreen({Key key, this.referralPatient}) : super(key: key);
|
|
|
|
|
const MyReferralDetailScreen({Key key, this.referralPatient})
|
|
|
|
|
: super(key: key);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
@ -54,7 +55,9 @@ class MyReferralDetailScreen extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: AppText(
|
|
|
|
|
(Helpers.capitalize(referralPatient.firstName + " " + referralPatient.lastName)),
|
|
|
|
|
(Helpers.capitalize(referralPatient.firstName +
|
|
|
|
|
" " +
|
|
|
|
|
referralPatient.lastName)),
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 2.5,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
@ -94,23 +97,31 @@ class MyReferralDetailScreen extends StatelessWidget {
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
referralPatient.referralStatus != null
|
|
|
|
|
? model.getReferralStatusNameByCode(referralPatient.referralStatus, context)
|
|
|
|
|
? model.getReferralStatusNameByCode(
|
|
|
|
|
referralPatient.referralStatus,
|
|
|
|
|
context)
|
|
|
|
|
: "",
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontSize: 1.9 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
color: referralPatient.referralStatus == 1
|
|
|
|
|
? Color(0xffc4aa54)
|
|
|
|
|
: referralPatient.referralStatus == 46 || referralPatient.referralStatus == 2
|
|
|
|
|
: referralPatient.referralStatus ==
|
|
|
|
|
46 ||
|
|
|
|
|
referralPatient
|
|
|
|
|
.referralStatus ==
|
|
|
|
|
2
|
|
|
|
|
? AppGlobal.appGreenColor
|
|
|
|
|
: Colors.red[700],
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
AppDateUtils.getDayMonthYearDateFormatted(referralPatient.referralDate),
|
|
|
|
|
AppDateUtils.getDayMonthYearDateFormatted(
|
|
|
|
|
referralPatient.referralDate),
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: 2.0 * SizeConfig.textMultiplier,
|
|
|
|
|
@ -119,29 +130,35 @@ class MyReferralDetailScreen extends StatelessWidget {
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).fileNumber,
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.fileNumber,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontSize:
|
|
|
|
|
1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
color: Color(0XFF575757),
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
"${referralPatient.patientID}",
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
fontSize: 1.8 * SizeConfig.textMultiplier,
|
|
|
|
|
fontSize:
|
|
|
|
|
1.8 * SizeConfig.textMultiplier,
|
|
|
|
|
color: Color(0XFF2E303A),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
AppDateUtils.getTimeHHMMA(referralPatient.referralDate),
|
|
|
|
|
AppDateUtils.getTimeHHMMA(
|
|
|
|
|
referralPatient.referralDate),
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: 1.8 * SizeConfig.textMultiplier,
|
|
|
|
|
@ -150,50 +167,70 @@ class MyReferralDetailScreen extends StatelessWidget {
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).referredFrom,
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.referredFrom,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontSize: 1.7 *
|
|
|
|
|
SizeConfig.textMultiplier,
|
|
|
|
|
color: Color(0XFF575757),
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
referralPatient.targetProjectId == referralPatient.sourceProjectId
|
|
|
|
|
? TranslationBase.of(context).sameBranch
|
|
|
|
|
: TranslationBase.of(context).otherBranch,
|
|
|
|
|
referralPatient
|
|
|
|
|
.targetProjectId ==
|
|
|
|
|
referralPatient
|
|
|
|
|
.sourceProjectId
|
|
|
|
|
? TranslationBase.of(
|
|
|
|
|
context)
|
|
|
|
|
.sameBranch
|
|
|
|
|
: TranslationBase.of(
|
|
|
|
|
context)
|
|
|
|
|
.otherBranch,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
fontSize: 1.8 * SizeConfig.textMultiplier,
|
|
|
|
|
fontSize: 1.8 *
|
|
|
|
|
SizeConfig.textMultiplier,
|
|
|
|
|
color: Color(0XFF2E303A),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).remarks + " : ",
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.remarks +
|
|
|
|
|
" : ",
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontSize: 1.7 *
|
|
|
|
|
SizeConfig.textMultiplier,
|
|
|
|
|
color: Color(0XFF575757),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: AppText(
|
|
|
|
|
referralPatient.referringDoctorRemarks ?? '',
|
|
|
|
|
referralPatient
|
|
|
|
|
.referringDoctorRemarks ??
|
|
|
|
|
'',
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
fontSize: 1.8 * SizeConfig.textMultiplier,
|
|
|
|
|
fontSize: 1.8 *
|
|
|
|
|
SizeConfig.textMultiplier,
|
|
|
|
|
color: Color(0XFF2E303A),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -205,22 +242,29 @@ class MyReferralDetailScreen extends StatelessWidget {
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
referralPatient.nationalityName != null
|
|
|
|
|
referralPatient.nationalityName !=
|
|
|
|
|
null
|
|
|
|
|
? referralPatient.nationalityName
|
|
|
|
|
: "",
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
color: Color(0xFF2E303A),
|
|
|
|
|
fontSize: 1.4 * SizeConfig.textMultiplier,
|
|
|
|
|
fontSize:
|
|
|
|
|
1.4 * SizeConfig.textMultiplier,
|
|
|
|
|
),
|
|
|
|
|
referralPatient.nationalityFlagURL != null
|
|
|
|
|
referralPatient.nationalityFlagURL !=
|
|
|
|
|
null
|
|
|
|
|
? ClipRRect(
|
|
|
|
|
borderRadius: BorderRadius.circular(20.0),
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.circular(20.0),
|
|
|
|
|
child: Image.network(
|
|
|
|
|
referralPatient.nationalityFlagURL,
|
|
|
|
|
referralPatient
|
|
|
|
|
.nationalityFlagURL,
|
|
|
|
|
height: 25,
|
|
|
|
|
width: 30,
|
|
|
|
|
errorBuilder:
|
|
|
|
|
(BuildContext context, Object exception, StackTrace stackTrace) {
|
|
|
|
|
errorBuilder: (BuildContext
|
|
|
|
|
context,
|
|
|
|
|
Object exception,
|
|
|
|
|
StackTrace stackTrace) {
|
|
|
|
|
return Text('No Image');
|
|
|
|
|
},
|
|
|
|
|
))
|
|
|
|
|
@ -233,7 +277,8 @@ class MyReferralDetailScreen extends StatelessWidget {
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(left: 10, right: 0),
|
|
|
|
|
margin:
|
|
|
|
|
EdgeInsets.only(left: 10, right: 0),
|
|
|
|
|
child: Image.asset(
|
|
|
|
|
'assets/images/patient/ic_ref_arrow_up.png',
|
|
|
|
|
height: 50,
|
|
|
|
|
@ -241,14 +286,20 @@ class MyReferralDetailScreen extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(left: 0, top: 25, right: 0, bottom: 0),
|
|
|
|
|
padding: EdgeInsets.only(left: 4.0, right: 4.0),
|
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
|
left: 0,
|
|
|
|
|
top: 25,
|
|
|
|
|
right: 0,
|
|
|
|
|
bottom: 0),
|
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
|
left: 4.0, right: 4.0),
|
|
|
|
|
child: Container(
|
|
|
|
|
width: 40,
|
|
|
|
|
height: 40,
|
|
|
|
|
child: CircleAvatar(
|
|
|
|
|
radius: 25.0,
|
|
|
|
|
backgroundImage: NetworkImage(referralPatient.doctorImageURL),
|
|
|
|
|
backgroundImage: NetworkImage(
|
|
|
|
|
referralPatient.doctorImageURL),
|
|
|
|
|
backgroundColor: Colors.transparent,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -256,14 +307,19 @@ class MyReferralDetailScreen extends StatelessWidget {
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 4,
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.only(left: 10, top: 25, right: 10, bottom: 0),
|
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
|
left: 10,
|
|
|
|
|
top: 25,
|
|
|
|
|
right: 10,
|
|
|
|
|
bottom: 0),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
referralPatient.doctorName,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontSize: 1.7 *
|
|
|
|
|
SizeConfig.textMultiplier,
|
|
|
|
|
color: Color(0XFF2E303A),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
@ -294,7 +350,8 @@ class MyReferralDetailScreen extends StatelessWidget {
|
|
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 16),
|
|
|
|
|
child: SizedBox(
|
|
|
|
|
child: ProfileMedicalInfoWidgetSearch(
|
|
|
|
|
patient: model.getPatientFromReferralO(referralPatient),
|
|
|
|
|
patient: model
|
|
|
|
|
.getPatientFromReferralO(referralPatient),
|
|
|
|
|
patientType: "7",
|
|
|
|
|
isInpatient: false,
|
|
|
|
|
from: null,
|
|
|
|
|
@ -326,7 +383,9 @@ class MyReferralDetailScreen extends StatelessWidget {
|
|
|
|
|
if (model.state == ViewState.ErrorLocal) {
|
|
|
|
|
DrAppToastMsg.showErrorToast(model.error);
|
|
|
|
|
} else {
|
|
|
|
|
DrAppToastMsg.showSuccesToast(TranslationBase.of(context).referralSuccessMsgAccept);
|
|
|
|
|
DrAppToastMsg.showSuccesToast(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.referralSuccessMsgAccept);
|
|
|
|
|
model.getMyReferralOutPatientService();
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
@ -340,18 +399,21 @@ class MyReferralDetailScreen extends StatelessWidget {
|
|
|
|
|
Expanded(
|
|
|
|
|
child: AppButton(
|
|
|
|
|
title: TranslationBase.of(context).reject,
|
|
|
|
|
color: Color(0xFFB9382C),
|
|
|
|
|
color: AppGlobal.appRedColor,
|
|
|
|
|
fontColor: Colors.white,
|
|
|
|
|
fontSize: 1.6,
|
|
|
|
|
hPadding: 8,
|
|
|
|
|
vPadding: 12,
|
|
|
|
|
disabled: model.state == ViewState.Busy,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
await model.responseReferral(referralPatient, false);
|
|
|
|
|
await model.responseReferral(
|
|
|
|
|
referralPatient, false);
|
|
|
|
|
if (model.state == ViewState.ErrorLocal) {
|
|
|
|
|
DrAppToastMsg.showErrorToast(model.error);
|
|
|
|
|
} else {
|
|
|
|
|
DrAppToastMsg.showSuccesToast(TranslationBase.of(context).referralSuccessMsgReject);
|
|
|
|
|
DrAppToastMsg.showSuccesToast(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.referralSuccessMsgReject);
|
|
|
|
|
model.getMyReferralOutPatientService();
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
|