|
|
|
@ -20,8 +20,7 @@ class ReferralPatientDetailScreen extends StatelessWidget {
|
|
|
|
|
final MyReferralPatientModel referredPatient;
|
|
|
|
|
final PatientReferralViewModel patientReferralViewModel;
|
|
|
|
|
|
|
|
|
|
ReferralPatientDetailScreen(
|
|
|
|
|
this.referredPatient, this.patientReferralViewModel);
|
|
|
|
|
ReferralPatientDetailScreen(this.referredPatient, this.patientReferralViewModel);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
@ -52,8 +51,7 @@ class ReferralPatientDetailScreen extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: AppText(
|
|
|
|
|
(Helpers.capitalize(
|
|
|
|
|
"${referredPatient.firstName} ${referredPatient.lastName}")),
|
|
|
|
|
(Helpers.capitalize("${referredPatient.firstName} ${referredPatient.lastName}")),
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 2.5,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
@ -70,18 +68,14 @@ class ReferralPatientDetailScreen extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
PatiantInformtion patient = model
|
|
|
|
|
.getPatientFromReferralO(referredPatient);
|
|
|
|
|
Navigator.of(context)
|
|
|
|
|
.pushNamed(PATIENTS_PROFILE, arguments: {
|
|
|
|
|
PatiantInformtion patient = model.getPatientFromReferralO(referredPatient);
|
|
|
|
|
Navigator.of(context).pushNamed(PATIENTS_PROFILE, arguments: {
|
|
|
|
|
"patient": patient,
|
|
|
|
|
"patientType": "1",
|
|
|
|
|
"isInpatient": true,
|
|
|
|
|
"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(
|
|
|
|
@ -98,18 +92,14 @@ class ReferralPatientDetailScreen extends StatelessWidget {
|
|
|
|
|
children: [
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
PatiantInformtion patient = model
|
|
|
|
|
.getPatientFromReferralO(referredPatient);
|
|
|
|
|
Navigator.of(context)
|
|
|
|
|
.pushNamed(PATIENTS_PROFILE, arguments: {
|
|
|
|
|
PatiantInformtion patient = model.getPatientFromReferralO(referredPatient);
|
|
|
|
|
Navigator.of(context).pushNamed(PATIENTS_PROFILE, arguments: {
|
|
|
|
|
"patient": patient,
|
|
|
|
|
"patientType": "1",
|
|
|
|
|
"isInpatient": true,
|
|
|
|
|
"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: Padding(
|
|
|
|
@ -144,8 +134,7 @@ class ReferralPatientDetailScreen extends StatelessWidget {
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
"${model.getReferralStatusNameByCode(referredPatient.referralStatus, context)}",
|
|
|
|
@ -170,28 +159,23 @@ class ReferralPatientDetailScreen 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(
|
|
|
|
|
"${referredPatient.patientID}",
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
fontSize:
|
|
|
|
|
1.8 * SizeConfig.textMultiplier,
|
|
|
|
|
fontSize: 1.8 * SizeConfig.textMultiplier,
|
|
|
|
|
color: Color(0XFF2E303A),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
@ -208,35 +192,29 @@ class ReferralPatientDetailScreen extends StatelessWidget {
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.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
|
|
|
|
|
.referringClinicDescription,
|
|
|
|
|
referredPatient.referringClinicDescription,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
fontSize: 1.8 *
|
|
|
|
|
SizeConfig.textMultiplier,
|
|
|
|
|
fontSize: 1.8 * SizeConfig.textMultiplier,
|
|
|
|
|
color: Color(0XFF2E303A),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
@ -244,31 +222,22 @@ class ReferralPatientDetailScreen extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
if (referredPatient.frequency != 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: 1.8 *
|
|
|
|
|
SizeConfig
|
|
|
|
|
.textMultiplier,
|
|
|
|
|
fontSize: 1.8 * SizeConfig.textMultiplier,
|
|
|
|
|
color: Color(0XFF2E303A),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
@ -280,29 +249,22 @@ class ReferralPatientDetailScreen extends StatelessWidget {
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
referredPatient.nationalityName !=
|
|
|
|
|
null
|
|
|
|
|
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');
|
|
|
|
|
},
|
|
|
|
|
))
|
|
|
|
@ -314,26 +276,21 @@ class ReferralPatientDetailScreen 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),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: AppText(
|
|
|
|
|
referredPatient.priorityDescription ??
|
|
|
|
|
'',
|
|
|
|
|
referredPatient.priorityDescription ?? '',
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
fontSize:
|
|
|
|
|
1.8 * SizeConfig.textMultiplier,
|
|
|
|
|
fontSize: 1.8 * SizeConfig.textMultiplier,
|
|
|
|
|
color: Color(0XFF2E303A),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
@ -342,33 +299,24 @@ class ReferralPatientDetailScreen 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),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
@ -378,8 +326,7 @@ class ReferralPatientDetailScreen 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,
|
|
|
|
@ -387,26 +334,17 @@ class ReferralPatientDetailScreen 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) {
|
|
|
|
|
(BuildContext context, Object exception, StackTrace stackTrace) {
|
|
|
|
|
return Text('No Image');
|
|
|
|
|
},
|
|
|
|
|
))
|
|
|
|
@ -422,30 +360,22 @@ class ReferralPatientDetailScreen 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.referringDoctorName}",
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight: FontWeight.w800,
|
|
|
|
|
fontSize: 1.5 *
|
|
|
|
|
SizeConfig.textMultiplier,
|
|
|
|
|
fontSize: 1.5 * SizeConfig.textMultiplier,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
referredPatient
|
|
|
|
|
.referringClinicDescription,
|
|
|
|
|
referredPatient.referringClinicDescription,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
fontSize: 1.3 *
|
|
|
|
|
SizeConfig.textMultiplier,
|
|
|
|
|
fontSize: 1.3 * SizeConfig.textMultiplier,
|
|
|
|
|
color: Color(0XFF2E303A),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
@ -469,10 +399,8 @@ class ReferralPatientDetailScreen extends StatelessWidget {
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
margin:
|
|
|
|
|
EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
|
|
|
|
padding:
|
|
|
|
|
EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
|
|
|
|
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
@ -508,10 +436,8 @@ class ReferralPatientDetailScreen extends StatelessWidget {
|
|
|
|
|
if (referredPatient.referredDoctorRemarks.isNotEmpty)
|
|
|
|
|
Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
margin:
|
|
|
|
|
EdgeInsets.symmetric(horizontal: 16, vertical: 0),
|
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
|
horizontal: 16, vertical: 16),
|
|
|
|
|
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 0),
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
@ -566,8 +492,7 @@ class ReferralPatientDetailScreen extends StatelessWidget {
|
|
|
|
|
widget: AddReplayOnReferralPatient(
|
|
|
|
|
patientReferralViewModel: patientReferralViewModel,
|
|
|
|
|
myReferralInPatientModel: referredPatient,
|
|
|
|
|
isEdited: referredPatient
|
|
|
|
|
.referredDoctorRemarks.isNotEmpty,
|
|
|
|
|
isEdited: referredPatient.referredDoctorRemarks.isNotEmpty,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|