hot fixes

merge-update-with-lab-changes
Mohammad Aljammal 5 years ago committed by Mohammad Aljammal
parent a8b0af9ee1
commit 9c12e949e8

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

@ -267,6 +267,9 @@ const GET_PAtIENTS_INSURANCE_UPDATED =
"Services/Patients.svc/REST/PatientER_GetPatientInsuranceCardUpdateHistory"; "Services/Patients.svc/REST/PatientER_GetPatientInsuranceCardUpdateHistory";
const INSURANCE_DETAILS = "Services/Patients.svc/REST/Get_InsuranceCheckList"; const INSURANCE_DETAILS = "Services/Patients.svc/REST/Get_InsuranceCheckList";
const GET_PATIENT_INSURANCE_DETAILS = "Services/Patients.svc/REST/PatientER_GetPatientInsuranceDetails";
const UPLOAD_INSURANCE_CARD = 'Services/Patients.svc/REST/PatientER_PatientInfoForInsuranceCardUpdate';
const GET_VACCINES = "Services/Patients.svc/REST/GetDoneVaccinesByPatientID"; const GET_VACCINES = "Services/Patients.svc/REST/GetDoneVaccinesByPatientID";
const GET_VACCINES_EMAIL = "Services/Notifications.svc/REST/SendVaccinesEmail"; const GET_VACCINES_EMAIL = "Services/Notifications.svc/REST/SendVaccinesEmail";

@ -1211,4 +1211,74 @@ const Map localizedValues = {
"en": "Heart rate", "en": "Heart rate",
"ar": "معدل النبض بالدقيقة" "ar": "معدل النبض بالدقيقة"
}, },
"systolic-lng": {
"en": "Systolic",
"ar": "الإنقباض"
},
"diastolic-lng": {
"en": "Diastolic",
"ar": "الإنبساط"
},
"policy-holder": {
"en": "Policy Holder",
"ar": "حامل بطاقة التأمين"
},
"policy-no": {
"en": "Policy Number",
"ar": "رقم سياسات"
},
"agree": {
"en": "I agree, this is the correct information",
"ar": "موافق، هذه المعلومات صحيحة"
},
"disagree": {
"en": "No, this is not the correct information",
"ar": "غير موافق، هذه المعلومات غير الصحيحة"
},
"expiry-date": {
"en": "Expiry Date",
"ar": "تاريخ انتهاء الصلاحية"
},
"class": {
"en": "Class",
"ar": "فئة"
},
"approval": {
"en": "Approval",
"ar": "موافقة"
},
"no-data": {
"en": "No data found",
"ar": "لاتوجد بيانات"
},
"insurance-details": {
"en": "Insurance Details",
"ar": "تفاصيل التأمين"
},
"nearest-hospital": {
"en": "Nearest Hospital",
"ar": "أقرب مستشفى"
},
"request-sent": {
"en": "Request sent successfully",
"ar": "تم إرسال الطلب بنجاح"
},
"message-sent": {
"en": "Message sent successfully",
"ar": "تم إرسال الرسالة بنجاح"
},
"sent-on": {
"en": "Sent on",
"ar": "أرسلت في"
},
"attach-insurace-image": {
"en": "Attach insurance card image",
"ar": "إرفاق صورة بطاقة التأمين"
},
"upload-without-image": {
"en": "You can still submit, if you don't have Insurance Image",
"ar": "لا يزال بإمكانك الإرسال ، إذا لم يكن لديك صورة تأمين"
},
}; };

