insurance details

merge-update-with-lab-changes
Sultan Khan 5 years ago
parent d81cc7119d
commit bedafa24cd

@ -254,6 +254,10 @@ const GET_PAtIENTS_INSURANCE =
"Services/Patients.svc/REST/Get_PatientInsuranceDetails"; "Services/Patients.svc/REST/Get_PatientInsuranceDetails";
const GET_PAtIENTS_INSURANCE_UPDATED = 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 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";
const GET_PAtIENTS_INSURANCE_APPROVALS = const GET_PAtIENTS_INSURANCE_APPROVALS =

@ -125,4 +125,14 @@ class InsuranceCardService extends BaseService {
throw error; throw error;
} }
} }
Future getInsuranceDetails() async{
dynamic localRes;
await baseAppClient.post(INSURANCE_DETAILS,
onSuccess: (dynamic response, int statusCode) {
localRes = response;
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: Map());
}
} }

@ -72,4 +72,5 @@ class InsuranceViewModel extends BaseViewModel {
} else } else
setState(ViewState.Idle); setState(ViewState.Idle);
} }
} }

@ -18,7 +18,8 @@ class ProjectViewModel extends BaseViewModel {
bool isError = false; bool isError = false;
String error = ''; String error = '';
dynamic searchvalue; dynamic searchvalue;
bool isLogin = false; bool isLogin
= false;
dynamic get searchValue => searchvalue; dynamic get searchValue => searchvalue;

@ -1,11 +1,15 @@
import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/service/insurance_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_details.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart'; import 'package:diplomaticquarterapp/widgets/others/rounded_container.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';
@ -21,6 +25,7 @@ class InsuranceCard extends StatefulWidget {
} }
//TODO fix it //TODO fix it
class _InsuranceCardState extends State<InsuranceCard> { class _InsuranceCardState extends State<InsuranceCard> {
InsuranceCardService _insuranceCardService = locator<InsuranceCardService>();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<InsuranceViewModel>( return BaseView<InsuranceViewModel>(
@ -140,6 +145,7 @@ class _InsuranceCardState extends State<InsuranceCard> {
Container( Container(
color: Colors.transparent, color: Colors.transparent,
child: SecondaryButton( child: SecondaryButton(
onTap: getDetails(),
label: TranslationBase.of(context).seeDetails, label: TranslationBase.of(context).seeDetails,
textColor: Colors.white, textColor: Colors.white,
), ),
@ -179,4 +185,11 @@ class _InsuranceCardState extends State<InsuranceCard> {
return newDate.toString(); return newDate.toString();
} }
getDetails(){
_insuranceCardService.getInsuranceDetails().then((value) => {
Navigator.push(context,
FadePage(page: InsuranceCardDetails(data:value)))
});
}
} }

@ -1,5 +1,5 @@
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/insurance/config/size_config.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:html2md/html2md.dart' as html2md; import 'package:html2md/html2md.dart' as html2md;
import 'package:flutter_markdown/flutter_markdown.dart'; import 'package:flutter_markdown/flutter_markdown.dart';
@ -34,4 +34,5 @@ class _InsuranceCardInsuranceCardDetailsState extends State<InsuranceCardDetails
), ),
); );
} }
} }

@ -223,7 +223,7 @@ class _Register extends State<Register> {
okText: TranslationBase.of(context).confirm, okText: TranslationBase.of(context).confirm,
cancelText: TranslationBase.of(context).cancel_nocaps, cancelText: TranslationBase.of(context).cancel_nocaps,
okFunction: () => { okFunction: () => {
ConfirmDialog.closeAlertDialog(context) ConfirmDialog.closeAlertDialog(context),
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
REGISTER, REGISTER,
), ),

@ -126,7 +126,7 @@ class AppScaffold extends StatelessWidget {
description: description, description: description,
infoList: infoList, infoList: infoList,
) )
: baseViewModel != null : baseViewModel != null
? NetworkBaseView( ? NetworkBaseView(
child: buildBodyWidget(), child: buildBodyWidget(),
baseViewModel: baseViewModel, baseViewModel: baseViewModel,

@ -141,7 +141,7 @@ dependencies:
screen: ^0.0.5 screen: ^0.0.5
#google maps places #google maps places
google_maps_place_picker: ^1.0.0 google_maps_place_picker: ^1.0.0
#Dependencies for video call implementation #Dependencies for video call implementation
native_device_orientation: ^0.3.0 native_device_orientation: ^0.3.0
enum_to_string: ^1.0.9 enum_to_string: ^1.0.9
@ -150,7 +150,8 @@ dependencies:
after_layout: ^1.0.7 after_layout: ^1.0.7
twilio_programmable_video: ^0.5.0+3 twilio_programmable_video: ^0.5.0+3
flutter_tts: ^1.2.6 flutter_tts: ^1.2.6
html2md: "^0.5.1"
flutter_markdown: "^0.5.0"
speech_to_text: speech_to_text:
path: speech_to_text path: speech_to_text

Loading…
Cancel
Save