insurance approvals deatils fix

merge-requests/441/head
hussam al-habibeh 5 years ago
parent 11f2c30c64
commit 1fba6c839c

@ -1,27 +1,41 @@
class InsuranceApprovalDetails { class ApporvalDetails {
int approvalNo;
String procedureName; String procedureName;
//String procedureNameN;
String status; String status;
String isInvoicedDesc; String isInvoicedDesc;
InsuranceApprovalDetails({ ApporvalDetails(
this.procedureName, {this.approvalNo, this.procedureName, this.status, this.isInvoicedDesc});
this.status,
this.isInvoicedDesc, ApporvalDetails.fromJson(Map<String, dynamic> json) {
}); approvalNo = json['ApprovalNo'];
InsuranceApprovalDetails.fromJson(Map<String, dynamic> json) {
try {
isInvoicedDesc = json['IsInvoicedDesc'];
status = json['Status'];
procedureName = json['ProcedureName']; procedureName = json['ProcedureName'];
} catch (e) {
print(e); status = json['Status'];
isInvoicedDesc = json['IsInvoicedDesc'];
} }
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ApprovalNo'] = this.approvalNo;
data['ProcedureName'] = this.procedureName;
data['Status'] = this.status;
data['IsInvoicedDesc'] = this.isInvoicedDesc;
return data;
} }
} }
class InsuranceApprovalModel { class InsuranceApprovalModel {
InsuranceApprovalDetails approvalDetails; List<ApporvalDetails> apporvalDetails;
double versionID; double versionID;
int channel; int channel;
int languageID; int languageID;
@ -75,11 +89,11 @@ class InsuranceApprovalModel {
//this.companyName, //this.companyName,
this.expiryDate, this.expiryDate,
this.rceiptOn, this.rceiptOn,
this.approvalDetails, this.apporvalDetails,
this.appointmentNo, this.appointmentNo,
this.doctorImage}); this.doctorImage});
InsuranceApprovalDetails x = InsuranceApprovalDetails(); //InsuranceApprovalDetails x = InsuranceApprovalDetails();
InsuranceApprovalModel.fromJson(Map<String, dynamic> json) { InsuranceApprovalModel.fromJson(Map<String, dynamic> json) {
try { try {
@ -108,8 +122,12 @@ class InsuranceApprovalModel {
doctorName = json['DoctorName']; doctorName = json['DoctorName'];
doctorImage = json['DoctorImageURL']; doctorImage = json['DoctorImageURL'];
clinicName = json['ClinicName']; clinicName = json['ClinicName'];
approvalDetails = if (json['ApporvalDetails'] != null) {
InsuranceApprovalDetails.fromJson(json['ApporvalDetails'][0]); apporvalDetails = new List<ApporvalDetails>();
json['ApporvalDetails'].forEach((v) {
apporvalDetails.add(new ApporvalDetails.fromJson(v));
});
}
appointmentNo = json['AppointmentNo']; appointmentNo = json['AppointmentNo'];
} catch (e) { } catch (e) {
print(e); print(e);
@ -143,3 +161,320 @@ class InsuranceApprovalModel {
return data; return data;
} }
} }
// class InsuranceApprovalModel {
// String setupID;
// int projectID;
// int approvalNo;
// String approvalDate;
// int patientType;
// int patientID;
// int companyID;
// int subCategoryID;
// int doctorID;
// int clinicID;
// int approvalType;
// Null inpatientApprovalSubType;
// String validFrom;
// Null vaildDays;
// String validTo;
// Null isApprovalOnGross;
// Null isPackage;
// int requestedAmount;
// bool isDentalAllowedBackend;
// int patientTypeID;
//
// String companyApprovalNo;
//
// String submitOn;
// String receiptOn;
//
// int status;
// int eXuldAPPNO;
// String feedbackStatusOn;
// int authorizerID;
// String expiryDate;
// int appointmentNo;
// int admissionNo;
//
// int createdBy;
// String createdOn;
// int editedBy;
// String editedOn;
//
// String extendedOn;
//
// int noOrderAuthorizerID;
// bool isVerbalApproval;
//
// List<ApporvalDetails> apporvalDetails;
// String approvalStatusDescption;
// String clinicName;
//
// //Null companyName;
// String doctorImageURL;
// String doctorName;
//
// int doctorRate;
// String doctorTitle;
// int gender;
// String genderDescription;
// bool isActiveDoctorProfile;
// bool isExecludeDoctor;
// bool isInOutPatient;
// String isInOutPatientDescription;
// String isInOutPatientDescriptionN;
// bool isLiveCareAppointment;
// String projectName;
//
// String qR;
// List<String> speciality;
//
// int totaUnUsedCount;
// int unUsedCount;
//
// InsuranceApprovalModel(
// {this.setupID,
// this.projectID,
// this.approvalNo,
// this.approvalDate,
// this.patientType,
// this.patientID,
// this.companyID,
// this.subCategoryID,
// this.doctorID,
// this.clinicID,
// this.approvalType,
// this.inpatientApprovalSubType,
// this.validFrom,
// this.vaildDays,
// this.validTo,
// this.isApprovalOnGross,
// this.isPackage,
// this.requestedAmount,
// this.patientTypeID,
// this.companyApprovalNo,
// this.eXuldAPPNO,
// this.submitOn,
// this.receiptOn,
// this.status,
// this.feedbackStatusOn,
// this.authorizerID,
// this.expiryDate,
// this.appointmentNo,
// this.admissionNo,
// this.createdBy,
// this.createdOn,
// this.editedBy,
// this.editedOn,
// this.extendedOn,
// this.noOrderAuthorizerID,
// this.isVerbalApproval,
// this.apporvalDetails,
// this.approvalStatusDescption,
// this.clinicName,
// this.doctorImageURL,
// this.doctorName,
// this.doctorRate,
// this.doctorTitle,
// this.gender,
// this.genderDescription,
// this.isActiveDoctorProfile,
// this.isExecludeDoctor,
// this.isInOutPatient,
// this.isInOutPatientDescription,
// this.isInOutPatientDescriptionN,
// this.isLiveCareAppointment,
// this.projectName,
// this.qR,
// this.speciality,
// this.totaUnUsedCount,
// this.unUsedCount,
// this.isDentalAllowedBackend});
//
// InsuranceApprovalModel.fromJson(Map<String, dynamic> json) {
// eXuldAPPNO = json['EXuldAPPNO'];
// setupID = json['SetupID'];
// projectID = json['ProjectID'];
// approvalNo = json['ApprovalNo'];
// approvalDate = json['ApprovalDate'];
// patientType = json['PatientType'];
// patientID = json['PatientID'];
// companyID = json['CompanyID'];
// subCategoryID = json['SubCategoryID'];
// doctorID = json['DoctorID'];
// clinicID = json['ClinicID'];
// approvalType = json['ApprovalType'];
// inpatientApprovalSubType = json['InpatientApprovalSubType'];
// validFrom = json['ValidFrom'];
// vaildDays = json['VaildDays'];
// validTo = json['ValidTo'];
// isApprovalOnGross = json['IsApprovalOnGross'];
// isPackage = json['IsPackage'];
// requestedAmount = json['RequestedAmount'];
//
// companyApprovalNo = json['CompanyApprovalNo'];
//
// submitOn = json['SubmitOn'];
// receiptOn = json['ReceiptOn'];
//
// status = json['Status'];
//
// feedbackStatusOn = json['FeedbackStatusOn'];
// authorizerID = json['AuthorizerID'];
// expiryDate = json['ExpiryDate'];
// appointmentNo = json['AppointmentNo'];
// admissionNo = json['AdmissionNo'];
//
// createdBy = json['CreatedBy'];
// createdOn = json['CreatedOn'];
// editedBy = json['EditedBy'];
// editedOn = json['EditedOn'];
//
// extendedOn = json['ExtendedOn'];
//
// noOrderAuthorizerID = json['NoOrderAuthorizerID'];
// isVerbalApproval = json['isVerbalApproval'];
//
// if (json['ApporvalDetails'] != null) {
// apporvalDetails = new List<ApporvalDetails>();
// json['ApporvalDetails'].forEach((v) {
// apporvalDetails.add(new ApporvalDetails.fromJson(v));
// });
// }
// approvalStatusDescption = json['ApprovalStatusDescption'];
// clinicName = json['ClinicName'];
//
// doctorImageURL = json['DoctorImageURL'];
// doctorName = json['DoctorName'];
//
// doctorRate = json['DoctorRate'];
// doctorTitle = json['DoctorTitle'];
// gender = json['Gender'];
// genderDescription = json['GenderDescription'];
// isActiveDoctorProfile = json['IsActiveDoctorProfile'];
// isExecludeDoctor = json['IsExecludeDoctor'];
// isInOutPatient = json['IsInOutPatient'];
// isInOutPatientDescription = json['IsInOutPatientDescription'];
// isInOutPatientDescriptionN = json['IsInOutPatientDescriptionN'];
// isLiveCareAppointment = json['IsLiveCareAppointment'];
// projectName = json['ProjectName'];
//
// qR = json['QR'];
// speciality = json['Speciality'].cast<String>();
//
// totaUnUsedCount = json['TotaUnUsedCount'];
// unUsedCount = json['UnUsedCount'];
// }
//
// Map<String, dynamic> toJson() {
// final Map<String, dynamic> data = new Map<String, dynamic>();
// data['SetupID'] = this.setupID;
// data['ProjectID'] = this.projectID;
// data['ApprovalNo'] = this.approvalNo;
// data['ApprovalDate'] = this.approvalDate;
// data['PatientType'] = this.patientType;
// data['PatientID'] = this.patientID;
// data['CompanyID'] = this.companyID;
// data['SubCategoryID'] = this.subCategoryID;
// data['DoctorID'] = this.doctorID;
// data['ClinicID'] = this.clinicID;
// data['ApprovalType'] = this.approvalType;
// data['InpatientApprovalSubType'] = this.inpatientApprovalSubType;
// data['ValidFrom'] = this.validFrom;
// data['VaildDays'] = this.vaildDays;
// data['ValidTo'] = this.validTo;
// data['IsApprovalOnGross'] = this.isApprovalOnGross;
// data['IsPackage'] = this.isPackage;
// data['RequestedAmount'] = this.requestedAmount;
//
// data['CompanyApprovalNo'] = this.companyApprovalNo;
//
// data['SubmitOn'] = this.submitOn;
// data['ReceiptOn'] = this.receiptOn;
//
// data['Status'] = this.status;
//
// data['FeedbackStatusOn'] = this.feedbackStatusOn;
// data['AuthorizerID'] = this.authorizerID;
// data['ExpiryDate'] = this.expiryDate;
// data['AppointmentNo'] = this.appointmentNo;
// data['AdmissionNo'] = this.admissionNo;
//
// data['CreatedBy'] = this.createdBy;
// data['CreatedOn'] = this.createdOn;
// data['EditedBy'] = this.editedBy;
// data['EditedOn'] = this.editedOn;
// data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
//
// data['ExtendedOn'] = this.extendedOn;
//
// data['NoOrderAuthorizerID'] = this.noOrderAuthorizerID;
// data['isVerbalApproval'] = this.isVerbalApproval;
//
// if (this.apporvalDetails != null) {
// data['ApporvalDetails'] =
// this.apporvalDetails.map((v) => v.toJson()).toList();
// }
// data['ApprovalStatusDescption'] = this.approvalStatusDescption;
// data['ClinicName'] = this.clinicName;
//
// data['DoctorImageURL'] = this.doctorImageURL;
// data['DoctorName'] = this.doctorName;
// data['EXuldAPPNO'] = this.eXuldAPPNO;
// data['DoctorRate'] = this.doctorRate;
// data['DoctorTitle'] = this.doctorTitle;
// data['Gender'] = this.gender;
// data['GenderDescription'] = this.genderDescription;
// data['IsActiveDoctorProfile'] = this.isActiveDoctorProfile;
// data['IsExecludeDoctor'] = this.isExecludeDoctor;
// data['IsInOutPatient'] = this.isInOutPatient;
// data['IsInOutPatientDescription'] = this.isInOutPatientDescription;
// data['IsInOutPatientDescriptionN'] = this.isInOutPatientDescriptionN;
// data['IsLiveCareAppointment'] = this.isLiveCareAppointment;
// data['ProjectName'] = this.projectName;
//
// data['QR'] = this.qR;
// data['Speciality'] = this.speciality;
//
// data['TotaUnUsedCount'] = this.totaUnUsedCount;
// data['UnUsedCount'] = this.unUsedCount;
// return data;
// }
// }
//
// class ApporvalDetails {
// int approvalNo;
//
// String procedureName;
// //String procedureNameN;
// String status;
//
// String isInvoicedDesc;
//
// ApporvalDetails(
// {this.approvalNo, this.procedureName, this.status, this.isInvoicedDesc});
//
// ApporvalDetails.fromJson(Map<String, dynamic> json) {
// approvalNo = json['ApprovalNo'];
//
// procedureName = json['ProcedureName'];
//
// status = json['Status'];
//
// isInvoicedDesc = json['IsInvoicedDesc'];
// }
//
// Map<String, dynamic> toJson() {
// final Map<String, dynamic> data = new Map<String, dynamic>();
//
// data['ApprovalNo'] = this.approvalNo;
//
// data['ProcedureName'] = this.procedureName;
//
// data['Status'] = this.status;
//
// data['IsInvoicedDesc'] = this.isInvoicedDesc;
// return data;
// }
// }

@ -42,7 +42,8 @@ class _InsuranceApprovalScreenNewState
return BaseView<InsuranceViewModel>( return BaseView<InsuranceViewModel>(
onModelReady: patient.appointmentNo != null onModelReady: patient.appointmentNo != null
? (model) => model.getInsuranceApproval(patient, ? (model) => model.getInsuranceApproval(patient,
appointmentNo: patient.appointmentNo,projectId: patient.projectId) appointmentNo: patient.appointmentNo,
projectId: patient.projectId)
: (model) => model.getInsuranceApproval(patient), : (model) => model.getInsuranceApproval(patient),
builder: (BuildContext context, InsuranceViewModel model, Widget child) => builder: (BuildContext context, InsuranceViewModel model, Widget child) =>
AppScaffold( AppScaffold(
@ -147,7 +148,8 @@ class _InsuranceApprovalScreenNewState
.toString(), .toString(),
isPrescriptions: true, isPrescriptions: true,
approvalStatus: model.insuranceApproval[index] approvalStatus: model.insuranceApproval[index]
.approvalDetails?.status??'', .approvalStatusDescption ??
'',
), ),
), ),
), ),

