Conflicts:
	lib/config/localized_values.dart
	lib/uitl/translations_delegate_base.dart
merge-update-with-lab-changes
Mohammad Aljammal 5 years ago
commit 37b874fe3f

@ -13,26 +13,27 @@ const GET_MY_DOCTOR = '/Doctors.svc/REST/GetPatientDoctorAppointmentResult';
const GET_DOCTOR_PROFILE = '/Doctors.svc/REST/GetDocProfiles';
const GET_DOCTOR_RATING = '/Doctors.svc/REST/dr_GetAvgDoctorRating';
///Prescriptions
const PRESCRIPTIONS = '/Patients.svc/REST/GetPrescriptionApptList';
const GET_PRESCRIPTIONS_ALL_ORDERS =
'/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
const GET_PRESCRIPTION_REPORT = '/Patients.svc/REST/INP_GetPrescriptionReport';
const SEND_PRESCRIPTION_EMAIL = '/Notifications.svc/REST/SendPrescriptionEmail';
const GET_PRESCRIPTION_REPORT_ENH = '/Patients.svc/REST/GetPrescriptionReport_enh';
const GET_PRESCRIPTION_REPORT_ENH =
'/Patients.svc/REST/GetPrescriptionReport_enh';
///Lab Order
const GET_Patient_LAB_ORDERS = '/Patients.svc/REST/GetPatientLabOrders';
const GET_Patient_LAB_SPECIAL_RESULT = '/Patients.svc/REST/GetPatientLabSpecialResults';
const GET_Patient_LAB_SPECIAL_RESULT =
'/Patients.svc/REST/GetPatientLabSpecialResults';
///
const GET_PATIENT_ORDERS = '/Patients.svc/REST/GetPatientRadOrders';
const GET_PATIENT_ORDERS_DETAILS = '/Patients.svc/REST/Rad_UpdatePatientRadOrdersToRead';
const GET_PATIENT_ORDERS_DETAILS =
'/Patients.svc/REST/Rad_UpdatePatientRadOrdersToRead';
const GET_RAD_IMAGE_URL = '/Patients.svc/Rest/GetRadImageURL';
const SEND_RAD_REPORT_EMAIL = '/Notifications.svc/REST/SendRadReportEmail';
///Feedback
const SEND_FEEDBACK = '/COCWS.svc/REST/InsertCOCItemInSPList';
const GET_STATUS_FOR_COCO = '/COCWS.svc/REST/GetStatusforCOC';
@ -58,7 +59,7 @@ const SETUP_ID = '91877';
const LANGUAGE = 1;
const PATIENT_OUT_SA = 0;
const SESSION_ID = 'TMRhVmkGhOsvamErw';
const IS_DENTAL_ALLOWED_BACKEND = false;
const IS_DENTAL_ALLOWED_BACKEND = false;
const PATIENT_TYPE = 1;
const PATIENT_TYPE_ID = 1;
@ -92,5 +93,3 @@ class AppGlobal {
return request;
}
}

@ -170,5 +170,31 @@ const Map<String, Map<String, String>> localizedValues = {
"request": {"en": "Request", "ar": "طلبات الاضافة"},
"member-name": {"en": "Member Name", "ar": "اسم العضو"},
"switch-login": {"en": "Switch User", "ar": "تغير المستخدم"},
"remove-member": {"en": "Remove", "ar": "حذف"},
"allow-view": {"en": "Allow", "ar": "قبول"},
"reject-view": {"en": "Reject", "ar": "رفض"},
"delete-view": {"en": "Delete", "ar": "حذف"},
// "my-family": {"en": "MY FAMILY", "ar": "عائلتي"},
"approvals": {"en": "Approvals", "ar": "موفقات التأمين"},
"approvalNo": {"en": "Approval No.: ", "ar": "رقم الموافقة: "},
"companyName": {"en": "Company Name ", "ar": "اسم الشركة: "},
"receiptOn": {"en": "Receipt on: ", "ar": "تاريخ الفاتورة: "},
"expiryDate": {"en": "Expiry Date: ", "ar": "تاريخ الانتهاء: "},
"procedureName": {"en": "Procedure Name", "ar": "اسم الاجراء"},
"procedureStatus": {"en": "Procedure Status: ", "ar": "حالة الاجراء"},
"usageStatus": {"en": "Usage Status", "ar": "جالة الاستخدام"},
"unusedCount": {"en": "Unused Count: ", "ar": "غير مستخدم: "},
"totalApproval": {
"en": "Total approval unused",
"ar": "اجمالي الموافقات الغير مستخدمة"
},
"category": {"en": "Category: ", "ar": "الفئة"},
"expirationDate": {"en": "Expiration Date: ", "ar": "تاريخ الانتهاء"},
"patientCard": {"en": "Patient Card ID: ", "ar": "رقم الاشتراك"},
"policyNumber": {"en": "Policy Number: ", "ar": "رقم بوليصة التاميت:"},
"seeDetails": {"en": "SEE DETAILS", "ar": "منافعك التامينية"},
"insuranceCards": {"en": "Insurance Cards", "ar": "بطاقات التأمين"},
};

