insurance card details

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

@ -16,7 +16,9 @@ class InsuranceCardModel {
int patientType;
String groupName;
String companyName;
int companyID;
String subCategoryDesc;
int subCategoryID;
String patientCardID;
String insurancePolicyNumber;
bool isActive;
@ -25,6 +27,7 @@ class InsuranceCardModel {
InsuranceCardModel({
this.insurancePolicyNumber,
this.subCategoryDesc,
this.subCategoryID,
this.versionID,
this.channel,
this.languageID,
@ -40,6 +43,7 @@ class InsuranceCardModel {
this.patientType,
this.groupName,
this.companyName,
this.companyID,
this.patientCardID,
this.isActive,
this.cardValidTo
@ -50,6 +54,7 @@ class InsuranceCardModel {
insurancePolicyNumber = json['InsurancePolicyNo'];
patientCardID = json['PatientCardID'];
companyName = json['CompanyName'];
companyID = json['CompanyID'];
groupName = json['GroupName'];
versionID = json['VersionID'];
channel = json['Channel'];
@ -65,6 +70,7 @@ class InsuranceCardModel {
patientTypeID = json['PatientTypeID'];
patientType = json['PatientType'];
subCategoryDesc = json['SubCategoryDesc'];
subCategoryID = json["SubCategoryID"];
cardValidTo = json['CardValidTo'];
}

@ -125,14 +125,15 @@ class InsuranceCardService extends BaseService {
throw error;
}
}
Future getInsuranceDetails() async{
Future getInsuranceDetails(data) async{
dynamic localRes;
await baseAppClient.post(INSURANCE_DETAILS,
onSuccess: (dynamic response, int statusCode) {
localRes = response;
localRes = response['List_InsuranceCheckList'];
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: Map());
}, body:{'CompanyID': data.companyID,'SubCategoryID':data.subCategoryID },);
return Future.value(localRes);
}
}

@ -145,7 +145,7 @@ class _InsuranceCardState extends State<InsuranceCard> {
Container(
color: Colors.transparent,
child: SecondaryButton(
onTap: getDetails(),
onTap:()=>{ getDetails(model.insurance[index])},
label: TranslationBase.of(context).seeDetails,
textColor: Colors.white,
),
@ -185,10 +185,10 @@ class _InsuranceCardState extends State<InsuranceCard> {
return newDate.toString();
}
getDetails(){
_insuranceCardService.getInsuranceDetails().then((value) => {
getDetails(data){
_insuranceCardService.getInsuranceDetails(data).then((value) => {
Navigator.push(context,
FadePage(page: InsuranceCardDetails(data:value)))
FadePage(page: InsuranceCardDetails(data:value[0]['CheckList'])))
});
}

Loading…
Cancel
Save