@ -0,0 +1,88 @@
class InsuranceCardDetailsModel {
int approvalLimit;
int companyGroupID;
String companyName;
String companyRemarks;
String dOB;
int deductible;
String effectiveFrom;
String effectiveTo;
String eligabilityFailureReason;
bool isMemberEligible;
String memberID;
String memberName;
String memberStatus;
dynamic message;
String nationalId;
String policyNumber;
String responseMessage;
String room;
String subCategory;
InsuranceCardDetailsModel(
{this.approvalLimit,
this.companyGroupID,
this.companyName,
this.companyRemarks,
this.dOB,
this.deductible,
this.effectiveFrom,
this.effectiveTo,
this.eligabilityFailureReason,
this.isMemberEligible,
this.memberID,
this.memberName,
this.memberStatus,
this.message,
this.nationalId,
this.policyNumber,
this.responseMessage,
this.room,
this.subCategory});
InsuranceCardDetailsModel.fromJson(Map<String, dynamic> json) {
approvalLimit = json['ApprovalLimit'];
companyGroupID = json['CompanyGroupID'];
companyName = json['CompanyName'];
companyRemarks = json['CompanyRemarks'];
dOB = json['DOB'];
deductible = json['Deductible'];
effectiveFrom = json['EffectiveFrom'];
effectiveTo = json['EffectiveTo'];
eligabilityFailureReason = json['EligabilityFailureReason'];
isMemberEligible = json['IsMemberEligible'];
memberID = json['MemberID'];
memberName = json['MemberName'];
memberStatus = json['MemberStatus'];
message = json['Message'];
nationalId = json['NationalId'];
policyNumber = json['PolicyNumber'];
responseMessage = json['ResponseMessage'];
room = json['Room'];
subCategory = json['SubCategory'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ApprovalLimit'] = this.approvalLimit;
data['CompanyGroupID'] = this.companyGroupID;
data['CompanyName'] = this.companyName;
data['CompanyRemarks'] = this.companyRemarks;
data['DOB'] = this.dOB;
data['Deductible'] = this.deductible;
data['EffectiveFrom'] = this.effectiveFrom;
data['EffectiveTo'] = this.effectiveTo;
data['EligabilityFailureReason'] = this.eligabilityFailureReason;
data['IsMemberEligible'] = this.isMemberEligible;
data['MemberID'] = this.memberID;
data['MemberName'] = this.memberName;
data['MemberStatus'] = this.memberStatus;
data['Message'] = this.message;
data['NationalId'] = this.nationalId;
data['PolicyNumber'] = this.policyNumber;
data['ResponseMessage'] = this.responseMessage;
data['Room'] = this.room;
data['SubCategory'] = this.subCategory;
return data;
}
}

@ -132,7 +132,14 @@ class BaseAppClient {
} else if (parsed['MessageStatus'] == 1 || } else if (parsed['MessageStatus'] == 1 ||
parsed['SMSLoginRequired'] == true) { parsed['SMSLoginRequired'] == true) {
onSuccess(parsed, statusCode); onSuccess(parsed, statusCode);
} else if (!parsed['IsAuthenticated']) { }
else if(parsed['MessageStatus'] == 2){
onFailure(
parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
statusCode);
}
else if (!parsed['IsAuthenticated']) {
await logout(); await logout();
//helpers.showErrorToast('Your session expired Please login agian'); //helpers.showErrorToast('Your session expired Please login agian');
@ -151,7 +158,7 @@ class BaseAppClient {
onFailure('Please Check The Internet Connection', -1); onFailure('Please Check The Internet Connection', -1);
} }
} catch (e) { } catch (e) {
//print(e); print(e);
// //
if (e is String) { if (e is String) {
onFailure(e.toString(), -1); onFailure(e.toString(), -1);
@ -166,7 +173,7 @@ class BaseAppClient {
await authenticatedUserObject.getUser(); await authenticatedUserObject.getUser();
Provider.of<ProjectViewModel>(AppGlobal.context, listen: false).isLogin = Provider.of<ProjectViewModel>(AppGlobal.context, listen: false).isLogin =
false; false;
var model = Provider.of<ToDoCountProviderModel>(AppGlobal.context); var model = Provider.of<ToDoCountProviderModel>(AppGlobal.context,listen: false);
_vitalSignService.weightKg = ""; _vitalSignService.weightKg = "";
_vitalSignService.heightCm = ""; _vitalSignService.heightCm = "";
model.setState(0, false); model.setState(0, false);

@ -1,8 +1,9 @@
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/insurance/Insurance_card_details.dart';
import 'package:diplomaticquarterapp/core/model/insurance/insurance_approval.dart'; import 'package:diplomaticquarterapp/core/model/insurance/insurance_approval.dart';
import 'package:diplomaticquarterapp/core/model/insurance/insurance_card.dart'; import 'package:diplomaticquarterapp/core/model/insurance/insurance_card.dart';
import 'package:diplomaticquarterapp/core/model/insurance/insurance_card_update.dart'; import 'package:diplomaticquarterapp/core/model/insurance/insurance_card_update_model.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordsByStatusReq.dart'; import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordsByStatusReq.dart';
@ -20,6 +21,8 @@ class InsuranceCardService extends BaseService {
List<InsuranceApprovalModel> get insuranceApproval => _insuranceApproval; List<InsuranceApprovalModel> get insuranceApproval => _insuranceApproval;
InsuranceCardDetailsModel insuranceCardDetails;
GetAllSharedRecordsByStatusResponse getAllSharedRecordsByStatusResponse = GetAllSharedRecordsByStatusResponse getAllSharedRecordsByStatusResponse =
GetAllSharedRecordsByStatusResponse(); GetAllSharedRecordsByStatusResponse();
@ -136,4 +139,39 @@ class InsuranceCardService extends BaseService {
}, body:{'CompanyID': data.companyID,'SubCategoryID':data.subCategoryID },); }, body:{'CompanyID': data.companyID,'SubCategoryID':data.subCategoryID },);
return Future.value(localRes); return Future.value(localRes);
} }
Future getPatientInsuranceDetails({String setupID, int projectID, String patientIdentificationID,int patientID}) async{
error = "";
insuranceCardDetails = null;
await baseAppClient.post(GET_PATIENT_INSURANCE_DETAILS,
onSuccess: (dynamic response, int statusCode) {
insuranceCardDetails = null;
response['List_PatientInsuranceDetails'].forEach((item) {
insuranceCardDetails = InsuranceCardDetailsModel.fromJson(item);
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body:{'SetupID': setupID,'ProjectID':projectID,'PatientIdentificationID':patientIdentificationID ,'isDentalAllowedBackend':false,'PatientID':patientID},);
}
Future uploadInsuranceCard({ String patientIdentificationID,int patientID,String image=""}) async{
error = "";
Map<String,dynamic> body = Map();
body['PatientID']=patientID;
body['PatientType']=user.patientType;
body['MobileNo']=user.mobileNumber;
body['PatientIdentificationID']=patientIdentificationID;
body['InsuranceCardImage']= image;
await baseAppClient.post(UPLOAD_INSURANCE_CARD,
onSuccess: (dynamic response, int statusCode) {
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body:body,);
}
} }

@ -25,6 +25,10 @@ class MyBalanceService extends BaseService {
AuthenticatedUserObject authenticatedUserObject = AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>(); locator<AuthenticatedUserObject>();
MyBalanceService(){
getFamilyFiles();
}
getPatientAdvanceBalanceAmount() async { getPatientAdvanceBalanceAmount() async {
hasError = false; hasError = false;
super.error = ""; super.error = "";

@ -77,7 +77,7 @@ class PharmacyService extends BaseService {
hasError = false; hasError = false;
await _getCurrentLocation(); await _getCurrentLocation();
Map<String,dynamic> body = Map(); Map<String,dynamic> body = Map();
body['PHR_itemName'] = drugName; body['PHR_itemName'] = drugName.trim();
body['isLoginForDoctorApp'] = true; body['isLoginForDoctorApp'] = true;
body['isDentalAllowedBackend'] = true; body['isDentalAllowedBackend'] = true;
body['PageSize'] = 25; body['PageSize'] = 25;

@ -29,6 +29,11 @@ class BaseViewModel extends ChangeNotifier {
if (hasListeners) notifyListeners(); if (hasListeners) notifyListeners();
} }
setUser(AuthenticatedUser user){
this.user = user;
notifyListeners();
}
BaseViewModel() { BaseViewModel() {
//authenticatedUserObject.getUser(); //authenticatedUserObject.getUser();
user = authenticatedUserObject.user; user = authenticatedUserObject.user;

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; 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';
@ -10,12 +11,12 @@ 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 bloadType = ""; String booldType="";
// ToDoCountProviderModel toDoProvider = // ToDoCountProviderModel toDoProvider =
// Provider.of<ToDoCountProviderModel>(AppGlobal.context); // Provider.of<ToDoCountProviderModel>(AppGlobal.context);
getPatientRadOrders() async { getPatientRadOrders() async {
booldType = await sharedPref.getString(BLOOD_TYPE);
if (isLogin && _vitalSignService.weightKg.isEmpty) { if (isLogin && _vitalSignService.weightKg.isEmpty) {
setState(ViewState.Busy); setState(ViewState.Busy);
await _vitalSignService.getPatientRadOrders(); await _vitalSignService.getPatientRadOrders();

@ -1,7 +1,7 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/insurance/insurance_approval.dart'; import 'package:diplomaticquarterapp/core/model/insurance/insurance_approval.dart';
import 'package:diplomaticquarterapp/core/model/insurance/insurance_card.dart'; import 'package:diplomaticquarterapp/core/model/insurance/insurance_card.dart';
import 'package:diplomaticquarterapp/core/model/insurance/insurance_card_update.dart'; import 'package:diplomaticquarterapp/core/model/insurance/insurance_card_update_model.dart';
import 'package:diplomaticquarterapp/core/service/insurance_service.dart'; import 'package:diplomaticquarterapp/core/service/insurance_service.dart';
import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
@ -72,5 +72,14 @@ class InsuranceViewModel extends BaseViewModel {
} else } else
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future uploadInsuranceCard({String patientIdentificationID, int patientID,String image =""}) async {
setState(ViewState.BusyLocal);
await _insuranceCardService.uploadInsuranceCard(patientIdentificationID: patientIdentificationID,patientID: patientID,image: image);
if (_insuranceCardService.hasError) {
error = _insuranceCardService.error;
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
} }

@ -152,7 +152,7 @@ class MyBalanceViewModel extends BaseViewModel {
Future getFamilyFiles() async { Future getFamilyFiles() async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _myBalanceService.getSharedRecordByStatus(); await _myBalanceService.getFamilyFiles();
if (_myBalanceService.hasError) { if (_myBalanceService.hasError) {
error = _myBalanceService.error; error = _myBalanceService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);

@ -15,7 +15,7 @@ import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import '../dialogs/select_city_dialog.dart'; import '../dialogs/select_city_dialog.dart';
import 'dart:io';
class NewEReferralStepThreePage extends StatefulWidget { class NewEReferralStepThreePage extends StatefulWidget {
final CreateEReferralRequestModel createEReferralRequestModel; final CreateEReferralRequestModel createEReferralRequestModel;
final Function changePageViewIndex; final Function changePageViewIndex;
@ -101,12 +101,17 @@ class _NewEReferralStepThreePageState extends State<NewEReferralStepThreePage> {
InkWell( InkWell(
onTap: () { onTap: () {
ImageOptions.showImageOptions(context, ImageOptions.showImageOptions(context,
(String image) { (String image,File file) {
setState(() { setState(() {
EReferralAttachment eReferralAttachment = new EReferralAttachment(fileName: 'image ${ medicalReportImages.length +1}.png',base64String: image ); EReferralAttachment eReferralAttachment =
medicalReportImages.add(eReferralAttachment); new EReferralAttachment(
fileName:
'image ${medicalReportImages.length + 1}.png',
base64String: image);
medicalReportImages
.add(eReferralAttachment);
}); });
}); }, );
}, },
child: Container( child: Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
@ -158,15 +163,17 @@ class _NewEReferralStepThreePageState extends State<NewEReferralStepThreePage> {
width: 8, width: 8,
), ),
Texts( Texts(
medicalReportImages[index].fileName, medicalReportImages[index]
.fileName,
), ),
], ],
), ),
InkWell( InkWell(
onTap: () { onTap: () {
setState(() { setState(() {
medicalReportImages medicalReportImages.remove(
.remove(medicalReportImages[index]); medicalReportImages[
index]);
}); });
}, },
child: Icon( child: Icon(
@ -262,12 +269,12 @@ class _NewEReferralStepThreePageState extends State<NewEReferralStepThreePage> {
], ],
), ),
), ),
if(isPatientInsured) if (isPatientInsured)
SizedBox( SizedBox(
height: 12, height: 12,
), ),
Opacity( Opacity(
opacity: isPatientInsured?1:0, opacity: isPatientInsured ? 1 : 0,
child: Container( child: Container(
padding: EdgeInsets.only(top: 10), padding: EdgeInsets.only(top: 10),
decoration: BoxDecoration( decoration: BoxDecoration(
@ -276,16 +283,21 @@ class _NewEReferralStepThreePageState extends State<NewEReferralStepThreePage> {
), ),
child: Column( child: Column(
children: [ children: [
InkWell( InkWell(
onTap: () { onTap: () {
ImageOptions.showImageOptions(context, ImageOptions.showImageOptions(context,
(String image) { (String image,File file) {
setState(() { setState(() {
EReferralAttachment
eReferralAttachment =
new EReferralAttachment(
fileName:
'image ${medicalReportImages.length + 1}.png',
base64String: image);
EReferralAttachment eReferralAttachment = new EReferralAttachment(fileName: 'image ${ medicalReportImages.length +1}.png',base64String: image ); insuredPatientImages = [
eReferralAttachment
insuredPatientImages=[eReferralAttachment]; ];
}); });
}); });
}, },
@ -333,8 +345,8 @@ class _NewEReferralStepThreePageState extends State<NewEReferralStepThreePage> {
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Icon( Icon(FontAwesomeIcons
FontAwesomeIcons.paperclip), .paperclip),
SizedBox( SizedBox(
width: 8, width: 8,
), ),
@ -346,8 +358,9 @@ class _NewEReferralStepThreePageState extends State<NewEReferralStepThreePage> {
InkWell( InkWell(
onTap: () { onTap: () {
setState(() { setState(() {
insuredPatientImages insuredPatientImages.remove(
.remove(insuredPatientImages[index]); insuredPatientImages[
index]);
}); });
}, },
child: Icon( child: Icon(
@ -378,25 +391,37 @@ class _NewEReferralStepThreePageState extends State<NewEReferralStepThreePage> {
textColor: Colors.white, textColor: Colors.white,
label: "Submit", label: "Submit",
onTap: () async { onTap: () async {
this.widget.createEReferralRequestModel.medicalReportAttachment = medicalReportImages; this
this.widget.createEReferralRequestModel.insuranceCardAttachment = insuredPatientImages.length !=0?insuredPatientImages[0]:null; .widget
this.widget.createEReferralRequestModel.isInsuredPatient = isPatientInsured; .createEReferralRequestModel
.medicalReportAttachment = medicalReportImages;
this
.widget
.createEReferralRequestModel
.insuranceCardAttachment =
insuredPatientImages.length != 0
? insuredPatientImages[0]
: null;
this.widget.createEReferralRequestModel.isInsuredPatient =
isPatientInsured;
// ToDo make the preferred Branch info dynamic // ToDo make the preferred Branch info dynamic
this.widget.createEReferralRequestModel.preferredBranchCode = 15; this.widget.createEReferralRequestModel.preferredBranchCode =
this.widget.createEReferralRequestModel. preferredBranchName= "Arryan Hospital"; 15;
this.widget.createEReferralRequestModel.preferredBranchName =
"Arryan Hospital";
// this.widget.createEReferralRequestModel.fullName= ""; // this.widget.createEReferralRequestModel.fullName= "";
this.widget.createEReferralRequestModel.otherRelationship= ""; this.widget.createEReferralRequestModel.otherRelationship =
"";
// this.widget.createEReferralRequestModel.; // this.widget.createEReferralRequestModel.;
// this.widget.createEReferralRequestModel. preferredBranchName= "Arryan Hospital"; // this.widget.createEReferralRequestModel. preferredBranchName= "Arryan Hospital";
// this.widget.createEReferralRequestModel. preferredBranchName= "Arryan Hospital"; // this.widget.createEReferralRequestModel. preferredBranchName= "Arryan Hospital";
await model.createEReferral(this.widget.createEReferralRequestModel); await model
.createEReferral(this.widget.createEReferralRequestModel);
}, },
loading: model.state == ViewState.BusyLocal, loading: model.state == ViewState.BusyLocal,
disabled: medicalReportImages.length == 0 , disabled: medicalReportImages.length == 0,
), ),
))); )));
} }
@ -416,12 +441,10 @@ class _NewEReferralStepThreePageState extends State<NewEReferralStepThreePage> {
); );
} }
String getRelationName() { String getRelationName() {
if (_selectedCity != null) if (_selectedCity != null)
return _selectedCity.description; return _selectedCity.description;
else else
return "Select Relationship" /*TranslationBase.of(context).selectHospital*/; return "Select Relationship" /*TranslationBase.of(context).selectHospital*/;
} }
} }

@ -720,6 +720,9 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
this.sharedPref.setObject(FAMILY_FILE, familyFile); this.sharedPref.setObject(FAMILY_FILE, familyFile);
this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID); this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID);
this.sharedPref.setString(TOKEN, result.authenticationTokenID); this.sharedPref.setString(TOKEN, result.authenticationTokenID);
await authenticatedUserObject.getUser(getUser: true);
Provider.of<ProjectViewModel>(context, listen: false).setUser( authenticatedUserObject.user);
//this.checkIfUserAgreedBefore(result), //this.checkIfUserAgreedBefore(result),
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
HOME, HOME,

@ -15,7 +15,8 @@ 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:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'dart:convert';
import 'dart:io';
import 'appointment_history.dart'; import 'appointment_history.dart';
class SendFeedbackPage extends StatefulWidget { class SendFeedbackPage extends StatefulWidget {
@ -343,11 +344,11 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
), ),
InkWell( InkWell(
onTap: () { onTap: () {
ImageOptions.showImageOptions(context, (String image) { ImageOptions.showImageOptions(context, (String image,File file) {
setState(() { setState(() {
images.add(image); images.add(image);
}); });
}); } );
}, },
child: Container( child: Container(
margin: EdgeInsets.only(left: 10, right: 10, top: 15), margin: EdgeInsets.only(left: 10, right: 10, top: 15),

@ -0,0 +1,147 @@
import 'dart:io';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/bottom_options/BottomSheet.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class AttachInsuranceCardImageDialog extends StatefulWidget {
final String name;
final String fileNo;
final Function(File file, String image) image;
const AttachInsuranceCardImageDialog(
{Key key, this.name, this.fileNo, this.image})
: super(key: key);
@override
_AttachInsuranceCardImageDialogState createState() =>
_AttachInsuranceCardImageDialogState();
}
class _AttachInsuranceCardImageDialogState
extends State<AttachInsuranceCardImageDialog> {
@override
void initState() {
super.initState();
}
String image;
File file;
@override
Widget build(BuildContext context) {
return SimpleDialog(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Texts(TranslationBase.of(context).attachInsuraceImage),
Divider(),
Texts(widget.name),
SizedBox(
height: 3,
),
Texts(TranslationBase.of(context).fileNo + " " + widget.fileNo),
SizedBox(
height: 5.0,
),
InkWell(
onTap: () {
ImageOptions.showImageOptions(context, (String image,File file) {
setState(() {
this.image = image;
this.file = file;
});
});
},
child: image == null
? Padding(
padding: const EdgeInsets.all(18.0),
child: Container(
width: double.maxFinite,
height: 250,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(2),
border: Border.all(color: Colors.grey, width: 1.5)),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
// mainAxisAlignment: MainAxisAlignment.,
children: [
SizedBox(height: 25,),
Icon(
Icons.camera_enhance_rounded,
size: 85,
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(Icons.attach_file),
Texts(TranslationBase.of(context).selectAttachment.toUpperCase())
],
),
],
),
),
)
: Image.file(
file,
fit: BoxFit.fill,
height: 250,
),
),
SizedBox(
height: 25.0,
),
Divider(),
Row(
children: <Widget>[
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.pop(context);
},
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
child: Center(
child: Texts(
TranslationBase.of(context).cancel.toUpperCase(),
color: Colors.red,
),
),
),
),
),
),
Container(
width: 1,
height: 30,
color: Colors.grey[500],
),
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.pop(context);
widget.image(file, image);
},
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Center(
child: Texts(
TranslationBase.of(context).ok,
fontWeight: FontWeight.w400,
)),
),
),
),
],
)
],
)
],
);
}
}

@ -0,0 +1,235 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/insurance/Insurance_card_details.dart';
import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'AttachInsuranceCardImageDialog.dart';
class InsuranceCardUpdateDetails extends StatelessWidget {
final InsuranceCardDetailsModel insuranceCardDetailsModel;
final String patientIdentificationID;
final int patientID;
final String name;
const InsuranceCardUpdateDetails({Key key,
this.insuranceCardDetailsModel,
this.patientIdentificationID,
this.patientID, this.name})
: super(key: key);
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<InsuranceViewModel>(
builder: (context, model, w) =>
AppScaffold(
isShowAppBar: true,
isShowDecPage: false,
appBarTitle: TranslationBase
.of(context)
.cardDetail,
body: SingleChildScrollView(
child: Column(
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
width: double.maxFinite,
margin: EdgeInsets.only(left: 8, right: 8, top: 8),
height:projectViewModel.isArabic?350: 270,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(25),
color: Color(0xff515B5D),
),
child: Padding(
padding: const EdgeInsets.all(12.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
insuranceCardDetailsModel.memberID,
textScaleFactor: 2.1,
style: TextStyle(color: Colors.white,
letterSpacing: 8.0,
fontWeight: FontWeight.w400,
fontSize: 17),
),
SizedBox(
height: 5,
),
Texts(
insuranceCardDetailsModel.companyName,
color: Colors.white,
),
SizedBox(
height: 25,
),
Row(
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment
.start,
children: [
Texts(TranslationBase
.of(context)
.policyHolder, color: Colors.white),
Texts(
insuranceCardDetailsModel.memberName,
color: Colors.white),
],
),
),
Expanded(
child: Column(
children: [
Texts(TranslationBase
.of(context)
.policyNo, color: Colors.white),
Texts(insuranceCardDetailsModel
.policyNumber, color: Colors.white),
],
),
),
],
),
SizedBox(
height: 25,
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment
.start,
children: [
Texts(
TranslationBase
.of(context)
.expiryDateTitle,
color: Colors.white),
Texts(insuranceCardDetailsModel.dOB,
color: Colors.white),
],
),
),
Expanded(
child: Column(
children: [
Texts(TranslationBase
.of(context)
.classTitle, color: Colors.white),
Texts(
insuranceCardDetailsModel.subCategory,
color: Colors.white),
],
),
),
Expanded(
child: Column(
children: [
Texts(TranslationBase
.of(context)
.approval, color: Colors.white),
Texts(insuranceCardDetailsModel
.approvalLimit
.toString(), color: Colors.white),
],
),
),
],
)
],
),
),
),
)
],
),
),
bottomSheet: Container(
width: double.infinity,
height: MediaQuery
.of(context)
.size
.height * 0.21,
child: Container(
margin: EdgeInsets.only(left: 8, right: 8),
child: Column(
children: [
SizedBox(height: 8,),
SecondaryButton(
textColor: Colors.white,
label: TranslationBase
.of(context)
.agree
.toUpperCase(),
color: Theme
.of(context)
.primaryColor,
onTap: () async {
GifLoaderDialogUtils.showMyDialog(context);
await model.uploadInsuranceCard(patientIdentificationID: patientIdentificationID,patientID: patientID);
GifLoaderDialogUtils.hideDialog(context);
if (model.state == ViewState.ErrorLocal ) {
AppToast.showErrorToast(message: model.error);
} else {
AppToast.showSuccessToast(message: TranslationBase.of(context).requestSent);
}
},
),
SizedBox(height: 12,),
SecondaryButton(
textColor: Colors.white,
label: TranslationBase
.of(context)
.disagree
.toUpperCase(),
color: Colors.grey[800],
onTap: () async {
confirmSelectFamilyDialog(context: context, name: name, fileNo: patientID.toString(),model: model);
},
)
],
),
),
),
),
);
}
void confirmSelectFamilyDialog({BuildContext context, String name, String fileNo,InsuranceViewModel model}) {
showDialog(
context: context,
child: AttachInsuranceCardImageDialog(
fileNo: fileNo,
name: name,
image: (file, image) async{
GifLoaderDialogUtils.showMyDialog(context);
await model.uploadInsuranceCard(patientIdentificationID: patientIdentificationID,patientID: patientID,image: image);
GifLoaderDialogUtils.hideDialog(context);
if (model.state == ViewState.ErrorLocal ||
model.state == ViewState.Error) {
AppToast.showErrorToast(message: model.error);
} else {
AppToast.showSuccessToast(message: TranslationBase.of(context).requestSent);
}
Navigator.pop(context);
},
),
);
}
}