@ -23,22 +23,26 @@ class BaseAppClient {
String url = BASE_URL + endPoint;
try {
//Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
// String token = await sharedPref.getString(TOKEN);
String token = await sharedPref.getString(TOKEN);
var user = await sharedPref.getObject(USER_PROFILE);
body['SetupID'] = SETUP_ID;
body['VersionID'] = VERSION_ID;
body['Channel'] = CHANNEL;
body['LanguageID'] = LANGUAGE;
body['IPAdress'] = IP_ADDRESS;
body['generalid'] = GENERAL_ID;
body['PatientOutSA'] = PATIENT_OUT_SA;
body['SessionID'] = SESSION_ID;
// body['PatientOutSA'] = PATIENT_OUT_SA;
body['SessionID'] = null; //SESSION_ID;
body['isDentalAllowedBackend'] = IS_DENTAL_ALLOWED_BACKEND;
body['DeviceTypeID'] = DeviceTypeID;
body['PatientType'] = PATIENT_TYPE;
body['PatientTypeID'] = PATIENT_TYPE_ID;
body['TokenID'] = '@dm!n';
body['PatientID'] = 1231755;
if (user != null) {
body['TokenID'] = token; //user['TokenID'];
body['PatientID'] = user['PatientID'];
body['PatientOutSA'] = user['OutSA'];
body['SessionID'] = getSessionId(token);
}
print("URL : $url");
print("Body : ${json.encode(body)}");
@ -67,7 +71,6 @@ class BaseAppClient {
statusCode);
logout();
}
} else if (parsed['MessageStatus'] == 1 ||
parsed['SMSLoginRequired'] == true) {
onSuccess(parsed, statusCode);
@ -88,4 +91,8 @@ class BaseAppClient {
logout() async {
await sharedPref.remove(LOGIN_TOKEN_ID);
}
String getSessionId(String id) {
return id.replaceAll('/[^a-zA-Z ]', '');
}
}

@ -54,7 +54,7 @@ class InsuranceCardService extends BaseService {
InsuranceApprovalModel _insuranceApprovalModel = InsuranceApprovalModel(
versionID: 5.5,
channel: 3,
languageID: 2,
languageID: LANGUAGE_ID,
iPAdress: "10.20.10.20",
generalid: "Cs2020@2016\$2958",
patientOutSA: 0,

@ -0,0 +1,347 @@
class GetAllSharedRecordsByStatusResponse {
Null date;
int languageID;
int serviceName;
Null time;
Null androidLink;
Null authenticationTokenID;
Null data;
bool dataw;
int dietType;
Null errorCode;
Null errorEndUserMessage;
Null errorEndUserMessageN;
Null errorMessage;
int errorType;
int foodCategory;
Null iOSLink;
bool isAuthenticated;
int mealOrderStatus;
int mealType;
int messageStatus;
int numberOfResultRecords;
Null patientBlodType;
Null successMsg;
Null successMsgN;
Null doctorInformationList;
Null getAllPendingRecordsList;
List<GetAllSharedRecordsByStatusList> getAllSharedRecordsByStatusList;
Null getResponseFileList;
bool isHMGPatient;
bool isLoginSuccessfully;
bool isNeedUpdateIdintificationNo;
bool kioskSendSMS;
Null list;
Null listAskHabibMobileLoginInfo;
Null listAskHabibPatientFile;
Null listMergeFiles;
Null listMobileLoginInfo;
Null listPatientCount;
Null logInTokenID;
Null mohemmPrivilegeList;
int pateintID;
Null patientBloodType;
Null patientERDriverFile;
Null patientERDriverFileList;
bool patientHasFile;
Null patientMergedIDs;
bool patientOutSA;
int patientShareRequestID;
int patientType;
int projectIDOut;
Null returnMessage;
bool sMSLoginRequired;
Null servicePrivilegeList;
Null sharePatientName;
Null verificationCode;
Null email;
Null errorList;
bool hasFile;
bool isActiveCode;
bool isMerged;
bool isNeedUserAgreement;
bool isSMSSent;
Null memberList;
Null message;
int statusCode;
GetAllSharedRecordsByStatusResponse(
{this.date,
this.languageID,
this.serviceName,
this.time,
this.androidLink,
this.authenticationTokenID,
this.data,
this.dataw,
this.dietType,
this.errorCode,
this.errorEndUserMessage,
this.errorEndUserMessageN,
this.errorMessage,
this.errorType,
this.foodCategory,
this.iOSLink,
this.isAuthenticated,
this.mealOrderStatus,
this.mealType,
this.messageStatus,
this.numberOfResultRecords,
this.patientBlodType,
this.successMsg,
this.successMsgN,
this.doctorInformationList,
this.getAllPendingRecordsList,
this.getAllSharedRecordsByStatusList,
this.getResponseFileList,
this.isHMGPatient,
this.isLoginSuccessfully,
this.isNeedUpdateIdintificationNo,
this.kioskSendSMS,
this.list,
this.listAskHabibMobileLoginInfo,
this.listAskHabibPatientFile,
this.listMergeFiles,
this.listMobileLoginInfo,
this.listPatientCount,
this.logInTokenID,
this.mohemmPrivilegeList,
this.pateintID,
this.patientBloodType,
this.patientERDriverFile,
this.patientERDriverFileList,
this.patientHasFile,
this.patientMergedIDs,
this.patientOutSA,
this.patientShareRequestID,
this.patientType,
this.projectIDOut,
this.returnMessage,
this.sMSLoginRequired,
this.servicePrivilegeList,
this.sharePatientName,
this.verificationCode,
this.email,
this.errorList,
this.hasFile,
this.isActiveCode,
this.isMerged,
this.isNeedUserAgreement,
this.isSMSSent,
this.memberList,
this.message,
this.statusCode});
GetAllSharedRecordsByStatusResponse.fromJson(Map<String, dynamic> json) {
date = json['Date'];
languageID = json['LanguageID'];
serviceName = json['ServiceName'];
time = json['Time'];
androidLink = json['AndroidLink'];
authenticationTokenID = json['AuthenticationTokenID'];
data = json['Data'];
dataw = json['Dataw'];
dietType = json['DietType'];
errorCode = json['ErrorCode'];
errorEndUserMessage = json['ErrorEndUserMessage'];
errorEndUserMessageN = json['ErrorEndUserMessageN'];
errorMessage = json['ErrorMessage'];
errorType = json['ErrorType'];
foodCategory = json['FoodCategory'];
iOSLink = json['IOSLink'];
isAuthenticated = json['IsAuthenticated'];
mealOrderStatus = json['MealOrderStatus'];
mealType = json['MealType'];
messageStatus = json['MessageStatus'];
numberOfResultRecords = json['NumberOfResultRecords'];
patientBlodType = json['PatientBlodType'];
successMsg = json['SuccessMsg'];
successMsgN = json['SuccessMsgN'];
doctorInformationList = json['DoctorInformation_List'];
getAllPendingRecordsList = json['GetAllPendingRecordsList'];
if (json['GetAllSharedRecordsByStatusList'] != null) {
getAllSharedRecordsByStatusList =
new List<GetAllSharedRecordsByStatusList>();
json['GetAllSharedRecordsByStatusList'].forEach((v) {
getAllSharedRecordsByStatusList
.add(new GetAllSharedRecordsByStatusList.fromJson(v));
});
}
getResponseFileList = json['GetResponseFileList'];
isHMGPatient = json['IsHMGPatient'];
isLoginSuccessfully = json['IsLoginSuccessfully'];
isNeedUpdateIdintificationNo = json['IsNeedUpdateIdintificationNo'];
kioskSendSMS = json['KioskSendSMS'];
list = json['List'];
listAskHabibMobileLoginInfo = json['List_AskHabibMobileLoginInfo'];
listAskHabibPatientFile = json['List_AskHabibPatientFile'];
listMergeFiles = json['List_MergeFiles'];
listMobileLoginInfo = json['List_MobileLoginInfo'];
listPatientCount = json['List_PatientCount'];
logInTokenID = json['LogInTokenID'];
mohemmPrivilegeList = json['MohemmPrivilege_List'];
pateintID = json['PateintID'];
patientBloodType = json['PatientBloodType'];
patientERDriverFile = json['PatientER_DriverFile'];
patientERDriverFileList = json['PatientER_DriverFileList'];
patientHasFile = json['PatientHasFile'];
patientMergedIDs = json['PatientMergedIDs'];
patientOutSA = json['PatientOutSA'];
patientShareRequestID = json['PatientShareRequestID'];
patientType = json['PatientType'];
projectIDOut = json['ProjectIDOut'];
returnMessage = json['ReturnMessage'];
sMSLoginRequired = json['SMSLoginRequired'];
servicePrivilegeList = json['ServicePrivilege_List'];
sharePatientName = json['SharePatientName'];
verificationCode = json['VerificationCode'];
email = json['email'];
errorList = json['errorList'];
hasFile = json['hasFile'];
isActiveCode = json['isActiveCode'];
isMerged = json['isMerged'];
isNeedUserAgreement = json['isNeedUserAgreement'];
isSMSSent = json['isSMSSent'];
memberList = json['memberList'];
message = json['message'];
statusCode = json['statusCode'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['Date'] = this.date;
data['LanguageID'] = this.languageID;
data['ServiceName'] = this.serviceName;
data['Time'] = this.time;
data['AndroidLink'] = this.androidLink;
data['AuthenticationTokenID'] = this.authenticationTokenID;
data['Data'] = this.data;
data['Dataw'] = this.dataw;
data['DietType'] = this.dietType;
data['ErrorCode'] = this.errorCode;
data['ErrorEndUserMessage'] = this.errorEndUserMessage;
data['ErrorEndUserMessageN'] = this.errorEndUserMessageN;
data['ErrorMessage'] = this.errorMessage;
data['ErrorType'] = this.errorType;
data['FoodCategory'] = this.foodCategory;
data['IOSLink'] = this.iOSLink;
data['IsAuthenticated'] = this.isAuthenticated;
data['MealOrderStatus'] = this.mealOrderStatus;
data['MealType'] = this.mealType;
data['MessageStatus'] = this.messageStatus;
data['NumberOfResultRecords'] = this.numberOfResultRecords;
data['PatientBlodType'] = this.patientBlodType;
data['SuccessMsg'] = this.successMsg;
data['SuccessMsgN'] = this.successMsgN;
data['DoctorInformation_List'] = this.doctorInformationList;
data['GetAllPendingRecordsList'] = this.getAllPendingRecordsList;
if (this.getAllSharedRecordsByStatusList != null) {
data['GetAllSharedRecordsByStatusList'] =
this.getAllSharedRecordsByStatusList.map((v) => v.toJson()).toList();
}
data['GetResponseFileList'] = this.getResponseFileList;
data['IsHMGPatient'] = this.isHMGPatient;
data['IsLoginSuccessfully'] = this.isLoginSuccessfully;
data['IsNeedUpdateIdintificationNo'] = this.isNeedUpdateIdintificationNo;
data['KioskSendSMS'] = this.kioskSendSMS;
data['List'] = this.list;
data['List_AskHabibMobileLoginInfo'] = this.listAskHabibMobileLoginInfo;
data['List_AskHabibPatientFile'] = this.listAskHabibPatientFile;
data['List_MergeFiles'] = this.listMergeFiles;
data['List_MobileLoginInfo'] = this.listMobileLoginInfo;
data['List_PatientCount'] = this.listPatientCount;
data['LogInTokenID'] = this.logInTokenID;
data['MohemmPrivilege_List'] = this.mohemmPrivilegeList;
data['PateintID'] = this.pateintID;
data['PatientBloodType'] = this.patientBloodType;
data['PatientER_DriverFile'] = this.patientERDriverFile;
data['PatientER_DriverFileList'] = this.patientERDriverFileList;
data['PatientHasFile'] = this.patientHasFile;
data['PatientMergedIDs'] = this.patientMergedIDs;
data['PatientOutSA'] = this.patientOutSA;
data['PatientShareRequestID'] = this.patientShareRequestID;
data['PatientType'] = this.patientType;
data['ProjectIDOut'] = this.projectIDOut;
data['ReturnMessage'] = this.returnMessage;
data['SMSLoginRequired'] = this.sMSLoginRequired;
data['ServicePrivilege_List'] = this.servicePrivilegeList;
data['SharePatientName'] = this.sharePatientName;
data['VerificationCode'] = this.verificationCode;
data['email'] = this.email;
data['errorList'] = this.errorList;
data['hasFile'] = this.hasFile;
data['isActiveCode'] = this.isActiveCode;
data['isMerged'] = this.isMerged;
data['isNeedUserAgreement'] = this.isNeedUserAgreement;
data['isSMSSent'] = this.isSMSSent;
data['memberList'] = this.memberList;
data['message'] = this.message;
data['statusCode'] = this.statusCode;
return data;
}
}
class GetAllSharedRecordsByStatusList {
int iD;
int patientID;
int responseID;
int regionID;
int status;
Null isActive;
String editedOn;
String createdOn;
String emaiLAddress;
String mobileNumber;
String patientIdenficationNumber;
String patientName;
String statusDescription;
GetAllSharedRecordsByStatusList(
{this.iD,
this.patientID,
this.responseID,
this.regionID,
this.status,
this.isActive,
this.editedOn,
this.createdOn,
this.emaiLAddress,
this.mobileNumber,
this.patientIdenficationNumber,
this.patientName,
this.statusDescription});
GetAllSharedRecordsByStatusList.fromJson(Map<String, dynamic> json) {
iD = json['ID'];
patientID = json['PatientID'];
responseID = json['ResponseID'];
regionID = json['RegionID'];
status = json['Status'];
isActive = json['IsActive'];
editedOn = json['EditedOn'];
createdOn = json['CreatedOn'];
emaiLAddress = json['EmaiLAddress'];
mobileNumber = json['MobileNumber'];
patientIdenficationNumber = json['PatientIdenficationNumber'];
patientName = json['PatientName'];
statusDescription = json['StatusDescription'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ID'] = this.iD;
data['PatientID'] = this.patientID;
data['ResponseID'] = this.responseID;
data['RegionID'] = this.regionID;
data['Status'] = this.status;
data['IsActive'] = this.isActive;
data['EditedOn'] = this.editedOn;
data['CreatedOn'] = this.createdOn;
data['EmaiLAddress'] = this.emaiLAddress;
data['MobileNumber'] = this.mobileNumber;
data['PatientIdenficationNumber'] = this.patientIdenficationNumber;
data['PatientName'] = this.patientName;
data['StatusDescription'] = this.statusDescription;
return data;
}
}

@ -0,0 +1,68 @@
class GetAllSharedRecordsByStatusReq {
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 status;
GetAllSharedRecordsByStatusReq(
{this.versionID,
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.status});
GetAllSharedRecordsByStatusReq.fromJson(Map<String, dynamic> json) {
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'];
status = json['Status'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['VersionID'] = this.versionID;
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;
data['Status'] = this.status;
return data;
}
}

@ -1,15 +1,10 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/service/client/base_app_client.dart';
import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart';
import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/routes.dart';
class MyFamily extends StatefulWidget {
@override
@ -18,6 +13,7 @@ class MyFamily extends StatefulWidget {
class _MyFamily extends State<MyFamily> {
bool isLoading = true;
var familyFileProvider = FamilyFilesProvider();
@override
void initState() {
isLoading = true;
@ -29,23 +25,101 @@ class _MyFamily extends State<MyFamily> {
return AppScaffold(
appBarTitle: TranslationBase.of(context).myFamilyFiles,
isShowAppBar: true,
body: SingleChildScrollView(
padding: EdgeInsets.all(20),
child: Stack(
body: DefaultTabController(
length: 2,
child: SingleChildScrollView(
padding: EdgeInsets.all(20),
child: Container(
height: SizeConfig.realScreenHeight * .9,
width: SizeConfig.realScreenWidth,
child: Stack(
children: <Widget>[
TabBar(
indicatorColor: Colors.red,
tabs: [
Padding(
padding: EdgeInsets.all(6),
child:
Text(TranslationBase.of(context).family)),
Padding(
padding: EdgeInsets.all(6),
child:
Text(TranslationBase.of(context).request)),
],
),
TabBarView(
children: [myFamilyDetails(), myFamilyRequest()],
)
],
)))));
}
Widget myFamilyDetails() {
return Padding(
padding: EdgeInsets.only(top: 40),
child: Column(
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
TabBar(
tabs: [
Tab(icon: Icon(Icons.directions_car)),
Tab(icon: Icon(Icons.directions_transit)),
],
),
TabBarView(
children: [
Icon(Icons.directions_car),
Icon(Icons.directions_transit),
],
)
Expanded(
flex: 3, child: Text(TranslationBase.of(context).request)),
Expanded(
flex: 2,
child: Text(
TranslationBase.of(context).switchUser,
)),
Expanded(
flex: 1,
child: Text(
TranslationBase.of(context).deleteView,
)),
],
)));
),
FutureBuilder(
future: getFamilyFiles(), // async work
builder: (BuildContext context,
AsyncSnapshot<GetAllSharedRecordsByStatusResponse> snapshot) {
switch (snapshot.connectionState) {
case ConnectionState.waiting:
return Padding(
padding: EdgeInsets.all(10),
child: Text('Loading....'));
default:
if (snapshot.hasError)
return Padding(
padding: EdgeInsets.all(10),
child: Text(snapshot.error));
else
return Column(
children: snapshot
.data.getAllSharedRecordsByStatusList
.map<Widget>((result) {
return Padding(
padding: EdgeInsets.all(10),
child: Row(
children: <Widget>[
Expanded(
flex: 3, child: Text(result.patientName)),
Expanded(flex: 2, child: Icon(Icons.group)),
Expanded(flex: 1, child: Icon(Icons.delete)),
],
));
}).toList());
}
},
)
],
));
}
Widget myFamilyRequest() {
return Column(
children: <Widget>[],
);
}
Future<GetAllSharedRecordsByStatusResponse> getFamilyFiles() {
return familyFileProvider.getSharedRecordByStatus();
}
}

@ -6,6 +6,7 @@ import '../base/base_view.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
class InsuranceApproval extends StatefulWidget {
@override
@ -21,7 +22,7 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
AppScaffold(
isShowAppBar: true,
baseViewModel: model,
appBarTitle: 'Approvals',
appBarTitle: TranslationBase.of(context).approvals,
body: SingleChildScrollView(
child: Container(
margin: EdgeInsets.only(
@ -39,10 +40,10 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
Text(
'Total approval unused',
TranslationBase.of(context).totalApproval,
style: TextStyle(
color: Color(0xff60688B),
fontSize: 19.5,
fontSize: 19.0,
fontWeight: FontWeight.w600,
),
),
@ -72,7 +73,7 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
children: <Widget>[
ExpansionTile(
title: Container(
height: 85.0,
height: 120.0,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
@ -141,7 +142,7 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
model.insuranceApproval[index]
.doctorName,
style: TextStyle(
fontSize: 15.0,
fontSize: 17.0,
fontStyle: FontStyle.italic),
),
],
@ -156,7 +157,8 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
CrossAxisAlignment.start,
children: <Widget>[
Text(
'Approval No.: ' +
TranslationBase.of(context)
.approvalNo +
model.insuranceApproval[index]
.approvalNo
.toString(),
@ -171,7 +173,8 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
thickness: 1.0,
),
Text(
'Procedure Status: ' +
TranslationBase.of(context)
.procedureStatus +
model.insuranceApproval[index]
.approvalStatusDescption,
style: TextStyle(
@ -184,7 +187,8 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
thickness: 1.0,
),
Text(
'Unused Count: ' +
TranslationBase.of(context)
.unusedCount +
model.insuranceApproval[index]
.unUsedCount
.toString(),
@ -210,7 +214,8 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
// fontWeight: FontWeight.w600),
// ),
Text(
'Company Name',
TranslationBase.of(context)
.companyName,
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 17.5,
@ -223,7 +228,8 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
thickness: 1.0,
),
Text(
'Receipt on: ' +
TranslationBase.of(context)
.receiptOn +
convertDateFormat(model
.insuranceApproval[index]
.rceiptOn),
@ -238,7 +244,8 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
thickness: 1.0,
),
Text(
'expiryDate: ' +
TranslationBase.of(context)
.expiryDate +
convertDateFormat(model
.insuranceApproval[index]
.expiryDate),
@ -252,107 +259,123 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
height: 55.0,
thickness: 1.2,
),
Row(
crossAxisAlignment:
CrossAxisAlignment.center,
children: <Widget>[
Expanded(
flex: 1,
child: Column(
children: <Widget>[
Text('Procedure Name '),
Padding(
padding: EdgeInsets.only(
top: SizeConfig
.heightMultiplier *
3.0),
child: Text(
model
.insuranceApproval[
index]
.approvalDetails ==
null
? ''
: model
.insuranceApproval[
index]
.approvalDetails
.procedureName,
style: TextStyle(
fontWeight:
FontWeight.w600,
fontSize: 15.5),
IntrinsicHeight(
child: Row(
crossAxisAlignment:
CrossAxisAlignment.center,
children: <Widget>[
Expanded(
flex: 1,
child: Column(
children: <Widget>[
Text(TranslationBase.of(
context)
.procedureName),
Padding(
padding: EdgeInsets.only(
top: SizeConfig
.heightMultiplier *
3.0),
child: Text(
model
.insuranceApproval[
index]
.approvalDetails ==
null
? ''
: model
.insuranceApproval[
index]
.approvalDetails
.procedureName,
style: TextStyle(
fontWeight:
FontWeight.w600,
fontSize: 15.5),
),
),
),
],
],
),
),
),
VerticalDivider(
width: 10.0,
),
Expanded(
flex: 1,
child: Column(
children: <Widget>[
Text('Procedure Status '),
Padding(
padding: EdgeInsets.only(
top: SizeConfig
.heightMultiplier *
3.0),
child: Text(
model
.insuranceApproval[
index]
.approvalDetails ==
null
? ''
: model
.insuranceApproval[
index]
.approvalDetails
.status,
style: TextStyle(
fontSize: 17.5,
fontWeight:
FontWeight.w600),
VerticalDivider(
width: 10.0,
thickness: 1.2,
color: Colors.black,
),
Expanded(
flex: 1,
child: Column(
children: <Widget>[
Text(TranslationBase.of(
context)
.procedureStatus),
Padding(
padding: EdgeInsets.only(
top: SizeConfig
.heightMultiplier *
3.0),
child: Text(
model
.insuranceApproval[
index]
.approvalDetails ==
null
? ''
: model
.insuranceApproval[
index]
.approvalDetails
.status,
style: TextStyle(
fontSize: 17.5,
fontWeight:
FontWeight
.w600),
),
),
),
],
],
),
),
),
Expanded(
flex: 1,
child: Column(
children: <Widget>[
Text('Usage Status '),
Padding(
padding: EdgeInsets.only(
top: SizeConfig
.heightMultiplier *
3.0),
child: Text(
model
.insuranceApproval[
index]
.approvalDetails ==
null
? ''
: model
.insuranceApproval[
index]
.approvalDetails
.isInvoicedDesc,
style: TextStyle(
fontWeight:
FontWeight.w600,
fontSize: 17.5),
VerticalDivider(
width: 2.3,
thickness: 1.2,
color: Colors.black,
),
Expanded(
flex: 1,
child: Column(
children: <Widget>[
Text(TranslationBase.of(
context)
.usageStatus),
Padding(
padding: EdgeInsets.only(
top: SizeConfig
.heightMultiplier *
3.0),
child: Text(
model
.insuranceApproval[
index]
.approvalDetails ==
null
? ''
: model
.insuranceApproval[
index]
.approvalDetails
.isInvoicedDesc,
style: TextStyle(
fontWeight:
FontWeight.w600,
fontSize: 17.5),
),
),
),
],
],
),
),
),
],
],
),
),
Divider(
color: Colors.black,

@ -9,6 +9,7 @@ import 'package:diplomaticquarterapp/core/model/insurance/insurance_card.dart';
import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.dart';
import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
class InsuranceCard extends StatefulWidget {
@override
@ -24,7 +25,7 @@ class _InsuranceCardState extends State<InsuranceCard> {
AppScaffold(
isShowAppBar: true,
baseViewModel: model,
appBarTitle: 'Insurance Cards',
appBarTitle: TranslationBase.of(context).insuranceCards,
body: Container(
margin: EdgeInsets.only(
left: SizeConfig.screenWidth * 0.004,
@ -60,7 +61,7 @@ class _InsuranceCardState extends State<InsuranceCard> {
thickness: 0.5,
),
Texts(
'Company Name: ' +
TranslationBase.of(context).companyName +
model.insurance[index].companyName,
fontSize: 20.0,
),
@ -73,23 +74,23 @@ class _InsuranceCardState extends State<InsuranceCard> {
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
Text(
'Category: ' +
TranslationBase.of(context).category +
model.insurance[index].subCategoryDesc,
style: TextStyle(fontSize: 18.5),
),
Text(
'Expiration Date: ' +
TranslationBase.of(context).expirationDate +
convertDateFormat(
model.insurance[index].cardValidTo),
style: TextStyle(fontSize: 18.5),
),
Text(
'Patient Card ID : ' +
TranslationBase.of(context).patientCard +
model.insurance[index].patientCardID,
style: TextStyle(fontSize: 18.5),
),
Text(
'Policy Number : ' +
TranslationBase.of(context).policyNumber +
model
.insurance[index].insurancePolicyNumber,
style: TextStyle(fontSize: 18.5),
@ -114,12 +115,13 @@ class _InsuranceCardState extends State<InsuranceCard> {
SizedBox(
height: 14.5,
),
Container(
child: Button(
label: 'SEE DETAILS',
if (model.insurance[index].isActive == true)
Container(
child: Button(
label: TranslationBase.of(context).seeDetails,
),
width: 400.0,
),
width: 400.0,
),
],
),
],

@ -29,7 +29,7 @@ class ConfirmLogin extends StatefulWidget {
class _ConfirmLogin extends State<ConfirmLogin> {
final LocalAuthentication auth = LocalAuthentication();
dynamic _availableBiometrics;
var _availableBiometrics;
var sharedPref = new AppSharedPreferences();
bool authenticated;
final authService = new AuthProvider();
@ -271,9 +271,10 @@ class _ConfirmLogin extends State<ConfirmLogin> {
if (type == 2 || type == 3) {
fingrePrintBefore = type;
}
this.selectedOption = user.logInType == 3 || user.logInType == 2
? user.logInType
: fingrePrintBefore != null ? fingrePrintBefore : type;
this.selectedOption =
(user != null && (user.logInType == 3 || user.logInType == 2))
? user.logInType
: fingrePrintBefore != null ? fingrePrintBefore : type;
switch (type) {
case 1:
@ -411,8 +412,9 @@ class _ConfirmLogin extends State<ConfirmLogin> {
}
setUser() async {
user = SelectDeviceIMEIRES.fromJson(
await sharedPref.getObject(IMEI_USER_DATA));
if (await sharedPref.getObject(IMEI_USER_DATA) != null)
user = SelectDeviceIMEIRES.fromJson(
await sharedPref.getObject(IMEI_USER_DATA));
}
setDefault() async {

@ -0,0 +1,39 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/service/client/base_app_client.dart';
import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordsByStatusReq.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:flutter/cupertino.dart';
// SharedPreferences sharedPref = new SharedPreferences();
enum APP_STATUS { LOADING, UNAUTHENTICATED, AUTHENTICATED }
AppSharedPreferences sharedPref = new AppSharedPreferences();
const String GET_SHARED_RECORD_BY_STATUS =
'/Authentication.svc/REST/GetAllSharedRecordsByStatus';
class FamilyFilesProvider with ChangeNotifier {
bool isLogin = false;
bool isLoading = true;
dynamic authenticatedUser;
Future<GetAllSharedRecordsByStatusResponse> getSharedRecordByStatus() async {
try {
dynamic localRes;
var request = GetAllSharedRecordsByStatusReq();
request.status = 0;
await new BaseAppClient().post(GET_SHARED_RECORD_BY_STATUS,
onSuccess: (dynamic response, int statusCode) {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request.toJson());
return Future.value(
GetAllSharedRecordsByStatusResponse.fromJson(localRes));
} catch (error) {
print(error);
throw error;
}
}
}

@ -270,6 +270,36 @@ class TranslationBase {
localizedValues['bloodPressure'][locale.languageCode];
String get painScale => localizedValues['painScale'][locale.languageCode];
String get request => localizedValues['request'][locale.languageCode];
String get memberName => localizedValues['member-name'][locale.languageCode];
String get switchUser => localizedValues['switch-login'][locale.languageCode];
String get removeMember =>
localizedValues['remove-membe'][locale.languageCode];
String get allowView => localizedValues['allow-view'][locale.languageCode];
String get rejectView => localizedValues['reject-view'][locale.languageCode];
String get deleteView => localizedValues['delete-view'][locale.languageCode];
String get approvals => localizedValues['approvals'][locale.languageCode];
String get approvalNo => localizedValues['approvalNo'][locale.languageCode];
String get companyName => localizedValues['companyName'][locale.languageCode];
String get receiptOn => localizedValues['receiptOn'][locale.languageCode];
String get expiryDate => localizedValues['expiryDate'][locale.languageCode];
String get procedureName =>
localizedValues['procedureName'][locale.languageCode];
String get procedureStatus =>
localizedValues['procedureStatus'][locale.languageCode];
String get usageStatus => localizedValues['usageStatus'][locale.languageCode];
String get unusedCount => localizedValues['unusedCount'][locale.languageCode];
String get totalApproval =>
localizedValues['totalApproval'][locale.languageCode];
String get category => localizedValues['category'][locale.languageCode];
String get expirationDate =>
localizedValues['expirationDate'][locale.languageCode];
String get patientCard => localizedValues['patientCard'][locale.languageCode];
String get policyNumber =>
localizedValues['policyNumber'][locale.languageCode];
String get seeDetails => localizedValues['seeDetails'][locale.languageCode];
String get insuranceCards =>
localizedValues['insuranceCards'][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -1,7 +1,9 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/service/client/base_app_client.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/list/flexible_container.dart';
@ -25,6 +27,7 @@ class _AppDrawerState extends State<AppDrawer> {
}
var sharedPref = new AppSharedPreferences();
var familyFileProvider = FamilyFilesProvider();
AuthenticatedUser user;
@override
Widget build(BuildContext context) {
@ -54,52 +57,55 @@ class _AppDrawerState extends State<AppDrawer> {
user != null
? Padding(
padding: EdgeInsets.all(15),
child: Column(children: <Widget>[
Row(
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
children: <Widget>[
Padding(
padding:
EdgeInsets.only(right: 5),
child: Icon(
Icons.account_circle,
Row(
children: <Widget>[
Padding(
padding: EdgeInsets.only(
right: 5),
child: Icon(
Icons.account_circle,
color: Colors.red,
)),
AppText(
user.firstName +
' ' +
user.lastName,
color: Colors.red,
)),
AppText(
user.firstName +
' ' +
user.lastName,
color: Colors.red,
)
],
),
Row(children: <Widget>[
Padding(
padding: EdgeInsets.only(
left: 30, top: 5),
child: Column(
children: <Widget>[
AppText(
'File No:' +
user.patientID
.toString(),
color: Colors.red,
fontSize: SizeConfig
.textMultiplier *
1.5,
),
AppText(
user.bloodGroup != null
? 'Blood Group: ' +
user.bloodGroup
: '',
fontSize: SizeConfig
.textMultiplier *
1.5,
),
],
))
])
]))
)
],
),
Row(children: <Widget>[
Padding(
padding: EdgeInsets.only(
left: 30, top: 5),
child: Column(
children: <Widget>[
AppText(
'File No:' +
user.patientID
.toString(),
color: Colors.red,
fontSize: SizeConfig
.textMultiplier *
1.5,
),
AppText(
user.bloodGroup != null
? 'Blood Group: ' +
user.bloodGroup
: '',
fontSize: SizeConfig
.textMultiplier *
1.5,
),
],
))
])
]))
: SizedBox(),
],
),
@ -107,7 +113,7 @@ class _AppDrawerState extends State<AppDrawer> {
),
),
Column(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
InkWell(
child: DrawerItem(
@ -121,26 +127,16 @@ class _AppDrawerState extends State<AppDrawer> {
),
user != null
? Column(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
InkWell(
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: <Widget>[
DrawerItem(
TranslationBase.of(context).family,
Icons.group,
textColor: Colors.red,
iconColor: Colors.red,
),
Padding(
padding: EdgeInsets.only(
bottom: 10, right: 30),
child: Icon(
Icons.chevron_right,
color: Colors.red,
))
],
child: DrawerItem(
TranslationBase.of(context).family,
Icons.group,
textColor: Colors.red,
iconColor: Colors.red,
bottomLine: false,
sideArrow: true,
),
onTap: () {
Navigator.of(context).pushNamed(
@ -148,6 +144,75 @@ class _AppDrawerState extends State<AppDrawer> {
);
},
),
FutureBuilder(
future: getFamilyFiles(), // async work
builder: (BuildContext context,
AsyncSnapshot<
GetAllSharedRecordsByStatusResponse>
snapshot) {
switch (snapshot.connectionState) {
case ConnectionState.waiting:
return Padding(
padding: EdgeInsets.all(10),
child: Text('Loading....'));
default:
if (snapshot.hasError)
return Padding(
padding: EdgeInsets.all(10),
child: Text(snapshot.error));
else
return Container(
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
// <--- left side
color: Colors.grey[200],
width: 1.0,
),
)),
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
mainAxisSize:
MainAxisSize.min,
children: snapshot.data
.getAllSharedRecordsByStatusList
.map<Widget>((result) {
return result.status == 3
? Padding(
padding: EdgeInsets
.only(
bottom:
5),
child: Row(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: <
Widget>[
Expanded(
child: Icon(
Icons
.person),
),
Expanded(
flex: 7,
child: Column(
crossAxisAlignment: CrossAxisAlignment
.start,
children: <
Widget>[
Text(result.patientName),
Text('File No:' +
result.iD.toString()),
])),
],
))
: SizedBox();
}).toList()));
}
},
),
InkWell(
child: DrawerItem(
TranslationBase.of(context)
@ -270,4 +335,8 @@ class _AppDrawerState extends State<AppDrawer> {
);
}
}
Future<GetAllSharedRecordsByStatusResponse> getFamilyFiles() {
return familyFileProvider.getSharedRecordByStatus();
}
}

@ -11,11 +11,14 @@ class DrawerItem extends StatefulWidget {
final IconData icon;
final Color textColor;
final Color iconColor;
final bool bottomLine;
final bool sideArrow;
DrawerItem(this.title, this.icon,
{this.textColor = Colors.black,
this.iconColor = Colors.black87,
this.subTitle = ''});
this.subTitle = '',
this.bottomLine = true,
this.sideArrow = false});
@override
_DrawerItemState createState() => _DrawerItemState();
@ -25,45 +28,54 @@ class _DrawerItemState extends State<DrawerItem> {
@override
Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
// <--- left side
color: Colors.grey[200],
width: 1.0,
),
)),
margin: EdgeInsets.only(left: 10, right: 10, top: 5),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Padding(
padding: EdgeInsets.only(bottom: 30),
child: Icon(
widget.icon,
color: widget.iconColor,
size: SizeConfig.imageSizeMultiplier * 5,
)),
Padding(
padding: EdgeInsets.only(left: 5, right: 5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(
widget.title,
color: widget.textColor,
fontSize: SizeConfig.textMultiplier * 2.3,
),
Texts(
widget.subTitle,
color: widget.textColor,
fontSize: SizeConfig.textMultiplier * 2.5,
decoration: widget.bottomLine == true
? BoxDecoration(
border: Border(
bottom: BorderSide(
// <--- left side
color: Colors.grey[200],
width: 1.0,
),
],
),
)
],
),
);
))
: BoxDecoration(),
child: Padding(
padding: EdgeInsets.all(10),
child: Row(
children: <Widget>[
Expanded(
flex: 1,
child: Icon(
widget.icon,
color: widget.iconColor,
size: SizeConfig.imageSizeMultiplier * 5,
)),
Expanded(
flex: 7,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Texts(
widget.title,
color: widget.textColor,
fontSize: SizeConfig.textMultiplier * 2.3,
),
widget.subTitle != ''
? Texts(
widget.subTitle,
color: widget.textColor,
fontSize: SizeConfig.textMultiplier * 2.5,
)
: SizedBox(),
])),
widget.sideArrow == true
? Expanded(
flex: 1,
child:
Icon(Icons.keyboard_arrow_right, color: Colors.red))
: Expanded(flex: 1, child: SizedBox())
],
),
));
}
}

Loading…
Cancel
Save