|
|
|
|
@ -62,7 +62,7 @@ class PatientCard extends StatelessWidget {
|
|
|
|
|
decoration: Helpers.getCardBoxDecoration(),
|
|
|
|
|
child: CardWithBgWidget(
|
|
|
|
|
padding: 0,
|
|
|
|
|
marginLeft: (!isMyPatient && isInpatient) ||isFromLiveCare ? 0 : 10,
|
|
|
|
|
marginLeft: (!isMyPatient && isInpatient) || isFromLiveCare ? 0 : 10,
|
|
|
|
|
marginSymmetric: isFromSearch ? 10 : 0.0,
|
|
|
|
|
hasBorder: false,
|
|
|
|
|
bgColor: isFromLiveCare
|
|
|
|
|
@ -95,6 +95,7 @@ class PatientCard extends StatelessWidget {
|
|
|
|
|
padding: EdgeInsets.only(left: 12.0),
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
patientInfo.patientStatusType == 43
|
|
|
|
|
? Row(
|
|
|
|
|
@ -210,6 +211,8 @@ class PatientCard extends StatelessWidget {
|
|
|
|
|
? Column(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.end,
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
AppDateUtils
|
|
|
|
|
@ -221,14 +224,16 @@ class PatientCard extends StatelessWidget {
|
|
|
|
|
isMonthShort: true,
|
|
|
|
|
),
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
|
fontSize: 15,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: 11,
|
|
|
|
|
letterSpacing: -0.64,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
"${AppDateUtils.getStartTime(patientInfo.startTime)}",
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
|
fontSize: 15,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: 11,
|
|
|
|
|
letterSpacing: -0.64,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
@ -239,6 +244,8 @@ class PatientCard extends StatelessWidget {
|
|
|
|
|
? Column(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.end,
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
"${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.convertStringToDate(
|
|
|
|
|
@ -246,14 +253,16 @@ class PatientCard extends StatelessWidget {
|
|
|
|
|
.appointmentDate,
|
|
|
|
|
), isMonthShort: true)}",
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
|
fontSize: 15,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: 11,
|
|
|
|
|
letterSpacing: -0.64,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
" ${AppDateUtils.getStartTime(patientInfo.startTime)}",
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
|
fontSize: 15,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: 11,
|
|
|
|
|
letterSpacing: -0.64,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
@ -301,66 +310,66 @@ class PatientCard extends StatelessWidget {
|
|
|
|
|
textOverflow: TextOverflow.ellipsis,
|
|
|
|
|
),
|
|
|
|
|
if (patientInfo.gender == 1)
|
|
|
|
|
Icon(
|
|
|
|
|
DoctorApp.male_2,
|
|
|
|
|
color: Colors.blue,
|
|
|
|
|
size: 18,
|
|
|
|
|
)
|
|
|
|
|
Container(
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 4, vertical: 2),
|
|
|
|
|
child: SvgPicture.asset("assets/images/svgs/male.svg"),)
|
|
|
|
|
else
|
|
|
|
|
Icon(
|
|
|
|
|
DoctorApp.female_1,
|
|
|
|
|
color: Colors.pink,
|
|
|
|
|
size: 18,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 4, vertical: 2),
|
|
|
|
|
child: SvgPicture.asset("assets/images/svgs/female.svg"),),
|
|
|
|
|
if (isFromLiveCare)
|
|
|
|
|
ShowTimer(
|
|
|
|
|
patientInfo: patientInfo,
|
|
|
|
|
),
|
|
|
|
|
]),
|
|
|
|
|
),
|
|
|
|
|
if(nationalityName.isNotEmpty)
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Container(
|
|
|
|
|
padding: EdgeInsets.only(top: 8),
|
|
|
|
|
alignment: Alignment.centerRight,
|
|
|
|
|
child: AppText(
|
|
|
|
|
nationalityName.truncate(14),
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
color: Color(0xFF2E303A),
|
|
|
|
|
textOverflow: TextOverflow.ellipsis,
|
|
|
|
|
if (nationalityName.isNotEmpty)
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Container(
|
|
|
|
|
padding: EdgeInsets.only(top: 5),
|
|
|
|
|
alignment: Alignment.centerRight,
|
|
|
|
|
child: AppText(
|
|
|
|
|
nationalityName.truncate(14),
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
color: Color(0xFF2E303A),
|
|
|
|
|
textOverflow: TextOverflow.ellipsis,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
patientInfo.nationality != null ||
|
|
|
|
|
patientInfo.nationalityId != null
|
|
|
|
|
? ClipRRect(
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.circular(20.0),
|
|
|
|
|
child: CachedNetworkImage(
|
|
|
|
|
imageUrl: patientInfo
|
|
|
|
|
.nationalityFlagURL !=
|
|
|
|
|
null
|
|
|
|
|
? patientInfo.nationalityFlagURL
|
|
|
|
|
: '',
|
|
|
|
|
height: 16,
|
|
|
|
|
width: 22,
|
|
|
|
|
errorWidget:
|
|
|
|
|
(context, url, error) =>
|
|
|
|
|
AppText(
|
|
|
|
|
'No Image',
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
),
|
|
|
|
|
))
|
|
|
|
|
: SizedBox()
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
patientInfo.nationality != null ||
|
|
|
|
|
patientInfo.nationalityId != null
|
|
|
|
|
? Container(
|
|
|
|
|
padding: EdgeInsets.only(top: 5),
|
|
|
|
|
child: ClipRRect(
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.circular(20.0),
|
|
|
|
|
child: CachedNetworkImage(
|
|
|
|
|
imageUrl: patientInfo
|
|
|
|
|
.nationalityFlagURL !=
|
|
|
|
|
null
|
|
|
|
|
? patientInfo
|
|
|
|
|
.nationalityFlagURL
|
|
|
|
|
: '',
|
|
|
|
|
height: 16,
|
|
|
|
|
width: 22,
|
|
|
|
|
errorWidget:
|
|
|
|
|
(context, url, error) =>
|
|
|
|
|
AppText(
|
|
|
|
|
'No Image',
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
),
|
|
|
|
|
)),
|
|
|
|
|
)
|
|
|
|
|
: SizedBox()
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
)),
|
|
|
|
|
SizedBox(
|
|
|
|
|
@ -374,10 +383,11 @@ class PatientCard extends StatelessWidget {
|
|
|
|
|
child: Container(
|
|
|
|
|
width: 60,
|
|
|
|
|
height: 60,
|
|
|
|
|
child: Image.asset(
|
|
|
|
|
//TODO Elham* create widget for this to make it use every where
|
|
|
|
|
child: SvgPicture.asset(
|
|
|
|
|
patientInfo.gender == 1
|
|
|
|
|
? 'assets/images/male_avatar.png'
|
|
|
|
|
: 'assets/images/female_avatar.png',
|
|
|
|
|
? 'assets/images/svgs/male avatar.svg'
|
|
|
|
|
: 'assets/images/svgs/female avatar.svg',
|
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -479,9 +489,11 @@ class PatientCard extends StatelessWidget {
|
|
|
|
|
: !isInpatient && !isFromSearch
|
|
|
|
|
? Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
padding: EdgeInsets.all(4),
|
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
|
left: 13, right: 13, bottom: 13),
|
|
|
|
|
child: SvgPicture.asset(
|
|
|
|
|
patientInfo.appointmentType ==
|
|
|
|
|
'Regular' &&
|
|
|
|
|
@ -498,11 +510,16 @@ class PatientCard extends StatelessWidget {
|
|
|
|
|
: (isInpatient == true)
|
|
|
|
|
? Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
padding: EdgeInsets.all(4),
|
|
|
|
|
child: Image.asset(
|
|
|
|
|
'assets/images/inpatient.png',
|
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
|
left: 13,
|
|
|
|
|
right: 13,
|
|
|
|
|
bottom: 13),
|
|
|
|
|
child: SvgPicture.asset(
|
|
|
|
|
'assets/images/svgs/inpatient.svg',
|
|
|
|
|
height: 25,
|
|
|
|
|
width: 35,
|
|
|
|
|
)),
|
|
|
|
|
|