@ -1,8 +1,10 @@
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';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -12,6 +14,8 @@ 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 'insurance_card_update_details.dart';
class InsuranceUpdate extends StatefulWidget { class InsuranceUpdate extends StatefulWidget {
@override @override
_InsuranceUpdateState createState() => _InsuranceUpdateState(); _InsuranceUpdateState createState() => _InsuranceUpdateState();
@ -33,7 +37,6 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
_tabController.dispose(); _tabController.dispose();
} }
//TODO implement update card
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<InsuranceViewModel>( return BaseView<InsuranceViewModel>(
onModelReady: (model) => model.getInsuranceUpdated(), onModelReady: (model) => model.getInsuranceUpdated(),
@ -41,6 +44,7 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
AppScaffold( AppScaffold(
appBarTitle: TranslationBase.of(context).insurCards, appBarTitle: TranslationBase.of(context).insurCards,
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: true,
baseViewModel: model, baseViewModel: model,
body: Scaffold( body: Scaffold(
extendBodyBehindAppBar: true, extendBodyBehindAppBar: true,
@ -102,12 +106,19 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
controller: _tabController, controller: _tabController,
children: <Widget>[ children: <Widget>[
Container( Container(
child: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.isNotEmpty?? false child: model.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList!=null ??
false
? ListView.builder( ? ListView.builder(
itemCount: model.getAllSharedRecordsByStatusResponse itemCount: model.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList.length, .getAllSharedRecordsByStatusList.length,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
return model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList[index].status == 3 return model
.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList[
index]
.status ==
3
? Container( ? Container(
margin: EdgeInsets.all(10.0), margin: EdgeInsets.all(10.0),
child: Card( child: Card(
@ -173,7 +184,6 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
), ),
), ),
), ),
if (false)
Expanded( Expanded(
flex: 2, flex: 2,
child: Container( child: Container(
@ -191,7 +201,12 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
Colors.white, Colors.white,
onTap: () { onTap: () {
getDetails( getDetails(
model); projectID: 15,
patientIdentificationID: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList[index].patientIdenficationNumber,
setupID: '010266',
patientID: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList[index].responseID,
name: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList[index].patientName
);
}, },
), ),
), ),
@ -207,89 +222,92 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
: Container(); : Container();
}) })
: Container( : Container(
height: 80, height: 80,
margin: EdgeInsets.all(10.0), margin: EdgeInsets.all(10.0),
child: Column( child: Column(
children: [ children: [
SizedBox(height: 65,), SizedBox(
Container( height: 65,
color: Colors.white, ),
width: MediaQuery.of(context).size.width, Container(
padding: EdgeInsets.all(10.0), color: Colors.white,
child: Row( width: MediaQuery.of(context).size.width,
crossAxisAlignment: padding: EdgeInsets.all(10.0),
CrossAxisAlignment.start, child: Row(
mainAxisSize: MainAxisSize.max, crossAxisAlignment:
children: <Widget>[ CrossAxisAlignment.start,
Expanded( mainAxisSize: MainAxisSize.max,
flex: 3, children: <Widget>[
child: Container( if(model.user!=null)
margin: EdgeInsets.only( Expanded(
top: 2.0, flex: 3,
left: 10.0, child: Container(
right: 20.0), margin: EdgeInsets.only(
child: Column( top: 2.0,
crossAxisAlignment: left: 10.0,
CrossAxisAlignment right: 20.0),
.start, child: Column(
children: <Widget>[ crossAxisAlignment:
Texts( CrossAxisAlignment.start,
model.user.firstName+" "+model.user.lastName, children: <Widget>[
fontSize: 14, Texts(
color: Colors.black, model.user.firstName??'' + " " + model.user.lastName??'',
fontWeight: fontSize: 14,
FontWeight.w500, color: Colors.black,
fontWeight: FontWeight.w500,
),
SizedBox(
height: 8,
),
Texts(
TranslationBase.of(context)
.fileno +
": " +
model.user.patientID
.toString(),
fontSize: 14,
color: Colors.black,
fontWeight: FontWeight.w500,
)
],
),
), ),
SizedBox( ),
height: 8, Expanded(
flex: 2,
child: Container(
margin: EdgeInsets.only(top: 2.0),
child: Column(
children: <Widget>[
Container(
child: SecondaryButton(
label: TranslationBase.of(
context)
.fetchData,
small: true,
textColor: Colors.white,
onTap: () {
getDetails(
setupID: '010266',
projectID: 15,
patientIdentificationID: model.user.patientIdentificationNo,
patientID: model.user.patientID,
name: model.user.firstName + " " + model.user.lastName
);
},
),
),
],
),
), ),
Texts( )
TranslationBase.of( ],
context)
.fileno +
": " +
model.user.patientID.toString(),
fontSize: 14,
color: Colors.black,
fontWeight:
FontWeight.w500,
)
],
),
), ),
), ),
if (false)
Expanded(
flex: 2,
child: Container(
margin:
EdgeInsets.only(top: 2.0),
child: Column(
children: <Widget>[
Container(
child: SecondaryButton(
label: TranslationBase
.of(context)
.fetchData,
small: true,
textColor:
Colors.white,
onTap: () {
getDetails(
model);
},
),
),
],
),
),
)
], ],
), ),
), ),
],
),
),
), ),
Container( Container(
child: ListView.builder( child: ListView.builder(
@ -407,12 +425,22 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
); );
} }
getDetails(data) { getDetails({String setupID, int projectID, String patientIdentificationID,int patientID,String name}) {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
_insuranceCardService.getInsuranceDetails(data).then((value) => { _insuranceCardService
GifLoaderDialogUtils.hideDialog(context), .getPatientInsuranceDetails(
Navigator.push(context, setupID: setupID,
FadePage(page: InsuranceCardDetails(data: value[0]['CheckList']))) projectID: projectID,
}); patientID: patientID,
patientIdentificationID: patientIdentificationID)
.then((value) {
GifLoaderDialogUtils.hideDialog(context);
if (_insuranceCardService.insuranceCardDetails != null) {
Navigator.push(context,
FadePage(page: InsuranceCardUpdateDetails(insuranceCardDetailsModel: _insuranceCardService.insuranceCardDetails,patientID: patientID,patientIdentificationID: patientIdentificationID,name: name,)));
} else {
AppToast.showErrorToast(message: _insuranceCardService.error);
}
});
} }
} }

@ -208,7 +208,7 @@ class _HomePageState extends State<HomePage> {
children: <Widget>[ children: <Widget>[
Row( Row(
children: <Widget>[ children: <Widget>[
if (model.user != null && model.isLogin) if (projectViewModel.user != null && model.isLogin)
Expanded( Expanded(
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment:
@ -218,15 +218,15 @@ class _HomePageState extends State<HomePage> {
height: 8, height: 8,
), ),
Texts( Texts(
model.user.firstName + projectViewModel.user.firstName +
" " + " " +
model.user.lastName, projectViewModel.user.lastName,
color: Colors.grey[100], color: Colors.grey[100],
bold: true, bold: true,
fontSize: 15, fontSize: 15,
), ),
Texts( Texts(
'${model.user.patientID}', '${projectViewModel.user.patientID}',
color: Colors.white, color: Colors.white,
fontSize: 14, fontSize: 14,
), ),
@ -234,7 +234,7 @@ class _HomePageState extends State<HomePage> {
height: 5, height: 5,
), ),
Texts( Texts(
'${DateUtil.getMonthDayYearDateFormatted(model.user.dateofBirthDataTime)} ,${model.user.genderDescription} ${model.user.ageDesc}', '${DateUtil.getMonthDayYearDateFormatted(projectViewModel.user.dateofBirthDataTime)} ,${projectViewModel.user.genderDescription} ${projectViewModel.user.ageDesc}',
color: Colors.grey[100], color: Colors.grey[100],
fontWeight: fontWeight:
FontWeight.normal, FontWeight.normal,
@ -358,7 +358,7 @@ class _HomePageState extends State<HomePage> {
Column( Column(
children: [ children: [
Texts( Texts(
'${model.bloadType}', '${model.booldType}',
color: Colors.white, color: Colors.white,
), ),
Texts( Texts(
@ -410,7 +410,7 @@ class _HomePageState extends State<HomePage> {
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(12) borderRadius: BorderRadius.circular(12)
), ),
child: Center(child: Image.asset('assets/images/vital_sign_icon.png', child: Center(child: Image.asset('assets/images/medical/vital_sign_icon.png',
width: 80, width: 80,
height: 50, height: 50,
fit: BoxFit.contain,)), fit: BoxFit.contain,)),

@ -175,7 +175,7 @@ class _ConfirmSMSDialogState extends State<ConfirmSMSDialog> {
fontSize: SizeConfig.textMultiplier * 3, fontSize: SizeConfig.textMultiplier * 3,
), ),
focusNode: focusD1, focusNode: focusD1,
maxLength: 1, //maxLength: 1,
controller: digit1, controller: digit1,
textAlign: TextAlign.center, textAlign: TextAlign.center,
keyboardType: TextInputType.number, keyboardType: TextInputType.number,
@ -200,7 +200,7 @@ class _ConfirmSMSDialogState extends State<ConfirmSMSDialog> {
focusNode: focusD2, focusNode: focusD2,
controller: digit2, controller: digit2,
textInputAction: TextInputAction.next, textInputAction: TextInputAction.next,
maxLength: 1, //maxLength: 1,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontSize: SizeConfig.textMultiplier * 3, fontSize: SizeConfig.textMultiplier * 3,
@ -227,7 +227,7 @@ class _ConfirmSMSDialogState extends State<ConfirmSMSDialog> {
focusNode: focusD3, focusNode: focusD3,
controller: digit3, controller: digit3,
textInputAction: TextInputAction.next, textInputAction: TextInputAction.next,
maxLength: 1, //maxLength: 1,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontSize: SizeConfig.textMultiplier * 3, fontSize: SizeConfig.textMultiplier * 3,
@ -253,7 +253,7 @@ class _ConfirmSMSDialogState extends State<ConfirmSMSDialog> {
child: TextFormField( child: TextFormField(
focusNode: focusD4, focusNode: focusD4,
controller: digit4, controller: digit4,
maxLength: 1, // maxLength: 1,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontSize: SizeConfig.textMultiplier * 3, fontSize: SizeConfig.textMultiplier * 3,

@ -11,6 +11,7 @@ import 'package:diplomaticquarterapp/pages/medical/patient_sick_leave_page.dart'
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart'; import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_home_page.dart'; import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/reports/report_home_page.dart'; import 'package:diplomaticquarterapp/pages/medical/reports/report_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart'; import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart';
@ -351,8 +352,8 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
FadePage(page: InsuranceUpdate())); FadePage(page: InsuranceUpdate()));
}, },
child: MedicalProfileItem( child: MedicalProfileItem(
title: title: TranslationBase.of(context)
TranslationBase.of(context).updateInsurance, .updateInsurance,
imagePath: 'insurance_card_icon.png', imagePath: 'insurance_card_icon.png',
subTitle: TranslationBase.of(context) subTitle: TranslationBase.of(context)
.updateInsuranceSubtitle, .updateInsuranceSubtitle,
@ -360,7 +361,20 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
), ),
), ),
Expanded( Expanded(
child: Container(), flex: 1,
child: InkWell(
onTap: () {
Navigator.push(context,
FadePage(page: VitalSignDetailsScreen()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context)
.vitalSigns,
imagePath: 'vital_sign_icon.png',
subTitle: TranslationBase.of(context)
.vitalSignsSubtitle,
),
),
), ),
]), ]),
SizedBox( SizedBox(

@ -138,6 +138,7 @@ class _HomeReportPageState extends State<HomeReportPage>
), ),
body: Column( body: Column(
children: <Widget>[ children: <Widget>[
if(model.user!=null)
Expanded( Expanded(
child: TabBarView( child: TabBarView(
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),

@ -1,4 +1,6 @@
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart'; import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:fl_chart/fl_chart.dart'; import 'package:fl_chart/fl_chart.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -8,7 +10,8 @@ class LineChartCurvedBloodPressure extends StatelessWidget {
final List<TimeSeriesSales2> timeSeries2; final List<TimeSeriesSales2> timeSeries2;
final int indexes; final int indexes;
LineChartCurvedBloodPressure({this.title, this.timeSeries1, this.indexes, this.timeSeries2}); LineChartCurvedBloodPressure(
{this.title, this.timeSeries1, this.indexes, this.timeSeries2});
List<int> xAxixs = List(); List<int> xAxixs = List();
List<double> yAxixs = List(); List<double> yAxixs = List();
@ -34,25 +37,58 @@ class LineChartCurvedBloodPressure extends StatelessWidget {
Text( Text(
title, title,
style: TextStyle( style: TextStyle(
color: Colors.black, color: Colors.black, fontSize: 15, letterSpacing: 2),
fontSize: 15,
letterSpacing: 2),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
SizedBox(
SizedBox(height: 10,), height: 10,
),
Expanded( Expanded(
child: Padding( child: Padding(
padding: const EdgeInsets.only(right: 18.0, left: 16.0,top: 15), padding:
const EdgeInsets.only(right: 18.0, left: 16.0, top: 15),
child: LineChart( child: LineChart(
sampleData1(context), sampleData1(context),
swapAnimationDuration: const Duration(milliseconds: 250), swapAnimationDuration: const Duration(milliseconds: 250),
), ),
), ),
), ),
const SizedBox( SizedBox(
height: 10, height: 10,
), ),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Row(
children: [
Container(
width: 20,
height: 20,
decoration: BoxDecoration(
shape: BoxShape.rectangle,
color: Theme.of(context).primaryColor),
),
SizedBox(width: 5,),
Texts(TranslationBase.of(context).systolicLng)
],
),
SizedBox(width: 15,),
Row(
children: [
Container(
width: 20,
height: 20,
decoration: BoxDecoration(
shape: BoxShape.rectangle,
color: Colors.grey),
),
SizedBox(width: 5,),
Texts(TranslationBase.of(context).diastolicLng)
],
),
],
)
], ],
), ),
], ],
@ -70,13 +106,11 @@ class LineChartCurvedBloodPressure extends StatelessWidget {
} }
} }
LineChartData sampleData1(context) { LineChartData sampleData1(context) {
return LineChartData( return LineChartData(
lineTouchData: LineTouchData( lineTouchData: LineTouchData(
touchTooltipData: LineTouchTooltipData( touchTooltipData: LineTouchTooltipData(
tooltipBgColor: Colors.white, tooltipBgColor: Colors.white,
), ),
touchCallback: (LineTouchResponse touchResponse) {}, touchCallback: (LineTouchResponse touchResponse) {},
handleBuiltInTouches: true, handleBuiltInTouches: true,
@ -90,7 +124,7 @@ class LineChartCurvedBloodPressure extends StatelessWidget {
color: Colors.black, color: Colors.black,
fontSize: 10, fontSize: 10,
), ),
rotateAngle:-65, rotateAngle: -65,
//rotateAngle:-65, //rotateAngle:-65,
margin: 22, margin: 22,
getTitles: (value) { getTitles: (value) {
@ -144,7 +178,7 @@ class LineChartCurvedBloodPressure extends StatelessWidget {
), ),
minX: 0, minX: 0,
maxX: (timeSeries1.length - 1).toDouble(), maxX: (timeSeries1.length - 1).toDouble(),
maxY: getMaxY()+0.3, maxY: getMaxY() + 0.3,
minY: getMinY(), minY: getMinY(),
lineBarsData: getData(context), lineBarsData: getData(context),
); );
@ -161,7 +195,7 @@ class LineChartCurvedBloodPressure extends StatelessWidget {
if (resultValueDouble > max) max = resultValueDouble; if (resultValueDouble > max) max = resultValueDouble;
}); });
return max.roundToDouble() ; return max.roundToDouble();
} }
double getMinY() { double getMinY() {
@ -218,9 +252,6 @@ class LineChartCurvedBloodPressure extends StatelessWidget {
), ),
); );
return [ return [lineChartBarData1, lineChartBarData2];
lineChartBarData1,
lineChartBarData2
];
} }
} }

@ -196,13 +196,13 @@ class VitalSignDetailsScreen extends StatelessWidget {
FadePage( FadePage(
page: VitalSignItemDetailsScreen( page: VitalSignItemDetailsScreen(
pageKey: VitalSignDetails.BloodPressure, pageKey: VitalSignDetails.BloodPressure,
pageTitle: TranslationBase.of(context).pulse, pageTitle: TranslationBase.of(context).bloodPressure,
vitalList: mode.vitalSignResModelList, vitalList: mode.vitalSignResModelList,
), ),
), ),
), ),
child: VitalSignItem( child: VitalSignItem(
des: TranslationBase.of(context).pulse, des: TranslationBase.of(context).bloodPressure,
icon: DQIcons.blood_pressure, icon: DQIcons.blood_pressure,
lastVal: mode lastVal: mode
.vitalSignResModelList[ .vitalSignResModelList[

@ -39,7 +39,7 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
'viewKey': 'WeightKg', 'viewKey': 'WeightKg',
}, },
{ {
'name': 'Body Mass ', 'name': 'BMI ',
'nameAr': 'مؤشر كتلة الجسم', 'nameAr': 'مؤشر كتلة الجسم',
'title1': 'Date', 'title1': 'Date',
'title2': 'BodyMass', 'title2': 'BodyMass',

@ -78,8 +78,6 @@ class VitalSingChartBloodPressure extends StatelessWidget {
element.toJson()[viewKey2].toDouble(), element.toJson()[viewKey2].toDouble(),
), ),
); );
var asd="";
}, },
); );
} }

