|
|
|
|
@ -4,6 +4,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/screens/patients/profile/radiology/radiology_details_page.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/screens/procedures/add_radiology_order.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/patient-profile-header-new-design-app-bar.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
|
|
|
|
@ -24,6 +25,7 @@ class _RadiologyHomePageState extends State<RadiologyHomePage> {
|
|
|
|
|
PatiantInformtion patient;
|
|
|
|
|
String arrivalType;
|
|
|
|
|
bool isInpatient;
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
void didChangeDependencies() {
|
|
|
|
|
super.didChangeDependencies();
|
|
|
|
|
@ -38,8 +40,8 @@ class _RadiologyHomePageState extends State<RadiologyHomePage> {
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return BaseView<ProcedureViewModel>(
|
|
|
|
|
onModelReady: (model) =>
|
|
|
|
|
model.getPatientRadOrders(patient, patientType: patientType, isInPatient: isInpatient),
|
|
|
|
|
onModelReady: (model) => model.getPatientRadOrders(patient,
|
|
|
|
|
patientType: patientType, isInPatient: false),
|
|
|
|
|
builder: (_, model, widget) => AppScaffold(
|
|
|
|
|
isShowAppBar: true,
|
|
|
|
|
backgroundColor: Colors.grey[100],
|
|
|
|
|
@ -112,63 +114,81 @@ class _RadiologyHomePageState extends State<RadiologyHomePage> {
|
|
|
|
|
},
|
|
|
|
|
label: 'Apply for Radiology Order',
|
|
|
|
|
),
|
|
|
|
|
if(!isInpatient)
|
|
|
|
|
Container(
|
|
|
|
|
width: double.maxFinite,
|
|
|
|
|
margin: EdgeInsets.only(right: 8),
|
|
|
|
|
child: InkWell(
|
|
|
|
|
onTap: (){
|
|
|
|
|
setState(() {
|
|
|
|
|
isInpatient = true;
|
|
|
|
|
});
|
|
|
|
|
model.getPatientRadOrders(patient, patientType: patientType, isInPatient: true);
|
|
|
|
|
},
|
|
|
|
|
child: Align(
|
|
|
|
|
alignment: Alignment.centerRight,
|
|
|
|
|
child: AppText('View Inpatient Lab Result',
|
|
|
|
|
textDecoration:TextDecoration.underline,color: Colors.red,),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
if(isInpatient)
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(right: 8),
|
|
|
|
|
width: double.maxFinite,
|
|
|
|
|
child: InkWell(
|
|
|
|
|
onTap: (){
|
|
|
|
|
setState(() {
|
|
|
|
|
isInpatient = false;
|
|
|
|
|
});
|
|
|
|
|
model.getPatientRadOrders(patient, patientType: patientType, isInPatient: false);
|
|
|
|
|
},
|
|
|
|
|
child: Align(
|
|
|
|
|
alignment: Alignment.centerRight,
|
|
|
|
|
child: AppText('View Outpatient Lab Result',
|
|
|
|
|
textDecoration:TextDecoration.underline,color: Colors.red,),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
...List.generate(
|
|
|
|
|
model.radiologyList.length,
|
|
|
|
|
(index) => InkWell(
|
|
|
|
|
onTap: () => Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: RadiologyDetailsPage(
|
|
|
|
|
finalRadiology: model.radiologyList[index],
|
|
|
|
|
patient: patient,
|
|
|
|
|
(index) => Container(
|
|
|
|
|
margin: EdgeInsets.all(10),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
border: Border.all(
|
|
|
|
|
width: 0.5,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
child: DoctorCard(
|
|
|
|
|
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:
|
|
|
|
|
!isInpatient?model.radiologyList[index].orderDate :
|
|
|
|
|
model.radiologyList[index].reportDate,
|
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
|
Radius.circular(8.0),
|
|
|
|
|
),
|
|
|
|
|
color: Colors.white),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
width: 20,
|
|
|
|
|
height: 160,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
//Colors.red[900] Color(0xff404545)
|
|
|
|
|
color: model.radiologyList[index].isLiveCareAppodynamicment
|
|
|
|
|
? Colors.red[900]
|
|
|
|
|
: !model.radiologyList[index].isInOutPatient
|
|
|
|
|
? Colors.black
|
|
|
|
|
: Color(0xffa9a089),
|
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
|
topLeft: Radius.circular(8),
|
|
|
|
|
bottomLeft: Radius.circular(8),
|
|
|
|
|
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
child: RotatedBox(
|
|
|
|
|
quarterTurns: 3,
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Text(
|
|
|
|
|
model.radiologyList[index].isLiveCareAppodynamicment
|
|
|
|
|
? TranslationBase.of(context)
|
|
|
|
|
.liveCare
|
|
|
|
|
.toUpperCase()
|
|
|
|
|
: !model.radiologyList[index].isInOutPatient
|
|
|
|
|
? TranslationBase.of(context)
|
|
|
|
|
.inPatient
|
|
|
|
|
.toUpperCase()
|
|
|
|
|
: TranslationBase.of(context)
|
|
|
|
|
.outpatient
|
|
|
|
|
.toUpperCase(),
|
|
|
|
|
style: TextStyle(color: Colors.white),
|
|
|
|
|
),
|
|
|
|
|
)),
|
|
|
|
|
),
|
|
|
|
|
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,
|
|
|
|
|
appointmentDate: !isInpatient
|
|
|
|
|
? model.radiologyList[index].orderDate
|
|
|
|
|
: model.radiologyList[index].reportDate,
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: RadiologyDetailsPage(
|
|
|
|
|
finalRadiology: model.radiologyList[index],
|
|
|
|
|
patient: patient,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)),
|
|
|
|
|
if (model.radiologyList.isEmpty &&
|
|
|
|
|
|