|
|
|
@ -22,7 +22,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
|
|
|
|
|
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
|
|
|
|
|
patient = routeArgs['patient'];
|
|
|
|
|
return BaseView<MedicalFileViewModel>(
|
|
|
|
|
onModelReady: (model) => model.getMedicalFile(),
|
|
|
|
|
onModelReady: (model) => model.getMedicalFile(mrn: patient.patientMRN),
|
|
|
|
|
builder:
|
|
|
|
|
(BuildContext context, MedicalFileViewModel model, Widget child) =>
|
|
|
|
|
AppScaffold(
|
|
|
|
@ -30,140 +30,147 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
|
|
|
|
|
appBarTitle: 'medical Report'.toUpperCase(),
|
|
|
|
|
body: NetworkBaseView(
|
|
|
|
|
baseViewModel: model,
|
|
|
|
|
child: Container(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.all(8.0),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AvatarWidget(
|
|
|
|
|
Icon(
|
|
|
|
|
patient.genderDescription == "Male"
|
|
|
|
|
? DoctorApp.male
|
|
|
|
|
: DoctorApp.female_icon,
|
|
|
|
|
size: 70,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 20,
|
|
|
|
|
),
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
patient.firstName + ' ' + patient.lastName,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).fileNo,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 5.0,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
patient.age.toString(),
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
"ALLERGIC TO: FOOD, ASPIRIN",
|
|
|
|
|
color: Color(0xFFB9382C),
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
|
child: Container(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.all(8.0),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AvatarWidget(
|
|
|
|
|
Icon(
|
|
|
|
|
patient.genderDescription == "Male"
|
|
|
|
|
? DoctorApp.male
|
|
|
|
|
: DoctorApp.female_icon,
|
|
|
|
|
size: 70,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Divider(
|
|
|
|
|
height: 1.0,
|
|
|
|
|
thickness: 1.0,
|
|
|
|
|
color: Colors.grey,
|
|
|
|
|
),
|
|
|
|
|
ListView.builder(
|
|
|
|
|
scrollDirection: Axis.vertical,
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
itemCount: 2,
|
|
|
|
|
itemBuilder: (BuildContext ctxt, int index) {
|
|
|
|
|
return Padding(
|
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
|
horizontal: 12.0, vertical: 8.0),
|
|
|
|
|
child: InkWell(
|
|
|
|
|
child: Container(
|
|
|
|
|
child: Column(
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 20,
|
|
|
|
|
),
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
patient.firstName + ' ' + patient.lastName,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
'Branch : ',
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
model.medicalFileList[0].entityList[0]
|
|
|
|
|
.admissions[index].projectName,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).fileNo,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
'Doctor : '.toUpperCase(),
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
model.medicalFileList[0].entityList[0]
|
|
|
|
|
.admissions[index].doctor
|
|
|
|
|
.toUpperCase(),
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 5.0,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
patient.age.toString(),
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
"ALLERGIC TO: FOOD, ASPIRIN",
|
|
|
|
|
color: Color(0xFFB9382C),
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Divider(
|
|
|
|
|
height: 1.0,
|
|
|
|
|
thickness: 1.0,
|
|
|
|
|
color: Colors.grey,
|
|
|
|
|
),
|
|
|
|
|
if (model.medicalFileList.length != 0)
|
|
|
|
|
ListView.builder(
|
|
|
|
|
//physics: ,
|
|
|
|
|
scrollDirection: Axis.vertical,
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
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(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
'Clinic : ',
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
'Branch : ',
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
),
|
|
|
|
|
AppText(model
|
|
|
|
|
.medicalFileList[0]
|
|
|
|
|
.entityList[0]
|
|
|
|
|
.timelines[index]
|
|
|
|
|
.projectName),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
model.medicalFileList[0].entityList[0]
|
|
|
|
|
.admissions[index].clinic,
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
'Doctor : '.toUpperCase(),
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
model.medicalFileList[0].entityList[0]
|
|
|
|
|
.timelines[index].doctorName,
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
'Clinic : ',
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
model.medicalFileList[0].entityList[0]
|
|
|
|
|
.timelines[index].clinicName,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 10.0),
|
|
|
|
|
Divider(
|
|
|
|
|
height: 1.0,
|
|
|
|
|
thickness: 1.0,
|
|
|
|
|
color: Colors.grey.shade400,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 10.0),
|
|
|
|
|
Divider(
|
|
|
|
|
height: 1.0,
|
|
|
|
|
thickness: 1.0,
|
|
|
|
|
color: Colors.grey.shade400,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
builder: (context) => MedicalFileDetails(
|
|
|
|
|
age: patient.age,
|
|
|
|
|
firstName: patient.firstName,
|
|
|
|
|
lastName: patient.lastName,
|
|
|
|
|
gender: patient.genderDescription,
|
|
|
|
|
encounterNumber: index,
|
|
|
|
|
pp: patient.patientMRN,
|
|
|
|
|
)),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
builder: (context) => MedicalFileDetails(
|
|
|
|
|
age: patient.age,
|
|
|
|
|
firstName: patient.firstName,
|
|
|
|
|
lastName: patient.lastName,
|
|
|
|
|
gender: patient.genderDescription,
|
|
|
|
|
)),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
})
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
})
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|