@ -190,7 +190,7 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
child: SecondaryButton( child: SecondaryButton(
onTap: () async { onTap: () async {
final form = formKey.currentState; final form = formKey.currentState;
if (form.validate()) { if (form.validate() && rating>0 ) {
form.save(); form.save();
Navigator.push( Navigator.push(
context, context,
@ -206,7 +206,7 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
} }
}, },
label: TranslationBase.of(context).next, label: TranslationBase.of(context).next,
disabled: model.state == ViewState.BusyLocal, disabled: model.state == ViewState.BusyLocal|| rating==0,
loading: model.state == ViewState.BusyLocal, loading: model.state == ViewState.BusyLocal,
textColor: Theme.of(context).backgroundColor), textColor: Theme.of(context).backgroundColor),
), ),

@ -21,6 +21,10 @@ class _Settings extends State<Settings> with TickerProviderStateMixin {
_tabController = _tabController =
new TabController(length: 2, vsync: this, initialIndex: widget.type); new TabController(length: 2, vsync: this, initialIndex: widget.type);
if(widget.type==1){
_tabController.animateTo(1);
}
super.initState(); super.initState();
} }

@ -1053,6 +1053,18 @@ class TranslationBase {
String get confirmMsgReport => localizedValues['confirm-msg-report'][locale.languageCode]; String get confirmMsgReport => localizedValues['confirm-msg-report'][locale.languageCode];
String get successSendReport => localizedValues['successSendReport'][locale.languageCode]; String get successSendReport => localizedValues['successSendReport'][locale.languageCode];
String get pulseTitle => localizedValues['pulseTitle'][locale.languageCode]; String get pulseTitle => localizedValues['pulseTitle'][locale.languageCode];
String get systolicLng => localizedValues['systolic-lng'][locale.languageCode];
String get diastolicLng => localizedValues['diastolic-lng'][locale.languageCode];
String get policyHolder => localizedValues['policy-holder'][locale.languageCode];
String get policyNo => localizedValues['policy-no'][locale.languageCode];
String get expiryDateTitle => localizedValues['expiry-date'][locale.languageCode];
String get classTitle => localizedValues['class'][locale.languageCode];
String get approval => localizedValues['approval'][locale.languageCode];
String get agree => localizedValues['agree'][locale.languageCode];
String get disagree => localizedValues['disagree'][locale.languageCode];
String get requestSent => localizedValues['request-sent'][locale.languageCode];
String get attachInsuraceImage => localizedValues['attach-insurace-image'][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -8,7 +8,7 @@ import 'package:flutter/material.dart';
import 'package:image_picker/image_picker.dart'; import 'package:image_picker/image_picker.dart';
class ImageOptions { class ImageOptions {
static showImageOptions(BuildContext context, Function(String) image) { static showImageOptions(BuildContext context, Function(String,File) image,) {
showModalBottomSheet( showModalBottomSheet(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
context: context, context: context,
@ -28,7 +28,7 @@ class ImageOptions {
final bytes = File(fileName).readAsBytesSync(); final bytes = File(fileName).readAsBytesSync();
String base64Encode = base64.encode(bytes); String base64Encode = base64.encode(bytes);
if (base64Encode != null) { if (base64Encode != null) {
image(base64Encode); image(base64Encode,_image);
} }
}, },
), ),
@ -42,7 +42,7 @@ class ImageOptions {
final bytes = File(fileName).readAsBytesSync(); final bytes = File(fileName).readAsBytesSync();
String base64Encode = base64.encode(bytes); String base64Encode = base64.encode(bytes);
if (base64Encode != null) { if (base64Encode != null) {
image(base64Encode); image(base64Encode,_image);
} }
}, },
), ),

@ -236,8 +236,8 @@ class _SecondaryButtonState extends State<SecondaryButton>
widget.label, widget.label,
style: TextStyle( style: TextStyle(
color: widget.textColor, color: widget.textColor,
fontSize: widget.small ? 12.0 : 17.0, fontSize: widget.small ? 12.0 : 15.0,
fontWeight: FontWeight.w800, // fontWeight: FontWeight.w800,
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans'), fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans'),
), ),
) )

