|
|
|
|
@ -50,7 +50,8 @@ class PrescriptionsPage extends StatelessWidget {
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 12,
|
|
|
|
|
),
|
|
|
|
|
if (model.prescriptionsList.isNotEmpty && patient.patientStatusType != 43)
|
|
|
|
|
if (model.prescriptionsList.isNotEmpty &&
|
|
|
|
|
patient.patientStatusType != 43)
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
@ -70,7 +71,8 @@ class PrescriptionsPage extends StatelessWidget {
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
if (patient.patientStatusType != null && patient.patientStatusType == 43)
|
|
|
|
|
if (patient.patientStatusType != null &&
|
|
|
|
|
patient.patientStatusType == 43)
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
@ -90,7 +92,8 @@ class PrescriptionsPage extends StatelessWidget {
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
if ((patient.patientStatusType != null && patient.patientStatusType == 43) ||
|
|
|
|
|
if ((patient.patientStatusType != null &&
|
|
|
|
|
patient.patientStatusType == 43) ||
|
|
|
|
|
(isFromLiveCare && patient.appointmentNo != null))
|
|
|
|
|
AddNewOrder(
|
|
|
|
|
onTap: () {
|
|
|
|
|
@ -105,7 +108,8 @@ class PrescriptionsPage extends StatelessWidget {
|
|
|
|
|
settingRoute: 'AddProcedureTabPage'),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
label: TranslationBase.of(context).applyForNewPrescriptionsOrder,
|
|
|
|
|
label: TranslationBase.of(context)
|
|
|
|
|
.applyForNewPrescriptionsOrder,
|
|
|
|
|
),
|
|
|
|
|
...List.generate(
|
|
|
|
|
model.prescriptionsList.length,
|
|
|
|
|
@ -114,7 +118,8 @@ class PrescriptionsPage extends StatelessWidget {
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: PrescriptionItemsPage(
|
|
|
|
|
prescriptions: model.prescriptionsList[index],
|
|
|
|
|
prescriptions:
|
|
|
|
|
model.prescriptionsList[index],
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
@ -122,16 +127,22 @@ class PrescriptionsPage extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
child: DoctorCard(
|
|
|
|
|
doctorName: model.prescriptionsList[index].doctorName,
|
|
|
|
|
profileUrl: model.prescriptionsList[index].doctorImageURL,
|
|
|
|
|
doctorName:
|
|
|
|
|
model.prescriptionsList[index].doctorName,
|
|
|
|
|
profileUrl: model
|
|
|
|
|
.prescriptionsList[index].doctorImageURL,
|
|
|
|
|
branch: model.prescriptionsList[index].name,
|
|
|
|
|
clinic: model.prescriptionsList[index].clinicDescription,
|
|
|
|
|
clinic: model.prescriptionsList[index]
|
|
|
|
|
.clinicDescription,
|
|
|
|
|
isPrescriptions: true,
|
|
|
|
|
appointmentDate: AppDateUtils.getDateTimeFromServerFormat(
|
|
|
|
|
model.prescriptionsList[index].appointmentDate,
|
|
|
|
|
appointmentDate:
|
|
|
|
|
AppDateUtils.getDateTimeFromServerFormat(
|
|
|
|
|
model.prescriptionsList[index]
|
|
|
|
|
.appointmentDate,
|
|
|
|
|
),
|
|
|
|
|
))),
|
|
|
|
|
if (model.prescriptionsList.isEmpty && patient.patientStatusType != 43)
|
|
|
|
|
if (model.prescriptionsList.isEmpty &&
|
|
|
|
|
patient.patientStatusType != 43)
|
|
|
|
|
Center(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
@ -142,7 +153,8 @@ class PrescriptionsPage extends StatelessWidget {
|
|
|
|
|
Image.asset('assets/images/no-data.png'),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
|
|
|
|
child: AppText(TranslationBase.of(context).noPrescriptionsFound),
|
|
|
|
|
child: AppText(TranslationBase.of(context)
|
|
|
|
|
.noPrescriptionsFound),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
@ -163,6 +175,7 @@ class PrescriptionsPage extends StatelessWidget {
|
|
|
|
|
|
|
|
|
|
ListView.builder(
|
|
|
|
|
scrollDirection: Axis.vertical,
|
|
|
|
|
physics: NeverScrollableScrollPhysics(),
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
itemCount: model.medicationForInPatient.length,
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
@ -171,31 +184,49 @@ class PrescriptionsPage extends StatelessWidget {
|
|
|
|
|
onTap: () => Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: PrescriptionItemsInPatientPage(
|
|
|
|
|
page:
|
|
|
|
|
PrescriptionItemsInPatientPage(
|
|
|
|
|
prescriptionIndex: index,
|
|
|
|
|
prescriptions: model.medicationForInPatient[index],
|
|
|
|
|
prescriptions:
|
|
|
|
|
model.medicationForInPatient[
|
|
|
|
|
index],
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
startOn: AppDateUtils.getDateTimeFromServerFormat(
|
|
|
|
|
model.medicationForInPatient[index].startDatetime,
|
|
|
|
|
startOn: AppDateUtils
|
|
|
|
|
.getDateTimeFromServerFormat(
|
|
|
|
|
model
|
|
|
|
|
.medicationForInPatient[
|
|
|
|
|
index]
|
|
|
|
|
.startDatetime,
|
|
|
|
|
),
|
|
|
|
|
stopOn: AppDateUtils.getDateTimeFromServerFormat(
|
|
|
|
|
model.medicationForInPatient[index].stopDatetime,
|
|
|
|
|
stopOn: AppDateUtils
|
|
|
|
|
.getDateTimeFromServerFormat(
|
|
|
|
|
model
|
|
|
|
|
.medicationForInPatient[
|
|
|
|
|
index]
|
|
|
|
|
.stopDatetime,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
child: InPatientDoctorCard(
|
|
|
|
|
doctorName: model.medicationForInPatient[index].pHRItemDescription,
|
|
|
|
|
doctorName: model
|
|
|
|
|
.medicationForInPatient[index]
|
|
|
|
|
.pHRItemDescription,
|
|
|
|
|
profileUrl: 'sss',
|
|
|
|
|
branch: 'hamza',
|
|
|
|
|
clinic: 'basheer',
|
|
|
|
|
isPrescriptions: true,
|
|
|
|
|
appointmentDate: AppDateUtils.getDateTimeFromServerFormat(
|
|
|
|
|
model.medicationForInPatient[index].prescriptionDatetime,
|
|
|
|
|
appointmentDate: AppDateUtils
|
|
|
|
|
.getDateTimeFromServerFormat(
|
|
|
|
|
model.medicationForInPatient[index]
|
|
|
|
|
.prescriptionDatetime,
|
|
|
|
|
),
|
|
|
|
|
createdBy: model.medicationForInPatient[index].doctorName.toString(),
|
|
|
|
|
createdBy: model
|
|
|
|
|
.medicationForInPatient[index]
|
|
|
|
|
.doctorName
|
|
|
|
|
.toString(),
|
|
|
|
|
));
|
|
|
|
|
}),
|
|
|
|
|
if (model.medicationForInPatient.length == 0)
|
|
|
|
|
@ -209,7 +240,8 @@ class PrescriptionsPage extends StatelessWidget {
|
|
|
|
|
Image.asset('assets/images/no-data.png'),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
|
|
|
|
child: AppText(TranslationBase.of(context).noPrescriptionsFound),
|
|
|
|
|
child: AppText(TranslationBase.of(context)
|
|
|
|
|
.noPrescriptionsFound),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
|