insurance card details

merge-requests/140/head
Sultan Khan 5 years ago
parent bedafa24cd
commit 1f4f81b454

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

@ -125,14 +125,15 @@ class InsuranceCardService extends BaseService {
throw error; throw error;
} }
} }
Future getInsuranceDetails() async{ Future getInsuranceDetails(data) async{
dynamic localRes; dynamic localRes;
await baseAppClient.post(INSURANCE_DETAILS, await baseAppClient.post(INSURANCE_DETAILS,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response['List_InsuranceCheckList'];
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; 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( Container(
color: Colors.transparent, color: Colors.transparent,
child: SecondaryButton( child: SecondaryButton(
onTap: getDetails(), onTap:()=>{ getDetails(model.insurance[index])},
label: TranslationBase.of(context).seeDetails, label: TranslationBase.of(context).seeDetails,
textColor: Colors.white, textColor: Colors.white,
), ),
@ -185,10 +185,10 @@ class _InsuranceCardState extends State<InsuranceCard> {
return newDate.toString(); return newDate.toString();
} }
getDetails(){ getDetails(data){
_insuranceCardService.getInsuranceDetails().then((value) => { _insuranceCardService.getInsuranceDetails(data).then((value) => {
Navigator.push(context, Navigator.push(context,
FadePage(page: InsuranceCardDetails(data:value))) FadePage(page: InsuranceCardDetails(data:value[0]['CheckList'])))
}); });
} }

Loading…
Cancel
Save