Merge branch 'development' into soap-objective-feature-re-design

merge-requests/445/head
mosazaid 4 years ago
commit 8b6b7fe2e6

@ -247,7 +247,6 @@ const GET_PRESCRIPTION_REPORT_ENH =
'Services/Patients.svc/REST/GetPrescriptionReport_enh';
const GET_PHARMACY_LIST = "Services/Patients.svc/REST/GetPharmcyList";
var selectedPatientType = 1;
//*********change value to decode json from Dropdown ************

@ -517,7 +517,7 @@ const Map<String, Map<String, String>> localizedValues = {
'addHistory': {'en': "Add History", 'ar': "اضافه تاريخ مرضي"},
'searchHistory': {'en': "Search History", 'ar': " البحث"},
'addSelectedHistories': {
'en': "add selected histories",
'en': "Add Selected Histories",
'ar': " اضافه تاريخ مرضي"
},
'addAllergies': {'en': "Add Allergies", 'ar': "أضف الحساسية"},
@ -829,6 +829,8 @@ const Map<String, Map<String, String>> localizedValues = {
"typeHereToReply": {
"en": "Type here to reply",
"ar": "اكتب هنا للرد"
},"remove": {
"en": "Remove",
"ar": "حذف"
},
"remove": {"en": "Remove", "ar": " حذف"},
};

@ -1,27 +1,41 @@
class InsuranceApprovalDetails {
class ApporvalDetails {
int approvalNo;
String procedureName;
//String procedureNameN;
String status;
String isInvoicedDesc;
InsuranceApprovalDetails({
this.procedureName,
this.status,
this.isInvoicedDesc,
});
ApporvalDetails(
{this.approvalNo, this.procedureName, this.status, this.isInvoicedDesc});
InsuranceApprovalDetails.fromJson(Map<String, dynamic> json) {
try {
isInvoicedDesc = json['IsInvoicedDesc'];
status = json['Status'];
procedureName = json['ProcedureName'];
} catch (e) {
print(e);
}
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;
}
}
class InsuranceApprovalModel {
InsuranceApprovalDetails approvalDetails;
List<ApporvalDetails> apporvalDetails;
double versionID;
int channel;
int languageID;
@ -75,11 +89,11 @@ class InsuranceApprovalModel {
//this.companyName,
this.expiryDate,
this.rceiptOn,
this.approvalDetails,
this.apporvalDetails,
this.appointmentNo,
this.doctorImage});
InsuranceApprovalDetails x = InsuranceApprovalDetails();
//InsuranceApprovalDetails x = InsuranceApprovalDetails();
InsuranceApprovalModel.fromJson(Map<String, dynamic> json) {
try {
@ -108,8 +122,12 @@ class InsuranceApprovalModel {
doctorName = json['DoctorName'];
doctorImage = json['DoctorImageURL'];
clinicName = json['ClinicName'];
approvalDetails =
InsuranceApprovalDetails.fromJson(json['ApporvalDetails'][0]);
if (json['ApporvalDetails'] != null) {
apporvalDetails = new List<ApporvalDetails>();
json['ApporvalDetails'].forEach((v) {
apporvalDetails.add(new ApporvalDetails.fromJson(v));
});
}
appointmentNo = json['AppointmentNo'];
} catch (e) {
print(e);
@ -143,3 +161,320 @@ class InsuranceApprovalModel {
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;
// }
// }

@ -136,8 +136,10 @@ class SickLeaveService extends BaseService {
onSuccess: (dynamic response, int statusCode) {
offTime = [];
response['MasterLookUpList']['entityList'].forEach((item) => {
if (item['code'] == '1' || item['code'] == '2')
{offTime.add(item)}
//if (item['code'] == '1' || item['code'] == '2')
// {
offTime.add(item)
//}//
});
},
onFailure: (String error, int statusCode) {

@ -801,7 +801,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
MainAxisAlignment.start,
children: <Widget>[
AppText(
model.dashboardItemsList[4]
model.dashboardItemsList[6]
.kPIName,
fontSize:
SizeConfig.textMultiplier *
@ -827,11 +827,11 @@ class _DashboardScreenState extends State<DashboardScreen> {
Axis.horizontal,
children: new List.generate(
model
.dashboardItemsList[4]
.dashboardItemsList[6]
.summaryoptions
.length, (int index) {
return getActivityButton(model
.dashboardItemsList[4]
.dashboardItemsList[6]
.summaryoptions[index]);
})))
],
@ -843,7 +843,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
MainAxisAlignment.start,
children: <Widget>[
AppText(
model.dashboardItemsList[6]
model.dashboardItemsList[4]
.kPIName,
fontSize:
SizeConfig.textMultiplier *
@ -869,11 +869,11 @@ class _DashboardScreenState extends State<DashboardScreen> {
Axis.horizontal,
children: new List.generate(
model
.dashboardItemsList[6]
.dashboardItemsList[4]
.summaryoptions
.length, (int index) {
return getActivityButton(model
.dashboardItemsList[6]
.dashboardItemsList[4]
.summaryoptions[index]);
})))
],
@ -1221,7 +1221,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
Container(
height: 150,
margin: EdgeInsets.all(5),
width: ((SizeConfig.screenWidth * .55) / 5.3),
width: 40,
child: SizedBox(),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10), color: Colors.red[50]),
@ -1233,14 +1233,14 @@ class _DashboardScreenState extends State<DashboardScreen> {
margin: EdgeInsets.all(5),
padding: EdgeInsets.all(10),
height: max != 0 ? (150 * value.value) / max : 0,
width: ((SizeConfig.screenWidth * .55) / 5),
width: 40,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: Colors.red[300]))),
Container(
height: 150,
margin: EdgeInsets.only(left: 10, top: 5),
padding: EdgeInsets.all(8),
margin: EdgeInsets.only(left: 5, top: 5),
padding: EdgeInsets.all(10),
child: RotatedBox(
quarterTurns: 1,
child: Center(

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

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

@ -226,11 +226,11 @@ class _PatientsScreenState extends State<PatientsScreen> {
Widget build(BuildContext context) {
authProvider = Provider.of(context);
_locations = [
TranslationBase.of(context).all,
TranslationBase.of(context).today,
TranslationBase.of(context).tomorrow,
TranslationBase.of(context).nextWeek,
];
//TranslationBase.of(context).all,
projectsProvider = Provider.of(context);
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
@ -449,18 +449,18 @@ class _PatientsScreenState extends State<PatientsScreen> {
},
)),
Padding(
padding: EdgeInsets.only(
top: MediaQuery.of(context)
.size
.height *
0.03),
child: _locationBar(context)
// child: SERVICES_PATIANT2[
// int.parse(patientType)] ==
// "List_MyOutPatient"
// ? _locationBar(context)
// : Container(),
),
padding: EdgeInsets.only(
top: MediaQuery.of(context)
.size
.height *
0.03),
// child: _locationBar(context)
child: SERVICES_PATIANT2[
int.parse(patientType)] ==
"patientArrivalList"
? _locationBar(context)
: Container(),
),
// Row(
// mainAxisAlignment:
// MainAxisAlignment.spaceEvenly,

@ -32,7 +32,8 @@ class PrescriptionsPage extends StatelessWidget {
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
isShowAppBar: true,
appBar: PatientProfileHeaderNewDesignAppBar(patient, arrivalType ?? '0', patientType),
appBar: PatientProfileHeaderNewDesignAppBar(
patient, arrivalType ?? '0', patientType),
body: FractionallySizedBox(
widthFactor: 1.0,
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(
onTap: () {
addPrescriptionForm(

@ -104,13 +104,19 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
@override
Widget build(BuildContext context) {
projectsProvider = Provider.of(context);
offTime = widget.updateData != null
? widget.updateData.requisitionType.toString()
: offTime;
return BaseView<PatientViewModel>(
onModelReady: (model) => model.getClinicsList(),
builder: (_, model, w) => BaseView<SickLeaveViewModel>(
onModelReady: (model2) => {
model2.getOffTime(),
model2.getReasons(18),
model2.getReasons(offTime == '1'
? 18
: offTime == '2'
? 19
: 102),
model2.getCoveringDoctors()
},
builder: (_, model2, w) => GestureDetector(

@ -10,13 +10,14 @@ import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:intl/intl.dart';
class PatientProfileHeaderNewDesignAppBar extends StatelessWidget with PreferredSizeWidget{
class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
with PreferredSizeWidget {
final PatiantInformtion patient;
final String patientType;
final String arrivalType;
PatientProfileHeaderNewDesignAppBar(this.patient, this.patientType, this.arrivalType);
PatientProfileHeaderNewDesignAppBar(
this.patient, this.patientType, this.arrivalType);
@override
Widget build(BuildContext context) {
@ -28,14 +29,16 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget with Preferred
}
return Container(
padding: EdgeInsets.only(
left: 0, right: 5, bottom: 5,),
left: 0,
right: 5,
bottom: 5,
),
decoration: BoxDecoration(
color: Colors.white,
),
height: 200,
child: Container(
padding: EdgeInsets.only(
left: 10, right: 10, bottom: 10),
padding: EdgeInsets.only(left: 10, right: 10, bottom: 10),
margin: EdgeInsets.only(top: 50),
child: Column(
children: [
@ -49,12 +52,12 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget with Preferred
),
Expanded(
child: AppText(
patient.firstName != null ?
(Helpers.capitalize(patient.firstName) +
" " +
Helpers.capitalize(
patient.lastName)) : Helpers.capitalize(patient.patientDetails.fullName),
fontSize: SizeConfig.textMultiplier *2.2,
patient.firstName != null
? (Helpers.capitalize(patient.firstName) +
" " +
Helpers.capitalize(patient.lastName))
: Helpers.capitalize(patient.patientDetails.fullName),
fontSize: SizeConfig.textMultiplier * 2.2,
fontWeight: FontWeight.bold,
backGroundcolor: Colors.white,
fontFamily: 'Poppins',
@ -62,13 +65,13 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget with Preferred
),
gender == 1
? Icon(
DoctorApp.male_2,
color: Colors.blue,
)
DoctorApp.male_2,
color: Colors.blue,
)
: Icon(
DoctorApp.female_1,
color: Colors.pink,
),
DoctorApp.female_1,
color: Colors.pink,
),
]),
),
Row(children: [
@ -79,129 +82,97 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget with Preferred
height: 60,
child: Image.asset(
gender == 1
? 'assets/images/male_avatar.png'
: 'assets/images/female_avatar.png',
fit: BoxFit.cover,
),
? 'assets/images/male_avatar.png'
: 'assets/images/female_avatar.png',
fit: BoxFit.cover,
),
),
SizedBox(
width: 10,
),
Expanded(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
SERVICES_PATIANT2[
int.parse(patientType)] ==
"patientArrivalList"
? Container(
child: Row(
mainAxisAlignment:
MainAxisAlignment
.spaceBetween,
),
SizedBox(
width: 10,
),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SERVICES_PATIANT2[int.parse(patientType)] ==
"patientArrivalList"
? Container(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
patient.patientStatusType ==
43
patient.patientStatusType == 43
? AppText(
TranslationBase.of(
context)
.arrivedP,
color: Colors.green,
fontWeight:
FontWeight.bold,
fontFamily:
'Poppins',
fontSize: 12,
)
TranslationBase.of(context).arrivedP,
color: Colors.green,
fontWeight: FontWeight.bold,
fontFamily: 'Poppins',
fontSize: 12,
)
: AppText(
TranslationBase.of(
context)
.notArrived,
color:
Colors.red[800],
fontWeight:
FontWeight.bold,
fontFamily:
'Poppins',
fontSize: 12,
),
TranslationBase.of(context).notArrived,
color: Colors.red[800],
fontWeight: FontWeight.bold,
fontFamily: 'Poppins',
fontSize: 12,
),
arrivalType == '1'
? AppText(
patient.startTime !=
null
? patient
.startTime
: '',
fontFamily:
'Poppins',
fontWeight:
FontWeight.w600,
)
patient.startTime != null
? patient.startTime
: '',
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
)
: AppText(
patient.arrivedOn!=null? DateUtils.convertStringToDateFormat(
patient.arrivedOn,
'MM-dd-yyyy HH:mm'):'',
fontFamily:
'Poppins',
fontWeight:
FontWeight.w600,
)
],
))
patient.arrivedOn != null
? DateUtils.convertStringToDateFormat(
patient.arrivedOn,
'MM-dd-yyyy HH:mm')
: '',
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
)
],
))
: SizedBox(),
if (SERVICES_PATIANT2[
int.parse(patientType)] ==
if (SERVICES_PATIANT2[int.parse(patientType)] ==
"List_MyOutPatient")
Container(
child: Row(
mainAxisAlignment:
MainAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
AppText(
TranslationBase.of(context)
.appointmentDate +
TranslationBase.of(context).appointmentDate +
" : ",
fontSize: 14,
),
patient.startTime != null
? Container(
height: 15,
width: 60,
decoration:
BoxDecoration(
borderRadius:
BorderRadius
.circular(
25),
color: HexColor(
"#20A169"),
),
child: AppText(
patient.startTime,
color: Colors.white,
fontSize: 1.5 *
SizeConfig
.textMultiplier,
textAlign: TextAlign
.center,
fontWeight:
FontWeight.bold,
),
)
height: 15,
width: 60,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(25),
color: HexColor("#20A169"),
),
child: AppText(
patient.startTime,
color: Colors.white,
fontSize: 1.5 * SizeConfig.textMultiplier,
textAlign: TextAlign.center,
fontWeight: FontWeight.bold,
),
)
: SizedBox(),
SizedBox(
width: 3.5,
),
Container(
child: AppText(
convertDateFormat2(patient.appointmentDate.toString()?? ''),
fontSize: 1.5 *
SizeConfig
.textMultiplier,
fontWeight:
FontWeight.bold,
convertDateFormat2(
patient.appointmentDate.toString() ?? ''),
fontSize: 1.5 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
),
SizedBox(
@ -214,34 +185,23 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget with Preferred
),
),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
RichText(
text: TextSpan(
style: TextStyle(
fontSize: 1.6 *
SizeConfig
.textMultiplier,
fontSize: 1.6 * SizeConfig.textMultiplier,
color: Colors.black),
children: <TextSpan>[
new TextSpan(
text:
TranslationBase.of(
context)
.fileNumber,
text: TranslationBase.of(context).fileNumber,
style: TextStyle(
fontSize: 12,
fontFamily:
'Poppins')),
fontSize: 12, fontFamily: 'Poppins')),
new TextSpan(
text: patient.patientId
.toString(),
text: patient.patientId.toString(),
style: TextStyle(
fontWeight:
FontWeight.w700,
fontFamily:
'Poppins',
fontWeight: FontWeight.w700,
fontFamily: 'Poppins',
fontSize: 14)),
],
),
@ -249,32 +209,23 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget with Preferred
Row(
children: [
AppText(
patient.nationalityName ??
patient.nationality,
patient.nationalityName ?? patient.nationality,
fontWeight: FontWeight.bold,
fontSize: 12,
),
patient.nationality != null
? ClipRRect(
borderRadius:
BorderRadius
.circular(
20.0),
child: Image.network(
patient.nationalityFlagURL,
height: 25,
width: 30,
errorBuilder:
(BuildContext
context,
Object
exception,
StackTrace
stackTrace) {
return Text(
'No Image');
},
))
borderRadius: BorderRadius.circular(20.0),
child: Image.network(
patient.nationalityFlagURL,
height: 25,
width: 30,
errorBuilder: (BuildContext context,
Object exception,
StackTrace stackTrace) {
return Text('No Image');
},
))
: SizedBox()
],
)
@ -284,26 +235,19 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget with Preferred
child: RichText(
text: new TextSpan(
style: new TextStyle(
fontSize: 1.6 *
SizeConfig.textMultiplier,
fontSize: 1.6 * SizeConfig.textMultiplier,
color: Colors.black,
fontFamily: 'Poppins',
),
children: <TextSpan>[
new TextSpan(
text: TranslationBase.of(
context)
.age +
" : ",
style: TextStyle(
fontSize: 14)),
text: TranslationBase.of(context).age + " : ",
style: TextStyle(fontSize: 14)),
new TextSpan(
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(
fontWeight:
FontWeight.w700,
fontSize: 14)),
fontWeight: FontWeight.w700, fontSize: 14)),
],
),
),
@ -330,10 +274,10 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget with Preferred
var date = new DateTime.fromMillisecondsSinceEpoch(
int.parse(str.substring(startIndex + start.length, endIndex)));
newDate = date.year.toString() +
"/" +
date.month.toString().padLeft(2, '0') +
"/" +
date.day.toString().padLeft(2, '0');
"/" +
date.month.toString().padLeft(2, '0') +
"/" +
date.day.toString().padLeft(2, '0');
}
return newDate.toString();
@ -357,7 +301,5 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget with Preferred
}
@override
Size get preferredSize => Size(double.maxFinite,200);
Size get preferredSize => Size(double.maxFinite, 200);
}

@ -11,9 +11,10 @@ class ExpandableSOAPWidget extends StatelessWidget {
final Widget child;
final Function onTap;
final headerTitle;
final bool isRequired;
const ExpandableSOAPWidget(
{Key key, this.isExpanded, this.child, this.onTap, this.headerTitle})
{Key key, this.isExpanded, this.child, this.onTap, this.headerTitle, this.isRequired= true})
: super(key: key);
@override
@ -37,9 +38,10 @@ class ExpandableSOAPWidget extends StatelessWidget {
children: [
Texts(headerTitle,
variant: isExpanded ? "bodyText" : '',
bold: isExpanded ? true : false,
// bold: isExpanded ? true : false,
fontSize: 15,
color: Colors.black),
if(isRequired)
Icon(
FontAwesomeIcons.asterisk,
color: AppGlobal.appPrimaryColor,

@ -0,0 +1,93 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
class PriorityBar extends StatefulWidget {
final Function onTap;
const PriorityBar({Key key, this.onTap}) : super(key: key);
@override
_PriorityBarState createState() => _PriorityBarState();
}
class _PriorityBarState extends State<PriorityBar> {
int _activePriority = 0;
int index = -1;
List<String> _priorities = [
"Family",
"Surgical/Sports",
"Medical",
];
List<String> _prioritiesAr = [
"أسرة",
"جراحي / رياضي",
"طبي",
];
BoxDecoration containerBorderDecoration(
Color containerColor, Color borderColor) {
return BoxDecoration();
}
@override
Widget build(BuildContext context) {
final screenSize = MediaQuery.of(context).size;
ProjectViewModel projectViewModel = Provider.of(context);
return Container(
height: screenSize.height * 0.080,
child: Row(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,
children: _priorities.map((
item,
) {
bool _isActive = _priorities[_activePriority] == item ? true : false;
if (index < 2) {
index++;
}
return Expanded(
child: InkWell(
child: Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
height: screenSize.height * 0.070,
decoration: containerBorderDecoration(
_isActive ? HexColor("#B8382B") : Colors.white,
_isActive ? HexColor("#B8382B") : Colors.white),
child: Center(
child: Text(
(projectViewModel.isArabic)
? _prioritiesAr[index]
: item,
style: TextStyle(
fontSize: 15,
color: Colors.black, //Colors.black,
fontWeight: FontWeight.bold,
),
),
),
),
if(_isActive)
Container(width: 120,height: 4,color: AppGlobal.appPrimaryColor,)
],
),
),
onTap: () {
widget.onTap(_priorities.indexOf(item));
setState(() {
_activePriority = _priorities.indexOf(item);
});
}),
);
}).toList(),
),
);
}
}

@ -1,5 +1,4 @@
import 'package:autocomplete_textfield/autocomplete_textfield.dart';
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
@ -17,6 +16,7 @@ import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dar
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import '../custom_validation_error.dart';
@ -41,21 +41,21 @@ class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidget> {
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields(
hintText: TranslationBase.of(context).addAllergies,
borderColor: HexColor('#707070'),
borderWidth: 0.30,
fontSize: 13.5,
borderRadius: 12,
onTapTextFields: () {
openAllergiesList(context);
},
readOnly: true,
// hintColor: Colors.black,
suffixIcon: EvaIcons.plusCircleOutline,
suffixIconColor: AppGlobal.appPrimaryColor,
suffixIconColor: Color(0xFF2B353E),
fontWeight: FontWeight.w600,
// controller: messageController,
validator: (value) {
if (value == null)
return TranslationBase
.of(context)
.emptyMessage;
return TranslationBase.of(context).emptyMessage;
else
return null;
}),
@ -80,36 +80,59 @@ class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidget> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
child: Texts(
projectViewModel.isArabic
? selectedAllergy.selectedAllergy.nameAr
: selectedAllergy.selectedAllergy.nameEn
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
projectViewModel.isArabic
? selectedAllergy.selectedAllergy.nameAr
: selectedAllergy.selectedAllergy.nameEn
.toUpperCase(),
variant: "bodyText",
textDecoration: selectedAllergy.isChecked
? null
: TextDecoration.lineThrough,
bold: true,
color: Colors.black),
width: MediaQuery.of(context).size.width * 0.5,
// variant: "bodyText",
textDecoration: selectedAllergy.isChecked
? null
: TextDecoration.lineThrough,
bold: true,
color: Color(0xFF2B353E)),
Texts(
projectViewModel.isArabic
? selectedAllergy.selectedAllergySeverity
.nameAr
: selectedAllergy.selectedAllergySeverity
.nameEn
.toUpperCase(),
// variant: "bodyText",
textDecoration: selectedAllergy.isChecked
? null
: TextDecoration.lineThrough,
// bold: true,
color: Color(0xFFCC9B14)),
],
),
width: MediaQuery
.of(context)
.size
.width * 0.5,
),
Texts(
projectViewModel.isArabic
? selectedAllergy.selectedAllergySeverity.nameAr
: selectedAllergy.selectedAllergySeverity.nameEn
.toUpperCase(),
variant: "bodyText",
textDecoration: selectedAllergy.isChecked
? null
: TextDecoration.lineThrough,
bold: true,
color: AppGlobal.appPrimaryColor),
if (selectedAllergy.isChecked)
InkWell(
child: Icon(
FontAwesomeIcons.trash,
color: Colors.grey,
size: 20,
child: Row(
children: [Container(
child: Texts(
TranslationBase
.of(context)
.remove,
fontSize: 15,
variant: "bodyText",
color: HexColor("#B8382C"),),
),
Icon(
FontAwesomeIcons.times,
color: HexColor("#B8382C"),
size: 20,
),
],
),
onTap: () => removeAllergy(selectedAllergy),
)
@ -119,14 +142,6 @@ class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidget> {
padding: const EdgeInsets.symmetric(vertical: 8),
child: Row(
children: [
AppText(
selectedAllergy.remark != null &&
selectedAllergy.remark != ''
? TranslationBase.of(context).remarks + " : "
: '',
fontWeight: FontWeight.bold,
fontSize: 13,
),
Container(
width: MediaQuery.of(context).size.width * 0.55,
child: AppText(

@ -1,4 +1,4 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
@ -17,6 +17,8 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import 'PriorityBar.dart';
class UpdateHistoryWidget extends StatefulWidget {
final List<MySelectedHistory> myHistoryList;
@ -51,20 +53,21 @@ class _UpdateHistoryWidgetState extends State<UpdateHistoryWidget>
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields(
hintText: TranslationBase.of(context).addHistory,
borderColor: HexColor('#707070'),
borderWidth: 0.30,
fontSize: 13.5,
borderRadius: 12,
onTapTextFields: () {
openHistoryList(context);
},
readOnly: true,
// hintColor: Colors.black,
suffixIcon: EvaIcons.plusCircleOutline,
suffixIconColor: AppGlobal.appPrimaryColor,
suffixIconColor: Color(0xFF2B353E),
readOnly: true,
fontWeight: FontWeight.w600,
// controller: messageController,
validator: (value) {
if (value == null)
return TranslationBase.of(context)
.emptyMessage;
return TranslationBase.of(context).emptyMessage;
else
return null;
}),
@ -87,20 +90,41 @@ class _UpdateHistoryWidgetState extends State<UpdateHistoryWidget>
projectViewModel.isArabic
? myHistory.selectedHistory.nameAr
: myHistory.selectedHistory.nameEn,
variant: "bodyText",
fontSize: 15,
textDecoration: myHistory.isChecked
? null
: TextDecoration.lineThrough,
bold: true,
// bold: true,
color: Colors.black),
width: MediaQuery.of(context).size.width * 0.7,
width: MediaQuery
.of(context)
.size
.width * 0.5,
),
if (myHistory.isChecked)
InkWell(
child: Icon(
FontAwesomeIcons.trash,
color: Colors.grey,
size: 20,
child: Row(
children: [
Container(
child: Texts(
TranslationBase
.of(context)
.remove,
fontSize: 15,
variant: "bodyText",
textDecoration: myHistory.isChecked
? null
: TextDecoration.lineThrough,
// bold: true,
color: HexColor("#B8382C"),),
// width: MediaQuery.of(context).size.width * 0.3,
),
Icon(
FontAwesomeIcons.times,
color: HexColor("#B8382C"),
size: 17,
),
],
),
onTap: () => removeHistory(myHistory.selectedHistory),
)
@ -142,111 +166,29 @@ class _UpdateHistoryWidgetState extends State<UpdateHistoryWidget>
openHistoryList(BuildContext context) {
showModalBottomSheet(
backgroundColor: Colors.white,
isDismissible: false,
isScrollControlled: true,
context: context,
builder: (context) {
return AddHistoryDialog(
changePageViewIndex: changePageViewIndex,
controller: _controller,
myHistoryList: widget.myHistoryList,
addSelectedHistories: () {
setState(() {
Navigator.of(context).pop();
});
},
removeHistory: (masterKey) => removeHistory(masterKey),
return FractionallySizedBox(
heightFactor: 1,
child: AddHistoryDialog(
changePageViewIndex: changePageViewIndex,
controller: _controller,
myHistoryList: widget.myHistoryList,
addSelectedHistories: () {
setState(() {
Navigator.of(context).pop();
});
},
removeHistory: (masterKey) => removeHistory(masterKey),
),
);
});
}
}
class PriorityBar extends StatefulWidget {
final Function onTap;
const PriorityBar({Key key, this.onTap}) : super(key: key);
@override
_PriorityBarState createState() => _PriorityBarState();
}
class _PriorityBarState extends State<PriorityBar> {
int _activePriority = 0;
int index =-1;
List<String> _priorities = [
"Family",
"Surgical/Sports",
"Medical",
];
List<String> _prioritiesAr = [
"أسرة",
"جراحي / رياضي" ,
"طبي",
];
BoxDecoration containerBorderDecoration(
Color containerColor, Color borderColor) {
return BoxDecoration(
color: containerColor,
shape: BoxShape.rectangle,
borderRadius: BorderRadius.all(Radius.circular(6)),
border: Border.fromBorderSide(BorderSide(
color: borderColor,
width: 2.0,
)),
);
}
@override
Widget build(BuildContext context) {
final screenSize = MediaQuery.of(context).size;
ProjectViewModel projectViewModel = Provider.of(context);
return Container(
height: screenSize.height * 0.070,
decoration:
containerBorderDecoration(Color(0Xffffffff), Color(0xFFCCCCCC)),
child: Row(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,
children: _priorities.map((item,) {
bool _isActive = _priorities[_activePriority] == item ? true : false;
if(index <2){
index++;
}
return Expanded(
child: InkWell(
child: Center(
child: Container(
height: screenSize.height * 0.070,
decoration: containerBorderDecoration(
_isActive ? HexColor("#B8382B") : Colors.white,
_isActive ? HexColor("#B8382B") : Colors.white),
child: Center(
child: Text(
(projectViewModel.isArabic)?_prioritiesAr[index]: item,
style: TextStyle(
fontSize: 12,
color: _isActive
? Colors.white
: Colors.black, //Colors.black,
fontWeight: FontWeight.bold,
),
),
)),
),
onTap: () {
widget.onTap(_priorities.indexOf(item));
setState(() {
_activePriority = _priorities.indexOf(item);
});
}),
);
}).toList(),
),
);
}
}
class AddHistoryDialog extends StatefulWidget {
final Function changePageViewIndex;
@ -267,7 +209,7 @@ class _AddHistoryDialogState extends State<AddHistoryDialog> {
@override
Widget build(BuildContext context) {
return FractionallySizedBox(
heightFactor: 0.7,
heightFactor: 1,
child: BaseView<SOAPViewModel>(
onModelReady: (model) async {
if (model.historyFamilyList.length == 0) {
@ -288,20 +230,66 @@ class _AddHistoryDialogState extends State<AddHistoryDialog> {
isShowAppBar: false,
body: Center(
child: Container(
child: FractionallySizedBox(
widthFactor: 0.9,
child: Column(
children: [
SizedBox(
height: 10,
child: Column(
children: [
Container(
padding: EdgeInsets.only(
left: 0, right: 5, bottom: 5, top: 5),
decoration: BoxDecoration(
color: Colors.white,
),
PriorityBar(onTap: (activePriority) async {
widget.changePageViewIndex(activePriority);
}),
SizedBox(
height: 20,
),
Expanded(
height: 115,
child: Container(
padding: EdgeInsets.only(
left: 10, right: 10),
margin: EdgeInsets.only(top: 40),
child: Column(
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
RichText(
text: TextSpan(
style: TextStyle(
fontSize:20,
color: Colors.black),
children: <TextSpan>[
new TextSpan(
text: TranslationBase.of(context).addHistory,
style: TextStyle(
color: Color(0xFF2B353E),
fontWeight: FontWeight.bold,
fontFamily: 'Poppins',
fontSize: 20)),
],
),
),
InkWell(
onTap: () {
Navigator.pop(context);
},
child: Icon(FontAwesomeIcons.times,
size: 30,
color: Color(0xFF2B353E)))
],
),
],
),
),
),
SizedBox(
height: 10,
),
PriorityBar(onTap: (activePriority) async {
widget.changePageViewIndex(activePriority);
}),
SizedBox(
height: 20,
),
Expanded(
child: FractionallySizedBox(
widthFactor: 0.9,
child: PageView(
physics: NeverScrollableScrollPhysics(),
controller: widget.controller,
@ -381,9 +369,9 @@ class _AddHistoryDialogState extends State<AddHistoryDialog> {
],
),
),
),
],
),
)),
)),
),
),
));

@ -263,6 +263,7 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
headerTitle: TranslationBase
.of(context)
.histories,
isRequired: false,
onTap: () {
setState(() {
isHistoryExpand = !isHistoryExpand;
@ -285,6 +286,7 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
.of(context)
.allergiesSoap
,
isRequired: false,
onTap: () {
setState(() {
isAllergiesExpand = !isAllergiesExpand;
@ -337,6 +339,7 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
title: TranslationBase
.of(context)
.next,
fontWeight: FontWeight.bold,
loading: model.state == ViewState.BusyLocal,
onPressed: () async {
addSubjectiveInfo(

@ -9,13 +9,13 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/steps_widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/update_assessment_page.dart';
import 'file:///C:/Users/admin/AndroidStudioProjects/doctor_app_flutter/lib/widgets/patients/profile/soap_update/objective/update_objective_page.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/update_plan_page.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../patient-profile-header-new-design.dart';
import 'objective/update_objective_page.dart';
class UpdateSoapIndex extends StatefulWidget {
final bool isUpdate;

@ -75,7 +75,7 @@ class _AppButtonState extends State<AppButton> {
),
)
: AppText(
widget.title.toUpperCase(),
widget.title,
color: widget.fontColor,
fontSize: SizeConfig.textMultiplier * widget.fontSize,
fontWeight: widget.fontWeight,

@ -56,7 +56,9 @@ class DoctorCardInsurance extends StatelessWidget {
topLeft: Radius.circular(10),
bottomLeft: Radius.circular(10),
),
color: approvalStatus == "Approved" ? Color(0xff359846) : Color(0xffD02127),
color: approvalStatus == "Approved"
? Color(0xff359846)
: Color(0xffD02127),
),
),
Expanded(
@ -99,9 +101,9 @@ class DoctorCardInsurance extends StatelessWidget {
children: [
Expanded(
child: Texts(
doctorName,
bold: true,
)),
doctorName,
bold: true,
)),
],
),
Row(

@ -13,6 +13,8 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'app_texts_widget.dart';
class MasterKeyCheckboxSearchWidget extends StatefulWidget {
final SOAPViewModel model;
final Function addSelectedHistories;
@ -49,80 +51,103 @@ class _MasterKeyCheckboxSearchWidgetState extends State<MasterKeyCheckboxSearchW
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return Container(
child: Column(
children: [
Container(
height: MediaQuery.of(context).size.height * 0.5,
child: Center(
child: Container(
margin: EdgeInsets.only(top: 15),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: ListView(
children: [
TextFields(
hintText: widget.hintSearchText ?? TranslationBase
.of(context)
.searchHistory,
suffixIcon: EvaIcons.search,
onChanged: (value) {
filterSearchResults(value);
},
),
SizedBox(height: 15,),
Column(
children: items.map((historyInfo) {
return Column(
children: [
Row(
Expanded(
child: Container(
height: MediaQuery.of(context).size.height * 0.62,
child: Center(
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: ListView(
children: [
TextFields(
hintText: widget.hintSearchText ?? TranslationBase
.of(context)
.searchHistory,
borderWidth: 0.0,
padding: EdgeInsets.all(20),
borderRadius: 0,
suffixIcon: EvaIcons.search,
onChanged: (value) {
filterSearchResults(value);
},
),
// SizedBox(height: 15,),
DividerWithSpacesAround(),
Container(
// padding:EdgeInsets.all(20),
child: Column(
children: items.map((historyInfo) {
return Column(
children: [
Checkbox(
value:
widget.isServiceSelected(historyInfo),
activeColor: Colors.red[800],
onChanged: (bool newValue) {
setState(() {
if (widget
.isServiceSelected(historyInfo)) {
widget.removeHistory(historyInfo);
} else {
widget.addHistory(historyInfo);
}
});
}),
Expanded(
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 10, vertical: 0),
child: Texts(projectViewModel.isArabic
? historyInfo.nameAr!=""?historyInfo.nameAr:historyInfo.nameEn
: historyInfo.nameEn,
variant: "bodyText",
bold: true,
color: Colors.black),
InkWell(
onTap:(){
setState(() {
if (widget
.isServiceSelected(historyInfo)) {
widget.removeHistory(historyInfo);
} else {
widget.addHistory(historyInfo);
}
});
},
child: Row(
children: [
Checkbox(
value:
widget.isServiceSelected(historyInfo),
activeColor: Colors.red[800],
onChanged: (bool newValue) {
setState(() {
if (widget
.isServiceSelected(historyInfo)) {
widget.removeHistory(historyInfo);
} else {
widget.addHistory(historyInfo);
}
});
}),
Expanded(
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 10, vertical: 0),
child: AppText(projectViewModel.isArabic
? historyInfo.nameAr!=""?historyInfo.nameAr:historyInfo.nameEn
: historyInfo.nameEn,
color: Color(0xFF575757),
fontSize: 16,
fontWeight:FontWeight.w600,
),
),
),
],
),
),
// DividerWithSpacesAround(),
],
),
DividerWithSpacesAround(),
],
);
}).toList(),
),
],
),
)),
);
}).toList(),
),
),
],
),
)),
),
),
SizedBox(
height: 10,
),
if (widget.model.state == ViewState.Idle)
AppButton(
title: widget.buttonName?? TranslationBase.of(context).addSelectedHistories.toUpperCase(),
title: widget.buttonName?? TranslationBase.of(context).addSelectedHistories,
padding: 10,
color: Color(0xFF359846),
onPressed: () {
widget.addSelectedHistories();
},

Loading…
Cancel
Save