|
|
|
|
@ -6,6 +6,7 @@ import 'package:doctor_app_flutter/locator.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/screens/patients/insurance_approvals_details.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/patients/patient_service_title.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
|
|
|
|
@ -22,10 +23,12 @@ class InsuranceApprovalScreenNew extends StatefulWidget {
|
|
|
|
|
InsuranceApprovalScreenNew({this.appointmentNo});
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
_InsuranceApprovalScreenNewState createState() => _InsuranceApprovalScreenNewState();
|
|
|
|
|
_InsuranceApprovalScreenNewState createState() =>
|
|
|
|
|
_InsuranceApprovalScreenNewState();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class _InsuranceApprovalScreenNewState extends State<InsuranceApprovalScreenNew> {
|
|
|
|
|
class _InsuranceApprovalScreenNewState
|
|
|
|
|
extends State<InsuranceApprovalScreenNew> {
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
ProjectViewModel projectViewModel = Provider.of(context);
|
|
|
|
|
@ -39,9 +42,11 @@ class _InsuranceApprovalScreenNewState extends State<InsuranceApprovalScreenNew>
|
|
|
|
|
? (model) => model.getInsuranceInPatient(mrn: patient.patientId)
|
|
|
|
|
: patient.appointmentNo != null
|
|
|
|
|
? (model) => model.getInsuranceApproval(patient,
|
|
|
|
|
appointmentNo: int.parse(patient?.appointmentNo.toString()), projectId: patient.projectId)
|
|
|
|
|
appointmentNo: int.parse(patient?.appointmentNo.toString()),
|
|
|
|
|
projectId: patient.projectId)
|
|
|
|
|
: (model) => model.getInsuranceApproval(patient),
|
|
|
|
|
builder: (BuildContext context, InsuranceViewModel model, Widget child) => AppScaffold(
|
|
|
|
|
builder: (BuildContext context, InsuranceViewModel model, Widget child) =>
|
|
|
|
|
AppScaffold(
|
|
|
|
|
appBar: PatientProfileAppBar(
|
|
|
|
|
patient,
|
|
|
|
|
isInpatient: isInpatient,
|
|
|
|
|
@ -59,32 +64,11 @@ class _InsuranceApprovalScreenNewState extends State<InsuranceApprovalScreenNew>
|
|
|
|
|
),
|
|
|
|
|
child: model.insuranceApprovalInPatient.length != 0
|
|
|
|
|
? Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).insurance22,
|
|
|
|
|
fontSize: 15.0,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).approvals22,
|
|
|
|
|
fontSize: 30.0,
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
ServiceTitle(
|
|
|
|
|
title: TranslationBase.of(context).insurance22,
|
|
|
|
|
subTitle: TranslationBase.of(context).approvals22,
|
|
|
|
|
),
|
|
|
|
|
...List.generate(
|
|
|
|
|
model.insuranceApprovalInPatient.length,
|
|
|
|
|
@ -94,25 +78,40 @@ class _InsuranceApprovalScreenNewState extends State<InsuranceApprovalScreenNew>
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
builder: (context) => InsuranceApprovalsDetails(
|
|
|
|
|
builder: (context) =>
|
|
|
|
|
InsuranceApprovalsDetails(
|
|
|
|
|
patient: patient,
|
|
|
|
|
indexInsurance: index,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
),
|
|
|
|
|
settings: RouteSettings(name: 'InsuranceApprovalsDetails'),
|
|
|
|
|
settings: RouteSettings(
|
|
|
|
|
name: 'InsuranceApprovalsDetails'),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
child: DoctorCardInsurance(
|
|
|
|
|
patientOut: "In Patient",
|
|
|
|
|
profileUrl: model.insuranceApprovalInPatient[index].doctorImage,
|
|
|
|
|
clinic: model.insuranceApprovalInPatient[index].clinicName,
|
|
|
|
|
doctorName: model.insuranceApprovalInPatient[index].doctorName,
|
|
|
|
|
branch: model.insuranceApprovalInPatient[index].approvalNo.toString(),
|
|
|
|
|
profileUrl: model
|
|
|
|
|
.insuranceApprovalInPatient[index]
|
|
|
|
|
.doctorImage,
|
|
|
|
|
clinic: model
|
|
|
|
|
.insuranceApprovalInPatient[index]
|
|
|
|
|
.clinicName,
|
|
|
|
|
doctorName: model
|
|
|
|
|
.insuranceApprovalInPatient[index]
|
|
|
|
|
.doctorName,
|
|
|
|
|
branch: model
|
|
|
|
|
.insuranceApprovalInPatient[index]
|
|
|
|
|
.approvalNo
|
|
|
|
|
.toString(),
|
|
|
|
|
isPrescriptions: true,
|
|
|
|
|
approvalStatus:
|
|
|
|
|
model.insuranceApprovalInPatient[index].approvalStatusDescption ?? '',
|
|
|
|
|
branch2: model.insuranceApprovalInPatient[index].projectName,
|
|
|
|
|
approvalStatus: model
|
|
|
|
|
.insuranceApprovalInPatient[index]
|
|
|
|
|
.approvalStatusDescption ??
|
|
|
|
|
'',
|
|
|
|
|
branch2: model
|
|
|
|
|
.insuranceApprovalInPatient[index]
|
|
|
|
|
.projectName,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -129,7 +128,8 @@ class _InsuranceApprovalScreenNewState extends State<InsuranceApprovalScreenNew>
|
|
|
|
|
Image.asset('assets/images/no-data.png'),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
|
|
|
|
child: AppText(TranslationBase.of(context).noInsuranceApprovalFound),
|
|
|
|
|
child: AppText(TranslationBase.of(context)
|
|
|
|
|
.noInsuranceApprovalFound),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 150.0,
|
|
|
|
|
@ -156,7 +156,8 @@ class _InsuranceApprovalScreenNewState extends State<InsuranceApprovalScreenNew>
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).insurance22,
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.insurance22,
|
|
|
|
|
fontSize: 15.0,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
@ -166,7 +167,8 @@ class _InsuranceApprovalScreenNewState extends State<InsuranceApprovalScreenNew>
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).approvals22,
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.approvals22,
|
|
|
|
|
fontSize: 30.0,
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
),
|
|
|
|
|
@ -180,31 +182,47 @@ class _InsuranceApprovalScreenNewState extends State<InsuranceApprovalScreenNew>
|
|
|
|
|
(index) => Container(
|
|
|
|
|
child: InkWell(
|
|
|
|
|
onTap: () async {
|
|
|
|
|
await locator<AnalyticsService>().logEvent(
|
|
|
|
|
eventCategory: "Insurance Approval Screen New",
|
|
|
|
|
eventAction: "Insurance Approval Details",
|
|
|
|
|
await locator<AnalyticsService>()
|
|
|
|
|
.logEvent(
|
|
|
|
|
eventCategory:
|
|
|
|
|
"Insurance Approval Screen New",
|
|
|
|
|
eventAction:
|
|
|
|
|
"Insurance Approval Details",
|
|
|
|
|
);
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
builder: (context) => InsuranceApprovalsDetails(
|
|
|
|
|
builder: (context) =>
|
|
|
|
|
InsuranceApprovalsDetails(
|
|
|
|
|
patient: patient,
|
|
|
|
|
indexInsurance: index,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
),
|
|
|
|
|
settings: RouteSettings(name: 'InsuranceApprovalsDetails'),
|
|
|
|
|
settings: RouteSettings(
|
|
|
|
|
name:
|
|
|
|
|
'InsuranceApprovalsDetails'),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
child: DoctorCardInsurance(
|
|
|
|
|
patientOut: model.insuranceApproval[index].patientDescription,
|
|
|
|
|
profileUrl: model.insuranceApproval[index].doctorImage,
|
|
|
|
|
clinic: model.insuranceApproval[index].clinicName,
|
|
|
|
|
doctorName: model.insuranceApproval[index].doctorName,
|
|
|
|
|
branch: model.insuranceApproval[index].approvalNo.toString(),
|
|
|
|
|
patientOut: model.insuranceApproval[index]
|
|
|
|
|
.patientDescription,
|
|
|
|
|
profileUrl: model
|
|
|
|
|
.insuranceApproval[index].doctorImage,
|
|
|
|
|
clinic: model
|
|
|
|
|
.insuranceApproval[index].clinicName,
|
|
|
|
|
doctorName: model
|
|
|
|
|
.insuranceApproval[index].doctorName,
|
|
|
|
|
branch: model
|
|
|
|
|
.insuranceApproval[index].approvalNo
|
|
|
|
|
.toString(),
|
|
|
|
|
isPrescriptions: true,
|
|
|
|
|
approvalStatus: model.insuranceApproval[index].approvalStatusDescption ?? '',
|
|
|
|
|
branch2: model.insuranceApproval[index].projectName,
|
|
|
|
|
approvalStatus: model
|
|
|
|
|
.insuranceApproval[index]
|
|
|
|
|
.approvalStatusDescption ??
|
|
|
|
|
'',
|
|
|
|
|
branch2: model
|
|
|
|
|
.insuranceApproval[index].projectName,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -221,7 +239,8 @@ class _InsuranceApprovalScreenNewState extends State<InsuranceApprovalScreenNew>
|
|
|
|
|
Image.asset('assets/images/no-data.png'),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
|
|
|
|
child: AppText(TranslationBase.of(context).noInsuranceApprovalFound),
|
|
|
|
|
child: AppText(TranslationBase.of(context)
|
|
|
|
|
.noInsuranceApprovalFound),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
|