From bc97cfa95bd2323f39dc3ea975ef744cba959957 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 21 Mar 2022 12:50:01 +0300 Subject: [PATCH] Update Insurance changes --- lib/core/service/insurance_service.dart | 4 ++-- lib/pages/DrawerPages/family/my-family.dart | 2 +- lib/pages/insurance/insurance_page.dart | 8 ++++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/core/service/insurance_service.dart b/lib/core/service/insurance_service.dart index 176043e1..a0120398 100644 --- a/lib/core/service/insurance_service.dart +++ b/lib/core/service/insurance_service.dart @@ -141,7 +141,7 @@ class InsuranceCardService extends BaseService { return Future.value(localRes); } - Future getPatientInsuranceDetails({String setupID, int projectID, String patientIdentificationID, int patientID}) async { + Future getPatientInsuranceDetails({String setupID, int projectID, String patientIdentificationID, int patientID, bool isFamily, int parentID = 0}) async { error = ""; hasError = false; insuranceCardDetails = null; @@ -159,7 +159,7 @@ class InsuranceCardService extends BaseService { hasError = true; super.error = error; }, - body: {'SetupID': setupID, 'ProjectID': projectID, 'PatientIdentificationID': patientIdentificationID, 'isDentalAllowedBackend': false, 'PatientID': patientID}, + body: {'SetupID': setupID, 'ProjectID': projectID, 'PatientIdentificationID': patientIdentificationID, 'isDentalAllowedBackend': false, 'PatientID': patientID, 'IsFamily': isFamily, 'ParentID': parentID}, ); } diff --git a/lib/pages/DrawerPages/family/my-family.dart b/lib/pages/DrawerPages/family/my-family.dart index 47f80062..d9f15af8 100644 --- a/lib/pages/DrawerPages/family/my-family.dart +++ b/lib/pages/DrawerPages/family/my-family.dart @@ -234,7 +234,7 @@ class _MyFamily extends State with TickerProviderStateMixin { } else return SizedBox(height: 0); }, - separatorBuilder: (context, index) => SizedBox(height: 0), + separatorBuilder: (context, index) => SizedBox(height: 12), itemCount: familySharedRecordsList.length) : getNoDataWidget(context); } diff --git a/lib/pages/insurance/insurance_page.dart b/lib/pages/insurance/insurance_page.dart index 22e1b03e..2ea4213f 100644 --- a/lib/pages/insurance/insurance_page.dart +++ b/lib/pages/insurance/insurance_page.dart @@ -37,6 +37,8 @@ class InsurancePage extends StatelessWidget { projectID: 15, patientIdentificationID: model.user.patientIdentificationNo, patientID: model.user.patientID, + parentID: 0, + isFamily: false, name: model.user.firstName + " " + model.user.lastName, context: context, ); @@ -90,6 +92,8 @@ class InsurancePage extends StatelessWidget { setupID: '010266', patientID: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList[index].responseID, name: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList[index].patientName, + parentID: model.user.patientID, + isFamily: true, context: context); }, child: Container( @@ -138,9 +142,9 @@ class InsurancePage extends StatelessWidget { ); } - getDetails({String setupID, int projectID, String patientIdentificationID, int patientID, String name, BuildContext context}) { + getDetails({String setupID, int projectID, String patientIdentificationID, int patientID, String name, bool isFamily, int parentID = 0, BuildContext context}) { GifLoaderDialogUtils.showMyDialog(context); - _insuranceCardService.getPatientInsuranceDetails(setupID: setupID, projectID: projectID, patientID: patientID, patientIdentificationID: patientIdentificationID).then((value) { + _insuranceCardService.getPatientInsuranceDetails(setupID: setupID, projectID: projectID, patientID: patientID, patientIdentificationID: patientIdentificationID, isFamily: isFamily, parentID: parentID).then((value) { GifLoaderDialogUtils.hideDialog(context); if (!_insuranceCardService.hasError && _insuranceCardService.isHaveInsuranceCard) { Navigator.push(