|
|
|
|
@ -88,122 +88,122 @@ class MedicalReportPage extends StatelessWidget {
|
|
|
|
|
if (model.state != ViewState.ErrorLocal)
|
|
|
|
|
...List.generate(
|
|
|
|
|
model.medicalReportList.length,
|
|
|
|
|
(index) => Container(
|
|
|
|
|
margin: EdgeInsets.symmetric(horizontal: 8),
|
|
|
|
|
child: CardWithBgWidget(
|
|
|
|
|
hasBorder: false,
|
|
|
|
|
bgColor: model.medicalReportList[index].status == 1
|
|
|
|
|
? Colors.red[700]
|
|
|
|
|
: Colors.green[700],
|
|
|
|
|
widget: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
model.medicalReportList[index].status == 1
|
|
|
|
|
? TranslationBase.of(context).onHold
|
|
|
|
|
: TranslationBase.of(context).verified,
|
|
|
|
|
color:
|
|
|
|
|
model.medicalReportList[index].status ==
|
|
|
|
|
1
|
|
|
|
|
? Colors.red[700]
|
|
|
|
|
: Colors.green[700],
|
|
|
|
|
fontSize: 1.4 * SizeConfig.textMultiplier,
|
|
|
|
|
bold: true,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
projectViewModel.isArabic
|
|
|
|
|
? model.medicalReportList[index]
|
|
|
|
|
.doctorNameN
|
|
|
|
|
: model.medicalReportList[index]
|
|
|
|
|
.doctorName,
|
|
|
|
|
fontSize: 1.9 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
color: Color(0xFF2E303A),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)),
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
'${AppDateUtils.convertDateFromServerFormat(model.medicalReportList[index].editedOn ?? model.medicalReportList[index].createdOn, "dd MMM yyyy")}',
|
|
|
|
|
color: Color(0xFF2E303A),
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: 1.6 * SizeConfig.textMultiplier,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
'${AppDateUtils.convertDateFromServerFormat(model.medicalReportList[index].editedOn ?? model.medicalReportList[index].createdOn, "hh:mm a")}',
|
|
|
|
|
color: Color(0xFF2E303A),
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: 1.5 * SizeConfig.textMultiplier,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
|
left: 0, top: 4, right: 8, bottom: 0),
|
|
|
|
|
child: LargeAvatar(
|
|
|
|
|
name: projectViewModel.isArabic
|
|
|
|
|
? model
|
|
|
|
|
.medicalReportList[index].doctorNameN
|
|
|
|
|
: model
|
|
|
|
|
.medicalReportList[index].doctorName,
|
|
|
|
|
url: model
|
|
|
|
|
.medicalReportList[index].doctorImageURL,
|
|
|
|
|
(index) => InkWell(
|
|
|
|
|
onTap: (){
|
|
|
|
|
if (model.medicalReportList[index].status ==
|
|
|
|
|
1) {
|
|
|
|
|
Navigator.of(context).pushNamed(
|
|
|
|
|
PATIENT_MEDICAL_REPORT_DETAIL,
|
|
|
|
|
arguments: {
|
|
|
|
|
'patient': patient,
|
|
|
|
|
'patientType': patientType,
|
|
|
|
|
'arrivalType': arrivalType,
|
|
|
|
|
'medicalReport':
|
|
|
|
|
model.medicalReportList[index]
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
Navigator.of(context).pushNamed(
|
|
|
|
|
PATIENT_MEDICAL_REPORT_INSERT,
|
|
|
|
|
arguments: {
|
|
|
|
|
'patient': patient,
|
|
|
|
|
'patientType': patientType,
|
|
|
|
|
'arrivalType': arrivalType,
|
|
|
|
|
'type': MedicalReportStatus.ADD,
|
|
|
|
|
'medicalReport':
|
|
|
|
|
model.medicalReportList[index]
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.symmetric(horizontal: 8),
|
|
|
|
|
child: CardWithBgWidget(
|
|
|
|
|
hasBorder: false,
|
|
|
|
|
bgColor: model.medicalReportList[index].status == 1
|
|
|
|
|
? Colors.red[700]
|
|
|
|
|
: Colors.green[700],
|
|
|
|
|
widget: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
model.medicalReportList[index].status == 1
|
|
|
|
|
? TranslationBase.of(context).onHold
|
|
|
|
|
: TranslationBase.of(context).verified,
|
|
|
|
|
color:
|
|
|
|
|
model.medicalReportList[index].status ==
|
|
|
|
|
1
|
|
|
|
|
? Colors.red[700]
|
|
|
|
|
: Colors.green[700],
|
|
|
|
|
fontSize: 1.4 * SizeConfig.textMultiplier,
|
|
|
|
|
bold: true,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
projectViewModel.isArabic
|
|
|
|
|
? model.medicalReportList[index]
|
|
|
|
|
.doctorNameN
|
|
|
|
|
: model.medicalReportList[index]
|
|
|
|
|
.doctorName,
|
|
|
|
|
fontSize: 1.9 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
color: Color(0xFF2E303A),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)),
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
'${AppDateUtils.convertDateFromServerFormat(model.medicalReportList[index].editedOn ?? model.medicalReportList[index].createdOn, "dd MMM yyyy")}',
|
|
|
|
|
color: Color(0xFF2E303A),
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: 1.6 * SizeConfig.textMultiplier,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
'${AppDateUtils.convertDateFromServerFormat(model.medicalReportList[index].editedOn ?? model.medicalReportList[index].createdOn, "hh:mm a")}',
|
|
|
|
|
color: Color(0xFF2E303A),
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: 1.5 * SizeConfig.textMultiplier,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
width: 50,
|
|
|
|
|
height: 50,
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Container(
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
|
left: 0, top: 4, right: 8, bottom: 0),
|
|
|
|
|
child: LargeAvatar(
|
|
|
|
|
name: projectViewModel.isArabic
|
|
|
|
|
? model
|
|
|
|
|
.medicalReportList[index].doctorNameN
|
|
|
|
|
: model
|
|
|
|
|
.medicalReportList[index].doctorName,
|
|
|
|
|
url: model
|
|
|
|
|
.medicalReportList[index].doctorImageURL,
|
|
|
|
|
),
|
|
|
|
|
width: 50,
|
|
|
|
|
height: 50,
|
|
|
|
|
child: AppText(
|
|
|
|
|
TranslationBase.of(context).showDetail,
|
|
|
|
|
fontSize: 1.4 * SizeConfig.textMultiplier,
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Container(
|
|
|
|
|
height: 50,
|
|
|
|
|
child: AppText(
|
|
|
|
|
TranslationBase.of(context).showDetail,
|
|
|
|
|
fontSize: 1.4 * SizeConfig.textMultiplier,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
// child: Html(
|
|
|
|
|
// data: model.medicalReportList[index]
|
|
|
|
|
// .reportDataHtml ??
|
|
|
|
|
// ""),
|
|
|
|
|
),
|
|
|
|
|
// child: Html(
|
|
|
|
|
// data: model.medicalReportList[index]
|
|
|
|
|
// .reportDataHtml ??
|
|
|
|
|
// ""),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
child: InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
if (model.medicalReportList[index].status ==
|
|
|
|
|
1) {
|
|
|
|
|
Navigator.of(context).pushNamed(
|
|
|
|
|
PATIENT_MEDICAL_REPORT_DETAIL,
|
|
|
|
|
arguments: {
|
|
|
|
|
'patient': patient,
|
|
|
|
|
'patientType': patientType,
|
|
|
|
|
'arrivalType': arrivalType,
|
|
|
|
|
'medicalReport':
|
|
|
|
|
model.medicalReportList[index]
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
Navigator.of(context).pushNamed(
|
|
|
|
|
PATIENT_MEDICAL_REPORT_INSERT,
|
|
|
|
|
arguments: {
|
|
|
|
|
'patient': patient,
|
|
|
|
|
'patientType': patientType,
|
|
|
|
|
'arrivalType': arrivalType,
|
|
|
|
|
'type': MedicalReportStatus.ADD,
|
|
|
|
|
'medicalReport':
|
|
|
|
|
model.medicalReportList[index]
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
Container(
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
|
|
|
children: [
|
|
|
|
|
@ -215,15 +215,16 @@ class MedicalReportPage extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 15,)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
|