@ -37,7 +37,8 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
return BaseView<InsuranceViewModel>( return BaseView<InsuranceViewModel>(
onModelReady: patient.appointmentNo != null onModelReady: patient.appointmentNo != null
? (model) => model.getInsuranceApproval(patient, ? (model) => model.getInsuranceApproval(patient,
appointmentNo: patient.appointmentNo,projectId: patient.projectId) appointmentNo: patient.appointmentNo,
projectId: patient.projectId)
: (model) => model.getInsuranceApproval(patient), : (model) => model.getInsuranceApproval(patient),
builder: (BuildContext context, InsuranceViewModel model, Widget child) => builder: (BuildContext context, InsuranceViewModel model, Widget child) =>
AppScaffold( AppScaffold(
@ -93,12 +94,25 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Row( Row(
children: [ children: [
Texts( Texts(
model.insuranceApproval[indexInsurance].approvalDetails!=null? model.insuranceApproval[indexInsurance]
model.insuranceApproval[indexInsurance].approvalDetails.status ??"":"", .approvalStatusDescption !=
color: null
model.insuranceApproval[indexInsurance].approvalDetails!=null? ? model
"${model.insuranceApproval[indexInsurance].approvalDetails.status}" .insuranceApproval[
== "Approved" ? Color(0xff359846) : Color(0xffD02127): Color(0xffD02127), indexInsurance]
.approvalStatusDescption ??
""
: "",
color: model
.insuranceApproval[
indexInsurance]
.approvalStatusDescption !=
null
? "${model.insuranceApproval[indexInsurance].approvalStatusDescption}" ==
"Approved"
? Color(0xff359846)
: Color(0xffD02127)
: Color(0xffD02127),
), ),
], ],
), ),
@ -208,7 +222,6 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Texts('Sample') Texts('Sample')
], ],
), ),
Row( Row(
children: [ children: [
Texts( Texts(
@ -293,59 +306,84 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Padding( Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(
horizontal: 8.0), horizontal: 8.0),
child: ListView.builder(
shrinkWrap: true,
physics: ScrollPhysics(),
itemCount: model
.insuranceApproval[indexInsurance]
.apporvalDetails
.length,
itemBuilder: (BuildContext context,
int index) {
return Container(
child: Row( child: Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.spaceAround, MainAxisAlignment
.spaceAround,
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: [ children: [
Container( Container(
height: MediaQuery.of(context) height:
MediaQuery.of(context)
.size .size
.height * .height *
0.15, //130.0, 0.15, //130.0,
width: MediaQuery.of(context) width:
MediaQuery.of(context)
.size .size
.width * .width *
0.33, 0.33,
child: Texts(model child: Texts(model
.insuranceApproval[ .insuranceApproval[
indexInsurance] indexInsurance]
?.approvalDetails ?.apporvalDetails[
?.procedureName??""), index]
?.procedureName ??
""),
), ),
Container( Container(
height: MediaQuery.of(context) height:
MediaQuery.of(context)
.size .size
.height * .height *
0.15, 0.15,
width: MediaQuery.of(context) width:
MediaQuery.of(context)
.size .size
.width * .width *
0.33, 0.33,
child: Texts(model child: Texts(model
.insuranceApproval[ .insuranceApproval[
indexInsurance] indexInsurance]
?.approvalDetails ?.apporvalDetails[
?.status??""), index]
?.status ??
""),
), ),
Container( Container(
height: MediaQuery.of(context) height:
MediaQuery.of(context)
.size .size
.height * .height *
0.15, 0.15,
width: MediaQuery.of(context) width:
MediaQuery.of(context)
.size .size
.width * .width *
0.21, 0.21,
child: Texts(model child: Texts(model
.insuranceApproval[ .insuranceApproval[
indexInsurance] indexInsurance]
?.approvalDetails ?.apporvalDetails[
?.isInvoicedDesc??""), index]
?.isInvoicedDesc ??
""),
), ),
], ],
), ),
);
}),
), ),
Divider( Divider(
color: Colors.black45, color: Colors.black45,

@ -32,7 +32,8 @@ class PrescriptionsPage extends StatelessWidget {
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: true, isShowAppBar: true,
appBar: PatientProfileHeaderNewDesignAppBar(patient, arrivalType ?? '0', patientType), appBar: PatientProfileHeaderNewDesignAppBar(
patient, arrivalType ?? '0', patientType),
body: FractionallySizedBox( body: FractionallySizedBox(
widthFactor: 1.0, widthFactor: 1.0,
child: ListView( child: ListView(
@ -60,7 +61,9 @@ class PrescriptionsPage extends StatelessWidget {
], ],
), ),
), ),
if (patientType != null && patientType == '7' && patient.patientStatusType == 43) if (patientType != null &&
patientType == '7' &&
patient.patientStatusType == 43)
InkWell( InkWell(
onTap: () { onTap: () {
addPrescriptionForm( addPrescriptionForm(

@ -10,13 +10,14 @@ import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
class PatientProfileHeaderNewDesignAppBar extends StatelessWidget with PreferredSizeWidget{ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
with PreferredSizeWidget {
final PatiantInformtion patient; final PatiantInformtion patient;
final String patientType; final String patientType;
final String arrivalType; final String arrivalType;
PatientProfileHeaderNewDesignAppBar(this.patient, this.patientType, this.arrivalType); PatientProfileHeaderNewDesignAppBar(
this.patient, this.patientType, this.arrivalType);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -28,14 +29,16 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget with Preferred
} }
return Container( return Container(
padding: EdgeInsets.only( padding: EdgeInsets.only(
left: 0, right: 5, bottom: 5,), left: 0,
right: 5,
bottom: 5,
),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
), ),
height: 200, height: 200,
child: Container( child: Container(
padding: EdgeInsets.only( padding: EdgeInsets.only(left: 10, right: 10, bottom: 10),
left: 10, right: 10, bottom: 10),
margin: EdgeInsets.only(top: 50), margin: EdgeInsets.only(top: 50),
child: Column( child: Column(
children: [ children: [
@ -49,12 +52,12 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget with Preferred
), ),
Expanded( Expanded(
child: AppText( child: AppText(
patient.firstName != null ? patient.firstName != null
(Helpers.capitalize(patient.firstName) + ? (Helpers.capitalize(patient.firstName) +
" " + " " +
Helpers.capitalize( Helpers.capitalize(patient.lastName))
patient.lastName)) : Helpers.capitalize(patient.patientDetails.fullName), : Helpers.capitalize(patient.patientDetails.fullName),
fontSize: SizeConfig.textMultiplier *2.2, fontSize: SizeConfig.textMultiplier * 2.2,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
backGroundcolor: Colors.white, backGroundcolor: Colors.white,
fontFamily: 'Poppins', fontFamily: 'Poppins',
@ -90,78 +93,57 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget with Preferred
), ),
Expanded( Expanded(
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start,
children: [ children: [
SERVICES_PATIANT2[ SERVICES_PATIANT2[int.parse(patientType)] ==
int.parse(patientType)] ==
"patientArrivalList" "patientArrivalList"
? Container( ? Container(
child: Row( child: Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.spaceBetween,
MainAxisAlignment
.spaceBetween,
children: [ children: [
patient.patientStatusType == patient.patientStatusType == 43
43
? AppText( ? AppText(
TranslationBase.of( TranslationBase.of(context).arrivedP,
context)
.arrivedP,
color: Colors.green, color: Colors.green,
fontWeight: fontWeight: FontWeight.bold,
FontWeight.bold, fontFamily: 'Poppins',
fontFamily:
'Poppins',
fontSize: 12, fontSize: 12,
) )
: AppText( : AppText(
TranslationBase.of( TranslationBase.of(context).notArrived,
context) color: Colors.red[800],
.notArrived, fontWeight: FontWeight.bold,
color: fontFamily: 'Poppins',
Colors.red[800],
fontWeight:
FontWeight.bold,
fontFamily:
'Poppins',
fontSize: 12, fontSize: 12,
), ),
arrivalType == '1' arrivalType == '1'
? AppText( ? AppText(
patient.startTime != patient.startTime != null
null ? patient.startTime
? patient
.startTime
: '', : '',
fontFamily: fontFamily: 'Poppins',
'Poppins', fontWeight: FontWeight.w600,
fontWeight:
FontWeight.w600,
) )
: AppText( : AppText(
patient.arrivedOn!=null? DateUtils.convertStringToDateFormat( patient.arrivedOn != null
? DateUtils.convertStringToDateFormat(
patient.arrivedOn, patient.arrivedOn,
'MM-dd-yyyy HH:mm'):'', 'MM-dd-yyyy HH:mm')
fontFamily: : '',
'Poppins', fontFamily: 'Poppins',
fontWeight: fontWeight: FontWeight.w600,
FontWeight.w600,
) )
], ],
)) ))
: SizedBox(), : SizedBox(),
if (SERVICES_PATIANT2[ if (SERVICES_PATIANT2[int.parse(patientType)] ==
int.parse(patientType)] ==
"List_MyOutPatient") "List_MyOutPatient")
Container( Container(
child: Row( child: Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.start,
MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
TranslationBase.of(context) TranslationBase.of(context).appointmentDate +
.appointmentDate +
" : ", " : ",
fontSize: 14, fontSize: 14,
), ),
@ -169,25 +151,16 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget with Preferred
? Container( ? Container(
height: 15, height: 15,
width: 60, width: 60,
decoration: decoration: BoxDecoration(
BoxDecoration( borderRadius: BorderRadius.circular(25),
borderRadius: color: HexColor("#20A169"),
BorderRadius
.circular(
25),
color: HexColor(
"#20A169"),
), ),
child: AppText( child: AppText(
patient.startTime, patient.startTime,
color: Colors.white, color: Colors.white,
fontSize: 1.5 * fontSize: 1.5 * SizeConfig.textMultiplier,
SizeConfig textAlign: TextAlign.center,
.textMultiplier, fontWeight: FontWeight.bold,
textAlign: TextAlign
.center,
fontWeight:
FontWeight.bold,
), ),
) )
: SizedBox(), : SizedBox(),
@ -196,12 +169,10 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget with Preferred
), ),
Container( Container(
child: AppText( child: AppText(
convertDateFormat2(patient.appointmentDate.toString()?? ''), convertDateFormat2(
fontSize: 1.5 * patient.appointmentDate.toString() ?? ''),
SizeConfig fontSize: 1.5 * SizeConfig.textMultiplier,
.textMultiplier, fontWeight: FontWeight.bold,
fontWeight:
FontWeight.bold,
), ),
), ),
SizedBox( SizedBox(
@ -214,34 +185,23 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget with Preferred
), ),
), ),
Row( Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.spaceBetween,
MainAxisAlignment.spaceBetween,
children: [ children: [
RichText( RichText(
text: TextSpan( text: TextSpan(
style: TextStyle( style: TextStyle(
fontSize: 1.6 * fontSize: 1.6 * SizeConfig.textMultiplier,
SizeConfig
.textMultiplier,
color: Colors.black), color: Colors.black),
children: <TextSpan>[ children: <TextSpan>[
new TextSpan( new TextSpan(
text: text: TranslationBase.of(context).fileNumber,
TranslationBase.of(
context)
.fileNumber,
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12, fontFamily: 'Poppins')),
fontFamily:
'Poppins')),
new TextSpan( new TextSpan(
text: patient.patientId text: patient.patientId.toString(),
.toString(),
style: TextStyle( style: TextStyle(
fontWeight: fontWeight: FontWeight.w700,
FontWeight.w700, fontFamily: 'Poppins',
fontFamily:
'Poppins',
fontSize: 14)), fontSize: 14)),
], ],
), ),
@ -249,30 +209,21 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget with Preferred
Row( Row(
children: [ children: [
AppText( AppText(
patient.nationalityName ?? patient.nationalityName ?? patient.nationality,
patient.nationality,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 12, fontSize: 12,
), ),
patient.nationality != null patient.nationality != null
? ClipRRect( ? ClipRRect(
borderRadius: borderRadius: BorderRadius.circular(20.0),
BorderRadius
.circular(
20.0),
child: Image.network( child: Image.network(
patient.nationalityFlagURL, patient.nationalityFlagURL,
height: 25, height: 25,
width: 30, width: 30,
errorBuilder: errorBuilder: (BuildContext context,
(BuildContext Object exception,
context, StackTrace stackTrace) {
Object return Text('No Image');
exception,
StackTrace
stackTrace) {
return Text(
'No Image');
}, },
)) ))
: SizedBox() : SizedBox()
@ -284,26 +235,19 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget with Preferred
child: RichText( child: RichText(
text: new TextSpan( text: new TextSpan(
style: new TextStyle( style: new TextStyle(
fontSize: 1.6 * fontSize: 1.6 * SizeConfig.textMultiplier,
SizeConfig.textMultiplier,
color: Colors.black, color: Colors.black,
fontFamily: 'Poppins', fontFamily: 'Poppins',
), ),
children: <TextSpan>[ children: <TextSpan>[
new TextSpan( new TextSpan(
text: TranslationBase.of( text: TranslationBase.of(context).age + " : ",
context) style: TextStyle(fontSize: 14)),
.age +
" : ",
style: TextStyle(
fontSize: 14)),
new TextSpan( new TextSpan(
text: text:
"${DateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth : patient.dateofBirth, context)}", "${DateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth : patient.dateofBirth, context)}",
style: TextStyle( style: TextStyle(
fontWeight: fontWeight: FontWeight.w700, fontSize: 14)),
FontWeight.w700,
fontSize: 14)),
], ],
), ),
), ),
@ -357,7 +301,5 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget with Preferred
} }
@override @override
Size get preferredSize => Size(double.maxFinite,200); Size get preferredSize => Size(double.maxFinite, 200);
} }

@ -56,7 +56,9 @@ class DoctorCardInsurance extends StatelessWidget {
topLeft: Radius.circular(10), topLeft: Radius.circular(10),
bottomLeft: Radius.circular(10), bottomLeft: Radius.circular(10),
), ),
color: approvalStatus == "Approved" ? Color(0xff359846) : Color(0xffD02127), color: approvalStatus == "Approved"
? Color(0xff359846)
: Color(0xffD02127),
), ),
), ),
Expanded( Expanded(

Loading…
Cancel
Save