ancillary order pages added
parent
a6196d3c30
commit
66acce3b40
@ -0,0 +1,249 @@
|
||||
class AncillaryOrdersListProcListModel {
|
||||
List<AncillaryOrderProcList> ancillaryOrderProcList;
|
||||
String appointmentDate;
|
||||
dynamic appointmentNo;
|
||||
dynamic clinicID;
|
||||
String clinicName;
|
||||
dynamic companyID;
|
||||
String companyName;
|
||||
dynamic doctorID;
|
||||
String doctorName;
|
||||
Null errCode;
|
||||
dynamic groupID;
|
||||
String insurancePolicyNo;
|
||||
String message;
|
||||
String patientCardID;
|
||||
dynamic patientID;
|
||||
String patientName;
|
||||
dynamic patientType;
|
||||
dynamic policyID;
|
||||
String policyName;
|
||||
dynamic projectID;
|
||||
String setupID;
|
||||
dynamic statusCode;
|
||||
dynamic subCategoryID;
|
||||
String subPolicyNo;
|
||||
|
||||
AncillaryOrdersListProcListModel(
|
||||
{this.ancillaryOrderProcList,
|
||||
this.appointmentDate,
|
||||
this.appointmentNo,
|
||||
this.clinicID,
|
||||
this.clinicName,
|
||||
this.companyID,
|
||||
this.companyName,
|
||||
this.doctorID,
|
||||
this.doctorName,
|
||||
this.errCode,
|
||||
this.groupID,
|
||||
this.insurancePolicyNo,
|
||||
this.message,
|
||||
this.patientCardID,
|
||||
this.patientID,
|
||||
this.patientName,
|
||||
this.patientType,
|
||||
this.policyID,
|
||||
this.policyName,
|
||||
this.projectID,
|
||||
this.setupID,
|
||||
this.statusCode,
|
||||
this.subCategoryID,
|
||||
this.subPolicyNo});
|
||||
|
||||
AncillaryOrdersListProcListModel.fromJson(Map<String, dynamic> json) {
|
||||
if (json['AncillaryOrderProcList'] != null) {
|
||||
ancillaryOrderProcList = new List<AncillaryOrderProcList>();
|
||||
json['AncillaryOrderProcList'].forEach((v) {
|
||||
ancillaryOrderProcList.add(new AncillaryOrderProcList.fromJson(v));
|
||||
});
|
||||
}
|
||||
appointmentDate = json['AppointmentDate'];
|
||||
appointmentNo = json['AppointmentNo'];
|
||||
clinicID = json['ClinicID'];
|
||||
clinicName = json['ClinicName'];
|
||||
companyID = json['CompanyID'];
|
||||
companyName = json['CompanyName'];
|
||||
doctorID = json['DoctorID'];
|
||||
doctorName = json['DoctorName'];
|
||||
errCode = json['ErrCode'];
|
||||
groupID = json['GroupID'];
|
||||
insurancePolicyNo = json['InsurancePolicyNo'];
|
||||
message = json['Message'];
|
||||
patientCardID = json['PatientCardID'];
|
||||
patientID = json['PatientID'];
|
||||
patientName = json['PatientName'];
|
||||
patientType = json['PatientType'];
|
||||
policyID = json['PolicyID'];
|
||||
policyName = json['PolicyName'];
|
||||
projectID = json['ProjectID'];
|
||||
setupID = json['SetupID'];
|
||||
statusCode = json['StatusCode'];
|
||||
subCategoryID = json['SubCategoryID'];
|
||||
subPolicyNo = json['SubPolicyNo'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
if (this.ancillaryOrderProcList != null) {
|
||||
data['AncillaryOrderProcList'] =
|
||||
this.ancillaryOrderProcList.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['AppointmentDate'] = this.appointmentDate;
|
||||
data['AppointmentNo'] = this.appointmentNo;
|
||||
data['ClinicID'] = this.clinicID;
|
||||
data['ClinicName'] = this.clinicName;
|
||||
data['CompanyID'] = this.companyID;
|
||||
data['CompanyName'] = this.companyName;
|
||||
data['DoctorID'] = this.doctorID;
|
||||
data['DoctorName'] = this.doctorName;
|
||||
data['ErrCode'] = this.errCode;
|
||||
data['GroupID'] = this.groupID;
|
||||
data['InsurancePolicyNo'] = this.insurancePolicyNo;
|
||||
data['Message'] = this.message;
|
||||
data['PatientCardID'] = this.patientCardID;
|
||||
data['PatientID'] = this.patientID;
|
||||
data['PatientName'] = this.patientName;
|
||||
data['PatientType'] = this.patientType;
|
||||
data['PolicyID'] = this.policyID;
|
||||
data['PolicyName'] = this.policyName;
|
||||
data['ProjectID'] = this.projectID;
|
||||
data['SetupID'] = this.setupID;
|
||||
data['StatusCode'] = this.statusCode;
|
||||
data['SubCategoryID'] = this.subCategoryID;
|
||||
data['SubPolicyNo'] = this.subPolicyNo;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class AncillaryOrderProcList {
|
||||
dynamic approvalLineItemNo;
|
||||
dynamic approvalNo;
|
||||
String approvalStatus;
|
||||
dynamic approvalStatusID;
|
||||
dynamic companyShare;
|
||||
dynamic companyShareWithTax;
|
||||
dynamic companyTaxAmount;
|
||||
dynamic discountAmount;
|
||||
dynamic discountCategory;
|
||||
String discountType;
|
||||
dynamic discountTypeValue;
|
||||
bool isApprovalCreated;
|
||||
bool isApprovalRequired;
|
||||
bool isCovered;
|
||||
String orderDate;
|
||||
dynamic orderLineItemNo;
|
||||
dynamic orderNo;
|
||||
dynamic partnerID;
|
||||
dynamic partnerShare;
|
||||
String partnerShareType;
|
||||
dynamic patientShare;
|
||||
dynamic patientShareWithTax;
|
||||
dynamic patientTaxAmount;
|
||||
dynamic procPrice;
|
||||
dynamic procedureCategoryID;
|
||||
String procedureCategoryName;
|
||||
String procedureID;
|
||||
String procedureName;
|
||||
dynamic taxAmount;
|
||||
dynamic taxPct;
|
||||
|
||||
AncillaryOrderProcList(
|
||||
{this.approvalLineItemNo,
|
||||
this.approvalNo,
|
||||
this.approvalStatus,
|
||||
this.approvalStatusID,
|
||||
this.companyShare,
|
||||
this.companyShareWithTax,
|
||||
this.companyTaxAmount,
|
||||
this.discountAmount,
|
||||
this.discountCategory,
|
||||
this.discountType,
|
||||
this.discountTypeValue,
|
||||
this.isApprovalCreated,
|
||||
this.isApprovalRequired,
|
||||
this.isCovered,
|
||||
this.orderDate,
|
||||
this.orderLineItemNo,
|
||||
this.orderNo,
|
||||
this.partnerID,
|
||||
this.partnerShare,
|
||||
this.partnerShareType,
|
||||
this.patientShare,
|
||||
this.patientShareWithTax,
|
||||
this.patientTaxAmount,
|
||||
this.procPrice,
|
||||
this.procedureCategoryID,
|
||||
this.procedureCategoryName,
|
||||
this.procedureID,
|
||||
this.procedureName,
|
||||
this.taxAmount,
|
||||
this.taxPct});
|
||||
|
||||
AncillaryOrderProcList.fromJson(Map<String, dynamic> json) {
|
||||
approvalLineItemNo = json['ApprovalLineItemNo'];
|
||||
approvalNo = json['ApprovalNo'];
|
||||
approvalStatus = json['ApprovalStatus'];
|
||||
approvalStatusID = json['ApprovalStatusID'];
|
||||
companyShare = json['CompanyShare'];
|
||||
companyShareWithTax = json['CompanyShareWithTax'];
|
||||
companyTaxAmount = json['CompanyTaxAmount'];
|
||||
discountAmount = json['DiscountAmount'];
|
||||
discountCategory = json['DiscountCategory'];
|
||||
discountType = json['DiscountType'];
|
||||
discountTypeValue = json['DiscountTypeValue'];
|
||||
isApprovalCreated = json['IsApprovalCreated'];
|
||||
isApprovalRequired = json['IsApprovalRequired'];
|
||||
isCovered = json['IsCovered'];
|
||||
orderDate = json['OrderDate'];
|
||||
orderLineItemNo = json['OrderLineItemNo'];
|
||||
orderNo = json['OrderNo'];
|
||||
partnerID = json['PartnerID'];
|
||||
partnerShare = json['PartnerShare'];
|
||||
partnerShareType = json['PartnerShareType'];
|
||||
patientShare = json['PatientShare'];
|
||||
patientShareWithTax = json['PatientShareWithTax'];
|
||||
patientTaxAmount = json['PatientTaxAmount'];
|
||||
procPrice = json['ProcPrice'];
|
||||
procedureCategoryID = json['ProcedureCategoryID'];
|
||||
procedureCategoryName = json['ProcedureCategoryName'];
|
||||
procedureID = json['ProcedureID'];
|
||||
procedureName = json['ProcedureName'];
|
||||
taxAmount = json['TaxAmount'];
|
||||
taxPct = json['TaxPct'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['ApprovalLineItemNo'] = this.approvalLineItemNo;
|
||||
data['ApprovalNo'] = this.approvalNo;
|
||||
data['ApprovalStatus'] = this.approvalStatus;
|
||||
data['ApprovalStatusID'] = this.approvalStatusID;
|
||||
data['CompanyShare'] = this.companyShare;
|
||||
data['CompanyShareWithTax'] = this.companyShareWithTax;
|
||||
data['CompanyTaxAmount'] = this.companyTaxAmount;
|
||||
data['DiscountAmount'] = this.discountAmount;
|
||||
data['DiscountCategory'] = this.discountCategory;
|
||||
data['DiscountType'] = this.discountType;
|
||||
data['DiscountTypeValue'] = this.discountTypeValue;
|
||||
data['IsApprovalCreated'] = this.isApprovalCreated;
|
||||
data['IsApprovalRequired'] = this.isApprovalRequired;
|
||||
data['IsCovered'] = this.isCovered;
|
||||
data['OrderDate'] = this.orderDate;
|
||||
data['OrderLineItemNo'] = this.orderLineItemNo;
|
||||
data['OrderNo'] = this.orderNo;
|
||||
data['PartnerID'] = this.partnerID;
|
||||
data['PartnerShare'] = this.partnerShare;
|
||||
data['PartnerShareType'] = this.partnerShareType;
|
||||
data['PatientShare'] = this.patientShare;
|
||||
data['PatientShareWithTax'] = this.patientShareWithTax;
|
||||
data['PatientTaxAmount'] = this.patientTaxAmount;
|
||||
data['ProcPrice'] = this.procPrice;
|
||||
data['ProcedureCategoryID'] = this.procedureCategoryID;
|
||||
data['ProcedureCategoryName'] = this.procedureCategoryName;
|
||||
data['ProcedureID'] = this.procedureID;
|
||||
data['ProcedureName'] = this.procedureName;
|
||||
data['TaxAmount'] = this.taxAmount;
|
||||
data['TaxPct'] = this.taxPct;
|
||||
return data;
|
||||
}
|
||||
}
|
@ -0,0 +1,196 @@
|
||||
import 'package:diplomaticquarterapp/core/viewModels/ancillary_orders_view_model.dart';
|
||||
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
|
||||
import "package:collection/collection.dart";
|
||||
|
||||
class AnicllaryOrdersDetails extends StatefulWidget {
|
||||
final dynamic appoNo;
|
||||
final dynamic orderNo;
|
||||
AnicllaryOrdersDetails(this.appoNo, this.orderNo);
|
||||
@override
|
||||
_AnicllaryOrdersState createState() => _AnicllaryOrdersState();
|
||||
}
|
||||
|
||||
class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails>
|
||||
with SingleTickerProviderStateMixin {
|
||||
void initState() {
|
||||
super.initState();
|
||||
}
|
||||
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BaseView<AnciallryOrdersViewModel>(
|
||||
onModelReady: (model) =>
|
||||
model.getOrdersDetails(widget.appoNo, widget.orderNo),
|
||||
builder: (_, model, widget) => AppScaffold(
|
||||
isShowAppBar: true,
|
||||
baseViewModel: model,
|
||||
appBarTitle: TranslationBase.of(context).anicllaryOrders,
|
||||
body: SingleChildScrollView(
|
||||
padding: EdgeInsets.all(12),
|
||||
child: model.ancillaryListsDetails.length > 0
|
||||
? Column(children: [
|
||||
getPatientInfo(model),
|
||||
getInvoiceDetails(model),
|
||||
getInsuranceDetails(model),
|
||||
getAncillaryDetails(model)
|
||||
])
|
||||
: SizedBox())));
|
||||
}
|
||||
|
||||
Widget getPatientInfo(AnciallryOrdersViewModel model) {
|
||||
print(model.ancillaryListsDetails);
|
||||
return Padding(
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Texts(
|
||||
TranslationBase.of(context).mrn,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 22,
|
||||
),
|
||||
Texts(
|
||||
" : ",
|
||||
fontSize: 20,
|
||||
),
|
||||
Texts(
|
||||
model.ancillaryListsDetails[0].patientID.toString(),
|
||||
)
|
||||
],
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Texts(
|
||||
TranslationBase.of(context).patientName,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 20,
|
||||
),
|
||||
Texts(
|
||||
" : ",
|
||||
fontSize: 20,
|
||||
),
|
||||
Texts(
|
||||
model.ancillaryLists[0].patientName,
|
||||
)
|
||||
],
|
||||
),
|
||||
Divider(
|
||||
color: Colors.black26,
|
||||
)
|
||||
],
|
||||
),
|
||||
padding: EdgeInsets.only(top: 5.0, bottom: 5.0),
|
||||
);
|
||||
}
|
||||
|
||||
Widget getInvoiceDetails(model) {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Texts(
|
||||
TranslationBase.of(context).invoiceNo,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
Texts(" : "),
|
||||
Texts(
|
||||
model.ancillaryListsDetails[0].appointmentNo.toString(),
|
||||
)
|
||||
],
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Texts(
|
||||
TranslationBase.of(context).date,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
Texts(" : "),
|
||||
Texts(
|
||||
DateUtil.getFormattedDate(
|
||||
DateUtil.convertStringToDate(
|
||||
model.ancillaryListsDetails[0].appointmentDate),
|
||||
"MMM dd,yyyy"),
|
||||
)
|
||||
],
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Texts(
|
||||
TranslationBase.of(context).date,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
Texts(" : "),
|
||||
Texts(
|
||||
model.ancillaryListsDetails[0].doctorName,
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
Divider(
|
||||
color: Colors.black26,
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget getInsuranceDetails(model) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(top: 10, bottom: 10),
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Texts(
|
||||
TranslationBase.of(context).insurance,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
Texts(
|
||||
TranslationBase.of(context).insuranceID,
|
||||
fontWeight: FontWeight.bold,
|
||||
)
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Texts(
|
||||
model.ancillaryListsDetails[0].policyName,
|
||||
),
|
||||
Texts(
|
||||
model.ancillaryListsDetails[0].insurancePolicyNo,
|
||||
)
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 15,
|
||||
),
|
||||
Divider(
|
||||
color: Colors.red[800],
|
||||
thickness: 3,
|
||||
)
|
||||
],
|
||||
));
|
||||
}
|
||||
|
||||
Widget getAncillaryDetails(model) {
|
||||
var newMap = groupBy(model.ancillaryListsDetails[0].ancillaryOrderProcList,
|
||||
(obj) => obj.procedureCategoryName);
|
||||
print(newMap);
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(top: 10, bottom: 10),
|
||||
child: Column(children: []));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue