Merge branch 'insurance' into 'master'

insurance translation

See merge request Cloud_Solution/diplomatic-quarter!18
merge-requests/34/merge
Mohammad Aljammal 4 years ago
commit edd850490e

@ -13,26 +13,27 @@ const GET_MY_DOCTOR = '/Doctors.svc/REST/GetPatientDoctorAppointmentResult';
const GET_DOCTOR_PROFILE = '/Doctors.svc/REST/GetDocProfiles'; const GET_DOCTOR_PROFILE = '/Doctors.svc/REST/GetDocProfiles';
const GET_DOCTOR_RATING = '/Doctors.svc/REST/dr_GetAvgDoctorRating'; const GET_DOCTOR_RATING = '/Doctors.svc/REST/dr_GetAvgDoctorRating';
///Prescriptions ///Prescriptions
const PRESCRIPTIONS = '/Patients.svc/REST/GetPrescriptionApptList'; const PRESCRIPTIONS = '/Patients.svc/REST/GetPrescriptionApptList';
const GET_PRESCRIPTIONS_ALL_ORDERS = const GET_PRESCRIPTIONS_ALL_ORDERS =
'/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; '/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
const GET_PRESCRIPTION_REPORT = '/Patients.svc/REST/INP_GetPrescriptionReport'; const GET_PRESCRIPTION_REPORT = '/Patients.svc/REST/INP_GetPrescriptionReport';
const SEND_PRESCRIPTION_EMAIL = '/Notifications.svc/REST/SendPrescriptionEmail'; 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 ///Lab Order
const GET_Patient_LAB_ORDERS = '/Patients.svc/REST/GetPatientLabOrders'; 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 = '/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 GET_RAD_IMAGE_URL = '/Patients.svc/Rest/GetRadImageURL';
const SEND_RAD_REPORT_EMAIL = '/Notifications.svc/REST/SendRadReportEmail'; const SEND_RAD_REPORT_EMAIL = '/Notifications.svc/REST/SendRadReportEmail';
///Feedback ///Feedback
const SEND_FEEDBACK = '/COCWS.svc/REST/InsertCOCItemInSPList'; const SEND_FEEDBACK = '/COCWS.svc/REST/InsertCOCItemInSPList';
const GET_STATUS_FOR_COCO = '/COCWS.svc/REST/GetStatusforCOC'; const GET_STATUS_FOR_COCO = '/COCWS.svc/REST/GetStatusforCOC';
@ -54,7 +55,7 @@ const SETUP_ID = '91877';
const LANGUAGE = 1; const LANGUAGE = 1;
const PATIENT_OUT_SA = 0; const PATIENT_OUT_SA = 0;
const SESSION_ID = 'TMRhVmkGhOsvamErw'; const SESSION_ID = 'TMRhVmkGhOsvamErw';
const IS_DENTAL_ALLOWED_BACKEND = false; const IS_DENTAL_ALLOWED_BACKEND = false;
const PATIENT_TYPE = 1; const PATIENT_TYPE = 1;
const PATIENT_TYPE_ID = 1; const PATIENT_TYPE_ID = 1;
@ -88,5 +89,3 @@ class AppGlobal {
return request; return request;
} }
} }

@ -161,4 +161,23 @@ const Map<String, Map<String, String>> localizedValues = {
"recieved-requests": {"en": "Recieved Requests", "ar": "الطلبات المستلمة"}, "recieved-requests": {"en": "Recieved Requests", "ar": "الطلبات المستلمة"},
"manage-files": {"en": "Manage Family Files", "ar": "إدارة ملفات العائلة"}, "manage-files": {"en": "Manage Family Files", "ar": "إدارة ملفات العائلة"},
// "my-family": {"en": "MY FAMILY", "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": "بطاقات التأمين"},
}; };

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

