Merge branch 'diplomatic-quarter-live' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into sultan

merge-requests/215/head
Sultan Khan 4 years ago
commit 18f492e52f

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

@ -251,7 +251,7 @@ const UPDATE_HEALTH_TERMS =
const CHANNEL = 3; const CHANNEL = 3;
const GENERAL_ID = 'Cs2020@2016\$2958'; const GENERAL_ID = 'Cs2020@2016\$2958';
const IP_ADDRESS = '10.20.10.20'; const IP_ADDRESS = '10.20.10.20';
const VERSION_ID = 5.6; const VERSION_ID = 5.8;
const SETUP_ID = '91877'; const SETUP_ID = '91877';
const LANGUAGE = 2; const LANGUAGE = 2;
const PATIENT_OUT_SA = 0; const PATIENT_OUT_SA = 0;

@ -305,7 +305,7 @@ const Map 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": "إدارة ملفات العائلة"},
'oxygenation': {'en': 'Oxygenation', 'ar': 'الأوكسجين'}, 'oxygenation': {'en': 'Oxygenation', 'ar': 'الأوكسجين'},
'bodyMeasurements': {'en': 'body Mass', 'ar': 'قياسات الجسم'}, 'bodyMeasurements': {'en': 'body Mass Index', 'ar': 'مؤشر الكتلة'},
'temperature': {'en': 'Temperature', 'ar': 'درجة الحرارة'}, 'temperature': {'en': 'Temperature', 'ar': 'درجة الحرارة'},
'pulse': {'en': 'Pulse', 'ar': 'النبض'}, 'pulse': {'en': 'Pulse', 'ar': 'النبض'},
'respiration': {'en': 'Respiration', 'ar': 'التنفس'}, 'respiration': {'en': 'Respiration', 'ar': 'التنفس'},
@ -1279,6 +1279,12 @@ const Map localizedValues = {
"en": "You can still submit, if you don't have Insurance Image", "en": "You can still submit, if you don't have Insurance Image",
"ar": "لا يزال بإمكانك الإرسال ، إذا لم يكن لديك صورة تأمين" "ar": "لا يزال بإمكانك الإرسال ، إذا لم يكن لديك صورة تأمين"
}, },
"info-insur-cards": {
"en": "This service allows you to view all the insurance cards that recorded during your visits to Al Habib Medical Group in addition to:",
"ar": "خدمة بطاقات التامين: هذه الخدمة تمكنك من الاطلاع على جميع بطاقات التامين والتي تم تسجيلها اثناء زياراتك لمجموعة الحبيب الطبية بالاضافة الى:"
},
"scan-now": {
"en": "If you have a card / Document Scan now",
"ar": "إذا كانت لديك بطاقة / مستند ارفقها الان"
},
}; };

@ -133,12 +133,11 @@ class BaseAppClient {
parsed['SMSLoginRequired'] == true) { parsed['SMSLoginRequired'] == true) {
onSuccess(parsed, statusCode); onSuccess(parsed, statusCode);
} }
else if(parsed['MessageStatus'] == 2){ else if(parsed['MessageStatus'] == 2 && parsed['IsAuthenticated']){
onFailure( onFailure(
parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
statusCode); statusCode);
} }
else if (!parsed['IsAuthenticated']) { else if (!parsed['IsAuthenticated']) {
await logout(); await logout();

@ -22,6 +22,8 @@ class InsuranceCardService extends BaseService {
List<InsuranceApprovalModel> get insuranceApproval => _insuranceApproval; List<InsuranceApprovalModel> get insuranceApproval => _insuranceApproval;
InsuranceCardDetailsModel insuranceCardDetails; InsuranceCardDetailsModel insuranceCardDetails;
List<InsuranceCardDetailsModel> insuranceCardDetailsList = List();
bool isHaveInsuranceCard = false;
GetAllSharedRecordsByStatusResponse getAllSharedRecordsByStatusResponse = GetAllSharedRecordsByStatusResponse getAllSharedRecordsByStatusResponse =
GetAllSharedRecordsByStatusResponse(); GetAllSharedRecordsByStatusResponse();
@ -142,12 +144,15 @@ class InsuranceCardService extends BaseService {
Future getPatientInsuranceDetails({String setupID, int projectID, String patientIdentificationID,int patientID}) async{ Future getPatientInsuranceDetails({String setupID, int projectID, String patientIdentificationID,int patientID}) async{
error = ""; error = "";
hasError = false;
insuranceCardDetails = null; insuranceCardDetails = null;
isHaveInsuranceCard = false;
await baseAppClient.post(GET_PATIENT_INSURANCE_DETAILS, await baseAppClient.post(GET_PATIENT_INSURANCE_DETAILS,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
insuranceCardDetails = null; insuranceCardDetailsList.clear();
isHaveInsuranceCard = true;
response['List_PatientInsuranceDetails'].forEach((item) { response['List_PatientInsuranceDetails'].forEach((item) {
insuranceCardDetails = InsuranceCardDetailsModel.fromJson(item); insuranceCardDetailsList.add(InsuranceCardDetailsModel.fromJson(item));
}); });
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;

@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart'; import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import '../../locator.dart'; import '../../locator.dart';
class DashboardViewModel extends BaseViewModel { class DashboardViewModel extends BaseViewModel {
@ -11,7 +12,8 @@ class DashboardViewModel extends BaseViewModel {
String get weightKg => _vitalSignService.weightKg; String get weightKg => _vitalSignService.weightKg;
String get heightCm => _vitalSignService.heightCm; String get heightCm => _vitalSignService.heightCm;
String booldType = ""; String booldType = "-";
// ToDoCountProviderModel toDoProvider = // ToDoCountProviderModel toDoProvider =
// Provider.of<ToDoCountProviderModel>(AppGlobal.context); // Provider.of<ToDoCountProviderModel>(AppGlobal.context);
@ -21,10 +23,11 @@ class DashboardViewModel extends BaseViewModel {
await _vitalSignService.getPatientRadOrders(); await _vitalSignService.getPatientRadOrders();
if (_vitalSignService.hasError) { if (_vitalSignService.hasError) {
error = _vitalSignService.error; error = _vitalSignService.error;
setState(ViewState.Error); setState(ViewState.ErrorLocal);
} else } else {
setState(ViewState.Idle);
booldType = await sharedPref.getString(BLOOD_TYPE) ?? "-"; booldType = await sharedPref.getString(BLOOD_TYPE) ?? "-";
setState(ViewState.Idle);
}
} }
} }

@ -88,8 +88,6 @@ class MyBalanceViewModel extends BaseViewModel {
Future getBlood() async { Future getBlood() async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _bloodDetailsService.getAllBloodOrders(); await _bloodDetailsService.getAllBloodOrders();
;
if (_bloodDetailsService.hasError) { if (_bloodDetailsService.hasError) {
error = _bloodDetailsService.error; error = _bloodDetailsService.error;
setState(ViewState.Error); setState(ViewState.Error);

@ -17,7 +17,6 @@ class _StatusFeedbackPageState extends State<StatusFeedbackPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<FeedbackViewModel>( return BaseView<FeedbackViewModel>(
allowAny: true,
onModelReady: (model) => model.getCOC(), onModelReady: (model) => model.getCOC(),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
baseViewModel: model, baseViewModel: model,

@ -15,38 +15,38 @@ import 'package:provider/provider.dart';
import 'AttachInsuranceCardImageDialog.dart'; import 'AttachInsuranceCardImageDialog.dart';
class InsuranceCardUpdateDetails extends StatelessWidget { class InsuranceCardUpdateDetails extends StatelessWidget {
final InsuranceCardDetailsModel insuranceCardDetailsModel; final List<InsuranceCardDetailsModel> insuranceCardDetailsModel;
final String patientIdentificationID; final String patientIdentificationID;
final int patientID; final int patientID;
final String name; final String name;
const InsuranceCardUpdateDetails(
const InsuranceCardUpdateDetails({Key key, {Key key,
this.insuranceCardDetailsModel, this.insuranceCardDetailsModel,
this.patientIdentificationID, this.patientIdentificationID,
this.patientID, this.name}) this.patientID,
this.name})
: super(key: key); : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<InsuranceViewModel>( return BaseView<InsuranceViewModel>(
builder: (context, model, w) => builder: (context, model, w) => AppScaffold(
AppScaffold(
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false, isShowDecPage: false,
appBarTitle: TranslationBase appBarTitle: TranslationBase.of(context).cardDetail,
.of(context)
.cardDetail,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Column( child: Column(
children: [ children: [
Padding( ...List.generate(
insuranceCardDetailsModel.length,
(index) => Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Container( child: Container(
width: double.maxFinite, width: double.maxFinite,
margin: EdgeInsets.only(left: 8, right: 8, top: 8), margin: EdgeInsets.only(left: 8, right: 8, top: 8),
height:projectViewModel.isArabic?350: 270, height: projectViewModel.isArabic ? 320 : 240,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(25), borderRadius: BorderRadius.circular(25),
color: Color(0xff515B5D), color: Color(0xff515B5D),
@ -57,18 +57,20 @@ class InsuranceCardUpdateDetails extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text( Text(
insuranceCardDetailsModel.memberID, insuranceCardDetailsModel[index].memberID,
textScaleFactor: 2.1, textScaleFactor: 2.1,
style: TextStyle(color: Colors.white, style: TextStyle(
color: Colors.white,
letterSpacing: 8.0, letterSpacing: 8.0,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
fontSize: 17), fontSize: 15),
), ),
SizedBox( SizedBox(
height: 5, height: 5,
), ),
Texts( Texts(
insuranceCardDetailsModel.companyName, insuranceCardDetailsModel[index].companyName,
fontSize: 14,
color: Colors.white, color: Colors.white,
), ),
SizedBox( SizedBox(
@ -78,26 +80,31 @@ class InsuranceCardUpdateDetails extends StatelessWidget {
children: [ children: [
Expanded( Expanded(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment crossAxisAlignment: CrossAxisAlignment.start,
.start,
children: [ children: [
Texts(TranslationBase
.of(context)
.policyHolder, color: Colors.white),
Texts( Texts(
insuranceCardDetailsModel.memberName, TranslationBase.of(context).policyHolder,
color: Colors.white), color: Colors.white,
fontSize: 14,
),
Texts(
insuranceCardDetailsModel[index]
.memberName,
color: Colors.white,
fontSize: 14,
),
], ],
), ),
), ),
Expanded( Expanded(
child: Column( child: Column(
children: [ children: [
Texts(TranslationBase Texts(TranslationBase.of(context).policyNo,
.of(context) color: Colors.white),
.policyNo, color: Colors.white), Texts(
Texts(insuranceCardDetailsModel insuranceCardDetailsModel[index]
.policyNumber, color: Colors.white), .policyNumber,
color: Colors.white),
], ],
), ),
), ),
@ -111,40 +118,54 @@ class InsuranceCardUpdateDetails extends StatelessWidget {
children: [ children: [
Expanded( Expanded(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment crossAxisAlignment: CrossAxisAlignment.start,
.start,
children: [ children: [
Texts( Texts(
TranslationBase TranslationBase.of(context)
.of(context)
.expiryDateTitle, .expiryDateTitle,
color: Colors.white), color: Colors.white,
Texts(insuranceCardDetailsModel.dOB, fontSize: 12,
color: Colors.white), ),
Texts(
insuranceCardDetailsModel[index].dOB,
color: Colors.white,
fontSize: 12,
),
], ],
), ),
), ),
Expanded( Expanded(
child: Column( child: Column(
children: [ children: [
Texts(TranslationBase
.of(context)
.classTitle, color: Colors.white),
Texts( Texts(
insuranceCardDetailsModel.subCategory, TranslationBase.of(context).classTitle,
color: Colors.white), color: Colors.white,
fontSize: 12,
),
Texts(
insuranceCardDetailsModel[index]
.subCategory,
color: Colors.white,
fontSize: 12,
),
], ],
), ),
), ),
Expanded( Expanded(
child: Column( child: Column(
children: [ children: [
Texts(TranslationBase Texts(
.of(context) TranslationBase.of(context).approval,
.approval, color: Colors.white), color: Colors.white,
Texts(insuranceCardDetailsModel fontSize: 12,
),
Texts(
insuranceCardDetailsModel[index]
.approvalLimit .approvalLimit
.toString(), color: Colors.white), .toString(),
color: Colors.white,
fontSize: 12,
),
], ],
), ),
), ),
@ -154,52 +175,135 @@ class InsuranceCardUpdateDetails extends StatelessWidget {
), ),
), ),
), ),
),
),
if(insuranceCardDetailsModel.isEmpty)
Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
margin: EdgeInsets.all(10.0),
child: Card(
margin: EdgeInsets.fromLTRB(
8.0, 16.0, 8.0, 8.0),
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(10),
),
child: Container(
width: MediaQuery.of(context).size.width,
padding: EdgeInsets.all(10.0),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Expanded(
flex: 3,
child: Container(
margin: EdgeInsets.only(
top: 2.0,
left: 10.0,
right: 20.0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: <Widget>[
Texts(
name,
fontSize: 14,
color: Colors.black,
fontWeight:
FontWeight.w500,
),
SizedBox(
height: 8,
),
Texts(
TranslationBase.of(
context)
.fileno +
": " +patientID.toString(),
fontSize: 14,
color: Colors.black,
fontWeight:
FontWeight.w500,
)
],
),
),
),
],
),
),
),
),
SizedBox(height: 150,),
Image.asset('assets/images/no-data-found.png',width: 80,height: 80,),
SizedBox(height: 8,),
Texts(TranslationBase.of(context).noDataAvailable)
],
) )
], ],
), ),
), ),
bottomSheet: Container( bottomSheet: Container(
width: double.infinity, width: double.infinity,
height: MediaQuery height:insuranceCardDetailsModel.isEmpty? MediaQuery.of(context).size.height * 0.14:MediaQuery.of(context).size.height * 0.21,
.of(context)
.size
.height * 0.21,
child: Container( child: Container(
margin: EdgeInsets.only(left: 8, right: 8), margin: EdgeInsets.only(left: 8, right: 8),
child: Column( child: Column(
children: [ children: [
SizedBox(height: 8,), SizedBox(
height: 8,
),
if(insuranceCardDetailsModel.isEmpty)
SecondaryButton( SecondaryButton(
textColor: Colors.white, textColor: Colors.white,
label: TranslationBase label: TranslationBase.of(context).scanNow.toUpperCase(),
.of(context) color: Theme.of(context).primaryColor,
.agree onTap: () async {
.toUpperCase(), confirmAttachInsuranceCardImageDialogDialog(
color: Theme context: context,
.of(context) name: name,
.primaryColor, fileNo: patientID.toString(),
model: model);
},
),
if(insuranceCardDetailsModel.isNotEmpty)
SecondaryButton(
textColor: Colors.white,
label: TranslationBase.of(context).agree.toUpperCase(),
color: Theme.of(context).primaryColor,
onTap: () async { onTap: () async {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
await model.uploadInsuranceCard(patientIdentificationID: patientIdentificationID,patientID: patientID); await model.uploadInsuranceCard(
patientIdentificationID: patientIdentificationID,
patientID: patientID);
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (model.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {
AppToast.showErrorToast(message: model.error); AppToast.showErrorToast(message: model.error);
} else { } else {
AppToast.showSuccessToast(message: TranslationBase.of(context).requestSent); AppToast.showSuccessToast(
message: TranslationBase.of(context).requestSent);
} }
}, },
), ),if(insuranceCardDetailsModel.isNotEmpty)
SizedBox(height: 12,), SizedBox(
height: 12,
),if(insuranceCardDetailsModel.isNotEmpty)
SecondaryButton( SecondaryButton(
textColor: Colors.white, textColor: Colors.white,
label: TranslationBase label: TranslationBase.of(context).disagree.toUpperCase(),
.of(context)
.disagree
.toUpperCase(),
color: Colors.grey[800], color: Colors.grey[800],
onTap: () async { onTap: () async {
confirmSelectFamilyDialog(context: context, name: name, fileNo: patientID.toString(),model: model); confirmAttachInsuranceCardImageDialogDialog(
context: context,
name: name,
fileNo: patientID.toString(),
model: model);
}, },
) )
], ],
@ -210,7 +314,11 @@ class InsuranceCardUpdateDetails extends StatelessWidget {
); );
} }
void confirmSelectFamilyDialog({BuildContext context, String name, String fileNo,InsuranceViewModel model}) { void confirmAttachInsuranceCardImageDialogDialog(
{BuildContext context,
String name,
String fileNo,
InsuranceViewModel model}) {
showDialog( showDialog(
context: context, context: context,
child: AttachInsuranceCardImageDialog( child: AttachInsuranceCardImageDialog(
@ -218,14 +326,17 @@ class InsuranceCardUpdateDetails extends StatelessWidget {
name: name, name: name,
image: (file, image) async { image: (file, image) async {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
await model.uploadInsuranceCard(patientIdentificationID: patientIdentificationID,patientID: patientID,image: image); await model.uploadInsuranceCard(
patientIdentificationID: patientIdentificationID,
patientID: patientID,
image: image);
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (model.state == ViewState.ErrorLocal || if (model.state == ViewState.ErrorLocal ||
model.state == ViewState.Error) { model.state == ViewState.Error) {
AppToast.showErrorToast(message: model.error); AppToast.showErrorToast(message: model.error);
} else { } else {
AppToast.showSuccessToast(message: TranslationBase.of(context).requestSent); AppToast.showSuccessToast(
message: TranslationBase.of(context).requestSent);
} }
Navigator.pop(context); Navigator.pop(context);
}, },

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/service/insurance_service.dart'; import 'package:diplomaticquarterapp/core/service/insurance_service.dart';
import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_details.dart'; import 'package:diplomaticquarterapp/pages/insurance/insurance_details.dart';
@ -25,11 +26,13 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
with SingleTickerProviderStateMixin { with SingleTickerProviderStateMixin {
TabController _tabController; TabController _tabController;
InsuranceCardService _insuranceCardService = locator<InsuranceCardService>(); InsuranceCardService _insuranceCardService = locator<InsuranceCardService>();
List<ImagesInfo> imagesInfo = List();
@override @override
void initState() { void initState() {
super.initState(); super.initState();
_tabController = TabController(length: 2, vsync: this); _tabController = TabController(length: 2, vsync: this);
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/insurance-card/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/insurance-card/ar/0.png'));
} }
void dispose() { void dispose() {
@ -43,6 +46,9 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
builder: (BuildContext context, InsuranceViewModel model, Widget child) => builder: (BuildContext context, InsuranceViewModel model, Widget child) =>
AppScaffold( AppScaffold(
appBarTitle: TranslationBase.of(context).insurCards, appBarTitle: TranslationBase.of(context).insurCards,
description: TranslationBase.of(context).infoInsurCards,
infoList: TranslationBase.of(context).infoPrescriptionsPoints,
imagesInfo: imagesInfo,
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: true, isShowDecPage: true,
baseViewModel: model, baseViewModel: model,
@ -107,7 +113,8 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
children: <Widget>[ children: <Widget>[
Container( Container(
child: model.getAllSharedRecordsByStatusResponse child: model.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList!=null ?? .getAllSharedRecordsByStatusList !=
null ??
false false
? ListView.builder( ? ListView.builder(
itemCount: model.getAllSharedRecordsByStatusResponse itemCount: model.getAllSharedRecordsByStatusResponse
@ -130,8 +137,7 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
BorderRadius.circular(10), BorderRadius.circular(10),
), ),
child: Container( child: Container(
width: width: MediaQuery.of(context).size.width,
MediaQuery.of(context).size.width,
padding: EdgeInsets.all(10.0), padding: EdgeInsets.all(10.0),
child: Row( child: Row(
crossAxisAlignment: crossAxisAlignment:
@ -202,11 +208,23 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
onTap: () { onTap: () {
getDetails( getDetails(
projectID: 15, projectID: 15,
patientIdentificationID: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList[index].patientIdenficationNumber, patientIdentificationID: model
setupID: '010266', .getAllSharedRecordsByStatusResponse
patientID: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList[index].responseID, .getAllSharedRecordsByStatusList[
name: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList[index].patientName index]
); .patientIdenficationNumber,
setupID:
'010266',
patientID: model
.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList[
index]
.responseID,
name: model
.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList[
index]
.patientName);
}, },
), ),
), ),
@ -251,7 +269,11 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Texts( Texts(
model.user.firstName??'' + " " + model.user.lastName??'', model.user.firstName ??
'' +
" " +
model.user.lastName ??
'',
fontSize: 14, fontSize: 14,
color: Colors.black, color: Colors.black,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
@ -290,11 +312,16 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
getDetails( getDetails(
setupID: '010266', setupID: '010266',
projectID: 15, projectID: 15,
patientIdentificationID: model.user.patientIdentificationNo, patientIdentificationID:
patientID: model.user.patientID, model.user
name: model.user.firstName + " " + model.user.lastName .patientIdentificationNo,
patientID: model
); .user.patientID,
name: model.user
.firstName +
" " +
model
.user.lastName);
}, },
), ),
), ),
@ -425,7 +452,12 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
); );
} }
getDetails({String setupID, int projectID, String patientIdentificationID,int patientID,String name}) { getDetails(
{String setupID,
int projectID,
String patientIdentificationID,
int patientID,
String name}) {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
_insuranceCardService _insuranceCardService
.getPatientInsuranceDetails( .getPatientInsuranceDetails(
@ -435,9 +467,16 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
patientIdentificationID: patientIdentificationID) patientIdentificationID: patientIdentificationID)
.then((value) { .then((value) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (_insuranceCardService.insuranceCardDetails != null) { if (!_insuranceCardService.hasError && _insuranceCardService.isHaveInsuranceCard) {
Navigator.push(context, Navigator.push(
FadePage(page: InsuranceCardUpdateDetails(insuranceCardDetailsModel: _insuranceCardService.insuranceCardDetails,patientID: patientID,patientIdentificationID: patientIdentificationID,name: name,))); context,
FadePage(
page: InsuranceCardUpdateDetails(
insuranceCardDetailsModel: _insuranceCardService.insuranceCardDetailsList,
patientID: patientID,
patientIdentificationID: patientIdentificationID,
name: name,
)));
} else { } else {
AppToast.showErrorToast(message: _insuranceCardService.error); AppToast.showErrorToast(message: _insuranceCardService.error);
} }

@ -516,7 +516,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
// ); // );
// themeNotifier.setTheme(defaultTheme); // themeNotifier.setTheme(defaultTheme);
} }
void checkUserStatus(token, {isLoader}) async { void checkUserStatus(token, {isLoader = true}) async {
if (isLoader) if (isLoader)
//GifLoaderDialogUtils.showMyDialog(context); //GifLoaderDialogUtils.showMyDialog(context);
authService authService

@ -214,6 +214,7 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
SizedBox( SizedBox(
height: 12, height: 12,
), ),
if(model.user!=null)
NewTextFields( NewTextFields(
hintText: TranslationBase.of(context).depositorEmail, hintText: TranslationBase.of(context).depositorEmail,
initialValue: model.user.emailAddress, initialValue: model.user.emailAddress,

@ -1,6 +1,7 @@
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/model/sick_leave/sick_leave.dart'; import 'package:diplomaticquarterapp/core/model/sick_leave/sick_leave.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/patient_sick_leave_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/patient_sick_leave_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@ -9,6 +10,7 @@ import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.d
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class PatientSickLeavePage extends StatefulWidget { class PatientSickLeavePage extends StatefulWidget {
@override @override
@ -19,12 +21,16 @@ class _PatientSickLeavePageState extends State<PatientSickLeavePage> {
List<ImagesInfo> imagesInfo = List(); List<ImagesInfo> imagesInfo = List();
@override @override
Widget build(BuildContext context) { void initState() {
imagesInfo.add(ImagesInfo( imagesInfo.add(ImagesInfo(
imageEn: imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/sick-leaves/en/0.png',
'https://hmgwebservices.com/Images/MobileApp/imges-info/sick-leaves/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/sick-leaves/ar/0.png'));
imageAr: super.initState();
'https://hmgwebservices.com/Images/MobileApp/imges-info/sick-leaves/ar/0.png')); }
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<PatientSickLeaveViewMode>( return BaseView<PatientSickLeaveViewMode>(
onModelReady: (model) => model.getSickLeave(), onModelReady: (model) => model.getSickLeave(),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
@ -40,21 +46,13 @@ class _PatientSickLeavePageState extends State<PatientSickLeavePage> {
itemCount: model.sickLeaveList.length, itemCount: model.sickLeaveList.length,
itemBuilder: (context, index) => DoctorCard( itemBuilder: (context, index) => DoctorCard(
name: model.sickLeaveList[index].doctorName, name: model.sickLeaveList[index].doctorName,
date: DateUtil.getMonthDayYearDateFormatted( date:projectViewModel.isArabic? DateUtil.getMonthDayYearDateFormattedAr(model.sickLeaveList[index].requestDate):DateUtil.getMonthDayYearDateFormatted(model.sickLeaveList[index].requestDate),
model.sickLeaveList[index].requestDate),
profileUrl: model.sickLeaveList[index].doctorImageURL, profileUrl: model.sickLeaveList[index].doctorImageURL,
rat: model.sickLeaveList[index].actualDoctorRate.toDouble(), rat: model.sickLeaveList[index].actualDoctorRate.toDouble(),
subName: model.sickLeaveList[index].projectName, subName: model.sickLeaveList[index].projectName,
isInOutPatient: model.sickLeaveList[index].isInOutPatient, isInOutPatient: model.sickLeaveList[index].isInOutPatient,
onEmailTap: () { onEmailTap: () {
showConfirmMessage(model, index); showConfirmMessage(model, index);
// model.sendSickLeaveEmail(
// message: TranslationBase.of(context).emailSentSuccessfully,
// requestNo: model.sickLeaveList[index].requestNo,
// doctorName: model.sickLeaveList[index].doctorName,
// projectName: model.sickLeaveList[index].projectName,
// setupID: model.sickLeaveList[index].setupID,
// projectID: model.sickLeaveList[index].projectID);
}, },
), ),
), ),

@ -179,7 +179,7 @@ class PrescriptionItemsPage extends StatelessWidget {
), ),
bottomSheet: Container( bottomSheet: Container(
width: double.infinity, width: double.infinity,
height: MediaQuery.of(context).size.height * 0.12, height: MediaQuery.of(context).size.height * 0.14,
color: Colors.grey[100], color: Colors.grey[100],
child: Column( child: Column(
children: <Widget>[ children: <Widget>[

@ -36,7 +36,7 @@ class PrescriptionsHistoryDetailsPage extends StatelessWidget {
Container( Container(
width: double.infinity, width: double.infinity,
decoration: BoxDecoration( decoration: BoxDecoration(
color: prescriptionsOrder.status==3 ?Colors.red:prescriptionsOrder.status==2? Colors.green: Colors.grey, color: prescriptionsOrder.status == 3 ?Colors.green : prescriptionsOrder.status ==2 ? Colors.grey: Colors.red,
borderRadius: BorderRadius.circular(5)), borderRadius: BorderRadius.circular(5)),
child: Padding( child: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),

@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/core/enum/filter_type.dart'; import 'package:diplomaticquarterapp/core/enum/filter_type.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescription_items_page.dart'; import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescription_items_page.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@ -9,6 +10,7 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class PrescriptionsPage extends StatelessWidget { class PrescriptionsPage extends StatelessWidget {
final PrescriptionsViewModel prescriptionsViewModel; final PrescriptionsViewModel prescriptionsViewModel;
@ -18,6 +20,7 @@ class PrescriptionsPage extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold( return AppScaffold(
baseViewModel: prescriptionsViewModel, baseViewModel: prescriptionsViewModel,
body: FractionallySizedBox( body: FractionallySizedBox(
@ -89,8 +92,7 @@ class PrescriptionsPage extends StatelessWidget {
rat: prescriptions.actualDoctorRate.toDouble(), rat: prescriptions.actualDoctorRate.toDouble(),
subName: prescriptions.name, subName: prescriptions.name,
isInOutPatient: prescriptions.isInOutPatient, isInOutPatient: prescriptions.isInOutPatient,
date: DateUtil.getMonthDayYearDateFormatted( date:projectViewModel.isArabic? DateUtil.getMonthDayYearDateFormattedAr(prescriptions.dischargeDate):DateUtil.getMonthDayYearDateFormatted(prescriptions.dischargeDate),
prescriptions.dischargeDate),
), ),
); );
}).toList(), }).toList(),

@ -54,8 +54,8 @@ class RadiologyDetailsPage extends StatelessWidget {
bottomSheet: Container( bottomSheet: Container(
width: double.infinity, width: double.infinity,
height: finalRadiology.dIAPACSURL != "" height: finalRadiology.dIAPACSURL != ""
? MediaQuery.of(context).size.height * 0.2 ? MediaQuery.of(context).size.height * 0.25
: MediaQuery.of(context).size.height * 0.15, : MediaQuery.of(context).size.height * 0.14,
color: Colors.grey[100], color: Colors.grey[100],
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,

@ -57,6 +57,7 @@ class _HomeReportPageState extends State<HomeReportPage>
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: TranslationBase.of(context).newMedReport, appBarTitle: TranslationBase.of(context).newMedReport,
title: TranslationBase.of(context).medReport,
description: TranslationBase.of(context).infoMonthReport, description: TranslationBase.of(context).infoMonthReport,
baseViewModel: model, baseViewModel: model,
imagesInfo: imagesInfo, imagesInfo: imagesInfo,

@ -22,54 +22,15 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
switch (pageKey) { switch (pageKey) {
case VitalSignDetails.BodyMeasurements: case VitalSignDetails.BodyMeasurements:
VSchart = [ VSchart = [
{
'name': 'Height',
'nameAr': 'الطول',
'title1': 'Date',
'title2': 'Cm',
'title2Ar': 'سم',
'viewKey': 'HeightCm',
},
{
'name': 'Weight Kg',
'nameAr': 'الوزن كجم',
'title1': 'Date',
'title2': 'Kg',
'title2Ar': 'كجم',
'viewKey': 'WeightKg',
},
{ {
'name': 'BMI', 'name': 'BMI',
'nameAr': 'مؤشر كتلة الجسم', 'nameAr': 'مؤشر الكتلة',
'title1': 'Date', 'title1': 'Date',
'title2': 'BodyMass', 'title2': 'BMI',
'title2Ar': 'كتلة الجسم', 'title2Ar': 'الكتلة',
'viewKey': 'BodyMassIndex', 'viewKey': 'BodyMassIndex',
}, },
{
'name': 'Head Circum Cm',
'nameAr': 'محيط رأس سم',
'title1': 'Date',
'title2': 'Cm',
'title2Ar': 'سم',
'viewKey': 'HeadCircumCm',
},
{
'name': 'Ideal Body Weight (Lbs)',
'nameAr': 'وزن الجسم المثالي (رطل)',
'title1': 'Date',
'title2': 'Ideal Weight',
'title2Ar': 'الوزن المثالي',
'viewKey': 'IdealBodyWeightLbs',
},
{
'name': 'Lean Body WeightLbs (Lbs)',
'nameAr': 'رطل وزن الجسم النحيل (رطل)',
'title1': 'Date',
'title2': 'Lean Weight',
'title2Ar': 'وزن خفيف',
'viewKey': 'LeanBodyWeightLbs',
}
]; ];
break; break;

@ -1064,6 +1064,8 @@ class TranslationBase {
String get disagree => localizedValues['disagree'][locale.languageCode]; String get disagree => localizedValues['disagree'][locale.languageCode];
String get requestSent => localizedValues['request-sent'][locale.languageCode]; String get requestSent => localizedValues['request-sent'][locale.languageCode];
String get attachInsuraceImage => localizedValues['attach-insurace-image'][locale.languageCode]; String get attachInsuraceImage => localizedValues['attach-insurace-image'][locale.languageCode];
String get infoInsurCards => localizedValues['info-insur-cards'][locale.languageCode];
String get scanNow => localizedValues['scan-now'][locale.languageCode];
} }

@ -21,20 +21,27 @@ class AppExpandableNotifier extends StatefulWidget {
this.bodyWidget, this.bodyWidget,
this.title, this.title,
this.collapsed, this.collapsed,
this.isExpand}); this.isExpand = false});
_AppExpandableNotifier createState() => _AppExpandableNotifier(); _AppExpandableNotifier createState() => _AppExpandableNotifier();
} }
class _AppExpandableNotifier extends State<AppExpandableNotifier> { class _AppExpandableNotifier extends State<AppExpandableNotifier> {
@override @override
Widget build(BuildContext context) { void initState() {
setState(() { setState(() {
if (widget.isExpand == true) { if (widget.isExpand) {
widget.expandFlag = widget.isExpand; widget.expandFlag = widget.isExpand;
widget.controller.expanded = true; widget.controller.expanded = true;
} }
}); });
super.initState();
}
@override
Widget build(BuildContext context) {
return ExpandableNotifier( return ExpandableNotifier(
child: Padding( child: Padding(
padding: const EdgeInsets.only(left: 10, right: 10, top: 4), padding: const EdgeInsets.only(left: 10, right: 10, top: 4),
@ -90,11 +97,7 @@ class _AppExpandableNotifier extends State<AppExpandableNotifier> {
onPressed: () { onPressed: () {
setState(() { setState(() {
widget.expandFlag = !widget.expandFlag; widget.expandFlag = !widget.expandFlag;
if (widget.expandFlag == true) { widget.controller.expanded = widget.expandFlag;
widget.controller.expanded = true;
} else {
widget.controller.expanded = false;
}
}); });
}), }),
]), ]),

@ -73,7 +73,7 @@ class _NotAutPageState extends State<NotAutPage> {
width: 40, width: 40,
height: 40, height: 40,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15), borderRadius: BorderRadius.circular(20),
color: Theme.of(context).primaryColor), color: Theme.of(context).primaryColor),
child: Center( child: Center(
child: Texts('${index+1}',color: Colors.white,), child: Texts('${index+1}',color: Colors.white,),

Loading…
Cancel
Save