|
|
|
@ -10,9 +10,12 @@ import 'package:doctor_app_flutter/util/date-utils.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/util/helpers.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/doctor_card.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:hexcolor/hexcolor.dart';
|
|
|
|
@ -36,6 +39,8 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
|
|
|
|
|
builder:
|
|
|
|
|
(BuildContext context, MedicalFileViewModel model, Widget child) =>
|
|
|
|
|
AppScaffold(
|
|
|
|
|
appBar: PatientProfileHeaderNewDesignAppBar(
|
|
|
|
|
patient, patientType.toString() ?? "0", patientType),
|
|
|
|
|
isShowAppBar: true,
|
|
|
|
|
appBarTitle: TranslationBase.of(context).medicalReport.toUpperCase(),
|
|
|
|
|
body: NetworkBaseView(
|
|
|
|
@ -48,8 +53,8 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
|
|
|
|
|
// ? MainAxisAlignment.start
|
|
|
|
|
// : MainAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
PatientProfileHeaderNewDesign(
|
|
|
|
|
patient, patient.patientType.toString(), arrivalType),
|
|
|
|
|
// PatientProfileHeaderNewDesign(
|
|
|
|
|
// patient, patient.patientType.toString(), arrivalType),
|
|
|
|
|
Padding(
|
|
|
|
|
padding:
|
|
|
|
|
EdgeInsets.symmetric(horizontal: 12.0, vertical: 8.0),
|
|
|
|
@ -92,181 +97,215 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
|
|
|
|
|
itemCount: model.medicalFileList[0].entityList[0]
|
|
|
|
|
.timelines.length,
|
|
|
|
|
itemBuilder: (BuildContext ctxt, int index) {
|
|
|
|
|
return Padding(
|
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
|
horizontal: 12.0, vertical: 8.0),
|
|
|
|
|
child: InkWell(
|
|
|
|
|
child: Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
|
top: 10, left: 10, right: 10),
|
|
|
|
|
padding: EdgeInsets.all(8.0),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
|
Radius.circular(10.0),
|
|
|
|
|
),
|
|
|
|
|
border: Border.all(
|
|
|
|
|
color: Colors.grey[200], width: 0.5),
|
|
|
|
|
),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
model
|
|
|
|
|
.medicalFileList[0]
|
|
|
|
|
.entityList[0]
|
|
|
|
|
.timelines[index]
|
|
|
|
|
.doctorName,
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
fontSize: 17.0,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
Helpers.convertStringToDate(model
|
|
|
|
|
.medicalFileList[0]
|
|
|
|
|
.entityList[0]
|
|
|
|
|
.timelines[index]
|
|
|
|
|
.date)
|
|
|
|
|
.day
|
|
|
|
|
.toString() +
|
|
|
|
|
"/",
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
Helpers.convertStringToDate(model
|
|
|
|
|
.medicalFileList[0]
|
|
|
|
|
.entityList[0]
|
|
|
|
|
.timelines[index]
|
|
|
|
|
.date)
|
|
|
|
|
.month
|
|
|
|
|
.toString() +
|
|
|
|
|
"/",
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
Helpers.convertStringToDate(
|
|
|
|
|
model
|
|
|
|
|
.medicalFileList[0]
|
|
|
|
|
.entityList[0]
|
|
|
|
|
.timelines[index]
|
|
|
|
|
.date)
|
|
|
|
|
.year
|
|
|
|
|
.toString(),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
ClipRRect(
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.all(
|
|
|
|
|
Radius.circular(30)),
|
|
|
|
|
child: Image.network(
|
|
|
|
|
'https://previews.123rf.com/images/yupiramos/yupiramos1705/yupiramos170524444/78443570-a-female-doctor-avatar-character-vector-illustration-design.jpg',
|
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
|
width: 60,
|
|
|
|
|
height: 70,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.clinic +
|
|
|
|
|
": ",
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
model
|
|
|
|
|
.medicalFileList[0]
|
|
|
|
|
.entityList[0]
|
|
|
|
|
.timelines[index]
|
|
|
|
|
.clinicName,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment
|
|
|
|
|
.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.branch +
|
|
|
|
|
": ",
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
model
|
|
|
|
|
.medicalFileList[0]
|
|
|
|
|
.entityList[0]
|
|
|
|
|
.timelines[index]
|
|
|
|
|
.projectName,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.end,
|
|
|
|
|
children: [
|
|
|
|
|
Column(
|
|
|
|
|
children: [
|
|
|
|
|
Icon(
|
|
|
|
|
Icons.remove_red_eye,
|
|
|
|
|
size: 30.0,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
return InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
builder: (context) => MedicalFileDetails(
|
|
|
|
|
age: patient.age,
|
|
|
|
|
firstName: patient.firstName,
|
|
|
|
|
lastName: patient.lastName,
|
|
|
|
|
gender: patient.genderDescription,
|
|
|
|
|
encounterNumber: index,
|
|
|
|
|
pp: patient.patientId,
|
|
|
|
|
patient: patient,
|
|
|
|
|
)),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
child: DoctorCard(
|
|
|
|
|
doctorName: model.medicalFileList[0]
|
|
|
|
|
.entityList[0].timelines[index].doctorName,
|
|
|
|
|
clinic: model.medicalFileList[0].entityList[0]
|
|
|
|
|
.timelines[index].clinicName,
|
|
|
|
|
branch: model.medicalFileList[0].entityList[0]
|
|
|
|
|
.timelines[index].projectName,
|
|
|
|
|
profileUrl:
|
|
|
|
|
'https://previews.123rf.com/images/yupiramos/yupiramos1705/yupiramos170524444/78443570-a-female-doctor-avatar-character-vector-illustration-design.jpg',
|
|
|
|
|
appointmentDate:
|
|
|
|
|
DateUtils.getDateTimeFromServerFormat(
|
|
|
|
|
model.medicalFileList[0].entityList[0]
|
|
|
|
|
.timelines[index].date,
|
|
|
|
|
),
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
builder: (context) =>
|
|
|
|
|
MedicalFileDetails(
|
|
|
|
|
age: patient.age,
|
|
|
|
|
firstName: patient.firstName,
|
|
|
|
|
lastName: patient.lastName,
|
|
|
|
|
gender: patient.genderDescription,
|
|
|
|
|
encounterNumber: index,
|
|
|
|
|
pp: patient.patientId,
|
|
|
|
|
patient: patient,
|
|
|
|
|
)),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
isPrescriptions: true,
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
// return Padding(
|
|
|
|
|
// padding: EdgeInsets.symmetric(
|
|
|
|
|
// horizontal: 12.0, vertical: 8.0),
|
|
|
|
|
// child: InkWell(
|
|
|
|
|
// child: Container(
|
|
|
|
|
// width: double.infinity,
|
|
|
|
|
// margin: EdgeInsets.only(
|
|
|
|
|
// top: 10, left: 10, right: 10),
|
|
|
|
|
// padding: EdgeInsets.all(8.0),
|
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
|
// color: Colors.white,
|
|
|
|
|
// borderRadius: BorderRadius.all(
|
|
|
|
|
// Radius.circular(10.0),
|
|
|
|
|
// ),
|
|
|
|
|
// border: Border.all(
|
|
|
|
|
// color: Colors.grey[200], width: 0.5),
|
|
|
|
|
// ),
|
|
|
|
|
// child: Column(
|
|
|
|
|
// children: [
|
|
|
|
|
// Row(
|
|
|
|
|
// mainAxisAlignment:
|
|
|
|
|
// MainAxisAlignment.spaceBetween,
|
|
|
|
|
// children: [
|
|
|
|
|
// Row(
|
|
|
|
|
// children: [
|
|
|
|
|
// AppText(
|
|
|
|
|
// model
|
|
|
|
|
// .medicalFileList[0]
|
|
|
|
|
// .entityList[0]
|
|
|
|
|
// .timelines[index]
|
|
|
|
|
// .doctorName,
|
|
|
|
|
// fontWeight: FontWeight.w700,
|
|
|
|
|
// fontSize: 17.0,
|
|
|
|
|
// fontFamily: 'Poppins',
|
|
|
|
|
// )
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// Row(
|
|
|
|
|
// children: [
|
|
|
|
|
// AppText(
|
|
|
|
|
// Helpers.convertStringToDate(model
|
|
|
|
|
// .medicalFileList[0]
|
|
|
|
|
// .entityList[0]
|
|
|
|
|
// .timelines[index]
|
|
|
|
|
// .date)
|
|
|
|
|
// .day
|
|
|
|
|
// .toString() +
|
|
|
|
|
// "/",
|
|
|
|
|
// ),
|
|
|
|
|
// AppText(
|
|
|
|
|
// Helpers.convertStringToDate(model
|
|
|
|
|
// .medicalFileList[0]
|
|
|
|
|
// .entityList[0]
|
|
|
|
|
// .timelines[index]
|
|
|
|
|
// .date)
|
|
|
|
|
// .month
|
|
|
|
|
// .toString() +
|
|
|
|
|
// "/",
|
|
|
|
|
// ),
|
|
|
|
|
// AppText(
|
|
|
|
|
// Helpers.convertStringToDate(
|
|
|
|
|
// model
|
|
|
|
|
// .medicalFileList[0]
|
|
|
|
|
// .entityList[0]
|
|
|
|
|
// .timelines[index]
|
|
|
|
|
// .date)
|
|
|
|
|
// .year
|
|
|
|
|
// .toString(),
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// )
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// Row(
|
|
|
|
|
// mainAxisAlignment:
|
|
|
|
|
// MainAxisAlignment.start,
|
|
|
|
|
// children: [
|
|
|
|
|
// Padding(
|
|
|
|
|
// padding: const EdgeInsets.all(8.0),
|
|
|
|
|
// child: Column(
|
|
|
|
|
// children: [
|
|
|
|
|
// ClipRRect(
|
|
|
|
|
// borderRadius:
|
|
|
|
|
// BorderRadius.all(
|
|
|
|
|
// Radius.circular(30)),
|
|
|
|
|
// child: Image.network(
|
|
|
|
|
// 'https://previews.123rf.com/images/yupiramos/yupiramos1705/yupiramos170524444/78443570-a-female-doctor-avatar-character-vector-illustration-design.jpg',
|
|
|
|
|
// fit: BoxFit.cover,
|
|
|
|
|
// width: 60,
|
|
|
|
|
// height: 70,
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// Column(
|
|
|
|
|
// crossAxisAlignment:
|
|
|
|
|
// CrossAxisAlignment.start,
|
|
|
|
|
// children: [
|
|
|
|
|
// Row(
|
|
|
|
|
// children: [
|
|
|
|
|
// AppText(
|
|
|
|
|
// TranslationBase.of(context)
|
|
|
|
|
// .clinic +
|
|
|
|
|
// ": ",
|
|
|
|
|
// ),
|
|
|
|
|
// AppText(
|
|
|
|
|
// model
|
|
|
|
|
// .medicalFileList[0]
|
|
|
|
|
// .entityList[0]
|
|
|
|
|
// .timelines[index]
|
|
|
|
|
// .clinicName,
|
|
|
|
|
// fontWeight: FontWeight.w600,
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// Row(
|
|
|
|
|
// mainAxisAlignment:
|
|
|
|
|
// MainAxisAlignment
|
|
|
|
|
// .spaceBetween,
|
|
|
|
|
// children: [
|
|
|
|
|
// AppText(
|
|
|
|
|
// TranslationBase.of(context)
|
|
|
|
|
// .branch +
|
|
|
|
|
// ": ",
|
|
|
|
|
// ),
|
|
|
|
|
// AppText(
|
|
|
|
|
// model
|
|
|
|
|
// .medicalFileList[0]
|
|
|
|
|
// .entityList[0]
|
|
|
|
|
// .timelines[index]
|
|
|
|
|
// .projectName,
|
|
|
|
|
// fontWeight: FontWeight.w600,
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// Row(
|
|
|
|
|
// mainAxisAlignment:
|
|
|
|
|
// MainAxisAlignment.end,
|
|
|
|
|
// children: [
|
|
|
|
|
// Column(
|
|
|
|
|
// children: [
|
|
|
|
|
// Icon(
|
|
|
|
|
// Icons.remove_red_eye,
|
|
|
|
|
// size: 30.0,
|
|
|
|
|
// )
|
|
|
|
|
// ],
|
|
|
|
|
// )
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// onTap: () {
|
|
|
|
|
// Navigator.push(
|
|
|
|
|
// context,
|
|
|
|
|
// MaterialPageRoute(
|
|
|
|
|
// builder: (context) =>
|
|
|
|
|
// MedicalFileDetails(
|
|
|
|
|
// age: patient.age,
|
|
|
|
|
// firstName: patient.firstName,
|
|
|
|
|
// lastName: patient.lastName,
|
|
|
|
|
// gender: patient.genderDescription,
|
|
|
|
|
// encounterNumber: index,
|
|
|
|
|
// pp: patient.patientId,
|
|
|
|
|
// patient: patient,
|
|
|
|
|
// )),
|
|
|
|
|
// );
|
|
|
|
|
// },
|
|
|
|
|
// ),
|
|
|
|
|
// );
|
|
|
|
|
})
|
|
|
|
|
: Column(
|
|
|
|
|
children: [
|
|
|
|
|