|
|
|
|
@ -12,6 +12,7 @@ import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/doctor_card.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/transitions/slide_up_page.dart';
|
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
@ -44,8 +45,7 @@ class _RadiologyHomePageState extends State<RadiologyHomePage> {
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
ProjectViewModel projectViewModel = Provider.of(context);
|
|
|
|
|
return BaseView<ProcedureViewModel>(
|
|
|
|
|
onModelReady: (model) => model.getPatientRadOrders(patient,
|
|
|
|
|
patientType: patientType, isInPatient: false),
|
|
|
|
|
onModelReady: (model) => model.getPatientRadOrders(patient, patientType: patientType, isInPatient: false),
|
|
|
|
|
builder: (_, model, widget) => AppScaffold(
|
|
|
|
|
isShowAppBar: true,
|
|
|
|
|
backgroundColor: Colors.grey[100],
|
|
|
|
|
@ -63,8 +63,7 @@ class _RadiologyHomePageState extends State<RadiologyHomePage> {
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 12,
|
|
|
|
|
),
|
|
|
|
|
if (model.radiologyList.isNotEmpty &&
|
|
|
|
|
patient.patientStatusType != 43)
|
|
|
|
|
if (model.radiologyList.isNotEmpty && patient.patientStatusType != 43)
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
@ -84,8 +83,7 @@ class _RadiologyHomePageState extends State<RadiologyHomePage> {
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
if (patient.patientStatusType != null &&
|
|
|
|
|
patient.patientStatusType == 43)
|
|
|
|
|
if (patient.patientStatusType != null && patient.patientStatusType == 43)
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
@ -105,20 +103,19 @@ class _RadiologyHomePageState extends State<RadiologyHomePage> {
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
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) => BaseAddProcedureTabPage(
|
|
|
|
|
patient: patient,
|
|
|
|
|
model: model,
|
|
|
|
|
procedureType: ProcedureType.RADIOLOGY,
|
|
|
|
|
), settings: RouteSettings(name: 'AddProcedureTabPage')
|
|
|
|
|
),
|
|
|
|
|
SlideUpPageRoute(
|
|
|
|
|
widget: BaseAddProcedureTabPage(
|
|
|
|
|
patient: patient,
|
|
|
|
|
model: model,
|
|
|
|
|
procedureType: ProcedureType.RADIOLOGY,
|
|
|
|
|
),
|
|
|
|
|
settingRoute: 'AddProcedureTabPage'),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
label: TranslationBase.of(context).applyForRadiologyOrder,
|
|
|
|
|
@ -143,43 +140,26 @@ class _RadiologyHomePageState extends State<RadiologyHomePage> {
|
|
|
|
|
height: 160,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
//Colors.red[900] Color(0xff404545)
|
|
|
|
|
color: model.radiologyList[index]
|
|
|
|
|
.isLiveCareAppodynamicment
|
|
|
|
|
color: model.radiologyList[index].isLiveCareAppodynamicment
|
|
|
|
|
? Colors.red[900]
|
|
|
|
|
: !model.radiologyList[index].isInOutPatient
|
|
|
|
|
? Colors.black
|
|
|
|
|
: Color(0xffa9a089),
|
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
|
topLeft: projectViewModel.isArabic
|
|
|
|
|
? Radius.circular(0)
|
|
|
|
|
: Radius.circular(8),
|
|
|
|
|
bottomLeft: projectViewModel.isArabic
|
|
|
|
|
? Radius.circular(0)
|
|
|
|
|
: Radius.circular(8),
|
|
|
|
|
topRight: projectViewModel.isArabic
|
|
|
|
|
? Radius.circular(8)
|
|
|
|
|
: Radius.circular(0),
|
|
|
|
|
bottomRight: projectViewModel.isArabic
|
|
|
|
|
? Radius.circular(8)
|
|
|
|
|
: Radius.circular(0)),
|
|
|
|
|
topLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(8),
|
|
|
|
|
bottomLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(8),
|
|
|
|
|
topRight: projectViewModel.isArabic ? Radius.circular(8) : Radius.circular(0),
|
|
|
|
|
bottomRight: projectViewModel.isArabic ? Radius.circular(8) : Radius.circular(0)),
|
|
|
|
|
),
|
|
|
|
|
child: RotatedBox(
|
|
|
|
|
quarterTurns: 3,
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Text(
|
|
|
|
|
model.radiologyList[index]
|
|
|
|
|
.isLiveCareAppodynamicment
|
|
|
|
|
? TranslationBase.of(context)
|
|
|
|
|
.liveCare
|
|
|
|
|
.toUpperCase()
|
|
|
|
|
: !model.radiologyList[index]
|
|
|
|
|
.isInOutPatient
|
|
|
|
|
? TranslationBase.of(context)
|
|
|
|
|
.inPatientLabel
|
|
|
|
|
.toUpperCase()
|
|
|
|
|
: TranslationBase.of(context)
|
|
|
|
|
.outpatient
|
|
|
|
|
.toUpperCase(),
|
|
|
|
|
model.radiologyList[index].isLiveCareAppodynamicment
|
|
|
|
|
? TranslationBase.of(context).liveCare.toUpperCase()
|
|
|
|
|
: !model.radiologyList[index].isInOutPatient
|
|
|
|
|
? TranslationBase.of(context).inPatientLabel.toUpperCase()
|
|
|
|
|
: TranslationBase.of(context).outpatient.toUpperCase(),
|
|
|
|
|
style: TextStyle(color: Colors.white),
|
|
|
|
|
),
|
|
|
|
|
)),
|
|
|
|
|
@ -187,29 +167,21 @@ class _RadiologyHomePageState extends State<RadiologyHomePage> {
|
|
|
|
|
Expanded(
|
|
|
|
|
child: DoctorCard(
|
|
|
|
|
isNoMargin: true,
|
|
|
|
|
doctorName:
|
|
|
|
|
model.radiologyList[index].doctorName,
|
|
|
|
|
profileUrl:
|
|
|
|
|
model.radiologyList[index].doctorImageURL,
|
|
|
|
|
invoiceNO:
|
|
|
|
|
'${model.radiologyList[index].invoiceNo}',
|
|
|
|
|
branch:
|
|
|
|
|
'${model.radiologyList[index].projectName}',
|
|
|
|
|
clinic: model
|
|
|
|
|
.radiologyList[index].clinicDescription,
|
|
|
|
|
doctorName: model.radiologyList[index].doctorName,
|
|
|
|
|
profileUrl: model.radiologyList[index].doctorImageURL,
|
|
|
|
|
invoiceNO: '${model.radiologyList[index].invoiceNo}',
|
|
|
|
|
branch: '${model.radiologyList[index].projectName}',
|
|
|
|
|
clinic: model.radiologyList[index].clinicDescription,
|
|
|
|
|
appointmentDate:
|
|
|
|
|
model.radiologyList[index].orderDate ??
|
|
|
|
|
model.radiologyList[index].reportDate,
|
|
|
|
|
model.radiologyList[index].orderDate ?? model.radiologyList[index].reportDate,
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: RadiologyDetailsPage(
|
|
|
|
|
finalRadiology:
|
|
|
|
|
model.radiologyList[index],
|
|
|
|
|
patient: patient,
|
|
|
|
|
isInpatient:isInpatient
|
|
|
|
|
),
|
|
|
|
|
finalRadiology: model.radiologyList[index],
|
|
|
|
|
patient: patient,
|
|
|
|
|
isInpatient: isInpatient),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
@ -218,8 +190,7 @@ class _RadiologyHomePageState extends State<RadiologyHomePage> {
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)),
|
|
|
|
|
if (model.radiologyList.isEmpty &&
|
|
|
|
|
patient.patientStatusType != 43)
|
|
|
|
|
if (model.radiologyList.isEmpty && patient.patientStatusType != 43)
|
|
|
|
|
Center(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
|