@ -1,8 +1,10 @@
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/insert_user_activity_request_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/insert_user_activity_request_model.dart';
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart';
import 'package:diplomaticquarterapp/pages/settings/settings.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.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';
@ -89,10 +91,16 @@ class _ConfirmSendEmailDialogState extends State<ConfirmSendEmailDialog> {
height: 15.0, height: 15.0,
), ),
InkWell( InkWell(
onTap: () { onTap: ()
Navigator.of(context).pushNamed( {
SETTINGS, Navigator.pop(context);
Navigator.push(
context,
FadePage(
page: Settings(type: 1,),
),
); );
}, },
child: Container( child: Container(
width: double.maxFinite, width: double.maxFinite,

@ -579,6 +579,7 @@ class _AppDrawerState extends State<AppDrawer> {
this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID); this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID);
this.sharedPref.setString(TOKEN, result.authenticationTokenID); this.sharedPref.setString(TOKEN, result.authenticationTokenID);
await authenticatedUserObject.getUser(getUser: true); await authenticatedUserObject.getUser(getUser: true);
Provider.of<ProjectViewModel>(context, listen: false).setUser( authenticatedUserObject.user);
appointmentRateViewModel appointmentRateViewModel
.getIsLastAppointmentRatedList() .getIsLastAppointmentRatedList()
.then((value) => { .then((value) => {

Loading…
Cancel
Save