|
|
|
|
@ -5,6 +5,8 @@ import 'package:doctor_app_flutter/screens/prescription/add_prescription_form.da
|
|
|
|
|
import 'package:doctor_app_flutter/screens/prescription/prescription_home_screen.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/screens/prescription/prescription_item_in_patient_page.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/screens/prescription/prescription_items_page.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/screens/procedures/ProcedureType.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/screens/procedures/base_add_procedure_tab_page.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/util/date-utils.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart';
|
|
|
|
|
@ -50,7 +52,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 +73,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,20 +94,25 @@ class PrescriptionsPage extends StatelessWidget {
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
if ((patient.patientStatusType != null && patient.patientStatusType == 43) ||
|
|
|
|
|
if ((patient.patientStatusType != null &&
|
|
|
|
|
patient.patientStatusType == 43) ||
|
|
|
|
|
(isFromLiveCare && patient.appointmentNo != null))
|
|
|
|
|
AddNewOrder(
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
builder: (context) => PrescriptionHomeScreen(
|
|
|
|
|
builder: (context) =>
|
|
|
|
|
BaseAddProcedureTabPage(
|
|
|
|
|
patient: patient,
|
|
|
|
|
model: model,
|
|
|
|
|
prescriptionModel: model,
|
|
|
|
|
procedureType:
|
|
|
|
|
ProcedureType.PRESCRIPTION,
|
|
|
|
|
)),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
label: TranslationBase.of(context).applyForNewPrescriptionsOrder,
|
|
|
|
|
label: TranslationBase.of(context)
|
|
|
|
|
.applyForNewPrescriptionsOrder,
|
|
|
|
|
),
|
|
|
|
|
...List.generate(
|
|
|
|
|
model.prescriptionsList.length,
|
|
|
|
|
@ -112,7 +121,8 @@ class PrescriptionsPage extends StatelessWidget {
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: PrescriptionItemsPage(
|
|
|
|
|
prescriptions: model.prescriptionsList[index],
|
|
|
|
|
prescriptions:
|
|
|
|
|
model.prescriptionsList[index],
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
@ -120,16 +130,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,
|
|
|
|
|
@ -140,7 +156,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),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
@ -165,29 +182,38 @@ class PrescriptionsPage extends StatelessWidget {
|
|
|
|
|
FadePage(
|
|
|
|
|
page: PrescriptionItemsInPatientPage(
|
|
|
|
|
prescriptionIndex: index,
|
|
|
|
|
prescriptions: model.inPatientPrescription[index],
|
|
|
|
|
prescriptions: model
|
|
|
|
|
.inPatientPrescription[index],
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
startOn: AppDateUtils.getDateTimeFromServerFormat(
|
|
|
|
|
model.inPatientPrescription[index].startDatetime,
|
|
|
|
|
startOn: AppDateUtils
|
|
|
|
|
.getDateTimeFromServerFormat(
|
|
|
|
|
model.inPatientPrescription[index]
|
|
|
|
|
.startDatetime,
|
|
|
|
|
),
|
|
|
|
|
stopOn: AppDateUtils.getDateTimeFromServerFormat(
|
|
|
|
|
model.inPatientPrescription[index].stopDatetime,
|
|
|
|
|
stopOn: AppDateUtils
|
|
|
|
|
.getDateTimeFromServerFormat(
|
|
|
|
|
model.inPatientPrescription[index]
|
|
|
|
|
.stopDatetime,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
child: InPatientDoctorCard(
|
|
|
|
|
doctorName: model.inPatientPrescription[index].itemDescription,
|
|
|
|
|
doctorName: model.inPatientPrescription[index]
|
|
|
|
|
.itemDescription,
|
|
|
|
|
profileUrl: 'sss',
|
|
|
|
|
branch: 'hamza',
|
|
|
|
|
clinic: 'basheer',
|
|
|
|
|
isPrescriptions: true,
|
|
|
|
|
appointmentDate: AppDateUtils.getDateTimeFromServerFormat(
|
|
|
|
|
model.inPatientPrescription[index].prescriptionDatetime,
|
|
|
|
|
appointmentDate:
|
|
|
|
|
AppDateUtils.getDateTimeFromServerFormat(
|
|
|
|
|
model.inPatientPrescription[index]
|
|
|
|
|
.prescriptionDatetime,
|
|
|
|
|
),
|
|
|
|
|
createdBy: model.inPatientPrescription[index].createdByName,
|
|
|
|
|
createdBy: model.inPatientPrescription[index]
|
|
|
|
|
.createdByName,
|
|
|
|
|
))),
|
|
|
|
|
if (model.inPatientPrescription.length == 0)
|
|
|
|
|
Center(
|
|
|
|
|
@ -200,7 +226,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),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
|