medical file hot fix

merge-requests/572/head
hussam al-habibeh 4 years ago
parent 45e9ee60a9
commit 0e836c67c8

@ -85,80 +85,103 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
itemBuilder: (BuildContext ctxt, int index) {
return InkWell(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => MedicalFileDetails(
age: patient.age is String
? patient.age ?? ""
: "${patient.age}",
firstName: patient.firstName,
lastName: patient.lastName,
gender: patient.genderDescription,
encounterNumber: index,
pp: patient.patientId,
patient: patient,
doctorName: model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.timeLineEvents[0]
.consulations
.isNotEmpty
? model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.doctorName
: "",
clinicName: model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.timeLineEvents[0]
.consulations
.isNotEmpty
? model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.clinicName
: "",
doctorImage: model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.timeLineEvents[0]
.consulations
.isNotEmpty
? model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.doctorImage
: "",
episode: model.medicalFileList[0].entityList[0].timelines[index].timeLineEvents[0].consulations.isNotEmpty
? model.medicalFileList[0].entityList[0].timelines[index].timeLineEvents[0].consulations[0].episodeID.toString()
: "",
vistDate: model.medicalFileList[0].entityList[0].timelines[index].date.toString())),
);
if (model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.timeLineEvents[0]
.consulations
.length !=
0)
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => MedicalFileDetails(
age: patient.age is String
? patient.age ?? ""
: "${patient.age}",
firstName: patient.firstName,
lastName: patient.lastName,
gender: patient.genderDescription,
encounterNumber: index,
pp: patient.patientId,
patient: patient,
doctorName: model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.timeLineEvents[0]
.consulations
.isNotEmpty
? model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.doctorName
: "",
clinicName: model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.timeLineEvents[0]
.consulations
.isNotEmpty
? model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.clinicName
: "",
doctorImage: model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.timeLineEvents[0]
.consulations
.isNotEmpty
? model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.doctorImage
: "",
episode: model.medicalFileList[0].entityList[0].timelines[index].timeLineEvents[0].consulations.isNotEmpty
? model.medicalFileList[0].entityList[0].timelines[index].timeLineEvents[0].consulations[0].episodeID.toString()
: "",
vistDate: model.medicalFileList[0].entityList[0].timelines[index].date.toString())),
);
},
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: model.medicalFileList[0]
.entityList[0].timelines[index].doctorImage,
appointmentDate:
DateUtils.getDateTimeFromServerFormat(
model.medicalFileList[0].entityList[0]
.timelines[index].date,
),
isPrescriptions: true,
),
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: model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.doctorImage,
appointmentDate:
DateUtils.getDateTimeFromServerFormat(
model.medicalFileList[0].entityList[0]
.timelines[index].date,
),
isPrescriptions: true,
isShowEye: model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.timeLineEvents[0]
.consulations
.length !=
0
? true
: false),
);
})
: Center(

@ -21,6 +21,7 @@ class DoctorCard extends StatelessWidget {
final Function onTap;
final bool isPrescriptions;
final String clinic;
final bool isShowEye;
DoctorCard(
{this.doctorName,
@ -31,7 +32,8 @@ class DoctorCard extends StatelessWidget {
this.appointmentDate,
this.orderNo,
this.isPrescriptions = false,
this.clinic});
this.clinic,
this.isShowEye = true});
@override
Widget build(BuildContext context) {
@ -50,7 +52,7 @@ class DoctorCard extends StatelessWidget {
child: Padding(
padding: const EdgeInsets.all(15.0),
child: InkWell(
onTap: onTap,
onTap: (isShowEye) ? onTap : null,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
@ -169,9 +171,10 @@ class DoctorCard extends StatelessWidget {
]),
),
),
Icon(
EvaIcons.eye,
)
if (isShowEye)
Icon(
EvaIcons.eye,
)
],
),
),

Loading…
Cancel
Save