bug fixes and insurance approvals improvements.

merge-update-with-lab-changes
Sikander Saleem 5 years ago
parent 2447d006d2
commit eb9005510d

@ -30,3 +30,4 @@ const NOTIFICATION_COUNT = 'notification-count';
const PHARMACY_SELECTED_ADDRESS = 'selected-address'; const PHARMACY_SELECTED_ADDRESS = 'selected-address';
const PHARMACY_AUTORZIE_TOKEN = 'PHARMACY_AUTORZIE_TOKEN'; const PHARMACY_AUTORZIE_TOKEN = 'PHARMACY_AUTORZIE_TOKEN';
const H2O_UNIT = 'H2O_UNIT'; const H2O_UNIT = 'H2O_UNIT';
const H2O_REMINDER = 'H2O_REMINDER';

@ -49,6 +49,7 @@ class UserDetailModel {
this.isNotificationON}); this.isNotificationON});
UserDetailModel.fromJson(Map<String, dynamic> json) { UserDetailModel.fromJson(Map<String, dynamic> json) {
if(json==null) return;
userID = json['UserID']; userID = json['UserID'];
patientID = json['PatientID']; patientID = json['PatientID'];
patientType = json['PatientType']; patientType = json['PatientType'];

@ -1,4 +1,4 @@
class ReauestInsuranceApprovalModel { class RequestInsuranceApprovalModel {
double versionID; double versionID;
int channel; int channel;
int languageID; int languageID;
@ -15,7 +15,7 @@ class ReauestInsuranceApprovalModel {
int eXuldAPPNO; int eXuldAPPNO;
int projectID; int projectID;
ReauestInsuranceApprovalModel( RequestInsuranceApprovalModel(
{this.versionID, {this.versionID,
this.channel, this.channel,
this.languageID, this.languageID,
@ -32,7 +32,7 @@ class ReauestInsuranceApprovalModel {
this.eXuldAPPNO, this.eXuldAPPNO,
this.projectID}); this.projectID});
ReauestInsuranceApprovalModel.fromJson(Map<String, dynamic> json) { RequestInsuranceApprovalModel.fromJson(Map<String, dynamic> json) {
versionID = json['VersionID']; versionID = json['VersionID'];
channel = json['Channel']; channel = json['Channel'];
languageID = json['LanguageID']; languageID = json['LanguageID'];

@ -1,140 +1,465 @@
class InsuranceApprovalDetails {
String procedureName;
String status;
String isInvoicedDesc;
InsuranceApprovalDetails({
this.procedureName,
this.status,
this.isInvoicedDesc,
});
InsuranceApprovalDetails.fromJson(Map<String, dynamic> json) {
try {
isInvoicedDesc = json['IsInvoicedDesc'];
status = json['Status'];
procedureName = json['ProcedureName'];
} catch (e) {
print(e);
}
}
}
class InsuranceApprovalModel { class InsuranceApprovalModel {
InsuranceApprovalDetails approvalDetails; String setupID;
double versionID;
int channel;
int languageID;
String iPAdress;
String generalid;
int patientOutSA;
String sessionID;
bool isDentalAllowedBackend;
int deviceTypeID;
int patientID;
String tokenID;
int patientTypeID;
int patientType;
int eXuldAPPNO;
int projectID; int projectID;
String doctorName;
String clinicName;
String patientDescription;
int approvalNo; int approvalNo;
String approvalStatusDescption; String approvalDate;
int unUsedCount; int patientType;
int patientID;
//String companyName; 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; String expiryDate;
String rceiptOn;
int appointmentNo; 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;
InsuranceApprovalModel( InsuranceApprovalModel(
{this.versionID, {this.setupID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID,
this.patientID,
this.tokenID,
this.patientTypeID,
this.patientType,
this.eXuldAPPNO,
this.projectID, this.projectID,
this.doctorName,
this.clinicName,
this.patientDescription,
this.approvalNo, this.approvalNo,
this.approvalStatusDescption, this.approvalDate,
this.unUsedCount, this.patientType,
//this.companyName, 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.expiryDate,
this.rceiptOn, this.appointmentNo,
this.approvalDetails, this.admissionNo,
this.appointmentNo}); this.admissionRequestNo,
this.createdBy,
InsuranceApprovalDetails x = InsuranceApprovalDetails(); 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});
InsuranceApprovalModel.fromJson(Map<String, dynamic> json) { InsuranceApprovalModel.fromJson(Map<String, dynamic> json) {
try { setupID = json['SetupID'];
rceiptOn = json['ReceiptOn']; projectID = json['ProjectID'];
expiryDate = json['ExpiryDate'];
//companyName = json['CompanyName'];
unUsedCount = json['TotaUnUsedCount'];
approvalStatusDescption = json['ApprovalStatusDescption'];
approvalNo = json['ApprovalNo']; approvalNo = json['ApprovalNo'];
patientDescription = json['IsInOutPatientDescription']; approvalDate = json['ApprovalDate'];
versionID = json['VersionID'];
channel = json['Channel'];
languageID = json['LanguageID'];
iPAdress = json['IPAdress'];
generalid = json['generalid'];
patientOutSA = json['PatientOutSA'];
sessionID = json['SessionID'];
isDentalAllowedBackend = json['isDentalAllowedBackend'];
deviceTypeID = json['DeviceTypeID'];
patientID = json['PatientID'];
tokenID = json['TokenID'];
patientTypeID = json['PatientTypeID'];
patientType = json['PatientType']; patientType = json['PatientType'];
eXuldAPPNO = json['EXuldAPPNO']; patientID = json['PatientID'];
projectID = json['ProjectID']; companyID = json['CompanyID'];
doctorName = json['DoctorName']; subCategoryID = json['SubCategoryID'];
clinicName = json['ClinicName']; doctorID = json['DoctorID'];
approvalDetails = clinicID = json['ClinicID'];
InsuranceApprovalDetails.fromJson(json['ApporvalDetails'][0]); 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']; appointmentNo = json['AppointmentNo'];
} catch (e) { admissionNo = json['AdmissionNo'];
print(e); 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) {
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'];
speciality = json['Speciality'].cast<String>();
strApprovalDate = json['StrApprovalDate'];
strExpiryDate = json['StrExpiryDate'];
strSubmitDate = json['StrSubmitDate'];
totaUnUsedCount = json['TotaUnUsedCount'];
unUsedCount = json['UnUsedCount'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = new Map<String, dynamic>();
data['VersionID'] = this.versionID; data['SetupID'] = this.setupID;
data['Channel'] = this.channel;
data['LanguageID'] = this.languageID;
data['IPAdress'] = this.iPAdress;
data['generalid'] = this.generalid;
data['PatientOutSA'] = this.patientOutSA;
data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID;
data['PatientID'] = this.patientID;
data['TokenID'] = this.tokenID;
data['PatientTypeID'] = this.patientTypeID;
data['PatientType'] = this.patientType;
if (appointmentNo == null) {
data['EXuldAPPNO'] = this.eXuldAPPNO;
data['ProjectID'] = this.projectID; data['ProjectID'] = this.projectID;
} data['ApprovalNo'] = this.approvalNo;
if (appointmentNo != null) { 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['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; return data;
} }
} }

@ -1,6 +1,7 @@
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/insurance/Insurance_card_details.dart'; import 'package:diplomaticquarterapp/core/model/insurance/Insurance_card_details.dart';
import 'package:diplomaticquarterapp/core/model/insurance/ReauestInsuranceApprovalModel.dart';
import 'package:diplomaticquarterapp/core/model/insurance/insurance_approval.dart'; import 'package:diplomaticquarterapp/core/model/insurance/insurance_approval.dart';
import 'package:diplomaticquarterapp/core/model/insurance/insurance_card.dart'; import 'package:diplomaticquarterapp/core/model/insurance/insurance_card.dart';
import 'package:diplomaticquarterapp/core/model/insurance/insurance_card_update_model.dart'; import 'package:diplomaticquarterapp/core/model/insurance/insurance_card_update_model.dart';
@ -25,8 +26,7 @@ class InsuranceCardService extends BaseService {
List<InsuranceCardDetailsModel> insuranceCardDetailsList = List(); List<InsuranceCardDetailsModel> insuranceCardDetailsList = List();
bool isHaveInsuranceCard = false; bool isHaveInsuranceCard = false;
GetAllSharedRecordsByStatusResponse getAllSharedRecordsByStatusResponse = GetAllSharedRecordsByStatusResponse getAllSharedRecordsByStatusResponse = GetAllSharedRecordsByStatusResponse();
GetAllSharedRecordsByStatusResponse();
clearInsuranceCard() { clearInsuranceCard() {
_cardList.clear(); _cardList.clear();
@ -36,19 +36,12 @@ class InsuranceCardService extends BaseService {
_cardUpdated.clear(); _cardUpdated.clear();
} }
RequestInsuranceApprovalModel _requestInsuranceApprovalModel = RequestInsuranceApprovalModel(isDentalAllowedBackend: false, patientTypeID: 1, patientType: 1, eXuldAPPNO: 0, projectID: 0);
InsuranceApprovalModel _insuranceApprovalModel = InsuranceApprovalModel(
isDentalAllowedBackend: false,
patientTypeID: 1,
patientType: 1,
eXuldAPPNO: 0,
projectID: 0);
Future getInsurance() async { Future getInsurance() async {
hasError = false; hasError = false;
_cardList.clear(); _cardList.clear();
await baseAppClient.post(GET_PAtIENTS_INSURANCE, await baseAppClient.post(GET_PAtIENTS_INSURANCE, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
response['List_PatientInsuranceCard'].forEach((item) { response['List_PatientInsuranceCard'].forEach((item) {
_cardList.add(InsuranceCardModel.fromJson(item)); _cardList.add(InsuranceCardModel.fromJson(item));
}); });
@ -61,8 +54,7 @@ class InsuranceCardService extends BaseService {
Future getInsuranceUpdate() async { Future getInsuranceUpdate() async {
hasError = false; hasError = false;
_cardList.clear(); _cardList.clear();
await baseAppClient.post(GET_PAtIENTS_INSURANCE_UPDATED, await baseAppClient.post(GET_PAtIENTS_INSURANCE_UPDATED, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
_cardUpdated.clear(); _cardUpdated.clear();
response['List_PatientInsuranceCardHistory'].forEach((item) { response['List_PatientInsuranceCardHistory'].forEach((item) {
_cardUpdated.add(InsuranceUpdateModel.fromJson(item)); _cardUpdated.add(InsuranceUpdateModel.fromJson(item));
@ -77,17 +69,16 @@ class InsuranceCardService extends BaseService {
hasError = false; hasError = false;
// _cardList.clear(); // _cardList.clear();
if (appointmentNo != null) { if (appointmentNo != null) {
_insuranceApprovalModel.appointmentNo = appointmentNo; // _requestInsuranceApprovalModel.appointmentNo = appointmentNo;
_insuranceApprovalModel.eXuldAPPNO = null; _requestInsuranceApprovalModel.eXuldAPPNO = null;
_insuranceApprovalModel.projectID = null; _requestInsuranceApprovalModel.projectID = null;
} else { } else {
_insuranceApprovalModel.appointmentNo = null; // _requestInsuranceApprovalModel.appointmentNo = null;
_insuranceApprovalModel.eXuldAPPNO = 0; _requestInsuranceApprovalModel.eXuldAPPNO = 0;
_insuranceApprovalModel.projectID = 0; _requestInsuranceApprovalModel.projectID = 0;
} }
await baseAppClient.post(GET_PAtIENTS_INSURANCE_APPROVALS, await baseAppClient.post(GET_PAtIENTS_INSURANCE_APPROVALS, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
print(response['HIS_Approval_List'].length); print(response['HIS_Approval_List'].length);
_insuranceApproval.clear(); _insuranceApproval.clear();
_insuranceApproval.length = 0; _insuranceApproval.length = 0;
@ -97,14 +88,13 @@ class InsuranceCardService extends BaseService {
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: _insuranceApprovalModel.toJson()); }, body: _requestInsuranceApprovalModel.toJson());
} }
Future getFamilyFiles() async { Future getFamilyFiles() async {
var myFamily = await sharedPref.getObject(FAMILY_FILE); var myFamily = await sharedPref.getObject(FAMILY_FILE);
if (myFamily != null) { if (myFamily != null) {
getAllSharedRecordsByStatusResponse = getAllSharedRecordsByStatusResponse = GetAllSharedRecordsByStatusResponse.fromJson(myFamily);
GetAllSharedRecordsByStatusResponse.fromJson(myFamily);
} else { } else {
getSharedRecordByStatus(); getSharedRecordByStatus();
} }
@ -115,68 +105,75 @@ class InsuranceCardService extends BaseService {
dynamic localRes; dynamic localRes;
var request = GetAllSharedRecordsByStatusReq(); var request = GetAllSharedRecordsByStatusReq();
request.status = 0; request.status = 0;
await baseAppClient.post(GET_SHARED_RECORD_BY_STATUS, await baseAppClient.post(GET_SHARED_RECORD_BY_STATUS, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
AppToast.showErrorToast(message: error); AppToast.showErrorToast(message: error);
throw error; throw error;
}, body: request.toJson()); }, body: request.toJson());
sharedPref.setObject(FAMILY_FILE, localRes); sharedPref.setObject(FAMILY_FILE, localRes);
getAllSharedRecordsByStatusResponse = getAllSharedRecordsByStatusResponse = GetAllSharedRecordsByStatusResponse.fromJson(localRes);
GetAllSharedRecordsByStatusResponse.fromJson(localRes);
} catch (error) { } catch (error) {
print(error); print(error);
throw error; throw error;
} }
} }
Future getInsuranceDetails(data) async{
Future getInsuranceDetails(data) async {
dynamic localRes; dynamic localRes;
await baseAppClient.post(INSURANCE_DETAILS, await baseAppClient.post(
INSURANCE_DETAILS,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
localRes = response['List_InsuranceCheckList']; localRes = response['List_InsuranceCheckList'];
}, onFailure: (String error, int statusCode) { },
onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body:{'CompanyID': data.companyID,'SubCategoryID':data.subCategoryID },); },
body: {'CompanyID': data.companyID, 'SubCategoryID': data.subCategoryID},
);
return Future.value(localRes); return Future.value(localRes);
} }
Future getPatientInsuranceDetails({String setupID, int projectID, String patientIdentificationID,int patientID}) async{ Future getPatientInsuranceDetails({String setupID, int projectID, String patientIdentificationID, int patientID}) async {
error = ""; error = "";
hasError = false; hasError = false;
insuranceCardDetails = null; insuranceCardDetails = null;
isHaveInsuranceCard = false; isHaveInsuranceCard = false;
await baseAppClient.post(GET_PATIENT_INSURANCE_DETAILS, await baseAppClient.post(
GET_PATIENT_INSURANCE_DETAILS,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
insuranceCardDetailsList.clear(); insuranceCardDetailsList.clear();
isHaveInsuranceCard = true; isHaveInsuranceCard = true;
response['List_PatientInsuranceDetails'].forEach((item) { response['List_PatientInsuranceDetails'].forEach((item) {
insuranceCardDetailsList.add(InsuranceCardDetailsModel.fromJson(item)); insuranceCardDetailsList.add(InsuranceCardDetailsModel.fromJson(item));
}); });
}, onFailure: (String error, int statusCode) { },
onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body:{'SetupID': setupID,'ProjectID':projectID,'PatientIdentificationID':patientIdentificationID ,'isDentalAllowedBackend':false,'PatientID':patientID},); },
body: {'SetupID': setupID, 'ProjectID': projectID, 'PatientIdentificationID': patientIdentificationID, 'isDentalAllowedBackend': false, 'PatientID': patientID},
);
} }
Future uploadInsuranceCard({ String patientIdentificationID,int patientID,String image=""}) async{ Future uploadInsuranceCard({String patientIdentificationID, int patientID, String image = ""}) async {
error = ""; error = "";
Map<String,dynamic> body = Map(); Map<String, dynamic> body = Map();
body['PatientID']=patientID; body['PatientID'] = patientID;
body['PatientType']=user.patientType; body['PatientType'] = user.patientType;
body['MobileNo']=user.mobileNumber; body['MobileNo'] = user.mobileNumber;
body['PatientIdentificationID']=patientIdentificationID; body['PatientIdentificationID'] = patientIdentificationID;
body['InsuranceCardImage']= image; body['InsuranceCardImage'] = image;
await baseAppClient.post(UPLOAD_INSURANCE_CARD, await baseAppClient.post(
onSuccess: (dynamic response, int statusCode) { UPLOAD_INSURANCE_CARD,
onSuccess: (dynamic response, int statusCode) {},
}, onFailure: (String error, int statusCode) { onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body:body,); },
body: body,
);
} }
} }

@ -14,6 +14,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/painting.dart'; import 'package:flutter/painting.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';
import 'package:manage_calendar_events/manage_calendar_events.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import 'Dialog/setting_page_radio_button_list_dialog.dart'; import 'Dialog/setting_page_radio_button_list_dialog.dart';
@ -53,14 +54,14 @@ class _H2oSettingState extends State<H2oSetting> {
void initState() { void initState() {
super.initState(); super.initState();
_userDetailModel = widget.userDetailModel; _userDetailModel = widget.userDetailModel;
_heightValue = _userDetailModel.height; _heightValue = _userDetailModel?.height ?? 100;
_weightValue = _userDetailModel.weight; _weightValue = _userDetailModel?.weight ?? 50;
_heightController.text = _heightValue.toStringAsFixed(0); _heightController.text = _heightValue.toStringAsFixed(0);
_weightController.text = _weightValue.toStringAsFixed(0); _weightController.text = _weightValue.toStringAsFixed(0);
_nameController.text = _userDetailModel.firstName; _nameController.text = _userDetailModel.firstName;
_isWeightKG = _userDetailModel.isWeightInKG; _isWeightKG = _userDetailModel?.isWeightInKG ?? true;
_isHeightCM = _userDetailModel.isHeightInCM; _isHeightCM = _userDetailModel?.isHeightInCM ?? true;
_isGenderMale = _userDetailModel.gender == "M" ? true : false; _isGenderMale = (_userDetailModel?.gender ?? "M") == "M" ? true : false;
_dobDate = DateUtil.convertStringToDate(_userDetailModel.dOB); _dobDate = DateUtil.convertStringToDate(_userDetailModel.dOB);
_selectedActiveLevel = _userDetailModel.activityID ?? 1; _selectedActiveLevel = _userDetailModel.activityID ?? 1;
readPrefs(); readPrefs();
@ -70,6 +71,7 @@ class _H2oSettingState extends State<H2oSetting> {
void readPrefs() async { void readPrefs() async {
prefs = await SharedPreferences.getInstance(); prefs = await SharedPreferences.getInstance();
_isUnitML = (prefs.getString(H2O_UNIT) ?? "ml") == "ml" ? true : false; _isUnitML = (prefs.getString(H2O_UNIT) ?? "ml") == "ml" ? true : false;
_selectedRemindedTime = prefs.getInt(H2O_REMINDER) ?? 0;
setState(() {}); setState(() {});
} }
@ -450,14 +452,35 @@ class _H2oSettingState extends State<H2oSetting> {
_userDetailModel.dOB = tempDate; _userDetailModel.dOB = tempDate;
_userDetailModel.activityID = _selectedActiveLevel; _userDetailModel.activityID = _selectedActiveLevel;
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
await prefs.setString(H2O_UNIT, _isUnitML ? "ml" : "l"); await widget.viewModel.updateUserDetail(_userDetailModel, (tag) async {
await widget.viewModel.updateUserDetail(_userDetailModel, (tag) {
if (tag) { if (tag) {
AppToast.showSuccessToast(message: TranslationBase.of(context).success); AppToast.showSuccessToast(message: TranslationBase.of(context).success);
await prefs.setString(H2O_UNIT, _isUnitML ? "ml" : "l");
int _tempRemindTime = prefs.getInt(H2O_REMINDER) ?? _selectedRemindedTime;
if (_tempRemindTime != _selectedRemindedTime) {
await prefs.setInt(H2O_REMINDER, _selectedRemindedTime);
_addReminderToCalender(_selectedRemindedTime);
}
} }
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
}); });
Navigator.pop(context); Navigator.pop(context);
} }
final CalendarPlugin _myPlugin = CalendarPlugin();
void _addReminderToCalender(int _selectedRemindedTime) async {
bool _calendarPermission = await _myPlugin.hasPermissions();
if (_calendarPermission) {
} else {
await _myPlugin.requestPermissions();
}
_myPlugin.hasPermissions().then((value) {
if (!value) {
_myPlugin.requestPermissions();
} else {
_myPlugin.getCalendars().then((value) => {print(value.length)});
}
});
}
} }

@ -24,23 +24,13 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
imagesInfo.add(ImagesInfo( imagesInfo
imageEn: .add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/ar/0.png'));
'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/en/0.png', imagesInfo
imageAr: .add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/en/1.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/ar/1.png'));
'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/ar/0.png'));
imagesInfo.add(ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/en/1.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/ar/1.png'));
return BaseView<InsuranceViewModel>( return BaseView<InsuranceViewModel>(
onModelReady: widget.appointmentNo != null onModelReady: widget.appointmentNo != null ? (model) => model.getInsuranceApproval(appointmentNo: widget.appointmentNo) : (model) => model.getInsuranceApproval(),
? (model) => builder: (BuildContext context, InsuranceViewModel model, Widget child) => AppScaffold(
model.getInsuranceApproval(appointmentNo: widget.appointmentNo)
: (model) => model.getInsuranceApproval(),
builder: (BuildContext context, InsuranceViewModel model, Widget child) =>
AppScaffold(
isShowAppBar: true, isShowAppBar: true,
baseViewModel: model, baseViewModel: model,
appBarTitle: TranslationBase.of(context).approvals, appBarTitle: TranslationBase.of(context).approvals,
@ -73,21 +63,19 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
Container( Container(
width: 60, width: 60,
height: 40, height: 40,
decoration: BoxDecoration( decoration: BoxDecoration(color: Theme.of(context).primaryColor, borderRadius: BorderRadius.circular(19.0)),
color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.circular(19.0)),
child: Center( child: Center(
child: Texts( child: Texts(
model.insuranceApproval[0].unUsedCount model.insuranceApproval[0].unUsedCount.toString(),
.toString(), color: Colors.white,
color: Colors.white, fontSize: 17.0, fontSize: 17.0,
), ),
)) ))
], ],
)), )),
...List.generate( ...List.generate(model.insuranceApproval.length, (index) {
model.insuranceApproval.length, print(model.insuranceApproval[index].isLiveCareAppointment);
(index) => RoundedContainer( return RoundedContainer(
backgroundColor: Colors.white, backgroundColor: Colors.white,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -96,56 +84,24 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
title: Container( title: Container(
//height: 120.0, //height: 120.0,
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
model.insuranceApproval[index].patientDescription == "In Patient" model.insuranceApproval[index].isLiveCareAppointment
? Container( ? sideBadge(TranslationBase.of(context).liveCare, 0xffA9A089)
decoration: BoxDecoration( : model.insuranceApproval[index].isInOutPatient
color: Theme.of(context).primaryColor, ? sideBadge(TranslationBase.of(context).outpatient, 0xff505a5d)
borderRadius: : sideBadge(TranslationBase.of(context).inPatient, 0xffb8372c),
BorderRadius.circular(
16.0)),
width: 115.0,
padding:
EdgeInsets.only(left: 11.5),
child: Center(
child: Texts(
TranslationBase.of(context).inPatient,
color: Colors.white,
),
),
)
: Container(
decoration: BoxDecoration(
color: Color(0xff505A5D),
borderRadius:
BorderRadius.circular(
16.0)),
width: 115.0,
padding:
EdgeInsets.only(left: 11.5),
child: Center(
child: Texts(
TranslationBase.of(context).outpatient,
color: Colors.white,
),
),
),
Padding( Padding(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(vertical: 10.0),
vertical: 10.0),
child: Texts( child: Texts(
model.insuranceApproval[index] model.insuranceApproval[index].clinicName,
.clinicName,
fontSize: 20.0, fontSize: 20.0,
color: Color(0xff60686B), color: Color(0xff60686B),
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
), ),
Texts( Texts(
model.insuranceApproval[index] model.insuranceApproval[index].doctorName,
.doctorName,
fontSize: 17.0, fontSize: 17.0,
), ),
], ],
@ -153,11 +109,9 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
), ),
children: <Widget>[ children: <Widget>[
Padding( Padding(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(vertical: 12.0, horizontal: 12.0),
vertical: 12.0, horizontal: 12.0),
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Row( Row(
children: [ children: [
@ -165,9 +119,11 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
TranslationBase.of(context).approvalNo, TranslationBase.of(context).approvalNo,
fontSize: 18.0, fontSize: 18.0,
), ),
Texts(model.insuranceApproval[index].approvalNo.toString(), Texts(
model.insuranceApproval[index].approvalNo.toString(),
fontSize: 18.0, fontSize: 18.0,
fontWeight: FontWeight.w600,), fontWeight: FontWeight.w600,
),
], ],
), ),
Divider( Divider(
@ -178,10 +134,12 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
Row( Row(
children: [ children: [
Texts( Texts(
TranslationBase.of(context).procedureStatus , TranslationBase.of(context).procedureStatus,
fontSize: 17.5, fontSize: 17.5,
), ),
SizedBox(width: 12,), SizedBox(
width: 12,
),
Texts( Texts(
model.insuranceApproval[index].approvalStatusDescption, model.insuranceApproval[index].approvalStatusDescption,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
@ -238,16 +196,14 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
Row( Row(
children: [ children: [
Texts( Texts(
TranslationBase.of(context).receiptOn , TranslationBase.of(context).receiptOn,
fontSize: 17.5, fontSize: 17.5,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
Texts( Texts(
convertDateFormat(model.insuranceApproval[index].rceiptOn), convertDateFormat(model.insuranceApproval[index].receiptOn),
fontSize: 17.5, fontSize: 17.5,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
], ],
), ),
@ -262,13 +218,11 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
TranslationBase.of(context).expiryDate, TranslationBase.of(context).expiryDate,
fontSize: 17.5, fontSize: 17.5,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
Texts( Texts(
convertDateFormat(model.insuranceApproval[index].expiryDate), convertDateFormat(model.insuranceApproval[index].expiryDate),
fontSize: 17.5, fontSize: 17.5,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
], ],
), ),
@ -279,37 +233,18 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
), ),
IntrinsicHeight( IntrinsicHeight(
child: Row( child: Row(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.center,
CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
flex: 1, flex: 1,
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Text(TranslationBase.of( Text(TranslationBase.of(context).procedureName),
context)
.procedureName),
Padding( Padding(
padding: EdgeInsets.only( padding: EdgeInsets.only(top: SizeConfig.heightMultiplier * 3.0),
top: SizeConfig
.heightMultiplier *
3.0),
child: Text( child: Text(
model model.insuranceApproval[index].apporvalDetails?.procedureName ?? '',
.insuranceApproval[ style: TextStyle(fontWeight: FontWeight.w600, fontSize: 15.5),
index]
.approvalDetails ==
null
? ''
: model
.insuranceApproval[
index]
.approvalDetails
.procedureName,
style: TextStyle(
fontWeight:
FontWeight.w600,
fontSize: 15.5),
), ),
), ),
], ],
@ -324,31 +259,12 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
flex: 1, flex: 1,
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Text(TranslationBase.of( Text(TranslationBase.of(context).procedureStatus),
context)
.procedureStatus),
Padding( Padding(
padding: EdgeInsets.only( padding: EdgeInsets.only(top: SizeConfig.heightMultiplier * 3.0),
top: SizeConfig
.heightMultiplier *
3.0),
child: Text( child: Text(
model model.insuranceApproval[index].apporvalDetails?.status ?? '',
.insuranceApproval[ style: TextStyle(fontSize: 17.5, fontWeight: FontWeight.w600),
index]
.approvalDetails ==
null
? ''
: model
.insuranceApproval[
index]
.approvalDetails
.status,
style: TextStyle(
fontSize: 17.5,
fontWeight:
FontWeight
.w600),
), ),
), ),
], ],
@ -363,30 +279,12 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
flex: 1, flex: 1,
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Text(TranslationBase.of( Text(TranslationBase.of(context).usageStatus),
context)
.usageStatus),
Padding( Padding(
padding: EdgeInsets.only( padding: EdgeInsets.only(top: SizeConfig.heightMultiplier * 3.0),
top: SizeConfig
.heightMultiplier *
3.0),
child: Text( child: Text(
model model.insuranceApproval[index].apporvalDetails?.isInvoicedDesc ?? '',
.insuranceApproval[ style: TextStyle(fontWeight: FontWeight.w600, fontSize: 17.5),
index]
.approvalDetails ==
null
? ''
: model
.insuranceApproval[
index]
.approvalDetails
.isInvoicedDesc,
style: TextStyle(
fontWeight:
FontWeight.w600,
fontSize: 17.5),
), ),
), ),
], ],
@ -407,7 +305,8 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
), ),
], ],
), ),
)), );
}),
], ],
), ),
), ),
@ -416,6 +315,22 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
); );
} }
Widget sideBadge(String title, int color) {
return Container(
decoration: BoxDecoration(
color: Color(color),
borderRadius: BorderRadius.circular(16.0),
),
width: 115.0,
padding: EdgeInsets.only(top: 1, bottom: 1),
alignment: Alignment.center,
child: Texts(
title,
color: Colors.white,
),
);
}
convertDateFormat(String Date) { convertDateFormat(String Date) {
const start = "/Date("; const start = "/Date(";
const end = "+0300)"; const end = "+0300)";
@ -423,13 +338,8 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
final startIndex = Date.indexOf(start); final startIndex = Date.indexOf(start);
final endIndex = Date.indexOf(end, startIndex + start.length); final endIndex = Date.indexOf(end, startIndex + start.length);
var date = new DateTime.fromMillisecondsSinceEpoch( var date = new DateTime.fromMillisecondsSinceEpoch(int.parse(Date.substring(startIndex + start.length, endIndex)));
int.parse(Date.substring(startIndex + start.length, endIndex))); String newDate = date.year.toString() + "-" + date.month.toString().padLeft(2, '0') + "-" + date.day.toString().padLeft(2, '0');
String newDate = date.year.toString() +
"-" +
date.month.toString().padLeft(2, '0') +
"-" +
date.day.toString().padLeft(2, '0');
return newDate.toString(); return newDate.toString();
} }

@ -117,8 +117,8 @@ class AuthProvider with ChangeNotifier {
var imei = await sharedPref.getString(PUSH_TOKEN); var imei = await sharedPref.getString(PUSH_TOKEN);
// if (!request.) { // if (!request.) {
newRequest.iMEI = imei; //imei!=null ? imei : ''; newRequest.iMEI = imei; //imei!=null ? imei : '';
newRequest.firstName = request.firstName + " " + request.lastName; newRequest.firstName = request.firstName??"" + " " + request.lastName??"";
newRequest.firstNameN = request.firstNameN + " " + request.lastNameN; newRequest.firstNameN = request.firstNameN??"" + " " + request.lastNameN??"";
newRequest.lastNameN = request.lastNameN ?? ""; newRequest.lastNameN = request.lastNameN ?? "";
newRequest.outSA = request.outSA == 1 ? true : false; newRequest.outSA = request.outSA == 1 ? true : false;
newRequest.biometricEnabled = false; newRequest.biometricEnabled = false;

Loading…
Cancel
Save