Merge branch 'development' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into sultan-patientapp
commit
c88bea4461
Binary file not shown.
After Width: | Height: | Size: 1.2 MiB |
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
Binary file not shown.
After Width: | Height: | Size: 19 KiB |
@ -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'];
|
approvalNo = json['ApprovalNo'];
|
||||||
//companyName = json['CompanyName'];
|
approvalDate = json['ApprovalDate'];
|
||||||
unUsedCount = json['TotaUnUsedCount'];
|
patientType = json['PatientType'];
|
||||||
approvalStatusDescption = json['ApprovalStatusDescption'];
|
patientID = json['PatientID'];
|
||||||
approvalNo = json['ApprovalNo'];
|
companyID = json['CompanyID'];
|
||||||
patientDescription = json['IsInOutPatientDescription'];
|
subCategoryID = json['SubCategoryID'];
|
||||||
versionID = json['VersionID'];
|
doctorID = json['DoctorID'];
|
||||||
channel = json['Channel'];
|
clinicID = json['ClinicID'];
|
||||||
languageID = json['LanguageID'];
|
approvalType = json['ApprovalType'];
|
||||||
iPAdress = json['IPAdress'];
|
inpatientApprovalSubType = json['InpatientApprovalSubType'];
|
||||||
generalid = json['generalid'];
|
validFrom = json['ValidFrom'];
|
||||||
patientOutSA = json['PatientOutSA'];
|
vaildDays = json['VaildDays'];
|
||||||
sessionID = json['SessionID'];
|
validTo = json['ValidTo'];
|
||||||
isDentalAllowedBackend = json['isDentalAllowedBackend'];
|
isApprovalOnGross = json['IsApprovalOnGross'];
|
||||||
deviceTypeID = json['DeviceTypeID'];
|
isPackage = json['IsPackage'];
|
||||||
patientID = json['PatientID'];
|
requestedAmount = json['RequestedAmount'];
|
||||||
tokenID = json['TokenID'];
|
actualApprovedAmount = json['ActualApprovedAmount'];
|
||||||
patientTypeID = json['PatientTypeID'];
|
aviliableAmount = json['AviliableAmount'];
|
||||||
patientType = json['PatientType'];
|
companyApprovalNo = json['CompanyApprovalNo'];
|
||||||
eXuldAPPNO = json['EXuldAPPNO'];
|
progNoteOrderNo = json['ProgNoteOrderNo'];
|
||||||
projectID = json['ProjectID'];
|
submitOn = json['SubmitOn'];
|
||||||
doctorName = json['DoctorName'];
|
receiptOn = json['ReceiptOn'];
|
||||||
clinicName = json['ClinicName'];
|
remarks1 = json['Remarks1'];
|
||||||
approvalDetails =
|
remarks2 = json['Remarks2'];
|
||||||
InsuranceApprovalDetails.fromJson(json['ApporvalDetails'][0]);
|
status = json['Status'];
|
||||||
appointmentNo = json['AppointmentNo'];
|
feedbackStatusBy = json['FeedbackStatusBy'];
|
||||||
} catch (e) {
|
feedbackStatus = json['FeedbackStatus'];
|
||||||
print(e);
|
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) {
|
||||||
|
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['ProjectID'] = this.projectID;
|
||||||
data['LanguageID'] = this.languageID;
|
data['ApprovalNo'] = this.approvalNo;
|
||||||
data['IPAdress'] = this.iPAdress;
|
data['ApprovalDate'] = this.approvalDate;
|
||||||
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;
|
data['PatientType'] = this.patientType;
|
||||||
if (appointmentNo == null) {
|
data['PatientID'] = this.patientID;
|
||||||
data['EXuldAPPNO'] = this.eXuldAPPNO;
|
data['CompanyID'] = this.companyID;
|
||||||
data['ProjectID'] = this.projectID;
|
data['SubCategoryID'] = this.subCategoryID;
|
||||||
}
|
data['DoctorID'] = this.doctorID;
|
||||||
if (appointmentNo != null) {
|
data['ClinicID'] = this.clinicID;
|
||||||
data['AppointmentNo'] = this.appointmentNo;
|
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;
|
return data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,196 @@
|
|||||||
|
import 'dart:async';
|
||||||
|
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:nfc_in_flutter/nfc_in_flutter.dart';
|
||||||
|
|
||||||
|
void showNfcReader(BuildContext context, {Function onNcfScan}) {
|
||||||
|
showModalBottomSheet(
|
||||||
|
context: context,
|
||||||
|
enableDrag: false,
|
||||||
|
isDismissible: false,
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
topLeft: Radius.circular(12), topRight: Radius.circular(12)),
|
||||||
|
),
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
builder: (context) {
|
||||||
|
return NfcLayout(
|
||||||
|
onNcfScan: onNcfScan,
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
class NfcLayout extends StatefulWidget {
|
||||||
|
Function onNcfScan;
|
||||||
|
|
||||||
|
NfcLayout({this.onNcfScan});
|
||||||
|
|
||||||
|
@override
|
||||||
|
_NfcLayoutState createState() => _NfcLayoutState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _NfcLayoutState extends State<NfcLayout> {
|
||||||
|
StreamSubscription<NDEFMessage> _stream;
|
||||||
|
bool _reading = false;
|
||||||
|
Widget mainWidget;
|
||||||
|
String nfcId;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
|
||||||
|
setState(() {
|
||||||
|
// _reading = true;
|
||||||
|
// Start reading using NFC.readNDEF()
|
||||||
|
_stream = NFC
|
||||||
|
.readNDEF(
|
||||||
|
once: false,
|
||||||
|
throwOnUserCancel: false,
|
||||||
|
readerMode: NFCDispatchReaderMode())
|
||||||
|
.listen((NDEFMessage message) {
|
||||||
|
setState(() {
|
||||||
|
_reading = true;
|
||||||
|
mainWidget = doneNfc();
|
||||||
|
});
|
||||||
|
Future.delayed(const Duration(milliseconds: 500), () {
|
||||||
|
_stream?.cancel();
|
||||||
|
widget.onNcfScan(nfcId);
|
||||||
|
Navigator.pop(context);
|
||||||
|
});
|
||||||
|
print("read NDEF id: ${message.id}");
|
||||||
|
// widget.onNcfScan(message.id);
|
||||||
|
nfcId = message.id;
|
||||||
|
}, onError: (e) {
|
||||||
|
// Check error handling guide below
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
(mainWidget == null && !_reading)
|
||||||
|
? mainWidget = scanNfc()
|
||||||
|
: mainWidget = doneNfc();
|
||||||
|
return AnimatedSwitcher(
|
||||||
|
duration: Duration(milliseconds: 500), child: mainWidget);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget scanNfc() {
|
||||||
|
return Container(
|
||||||
|
key: ValueKey(1),
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: <Widget>[
|
||||||
|
SizedBox(
|
||||||
|
height: 30,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"Ready To Scan",
|
||||||
|
style: TextStyle(
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 24,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 30,
|
||||||
|
),
|
||||||
|
Image.asset(
|
||||||
|
"assets/images/nfc/ic_nfc.png",
|
||||||
|
height: MediaQuery.of(context).size.width / 3,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 30,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"Approach an NFC Tag",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 18,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 30,
|
||||||
|
),
|
||||||
|
ButtonTheme(
|
||||||
|
minWidth: MediaQuery.of(context).size.width / 1.2,
|
||||||
|
height: 45.0,
|
||||||
|
buttonColor: Colors.grey[300],
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(6),
|
||||||
|
),
|
||||||
|
child: RaisedButton(
|
||||||
|
onPressed: () {
|
||||||
|
_stream?.cancel();
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
child: Text("CANCEL"),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 30,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget doneNfc() {
|
||||||
|
return Container(
|
||||||
|
key: ValueKey(2),
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: <Widget>[
|
||||||
|
SizedBox(
|
||||||
|
height: 30,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"Successfully Scanned",
|
||||||
|
style: TextStyle(
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 24,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 30,
|
||||||
|
),
|
||||||
|
Image.asset(
|
||||||
|
"assets/images/nfc/ic_done.png",
|
||||||
|
height: MediaQuery.of(context).size.width / 3,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 30,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"Approach an NFC Tag",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 18,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 30,
|
||||||
|
),
|
||||||
|
ButtonTheme(
|
||||||
|
minWidth: MediaQuery.of(context).size.width / 1.2,
|
||||||
|
height: 45.0,
|
||||||
|
buttonColor: Colors.grey[300],
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(6),
|
||||||
|
),
|
||||||
|
child: RaisedButton(
|
||||||
|
// onPressed: () {
|
||||||
|
// _stream?.cancel();
|
||||||
|
// widget.onNcfScan(nfcId);
|
||||||
|
// Navigator.pop(context);
|
||||||
|
// },
|
||||||
|
onPressed: null,
|
||||||
|
|
||||||
|
child: Text("DONE"),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 30,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue