add copy to patient cart

fixes_before_live
Elham Rababh 5 years ago
parent a5f3731b9a
commit c17f9fb91d

@ -35,7 +35,6 @@ class PatientCard extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
width: SizeConfig.screenWidth * 0.9,
margin: EdgeInsets.all(6),
@ -260,9 +259,9 @@ class PatientCard extends StatelessWidget {
patientInfo.fullName)
: (Helpers.capitalize(
patientInfo.firstName) +
" " +
Helpers.capitalize(
patientInfo.lastName)),
" " +
Helpers.capitalize(
patientInfo.lastName)),
fontSize: 16,
color: Color(0xff2e303a),
fontWeight: FontWeight.w700,
@ -270,7 +269,6 @@ class PatientCard extends StatelessWidget {
textOverflow: TextOverflow.ellipsis,
),
),
if (patientInfo.gender == 1)
Icon(
DoctorApp.male_2,
@ -281,9 +279,10 @@ class PatientCard extends StatelessWidget {
DoctorApp.female_1,
color: Colors.pink,
),
if(isFromLiveCare)
ShowTimer(patientInfo: patientInfo,),
if (isFromLiveCare)
ShowTimer(
patientInfo: patientInfo,
),
]),
),
Row(
@ -351,129 +350,45 @@ class PatientCard extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
child: RichText(
text: new TextSpan(
style: new TextStyle(
fontSize: 2.0 * SizeConfig.textMultiplier,
color: Colors.black),
children: <TextSpan>[
new TextSpan(
text: TranslationBase.of(context)
.fileNumber,
style: TextStyle(
fontSize: 12,
fontFamily: 'Poppins')),
new TextSpan(
text: patientInfo.patientId.toString(),
style: TextStyle(
fontWeight: FontWeight.w700,
fontFamily: 'Poppins',
fontSize: 13)),
],
),
),
CustomRow(
label: TranslationBase.of(context).fileNumber,
value: patientInfo.patientId.toString(),
),
//if (isInpatient)
Container(
child: RichText(
text: new TextSpan(
style: new TextStyle(
fontSize: 2.0 * SizeConfig.textMultiplier,
color: Colors.black,
fontFamily: 'Poppins',
),
children: <TextSpan>[
new TextSpan(
text: TranslationBase.of(context).age +
" : ",
style: TextStyle(fontSize: 12)),
new TextSpan(
text:
"${AppDateUtils.getAgeByBirthday(patientInfo.dateofBirth, context, isServerFormat: !isFromLiveCare)}",
style: TextStyle(
fontWeight: FontWeight.w700,
fontSize: 13)),
],
),
),
CustomRow(
label: TranslationBase.of(context).age + " : ",
value:
"${AppDateUtils.getAgeByBirthday(patientInfo.dateofBirth, context, isServerFormat: !isFromLiveCare)}",
),
if (isInpatient)
Container(
child: RichText(
text: new TextSpan(
style: new TextStyle(
fontSize:
2.0 * SizeConfig.textMultiplier,
color: Colors.black,
fontFamily: 'Poppins',
),
children: <TextSpan>[
new TextSpan(
text: patientInfo.admissionDate == null
? ""
: TranslationBase.of(context)
.admissionDate +
" : ",
style: TextStyle(fontSize: 12)),
new TextSpan(
text: patientInfo.admissionDate == null
? ""
: "${AppDateUtils.convertDateFromServerFormat(patientInfo.admissionDate.toString(), 'yyyy-MM-dd')}",
style: TextStyle(
fontWeight: FontWeight.w700,
fontSize: 13)),
]))),
CustomRow(
label: patientInfo.admissionDate == null
? ""
: TranslationBase.of(context)
.admissionDate +
" : ",
value: patientInfo.admissionDate == null
? ""
: "${AppDateUtils.convertDateFromServerFormat(patientInfo.admissionDate.toString(), 'yyyy-MM-dd')}",
),
if (patientInfo.admissionDate != null)
Container(
child: RichText(
text: new TextSpan(
style: new TextStyle(
fontSize:
2.0 * SizeConfig.textMultiplier,
color: Colors.black,
fontFamily: 'Poppins',
),
children: <TextSpan>[
new TextSpan(
text: TranslationBase.of(context)
.numOfDays +
" : ",
style: TextStyle(fontSize: 12)),
new TextSpan(
text:
"${DateTime.now().difference(AppDateUtils.getDateTimeFromServerFormat(patientInfo.admissionDate)).inDays + 1}",
style: TextStyle(
fontWeight: FontWeight.w700,
fontSize: 13)),
]))),
CustomRow(
label: TranslationBase.of(context).numOfDays +
" : ",
value:
"${DateTime.now().difference(AppDateUtils.getDateTimeFromServerFormat(patientInfo.admissionDate)).inDays + 1}",
),
if (isFromLiveCare)
Column(
children: [
Container(
child: RichText(
text: new TextSpan(
style: new TextStyle(
fontSize: 2.0 * SizeConfig.textMultiplier,
color: Colors.black,
fontFamily: 'Poppins',
),
children: <TextSpan>[
new TextSpan(
text:
TranslationBase.of(context).clinic +
" : ",
style: TextStyle(fontSize: 12)),
new TextSpan(
text:
patientInfo.clinicName,
style: TextStyle(
fontWeight: FontWeight.w700,
fontSize: 13)),
],
),
),
),
CustomRow(label: TranslationBase.of(context)
.clinic +
" : ",value: patientInfo.clinicName,),
],
),
]))
@ -522,14 +437,47 @@ class PatientCard extends StatelessWidget {
height: 25,
width: 35,
)),
])
: SizedBox()
])
: SizedBox()
],
),
onTap: onTap,
)),
));
}
}
class CustomRow extends StatelessWidget {
const CustomRow({
Key key,
this.label,
this.value,
}) : super(key: key);
final String label;
final String value;
}
@override
Widget build(BuildContext context) {
return Row(
children: [
AppText(
label,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 2.8,
color: Color(0xFF575757),
fontWeight: FontWeight.w600,
),
SizedBox(
width: 1,
),
AppText(
value,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3,
color: Color(0xFF2E303A),
fontWeight: FontWeight.w700,
isCopyable: true,
),
],
);
}
}

@ -103,6 +103,7 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget {
fontWeight: FontWeight.bold,
fontFamily: 'Poppins',
color: Color(0xFF2B353E),
isCopyable: true,
),
),
gender == 1
@ -347,112 +348,46 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget {
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3.5,
isCopyable: true,
),
if (orderNo != null && !isPrescriptions)
Row(
children: <Widget>[
AppText(
'Order No: ',
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3,
fontWeight: FontWeight.w600,
color: Color(0xFF575757),
),
AppText(orderNo ?? '', fontSize: 12)
],
HeaderRow(
label: 'Order No: ',
value: orderNo ?? '',
),
if (invoiceNO != null && !isPrescriptions)
Row(
children: <Widget>[
AppText(
'Invoice: ',
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3,
fontWeight: FontWeight.w600,
color: Color(0xFF575757),
),
AppText(invoiceNO ?? "", fontSize: 12)
],
HeaderRow(
label: 'Invoice: ',
value: invoiceNO ?? "",
),
if (branch != null)
Row(
children: [
AppText(
'Branch: ',
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3,
fontWeight: FontWeight.w600,
color: Color(0xFF575757),
),
AppText(branch ?? '', fontSize: 12)
],
HeaderRow(
label: 'Branch: ',
value: branch ?? '',
),
if (clinic != null)
Row(
children: [
AppText(
'Clinic: ',
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3,
fontWeight: FontWeight.w600,
color: Color(0xFF575757),
),
AppText(clinic ?? '', fontSize: 12)
],
HeaderRow(
label: 'Clinic: ',
value: clinic ?? '',
),
if (isMedicalFile && episode != null)
Row(
children: [
AppText(
'Episode: ',
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3,
fontWeight: FontWeight.w600,
color: Color(0xFF575757),
),
AppText(episode ?? '', fontSize: 12)
],
HeaderRow(
label: 'Episode: ',
value: episode ?? '',
),
if (isMedicalFile && visitDate != null)
Row(
children: [
AppText(
'Visit Date: ',
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3,
fontWeight: FontWeight.w600,
color: Color(0xFF575757),
),
AppText(visitDate ?? '', fontSize: 12)
],
HeaderRow(
label: 'Visit Date: ',
value: visitDate ?? '',
),
if (!isMedicalFile)
Row(
children: <Widget>[
AppText(
!isPrescriptions
? 'Result Date:'
: 'Prescriptions Date ',
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3,
fontWeight: FontWeight.w600,
color: Color(0xFF575757),
),
AppText(
HeaderRow(
label: !isPrescriptions
? 'Result Date:'
: 'Prescriptions Date ',
value:
'${AppDateUtils.getDayMonthYearDateFormatted(appointmentDate, isArabic: projectViewModel.isArabic)}',
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3.5,
)
],
)
),
]),
),
),
@ -497,6 +432,7 @@ class HeaderRow extends StatelessWidget {
children: [
AppText(
label,
isCopyable: true,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3,
color: Color(0xFF575757),
fontWeight: FontWeight.w600,

Loading…
Cancel
Save