Merge branch 'development' into Haroon
# Conflicts: # lib/config/config.dart # lib/config/localized_values.dart # lib/pages/feedback/send_feedback_page.dart # lib/pages/landing/home_page.dart # lib/uitl/translations_delegate_base.dart # lib/widgets/in_app_browser/InAppBrowser.dartmerge-requests/335/head
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 1.2 MiB |
@ -0,0 +1,6 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
|
||||||
|
<g id="Group_1261" data-name="Group 1261" transform="translate(-148.52 -172.52)">
|
||||||
|
<path id="Path_1724" data-name="Path 1724" d="M9,0a9,9,0,0,1,9,9,9.18,9.18,0,0,1-1.863,5.483A8.844,8.844,0,0,1,9,18,9,9,0,0,1,9,0Z" transform="translate(148.52 172.52)" fill="#e6b71b"/>
|
||||||
|
<path id="hourglass_2_" data-name="hourglass (2)" d="M10.865,10.178H10.4V8.663a2.662,2.662,0,0,0-.88-1.977l-.783-.7a.578.578,0,0,1,0-.86l.783-.7a2.665,2.665,0,0,0,.88-1.978V.925h.463a.463.463,0,0,0,0-.925h-7.4a.463.463,0,0,0,0,.925h.463V2.439a2.662,2.662,0,0,0,.88,1.977l.783.7a.578.578,0,0,1,0,.86l-.783.7a2.665,2.665,0,0,0-.88,1.978v1.514H3.463a.463.463,0,1,0,0,.925h7.4a.463.463,0,0,0,0-.925ZM5.313,8.711a1.264,1.264,0,0,1,.373-.9L6.918,6.578a.347.347,0,0,1,.491,0L8.642,7.811a1.264,1.264,0,0,1,.373.9v1.467h-3.7Z" transform="translate(150.356 175.968)" fill="#fff"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 947 B |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 19 KiB |
@ -0,0 +1,69 @@
|
|||||||
|
import 'package:diplomaticquarterapp/uitl/utils.dart';
|
||||||
|
|
||||||
|
class _Event{
|
||||||
|
String name;
|
||||||
|
String description;
|
||||||
|
bool active;
|
||||||
|
_Event(dynamic map){
|
||||||
|
name = map['name'];
|
||||||
|
description = map['description'];
|
||||||
|
active = map['active'];
|
||||||
|
}
|
||||||
|
|
||||||
|
flutterName() => 'f: $name';
|
||||||
|
}
|
||||||
|
|
||||||
|
class AnalyticEvents{
|
||||||
|
static _Event get(String key) {
|
||||||
|
var e = _Event(mapping[key]);
|
||||||
|
if(e == null){
|
||||||
|
var label = labelFrom(className: key); // Convert Class Name in to Label (HomeCare -> Home Care)
|
||||||
|
e = _Event({"name": label, "active":true, "description":key});
|
||||||
|
}
|
||||||
|
return e;
|
||||||
|
}
|
||||||
|
|
||||||
|
static var mapping = const {
|
||||||
|
"HomeHealthCarePage" : {
|
||||||
|
"active" : true,
|
||||||
|
"name" : "Home Health Care Page",
|
||||||
|
"description" : "",
|
||||||
|
},
|
||||||
|
"SplashScreen" : {
|
||||||
|
"active" : true,
|
||||||
|
"name" : "Splash Screen",
|
||||||
|
"description" : "",
|
||||||
|
},
|
||||||
|
"LandingPage" : {
|
||||||
|
"active" : true,
|
||||||
|
"name" : "Landing Page",
|
||||||
|
"description" : "",
|
||||||
|
},
|
||||||
|
"WelcomeLogin" : {
|
||||||
|
"active" : true,
|
||||||
|
"name" : "Welcome Login",
|
||||||
|
"description" : "",
|
||||||
|
},
|
||||||
|
"LoginType" : {
|
||||||
|
"active" : true,
|
||||||
|
"name" : "Login Type",
|
||||||
|
"description" : "",
|
||||||
|
},
|
||||||
|
"Login" : {
|
||||||
|
"active" : true,
|
||||||
|
"name" : "Login",
|
||||||
|
"description" : "",
|
||||||
|
},
|
||||||
|
"ForgotPassword" : {
|
||||||
|
"active" : true,
|
||||||
|
"name" : "Forgot Password",
|
||||||
|
"description" : "",
|
||||||
|
},
|
||||||
|
"" : {
|
||||||
|
"active" : true,
|
||||||
|
"name" : "",
|
||||||
|
"description" : "",
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
@ -0,0 +1,85 @@
|
|||||||
|
import 'package:diplomaticquarterapp/analytics/analytic-events.dart';
|
||||||
|
import 'package:diplomaticquarterapp/routes.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
|
||||||
|
import 'package:firebase_analytics/firebase_analytics.dart';
|
||||||
|
import 'package:firebase_analytics/observer.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
|
|
||||||
|
class Singleton {
|
||||||
|
const Singleton(); //Constant constructor
|
||||||
|
|
||||||
|
void hello() { print('Hello world'); }
|
||||||
|
}
|
||||||
|
|
||||||
|
var analytics = FirebaseAnalytics();
|
||||||
|
|
||||||
|
class GAnalytics{
|
||||||
|
const GAnalytics();
|
||||||
|
static GAnalytics shared = const GAnalytics();
|
||||||
|
NavObserver navObserver() => NavObserver();
|
||||||
|
}
|
||||||
|
// adb shell setprop debug.firebase.analytics.app com.ejada.hmg -> Android
|
||||||
|
class NavObserver extends RouteObserver<PageRoute<dynamic>>{
|
||||||
|
|
||||||
|
_sendScreenView(PageRoute route) async{
|
||||||
|
|
||||||
|
|
||||||
|
log(String className){
|
||||||
|
var event = AnalyticEvents.get(className);
|
||||||
|
if(event.active){
|
||||||
|
analytics.setCurrentScreen(screenName: event.flutterName(), screenClassOverride: className).catchError( (Object error) {
|
||||||
|
debugPrint('$FirebaseAnalyticsObserver: $error');
|
||||||
|
},
|
||||||
|
test: (Object error) {
|
||||||
|
return error is PlatformException;
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(route.settings.name != null && route.settings.name.isNotEmpty && route.settings.name != "null"){
|
||||||
|
var class_ = routes[route.settings.name](0);
|
||||||
|
if(class_ != null)
|
||||||
|
log(class_.toStringShort());
|
||||||
|
|
||||||
|
}else if(route is FadePage){
|
||||||
|
var class_ = route.page;
|
||||||
|
if(class_ != null)
|
||||||
|
log(class_.toStringShort());
|
||||||
|
|
||||||
|
}else if(route is MaterialPageRoute){
|
||||||
|
var class_ = route.builder(null);
|
||||||
|
if (class_ != null)
|
||||||
|
log(class_.toStringShort());
|
||||||
|
|
||||||
|
}else{
|
||||||
|
print("");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void didPush(Route<dynamic> route, Route<dynamic> previousRoute) {
|
||||||
|
super.didPush(route, previousRoute);
|
||||||
|
if (route is PageRoute) {
|
||||||
|
_sendScreenView(route);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void didReplace({Route<dynamic> newRoute, Route<dynamic> oldRoute}) {
|
||||||
|
super.didReplace(newRoute: newRoute, oldRoute: oldRoute);
|
||||||
|
if (newRoute is PageRoute) {
|
||||||
|
_sendScreenView(newRoute);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void didPop(Route<dynamic> route, Route<dynamic> previousRoute) {
|
||||||
|
super.didPop(route, previousRoute);
|
||||||
|
// if (previousRoute is PageRoute && route is PageRoute) {
|
||||||
|
// _sendScreenView(previousRoute);
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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,124 @@
|
|||||||
|
class PrescriptionReportINP {
|
||||||
|
int patientID;
|
||||||
|
String patientName;
|
||||||
|
String patientAge;
|
||||||
|
String patientGender;
|
||||||
|
String address;
|
||||||
|
String phoneOffice;
|
||||||
|
String itemDescription;
|
||||||
|
int doseTimingID;
|
||||||
|
int frequencyID;
|
||||||
|
int routeID;
|
||||||
|
String clinic;
|
||||||
|
String doctorName;
|
||||||
|
String route;
|
||||||
|
String frequency;
|
||||||
|
String remarks;
|
||||||
|
String name;
|
||||||
|
int days;
|
||||||
|
String startDate;
|
||||||
|
String orderDate;
|
||||||
|
int doseDailyQuantity;
|
||||||
|
int itemID;
|
||||||
|
Null productImage;
|
||||||
|
String sKU;
|
||||||
|
String itemDescriptionN;
|
||||||
|
String routeN;
|
||||||
|
String frequencyN;
|
||||||
|
String imageSRCUrl;
|
||||||
|
String imageThumbUrl;
|
||||||
|
|
||||||
|
PrescriptionReportINP(
|
||||||
|
{this.patientID,
|
||||||
|
this.patientName,
|
||||||
|
this.patientAge,
|
||||||
|
this.patientGender,
|
||||||
|
this.address,
|
||||||
|
this.phoneOffice,
|
||||||
|
this.itemDescription,
|
||||||
|
this.doseTimingID,
|
||||||
|
this.frequencyID,
|
||||||
|
this.routeID,
|
||||||
|
this.clinic,
|
||||||
|
this.doctorName,
|
||||||
|
this.route,
|
||||||
|
this.frequency,
|
||||||
|
this.remarks,
|
||||||
|
this.name,
|
||||||
|
this.days,
|
||||||
|
this.startDate,
|
||||||
|
this.orderDate,
|
||||||
|
this.doseDailyQuantity,
|
||||||
|
this.itemID,
|
||||||
|
this.productImage,
|
||||||
|
this.sKU,
|
||||||
|
this.itemDescriptionN,
|
||||||
|
this.routeN,
|
||||||
|
this.frequencyN,
|
||||||
|
this.imageSRCUrl,
|
||||||
|
this.imageThumbUrl});
|
||||||
|
|
||||||
|
PrescriptionReportINP.fromJson(Map<String, dynamic> json) {
|
||||||
|
patientID = json['PatientID'];
|
||||||
|
patientName = json['PatientName'];
|
||||||
|
patientAge = json['PatientAge'];
|
||||||
|
patientGender = json['PatientGender'];
|
||||||
|
address = json['Address'];
|
||||||
|
phoneOffice = json['PhoneOffice'];
|
||||||
|
itemDescription = json['ItemDescription'];
|
||||||
|
doseTimingID = json['DoseTimingID'];
|
||||||
|
frequencyID = json['FrequencyID'];
|
||||||
|
routeID = json['RouteID'];
|
||||||
|
clinic = json['Clinic'];
|
||||||
|
doctorName = json['DoctorName'];
|
||||||
|
route = json['Route'];
|
||||||
|
frequency = json['Frequency'];
|
||||||
|
remarks = json['Remarks'];
|
||||||
|
name = json['Name'];
|
||||||
|
days = json['Days'];
|
||||||
|
startDate = json['StartDate'];
|
||||||
|
orderDate = json['OrderDate'];
|
||||||
|
doseDailyQuantity = json['DoseDailyQuantity'];
|
||||||
|
itemID = json['ItemID'];
|
||||||
|
productImage = json['ProductImage'];
|
||||||
|
sKU = json['SKU'];
|
||||||
|
itemDescriptionN = json['ItemDescriptionN'];
|
||||||
|
routeN = json['RouteN'];
|
||||||
|
frequencyN = json['FrequencyN'];
|
||||||
|
imageSRCUrl = json['ImageSRCUrl'];
|
||||||
|
imageThumbUrl = json['ImageThumbUrl'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['PatientID'] = this.patientID;
|
||||||
|
data['PatientName'] = this.patientName;
|
||||||
|
data['PatientAge'] = this.patientAge;
|
||||||
|
data['PatientGender'] = this.patientGender;
|
||||||
|
data['Address'] = this.address;
|
||||||
|
data['PhoneOffice'] = this.phoneOffice;
|
||||||
|
data['ItemDescription'] = this.itemDescription;
|
||||||
|
data['DoseTimingID'] = this.doseTimingID;
|
||||||
|
data['FrequencyID'] = this.frequencyID;
|
||||||
|
data['RouteID'] = this.routeID;
|
||||||
|
data['Clinic'] = this.clinic;
|
||||||
|
data['DoctorName'] = this.doctorName;
|
||||||
|
data['Route'] = this.route;
|
||||||
|
data['Frequency'] = this.frequency;
|
||||||
|
data['Remarks'] = this.remarks;
|
||||||
|
data['Name'] = this.name;
|
||||||
|
data['Days'] = this.days;
|
||||||
|
data['StartDate'] = this.startDate;
|
||||||
|
data['OrderDate'] = this.orderDate;
|
||||||
|
data['DoseDailyQuantity'] = this.doseDailyQuantity;
|
||||||
|
data['ItemID'] = this.itemID;
|
||||||
|
data['ProductImage'] = this.productImage;
|
||||||
|
data['SKU'] = this.sKU;
|
||||||
|
data['ItemDescriptionN'] = this.itemDescriptionN;
|
||||||
|
data['RouteN'] = this.routeN;
|
||||||
|
data['FrequencyN'] = this.frequencyN;
|
||||||
|
data['ImageSRCUrl'] = this.imageSRCUrl;
|
||||||
|
data['ImageThumbUrl'] = this.imageThumbUrl;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,40 @@
|
|||||||
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class HealthDescPage extends StatelessWidget {
|
||||||
|
final String title;
|
||||||
|
final String desc;
|
||||||
|
final String icon;
|
||||||
|
|
||||||
|
HealthDescPage(this.title, this.desc, this.icon);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return AppScaffold(
|
||||||
|
isShowAppBar: true,
|
||||||
|
isShowDecPage: false,
|
||||||
|
appBarTitle: title,
|
||||||
|
body: Container(
|
||||||
|
margin: EdgeInsets.all(8.0),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||||
|
child: Image.asset(
|
||||||
|
icon,
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
height: 80,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Text(
|
||||||
|
desc,
|
||||||
|
style: TextStyle(fontSize: 18.0),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,310 @@
|
|||||||
|
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_inp.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/reminder_dialog.dart';
|
||||||
|
import 'package:diplomaticquarterapp/pages/medical/prescriptions/pharmacy_for_prescriptions_page.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
class PrescriptionDetailsPageINP extends StatelessWidget {
|
||||||
|
final PrescriptionReportINP prescriptionReport;
|
||||||
|
|
||||||
|
PrescriptionDetailsPageINP({Key key, this.prescriptionReport});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return AppScaffold(
|
||||||
|
isShowAppBar: true,
|
||||||
|
appBarTitle: TranslationBase.of(context).prescriptions,
|
||||||
|
body: SingleChildScrollView(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
Container(
|
||||||
|
width: double.infinity,
|
||||||
|
margin: EdgeInsets.only(top: 10, left: 10, right: 10),
|
||||||
|
padding: EdgeInsets.all(8.0),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.all(
|
||||||
|
Radius.circular(10.0),
|
||||||
|
),
|
||||||
|
border: Border.all(color: Colors.grey[200], width: 0.5),
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
children: <Widget>[
|
||||||
|
ClipRRect(
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(5)),
|
||||||
|
child: Image.network(
|
||||||
|
prescriptionReport.imageSRCUrl,
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
width: 60,
|
||||||
|
height: 70,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Center(
|
||||||
|
child: Texts(
|
||||||
|
prescriptionReport.itemDescription.isNotEmpty
|
||||||
|
? prescriptionReport.itemDescription
|
||||||
|
: prescriptionReport.itemDescriptionN ?? ''),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.all(8),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () => Navigator.push(
|
||||||
|
context,
|
||||||
|
FadePage(
|
||||||
|
page: PharmacyForPrescriptionsPage(
|
||||||
|
itemID: prescriptionReport.itemID),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: Column(
|
||||||
|
children: <Widget>[
|
||||||
|
Container(
|
||||||
|
width: 50,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
shape: BoxShape.rectangle),
|
||||||
|
child: Column(
|
||||||
|
children: <Widget>[
|
||||||
|
Icon(
|
||||||
|
Icons.pin_drop,
|
||||||
|
color: Colors.red[800],
|
||||||
|
size: 55,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 5,
|
||||||
|
),
|
||||||
|
Texts(TranslationBase.of(context).availability)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
_addReminderButton(context)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
color: Colors.white,
|
||||||
|
margin: EdgeInsets.only(top: 10, left: 10, right: 10),
|
||||||
|
child: Table(
|
||||||
|
border: TableBorder.symmetric(
|
||||||
|
inside: BorderSide(width: 0.5),
|
||||||
|
outside: BorderSide(width: 0.5)),
|
||||||
|
children: [
|
||||||
|
TableRow(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
color: Colors.white,
|
||||||
|
height: 40,
|
||||||
|
width: double.infinity,
|
||||||
|
child: Center(
|
||||||
|
child: Texts(
|
||||||
|
TranslationBase.of(context).route,
|
||||||
|
fontSize: 14,
|
||||||
|
))),
|
||||||
|
Container(
|
||||||
|
color: Colors.white,
|
||||||
|
height: 40,
|
||||||
|
width: double.infinity,
|
||||||
|
child: Center(
|
||||||
|
child: Texts(
|
||||||
|
TranslationBase.of(context).frequency,
|
||||||
|
fontSize: 14,
|
||||||
|
))),
|
||||||
|
Container(
|
||||||
|
color: Colors.white,
|
||||||
|
height: 40,
|
||||||
|
width: double.infinity,
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 4),
|
||||||
|
child: Center(
|
||||||
|
child: Texts(
|
||||||
|
"${TranslationBase.of(context).dailyDoses}",
|
||||||
|
fontSize: 14,
|
||||||
|
))),
|
||||||
|
Container(
|
||||||
|
color: Colors.white,
|
||||||
|
height: 40,
|
||||||
|
width: double.infinity,
|
||||||
|
child: Center(
|
||||||
|
child: Texts(
|
||||||
|
TranslationBase.of(context).duration,
|
||||||
|
fontSize: 14,
|
||||||
|
))),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
TableRow(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
color: Colors.white,
|
||||||
|
height: 50,
|
||||||
|
width: double.infinity,
|
||||||
|
child: Center(
|
||||||
|
child: Text(prescriptionReport.routeN ?? ''))),
|
||||||
|
Container(
|
||||||
|
color: Colors.white,
|
||||||
|
height: 50,
|
||||||
|
width: double.infinity,
|
||||||
|
child: Center(
|
||||||
|
child:
|
||||||
|
Text(prescriptionReport.frequencyN ?? ''))),
|
||||||
|
Container(
|
||||||
|
color: Colors.white,
|
||||||
|
height: 50,
|
||||||
|
width: double.infinity,
|
||||||
|
child: Center(
|
||||||
|
child: Text(
|
||||||
|
'${prescriptionReport.doseDailyQuantity}'))),
|
||||||
|
Container(
|
||||||
|
color: Colors.white,
|
||||||
|
height: 50,
|
||||||
|
width: double.infinity,
|
||||||
|
child:
|
||||||
|
Center(child: Text('${prescriptionReport.days}')))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(top: 10, left: 10, right: 10),
|
||||||
|
width: double.infinity,
|
||||||
|
color: Colors.white,
|
||||||
|
padding: EdgeInsets.all(5),
|
||||||
|
child: Center(
|
||||||
|
child: Column(
|
||||||
|
children: <Widget>[
|
||||||
|
Texts(TranslationBase.of(context).notes),
|
||||||
|
SizedBox(
|
||||||
|
height: 5,
|
||||||
|
),
|
||||||
|
Divider(
|
||||||
|
height: 0.5,
|
||||||
|
color: Colors.grey[300],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 5,
|
||||||
|
),
|
||||||
|
Texts(prescriptionReport.remarks ?? ''),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _addReminderButton(BuildContext context) {
|
||||||
|
ProjectViewModel projectViewModel = Provider.of(context);
|
||||||
|
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
DateTime startDate = DateTime.now();
|
||||||
|
DateTime endDate = DateTime(startDate.year, startDate.month,
|
||||||
|
startDate.day + prescriptionReport.days);
|
||||||
|
|
||||||
|
print(prescriptionReport);
|
||||||
|
showGeneralDialog(
|
||||||
|
barrierColor: Colors.black.withOpacity(0.5),
|
||||||
|
transitionBuilder: (context, a1, a2, widget) {
|
||||||
|
final curvedValue =
|
||||||
|
Curves.easeInOutBack.transform(a1.value) - 1.0;
|
||||||
|
return Transform(
|
||||||
|
transform:
|
||||||
|
Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
|
||||||
|
child: Opacity(
|
||||||
|
opacity: a1.value,
|
||||||
|
child: ReminderDialog(
|
||||||
|
eventId: prescriptionReport.itemID.toString(),
|
||||||
|
title: "Prescription Reminder",
|
||||||
|
description:
|
||||||
|
"${prescriptionReport.itemDescriptionN} ${prescriptionReport.frequencyN} ${prescriptionReport.routeN} ",
|
||||||
|
startDate:
|
||||||
|
"/Date(${startDate.millisecondsSinceEpoch}+0300)/",
|
||||||
|
endDate: "/Date(${endDate.millisecondsSinceEpoch}+0300)/",
|
||||||
|
location: prescriptionReport.remarks,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
transitionDuration: Duration(milliseconds: 500),
|
||||||
|
barrierDismissible: true,
|
||||||
|
barrierLabel: '',
|
||||||
|
context: context,
|
||||||
|
pageBuilder: (context, animation1, animation2) {});
|
||||||
|
},
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
// height: 100.0,
|
||||||
|
margin: EdgeInsets.all(7.0),
|
||||||
|
padding: EdgeInsets.only(bottom: 4.0),
|
||||||
|
decoration: BoxDecoration(boxShadow: [
|
||||||
|
BoxShadow(
|
||||||
|
color: Colors.grey[400], blurRadius: 2.0, spreadRadius: 0.0)
|
||||||
|
], borderRadius: BorderRadius.circular(10), color: Colors.white),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
children: <Widget>[
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.fromLTRB(5.0, 5.0, 5.0, 0.0),
|
||||||
|
child: Text("add",
|
||||||
|
overflow: TextOverflow.clip,
|
||||||
|
style: TextStyle(
|
||||||
|
color: new Color(0xffB8382C),
|
||||||
|
letterSpacing: 1.0,
|
||||||
|
fontSize: 18.0)),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.fromLTRB(5.0, 0.0, 5.0, 0.0),
|
||||||
|
child: Text("reminder",
|
||||||
|
overflow: TextOverflow.clip,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.black,
|
||||||
|
letterSpacing: 1.0,
|
||||||
|
fontSize: 15.0)),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
alignment: projectViewModel.isArabic
|
||||||
|
? Alignment.bottomLeft
|
||||||
|
: Alignment.bottomRight,
|
||||||
|
margin: projectViewModel.isArabic
|
||||||
|
? EdgeInsets.fromLTRB(10.0, 7.0, 0.0, 8.0)
|
||||||
|
: EdgeInsets.fromLTRB(0.0, 7.0, 10.0, 8.0),
|
||||||
|
child: Image.asset(
|
||||||
|
"assets/images/new-design/reminder_icon.png",
|
||||||
|
width: 45.0,
|
||||||
|
height: 45.0),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||