|
|
|
|
@ -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,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|