Merge branch 'development' into Haroon
commit
573f5110f5
@ -0,0 +1,36 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CLIENT_ID</key>
|
||||||
|
<string>864393916058-ekeb4s8tgfo58dutv0l54399t7ivr06r.apps.googleusercontent.com</string>
|
||||||
|
<key>REVERSED_CLIENT_ID</key>
|
||||||
|
<string>com.googleusercontent.apps.864393916058-ekeb4s8tgfo58dutv0l54399t7ivr06r</string>
|
||||||
|
<key>API_KEY</key>
|
||||||
|
<string>AIzaSyA_6ayGCk4fly7o7eTVBrj9kuHBYHMAOfs</string>
|
||||||
|
<key>GCM_SENDER_ID</key>
|
||||||
|
<string>864393916058</string>
|
||||||
|
<key>PLIST_VERSION</key>
|
||||||
|
<string>1</string>
|
||||||
|
<key>BUNDLE_ID</key>
|
||||||
|
<string>com.cloud.diplomaticquarterapp</string>
|
||||||
|
<key>PROJECT_ID</key>
|
||||||
|
<string>diplomaticquarter-d2385</string>
|
||||||
|
<key>STORAGE_BUCKET</key>
|
||||||
|
<string>diplomaticquarter-d2385.appspot.com</string>
|
||||||
|
<key>IS_ADS_ENABLED</key>
|
||||||
|
<false></false>
|
||||||
|
<key>IS_ANALYTICS_ENABLED</key>
|
||||||
|
<false></false>
|
||||||
|
<key>IS_APPINVITE_ENABLED</key>
|
||||||
|
<true></true>
|
||||||
|
<key>IS_GCM_ENABLED</key>
|
||||||
|
<true></true>
|
||||||
|
<key>IS_SIGNIN_ENABLED</key>
|
||||||
|
<true></true>
|
||||||
|
<key>GOOGLE_APP_ID</key>
|
||||||
|
<string>1:864393916058:ios:13f787bbfe6051f8b97923</string>
|
||||||
|
<key>DATABASE_URL</key>
|
||||||
|
<string>https://diplomaticquarter-d2385.firebaseio.com</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@ -0,0 +1,38 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CLIENT_ID</key>
|
||||||
|
<string>815750722565-da8p56le8bd6apsbm9eft0jjl1rtpgkt.apps.googleusercontent.com</string>
|
||||||
|
<key>REVERSED_CLIENT_ID</key>
|
||||||
|
<string>com.googleusercontent.apps.815750722565-da8p56le8bd6apsbm9eft0jjl1rtpgkt</string>
|
||||||
|
<key>ANDROID_CLIENT_ID</key>
|
||||||
|
<string>815750722565-m14h8mkosm7cnq6uh6rhqr54dn02d705.apps.googleusercontent.com</string>
|
||||||
|
<key>API_KEY</key>
|
||||||
|
<string>AIzaSyDiXnCO00li4V7Ioa2YZ_M4ECxRsu_P9tA</string>
|
||||||
|
<key>GCM_SENDER_ID</key>
|
||||||
|
<string>815750722565</string>
|
||||||
|
<key>PLIST_VERSION</key>
|
||||||
|
<string>1</string>
|
||||||
|
<key>BUNDLE_ID</key>
|
||||||
|
<string>com.HMG.Smartphone</string>
|
||||||
|
<key>PROJECT_ID</key>
|
||||||
|
<string>api-project-815750722565</string>
|
||||||
|
<key>STORAGE_BUCKET</key>
|
||||||
|
<string>api-project-815750722565.appspot.com</string>
|
||||||
|
<key>IS_ADS_ENABLED</key>
|
||||||
|
<false></false>
|
||||||
|
<key>IS_ANALYTICS_ENABLED</key>
|
||||||
|
<false></false>
|
||||||
|
<key>IS_APPINVITE_ENABLED</key>
|
||||||
|
<true></true>
|
||||||
|
<key>IS_GCM_ENABLED</key>
|
||||||
|
<true></true>
|
||||||
|
<key>IS_SIGNIN_ENABLED</key>
|
||||||
|
<true></true>
|
||||||
|
<key>GOOGLE_APP_ID</key>
|
||||||
|
<string>1:815750722565:ios:328ec247a81a2ca23c186c</string>
|
||||||
|
<key>DATABASE_URL</key>
|
||||||
|
<string>https://api-project-815750722565.firebaseio.com</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 38 KiB |
@ -0,0 +1,92 @@
|
|||||||
|
class ErPatientShareModel {
|
||||||
|
int cashPrice;
|
||||||
|
int cashPriceTax;
|
||||||
|
int cashPriceWithTax;
|
||||||
|
int companyId;
|
||||||
|
String companyName;
|
||||||
|
int companyShareWithTax;
|
||||||
|
dynamic errCode;
|
||||||
|
int groupID;
|
||||||
|
dynamic insurancePolicyNo;
|
||||||
|
String message;
|
||||||
|
dynamic patientCardID;
|
||||||
|
double patientShare;
|
||||||
|
double patientShareWithTax;
|
||||||
|
double patientTaxAmount;
|
||||||
|
int policyId;
|
||||||
|
String policyName;
|
||||||
|
String procedureName;
|
||||||
|
dynamic setupID;
|
||||||
|
int statusCode;
|
||||||
|
dynamic subPolicyNo;
|
||||||
|
|
||||||
|
ErPatientShareModel(
|
||||||
|
{this.cashPrice,
|
||||||
|
this.cashPriceTax,
|
||||||
|
this.cashPriceWithTax,
|
||||||
|
this.companyId,
|
||||||
|
this.companyName,
|
||||||
|
this.companyShareWithTax,
|
||||||
|
this.errCode,
|
||||||
|
this.groupID,
|
||||||
|
this.insurancePolicyNo,
|
||||||
|
this.message,
|
||||||
|
this.patientCardID,
|
||||||
|
this.patientShare,
|
||||||
|
this.patientShareWithTax,
|
||||||
|
this.patientTaxAmount,
|
||||||
|
this.policyId,
|
||||||
|
this.policyName,
|
||||||
|
this.procedureName,
|
||||||
|
this.setupID,
|
||||||
|
this.statusCode,
|
||||||
|
this.subPolicyNo});
|
||||||
|
|
||||||
|
ErPatientShareModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
cashPrice = json['CashPrice'];
|
||||||
|
cashPriceTax = json['CashPriceTax'];
|
||||||
|
cashPriceWithTax = json['CashPriceWithTax'];
|
||||||
|
companyId = json['CompanyId'];
|
||||||
|
companyName = json['CompanyName'];
|
||||||
|
companyShareWithTax = json['CompanyShareWithTax'];
|
||||||
|
errCode = json['ErrCode'];
|
||||||
|
groupID = json['GroupID'];
|
||||||
|
insurancePolicyNo = json['InsurancePolicyNo'];
|
||||||
|
message = json['Message'];
|
||||||
|
patientCardID = json['PatientCardID'];
|
||||||
|
patientShare = json['PatientShare'];
|
||||||
|
patientShareWithTax = json['PatientShareWithTax'];
|
||||||
|
patientTaxAmount = json['PatientTaxAmount'];
|
||||||
|
policyId = json['PolicyId'];
|
||||||
|
policyName = json['PolicyName'];
|
||||||
|
procedureName = json['ProcedureName'];
|
||||||
|
setupID = json['SetupID'];
|
||||||
|
statusCode = json['StatusCode'];
|
||||||
|
subPolicyNo = json['SubPolicyNo'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['CashPrice'] = this.cashPrice;
|
||||||
|
data['CashPriceTax'] = this.cashPriceTax;
|
||||||
|
data['CashPriceWithTax'] = this.cashPriceWithTax;
|
||||||
|
data['CompanyId'] = this.companyId;
|
||||||
|
data['CompanyName'] = this.companyName;
|
||||||
|
data['CompanyShareWithTax'] = this.companyShareWithTax;
|
||||||
|
data['ErrCode'] = this.errCode;
|
||||||
|
data['GroupID'] = this.groupID;
|
||||||
|
data['InsurancePolicyNo'] = this.insurancePolicyNo;
|
||||||
|
data['Message'] = this.message;
|
||||||
|
data['PatientCardID'] = this.patientCardID;
|
||||||
|
data['PatientShare'] = this.patientShare;
|
||||||
|
data['PatientShareWithTax'] = this.patientShareWithTax;
|
||||||
|
data['PatientTaxAmount'] = this.patientTaxAmount;
|
||||||
|
data['PolicyId'] = this.policyId;
|
||||||
|
data['PolicyName'] = this.policyName;
|
||||||
|
data['ProcedureName'] = this.procedureName;
|
||||||
|
data['SetupID'] = this.setupID;
|
||||||
|
data['StatusCode'] = this.statusCode;
|
||||||
|
data['SubPolicyNo'] = this.subPolicyNo;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,147 @@
|
|||||||
|
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
|
||||||
|
|
||||||
|
class TriageInformationRequest {
|
||||||
|
double versionID;
|
||||||
|
int channel;
|
||||||
|
int languageID;
|
||||||
|
String iPAdress;
|
||||||
|
String sessionID;
|
||||||
|
int patientID;
|
||||||
|
String tokenID;
|
||||||
|
String generalid;
|
||||||
|
int patientOutSA;
|
||||||
|
int patientTypeID;
|
||||||
|
int patientType;
|
||||||
|
int projectID;
|
||||||
|
ERTriageInformation eRTriageInformation;
|
||||||
|
HospitalsModel selectedHospital;
|
||||||
|
TriageInformationRequest(
|
||||||
|
{this.versionID,
|
||||||
|
this.channel,
|
||||||
|
this.languageID,
|
||||||
|
this.iPAdress,
|
||||||
|
this.sessionID,
|
||||||
|
this.patientID,
|
||||||
|
this.tokenID,
|
||||||
|
this.generalid,
|
||||||
|
this.patientOutSA,
|
||||||
|
this.patientTypeID,
|
||||||
|
this.patientType,
|
||||||
|
this.projectID,
|
||||||
|
this.eRTriageInformation,this.selectedHospital});
|
||||||
|
|
||||||
|
TriageInformationRequest.fromJson(Map<String, dynamic> json) {
|
||||||
|
versionID = json['VersionID'];
|
||||||
|
channel = json['Channel'];
|
||||||
|
languageID = json['LanguageID'];
|
||||||
|
iPAdress = json['IPAdress'];
|
||||||
|
sessionID = json['SessionID'];
|
||||||
|
patientID = json['PatientID'];
|
||||||
|
tokenID = json['TokenID'];
|
||||||
|
generalid = json['generalid'];
|
||||||
|
patientOutSA = json['PatientOutSA'];
|
||||||
|
patientTypeID = json['PatientTypeID'];
|
||||||
|
patientType = json['PatientType'];
|
||||||
|
projectID = json['ProjectID'];
|
||||||
|
eRTriageInformation = json['ERTriageInformation'] != null
|
||||||
|
? new ERTriageInformation.fromJson(json['ERTriageInformation'])
|
||||||
|
: null;
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['VersionID'] = this.versionID;
|
||||||
|
data['Channel'] = this.channel;
|
||||||
|
data['LanguageID'] = this.languageID;
|
||||||
|
data['IPAdress'] = this.iPAdress;
|
||||||
|
data['SessionID'] = this.sessionID;
|
||||||
|
data['PatientID'] = this.patientID;
|
||||||
|
data['TokenID'] = this.tokenID;
|
||||||
|
data['generalid'] = this.generalid;
|
||||||
|
data['PatientOutSA'] = this.patientOutSA;
|
||||||
|
data['PatientTypeID'] = this.patientTypeID;
|
||||||
|
data['PatientType'] = this.patientType;
|
||||||
|
data['ProjectID'] = this.projectID;
|
||||||
|
if (this.eRTriageInformation != null) {
|
||||||
|
data['ERTriageInformation'] = this.eRTriageInformation.toJson();
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ERTriageInformation {
|
||||||
|
String notes;
|
||||||
|
String chiefComplaint;
|
||||||
|
int patientId;
|
||||||
|
int projectId;
|
||||||
|
int riskScore;
|
||||||
|
List<Checklist> checklist;
|
||||||
|
|
||||||
|
ERTriageInformation(
|
||||||
|
{this.notes,
|
||||||
|
this.chiefComplaint,
|
||||||
|
this.patientId,
|
||||||
|
this.projectId,
|
||||||
|
this.riskScore,
|
||||||
|
this.checklist});
|
||||||
|
|
||||||
|
ERTriageInformation.fromJson(Map<String, dynamic> json) {
|
||||||
|
notes = json['Notes'];
|
||||||
|
chiefComplaint = json['ChiefComplaint'];
|
||||||
|
patientId = json['PatientId'];
|
||||||
|
projectId = json['ProjectId'];
|
||||||
|
riskScore = json['RiskScore'];
|
||||||
|
if (json['checklist'] != null) {
|
||||||
|
checklist = new List<Checklist>();
|
||||||
|
json['checklist'].forEach((v) {
|
||||||
|
checklist.add(new Checklist.fromJson(v));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['Notes'] = this.notes;
|
||||||
|
data['ChiefComplaint'] = this.chiefComplaint;
|
||||||
|
data['PatientId'] = this.patientId;
|
||||||
|
data['ProjectId'] = this.projectId;
|
||||||
|
data['RiskScore'] = this.riskScore;
|
||||||
|
if (this.checklist != null) {
|
||||||
|
data['checklist'] = this.checklist.map((v) => v.toJson()).toList();
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Checklist {
|
||||||
|
int isSelected;
|
||||||
|
int parameterCode;
|
||||||
|
int parameterGroup;
|
||||||
|
int parameterType;
|
||||||
|
int score;
|
||||||
|
|
||||||
|
Checklist(
|
||||||
|
{this.isSelected,
|
||||||
|
this.parameterCode,
|
||||||
|
this.parameterGroup,
|
||||||
|
this.parameterType,
|
||||||
|
this.score});
|
||||||
|
|
||||||
|
Checklist.fromJson(Map<String, dynamic> json) {
|
||||||
|
isSelected = json['IsSelected'];
|
||||||
|
parameterCode = json['ParameterCode'];
|
||||||
|
parameterGroup = json['ParameterGroup'];
|
||||||
|
parameterType = json['ParameterType'];
|
||||||
|
score = json['Score'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['IsSelected'] = this.isSelected;
|
||||||
|
data['ParameterCode'] = this.parameterCode;
|
||||||
|
data['ParameterGroup'] = this.parameterGroup;
|
||||||
|
data['ParameterType'] = this.parameterType;
|
||||||
|
data['Score'] = this.score;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,52 @@
|
|||||||
|
class TriageQuestionsModel {
|
||||||
|
String adultPoints;
|
||||||
|
String headerSequence;
|
||||||
|
int parameterCode;
|
||||||
|
int parameterGroup;
|
||||||
|
int parameterType;
|
||||||
|
String pediaPoints;
|
||||||
|
String question;
|
||||||
|
String questionN;
|
||||||
|
String scoreGroup;
|
||||||
|
String titles;
|
||||||
|
|
||||||
|
TriageQuestionsModel(
|
||||||
|
{this.adultPoints,
|
||||||
|
this.headerSequence,
|
||||||
|
this.parameterCode,
|
||||||
|
this.parameterGroup,
|
||||||
|
this.parameterType,
|
||||||
|
this.pediaPoints,
|
||||||
|
this.question,
|
||||||
|
this.questionN,
|
||||||
|
this.scoreGroup,
|
||||||
|
this.titles});
|
||||||
|
|
||||||
|
TriageQuestionsModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
adultPoints = json['AdultPoints'];
|
||||||
|
headerSequence = json['HeaderSequence'];
|
||||||
|
parameterCode = json['ParameterCode'];
|
||||||
|
parameterGroup = json['ParameterGroup'];
|
||||||
|
parameterType = json['ParameterType'];
|
||||||
|
pediaPoints = json['PediaPoints'];
|
||||||
|
question = json['Question'];
|
||||||
|
questionN = json['QuestionN'];
|
||||||
|
scoreGroup = json['ScoreGroup'];
|
||||||
|
titles = json['Titles'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['AdultPoints'] = this.adultPoints;
|
||||||
|
data['HeaderSequence'] = this.headerSequence;
|
||||||
|
data['ParameterCode'] = this.parameterCode;
|
||||||
|
data['ParameterGroup'] = this.parameterGroup;
|
||||||
|
data['ParameterType'] = this.parameterType;
|
||||||
|
data['PediaPoints'] = this.pediaPoints;
|
||||||
|
data['Question'] = this.question;
|
||||||
|
data['QuestionN'] = this.questionN;
|
||||||
|
data['ScoreGroup'] = this.scoreGroup;
|
||||||
|
data['Titles'] = this.titles;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,204 @@
|
|||||||
|
import 'package:diplomaticquarterapp/config/config.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/service/base_service.dart';
|
||||||
|
import 'package:diplomaticquarterapp/models/anicllary-orders/ancillary_order_list_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/models/anicllary-orders/ancillary_order_proc_model.dart';
|
||||||
|
|
||||||
|
class AncillaryOrdersService extends BaseService {
|
||||||
|
List<AncillaryOrdersListModel> _ancillaryLists = List();
|
||||||
|
List<AncillaryOrdersListModel> get ancillaryLists => _ancillaryLists;
|
||||||
|
List<AncillaryOrdersListProcListModel> _ancillaryProcLists = List();
|
||||||
|
List<AncillaryOrdersListProcListModel> get ancillaryProcLists =>
|
||||||
|
_ancillaryProcLists;
|
||||||
|
|
||||||
|
Future getOrders() async {
|
||||||
|
Map<String, dynamic> body = Map();
|
||||||
|
|
||||||
|
hasError = false;
|
||||||
|
|
||||||
|
await baseAppClient.post(GET_ANCILLARY_ORDERS,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
_ancillaryLists = [];
|
||||||
|
response['AncillaryOrderList'].forEach((item) {
|
||||||
|
ancillaryLists.add(AncillaryOrdersListModel.fromJson(item));
|
||||||
|
});
|
||||||
|
}, onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
}, body: body);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future getOrdersDetails(appointmentNo, orderNo) async {
|
||||||
|
Map<String, dynamic> body = Map();
|
||||||
|
|
||||||
|
hasError = false;
|
||||||
|
|
||||||
|
await baseAppClient.post(GET_ANCILLARY_ORDERS_DETAILS,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
_ancillaryProcLists = [];
|
||||||
|
response['AncillaryOrderProcList'] = [
|
||||||
|
{
|
||||||
|
"AncillaryOrderProcList": [
|
||||||
|
{
|
||||||
|
"ApprovalLineItemNo": 0,
|
||||||
|
"ApprovalNo": 0,
|
||||||
|
"ApprovalStatus": "",
|
||||||
|
"ApprovalStatusID": 0,
|
||||||
|
"CompanyShare": 501.3,
|
||||||
|
"CompanyShareWithTax": 576.5,
|
||||||
|
"CompanyTaxAmount": 75.19,
|
||||||
|
"DiscountAmount": 55.7,
|
||||||
|
"DiscountCategory": 1,
|
||||||
|
"DiscountType": "P",
|
||||||
|
"DiscountTypeValue": 10,
|
||||||
|
"IsApprovalCreated": false,
|
||||||
|
"IsApprovalRequired": false,
|
||||||
|
"IsCovered": false,
|
||||||
|
"OrderDate": "/Date(1601758800000+0300)/",
|
||||||
|
"OrderLineItemNo": 1,
|
||||||
|
"OrderNo": 2020000001,
|
||||||
|
"PartnerID": 0,
|
||||||
|
"PartnerShare": 0,
|
||||||
|
"PartnerShareType": "P",
|
||||||
|
"PatientShare": 0,
|
||||||
|
"PatientShareWithTax": 0,
|
||||||
|
"PatientTaxAmount": 0,
|
||||||
|
"ProcPrice": 557,
|
||||||
|
"ProcedureCategoryID": 2,
|
||||||
|
"ProcedureCategoryName": "LABORATORY",
|
||||||
|
"ProcedureID": "02013001",
|
||||||
|
"ProcedureName": "11-DESOXYCORTISOL (COMPOUND S) - S.O",
|
||||||
|
"TaxAmount": 75.19,
|
||||||
|
"TaxPct": 15
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ApprovalLineItemNo": 0,
|
||||||
|
"ApprovalNo": 0,
|
||||||
|
"ApprovalStatus": "",
|
||||||
|
"ApprovalStatusID": 0,
|
||||||
|
"CompanyShare": 90,
|
||||||
|
"CompanyShareWithTax": 103.5,
|
||||||
|
"CompanyTaxAmount": 13.5,
|
||||||
|
"DiscountAmount": 10,
|
||||||
|
"DiscountCategory": 1,
|
||||||
|
"DiscountType": "P",
|
||||||
|
"DiscountTypeValue": 10,
|
||||||
|
"IsApprovalCreated": false,
|
||||||
|
"IsApprovalRequired": true,
|
||||||
|
"IsCovered": false,
|
||||||
|
"OrderDate": "/Date(1601758800000+0300)/",
|
||||||
|
"OrderLineItemNo": 4,
|
||||||
|
"OrderNo": 2020000001,
|
||||||
|
"PartnerID": 0,
|
||||||
|
"PartnerShare": 0,
|
||||||
|
"PartnerShareType": "P",
|
||||||
|
"PatientShare": 0,
|
||||||
|
"PatientShareWithTax": 0,
|
||||||
|
"PatientTaxAmount": 0,
|
||||||
|
"ProcPrice": 100,
|
||||||
|
"ProcedureCategoryID": 2,
|
||||||
|
"ProcedureCategoryName": "LABORATORY",
|
||||||
|
"ProcedureID": "02014011",
|
||||||
|
"ProcedureName": "CBC (COMPLETE BLOOD COUNT PROFILE)",
|
||||||
|
"TaxAmount": 13.5,
|
||||||
|
"TaxPct": 15
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ApprovalLineItemNo": 0,
|
||||||
|
"ApprovalNo": 0,
|
||||||
|
"ApprovalStatus": "",
|
||||||
|
"ApprovalStatusID": 0,
|
||||||
|
"CompanyShare": 347.76,
|
||||||
|
"CompanyShareWithTax": 399.92,
|
||||||
|
"CompanyTaxAmount": 52.16,
|
||||||
|
"DiscountAmount": 38.64,
|
||||||
|
"DiscountCategory": 1,
|
||||||
|
"DiscountType": "P",
|
||||||
|
"DiscountTypeValue": 10,
|
||||||
|
"IsApprovalCreated": false,
|
||||||
|
"IsApprovalRequired": false,
|
||||||
|
"IsCovered": false,
|
||||||
|
"OrderDate": "/Date(1601758800000+0300)/",
|
||||||
|
"OrderLineItemNo": 3,
|
||||||
|
"OrderNo": 2020000001,
|
||||||
|
"PartnerID": 0,
|
||||||
|
"PartnerShare": 0,
|
||||||
|
"PartnerShareType": "P",
|
||||||
|
"PatientShare": 0,
|
||||||
|
"PatientShareWithTax": 0,
|
||||||
|
"PatientTaxAmount": 0,
|
||||||
|
"ProcPrice": 386.4,
|
||||||
|
"ProcedureCategoryID": 2,
|
||||||
|
"ProcedureCategoryName": "LABORATORY",
|
||||||
|
"ProcedureID": "02019302",
|
||||||
|
"ProcedureName": "21-HYDROXYLASE ABS - S.O",
|
||||||
|
"TaxAmount": 52.16,
|
||||||
|
"TaxPct": 15
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ApprovalLineItemNo": 0,
|
||||||
|
"ApprovalNo": 0,
|
||||||
|
"ApprovalStatus": "",
|
||||||
|
"ApprovalStatusID": 0,
|
||||||
|
"CompanyShare": 1323,
|
||||||
|
"CompanyShareWithTax": 1521.45,
|
||||||
|
"CompanyTaxAmount": 198.45,
|
||||||
|
"DiscountAmount": 147,
|
||||||
|
"DiscountCategory": 1,
|
||||||
|
"DiscountType": "P",
|
||||||
|
"DiscountTypeValue": 10,
|
||||||
|
"IsApprovalCreated": false,
|
||||||
|
"IsApprovalRequired": true,
|
||||||
|
"IsCovered": false,
|
||||||
|
"OrderDate": "/Date(1601758800000+0300)/",
|
||||||
|
"OrderLineItemNo": 5,
|
||||||
|
"OrderNo": 2020000001,
|
||||||
|
"PartnerID": 0,
|
||||||
|
"PartnerShare": 0,
|
||||||
|
"PartnerShareType": "P",
|
||||||
|
"PatientShare": 0,
|
||||||
|
"PatientShareWithTax": 0,
|
||||||
|
"PatientTaxAmount": 0,
|
||||||
|
"ProcPrice": 1470,
|
||||||
|
"ProcedureCategoryID": 3,
|
||||||
|
"ProcedureCategoryName": "RADIOLOGY",
|
||||||
|
"ProcedureID": "03033065",
|
||||||
|
"ProcedureName": "CT SCAN - ABDOMEN (WITH CONTRAST)",
|
||||||
|
"TaxAmount": 198.45,
|
||||||
|
"TaxPct": 15
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"AppointmentDate": "/Date(1601499600000+0300)/",
|
||||||
|
"AppointmentNo": 2016053756,
|
||||||
|
"ClinicID": 1,
|
||||||
|
"ClinicName": "INTERNAL MEDICINE CLINIC",
|
||||||
|
"CompanyID": 0,
|
||||||
|
"CompanyName": "Blood Donation Investigation",
|
||||||
|
"DoctorID": 1485,
|
||||||
|
"DoctorName": "ANAS ABDULLAH",
|
||||||
|
"ErrCode": null,
|
||||||
|
"GroupID": 2,
|
||||||
|
"InsurancePolicyNo": "45976500",
|
||||||
|
"Message": "Success",
|
||||||
|
"PatientCardID": "232332323",
|
||||||
|
"PatientID": 3072055,
|
||||||
|
"PatientName": "MAYA KHALED SADDIQ",
|
||||||
|
"PatientType": 1,
|
||||||
|
"PolicyID": 2,
|
||||||
|
"PolicyName": "Test",
|
||||||
|
"ProjectID": 15,
|
||||||
|
"SetupID": "010266",
|
||||||
|
"StatusCode": 1,
|
||||||
|
"SubCategoryID": 2,
|
||||||
|
"SubPolicyNo": "234234"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
response['AncillaryOrderProcList'].forEach((item) {
|
||||||
|
ancillaryProcLists.add(AncillaryOrdersListProcListModel.fromJson(item));
|
||||||
|
});
|
||||||
|
}, onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
}, body: body);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,96 @@
|
|||||||
|
import 'package:diplomaticquarterapp/config/config.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/model/er/ErPatientShareModel.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/model/er/TriageQuestionsModel.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/service/base_service.dart';
|
||||||
|
|
||||||
|
class EdOnlineServices extends BaseService {
|
||||||
|
List<TriageQuestionsModel> triageQuestionsModelList = List();
|
||||||
|
ErPatientShareModel erPatientShareModel;
|
||||||
|
|
||||||
|
Future getQuestions() async {
|
||||||
|
hasError =false;
|
||||||
|
triageQuestionsModelList.clear();
|
||||||
|
Map<String, dynamic> body = Map();
|
||||||
|
body['ProjectID'] = 15;
|
||||||
|
await baseAppClient.post(ER_GET_VISUAL_TRIAGE_QUESTIONS,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
triageQuestionsModelList.clear();
|
||||||
|
response['ER_TriageQuestionsList'].forEach((questions) {
|
||||||
|
triageQuestionsModelList.add(TriageQuestionsModel.fromJson(questions));
|
||||||
|
});
|
||||||
|
}, onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
}, body: body);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Future getPatientPaymentInformation({var id}) async {
|
||||||
|
hasError =false;
|
||||||
|
await baseAppClient.post(ER_GetPatientPaymentInformationForERClinic,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
erPatientShareModel =
|
||||||
|
ErPatientShareModel.fromJson(response['ER_PatientShare']);
|
||||||
|
}, onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
}, body: Map.from({"ProjectID":15,"ClinicID":10}));
|
||||||
|
}
|
||||||
|
|
||||||
|
Future saveQuestionsInformation(
|
||||||
|
{String notes,
|
||||||
|
String chiefComplaint,
|
||||||
|
int projectId,
|
||||||
|
DateTime selectedTime,
|
||||||
|
List<TriageQuestionsModel> selectedQuestions}) async {
|
||||||
|
hasError =false;
|
||||||
|
Map<String, dynamic> body = Map();
|
||||||
|
List<Map> checklist = List();
|
||||||
|
|
||||||
|
body['ProjectID'] = 15;
|
||||||
|
body['ProjectId'] = projectId;
|
||||||
|
int riskScore = 0;
|
||||||
|
|
||||||
|
if (user.age > 14) {
|
||||||
|
selectedQuestions.forEach((element) {
|
||||||
|
int score = int.parse(element.adultPoints);
|
||||||
|
riskScore += score;
|
||||||
|
checklist.add(Map.from({
|
||||||
|
"IsSelected": 1,
|
||||||
|
"ParameterCode": element.parameterCode,
|
||||||
|
"ParameterGroup": element.parameterGroup,
|
||||||
|
"ParameterType": element.parameterType,
|
||||||
|
"Score": score
|
||||||
|
}));
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
selectedQuestions.forEach((element) {
|
||||||
|
int score = int.parse(element.pediaPoints);
|
||||||
|
riskScore += score;
|
||||||
|
checklist.add(Map.from({
|
||||||
|
"IsSelected": 1,
|
||||||
|
"ParameterCode": element.parameterCode,
|
||||||
|
"ParameterGroup": element.parameterGroup,
|
||||||
|
"ParameterType": element.parameterType,
|
||||||
|
"Score": score
|
||||||
|
}));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
body['ERTriageInformation'] = {
|
||||||
|
"Notes": notes,
|
||||||
|
"ChiefComplaint": chiefComplaint,
|
||||||
|
"PatientId": user.patientID,
|
||||||
|
"ProjectId": 15,
|
||||||
|
"RiskScore": riskScore,
|
||||||
|
"checklist": checklist.map((e) => e).toList()
|
||||||
|
};
|
||||||
|
|
||||||
|
await baseAppClient.post(ER_SAVE_TRIAGE_INFORMATION,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {},
|
||||||
|
onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
}, body: body);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,38 @@
|
|||||||
|
import 'package:diplomaticquarterapp/core/service/ancillary_orders_service.dart';
|
||||||
|
import 'package:diplomaticquarterapp/models/anicllary-orders/ancillary_order_list_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/models/anicllary-orders/ancillary_order_proc_model.dart';
|
||||||
|
|
||||||
|
import 'base_view_model.dart';
|
||||||
|
import '../../locator.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
|
||||||
|
|
||||||
|
class AnciallryOrdersViewModel extends BaseViewModel {
|
||||||
|
bool hasError = false;
|
||||||
|
|
||||||
|
AncillaryOrdersService _ancillaryService = locator<AncillaryOrdersService>();
|
||||||
|
List<AncillaryOrdersListModel> get ancillaryLists =>
|
||||||
|
_ancillaryService.ancillaryLists;
|
||||||
|
List<AncillaryOrdersListProcListModel> get ancillaryListsDetails =>
|
||||||
|
_ancillaryService.ancillaryProcLists;
|
||||||
|
Future getOrders() async {
|
||||||
|
hasError = false;
|
||||||
|
setState(ViewState.Busy);
|
||||||
|
await _ancillaryService.getOrders();
|
||||||
|
if (_ancillaryService.hasError) {
|
||||||
|
error = _ancillaryService.error;
|
||||||
|
setState(ViewState.ErrorLocal);
|
||||||
|
} else
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future getOrdersDetails(appointmentNo, orderNo) async {
|
||||||
|
hasError = false;
|
||||||
|
setState(ViewState.Busy);
|
||||||
|
await _ancillaryService.getOrdersDetails(appointmentNo, orderNo);
|
||||||
|
if (_ancillaryService.hasError) {
|
||||||
|
error = _ancillaryService.error;
|
||||||
|
setState(ViewState.ErrorLocal);
|
||||||
|
} else
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,76 @@
|
|||||||
|
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/model/er/ErPatientShareModel.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/model/er/TriageQuestionsModel.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/service/er/EdOnlineServices.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/service/hospital_service.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
|
||||||
|
|
||||||
|
import '../../../locator.dart';
|
||||||
|
|
||||||
|
class EdOnlineViewModel extends BaseViewModel {
|
||||||
|
HospitalService _hospitalService = locator<HospitalService>();
|
||||||
|
|
||||||
|
EdOnlineServices _edOnlineServices = locator<EdOnlineServices>();
|
||||||
|
|
||||||
|
List<HospitalsModel> get hospitals => _hospitalService.hospitals;
|
||||||
|
|
||||||
|
List<TriageQuestionsModel> get triageQuestionsModelList =>
|
||||||
|
_edOnlineServices.triageQuestionsModelList;
|
||||||
|
|
||||||
|
ErPatientShareModel get erPatientShareModel => _edOnlineServices.erPatientShareModel;
|
||||||
|
|
||||||
|
Future getHospitals() async {
|
||||||
|
if(_hospitalService.hospitals.isEmpty){
|
||||||
|
setState(ViewState.Busy);
|
||||||
|
await _hospitalService.getHospitals();
|
||||||
|
if (_hospitalService.hasError) {
|
||||||
|
error = _hospitalService.error;
|
||||||
|
setState(ViewState.Error);
|
||||||
|
} else
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future getQuestions() async {
|
||||||
|
if(_edOnlineServices.triageQuestionsModelList.isEmpty){
|
||||||
|
setState(ViewState.Busy);
|
||||||
|
await _edOnlineServices.getQuestions();
|
||||||
|
if (_edOnlineServices.hasError) {
|
||||||
|
error = _edOnlineServices.error;
|
||||||
|
setState(ViewState.Error);
|
||||||
|
} else
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future getPatientPaymentInformation({var id}) async {
|
||||||
|
setState(ViewState.Busy);
|
||||||
|
await _edOnlineServices.getPatientPaymentInformation();
|
||||||
|
if (_edOnlineServices.hasError) {
|
||||||
|
error = _edOnlineServices.error;
|
||||||
|
setState(ViewState.Error);
|
||||||
|
} else
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future saveQuestionsInformation(
|
||||||
|
{String notes,
|
||||||
|
String chiefComplaint,
|
||||||
|
int projectId,
|
||||||
|
DateTime selectedTime,
|
||||||
|
List<TriageQuestionsModel> selectedQuestions}) async {
|
||||||
|
setState(ViewState.BusyLocal);
|
||||||
|
await _edOnlineServices.saveQuestionsInformation(
|
||||||
|
notes: notes,
|
||||||
|
projectId: projectId,
|
||||||
|
chiefComplaint: chiefComplaint,
|
||||||
|
selectedTime: selectedTime,
|
||||||
|
selectedQuestions: selectedQuestions);
|
||||||
|
if (_edOnlineServices.hasError) {
|
||||||
|
error = _edOnlineServices.error;
|
||||||
|
setState(ViewState.ErrorLocal);
|
||||||
|
} else
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,105 @@
|
|||||||
|
class AncillaryOrdersListModel {
|
||||||
|
List<AncillaryOrderList> ancillaryOrderList;
|
||||||
|
Null errCode;
|
||||||
|
String message;
|
||||||
|
int patientID;
|
||||||
|
String patientName;
|
||||||
|
int patientType;
|
||||||
|
int projectID;
|
||||||
|
String projectName;
|
||||||
|
String setupID;
|
||||||
|
int statusCode;
|
||||||
|
|
||||||
|
AncillaryOrdersListModel(
|
||||||
|
{this.ancillaryOrderList,
|
||||||
|
this.errCode,
|
||||||
|
this.message,
|
||||||
|
this.patientID,
|
||||||
|
this.patientName,
|
||||||
|
this.patientType,
|
||||||
|
this.projectID,
|
||||||
|
this.projectName,
|
||||||
|
this.setupID,
|
||||||
|
this.statusCode});
|
||||||
|
|
||||||
|
AncillaryOrdersListModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
if (json['AncillaryOrderList'] != null) {
|
||||||
|
ancillaryOrderList = new List<AncillaryOrderList>();
|
||||||
|
json['AncillaryOrderList'].forEach((v) {
|
||||||
|
ancillaryOrderList.add(new AncillaryOrderList.fromJson(v));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
errCode = json['ErrCode'];
|
||||||
|
message = json['Message'];
|
||||||
|
patientID = json['PatientID'];
|
||||||
|
patientName = json['PatientName'];
|
||||||
|
patientType = json['PatientType'];
|
||||||
|
projectID = json['ProjectID'];
|
||||||
|
projectName = json['ProjectName'];
|
||||||
|
setupID = json['SetupID'];
|
||||||
|
statusCode = json['StatusCode'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
if (this.ancillaryOrderList != null) {
|
||||||
|
data['AncillaryOrderList'] =
|
||||||
|
this.ancillaryOrderList.map((v) => v.toJson()).toList();
|
||||||
|
}
|
||||||
|
data['ErrCode'] = this.errCode;
|
||||||
|
data['Message'] = this.message;
|
||||||
|
data['PatientID'] = this.patientID;
|
||||||
|
data['PatientName'] = this.patientName;
|
||||||
|
data['PatientType'] = this.patientType;
|
||||||
|
data['ProjectID'] = this.projectID;
|
||||||
|
data['ProjectName'] = this.projectName;
|
||||||
|
data['SetupID'] = this.setupID;
|
||||||
|
data['StatusCode'] = this.statusCode;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class AncillaryOrderList {
|
||||||
|
String appointmentDate;
|
||||||
|
int appointmentNo;
|
||||||
|
int clinicID;
|
||||||
|
String clinicName;
|
||||||
|
int doctorID;
|
||||||
|
String doctorName;
|
||||||
|
String orderDate;
|
||||||
|
int orderNo;
|
||||||
|
|
||||||
|
AncillaryOrderList(
|
||||||
|
{this.appointmentDate,
|
||||||
|
this.appointmentNo,
|
||||||
|
this.clinicID,
|
||||||
|
this.clinicName,
|
||||||
|
this.doctorID,
|
||||||
|
this.doctorName,
|
||||||
|
this.orderDate,
|
||||||
|
this.orderNo});
|
||||||
|
|
||||||
|
AncillaryOrderList.fromJson(Map<String, dynamic> json) {
|
||||||
|
appointmentDate = json['AppointmentDate'];
|
||||||
|
appointmentNo = json['AppointmentNo'];
|
||||||
|
clinicID = json['ClinicID'];
|
||||||
|
clinicName = json['ClinicName'];
|
||||||
|
doctorID = json['DoctorID'];
|
||||||
|
doctorName = json['DoctorName'];
|
||||||
|
orderDate = json['OrderDate'];
|
||||||
|
orderNo = json['OrderNo'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['AppointmentDate'] = this.appointmentDate;
|
||||||
|
data['AppointmentNo'] = this.appointmentNo;
|
||||||
|
data['ClinicID'] = this.clinicID;
|
||||||
|
data['ClinicName'] = this.clinicName;
|
||||||
|
data['DoctorID'] = this.doctorID;
|
||||||
|
data['DoctorName'] = this.doctorName;
|
||||||
|
data['OrderDate'] = this.orderDate;
|
||||||
|
data['OrderNo'] = this.orderNo;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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,177 @@
|
|||||||
|
import 'package:diplomaticquarterapp/core/viewModels/ancillary_orders_view_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart';
|
||||||
|
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_calculator.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:diplomaticquarterapp/widgets/transitions/fade_page.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
|
||||||
|
|
||||||
|
class AnicllaryOrders extends StatefulWidget {
|
||||||
|
@override
|
||||||
|
_AnicllaryOrdersState createState() => _AnicllaryOrdersState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _AnicllaryOrdersState extends State<AnicllaryOrders>
|
||||||
|
with SingleTickerProviderStateMixin {
|
||||||
|
TabController _tabController;
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
_tabController = TabController(length: 2, vsync: this);
|
||||||
|
}
|
||||||
|
|
||||||
|
void dispose() {
|
||||||
|
super.dispose();
|
||||||
|
_tabController.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return BaseView<AnciallryOrdersViewModel>(
|
||||||
|
onModelReady: (model) => model.getOrders(),
|
||||||
|
builder: (_, model, widget) => AppScaffold(
|
||||||
|
isShowAppBar: true,
|
||||||
|
baseViewModel: model,
|
||||||
|
appBarTitle: TranslationBase.of(context).anicllaryOrders,
|
||||||
|
body: SingleChildScrollView(
|
||||||
|
padding: EdgeInsets.all(12),
|
||||||
|
child: model.ancillaryLists.length > 0
|
||||||
|
? Column(children: [
|
||||||
|
getPatientInfo(model),
|
||||||
|
getAncillaryOrdersList(model)
|
||||||
|
])
|
||||||
|
: SizedBox())));
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget getPatientInfo(AnciallryOrdersViewModel model) {
|
||||||
|
print(model.ancillaryLists);
|
||||||
|
return Padding(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Texts(
|
||||||
|
TranslationBase.of(context).mrn,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 22,
|
||||||
|
),
|
||||||
|
Texts(
|
||||||
|
" : ",
|
||||||
|
fontSize: 20,
|
||||||
|
),
|
||||||
|
Texts(
|
||||||
|
model.ancillaryLists[0].patientID.toString(),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Texts(
|
||||||
|
TranslationBase.of(context).patientName,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 20,
|
||||||
|
),
|
||||||
|
Texts(
|
||||||
|
" : ",
|
||||||
|
fontSize: 20,
|
||||||
|
),
|
||||||
|
Texts(
|
||||||
|
model.ancillaryLists[0].patientName,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Divider()
|
||||||
|
],
|
||||||
|
),
|
||||||
|
padding: EdgeInsets.only(top: 5.0, bottom: 10.0),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget getAncillaryOrdersList(AnciallryOrdersViewModel model) {
|
||||||
|
return Column(
|
||||||
|
children: model.ancillaryLists[0].ancillaryOrderList
|
||||||
|
.map(
|
||||||
|
(item) => InkWell(
|
||||||
|
onTap: () {
|
||||||
|
ancillaryOrdersDetails(item);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border(
|
||||||
|
bottom: BorderSide(
|
||||||
|
width: 0.5,
|
||||||
|
))),
|
||||||
|
padding: EdgeInsets.all(5),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.all(3),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Texts(
|
||||||
|
TranslationBase.of(context)
|
||||||
|
.appointmentNo +
|
||||||
|
' : ',
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
Texts(item.appointmentNo.toString())
|
||||||
|
],
|
||||||
|
)),
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.all(3),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Texts(
|
||||||
|
TranslationBase.of(context)
|
||||||
|
.appointmentDate +
|
||||||
|
' : ',
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
Texts(DateUtil.getFormattedDate(
|
||||||
|
DateUtil.convertStringToDate(
|
||||||
|
item.appointmentDate),
|
||||||
|
"MMM dd,yyyy"))
|
||||||
|
],
|
||||||
|
)),
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.all(3),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Texts(
|
||||||
|
TranslationBase.of(context)
|
||||||
|
.doctorName +
|
||||||
|
' : ',
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
Texts(item.doctorName.toString())
|
||||||
|
],
|
||||||
|
)),
|
||||||
|
Divider(
|
||||||
|
color: Colors.black12,
|
||||||
|
height: 1,
|
||||||
|
)
|
||||||
|
]),
|
||||||
|
Icon(
|
||||||
|
Icons.arrow_right,
|
||||||
|
size: 25,
|
||||||
|
)
|
||||||
|
]))),
|
||||||
|
)
|
||||||
|
.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
ancillaryOrdersDetails(item) {
|
||||||
|
Navigator.push(
|
||||||
|
context,
|
||||||
|
FadePage(
|
||||||
|
page: AnicllaryOrdersDetails(item.appointmentNo, item.orderNo),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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: []));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,76 @@
|
|||||||
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class ConfirmExitPageDialog extends StatelessWidget {
|
||||||
|
final GestureTapCallback onTapYes;
|
||||||
|
final GestureTapCallback onTapNo;
|
||||||
|
|
||||||
|
const ConfirmExitPageDialog({Key key, this.onTapYes, this.onTapNo})
|
||||||
|
: super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return SimpleDialog(
|
||||||
|
contentPadding: EdgeInsets.fromLTRB(28.0, 24.0, 28.0, 0.0),
|
||||||
|
title: Center(
|
||||||
|
child: Texts(
|
||||||
|
TranslationBase.of(context).confirm,
|
||||||
|
color: Colors.black,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
children: [
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Texts(
|
||||||
|
"Are you sure you want to exit this page ?",
|
||||||
|
color: Colors.grey,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 5,
|
||||||
|
),
|
||||||
|
Divider(),
|
||||||
|
SizedBox(
|
||||||
|
height: 5.0,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
InkWell(
|
||||||
|
onTap: () {
|
||||||
|
onTapNo();
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
child: Center(
|
||||||
|
child: Texts(
|
||||||
|
TranslationBase.of(context).no,
|
||||||
|
color: Colors.red,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
InkWell(
|
||||||
|
onTap: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
onTapYes();
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
child: Center(
|
||||||
|
child: Texts(TranslationBase.of(context).yes),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 20.0,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,120 @@
|
|||||||
|
import 'package:diplomaticquarterapp/core/model/er/TriageInformationRequest.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/model/er/TriageQuestionsModel.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
import 'EdOnlineAgreementPage.dart';
|
||||||
|
import 'EdOnlineNotesPage.dart';
|
||||||
|
import 'EdOnlineQuestionsPage.dart';
|
||||||
|
import 'EdOnlineSelectedHospitalPage.dart';
|
||||||
|
import 'EdPaymentInformationPage.dart';
|
||||||
|
import 'ConfirmExitPageDialog.dart';
|
||||||
|
|
||||||
|
class DdServicesPage extends StatefulWidget {
|
||||||
|
@override
|
||||||
|
_DdServicesPageState createState() => _DdServicesPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _DdServicesPageState extends State<DdServicesPage> {
|
||||||
|
PageController pageController;
|
||||||
|
|
||||||
|
bool isAgree = false;
|
||||||
|
TriageInformationRequest triageInformationRequest = new TriageInformationRequest();
|
||||||
|
|
||||||
|
List<TriageQuestionsModel> selectedQuestions = List();
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
pageController = new PageController();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
_changePageViewIndex(int tab) {
|
||||||
|
setState(() {
|
||||||
|
pageController.jumpToPage(tab);
|
||||||
|
pageController.animateToPage(tab,
|
||||||
|
duration: Duration(milliseconds: 800), curve: Curves.easeOutQuart);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
ProjectViewModel projectViewModel = Provider.of(context);
|
||||||
|
return Scaffold(
|
||||||
|
appBar: AppBar(
|
||||||
|
elevation: 0,
|
||||||
|
textTheme: TextTheme(
|
||||||
|
headline6: TextStyle(
|
||||||
|
color: Theme.of(context).textTheme.headline1.color,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
),
|
||||||
|
title: Text(
|
||||||
|
'ED Online',
|
||||||
|
style: TextStyle(
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: Theme.of(context).textTheme.headline1.color,
|
||||||
|
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans'),
|
||||||
|
// bold: true,
|
||||||
|
// color: Colors.white,
|
||||||
|
),
|
||||||
|
leading: Builder(
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return IconButton(
|
||||||
|
icon: Icon(Icons.arrow_back),
|
||||||
|
color: Theme.of(context).textTheme.headline1.color,
|
||||||
|
onPressed: () {
|
||||||
|
showConfirmMessage(context);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
centerTitle: true,
|
||||||
|
),
|
||||||
|
body: PageView(
|
||||||
|
physics: NeverScrollableScrollPhysics(),
|
||||||
|
controller: pageController,
|
||||||
|
onPageChanged: _changePageViewIndex,
|
||||||
|
children: [
|
||||||
|
EdOnlineSelectedHospitalPage(
|
||||||
|
changePageViewIndex: _changePageViewIndex,
|
||||||
|
triageInformationRequest: triageInformationRequest,
|
||||||
|
),
|
||||||
|
EdOnlineAgreementPage(
|
||||||
|
changePageViewIndex: _changePageViewIndex,
|
||||||
|
isAgree: isAgree,
|
||||||
|
),
|
||||||
|
EdOnlineQuestionsPage(
|
||||||
|
changePageViewIndex: _changePageViewIndex,
|
||||||
|
selectedQuestions: selectedQuestions,
|
||||||
|
),
|
||||||
|
EdOnlineNotesPage(
|
||||||
|
changePageViewIndex: _changePageViewIndex,
|
||||||
|
selectedQuestions: selectedQuestions,
|
||||||
|
triageInformationRequest: triageInformationRequest,
|
||||||
|
),
|
||||||
|
EdPaymentInformationPage(selectedHospital: triageInformationRequest.selectedHospital,)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void showConfirmMessage(
|
||||||
|
BuildContext context,
|
||||||
|
) {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
child: ConfirmExitPageDialog(
|
||||||
|
onTapYes: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
onTapNo: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,99 @@
|
|||||||
|
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class EdOnlineAgreementPage extends StatefulWidget {
|
||||||
|
final HospitalsModel selectedHospital;
|
||||||
|
final Function changePageViewIndex;
|
||||||
|
bool isAgree;
|
||||||
|
EdOnlineAgreementPage({Key key, this.selectedHospital, this.changePageViewIndex,this.isAgree}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_EdOnlineAgreementPageState createState() => _EdOnlineAgreementPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _EdOnlineAgreementPageState extends State<EdOnlineAgreementPage> {
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return AppScaffold(
|
||||||
|
body: SingleChildScrollView(
|
||||||
|
physics: BouncingScrollPhysics(),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
SizedBox(),
|
||||||
|
InkWell(
|
||||||
|
onTap: (){
|
||||||
|
setState(() {
|
||||||
|
widget.isAgree = !widget.isAgree;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Checkbox(
|
||||||
|
value: widget.isAgree,
|
||||||
|
activeColor: Colors.red[800],
|
||||||
|
onChanged: (bool newValue) {
|
||||||
|
setState(() {
|
||||||
|
widget.isAgree = !widget.isAgree;
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
Expanded(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(20.0),
|
||||||
|
child: Texts(
|
||||||
|
TranslationBase.of(context).onlineCheckInAgreement,
|
||||||
|
fontSize: 15,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
bottomSheet: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Container(
|
||||||
|
height: 56,
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(left: 5,right: 5),
|
||||||
|
child: SecondaryButton(
|
||||||
|
textColor: Colors.white,
|
||||||
|
color: Theme.of(context).primaryColor,
|
||||||
|
label: TranslationBase.of(context).back.toUpperCase(),
|
||||||
|
onTap: () => widget.changePageViewIndex(0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(width: 10,),
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(left: 5,right: 5),
|
||||||
|
child: SecondaryButton(
|
||||||
|
textColor: Colors.white,
|
||||||
|
color: Theme.of(context).primaryColor,
|
||||||
|
label: TranslationBase.of(context).next.toUpperCase(),
|
||||||
|
disabled: !widget.isAgree,
|
||||||
|
onTap: () => widget.changePageViewIndex(2),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,177 @@
|
|||||||
|
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/model/er/TriageInformationRequest.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/model/er/TriageQuestionsModel.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/viewModels/er/EdOnlineViewModel.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/pages/Blood/new_text_Field.dart';
|
||||||
|
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_datetime_picker/flutter_datetime_picker.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
class EdOnlineNotesPage extends StatefulWidget {
|
||||||
|
final List<TriageQuestionsModel> selectedQuestions;
|
||||||
|
final Function changePageViewIndex;
|
||||||
|
TriageInformationRequest triageInformationRequest;
|
||||||
|
EdOnlineNotesPage(
|
||||||
|
{Key key, this.selectedQuestions, this.changePageViewIndex,this.triageInformationRequest})
|
||||||
|
;
|
||||||
|
|
||||||
|
@override
|
||||||
|
_EdOnlineNotesPageState createState() => _EdOnlineNotesPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _EdOnlineNotesPageState extends State<EdOnlineNotesPage> {
|
||||||
|
TextEditingController _chiefComplaintsTextController =
|
||||||
|
TextEditingController();
|
||||||
|
TextEditingController _noteTextController = TextEditingController();
|
||||||
|
DateTime selectedTime;
|
||||||
|
final _formKey = GlobalKey<FormState>();
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
ProjectViewModel projectViewModel = Provider.of(context);
|
||||||
|
return BaseView<EdOnlineViewModel>(
|
||||||
|
builder: (_, model, w) => AppScaffold(
|
||||||
|
baseViewModel: model,
|
||||||
|
body: SingleChildScrollView(
|
||||||
|
physics: BouncingScrollPhysics(),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Form(
|
||||||
|
key: _formKey,
|
||||||
|
child: NewTextFields(
|
||||||
|
controller: _chiefComplaintsTextController,
|
||||||
|
maxLines: 15,
|
||||||
|
minLines: 5,
|
||||||
|
hintText: TranslationBase.of(context).chiefComplaints,
|
||||||
|
validator: (value) {
|
||||||
|
if (value.isEmpty) return TranslationBase.of(context).errorChiefComplaints;
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 8,
|
||||||
|
),
|
||||||
|
InkWell(
|
||||||
|
onTap: () {
|
||||||
|
DatePicker.showDateTimePicker(
|
||||||
|
context,
|
||||||
|
showTitleActions: true,
|
||||||
|
minTime: DateTime.now(),
|
||||||
|
maxTime: DateTime.now().add(Duration(hours: 24)),
|
||||||
|
onConfirm: (date) {
|
||||||
|
setState(() {
|
||||||
|
selectedTime = date;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
currentTime: DateTime.now(),
|
||||||
|
locale: projectViewModel.localeType,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
padding: EdgeInsets.all(12),
|
||||||
|
width: double.infinity,
|
||||||
|
// height: 65,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
color: Colors.white),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Texts(selectedTime == null ?TranslationBase.of(context).errorExpectedArrivalTime:TranslationBase.of(context).expectedArrivalTime),
|
||||||
|
Texts(getDate(context)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 8,
|
||||||
|
),
|
||||||
|
NewTextFields(
|
||||||
|
controller: _noteTextController,
|
||||||
|
maxLines: 15,
|
||||||
|
minLines: 5,
|
||||||
|
hintText: TranslationBase.of(context).notes,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
bottomSheet: Container(
|
||||||
|
height: 56,
|
||||||
|
margin: EdgeInsets.only(bottom: 5),
|
||||||
|
width: double.infinity,
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(left: 5,right: 5),
|
||||||
|
child: SecondaryButton(
|
||||||
|
textColor: Colors.white,
|
||||||
|
color: Theme.of(context).primaryColor,
|
||||||
|
label: TranslationBase.of(context).back.toUpperCase(),
|
||||||
|
onTap: () => widget.changePageViewIndex(2),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(width: 10,),
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(left: 5,right: 5),
|
||||||
|
child: SecondaryButton(
|
||||||
|
textColor: Colors.white,
|
||||||
|
color: Theme.of(context).primaryColor,
|
||||||
|
label: TranslationBase.of(context).save.toUpperCase(),
|
||||||
|
disabled: selectedTime == null,
|
||||||
|
onTap: () async {
|
||||||
|
if (_formKey.currentState.validate()) {
|
||||||
|
GifLoaderDialogUtils.showMyDialog(context);
|
||||||
|
model.saveQuestionsInformation(
|
||||||
|
chiefComplaint:
|
||||||
|
_chiefComplaintsTextController.text.toString(),
|
||||||
|
notes: _noteTextController.text.toString(),
|
||||||
|
selectedQuestions: widget.selectedQuestions,
|
||||||
|
projectId: widget.triageInformationRequest.projectID,selectedTime: selectedTime).then((value) {
|
||||||
|
GifLoaderDialogUtils.hideDialog(context);
|
||||||
|
if(model.state == ViewState.ErrorLocal)
|
||||||
|
AppToast.showErrorToast(message: model.error);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
widget.changePageViewIndex(4);
|
||||||
|
}
|
||||||
|
|
||||||
|
}).catchError((onError){
|
||||||
|
GifLoaderDialogUtils.hideDialog(context);
|
||||||
|
AppToast.showErrorToast(message: onError.toString());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
getDate(BuildContext context) {
|
||||||
|
String message = "";
|
||||||
|
if (selectedTime != null) {
|
||||||
|
message = "${selectedTime.hour}:${selectedTime.minute}";
|
||||||
|
}
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,127 @@
|
|||||||
|
import 'package:diplomaticquarterapp/core/model/er/TriageQuestionsModel.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/viewModels/er/EdOnlineViewModel.dart';
|
||||||
|
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
// ignore: must_be_immutable
|
||||||
|
class EdOnlineQuestionsPage extends StatefulWidget {
|
||||||
|
final HospitalsModel selectedHospital;
|
||||||
|
final Function changePageViewIndex;
|
||||||
|
List<TriageQuestionsModel> selectedQuestions;
|
||||||
|
|
||||||
|
EdOnlineQuestionsPage({Key key, this.selectedHospital,this.selectedQuestions, this.changePageViewIndex});
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
_EdOnlineQuestionsPageState createState() => _EdOnlineQuestionsPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _EdOnlineQuestionsPageState extends State<EdOnlineQuestionsPage> {
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return BaseView<EdOnlineViewModel>(
|
||||||
|
onModelReady: (model) => model.getQuestions(),
|
||||||
|
builder: (_, model, w) => AppScaffold(
|
||||||
|
baseViewModel: model,
|
||||||
|
body: SingleChildScrollView(
|
||||||
|
physics: BouncingScrollPhysics(),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
...List.generate(
|
||||||
|
model.triageQuestionsModelList.length,
|
||||||
|
(index) =>
|
||||||
|
InkWell(
|
||||||
|
onTap: (){
|
||||||
|
setState(() {
|
||||||
|
if (widget.selectedQuestions
|
||||||
|
.contains(model.triageQuestionsModelList[index])) {
|
||||||
|
widget.selectedQuestions
|
||||||
|
.remove(model.triageQuestionsModelList[index]);
|
||||||
|
} else {
|
||||||
|
widget.selectedQuestions
|
||||||
|
.add(model.triageQuestionsModelList[index]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Checkbox(
|
||||||
|
value: widget.selectedQuestions.contains(model.triageQuestionsModelList[index]),
|
||||||
|
activeColor: Colors.red[800],
|
||||||
|
onChanged: (bool newValue) {
|
||||||
|
setState(() {
|
||||||
|
if (widget.selectedQuestions
|
||||||
|
.contains(model.triageQuestionsModelList[index])) {
|
||||||
|
widget.selectedQuestions
|
||||||
|
.remove(model.triageQuestionsModelList[index]);
|
||||||
|
} else {
|
||||||
|
widget.selectedQuestions
|
||||||
|
.add(model.triageQuestionsModelList[index]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
Expanded(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(20.0),
|
||||||
|
child: Texts(
|
||||||
|
model.triageQuestionsModelList[index].question,
|
||||||
|
fontSize: 15,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
),
|
||||||
|
SizedBox(height: 80,)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
bottomSheet: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Container(
|
||||||
|
height: 56,
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(left: 5,right: 5),
|
||||||
|
child: SecondaryButton(
|
||||||
|
textColor: Colors.white,
|
||||||
|
color: Theme.of(context).primaryColor,
|
||||||
|
label: TranslationBase.of(context).back.toUpperCase(),
|
||||||
|
onTap: () => widget.changePageViewIndex(1),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(width: 10,),
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(left: 5,right: 5),
|
||||||
|
child: SecondaryButton(
|
||||||
|
textColor: Colors.white,
|
||||||
|
color: Theme.of(context).primaryColor,
|
||||||
|
label: TranslationBase.of(context).next.toUpperCase(),
|
||||||
|
disabled: widget.selectedQuestions.isEmpty,
|
||||||
|
onTap: () => widget.changePageViewIndex(3),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,102 @@
|
|||||||
|
import 'package:diplomaticquarterapp/core/model/er/TriageInformationRequest.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/viewModels/er/EdOnlineViewModel.dart';
|
||||||
|
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import '../../../Constants.dart';
|
||||||
|
|
||||||
|
|
||||||
|
class EdOnlineSelectedHospitalPage extends StatefulWidget {
|
||||||
|
final Function changePageViewIndex;
|
||||||
|
TriageInformationRequest triageInformationRequest;
|
||||||
|
|
||||||
|
EdOnlineSelectedHospitalPage(
|
||||||
|
{Key key, this.changePageViewIndex,this.triageInformationRequest})
|
||||||
|
: super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_EdOnlineSelectedHospitalPageState createState() =>
|
||||||
|
_EdOnlineSelectedHospitalPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _EdOnlineSelectedHospitalPageState
|
||||||
|
extends State<EdOnlineSelectedHospitalPage> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return BaseView<EdOnlineViewModel>(
|
||||||
|
onModelReady: (model) => model.getHospitals(),
|
||||||
|
builder: (_, model, w) => AppScaffold(
|
||||||
|
baseViewModel: model,
|
||||||
|
body: SingleChildScrollView(
|
||||||
|
physics: BouncingScrollPhysics(),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
...List.generate(
|
||||||
|
model.hospitals.length,
|
||||||
|
(index) => Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 2,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: <Widget>[
|
||||||
|
Expanded(
|
||||||
|
flex: 1,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
widget.triageInformationRequest.selectedHospital = model.hospitals[index];
|
||||||
|
widget.triageInformationRequest.projectID = model.hospitals[index].iD;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: ListTile(
|
||||||
|
title: Text(model.hospitals[index].name +
|
||||||
|
' ${model.hospitals[index].distanceInKilometers} ' +
|
||||||
|
TranslationBase.of(context).km),
|
||||||
|
leading: Radio(
|
||||||
|
value: model.hospitals[index],
|
||||||
|
groupValue: widget.triageInformationRequest.selectedHospital,
|
||||||
|
activeColor: secondaryColor,
|
||||||
|
onChanged: (value) {
|
||||||
|
setState(() {
|
||||||
|
widget.triageInformationRequest.selectedHospital = model.hospitals[index];
|
||||||
|
widget.triageInformationRequest.projectID = model.hospitals[index].iD;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 5.0,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
bottomSheet: Container(
|
||||||
|
height: 76,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: SecondaryButton(
|
||||||
|
// textColor: Colors.white,
|
||||||
|
color: Theme.of(context).primaryColor,
|
||||||
|
label: TranslationBase.of(context).next.toUpperCase(),
|
||||||
|
disabled: widget.triageInformationRequest.selectedHospital==null,
|
||||||
|
onTap: () => widget.changePageViewIndex(1)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,112 @@
|
|||||||
|
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/viewModels/er/EdOnlineViewModel.dart';
|
||||||
|
import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart';
|
||||||
|
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class EdPaymentInformationPage extends StatefulWidget {
|
||||||
|
final HospitalsModel selectedHospital;
|
||||||
|
|
||||||
|
const EdPaymentInformationPage({Key key, this.selectedHospital}) : super(key: key);
|
||||||
|
@override
|
||||||
|
_EdPaymentInformationPageState createState() =>
|
||||||
|
_EdPaymentInformationPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _EdPaymentInformationPageState extends State<EdPaymentInformationPage> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return BaseView<EdOnlineViewModel>(
|
||||||
|
onModelReady: (model) => model.getPatientPaymentInformation(),
|
||||||
|
builder: (_, model, w) => AppScaffold(
|
||||||
|
baseViewModel: model,
|
||||||
|
body: SingleChildScrollView(
|
||||||
|
physics: BouncingScrollPhysics(),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
|
color: Colors.white),
|
||||||
|
margin: EdgeInsets.fromLTRB(0.0, 30.0, 0.0, 5.0),
|
||||||
|
padding: EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 20.0),
|
||||||
|
child: Column(
|
||||||
|
children: <Widget>[
|
||||||
|
Container(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
margin:
|
||||||
|
EdgeInsets.only(left: 0.0, right: 20.0, top: 30.0),
|
||||||
|
child: Text(TranslationBase.of(context).testFee,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.black,
|
||||||
|
fontSize: 22.0,
|
||||||
|
fontWeight: FontWeight.bold)),
|
||||||
|
),
|
||||||
|
if(model.erPatientShareModel!=null)
|
||||||
|
Table(
|
||||||
|
children: [
|
||||||
|
TableRow(children: [
|
||||||
|
TableCell(
|
||||||
|
child:
|
||||||
|
Texts(TranslationBase.of(context).testFee)),
|
||||||
|
TableCell(
|
||||||
|
child: Texts(model
|
||||||
|
.erPatientShareModel.patientShare
|
||||||
|
.toStringAsFixed(2))),
|
||||||
|
]),
|
||||||
|
TableRow(children: [
|
||||||
|
TableCell(
|
||||||
|
child: Texts(
|
||||||
|
TranslationBase.of(context).patientTaxToDo)),
|
||||||
|
TableCell(
|
||||||
|
child: Texts(model
|
||||||
|
.erPatientShareModel.patientTaxAmount
|
||||||
|
.toStringAsFixed(2))),
|
||||||
|
]),
|
||||||
|
TableRow(children: [
|
||||||
|
TableCell(
|
||||||
|
child: Texts(TranslationBase.of(context)
|
||||||
|
.patientShareTotalToDo)),
|
||||||
|
TableCell(
|
||||||
|
child: Texts(model
|
||||||
|
.erPatientShareModel.patientShareWithTax
|
||||||
|
.toStringAsFixed(2))),
|
||||||
|
]),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
bottomSheet: Container(
|
||||||
|
height: 76,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: SecondaryButton(
|
||||||
|
color: Theme.of(context).primaryColor,
|
||||||
|
label: TranslationBase.of(context).next.toUpperCase(),
|
||||||
|
onTap: () {
|
||||||
|
Navigator.push(context, FadePage(page: PaymentMethod())).then(
|
||||||
|
(value) {
|
||||||
|
//TODO Haroun call API here
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,170 @@
|
|||||||
|
import 'package:diplomaticquarterapp/core/model/pharmacy/categorise_parent_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/viewModels/pharmacy_categorise_view_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/input/text_field.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/others/network_base_view.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
|
||||||
|
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class ProcedureListWidget extends StatefulWidget {
|
||||||
|
final PharmacyCategoriseViewModel model;
|
||||||
|
final Function addSelectedHistories;
|
||||||
|
final Function(CategoriseParentModel) removeHistory;
|
||||||
|
final Function(CategoriseParentModel) addHistory;
|
||||||
|
final Function(CategoriseParentModel) addRemarks;
|
||||||
|
|
||||||
|
final bool Function(CategoriseParentModel) isEntityListSelected;
|
||||||
|
final List<CategoriseParentModel> masterList;
|
||||||
|
|
||||||
|
ProcedureListWidget(
|
||||||
|
{Key key,
|
||||||
|
this.model,
|
||||||
|
this.addSelectedHistories,
|
||||||
|
this.removeHistory,
|
||||||
|
this.masterList,
|
||||||
|
this.addHistory,
|
||||||
|
this.isEntityListSelected,
|
||||||
|
this.addRemarks})
|
||||||
|
: super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_ProcedureListWidgetState createState() => _ProcedureListWidgetState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _ProcedureListWidgetState extends State<ProcedureListWidget> {
|
||||||
|
int selectedType = 0;
|
||||||
|
int typeUrgent;
|
||||||
|
int typeRegular;
|
||||||
|
|
||||||
|
setSelectedType(int val) {
|
||||||
|
setState(() {
|
||||||
|
selectedType = val;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
List<CategoriseParentModel> items = List();
|
||||||
|
List<String> remarksList = List();
|
||||||
|
List<int> typeList = List();
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
items.addAll(widget.masterList);
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
TextEditingController remarksController = TextEditingController();
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
NetworkBaseView(
|
||||||
|
baseViewModel: widget.model,
|
||||||
|
child: Container(
|
||||||
|
height: MediaQuery.of(context).size.height * 0.35,
|
||||||
|
child: Center(
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(top: 15),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
color: Colors.white),
|
||||||
|
child: ListView(
|
||||||
|
children: [
|
||||||
|
// TextFields(
|
||||||
|
// hintText:
|
||||||
|
// 'sss', //TranslationBase.of(context).searchProcedures,
|
||||||
|
// suffixIcon: EvaIcons.search,
|
||||||
|
// onChanged: (value) {
|
||||||
|
// filterSearchResults(value);
|
||||||
|
// },
|
||||||
|
// ),
|
||||||
|
SizedBox(
|
||||||
|
height: 15,
|
||||||
|
),
|
||||||
|
items.length != 0
|
||||||
|
? Column(
|
||||||
|
children: items.map((historyInfo) {
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Checkbox(
|
||||||
|
value: widget.isEntityListSelected(
|
||||||
|
historyInfo),
|
||||||
|
activeColor: Colors.red[800],
|
||||||
|
onChanged: (bool newValue) {
|
||||||
|
setState(() {
|
||||||
|
if (widget.isEntityListSelected(
|
||||||
|
historyInfo)) {
|
||||||
|
widget
|
||||||
|
.removeHistory(historyInfo);
|
||||||
|
} else {
|
||||||
|
widget.addHistory(historyInfo);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
Expanded(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 10, vertical: 0),
|
||||||
|
child: Texts(historyInfo.name,
|
||||||
|
variant: "bodyText",
|
||||||
|
bold: true,
|
||||||
|
color: Colors.black),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Divider(
|
||||||
|
height: 1,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}).toList(),
|
||||||
|
)
|
||||||
|
: Center(
|
||||||
|
child: Container(
|
||||||
|
child: AppText(
|
||||||
|
"There's no procedures for this category",
|
||||||
|
color: Color(0xFFB9382C)),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void filterSearchResults(String query) {
|
||||||
|
List<CategoriseParentModel> dummySearchList = List();
|
||||||
|
dummySearchList.addAll(widget.masterList);
|
||||||
|
if (query.isNotEmpty) {
|
||||||
|
List<CategoriseParentModel> dummyListData = List();
|
||||||
|
dummySearchList.forEach((item) {
|
||||||
|
if (item.name.toLowerCase().contains(query.toLowerCase())) {
|
||||||
|
dummyListData.add(item);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
setState(() {
|
||||||
|
items.clear();
|
||||||
|
items.addAll(dummyListData);
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
setState(() {
|
||||||
|
items.clear();
|
||||||
|
items.addAll(widget.masterList);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue