|
|
|
|
@ -7,6 +7,7 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/util/date-utils.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/util/dr_app_toast_msg.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/add-order/addNewOrder.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/patients/profile/large_avatar.dart';
|
|
|
|
|
@ -17,7 +18,6 @@ import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart';
|
|
|
|
|
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
|
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:flutter_html/flutter_html.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
|
|
import '../../../../routes.dart';
|
|
|
|
|
@ -75,13 +75,18 @@ class MedicalReportPage extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
AddNewOrder(
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.of(context)
|
|
|
|
|
.pushNamed(PATIENT_MEDICAL_REPORT_INSERT, arguments: {
|
|
|
|
|
'patient': patient,
|
|
|
|
|
'patientType': patientType,
|
|
|
|
|
'arrivalType': arrivalType,
|
|
|
|
|
'type': MedicalReportStatus.ADD
|
|
|
|
|
});
|
|
|
|
|
if (model.hasOnHold()) {
|
|
|
|
|
Helpers.showErrorToast(
|
|
|
|
|
"Please Verified the on hold report to be able to add new one");
|
|
|
|
|
} else {
|
|
|
|
|
Navigator.of(context)
|
|
|
|
|
.pushNamed(PATIENT_MEDICAL_REPORT_INSERT, arguments: {
|
|
|
|
|
'patient': patient,
|
|
|
|
|
'patientType': patientType,
|
|
|
|
|
'arrivalType': arrivalType,
|
|
|
|
|
'type': MedicalReportStatus.ADD
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
label: TranslationBase.of(context).createNewMedicalReport,
|
|
|
|
|
),
|
|
|
|
|
@ -92,7 +97,7 @@ class MedicalReportPage extends StatelessWidget {
|
|
|
|
|
onTap: () {
|
|
|
|
|
if (model.medicalReportList[index].status == 1) {
|
|
|
|
|
Navigator.of(context).pushNamed(
|
|
|
|
|
PATIENT_MEDICAL_REPORT_DETAIL,
|
|
|
|
|
PATIENT_MEDICAL_REPORT_INSERT,
|
|
|
|
|
arguments: {
|
|
|
|
|
'patient': patient,
|
|
|
|
|
'patientType': patientType,
|
|
|
|
|
@ -101,7 +106,7 @@ class MedicalReportPage extends StatelessWidget {
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
Navigator.of(context).pushNamed(
|
|
|
|
|
PATIENT_MEDICAL_REPORT_INSERT,
|
|
|
|
|
PATIENT_MEDICAL_REPORT_DETAIL,
|
|
|
|
|
arguments: {
|
|
|
|
|
'patient': patient,
|
|
|
|
|
'patientType': patientType,
|
|
|
|
|
@ -116,7 +121,7 @@ class MedicalReportPage extends StatelessWidget {
|
|
|
|
|
child: CardWithBgWidget(
|
|
|
|
|
hasBorder: false,
|
|
|
|
|
bgColor: model.medicalReportList[index].status == 1
|
|
|
|
|
? Colors.red[700]
|
|
|
|
|
? Color(0xFFCC9B14)
|
|
|
|
|
: Colors.green[700],
|
|
|
|
|
widget: Column(
|
|
|
|
|
children: [
|
|
|
|
|
@ -132,9 +137,9 @@ class MedicalReportPage extends StatelessWidget {
|
|
|
|
|
: TranslationBase.of(context)
|
|
|
|
|
.verified,
|
|
|
|
|
color: model.medicalReportList[index]
|
|
|
|
|
.status ==
|
|
|
|
|
1
|
|
|
|
|
? Colors.red[700]
|
|
|
|
|
.status ==
|
|
|
|
|
1
|
|
|
|
|
? Color(0xFFCC9B14)
|
|
|
|
|
: Colors.green[700],
|
|
|
|
|
fontSize: 1.4 * SizeConfig.textMultiplier,
|
|
|
|
|
bold: true,
|
|
|
|
|
@ -226,8 +231,8 @@ class MedicalReportPage extends StatelessWidget {
|
|
|
|
|
Icon(
|
|
|
|
|
model.medicalReportList[index].status ==
|
|
|
|
|
1
|
|
|
|
|
? EvaIcons.eye
|
|
|
|
|
: DoctorApp.edit_1,
|
|
|
|
|
? DoctorApp.edit_1
|
|
|
|
|
:EvaIcons.eye ,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
|