@ -0,0 +1,465 @@
|
||||
class InsuranceApprovalResponseModel {
|
||||
String? setupID;
|
||||
int? projectID;
|
||||
int? approvalNo;
|
||||
String? approvalDate;
|
||||
int? patientType;
|
||||
int? patientID;
|
||||
int? companyID;
|
||||
int? subCategoryID;
|
||||
int? doctorID;
|
||||
int? clinicID;
|
||||
int? approvalType;
|
||||
String? inpatientApprovalSubType;
|
||||
String? validFrom;
|
||||
String? vaildDays;
|
||||
String? validTo;
|
||||
bool? isApprovalOnGross;
|
||||
bool? isPackage;
|
||||
int? requestedAmount;
|
||||
int? actualApprovedAmount;
|
||||
int? aviliableAmount;
|
||||
String? companyApprovalNo;
|
||||
int? progNoteOrderNo;
|
||||
String? submitOn;
|
||||
String? receiptOn;
|
||||
String? remarks1;
|
||||
String? remarks2;
|
||||
int? status;
|
||||
String? feedbackStatusBy;
|
||||
String? feedbackStatus;
|
||||
String? feedbackStatusOn;
|
||||
int? authorizerID;
|
||||
String? expiryDate;
|
||||
int? appointmentNo;
|
||||
int? admissionNo;
|
||||
int? admissionRequestNo;
|
||||
int? createdBy;
|
||||
String? createdOn;
|
||||
int? editedBy;
|
||||
String? editedOn;
|
||||
String? rowVer;
|
||||
bool? isAddlDiscApplied;
|
||||
int? inProgressReasonID;
|
||||
String? extendedBy;
|
||||
String? extendedOn;
|
||||
int? subPolicyNo;
|
||||
int? noOrderAuthorizerID;
|
||||
bool? isVerbalApproval;
|
||||
String? subStatus;
|
||||
bool? isNotificationSend;
|
||||
String? eApprovalStatus;
|
||||
String? eApprovalRemarks;
|
||||
bool? isEmailSentOnDelayApproval;
|
||||
int? eAuthorizationID;
|
||||
InsuranceApprovalDetails? apporvalDetails;
|
||||
String? approvalStatusDescption;
|
||||
String? clinicName;
|
||||
String? clinicNameN;
|
||||
String? companyName;
|
||||
String? doctorImageURL;
|
||||
String? doctorName;
|
||||
String? doctorNameN;
|
||||
int? doctorRate;
|
||||
String? doctorTitle;
|
||||
int? gender;
|
||||
String? genderDescription;
|
||||
bool? isActiveDoctorProfile;
|
||||
bool? isExecludeDoctor;
|
||||
bool? isInOutPatient;
|
||||
String? isInOutPatientDescription;
|
||||
String? isInOutPatientDescriptionN;
|
||||
bool? isLiveCareAppointment;
|
||||
String? projectName;
|
||||
String? projectNameN;
|
||||
String? qR;
|
||||
List<String>? speciality;
|
||||
String? strApprovalDate;
|
||||
String? strExpiryDate;
|
||||
String? strSubmitDate;
|
||||
int? totaUnUsedCount;
|
||||
int? unUsedCount;
|
||||
|
||||
InsuranceApprovalResponseModel(
|
||||
{this.setupID,
|
||||
this.projectID,
|
||||
this.approvalNo,
|
||||
this.approvalDate,
|
||||
this.patientType,
|
||||
this.patientID,
|
||||
this.companyID,
|
||||
this.subCategoryID,
|
||||
this.doctorID,
|
||||
this.clinicID,
|
||||
this.approvalType,
|
||||
this.inpatientApprovalSubType,
|
||||
this.validFrom,
|
||||
this.vaildDays,
|
||||
this.validTo,
|
||||
this.isApprovalOnGross,
|
||||
this.isPackage,
|
||||
this.requestedAmount,
|
||||
this.actualApprovedAmount,
|
||||
this.aviliableAmount,
|
||||
this.companyApprovalNo,
|
||||
this.progNoteOrderNo,
|
||||
this.submitOn,
|
||||
this.receiptOn,
|
||||
this.remarks1,
|
||||
this.remarks2,
|
||||
this.status,
|
||||
this.feedbackStatusBy,
|
||||
this.feedbackStatus,
|
||||
this.feedbackStatusOn,
|
||||
this.authorizerID,
|
||||
this.expiryDate,
|
||||
this.appointmentNo,
|
||||
this.admissionNo,
|
||||
this.admissionRequestNo,
|
||||
this.createdBy,
|
||||
this.createdOn,
|
||||
this.editedBy,
|
||||
this.editedOn,
|
||||
this.rowVer,
|
||||
this.isAddlDiscApplied,
|
||||
this.inProgressReasonID,
|
||||
this.extendedBy,
|
||||
this.extendedOn,
|
||||
this.subPolicyNo,
|
||||
this.noOrderAuthorizerID,
|
||||
this.isVerbalApproval,
|
||||
this.subStatus,
|
||||
this.isNotificationSend,
|
||||
this.eApprovalStatus,
|
||||
this.eApprovalRemarks,
|
||||
this.isEmailSentOnDelayApproval,
|
||||
this.eAuthorizationID,
|
||||
this.apporvalDetails,
|
||||
this.approvalStatusDescption,
|
||||
this.clinicName,
|
||||
this.clinicNameN,
|
||||
this.companyName,
|
||||
this.doctorImageURL,
|
||||
this.doctorName,
|
||||
this.doctorNameN,
|
||||
this.doctorRate,
|
||||
this.doctorTitle,
|
||||
this.gender,
|
||||
this.genderDescription,
|
||||
this.isActiveDoctorProfile,
|
||||
this.isExecludeDoctor,
|
||||
this.isInOutPatient,
|
||||
this.isInOutPatientDescription,
|
||||
this.isInOutPatientDescriptionN,
|
||||
this.isLiveCareAppointment,
|
||||
this.projectName,
|
||||
this.projectNameN,
|
||||
this.qR,
|
||||
this.speciality,
|
||||
this.strApprovalDate,
|
||||
this.strExpiryDate,
|
||||
this.strSubmitDate,
|
||||
this.totaUnUsedCount,
|
||||
this.unUsedCount});
|
||||
|
||||
InsuranceApprovalResponseModel.fromJson(Map<String, dynamic> json) {
|
||||
setupID = json['SetupID'];
|
||||
projectID = json['ProjectID'];
|
||||
approvalNo = json['ApprovalNo'];
|
||||
approvalDate = json['ApprovalDate'];
|
||||
patientType = json['PatientType'];
|
||||
patientID = json['PatientID'];
|
||||
companyID = json['CompanyID'];
|
||||
subCategoryID = json['SubCategoryID'];
|
||||
doctorID = json['DoctorID'];
|
||||
clinicID = json['ClinicID'];
|
||||
approvalType = json['ApprovalType'];
|
||||
inpatientApprovalSubType = json['InpatientApprovalSubType'];
|
||||
validFrom = json['ValidFrom'];
|
||||
vaildDays = json['VaildDays'];
|
||||
validTo = json['ValidTo'];
|
||||
isApprovalOnGross = json['IsApprovalOnGross'];
|
||||
isPackage = json['IsPackage'];
|
||||
requestedAmount = json['RequestedAmount'];
|
||||
actualApprovedAmount = json['ActualApprovedAmount'];
|
||||
aviliableAmount = json['AviliableAmount'];
|
||||
companyApprovalNo = json['CompanyApprovalNo'];
|
||||
progNoteOrderNo = json['ProgNoteOrderNo'];
|
||||
submitOn = json['SubmitOn'];
|
||||
receiptOn = json['ReceiptOn'];
|
||||
remarks1 = json['Remarks1'];
|
||||
remarks2 = json['Remarks2'];
|
||||
status = json['Status'];
|
||||
feedbackStatusBy = json['FeedbackStatusBy'];
|
||||
feedbackStatus = json['FeedbackStatus'];
|
||||
feedbackStatusOn = json['FeedbackStatusOn'];
|
||||
authorizerID = json['AuthorizerID'];
|
||||
expiryDate = json['ExpiryDate'];
|
||||
appointmentNo = json['AppointmentNo'];
|
||||
admissionNo = json['AdmissionNo'];
|
||||
admissionRequestNo = json['AdmissionRequestNo'];
|
||||
createdBy = json['CreatedBy'];
|
||||
createdOn = json['CreatedOn'];
|
||||
editedBy = json['EditedBy'];
|
||||
editedOn = json['EditedOn'];
|
||||
rowVer = json['RowVer'];
|
||||
isAddlDiscApplied = json['IsAddlDiscApplied'];
|
||||
inProgressReasonID = json['InProgressReasonID'];
|
||||
extendedBy = json['ExtendedBy'];
|
||||
extendedOn = json['ExtendedOn'];
|
||||
subPolicyNo = json['SubPolicyNo'];
|
||||
noOrderAuthorizerID = json['NoOrderAuthorizerID'];
|
||||
isVerbalApproval = json['isVerbalApproval'];
|
||||
subStatus = json['SubStatus'];
|
||||
isNotificationSend = json['IsNotificationSend'];
|
||||
eApprovalStatus = json['EApprovalStatus'];
|
||||
eApprovalRemarks = json['EApprovalRemarks'];
|
||||
isEmailSentOnDelayApproval = json['IsEmailSentOnDelayApproval'];
|
||||
eAuthorizationID = json['EAuthorizationID'];
|
||||
if (json['ApporvalDetails'] != null && json['ApporvalDetails'].length != 0) {
|
||||
apporvalDetails = InsuranceApprovalDetails.fromJson(json['ApporvalDetails'][0]);
|
||||
}
|
||||
approvalStatusDescption = json['ApprovalStatusDescption'];
|
||||
clinicName = json['ClinicName'];
|
||||
clinicNameN = json['ClinicNameN'];
|
||||
companyName = json['CompanyName'];
|
||||
doctorImageURL = json['DoctorImageURL'];
|
||||
doctorName = json['DoctorName'];
|
||||
doctorNameN = json['DoctorNameN'];
|
||||
doctorRate = json['DoctorRate'];
|
||||
doctorTitle = json['DoctorTitle'];
|
||||
gender = json['Gender'];
|
||||
genderDescription = json['GenderDescription'];
|
||||
isActiveDoctorProfile = json['IsActiveDoctorProfile'];
|
||||
isExecludeDoctor = json['IsExecludeDoctor'];
|
||||
isInOutPatient = json['IsInOutPatient'];
|
||||
isInOutPatientDescription = json['IsInOutPatientDescription'];
|
||||
isInOutPatientDescriptionN = json['IsInOutPatientDescriptionN'];
|
||||
isLiveCareAppointment = json['IsLiveCareAppointment'];
|
||||
projectName = json['ProjectName'];
|
||||
projectNameN = json['ProjectNameN'];
|
||||
qR = json['QR'];
|
||||
if (json['Speciality'] != null) speciality = json['Speciality'].cast<String>();
|
||||
strApprovalDate = json['StrApprovalDate'];
|
||||
strExpiryDate = json['StrExpiryDate'];
|
||||
strSubmitDate = json['StrSubmitDate'];
|
||||
totaUnUsedCount = json['TotaUnUsedCount'];
|
||||
unUsedCount = json['UnUsedCount'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['SetupID'] = this.setupID;
|
||||
data['ProjectID'] = this.projectID;
|
||||
data['ApprovalNo'] = this.approvalNo;
|
||||
data['ApprovalDate'] = this.approvalDate;
|
||||
data['PatientType'] = this.patientType;
|
||||
data['PatientID'] = this.patientID;
|
||||
data['CompanyID'] = this.companyID;
|
||||
data['SubCategoryID'] = this.subCategoryID;
|
||||
data['DoctorID'] = this.doctorID;
|
||||
data['ClinicID'] = this.clinicID;
|
||||
data['ApprovalType'] = this.approvalType;
|
||||
data['InpatientApprovalSubType'] = this.inpatientApprovalSubType;
|
||||
data['ValidFrom'] = this.validFrom;
|
||||
data['VaildDays'] = this.vaildDays;
|
||||
data['ValidTo'] = this.validTo;
|
||||
data['IsApprovalOnGross'] = this.isApprovalOnGross;
|
||||
data['IsPackage'] = this.isPackage;
|
||||
data['RequestedAmount'] = this.requestedAmount;
|
||||
data['ActualApprovedAmount'] = this.actualApprovedAmount;
|
||||
data['AviliableAmount'] = this.aviliableAmount;
|
||||
data['CompanyApprovalNo'] = this.companyApprovalNo;
|
||||
data['ProgNoteOrderNo'] = this.progNoteOrderNo;
|
||||
data['SubmitOn'] = this.submitOn;
|
||||
data['ReceiptOn'] = this.receiptOn;
|
||||
data['Remarks1'] = this.remarks1;
|
||||
data['Remarks2'] = this.remarks2;
|
||||
data['Status'] = this.status;
|
||||
data['FeedbackStatusBy'] = this.feedbackStatusBy;
|
||||
data['FeedbackStatus'] = this.feedbackStatus;
|
||||
data['FeedbackStatusOn'] = this.feedbackStatusOn;
|
||||
data['AuthorizerID'] = this.authorizerID;
|
||||
data['ExpiryDate'] = this.expiryDate;
|
||||
data['AppointmentNo'] = this.appointmentNo;
|
||||
data['AdmissionNo'] = this.admissionNo;
|
||||
data['AdmissionRequestNo'] = this.admissionRequestNo;
|
||||
data['CreatedBy'] = this.createdBy;
|
||||
data['CreatedOn'] = this.createdOn;
|
||||
data['EditedBy'] = this.editedBy;
|
||||
data['EditedOn'] = this.editedOn;
|
||||
data['RowVer'] = this.rowVer;
|
||||
data['IsAddlDiscApplied'] = this.isAddlDiscApplied;
|
||||
data['InProgressReasonID'] = this.inProgressReasonID;
|
||||
data['ExtendedBy'] = this.extendedBy;
|
||||
data['ExtendedOn'] = this.extendedOn;
|
||||
data['SubPolicyNo'] = this.subPolicyNo;
|
||||
data['NoOrderAuthorizerID'] = this.noOrderAuthorizerID;
|
||||
data['isVerbalApproval'] = this.isVerbalApproval;
|
||||
data['SubStatus'] = this.subStatus;
|
||||
data['IsNotificationSend'] = this.isNotificationSend;
|
||||
data['EApprovalStatus'] = this.eApprovalStatus;
|
||||
data['EApprovalRemarks'] = this.eApprovalRemarks;
|
||||
data['IsEmailSentOnDelayApproval'] = this.isEmailSentOnDelayApproval;
|
||||
data['EAuthorizationID'] = this.eAuthorizationID;
|
||||
if (this.apporvalDetails != null) {
|
||||
data['ApporvalDetails'] = this.apporvalDetails!.toJson;
|
||||
}
|
||||
data['ApprovalStatusDescption'] = this.approvalStatusDescption;
|
||||
data['ClinicName'] = this.clinicName;
|
||||
data['ClinicNameN'] = this.clinicNameN;
|
||||
data['CompanyName'] = this.companyName;
|
||||
data['DoctorImageURL'] = this.doctorImageURL;
|
||||
data['DoctorName'] = this.doctorName;
|
||||
data['DoctorNameN'] = this.doctorNameN;
|
||||
data['DoctorRate'] = this.doctorRate;
|
||||
data['DoctorTitle'] = this.doctorTitle;
|
||||
data['Gender'] = this.gender;
|
||||
data['GenderDescription'] = this.genderDescription;
|
||||
data['IsActiveDoctorProfile'] = this.isActiveDoctorProfile;
|
||||
data['IsExecludeDoctor'] = this.isExecludeDoctor;
|
||||
data['IsInOutPatient'] = this.isInOutPatient;
|
||||
data['IsInOutPatientDescription'] = this.isInOutPatientDescription;
|
||||
data['IsInOutPatientDescriptionN'] = this.isInOutPatientDescriptionN;
|
||||
data['IsLiveCareAppointment'] = this.isLiveCareAppointment;
|
||||
data['ProjectName'] = this.projectName;
|
||||
data['ProjectNameN'] = this.projectNameN;
|
||||
data['QR'] = this.qR;
|
||||
data['Speciality'] = this.speciality;
|
||||
data['StrApprovalDate'] = this.strApprovalDate;
|
||||
data['StrExpiryDate'] = this.strExpiryDate;
|
||||
data['StrSubmitDate'] = this.strSubmitDate;
|
||||
data['TotaUnUsedCount'] = this.totaUnUsedCount;
|
||||
data['UnUsedCount'] = this.unUsedCount;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class InsuranceApprovalDetails {
|
||||
int? setupID;
|
||||
int? projectID;
|
||||
int? approvalNo;
|
||||
int? lineItemNo;
|
||||
int? orderType;
|
||||
int? procedureID;
|
||||
int? toothNo;
|
||||
int? price;
|
||||
int? approvedAmount;
|
||||
String? unapprovedPatientShare;
|
||||
int? waivedAmount;
|
||||
String? discountType;
|
||||
int? discountValue;
|
||||
String? shareType;
|
||||
String? patientShareTypeValue;
|
||||
String? companyShareTypeValue;
|
||||
String? patientShare;
|
||||
String? companyShare;
|
||||
int? deductableAmount;
|
||||
String? disapprovedRemarks;
|
||||
int? progNoteOrderNo;
|
||||
int? progNoteLineItemNo;
|
||||
String? invoiceTransactionType;
|
||||
int? invoiceNo;
|
||||
String? procedureName;
|
||||
String? procedureNameN;
|
||||
String? status;
|
||||
bool? isInvoiced;
|
||||
String? isInvoicedDesc;
|
||||
|
||||
InsuranceApprovalDetails(
|
||||
{this.setupID,
|
||||
this.projectID,
|
||||
this.approvalNo,
|
||||
this.lineItemNo,
|
||||
this.orderType,
|
||||
this.procedureID,
|
||||
this.toothNo,
|
||||
this.price,
|
||||
this.approvedAmount,
|
||||
this.unapprovedPatientShare,
|
||||
this.waivedAmount,
|
||||
this.discountType,
|
||||
this.discountValue,
|
||||
this.shareType,
|
||||
this.patientShareTypeValue,
|
||||
this.companyShareTypeValue,
|
||||
this.patientShare,
|
||||
this.companyShare,
|
||||
this.deductableAmount,
|
||||
this.disapprovedRemarks,
|
||||
this.progNoteOrderNo,
|
||||
this.progNoteLineItemNo,
|
||||
this.invoiceTransactionType,
|
||||
this.invoiceNo,
|
||||
this.procedureName,
|
||||
this.procedureNameN,
|
||||
this.status,
|
||||
this.isInvoiced,
|
||||
this.isInvoicedDesc});
|
||||
|
||||
InsuranceApprovalDetails.fromJson(Map<String, dynamic> json) {
|
||||
setupID = json['SetupID'];
|
||||
projectID = json['ProjectID'];
|
||||
approvalNo = json['ApprovalNo'];
|
||||
lineItemNo = json['LineItemNo'];
|
||||
orderType = json['OrderType'];
|
||||
procedureID = json['ProcedureID'];
|
||||
toothNo = json['ToothNo'];
|
||||
price = json['Price'];
|
||||
approvedAmount = json['ApprovedAmount'];
|
||||
unapprovedPatientShare = json['UnapprovedPatientShare'];
|
||||
waivedAmount = json['WaivedAmount'];
|
||||
discountType = json['DiscountType'];
|
||||
discountValue = json['DiscountValue'];
|
||||
shareType = json['ShareType'];
|
||||
patientShareTypeValue = json['PatientShareTypeValue'];
|
||||
companyShareTypeValue = json['CompanyShareTypeValue'];
|
||||
patientShare = json['PatientShare'];
|
||||
companyShare = json['CompanyShare'];
|
||||
deductableAmount = json['DeductableAmount'];
|
||||
disapprovedRemarks = json['DisapprovedRemarks'];
|
||||
progNoteOrderNo = json['ProgNoteOrderNo'];
|
||||
progNoteLineItemNo = json['ProgNoteLineItemNo'];
|
||||
invoiceTransactionType = json['InvoiceTransactionType'];
|
||||
invoiceNo = json['InvoiceNo'];
|
||||
procedureName = json['ProcedureName'];
|
||||
procedureNameN = json['ProcedureNameN'];
|
||||
status = json['Status'];
|
||||
isInvoiced = json['IsInvoiced'];
|
||||
isInvoicedDesc = json['IsInvoicedDesc'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['SetupID'] = this.setupID;
|
||||
data['ProjectID'] = this.projectID;
|
||||
data['ApprovalNo'] = this.approvalNo;
|
||||
data['LineItemNo'] = this.lineItemNo;
|
||||
data['OrderType'] = this.orderType;
|
||||
data['ProcedureID'] = this.procedureID;
|
||||
data['ToothNo'] = this.toothNo;
|
||||
data['Price'] = this.price;
|
||||
data['ApprovedAmount'] = this.approvedAmount;
|
||||
data['UnapprovedPatientShare'] = this.unapprovedPatientShare;
|
||||
data['WaivedAmount'] = this.waivedAmount;
|
||||
data['DiscountType'] = this.discountType;
|
||||
data['DiscountValue'] = this.discountValue;
|
||||
data['ShareType'] = this.shareType;
|
||||
data['PatientShareTypeValue'] = this.patientShareTypeValue;
|
||||
data['CompanyShareTypeValue'] = this.companyShareTypeValue;
|
||||
data['PatientShare'] = this.patientShare;
|
||||
data['CompanyShare'] = this.companyShare;
|
||||
data['DeductableAmount'] = this.deductableAmount;
|
||||
data['DisapprovedRemarks'] = this.disapprovedRemarks;
|
||||
data['ProgNoteOrderNo'] = this.progNoteOrderNo;
|
||||
data['ProgNoteLineItemNo'] = this.progNoteLineItemNo;
|
||||
data['InvoiceTransactionType'] = this.invoiceTransactionType;
|
||||
data['InvoiceNo'] = this.invoiceNo;
|
||||
data['ProcedureName'] = this.procedureName;
|
||||
data['ProcedureNameN'] = this.procedureNameN;
|
||||
data['Status'] = this.status;
|
||||
data['IsInvoiced'] = this.isInvoiced;
|
||||
data['IsInvoicedDesc'] = this.isInvoicedDesc;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,109 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_staggered_animations/flutter_staggered_animations.dart';
|
||||
import 'package:hmg_patient_app_new/core/app_state.dart';
|
||||
import 'package:hmg_patient_app_new/core/dependencies.dart';
|
||||
import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
|
||||
import 'package:hmg_patient_app_new/core/utils/utils.dart';
|
||||
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
|
||||
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
|
||||
import 'package:hmg_patient_app_new/features/insurance/insurance_view_model.dart';
|
||||
import 'package:hmg_patient_app_new/features/insurance/models/resp_models/patient_insurance_approval_response_model.dart';
|
||||
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
|
||||
import 'package:hmg_patient_app_new/presentation/insurance/widgets/insurance_approval_card.dart';
|
||||
import 'package:hmg_patient_app_new/presentation/insurance/widgets/insurance_approval_details_page.dart';
|
||||
import 'package:hmg_patient_app_new/theme/colors.dart';
|
||||
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
|
||||
import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class InsuranceApprovalsPage extends StatefulWidget {
|
||||
const InsuranceApprovalsPage({super.key});
|
||||
|
||||
@override
|
||||
State<InsuranceApprovalsPage> createState() => _InsuranceApprovalsPageState();
|
||||
}
|
||||
|
||||
class _InsuranceApprovalsPageState extends State<InsuranceApprovalsPage> {
|
||||
late InsuranceViewModel insuranceViewModel;
|
||||
late AppState appState;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
scheduleMicrotask(() {
|
||||
insuranceViewModel.setIsInsuranceApprovalsLoading(true);
|
||||
insuranceViewModel.getPatientInsuranceApprovalsList();
|
||||
});
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
appState = getIt.get<AppState>();
|
||||
insuranceViewModel = Provider.of<InsuranceViewModel>(context, listen: false);
|
||||
return CollapsingListView(
|
||||
title: "${LocaleKeys.insurance.tr(context: context)} ${LocaleKeys.approvals.tr(context: context)}",
|
||||
child: SingleChildScrollView(
|
||||
child: Consumer<InsuranceViewModel>(builder: (context, insuranceVM, child) {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
ListView.separated(
|
||||
padding: EdgeInsets.only(top: 24.h),
|
||||
shrinkWrap: true,
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
itemCount: insuranceVM.isInsuranceApprovalsLoading
|
||||
? 5
|
||||
: insuranceVM.patientInsuranceApprovalsList.isNotEmpty
|
||||
? insuranceVM.patientInsuranceApprovalsList.length
|
||||
: 1,
|
||||
itemBuilder: (context, index) {
|
||||
return insuranceVM.isInsuranceApprovalsLoading
|
||||
? Container(
|
||||
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.h, hasShadow: true),
|
||||
child: InsuranceApprovalCard(
|
||||
insuranceApprovalResponseModel: InsuranceApprovalResponseModel(),
|
||||
appState: appState,
|
||||
isLoading: true,
|
||||
),
|
||||
).paddingSymmetrical(24.h, 0.h)
|
||||
: insuranceVM.patientInsuranceApprovalsList.isNotEmpty
|
||||
? AnimationConfiguration.staggeredList(
|
||||
position: index,
|
||||
duration: const Duration(milliseconds: 500),
|
||||
child: SlideAnimation(
|
||||
verticalOffset: 100.0,
|
||||
child: FadeInAnimation(
|
||||
child: AnimatedContainer(
|
||||
duration: Duration(milliseconds: 300),
|
||||
curve: Curves.easeInOut,
|
||||
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.h, hasShadow: true),
|
||||
child: InsuranceApprovalCard(
|
||||
insuranceApprovalResponseModel: insuranceVM.patientInsuranceApprovalsList[index],
|
||||
appState: appState,
|
||||
isLoading: false,
|
||||
).onPress(() {
|
||||
Navigator.of(context).push(
|
||||
CustomPageRoute(
|
||||
page: InsuranceApprovalDetailsPage(insuranceApprovalResponseModel: insuranceVM.patientInsuranceApprovalsList[index]),
|
||||
),
|
||||
);
|
||||
}),
|
||||
).paddingSymmetrical(24.h, 0.h),
|
||||
),
|
||||
),
|
||||
)
|
||||
: Utils.getNoDataWidget(context, noDataText: "You don't have any insurance approvals yet.".needTranslation);
|
||||
},
|
||||
separatorBuilder: (BuildContext cxt, int index) => SizedBox(height: 16.h),
|
||||
),
|
||||
SizedBox(height: 24.h),
|
||||
],
|
||||
);
|
||||
}),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,129 @@
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hmg_patient_app_new/core/app_assets.dart';
|
||||
import 'package:hmg_patient_app_new/core/app_state.dart';
|
||||
import 'package:hmg_patient_app_new/core/utils/date_util.dart';
|
||||
import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
|
||||
import 'package:hmg_patient_app_new/core/utils/utils.dart';
|
||||
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
|
||||
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
|
||||
import 'package:hmg_patient_app_new/features/insurance/models/resp_models/patient_insurance_approval_response_model.dart';
|
||||
import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/patient_appointment_history_response_model.dart';
|
||||
import 'package:hmg_patient_app_new/features/my_appointments/utils/appointment_type.dart';
|
||||
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
|
||||
import 'package:hmg_patient_app_new/theme/colors.dart';
|
||||
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
|
||||
import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart';
|
||||
|
||||
class InsuranceApprovalCard extends StatelessWidget {
|
||||
InsuranceApprovalCard({super.key, required this.insuranceApprovalResponseModel, required this.isLoading, required this.appState});
|
||||
|
||||
InsuranceApprovalResponseModel insuranceApprovalResponseModel;
|
||||
AppState appState;
|
||||
bool isLoading;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
||||
color: AppColors.whiteColor,
|
||||
borderRadius: 20.h,
|
||||
hasShadow: true,
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.all(14.h),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Wrap(
|
||||
alignment: WrapAlignment.start,
|
||||
direction: Axis.horizontal,
|
||||
spacing: 6.h,
|
||||
runSpacing: 6.h,
|
||||
children: [
|
||||
AppCustomChipWidget(
|
||||
labelText: isLoading ? "Approved" : insuranceApprovalResponseModel.approvalStatusDescption,
|
||||
backgroundColor: insuranceApprovalResponseModel.status == 9 ? AppColors.successColor.withOpacity(0.1) : AppColors.primaryRedColor.withOpacity(0.1),
|
||||
textColor: insuranceApprovalResponseModel.status == 9 ? AppColors.successColor : AppColors.primaryRedColor,
|
||||
).toShimmer2(isShow: isLoading),
|
||||
AppCustomChipWidget(
|
||||
icon: isLoading ? AppAssets.walkin_appointment_icon : (!insuranceApprovalResponseModel.isLiveCareAppointment! ? AppAssets.walkin_appointment_icon : AppAssets.small_livecare_icon),
|
||||
iconColor: isLoading
|
||||
? AppColors.textColor
|
||||
: !insuranceApprovalResponseModel.isLiveCareAppointment!
|
||||
? AppColors.textColor
|
||||
: AppColors.whiteColor,
|
||||
labelText: isLoading
|
||||
? "Walk In"
|
||||
: insuranceApprovalResponseModel.isLiveCareAppointment!
|
||||
? LocaleKeys.livecare.tr(context: context)
|
||||
: "Walk In".needTranslation,
|
||||
backgroundColor: isLoading ? AppColors.greyColor : (!insuranceApprovalResponseModel.isLiveCareAppointment! ? AppColors.greyColor : AppColors.successColor),
|
||||
textColor: isLoading ? AppColors.textColor : (!insuranceApprovalResponseModel.isLiveCareAppointment! ? AppColors.textColor : AppColors.whiteColor),
|
||||
).toShimmer2(isShow: isLoading),
|
||||
AppCustomChipWidget(
|
||||
labelText: isLoading
|
||||
? "OutPatient"
|
||||
: appState.isArabic()
|
||||
? insuranceApprovalResponseModel.isInOutPatientDescriptionN!
|
||||
: insuranceApprovalResponseModel.isInOutPatientDescription!,
|
||||
backgroundColor: AppColors.primaryRedColor.withOpacity(0.1),
|
||||
textColor: AppColors.primaryRedColor,
|
||||
).toShimmer2(isShow: isLoading),
|
||||
],
|
||||
).toShimmer2(isShow: isLoading),
|
||||
SizedBox(height: 16.h),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Image.network(
|
||||
isLoading ? "https://hmgwebservices.com/Images/MobileImages/OALAY/1439.png" : insuranceApprovalResponseModel.doctorImageURL!,
|
||||
width: 63.h,
|
||||
height: 63.h,
|
||||
fit: BoxFit.cover,
|
||||
).circle(100).toShimmer2(isShow: isLoading),
|
||||
SizedBox(width: 16.h),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
(isLoading ? "John Smith" : insuranceApprovalResponseModel.doctorName!).toText16(isBold: true).toShimmer2(isShow: isLoading),
|
||||
Wrap(
|
||||
direction: Axis.horizontal,
|
||||
spacing: 3.h,
|
||||
runSpacing: 4.h,
|
||||
children: [
|
||||
// AppCustomChipWidget(labelText: isLoading ? "Approved" : insuranceApprovalResponseModel.approvalStatusDescption!,
|
||||
// backgroundColor: insuranceApprovalResponseModel.status == 9 ? AppColors.successColor.withValues(alpha: 0.1) : AppColors.primaryRedColor.withValues(alpha: 0.1),
|
||||
// textColor: insuranceApprovalResponseModel.status == 9 ? AppColors.successColor : AppColors.primaryRedColor,
|
||||
// ).toShimmer2(isShow: isLoading),
|
||||
AppCustomChipWidget(labelText: isLoading ? "Cardiology" : insuranceApprovalResponseModel.clinicName!).toShimmer2(isShow: isLoading),
|
||||
AppCustomChipWidget(
|
||||
icon: AppAssets.doctor_calendar_icon,
|
||||
labelText: isLoading ? "Cardiology" : DateUtil.formatDateToDate(DateUtil.convertStringToDate(insuranceApprovalResponseModel.submitOn), false))
|
||||
.toShimmer2(isShow: isLoading),
|
||||
isLoading
|
||||
? SizedBox.shrink()
|
||||
: AppCustomChipWidget(
|
||||
labelText: isLoading ? LocaleKeys.approvalNo.tr(context: context) : "${LocaleKeys.approvalNo.tr(context: context)} ${insuranceApprovalResponseModel.approvalNo}")
|
||||
.toShimmer2(isShow: isLoading),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
Transform.flip(
|
||||
flipX: appState.isArabic(), child: Utils.buildSvgWithAssets(icon: AppAssets.forward_arrow_icon_small, width: 15.h, height: 15.h, fit: BoxFit.contain, iconColor: AppColors.textColor)),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,135 @@
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hmg_patient_app_new/core/app_assets.dart';
|
||||
import 'package:hmg_patient_app_new/core/app_export.dart';
|
||||
import 'package:hmg_patient_app_new/core/app_state.dart';
|
||||
import 'package:hmg_patient_app_new/core/dependencies.dart';
|
||||
import 'package:hmg_patient_app_new/core/utils/date_util.dart';
|
||||
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
|
||||
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
|
||||
import 'package:hmg_patient_app_new/features/insurance/insurance_view_model.dart';
|
||||
import 'package:hmg_patient_app_new/features/insurance/models/resp_models/patient_insurance_approval_response_model.dart';
|
||||
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
|
||||
import 'package:hmg_patient_app_new/theme/colors.dart';
|
||||
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
|
||||
import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class InsuranceApprovalDetailsPage extends StatelessWidget {
|
||||
InsuranceApprovalDetailsPage({super.key, required this.insuranceApprovalResponseModel});
|
||||
|
||||
InsuranceApprovalResponseModel insuranceApprovalResponseModel;
|
||||
late InsuranceViewModel insuranceViewModel;
|
||||
late AppState appState;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
appState = getIt.get<AppState>();
|
||||
insuranceViewModel = Provider.of<InsuranceViewModel>(context, listen: false);
|
||||
return CollapsingListView(
|
||||
title: "${LocaleKeys.insurance.tr(context: context)} ${LocaleKeys.approvals.tr(context: context)}",
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
||||
color: AppColors.whiteColor,
|
||||
borderRadius: 24.h,
|
||||
hasShadow: true,
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.all(14.h),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Wrap(
|
||||
alignment: WrapAlignment.start,
|
||||
direction: Axis.horizontal,
|
||||
spacing: 6.h,
|
||||
runSpacing: 6.h,
|
||||
children: [
|
||||
AppCustomChipWidget(
|
||||
labelText: insuranceApprovalResponseModel.approvalStatusDescption,
|
||||
backgroundColor: insuranceApprovalResponseModel.status == 9 ? AppColors.successColor.withOpacity(0.1) : AppColors.primaryRedColor.withOpacity(0.1),
|
||||
textColor: insuranceApprovalResponseModel.status == 9 ? AppColors.successColor : AppColors.primaryRedColor,
|
||||
),
|
||||
AppCustomChipWidget(
|
||||
icon: (!insuranceApprovalResponseModel.isLiveCareAppointment! ? AppAssets.walkin_appointment_icon : AppAssets.small_livecare_icon),
|
||||
iconColor: !insuranceApprovalResponseModel.isLiveCareAppointment! ? AppColors.textColor : AppColors.whiteColor,
|
||||
labelText: insuranceApprovalResponseModel.isLiveCareAppointment! ? LocaleKeys.livecare.tr(context: context) : "Walk In".needTranslation,
|
||||
backgroundColor: (!insuranceApprovalResponseModel.isLiveCareAppointment! ? AppColors.greyColor : AppColors.successColor),
|
||||
textColor: (!insuranceApprovalResponseModel.isLiveCareAppointment! ? AppColors.textColor : AppColors.whiteColor),
|
||||
),
|
||||
AppCustomChipWidget(
|
||||
labelText: appState.isArabic() ? insuranceApprovalResponseModel.isInOutPatientDescriptionN! : insuranceApprovalResponseModel.isInOutPatientDescription!,
|
||||
backgroundColor: AppColors.primaryRedColor.withOpacity(0.1),
|
||||
textColor: AppColors.primaryRedColor,
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 16.h),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Image.network(
|
||||
insuranceApprovalResponseModel.doctorImageURL!,
|
||||
width: 63.h,
|
||||
height: 63.h,
|
||||
fit: BoxFit.cover,
|
||||
).circle(100),
|
||||
SizedBox(width: 16.h),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
(insuranceApprovalResponseModel.doctorName!).toText16(isBold: true),
|
||||
Wrap(
|
||||
direction: Axis.horizontal,
|
||||
spacing: 3.h,
|
||||
runSpacing: 4.h,
|
||||
children: [
|
||||
AppCustomChipWidget(labelText: insuranceApprovalResponseModel.clinicName!),
|
||||
AppCustomChipWidget(labelText: "${LocaleKeys.approvalNo.tr(context: context)} ${insuranceApprovalResponseModel.approvalNo}"),
|
||||
AppCustomChipWidget(labelText: "${LocaleKeys.unusedCount.tr(context: context)} ${insuranceApprovalResponseModel.unUsedCount}"),
|
||||
AppCustomChipWidget(labelText: "${LocaleKeys.companyName.tr(context: context)} ${insuranceApprovalResponseModel.companyName}"),
|
||||
AppCustomChipWidget(
|
||||
labelText:
|
||||
"${LocaleKeys.receiptOn.tr(context: context)} ${DateUtil.formatDateToDate(DateUtil.convertStringToDate(insuranceApprovalResponseModel.receiptOn), false)}"),
|
||||
AppCustomChipWidget(
|
||||
labelText:
|
||||
"${LocaleKeys.expiryOn.tr(context: context)} ${DateUtil.formatDateToDate(DateUtil.convertStringToDate(insuranceApprovalResponseModel.expiryDate), false)}"),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 16.h),
|
||||
Container(
|
||||
width: double.infinity,
|
||||
height: 200.h,
|
||||
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
||||
color: AppColors.whiteColor,
|
||||
borderRadius: 24.h,
|
||||
hasShadow: true,
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.all(16.h),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
"Approval Details".toText16(isBold: true),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
).paddingSymmetrical(24.h, 24.h),
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue