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 3edae19ad6

@ -668,7 +668,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
context,
FadePage(
page: VitalSignDetailsScreen(
appointmentNo: appoNo, projectID: projectID)));
appointmentNo: appoNo, projectID: projectID,isNotOneAppointment: false,)));
}
navigateToInsertComplaint() {

@ -0,0 +1,261 @@
import 'package:diplomaticquarterapp/core/service/insurance_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.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/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../../locator.dart';
import 'insurance_card_update_details.dart';
class InsurancePage extends StatelessWidget {
final InsuranceViewModel model;
InsuranceCardService _insuranceCardService = locator<InsuranceCardService>();
InsurancePage({Key key, this.model}) : super(key: key);
@override
Widget build(BuildContext context) {
return SingleChildScrollView(
child: Column(
children: [
SizedBox(
height: 65,
),
Container(
margin: EdgeInsets.all(10.0),
color: Colors.white,
width: MediaQuery.of(context).size.width,
padding: EdgeInsets.all(10.0),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
if (model.user != null)
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(
model.user.firstName ?? '' + " " + model.user.lastName ?? '',
fontSize: 14,
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,
)
],
),
),
),
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,context: context);
},
),
),
],
),
),
)
],
),
),
if(model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList != null ?? false)
...List.generate(model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.length, (index) =>
model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList[index].status == 3
? 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(
model
.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList[
index]
.patientName,
fontSize: 14,
color: Colors.black,
fontWeight:
FontWeight.w500,
),
SizedBox(
height: 8,
),
Texts(
TranslationBase.of(
context)
.fileno +
": " +
model
.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList[
index]
.patientID
.toString(),
fontSize: 14,
color: Colors.black,
fontWeight:
FontWeight.w500,
)
],
),
),
),
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(
projectID: 15,
patientIdentificationID: model
.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList[
index]
.patientIdenficationNumber,
setupID:
'010266',
patientID: model
.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList[
index]
.responseID,
name: model
.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList[
index].patientName,context: context);
},
),
),
],
),
),
)
],
),
),
),
)
: Container()
),
],
),
);
}
getDetails(
{String setupID,
int projectID,
String patientIdentificationID,
int patientID,
String name,BuildContext context}) {
GifLoaderDialogUtils.showMyDialog(context);
_insuranceCardService
.getPatientInsuranceDetails(
setupID: setupID,
projectID: projectID,
patientID: patientID,
patientIdentificationID: patientIdentificationID)
.then((value) {
GifLoaderDialogUtils.hideDialog(context);
if (!_insuranceCardService.hasError && _insuranceCardService.isHaveInsuranceCard) {
Navigator.push(
context,
FadePage(
page: InsuranceCardUpdateDetails(
insuranceCardDetailsModel: _insuranceCardService.insuranceCardDetailsList,
patientID: patientID,
patientIdentificationID: patientIdentificationID,
name: name,
)));
} else {
AppToast.showErrorToast(message: _insuranceCardService.error);
}
});
}
}

