|
|
|
@ -1,8 +1,8 @@
|
|
|
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
|
|
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
|
|
|
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
|
|
|
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
|
|
|
|
|
|
|
import 'package:doctor_app_flutter/core/model/referral/MyReferralPatientModel.dart';
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart';
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart';
|
|
|
|
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
|
|
|
|
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
|
|
|
|
import 'package:doctor_app_flutter/models/patient/my_referral/PendingReferral.dart';
|
|
|
|
|
|
|
|
import 'package:doctor_app_flutter/screens/base/base_view.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/util/date-utils.dart';
|
|
|
|
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
|
|
|
|
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
|
|
|
|
@ -13,37 +13,29 @@ 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/shared/app_texts_widget.dart';
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:hexcolor/hexcolor.dart';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ignore: must_be_immutable
|
|
|
|
// ignore: must_be_immutable
|
|
|
|
class MyReferralDetailScreen extends StatelessWidget {
|
|
|
|
class MyReferralDetailScreen extends StatelessWidget {
|
|
|
|
PendingReferral pendingReferral;
|
|
|
|
final MyReferralPatientModel referralPatient;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const MyReferralDetailScreen({Key key, this.referralPatient})
|
|
|
|
|
|
|
|
: super(key: key);
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
|
|
|
|
// final routeArgs = ModalRoute.of(context).settings.arguments as Map;
|
|
|
|
pendingReferral = routeArgs['referral'];
|
|
|
|
// pendingReferral = routeArgs['referral'];
|
|
|
|
|
|
|
|
|
|
|
|
return BaseView<PatientReferralViewModel>(
|
|
|
|
return BaseView<PatientReferralViewModel>(
|
|
|
|
onModelReady: (model) => model.getPatientDetails(
|
|
|
|
onModelReady: (model) => model.getDoctorProfile(),
|
|
|
|
AppDateUtils.convertStringToDateFormat(
|
|
|
|
|
|
|
|
DateTime.now() /*.subtract(Duration(days: 350))*/ .toString(),
|
|
|
|
|
|
|
|
"yyyy-MM-dd"),
|
|
|
|
|
|
|
|
AppDateUtils.convertStringToDateFormat(
|
|
|
|
|
|
|
|
DateTime.now().toString(), "yyyy-MM-dd"),
|
|
|
|
|
|
|
|
pendingReferral.patientID,
|
|
|
|
|
|
|
|
pendingReferral.sourceAppointmentNo),
|
|
|
|
|
|
|
|
builder: (_, model, w) => AppScaffold(
|
|
|
|
builder: (_, model, w) => AppScaffold(
|
|
|
|
baseViewModel: model,
|
|
|
|
baseViewModel: model,
|
|
|
|
appBarTitle: TranslationBase.of(context).referPatient,
|
|
|
|
appBarTitle: TranslationBase.of(context).referPatient,
|
|
|
|
isShowAppBar: false,
|
|
|
|
isShowAppBar: false,
|
|
|
|
body: model.patientArrivalList != null &&
|
|
|
|
body: Column(
|
|
|
|
model.patientArrivalList.length > 0
|
|
|
|
|
|
|
|
? Column(
|
|
|
|
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
padding:
|
|
|
|
padding: EdgeInsets.only(left: 0, right: 5, bottom: 5, top: 5),
|
|
|
|
EdgeInsets.only(left: 0, right: 5, bottom: 5, top: 5),
|
|
|
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -62,18 +54,14 @@ class MyReferralDetailScreen extends StatelessWidget {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
child: AppText(
|
|
|
|
child: AppText(
|
|
|
|
(Helpers.capitalize(model
|
|
|
|
(Helpers.capitalize(referralPatient.firstName + " "+
|
|
|
|
.patientArrivalList[0]
|
|
|
|
referralPatient.lastName)),
|
|
|
|
.patientDetails
|
|
|
|
|
|
|
|
.fullName)),
|
|
|
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 2.5,
|
|
|
|
fontSize: SizeConfig.textMultiplier * 2.5,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
model.patientArrivalList[0].patientDetails
|
|
|
|
referralPatient.gender == 1
|
|
|
|
.gender ==
|
|
|
|
|
|
|
|
1
|
|
|
|
|
|
|
|
? Icon(
|
|
|
|
? Icon(
|
|
|
|
DoctorApp.male_2,
|
|
|
|
DoctorApp.male_2,
|
|
|
|
color: Colors.blue,
|
|
|
|
color: Colors.blue,
|
|
|
|
@ -93,7 +81,7 @@ class MyReferralDetailScreen extends StatelessWidget {
|
|
|
|
width: 60,
|
|
|
|
width: 60,
|
|
|
|
height: 60,
|
|
|
|
height: 60,
|
|
|
|
child: Image.asset(
|
|
|
|
child: Image.asset(
|
|
|
|
pendingReferral.patientDetails.gender == 1
|
|
|
|
referralPatient.gender == 1
|
|
|
|
? 'assets/images/male_avatar.png'
|
|
|
|
? 'assets/images/male_avatar.png'
|
|
|
|
: 'assets/images/female_avatar.png',
|
|
|
|
: 'assets/images/female_avatar.png',
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
@ -111,30 +99,27 @@ class MyReferralDetailScreen extends StatelessWidget {
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
AppText(
|
|
|
|
AppText(
|
|
|
|
pendingReferral.referralStatus != null
|
|
|
|
referralPatient.referralStatus != null
|
|
|
|
? pendingReferral.referralStatus
|
|
|
|
? model.getReferralStatusNameByCode(
|
|
|
|
|
|
|
|
referralPatient.referralStatus,
|
|
|
|
|
|
|
|
context)
|
|
|
|
: "",
|
|
|
|
: "",
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
fontSize:
|
|
|
|
fontSize: 1.9 * SizeConfig.textMultiplier,
|
|
|
|
1.9 * SizeConfig.textMultiplier,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
color: pendingReferral
|
|
|
|
color: referralPatient.referralStatus == 1
|
|
|
|
.referralStatus !=
|
|
|
|
|
|
|
|
null
|
|
|
|
|
|
|
|
? pendingReferral
|
|
|
|
|
|
|
|
.referralStatus ==
|
|
|
|
|
|
|
|
'Pending'
|
|
|
|
|
|
|
|
? Color(0xffc4aa54)
|
|
|
|
? Color(0xffc4aa54)
|
|
|
|
: pendingReferral
|
|
|
|
: referralPatient.referralStatus ==
|
|
|
|
|
|
|
|
46 ||
|
|
|
|
|
|
|
|
referralPatient
|
|
|
|
.referralStatus ==
|
|
|
|
.referralStatus ==
|
|
|
|
'Accepted'
|
|
|
|
2
|
|
|
|
? Colors.green[700]
|
|
|
|
? Colors.green[700]
|
|
|
|
: Colors.red[700]
|
|
|
|
: Colors.red[700],
|
|
|
|
: Colors.grey[500],
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
AppText(
|
|
|
|
AppText(
|
|
|
|
pendingReferral.referredOn
|
|
|
|
AppDateUtils.getDayMonthYearDateFormatted(
|
|
|
|
.split(" ")[0],
|
|
|
|
referralPatient.referralDate),
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
fontSize:
|
|
|
|
fontSize:
|
|
|
|
@ -156,23 +141,22 @@ class MyReferralDetailScreen extends StatelessWidget {
|
|
|
|
.fileNumber,
|
|
|
|
.fileNumber,
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
fontSize: 1.7 *
|
|
|
|
fontSize:
|
|
|
|
SizeConfig.textMultiplier,
|
|
|
|
1.7 * SizeConfig.textMultiplier,
|
|
|
|
color: Color(0XFF575757),
|
|
|
|
color: Color(0XFF575757),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
AppText(
|
|
|
|
AppText(
|
|
|
|
"${pendingReferral.patientID}",
|
|
|
|
"${referralPatient.patientID}",
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
fontSize: 1.8 *
|
|
|
|
fontSize:
|
|
|
|
SizeConfig.textMultiplier,
|
|
|
|
1.8 * SizeConfig.textMultiplier,
|
|
|
|
color: Color(0XFF2E303A),
|
|
|
|
color: Color(0XFF2E303A),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
AppText(
|
|
|
|
AppText(
|
|
|
|
pendingReferral.referredOn
|
|
|
|
AppDateUtils.getTimeHHMMA(referralPatient.referralDate),
|
|
|
|
.split(" ")[1],
|
|
|
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
fontSize:
|
|
|
|
fontSize:
|
|
|
|
@ -184,12 +168,12 @@ class MyReferralDetailScreen extends StatelessWidget {
|
|
|
|
Row(
|
|
|
|
Row(
|
|
|
|
mainAxisAlignment:
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
crossAxisAlignment:
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
CrossAxisAlignment.center,
|
|
|
|
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
|
|
|
|
|
|
|
|
Row(
|
|
|
|
Row(
|
|
|
|
mainAxisAlignment:
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
@ -200,13 +184,11 @@ class MyReferralDetailScreen extends StatelessWidget {
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
fontSize: 1.7 *
|
|
|
|
fontSize: 1.7 *
|
|
|
|
SizeConfig
|
|
|
|
SizeConfig.textMultiplier,
|
|
|
|
.textMultiplier,
|
|
|
|
|
|
|
|
color: Color(0XFF575757),
|
|
|
|
color: Color(0XFF575757),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
AppText(
|
|
|
|
AppText(
|
|
|
|
pendingReferral
|
|
|
|
referralPatient.targetProjectId ==referralPatient.sourceProjectId
|
|
|
|
.isReferralDoctorSameBranch
|
|
|
|
|
|
|
|
? TranslationBase.of(
|
|
|
|
? TranslationBase.of(
|
|
|
|
context)
|
|
|
|
context)
|
|
|
|
.sameBranch
|
|
|
|
.sameBranch
|
|
|
|
@ -235,20 +217,17 @@ class MyReferralDetailScreen extends StatelessWidget {
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
fontSize: 1.7 *
|
|
|
|
fontSize: 1.7 *
|
|
|
|
SizeConfig
|
|
|
|
SizeConfig.textMultiplier,
|
|
|
|
.textMultiplier,
|
|
|
|
|
|
|
|
color: Color(0XFF575757),
|
|
|
|
color: Color(0XFF575757),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
child: AppText(
|
|
|
|
child: AppText(
|
|
|
|
pendingReferral
|
|
|
|
referralPatient.referringDoctorRemarks??
|
|
|
|
.remarksFromSource,
|
|
|
|
'',
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
fontWeight:
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
FontWeight.w700,
|
|
|
|
|
|
|
|
fontSize: 1.8 *
|
|
|
|
fontSize: 1.8 *
|
|
|
|
SizeConfig
|
|
|
|
SizeConfig.textMultiplier,
|
|
|
|
.textMultiplier,
|
|
|
|
|
|
|
|
color: Color(0XFF2E303A),
|
|
|
|
color: Color(0XFF2E303A),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -260,35 +239,29 @@ class MyReferralDetailScreen extends StatelessWidget {
|
|
|
|
Row(
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
AppText(
|
|
|
|
AppText(
|
|
|
|
pendingReferral.patientDetails
|
|
|
|
referralPatient.nationalityName !=
|
|
|
|
.nationalityName !=
|
|
|
|
|
|
|
|
null
|
|
|
|
null
|
|
|
|
? pendingReferral
|
|
|
|
? referralPatient.nationalityName
|
|
|
|
.patientDetails
|
|
|
|
|
|
|
|
.nationalityName
|
|
|
|
|
|
|
|
: "",
|
|
|
|
: "",
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
color: Color(0xFF2E303A),
|
|
|
|
color: Color(0xFF2E303A),
|
|
|
|
fontSize: 1.4 *
|
|
|
|
fontSize:
|
|
|
|
SizeConfig.textMultiplier,
|
|
|
|
1.4 * SizeConfig.textMultiplier,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
pendingReferral
|
|
|
|
referralPatient.nationalityFlagURL !=
|
|
|
|
.nationalityFlagUrl !=
|
|
|
|
|
|
|
|
null
|
|
|
|
null
|
|
|
|
? ClipRRect(
|
|
|
|
? ClipRRect(
|
|
|
|
borderRadius:
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius.circular(
|
|
|
|
BorderRadius.circular(20.0),
|
|
|
|
20.0),
|
|
|
|
|
|
|
|
child: Image.network(
|
|
|
|
child: Image.network(
|
|
|
|
pendingReferral
|
|
|
|
referralPatient
|
|
|
|
.nationalityFlagUrl,
|
|
|
|
.nationalityFlagURL,
|
|
|
|
height: 25,
|
|
|
|
height: 25,
|
|
|
|
width: 30,
|
|
|
|
width: 30,
|
|
|
|
errorBuilder:
|
|
|
|
errorBuilder: (BuildContext
|
|
|
|
(BuildContext context,
|
|
|
|
context,
|
|
|
|
Object exception,
|
|
|
|
Object exception,
|
|
|
|
StackTrace
|
|
|
|
StackTrace stackTrace) {
|
|
|
|
stackTrace) {
|
|
|
|
|
|
|
|
return Text('No Image');
|
|
|
|
return Text('No Image');
|
|
|
|
},
|
|
|
|
},
|
|
|
|
))
|
|
|
|
))
|
|
|
|
@ -298,12 +271,11 @@ class MyReferralDetailScreen extends StatelessWidget {
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Row(
|
|
|
|
Row(
|
|
|
|
crossAxisAlignment:
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
margin:
|
|
|
|
left: 10, right: 0),
|
|
|
|
EdgeInsets.only(left: 10, right: 0),
|
|
|
|
child: Image.asset(
|
|
|
|
child: Image.asset(
|
|
|
|
'assets/images/patient/ic_ref_arrow_up.png',
|
|
|
|
'assets/images/patient/ic_ref_arrow_up.png',
|
|
|
|
height: 50,
|
|
|
|
height: 50,
|
|
|
|
@ -324,10 +296,8 @@ class MyReferralDetailScreen extends StatelessWidget {
|
|
|
|
child: CircleAvatar(
|
|
|
|
child: CircleAvatar(
|
|
|
|
radius: 25.0,
|
|
|
|
radius: 25.0,
|
|
|
|
backgroundImage: NetworkImage(
|
|
|
|
backgroundImage: NetworkImage(
|
|
|
|
pendingReferral
|
|
|
|
referralPatient.doctorImageURL),
|
|
|
|
.doctorImageUrl),
|
|
|
|
backgroundColor: Colors.transparent,
|
|
|
|
backgroundColor:
|
|
|
|
|
|
|
|
Colors.transparent,
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -342,8 +312,7 @@ class MyReferralDetailScreen extends StatelessWidget {
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
AppText(
|
|
|
|
AppText(
|
|
|
|
pendingReferral
|
|
|
|
referralPatient.doctorName,
|
|
|
|
.referredByDoctorInfo,
|
|
|
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
fontSize: 1.7 *
|
|
|
|
fontSize: 1.7 *
|
|
|
|
@ -375,12 +344,13 @@ class MyReferralDetailScreen extends StatelessWidget {
|
|
|
|
height: 16,
|
|
|
|
height: 16,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
Padding(
|
|
|
|
padding:
|
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 16),
|
|
|
|
const EdgeInsets.symmetric(horizontal: 16),
|
|
|
|
|
|
|
|
child: SizedBox(
|
|
|
|
child: SizedBox(
|
|
|
|
child: ProfileMedicalInfoWidgetSearch(
|
|
|
|
child: ProfileMedicalInfoWidgetSearch(
|
|
|
|
patient: model.patientArrivalList[0],
|
|
|
|
patient: model
|
|
|
|
|
|
|
|
.getPatientFromReferralO(referralPatient),
|
|
|
|
patientType: "7",
|
|
|
|
patientType: "7",
|
|
|
|
|
|
|
|
isInpatient: false,
|
|
|
|
from: null,
|
|
|
|
from: null,
|
|
|
|
to: null,
|
|
|
|
to: null,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -391,6 +361,7 @@ class MyReferralDetailScreen extends StatelessWidget {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
if (referralPatient.referralStatus == 1)
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
|
|
|
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
|
|
|
child: Row(
|
|
|
|
child: Row(
|
|
|
|
@ -403,15 +374,16 @@ class MyReferralDetailScreen extends StatelessWidget {
|
|
|
|
fontSize: 1.6,
|
|
|
|
fontSize: 1.6,
|
|
|
|
hPadding: 8,
|
|
|
|
hPadding: 8,
|
|
|
|
vPadding: 12,
|
|
|
|
vPadding: 12,
|
|
|
|
|
|
|
|
disabled: model.state == ViewState.Busy,
|
|
|
|
onPressed: () async {
|
|
|
|
onPressed: () async {
|
|
|
|
await model.responseReferral(
|
|
|
|
await model.responseReferral(referralPatient, true);
|
|
|
|
pendingReferral, true);
|
|
|
|
|
|
|
|
if (model.state == ViewState.ErrorLocal) {
|
|
|
|
if (model.state == ViewState.ErrorLocal) {
|
|
|
|
DrAppToastMsg.showErrorToast(model.error);
|
|
|
|
DrAppToastMsg.showErrorToast(model.error);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
DrAppToastMsg.showSuccesToast(
|
|
|
|
DrAppToastMsg.showSuccesToast(
|
|
|
|
TranslationBase.of(context)
|
|
|
|
TranslationBase.of(context)
|
|
|
|
.referralSuccessMsgAccept);
|
|
|
|
.referralSuccessMsgAccept);
|
|
|
|
|
|
|
|
model.getMyReferralOutPatientService();
|
|
|
|
Navigator.pop(context);
|
|
|
|
Navigator.pop(context);
|
|
|
|
Navigator.pop(context);
|
|
|
|
Navigator.pop(context);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -429,15 +401,16 @@ class MyReferralDetailScreen extends StatelessWidget {
|
|
|
|
fontSize: 1.6,
|
|
|
|
fontSize: 1.6,
|
|
|
|
hPadding: 8,
|
|
|
|
hPadding: 8,
|
|
|
|
vPadding: 12,
|
|
|
|
vPadding: 12,
|
|
|
|
|
|
|
|
disabled: model.state == ViewState.Busy,
|
|
|
|
onPressed: () async {
|
|
|
|
onPressed: () async {
|
|
|
|
await model.responseReferral(
|
|
|
|
await model.responseReferral(referralPatient, false);
|
|
|
|
pendingReferral, true);
|
|
|
|
|
|
|
|
if (model.state == ViewState.ErrorLocal) {
|
|
|
|
if (model.state == ViewState.ErrorLocal) {
|
|
|
|
DrAppToastMsg.showErrorToast(model.error);
|
|
|
|
DrAppToastMsg.showErrorToast(model.error);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
DrAppToastMsg.showSuccesToast(
|
|
|
|
DrAppToastMsg.showSuccesToast(
|
|
|
|
TranslationBase.of(context)
|
|
|
|
TranslationBase.of(context)
|
|
|
|
.referralSuccessMsgReject);
|
|
|
|
.referralSuccessMsgReject);
|
|
|
|
|
|
|
|
model.getMyReferralOutPatientService();
|
|
|
|
Navigator.pop(context);
|
|
|
|
Navigator.pop(context);
|
|
|
|
Navigator.pop(context);
|
|
|
|
Navigator.pop(context);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -448,41 +421,7 @@ class MyReferralDetailScreen extends StatelessWidget {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
)
|
|
|
|
)),
|
|
|
|
: Column(
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Container(
|
|
|
|
|
|
|
|
padding: EdgeInsets.only(left: 12.0),
|
|
|
|
|
|
|
|
child: Row(children: [
|
|
|
|
|
|
|
|
IconButton(
|
|
|
|
|
|
|
|
icon: Icon(Icons.arrow_back_ios),
|
|
|
|
|
|
|
|
color: Colors.black, //Colors.black,
|
|
|
|
|
|
|
|
onPressed: () => Navigator.pop(context),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Expanded(
|
|
|
|
|
|
|
|
child: AppText(
|
|
|
|
|
|
|
|
"",
|
|
|
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 2.5,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
]),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Container(
|
|
|
|
|
|
|
|
child: Center(
|
|
|
|
|
|
|
|
child: AppText(
|
|
|
|
|
|
|
|
TranslationBase.of(context).patientNoDetailErrMsg,
|
|
|
|
|
|
|
|
color: HexColor("#B8382B"),
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
fontSize: 16,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|