|
|
|
@ -12,6 +12,7 @@ import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
|
|
|
|
class PatientReferralItemWidget extends StatelessWidget {
|
|
|
|
class PatientReferralItemWidget extends StatelessWidget {
|
|
|
|
final String referralStatus;
|
|
|
|
final String referralStatus;
|
|
|
|
|
|
|
|
final int referralStatusCode;
|
|
|
|
final String patientName;
|
|
|
|
final String patientName;
|
|
|
|
final int patientGender;
|
|
|
|
final int patientGender;
|
|
|
|
final String referredDate;
|
|
|
|
final String referredDate;
|
|
|
|
@ -29,6 +30,7 @@ class PatientReferralItemWidget extends StatelessWidget {
|
|
|
|
|
|
|
|
|
|
|
|
PatientReferralItemWidget(
|
|
|
|
PatientReferralItemWidget(
|
|
|
|
{this.referralStatus,
|
|
|
|
{this.referralStatus,
|
|
|
|
|
|
|
|
this.referralStatusCode,
|
|
|
|
this.patientName,
|
|
|
|
this.patientName,
|
|
|
|
this.patientGender,
|
|
|
|
this.patientGender,
|
|
|
|
this.referredDate,
|
|
|
|
this.referredDate,
|
|
|
|
@ -54,11 +56,11 @@ class PatientReferralItemWidget extends StatelessWidget {
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
child: CardWithBgWidget(
|
|
|
|
child: CardWithBgWidget(
|
|
|
|
bgColor: referralStatus != null
|
|
|
|
bgColor: referralStatusCode == 1
|
|
|
|
? referralStatus == 'Pending'
|
|
|
|
? Color(0xffc4aa54)
|
|
|
|
? Color(0xffc4aa54)
|
|
|
|
: referralStatusCode == 46
|
|
|
|
: Colors.red[800]
|
|
|
|
? Colors.green[700]
|
|
|
|
: Colors.grey[500],
|
|
|
|
: Colors.red[700],
|
|
|
|
hasBorder: false,
|
|
|
|
hasBorder: false,
|
|
|
|
widget: Container(
|
|
|
|
widget: Container(
|
|
|
|
// padding: EdgeInsets.only(left: 20, right: 0, bottom: 0),
|
|
|
|
// padding: EdgeInsets.only(left: 20, right: 0, bottom: 0),
|
|
|
|
@ -74,13 +76,11 @@ class PatientReferralItemWidget extends StatelessWidget {
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
fontSize: 1.9 * SizeConfig.textMultiplier,
|
|
|
|
fontSize: 1.9 * SizeConfig.textMultiplier,
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
color: referralStatus != null
|
|
|
|
color: referralStatusCode == 1
|
|
|
|
? referralStatus == 'Pending'
|
|
|
|
? Color(0xffc4aa54)
|
|
|
|
? Color(0xffc4aa54)
|
|
|
|
: referralStatusCode == 46
|
|
|
|
: referralStatus == 'Accepted'
|
|
|
|
? Colors.green[700]
|
|
|
|
? Colors.green[700]
|
|
|
|
: Colors.red[700],
|
|
|
|
: Colors.red[700]
|
|
|
|
|
|
|
|
: Colors.grey[500],
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
AppText(
|
|
|
|
AppText(
|
|
|
|
referredDate,
|
|
|
|
referredDate,
|
|
|
|
@ -222,6 +222,7 @@ class PatientReferralItemWidget extends StatelessWidget {
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
fontSize: 1.8 * SizeConfig.textMultiplier,
|
|
|
|
fontSize: 1.8 * SizeConfig.textMultiplier,
|
|
|
|
color: Color(0XFF2E303A),
|
|
|
|
color: Color(0XFF2E303A),
|
|
|
|
|
|
|
|
maxLines: 1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
@ -246,18 +247,27 @@ class PatientReferralItemWidget extends StatelessWidget {
|
|
|
|
child: Container(
|
|
|
|
child: Container(
|
|
|
|
width: 40,
|
|
|
|
width: 40,
|
|
|
|
height: 40,
|
|
|
|
height: 40,
|
|
|
|
child: doctorAvatar !=null?ClipRRect(
|
|
|
|
child: doctorAvatar != null
|
|
|
|
borderRadius: BorderRadius.circular(20.0),
|
|
|
|
? ClipRRect(
|
|
|
|
child: Image.network(
|
|
|
|
borderRadius: BorderRadius.circular(20.0),
|
|
|
|
doctorAvatar,
|
|
|
|
child: Image.network(
|
|
|
|
height: 25,
|
|
|
|
doctorAvatar,
|
|
|
|
width: 30,
|
|
|
|
height: 25,
|
|
|
|
errorBuilder: (BuildContext context,
|
|
|
|
width: 30,
|
|
|
|
Object exception,
|
|
|
|
errorBuilder: (BuildContext context,
|
|
|
|
StackTrace stackTrace) {
|
|
|
|
Object exception,
|
|
|
|
return Text('No Image');
|
|
|
|
StackTrace stackTrace) {
|
|
|
|
},
|
|
|
|
return Text('No Image');
|
|
|
|
)):Container(),
|
|
|
|
},
|
|
|
|
|
|
|
|
))
|
|
|
|
|
|
|
|
: Container(
|
|
|
|
|
|
|
|
child: Image.asset(
|
|
|
|
|
|
|
|
patientGender == 1
|
|
|
|
|
|
|
|
? 'assets/images/male_avatar.png'
|
|
|
|
|
|
|
|
: 'assets/images/female_avatar.png',
|
|
|
|
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
@ -266,14 +276,23 @@ class PatientReferralItemWidget extends StatelessWidget {
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
left: 10, top: 25, right: 10, bottom: 0),
|
|
|
|
left: 10, top: 25, right: 10, bottom: 0),
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
AppText(
|
|
|
|
AppText(
|
|
|
|
referralDoctorName,
|
|
|
|
referralDoctorName,
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
fontWeight: FontWeight.w800,
|
|
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
color: Color(0XFF2E303A),
|
|
|
|
color: Colors.black,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
if (clinicDescription != null)
|
|
|
|
|
|
|
|
AppText(
|
|
|
|
|
|
|
|
clinicDescription,
|
|
|
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
|
|
|
fontSize: 1.4 * SizeConfig.textMultiplier,
|
|
|
|
|
|
|
|
color: Color(0XFF2E303A),
|
|
|
|
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|