@ -16,6 +16,7 @@ import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.dart';
import 'insurance_card_update_details.dart';
import 'insurance_page.dart';
class InsuranceUpdate extends StatefulWidget {
@override
@ -25,7 +26,6 @@ class InsuranceUpdate extends StatefulWidget {
class _InsuranceUpdateState extends State<InsuranceUpdate>
with SingleTickerProviderStateMixin {
TabController _tabController;
InsuranceCardService _insuranceCardService = locator<InsuranceCardService>();
List<ImagesInfo> imagesInfo = List();
@override
void initState() {
@ -111,231 +111,7 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
physics: BouncingScrollPhysics(),
controller: _tabController,
children: <Widget>[
Container(
child: model.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList !=
null ??
false
? ListView.builder(
itemCount: model.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList.length,
itemBuilder: (BuildContext context, int index) {
return model
.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList[
index]
.status ==
3
? 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(
model
.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList[
index]
.patientName,
fontSize: 14,
color: Colors.black,
fontWeight:
FontWeight.w500,
),
SizedBox(
height: 8,
),
Texts(
TranslationBase.of(
context)
.fileno +
": " +
model
.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList[
index]
.patientID
.toString(),
fontSize: 14,
color: Colors.black,
fontWeight:
FontWeight.w500,
)
],
),
),
),
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(
projectID: 15,
patientIdentificationID: model
.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList[
index]
.patientIdenficationNumber,
setupID:
'010266',
patientID: model
.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList[
index]
.responseID,
name: model
.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList[
index]
.patientName);
},
),
),
],
),
),
)
],
),
),
),
)
: Container();
})
: Container(
height: 80,
margin: EdgeInsets.all(10.0),
child: Column(
children: [
SizedBox(
height: 65,
),
Container(
color: Colors.white,
width: MediaQuery.of(context).size.width,
padding: EdgeInsets.all(10.0),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
if (model.user != null)
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(
model.user.firstName ??
'' +
" " +
model.user.lastName ??
'',
fontSize: 14,
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,
)
],
),
),
),
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);
},
),
),
],
),
),
)
],
),
),
],
),
),
),
InsurancePage(model:model),
Container(
child: ListView.builder(
itemCount: model.insuranceUpdate == null
@ -452,34 +228,5 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
);
}
getDetails(
{String setupID,
int projectID,
String patientIdentificationID,
int patientID,
String name}) {
GifLoaderDialogUtils.showMyDialog(context);
_insuranceCardService
.getPatientInsuranceDetails(
setupID: setupID,
projectID: projectID,
patientID: patientID,
patientIdentificationID: patientIdentificationID)
.then((value) {
GifLoaderDialogUtils.hideDialog(context);
if (!_insuranceCardService.hasError && _insuranceCardService.isHaveInsuranceCard) {
Navigator.push(
context,
FadePage(
page: InsuranceCardUpdateDetails(
insuranceCardDetailsModel: _insuranceCardService.insuranceCardDetailsList,
patientID: patientID,
patientIdentificationID: patientIdentificationID,
name: name,
)));
} else {
AppToast.showErrorToast(message: _insuranceCardService.error);
}
});
}
}

@ -222,16 +222,16 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
Navigator.push(
context,
FadePage(
page: DoctorHomePage(),
page: HomePrescriptionsPage(),
),
);
},
child: MedicalProfileItem(
title: TranslationBase.of(context)
.myDoctor,
imagePath: 'doctor_icon.png',
.medicines,
imagePath: 'prescription_icon.png',
subTitle: TranslationBase.of(context)
.myDoctorSubtitle,
.medicinesSubtitle,
),
),
),
@ -239,19 +239,15 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: HomePrescriptionsPage(),
),
);
Navigator.push(context,
FadePage(page: VitalSignDetailsScreen()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context)
.medicines,
imagePath: 'prescription_icon.png',
.vitalSigns,
imagePath: 'vital_sign_icon.png',
subTitle: TranslationBase.of(context)
.medicinesSubtitle,
.vitalSignsSubtitle,
),
),
),
@ -260,14 +256,14 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
child: InkWell(
onTap: () {
Navigator.push(context,
FadePage(page: InsuranceCard()));
FadePage(page: HomeReportPage()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context)
.insurance,
imagePath: 'insurance_card_icon.png',
title:
TranslationBase.of(context).medical,
imagePath: 'medical_reports_icon.png',
subTitle: TranslationBase.of(context)
.insuranceSubtitle,
.medicalSubtitle,
),
),
),
@ -275,6 +271,26 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
),
Row(
children: <Widget>[
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: DoctorHomePage(),
),
);
},
child: MedicalProfileItem(
title: TranslationBase.of(context)
.myDoctor,
imagePath: 'doctor_icon.png',
subTitle: TranslationBase.of(context)
.myDoctorSubtitle,
),
),
),
Expanded(
flex: 1,
child: InkWell(
@ -306,25 +322,7 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: InsuranceApproval()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context)
.insuranceApproval,
imagePath:
'insurance_approvals_icon.png',
subTitle: TranslationBase.of(context)
.insuranceApprovalSubtitle,
),
),
),
],
),
Row(children: <Widget>[
@ -333,14 +331,14 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
child: InkWell(
onTap: () {
Navigator.push(context,
FadePage(page: HomeReportPage()));
FadePage(page: InsuranceCard()));
},
child: MedicalProfileItem(
title:
TranslationBase.of(context).medical,
imagePath: 'medical_reports_icon.png',
title: TranslationBase.of(context)
.insurance,
imagePath: 'insurance_card_icon.png',
subTitle: TranslationBase.of(context)
.medicalSubtitle,
.insuranceSubtitle,
),
),
),
@ -364,15 +362,18 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(context,
FadePage(page: VitalSignDetailsScreen()));
Navigator.push(
context,
FadePage(
page: InsuranceApproval()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context)
.vitalSigns,
imagePath: 'vital_sign_icon.png',
.insuranceApproval,
imagePath:
'insurance_approvals_icon.png',
subTitle: TranslationBase.of(context)
.vitalSignsSubtitle,
.insuranceApprovalSubtitle,
),
),
),

