|
|
|
|
@ -2,19 +2,20 @@ import 'package:doctor_app_flutter/config/config.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/enum/PatientType.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/enum/view_state.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/core/model/patient/my_referral/my_referred_patient_model.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.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/screens/base/base_view.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/utils/date-utils.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/utils/utils.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/utils/utils.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/shared/buttons/app_buttons_widget.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
|
|
import '../../../../../routes.dart';
|
|
|
|
|
|
|
|
|
|
class ReferredPatientDetailScreen extends StatelessWidget {
|
|
|
|
|
@ -52,8 +53,7 @@ class ReferredPatientDetailScreen extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: AppText(
|
|
|
|
|
(Utils.capitalize(
|
|
|
|
|
"${referredPatient.firstName} ${referredPatient.lastName}")),
|
|
|
|
|
(Utils.capitalize("${referredPatient.firstName} ${referredPatient.lastName}")),
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 2.5,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
@ -70,19 +70,14 @@ class ReferredPatientDetailScreen extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
PatiantInformtion patient =
|
|
|
|
|
model.getPatientFromReferral(referredPatient);
|
|
|
|
|
Navigator.of(context)
|
|
|
|
|
.pushNamed(PATIENTS_PROFILE, arguments: {
|
|
|
|
|
PatiantInformtion patient = model.getPatientFromReferral(referredPatient);
|
|
|
|
|
Navigator.of(context).pushNamed(PATIENTS_PROFILE, arguments: {
|
|
|
|
|
"patient": patient,
|
|
|
|
|
"patientType": "1",
|
|
|
|
|
"isInpatient":
|
|
|
|
|
patientType == PatientType.IN_PATIENT,
|
|
|
|
|
"isInpatient": patientType == PatientType.IN_PATIENT,
|
|
|
|
|
"arrivalType": "1",
|
|
|
|
|
"from": AppDateUtils.convertDateToFormat(
|
|
|
|
|
DateTime.now(), 'yyyy-MM-dd'),
|
|
|
|
|
"to": AppDateUtils.convertDateToFormat(
|
|
|
|
|
DateTime.now(), 'yyyy-MM-dd'),
|
|
|
|
|
"from": AppDateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'),
|
|
|
|
|
"to": AppDateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'),
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
child: Icon(
|
|
|
|
|
@ -97,19 +92,14 @@ class ReferredPatientDetailScreen extends StatelessWidget {
|
|
|
|
|
children: [
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
PatiantInformtion patient =
|
|
|
|
|
model.getPatientFromReferral(referredPatient);
|
|
|
|
|
Navigator.of(context)
|
|
|
|
|
.pushNamed(PATIENTS_PROFILE, arguments: {
|
|
|
|
|
PatiantInformtion patient = model.getPatientFromReferral(referredPatient);
|
|
|
|
|
Navigator.of(context).pushNamed(PATIENTS_PROFILE, arguments: {
|
|
|
|
|
"patient": patient,
|
|
|
|
|
"patientType": "1",
|
|
|
|
|
"isInpatient":
|
|
|
|
|
patientType == PatientType.IN_PATIENT,
|
|
|
|
|
"isInpatient": patientType == PatientType.IN_PATIENT,
|
|
|
|
|
"arrivalType": "1",
|
|
|
|
|
"from": AppDateUtils.convertDateToFormat(
|
|
|
|
|
DateTime.now(), 'yyyy-MM-dd'),
|
|
|
|
|
"to": AppDateUtils.convertDateToFormat(
|
|
|
|
|
DateTime.now(), 'yyyy-MM-dd'),
|
|
|
|
|
"from": AppDateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'),
|
|
|
|
|
"to": AppDateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'),
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
child: Column(
|
|
|
|
|
@ -120,9 +110,7 @@ class ReferredPatientDetailScreen extends StatelessWidget {
|
|
|
|
|
width: 60,
|
|
|
|
|
height: 60,
|
|
|
|
|
child: Image.asset(
|
|
|
|
|
referredPatient.gender == 1
|
|
|
|
|
? 'assets/images/male_avatar.png'
|
|
|
|
|
: 'assets/images/female_avatar.png',
|
|
|
|
|
referredPatient.gender == 1 ? 'assets/images/male_avatar.png' : 'assets/images/female_avatar.png',
|
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -146,8 +134,7 @@ class ReferredPatientDetailScreen extends StatelessWidget {
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
referredPatient.referralStatusDesc,
|
|
|
|
|
@ -161,9 +148,7 @@ class ReferredPatientDetailScreen extends StatelessWidget {
|
|
|
|
|
: Colors.red[700],
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
AppDateUtils.convertDateFromServerFormat(
|
|
|
|
|
referredPatient.referralDate,
|
|
|
|
|
"dd MMM,yyyy"),
|
|
|
|
|
AppDateUtils.convertDateFromServerFormat(referredPatient.referralDate, "dd MMM,yyyy"),
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: 2.0 * SizeConfig.textMultiplier,
|
|
|
|
|
@ -172,20 +157,16 @@ class ReferredPatientDetailScreen 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(
|
|
|
|
|
@ -198,9 +179,7 @@ class ReferredPatientDetailScreen extends StatelessWidget {
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
AppDateUtils.convertDateFromServerFormat(
|
|
|
|
|
referredPatient.referralDate,
|
|
|
|
|
"hh:mm a"),
|
|
|
|
|
AppDateUtils.convertDateFromServerFormat(referredPatient.referralDate, "hh:mm a"),
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: 1.8 * SizeConfig.textMultiplier,
|
|
|
|
|
@ -209,29 +188,25 @@ class ReferredPatientDetailScreen 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).refClinic}: ",
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: 1.7 *
|
|
|
|
|
SizeConfig.textMultiplier,
|
|
|
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
color: Color(0XFF575757),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: AppText(
|
|
|
|
|
referredPatient
|
|
|
|
|
.referralClinicDescription,
|
|
|
|
|
referredPatient.referralClinicDescription,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
fontSize: 13,
|
|
|
|
|
@ -240,29 +215,21 @@ class ReferredPatientDetailScreen extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
if (referredPatient
|
|
|
|
|
.frequencyDescription !=
|
|
|
|
|
null)
|
|
|
|
|
if (referredPatient.frequencyDescription != null)
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.frequency +
|
|
|
|
|
": ",
|
|
|
|
|
TranslationBase.of(context).frequency + ": ",
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: 1.7 *
|
|
|
|
|
SizeConfig.textMultiplier,
|
|
|
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
color: Color(0XFF575757),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: AppText(
|
|
|
|
|
referredPatient
|
|
|
|
|
.frequencyDescription,
|
|
|
|
|
referredPatient.frequencyDescription,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
@ -277,29 +244,19 @@ class ReferredPatientDetailScreen extends StatelessWidget {
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
referredPatient.nationalityName !=
|
|
|
|
|
null
|
|
|
|
|
? referredPatient.nationalityName
|
|
|
|
|
: "",
|
|
|
|
|
referredPatient.nationalityName != null ? referredPatient.nationalityName : "",
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
color: Color(0xFF2E303A),
|
|
|
|
|
fontSize:
|
|
|
|
|
1.4 * SizeConfig.textMultiplier,
|
|
|
|
|
fontSize: 1.4 * SizeConfig.textMultiplier,
|
|
|
|
|
),
|
|
|
|
|
referredPatient.nationalityFlagURL !=
|
|
|
|
|
null
|
|
|
|
|
referredPatient.nationalityFlagURL != null
|
|
|
|
|
? ClipRRect(
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.circular(20.0),
|
|
|
|
|
borderRadius: BorderRadius.circular(20.0),
|
|
|
|
|
child: Image.network(
|
|
|
|
|
referredPatient
|
|
|
|
|
.nationalityFlagURL,
|
|
|
|
|
referredPatient.nationalityFlagURL,
|
|
|
|
|
height: 25,
|
|
|
|
|
width: 30,
|
|
|
|
|
errorBuilder: (BuildContext
|
|
|
|
|
context,
|
|
|
|
|
Object exception,
|
|
|
|
|
StackTrace stackTrace) {
|
|
|
|
|
errorBuilder: (BuildContext context, Object exception, StackTrace stackTrace) {
|
|
|
|
|
return Text('No Image');
|
|
|
|
|
},
|
|
|
|
|
))
|
|
|
|
|
@ -311,16 +268,13 @@ class ReferredPatientDetailScreen extends StatelessWidget {
|
|
|
|
|
if (referredPatient.priorityDescription != null)
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).priority +
|
|
|
|
|
": ",
|
|
|
|
|
TranslationBase.of(context).priority + ": ",
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize:
|
|
|
|
|
1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
color: Color(0XFF575757),
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
@ -335,33 +289,21 @@ class ReferredPatientDetailScreen extends StatelessWidget {
|
|
|
|
|
if (referredPatient.mAXResponseTime != null)
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.maxResponseTime +
|
|
|
|
|
": ",
|
|
|
|
|
TranslationBase.of(context).maxResponseTime + ": ",
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize:
|
|
|
|
|
1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
color: Color(0XFF575757),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: AppText(
|
|
|
|
|
referredPatient.mAXResponseTime !=
|
|
|
|
|
null
|
|
|
|
|
? AppDateUtils
|
|
|
|
|
.convertDateFromServerFormat(
|
|
|
|
|
referredPatient
|
|
|
|
|
.mAXResponseTime,
|
|
|
|
|
"dd MMM,yyyy")
|
|
|
|
|
: '',
|
|
|
|
|
referredPatient.mAXResponseTime != null ? AppDateUtils.convertDateFromServerFormat(referredPatient.mAXResponseTime, "dd MMM,yyyy") : '',
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
fontSize:
|
|
|
|
|
1.8 * SizeConfig.textMultiplier,
|
|
|
|
|
fontSize: 1.8 * SizeConfig.textMultiplier,
|
|
|
|
|
color: Color(0XFF2E303A),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -371,8 +313,7 @@ class ReferredPatientDetailScreen 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_left.png',
|
|
|
|
|
height: 50,
|
|
|
|
|
@ -380,34 +321,22 @@ class ReferredPatientDetailScreen extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
|
left: 0,
|
|
|
|
|
top: 25,
|
|
|
|
|
right: 0,
|
|
|
|
|
bottom: 0),
|
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
|
left: 4.0, right: 4.0),
|
|
|
|
|
child: referredPatient.doctorImageURL !=
|
|
|
|
|
null
|
|
|
|
|
margin: EdgeInsets.only(left: 0, top: 25, right: 0, bottom: 0),
|
|
|
|
|
padding: EdgeInsets.only(left: 4.0, right: 4.0),
|
|
|
|
|
child: referredPatient.doctorImageURL != null
|
|
|
|
|
? ClipRRect(
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.circular(20.0),
|
|
|
|
|
borderRadius: BorderRadius.circular(20.0),
|
|
|
|
|
child: Image.network(
|
|
|
|
|
referredPatient.doctorImageURL,
|
|
|
|
|
height: 25,
|
|
|
|
|
width: 30,
|
|
|
|
|
errorBuilder:
|
|
|
|
|
(BuildContext context,
|
|
|
|
|
Object exception,
|
|
|
|
|
StackTrace stackTrace) {
|
|
|
|
|
errorBuilder: (BuildContext context, Object exception, StackTrace stackTrace) {
|
|
|
|
|
return Text('No Image');
|
|
|
|
|
},
|
|
|
|
|
))
|
|
|
|
|
: Container(
|
|
|
|
|
child: Image.asset(
|
|
|
|
|
referredPatient.gender == 1
|
|
|
|
|
? 'assets/images/male_avatar.png'
|
|
|
|
|
: 'assets/images/female_avatar.png',
|
|
|
|
|
referredPatient.gender == 1 ? 'assets/images/male_avatar.png' : 'assets/images/female_avatar.png',
|
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -415,30 +344,22 @@ class ReferredPatientDetailScreen extends StatelessWidget {
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 4,
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
|
left: 10,
|
|
|
|
|
top: 30,
|
|
|
|
|
right: 10,
|
|
|
|
|
bottom: 0),
|
|
|
|
|
margin: EdgeInsets.only(left: 10, top: 30, right: 10, bottom: 0),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
"${TranslationBase.of(context).dr} ${referredPatient.referralDoctorName}",
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight: FontWeight.w800,
|
|
|
|
|
fontSize: 1.5 *
|
|
|
|
|
SizeConfig.textMultiplier,
|
|
|
|
|
fontSize: 1.5 * SizeConfig.textMultiplier,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
referredPatient
|
|
|
|
|
.referralClinicDescription,
|
|
|
|
|
referredPatient.referralClinicDescription,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
fontSize: 1.3 *
|
|
|
|
|
SizeConfig.textMultiplier,
|
|
|
|
|
fontSize: 1.3 * SizeConfig.textMultiplier,
|
|
|
|
|
color: Color(0XFF2E303A),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
@ -495,8 +416,7 @@ class ReferredPatientDetailScreen extends StatelessWidget {
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
|
left: 0, top: 0, right: 4, bottom: 0),
|
|
|
|
|
margin: EdgeInsets.only(left: 0, top: 0, right: 4, bottom: 0),
|
|
|
|
|
padding: EdgeInsets.only(left: 4.0, right: 4.0),
|
|
|
|
|
child: referredPatient.doctorImageURL != null
|
|
|
|
|
? ClipRRect(
|
|
|
|
|
@ -505,17 +425,13 @@ class ReferredPatientDetailScreen extends StatelessWidget {
|
|
|
|
|
referredPatient.doctorImageURL,
|
|
|
|
|
height: 25,
|
|
|
|
|
width: 30,
|
|
|
|
|
errorBuilder: (BuildContext context,
|
|
|
|
|
Object exception,
|
|
|
|
|
StackTrace stackTrace) {
|
|
|
|
|
errorBuilder: (BuildContext context, Object exception, StackTrace stackTrace) {
|
|
|
|
|
return Text('No Image');
|
|
|
|
|
},
|
|
|
|
|
))
|
|
|
|
|
: Container(
|
|
|
|
|
child: Image.asset(
|
|
|
|
|
referredPatient.gender == 1
|
|
|
|
|
? 'assets/images/male_avatar.png'
|
|
|
|
|
: 'assets/images/female_avatar.png',
|
|
|
|
|
referredPatient.gender == 1 ? 'assets/images/male_avatar.png' : 'assets/images/female_avatar.png',
|
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -532,15 +448,11 @@ class ReferredPatientDetailScreen extends StatelessWidget {
|
|
|
|
|
color: Color(0XFF2E303A),
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
referredPatient.referredDoctorRemarks ==
|
|
|
|
|
null
|
|
|
|
|
referredPatient.referredDoctorRemarks == null
|
|
|
|
|
? ''
|
|
|
|
|
: referredPatient.referredDoctorRemarks
|
|
|
|
|
.isNotEmpty
|
|
|
|
|
? referredPatient
|
|
|
|
|
.referredDoctorRemarks
|
|
|
|
|
: TranslationBase.of(context)
|
|
|
|
|
.notRepliedYet,
|
|
|
|
|
: referredPatient.referredDoctorRemarks.isNotEmpty
|
|
|
|
|
? referredPatient.referredDoctorRemarks
|
|
|
|
|
: TranslationBase.of(context).notRepliedYet,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: 1.6 * SizeConfig.textMultiplier,
|
|
|
|
|
@ -576,8 +488,7 @@ class ReferredPatientDetailScreen extends StatelessWidget {
|
|
|
|
|
if (model.state == ViewState.ErrorLocal) {
|
|
|
|
|
DrAppToastMsg.showErrorToast(model.error);
|
|
|
|
|
} else {
|
|
|
|
|
DrAppToastMsg.showSuccesToast(
|
|
|
|
|
"Referral is acknowledged");
|
|
|
|
|
DrAppToastMsg.showSuccesToast("Referral is acknowledged");
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|