|
|
|
@ -1,3 +1,4 @@
|
|
|
|
|
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/core/service/insurance_service.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/locator.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/insurance/insurance_details.dart';
|
|
|
|
@ -25,11 +26,13 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
|
|
|
|
|
with SingleTickerProviderStateMixin {
|
|
|
|
|
TabController _tabController;
|
|
|
|
|
InsuranceCardService _insuranceCardService = locator<InsuranceCardService>();
|
|
|
|
|
|
|
|
|
|
List<ImagesInfo> imagesInfo = List();
|
|
|
|
|
@override
|
|
|
|
|
void initState() {
|
|
|
|
|
super.initState();
|
|
|
|
|
_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() {
|
|
|
|
@ -43,6 +46,9 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
|
|
|
|
|
builder: (BuildContext context, InsuranceViewModel model, Widget child) =>
|
|
|
|
|
AppScaffold(
|
|
|
|
|
appBarTitle: TranslationBase.of(context).insurCards,
|
|
|
|
|
description: TranslationBase.of(context).infoInsurCards,
|
|
|
|
|
infoList: TranslationBase.of(context).infoPrescriptionsPoints,
|
|
|
|
|
imagesInfo: imagesInfo,
|
|
|
|
|
isShowAppBar: true,
|
|
|
|
|
isShowDecPage: true,
|
|
|
|
|
baseViewModel: model,
|
|
|
|
@ -107,7 +113,8 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Container(
|
|
|
|
|
child: model.getAllSharedRecordsByStatusResponse
|
|
|
|
|
.getAllSharedRecordsByStatusList!=null ??
|
|
|
|
|
.getAllSharedRecordsByStatusList !=
|
|
|
|
|
null ??
|
|
|
|
|
false
|
|
|
|
|
? ListView.builder(
|
|
|
|
|
itemCount: model.getAllSharedRecordsByStatusResponse
|
|
|
|
@ -202,11 +209,23 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
|
|
|
|
|
onTap: () {
|
|
|
|
|
getDetails(
|
|
|
|
|
projectID: 15,
|
|
|
|
|
patientIdentificationID: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList[index].patientIdenficationNumber,
|
|
|
|
|
setupID: '010266',
|
|
|
|
|
patientID: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList[index].responseID,
|
|
|
|
|
name: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList[index].patientName
|
|
|
|
|
);
|
|
|
|
|
patientIdentificationID: model
|
|
|
|
|
.getAllSharedRecordsByStatusResponse
|
|
|
|
|
.getAllSharedRecordsByStatusList[
|
|
|
|
|
index]
|
|
|
|
|
.patientIdenficationNumber,
|
|
|
|
|
setupID:
|
|
|
|
|
'010266',
|
|
|
|
|
patientID: model
|
|
|
|
|
.getAllSharedRecordsByStatusResponse
|
|
|
|
|
.getAllSharedRecordsByStatusList[
|
|
|
|
|
index]
|
|
|
|
|
.responseID,
|
|
|
|
|
name: model
|
|
|
|
|
.getAllSharedRecordsByStatusResponse
|
|
|
|
|
.getAllSharedRecordsByStatusList[
|
|
|
|
|
index]
|
|
|
|
|
.patientName);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
@ -238,41 +257,45 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
|
|
|
|
|
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,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
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(
|
|
|
|
@ -290,11 +313,16 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
|
|
|
|
|
getDetails(
|
|
|
|
|
setupID: '010266',
|
|
|
|
|
projectID: 15,
|
|
|
|
|
patientIdentificationID: model.user.patientIdentificationNo,
|
|
|
|
|
patientID: model.user.patientID,
|
|
|
|
|
name: model.user.firstName + " " + model.user.lastName
|
|
|
|
|
|
|
|
|
|
);
|
|
|
|
|
patientIdentificationID:
|
|
|
|
|
model.user
|
|
|
|
|
.patientIdentificationNo,
|
|
|
|
|
patientID: model
|
|
|
|
|
.user.patientID,
|
|
|
|
|
name: model.user
|
|
|
|
|
.firstName +
|
|
|
|
|
" " +
|
|
|
|
|
model
|
|
|
|
|
.user.lastName);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
@ -425,7 +453,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);
|
|
|
|
|
_insuranceCardService
|
|
|
|
|
.getPatientInsuranceDetails(
|
|
|
|
@ -436,8 +469,16 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
|
|
|
|
|
.then((value) {
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
if (_insuranceCardService.insuranceCardDetails != null) {
|
|
|
|
|
Navigator.push(context,
|
|
|
|
|
FadePage(page: InsuranceCardUpdateDetails(insuranceCardDetailsModel: _insuranceCardService.insuranceCardDetails,patientID: patientID,patientIdentificationID: patientIdentificationID,name: name,)));
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: InsuranceCardUpdateDetails(
|
|
|
|
|
insuranceCardDetailsModel:
|
|
|
|
|
_insuranceCardService.insuranceCardDetails,
|
|
|
|
|
patientID: patientID,
|
|
|
|
|
patientIdentificationID: patientIdentificationID,
|
|
|
|
|
name: name,
|
|
|
|
|
)));
|
|
|
|
|
} else {
|
|
|
|
|
AppToast.showErrorToast(message: _insuranceCardService.error);
|
|
|
|
|
}
|
|
|
|
|