@ -17,7 +17,8 @@ class VitalSignDetailsScreen extends StatelessWidget {
int appointmentNo;
int projectID;
VitalSignDetailsScreen({this.appointmentNo, this.projectID});
bool isNotOneAppointment;
VitalSignDetailsScreen({this.appointmentNo, this.projectID,this.isNotOneAppointment=true});
List<ImagesInfo> imagesInfo = List();
@ -43,7 +44,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
Row(
children: <Widget>[
InkWell(
onTap: () => Navigator.push(
onTap: () =>isNotOneAppointment? Navigator.push(
context,
FadePage(
page: VitalSignItemDetailsScreen(
@ -52,7 +53,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
vitalList: mode.vitalSignResModelList,
),
),
),
):null,
child: Container(
child: VitalSignItem(
des: TranslationBase.of(context).height,
@ -67,7 +68,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
),
),
InkWell(
onTap: () => Navigator.push(
onTap: () => isNotOneAppointment ? Navigator.push(
context,
FadePage(
page: VitalSignItemDetailsScreen(
@ -76,7 +77,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
vitalList: mode.vitalSignResModelList,
),
),
),
):null,
child: VitalSignItem(
des: TranslationBase.of(context).weight,
icon: DQIcons.weight_scale,
@ -93,7 +94,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
Row(
children: <Widget>[
InkWell(
onTap: () => Navigator.push(
onTap: () => isNotOneAppointment ? Navigator.push(
context,
FadePage(
page: VitalSignItemDetailsScreen(
@ -103,7 +104,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
vitalList: mode.vitalSignResModelList,
),
),
),
): null,
child: VitalSignItem(
des: TranslationBase.of(context).body,
icon: DQIcons.bmi,
@ -114,7 +115,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
),
),
InkWell(
onTap: () => Navigator.push(
onTap: () => isNotOneAppointment ? Navigator.push(
context,
FadePage(
page: VitalSignItemDetailsScreen(
@ -124,7 +125,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
vitalList: mode.vitalSignResModelList,
),
),
),
):null,
child: Container(
child: VitalSignItem(
des: TranslationBase.of(context).temperature,
@ -141,7 +142,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
Row(
children: <Widget>[
InkWell(
onTap: () => Navigator.push(
onTap: () => isNotOneAppointment ? Navigator.push(
context,
FadePage(
page: VitalSignItemDetailsScreen(
@ -150,7 +151,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
vitalList: mode.vitalSignResModelList,
),
),
),
):null,
child: VitalSignItem(
des: TranslationBase.of(context).heart,
icon: DQIcons.heart,
@ -163,7 +164,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
),
),
InkWell(
onTap: () => Navigator.push(
onTap: () => isNotOneAppointment ? Navigator.push(
context,
FadePage(
page: VitalSignItemDetailsScreen(
@ -173,7 +174,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
vitalList: mode.vitalSignResModelList,
),
),
),
):null,
child: VitalSignItem(
des: TranslationBase.of(context).respirationRate,
icon: DQIcons.outline,
@ -191,7 +192,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
InkWell(
onTap: () => Navigator.push(
onTap: () => isNotOneAppointment ? Navigator.push(
context,
FadePage(
page: VitalSignItemDetailsScreen(
@ -200,7 +201,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
vitalList: mode.vitalSignResModelList,
),
),
),
):null,
child: VitalSignItem(
des: TranslationBase.of(context).bloodPressure,
icon: DQIcons.blood_pressure,

Loading…
Cancel
Save