@ -6,6 +6,7 @@ import '../base/base_view.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
class InsuranceApproval extends StatefulWidget { class InsuranceApproval extends StatefulWidget {
@override @override
@ -21,7 +22,7 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
AppScaffold( AppScaffold(
isShowAppBar: true, isShowAppBar: true,
baseViewModel: model, baseViewModel: model,
appBarTitle: 'Approvals', appBarTitle: TranslationBase.of(context).approvals,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
@ -39,10 +40,10 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[ children: <Widget>[
Text( Text(
'Total approval unused', TranslationBase.of(context).totalApproval,
style: TextStyle( style: TextStyle(
color: Color(0xff60688B), color: Color(0xff60688B),
fontSize: 19.5, fontSize: 19.0,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
), ),
@ -72,7 +73,7 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
children: <Widget>[ children: <Widget>[
ExpansionTile( ExpansionTile(
title: Container( title: Container(
height: 85.0, height: 120.0,
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
@ -141,7 +142,7 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
model.insuranceApproval[index] model.insuranceApproval[index]
.doctorName, .doctorName,
style: TextStyle( style: TextStyle(
fontSize: 15.0, fontSize: 17.0,
fontStyle: FontStyle.italic), fontStyle: FontStyle.italic),
), ),
], ],
@ -156,7 +157,8 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Text( Text(
'Approval No.: ' + TranslationBase.of(context)
.approvalNo +
model.insuranceApproval[index] model.insuranceApproval[index]
.approvalNo .approvalNo
.toString(), .toString(),
@ -171,7 +173,8 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
thickness: 1.0, thickness: 1.0,
), ),
Text( Text(
'Procedure Status: ' + TranslationBase.of(context)
.procedureStatus +
model.insuranceApproval[index] model.insuranceApproval[index]
.approvalStatusDescption, .approvalStatusDescption,
style: TextStyle( style: TextStyle(
@ -184,7 +187,8 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
thickness: 1.0, thickness: 1.0,
), ),
Text( Text(
'Unused Count: ' + TranslationBase.of(context)
.unusedCount +
model.insuranceApproval[index] model.insuranceApproval[index]
.unUsedCount .unUsedCount
.toString(), .toString(),
@ -210,7 +214,8 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
// fontWeight: FontWeight.w600), // fontWeight: FontWeight.w600),
// ), // ),
Text( Text(
'Company Name', TranslationBase.of(context)
.companyName,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 17.5, fontSize: 17.5,
@ -223,7 +228,8 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
thickness: 1.0, thickness: 1.0,
), ),
Text( Text(
'Receipt on: ' + TranslationBase.of(context)
.receiptOn +
convertDateFormat(model convertDateFormat(model
.insuranceApproval[index] .insuranceApproval[index]
.rceiptOn), .rceiptOn),
@ -238,7 +244,8 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
thickness: 1.0, thickness: 1.0,
), ),
Text( Text(
'expiryDate: ' + TranslationBase.of(context)
.expiryDate +
convertDateFormat(model convertDateFormat(model
.insuranceApproval[index] .insuranceApproval[index]
.expiryDate), .expiryDate),
@ -252,107 +259,123 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
height: 55.0, height: 55.0,
thickness: 1.2, thickness: 1.2,
), ),
Row( IntrinsicHeight(
crossAxisAlignment: child: Row(
CrossAxisAlignment.center, crossAxisAlignment:
children: <Widget>[ CrossAxisAlignment.center,
Expanded( children: <Widget>[
flex: 1, Expanded(
child: Column( flex: 1,
children: <Widget>[ child: Column(
Text('Procedure Name '), children: <Widget>[
Padding( Text(TranslationBase.of(
padding: EdgeInsets.only( context)
top: SizeConfig .procedureName),
.heightMultiplier * Padding(
3.0), padding: EdgeInsets.only(
child: Text( top: SizeConfig
model .heightMultiplier *
.insuranceApproval[ 3.0),
index] child: Text(
.approvalDetails == model
null .insuranceApproval[
? '' index]
: model .approvalDetails ==
.insuranceApproval[ null
index] ? ''
.approvalDetails : model
.procedureName, .insuranceApproval[
style: TextStyle( index]
fontWeight: .approvalDetails
FontWeight.w600, .procedureName,
fontSize: 15.5), style: TextStyle(
fontWeight:
FontWeight.w600,
fontSize: 15.5),
),
), ),
), ],
], ),
), ),
), VerticalDivider(
VerticalDivider( width: 10.0,
width: 10.0, thickness: 1.2,
), color: Colors.black,
Expanded( ),
flex: 1, Expanded(
child: Column( flex: 1,
children: <Widget>[ child: Column(
Text('Procedure Status '), children: <Widget>[
Padding( Text(TranslationBase.of(
padding: EdgeInsets.only( context)
top: SizeConfig .procedureStatus),
.heightMultiplier * Padding(
3.0), padding: EdgeInsets.only(
child: Text( top: SizeConfig
model .heightMultiplier *
.insuranceApproval[ 3.0),
index] child: Text(
.approvalDetails == model
null .insuranceApproval[
? '' index]
: model .approvalDetails ==
.insuranceApproval[ null
index] ? ''
.approvalDetails : model
.status, .insuranceApproval[
style: TextStyle( index]
fontSize: 17.5, .approvalDetails
fontWeight: .status,
FontWeight.w600), style: TextStyle(
fontSize: 17.5,
fontWeight:
FontWeight
.w600),
),
), ),
), ],
], ),
), ),
), VerticalDivider(
Expanded( width: 2.3,
flex: 1, thickness: 1.2,
child: Column( color: Colors.black,
children: <Widget>[ ),
Text('Usage Status '), Expanded(
Padding( flex: 1,
padding: EdgeInsets.only( child: Column(
top: SizeConfig children: <Widget>[
.heightMultiplier * Text(TranslationBase.of(
3.0), context)
child: Text( .usageStatus),
model Padding(
.insuranceApproval[ padding: EdgeInsets.only(
index] top: SizeConfig
.approvalDetails == .heightMultiplier *
null 3.0),
? '' child: Text(
: model model
.insuranceApproval[ .insuranceApproval[
index] index]
.approvalDetails .approvalDetails ==
.isInvoicedDesc, null
style: TextStyle( ? ''
fontWeight: : model
FontWeight.w600, .insuranceApproval[
fontSize: 17.5), index]
.approvalDetails
.isInvoicedDesc,
style: TextStyle(
fontWeight:
FontWeight.w600,
fontSize: 17.5),
),
), ),
), ],
], ),
), ),
), ],
], ),
), ),
Divider( Divider(
color: Colors.black, 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/core/viewModels/insurance_card_View_model.dart';
import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart'; import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
class InsuranceCard extends StatefulWidget { class InsuranceCard extends StatefulWidget {
@override @override
@ -24,7 +25,7 @@ class _InsuranceCardState extends State<InsuranceCard> {
AppScaffold( AppScaffold(
isShowAppBar: true, isShowAppBar: true,
baseViewModel: model, baseViewModel: model,
appBarTitle: 'Insurance Cards', appBarTitle: TranslationBase.of(context).insuranceCards,
body: Container( body: Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: SizeConfig.screenWidth * 0.004, left: SizeConfig.screenWidth * 0.004,
@ -60,7 +61,7 @@ class _InsuranceCardState extends State<InsuranceCard> {
thickness: 0.5, thickness: 0.5,
), ),
Texts( Texts(
'Company Name: ' + TranslationBase.of(context).companyName +
model.insurance[index].companyName, model.insurance[index].companyName,
fontSize: 20.0, fontSize: 20.0,
), ),
@ -73,23 +74,23 @@ class _InsuranceCardState extends State<InsuranceCard> {
crossAxisAlignment: CrossAxisAlignment.stretch, crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[ children: <Widget>[
Text( Text(
'Category: ' + TranslationBase.of(context).category +
model.insurance[index].subCategoryDesc, model.insurance[index].subCategoryDesc,
style: TextStyle(fontSize: 18.5), style: TextStyle(fontSize: 18.5),
), ),
Text( Text(
'Expiration Date: ' + TranslationBase.of(context).expirationDate +
convertDateFormat( convertDateFormat(
model.insurance[index].cardValidTo), model.insurance[index].cardValidTo),
style: TextStyle(fontSize: 18.5), style: TextStyle(fontSize: 18.5),
), ),
Text( Text(
'Patient Card ID : ' + TranslationBase.of(context).patientCard +
model.insurance[index].patientCardID, model.insurance[index].patientCardID,
style: TextStyle(fontSize: 18.5), style: TextStyle(fontSize: 18.5),
), ),
Text( Text(
'Policy Number : ' + TranslationBase.of(context).policyNumber +
model model
.insurance[index].insurancePolicyNumber, .insurance[index].insurancePolicyNumber,
style: TextStyle(fontSize: 18.5), style: TextStyle(fontSize: 18.5),
@ -114,12 +115,13 @@ class _InsuranceCardState extends State<InsuranceCard> {
SizedBox( SizedBox(
height: 14.5, height: 14.5,
), ),
Container( if (model.insurance[index].isActive == true)
child: Button( Container(
label: 'SEE DETAILS', child: Button(
label: TranslationBase.of(context).seeDetails,
),
width: 400.0,
), ),
width: 400.0,
),
], ],
), ),
], ],

@ -194,6 +194,28 @@ class TranslationBase {
String get family => localizedValues['family'][locale.languageCode]; String get family => localizedValues['family'][locale.languageCode];
String get myFamilyFiles => String get myFamilyFiles =>
localizedValues['family-title'][locale.languageCode]; localizedValues['family-title'][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> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

Loading…
Cancel
Save