Merge branches 'development' and 'soap_new_design' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into soap_new_design

merge-requests/444/head
Elham Rababah 5 years ago
commit b70e41a558

@ -152,7 +152,7 @@ class BaseAppClient {
: SETUP_ID; : SETUP_ID;
} }
body['VersionID'] = VERSION_ID; body['VersionID'] = 6.3;
body['Channel'] = CHANNEL; body['Channel'] = CHANNEL;
body['LanguageID'] = languageID == 'ar' ? 1 : 2; body['LanguageID'] = languageID == 'ar' ? 1 : 2;

@ -15,18 +15,18 @@ class InsuranceCardService extends BaseService {
List<InsuranceApprovalModel> get insuranceApproval => _insuranceApproval; List<InsuranceApprovalModel> get insuranceApproval => _insuranceApproval;
Future getInsuranceApproval(PatiantInformtion patient,{int appointmentNo}) async { Future getInsuranceApproval(PatiantInformtion patient,{int appointmentNo , int projectId}) async {
hasError = false; hasError = false;
// _cardList.clear(); // _cardList.clear();
if (appointmentNo != null) { // if (appointmentNo != null) {
_insuranceApprovalModel.appointmentNo = appointmentNo; // _insuranceApprovalModel.appointmentNo = appointmentNo;
_insuranceApprovalModel.eXuldAPPNO = null; // _insuranceApprovalModel.eXuldAPPNO = null;
_insuranceApprovalModel.projectID = null; // _insuranceApprovalModel.projectID = projectId;
} else { // } else {
_insuranceApprovalModel.appointmentNo = null; _insuranceApprovalModel.appointmentNo = null;
_insuranceApprovalModel.eXuldAPPNO = 0; _insuranceApprovalModel.eXuldAPPNO = 0;
_insuranceApprovalModel.projectID = 0; _insuranceApprovalModel.projectID = 0;
} // }
await baseAppClient.postPatient(GET_PAtIENTS_INSURANCE_APPROVALS, await baseAppClient.postPatient(GET_PAtIENTS_INSURANCE_APPROVALS,
patient: patient, patient: patient,

@ -14,12 +14,12 @@ class InsuranceViewModel extends BaseViewModel{
List<InsuranceApprovalModel> get insuranceApproval => List<InsuranceApprovalModel> get insuranceApproval =>
_insuranceCardService.insuranceApproval; _insuranceCardService.insuranceApproval;
Future getInsuranceApproval(PatiantInformtion patient,{int appointmentNo}) async { Future getInsuranceApproval(PatiantInformtion patient,{int appointmentNo, int projectId}) async {
error = ""; error = "";
setState(ViewState.Busy); setState(ViewState.Busy);
if (appointmentNo != null) if (appointmentNo != null)
await _insuranceCardService.getInsuranceApproval(patient, await _insuranceCardService.getInsuranceApproval(patient,
appointmentNo: appointmentNo); appointmentNo: appointmentNo,projectId: projectId);
else else
await _insuranceCardService.getInsuranceApproval(patient); await _insuranceCardService.getInsuranceApproval(patient);
if (_insuranceCardService.hasError) { if (_insuranceCardService.hasError) {

@ -39,14 +39,15 @@ class DoctorReplyScreen extends StatelessWidget {
children: children:
model.listDoctorWorkingHoursTable.map((reply) { model.listDoctorWorkingHoursTable.map((reply) {
return InkWell( return InkWell(
onTap: () { onTap: () {
Navigator.push( // Navigator.push(
context, // context,
MaterialPageRoute( // MaterialPageRoute(
builder: (BuildContext context) => // builder: (BuildContext context) =>
DoctorReplayChat(reply: reply))); // DoctorReplayChat(reply: reply)));
}, },
child: DoctorReplyWidget(reply: reply)); child: DoctorReplyWidget(reply: reply),
);
}).toList(), }).toList(),
) )
], ],

@ -42,7 +42,7 @@ 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) 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(

@ -37,7 +37,7 @@ 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) 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,14 +93,12 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Row( Row(
children: [ children: [
Texts( Texts(
model.insuranceApproval[indexInsurance] model.insuranceApproval[indexInsurance].approvalDetails!=null?
.approvalDetails.status, model.insuranceApproval[indexInsurance].approvalDetails.status ??"":"",
color: color:
model.insuranceApproval[indexInsurance] model.insuranceApproval[indexInsurance].approvalDetails!=null?
.approvalDetails.status == "${model.insuranceApproval[indexInsurance].approvalDetails.status}"
"Approved" == "Approved" ? Color(0xff359846) : Color(0xffD02127): Color(0xffD02127),
? Color(0xff359846)
: Color(0xffD02127),
), ),
], ],
), ),
@ -210,9 +208,7 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Texts('Sample') Texts('Sample')
], ],
), ),
SizedBox(
height: 25.0,
),
Row( Row(
children: [ children: [
Texts( Texts(
@ -315,8 +311,8 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
child: Texts(model child: Texts(model
.insuranceApproval[ .insuranceApproval[
indexInsurance] indexInsurance]
.approvalDetails ?.approvalDetails
.procedureName), ?.procedureName??""),
), ),
Container( Container(
height: MediaQuery.of(context) height: MediaQuery.of(context)
@ -330,8 +326,8 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
child: Texts(model child: Texts(model
.insuranceApproval[ .insuranceApproval[
indexInsurance] indexInsurance]
.approvalDetails ?.approvalDetails
.status), ?.status??""),
), ),
Container( Container(
height: MediaQuery.of(context) height: MediaQuery.of(context)
@ -345,8 +341,8 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
child: Texts(model child: Texts(model
.insuranceApproval[ .insuranceApproval[
indexInsurance] indexInsurance]
.approvalDetails ?.approvalDetails
.isInvoicedDesc), ?.isInvoicedDesc??""),
), ),
], ],
), ),

@ -167,15 +167,23 @@ class _PatientsScreenState extends State<PatientsScreen> {
var strExist = str.length > 0 ? true : false; var strExist = str.length > 0 ? true : false;
if (true) { if (true) {
List<PatiantInformtion> filterDate = []; List<PatiantInformtion> filterDate = [];
String patiantAppointment = "";
for (var i = 0; i < responseModelList2.length; i++) { for (var i = 0; i < responseModelList2.length; i++) {
String patiantAppointment = try {
convertDateFormat(responseModelList[i].appointmentDate); if (responseModelList[i].appointmentDate == "") {
patiantAppointment = responseModelList[i].arrivedOn;
} else {
patiantAppointment =
convertDateFormat(responseModelList[i].appointmentDate);
}
String dateAppointment = checkDate(patiantAppointment); String dateAppointment = checkDate(patiantAppointment);
if (dateAppointment.contains(str)) { if (dateAppointment.contains(str) || str == 'All') {
filterDate.add(responseModelList[i]); filterDate.add(responseModelList[i]);
}
} catch (e) {
print(e);
} }
} }
@ -441,17 +449,18 @@ class _PatientsScreenState extends State<PatientsScreen> {
}, },
)), )),
Padding( Padding(
padding: EdgeInsets.only( padding: EdgeInsets.only(
top: MediaQuery.of(context) top: MediaQuery.of(context)
.size .size
.height * .height *
0.03), 0.03),
child: SERVICES_PATIANT2[ child: _locationBar(context)
int.parse(patientType)] == // child: SERVICES_PATIANT2[
"List_MyOutPatient" // int.parse(patientType)] ==
? _locationBar(context) // "List_MyOutPatient"
: Container(), // ? _locationBar(context)
), // : Container(),
),
// Row( // Row(
// mainAxisAlignment: // mainAxisAlignment:
// MainAxisAlignment.spaceEvenly, // MainAxisAlignment.spaceEvenly,

@ -19,7 +19,13 @@ class RadiologyDetailsPage extends StatelessWidget {
final PatiantInformtion patient; final PatiantInformtion patient;
final String patientType; final String patientType;
final String arrivalType; final String arrivalType;
RadiologyDetailsPage({Key key, this.finalRadiology, this.patient, this.patientType, this.arrivalType});
RadiologyDetailsPage(
{Key key,
this.finalRadiology,
this.patient,
this.patientType,
this.arrivalType});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -30,66 +36,72 @@ class RadiologyDetailsPage extends StatelessWidget {
lineItem: finalRadiology.invoiceLineItemNo, lineItem: finalRadiology.invoiceLineItemNo,
invoiceNo: finalRadiology.invoiceNo), invoiceNo: finalRadiology.invoiceNo),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
appBar: PatientProfileHeaderWhitAppointmentAppBar( appBar: PatientProfileHeaderWhitAppointmentAppBar(
patient: patient, patient: patient,
patientType: patientType??"0", patientType: patientType ?? "0",
arrivalType: arrivalType??"0", arrivalType: arrivalType ?? "0",
orderNo: finalRadiology.orderNo.toString(), appointmentDate: finalRadiology.orderDate,
appointmentDate:finalRadiology.orderDate, doctorName: finalRadiology.doctorName,
doctorName: finalRadiology.doctorName, profileUrl: finalRadiology.doctorImageURL,
profileUrl: finalRadiology.doctorImageURL, invoiceNO: finalRadiology.invoiceNo.toString(),
invoiceNO: finalRadiology.invoiceNo.toString(), ),
), isShowAppBar: true,
isShowAppBar: true, baseViewModel: model,
baseViewModel: model, body: SingleChildScrollView(
body: SingleChildScrollView( child: Column(
child: Column( mainAxisSize: MainAxisSize.max,
mainAxisSize: MainAxisSize.max, crossAxisAlignment: CrossAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, children: <Widget>[
children: <Widget>[ Container(
Container( margin: EdgeInsets.all(8),
margin: EdgeInsets.all(8), decoration: BoxDecoration(
decoration: BoxDecoration( color: Colors.white,
color: Colors.white, borderRadius: BorderRadius.circular(12),
borderRadius: BorderRadius.circular(12), ),
), child: Column(
child: Column( crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, children: [
children: [ SizedBox(
SizedBox(height: 5,), height: 5,
Texts(TranslationBase.of(context).generalResult), ),
SizedBox(height: 5,), Texts(TranslationBase.of(context).generalResult),
Padding( SizedBox(
padding: const EdgeInsets.all(8.0), height: 5,
child: Texts( ),
'${finalRadiology.reportData.trim()}', Padding(
textAlign: TextAlign.start, padding: const EdgeInsets.all(8.0),
fontSize: 17, child: Texts(
color: Colors.grey, '${finalRadiology.reportData.trim()}',
), textAlign: TextAlign.start,
fontSize: 17,
color: Colors.grey,
), ),
SizedBox(height: 25,), ),
if(model.radImageURL.isNotEmpty) SizedBox(
Center( height: 100,
child: Container( ),
width: MediaQuery.of(context).size.width * 0.8,
child: Button(
color: Colors.red, ],
onTap: () {
launch(model.radImageURL);
},
title: TranslationBase.of(context).openRad,
),
),
),
],
),
), ),
], ),
), ],
), ),
),
bottomSheet: model.radImageURL.isNotEmpty ?Container(
width: double.maxFinite,
height: 100,
child: Container(
margin: EdgeInsets.only(left: 35,right: 35,top: 12,bottom: 12),
child: Button(
color: Colors.red,
onTap: () {
launch(model.radImageURL);
},
title: TranslationBase.of(context).openRad,
),
), ),
):null,
),
); );
} }
} }

@ -124,7 +124,6 @@ class RadiologyHomePage extends StatelessWidget {
invoiceNO: '${model.radiologyList[index].invoiceNo}', invoiceNO: '${model.radiologyList[index].invoiceNo}',
branch: '${model.radiologyList[index].projectName}', branch: '${model.radiologyList[index].projectName}',
appointmentDate: model.radiologyList[index].orderDate, appointmentDate: model.radiologyList[index].orderDate,
orderNo: model.radiologyList[index].orderNo.toString(),
), ),
)), )),

@ -100,13 +100,25 @@ class PrescriptionItemsPage extends StatelessWidget {
Row( Row(
children: [ children: [
Texts(TranslationBase.of(context).route,color: Colors.grey,), Texts(TranslationBase.of(context).route,color: Colors.grey,),
Expanded(child: Texts(model.prescriptionReportList[index].routeN)), Expanded(child: Texts(" "+model.prescriptionReportList[index].routeN)),
], ],
), ),
Row( Row(
children: [ children: [
Texts(TranslationBase.of(context).frequency,color: Colors.grey,), Texts(TranslationBase.of(context).frequency,color: Colors.grey,),
Texts(model.prescriptionReportList[index].frequencyN ?? ''), Texts(" "+model.prescriptionReportList[index].frequencyN ?? ''),
],
),
Row(
children: [
Texts(TranslationBase.of(context).dailyDoses,color: Colors.grey,),
Texts(" "+model.prescriptionReportList[index].doseDailyQuantity ?? ''),
],
),
Row(
children: [
Texts(TranslationBase.of(context).duration,color: Colors.grey,),
Texts(" "+model.prescriptionReportList[index].days.toString() ?? ''),
], ],
), ),
SizedBox(height: 12,), SizedBox(height: 12,),
@ -178,13 +190,25 @@ class PrescriptionItemsPage extends StatelessWidget {
Row( Row(
children: [ children: [
Texts(TranslationBase.of(context).route,color: Colors.grey,), Texts(TranslationBase.of(context).route,color: Colors.grey,),
Expanded(child: Texts(model.prescriptionReportEnhList[index].route??'')), Expanded(child: Texts(" "+model.prescriptionReportEnhList[index].route??'')),
], ],
), ),
Row( Row(
children: [ children: [
Texts(TranslationBase.of(context).frequency,color: Colors.grey,), Texts(TranslationBase.of(context).frequency,color: Colors.grey,),
Texts(model.prescriptionReportEnhList[index].frequency ?? ''), Texts(" "+model.prescriptionReportEnhList[index].frequency ?? ''),
],
),
Row(
children: [
Texts(TranslationBase.of(context).dailyDoses,color: Colors.grey,),
Texts(" "+model.prescriptionReportEnhList[index].doseDailyQuantity.toString() ?? ''),
],
),
Row(
children: [
Texts(TranslationBase.of(context).duration,color: Colors.grey,),
Texts(" "+model.prescriptionReportList[index].days.toString() ?? ''),
], ],
), ),
SizedBox(height: 12,), SizedBox(height: 12,),

@ -20,6 +20,12 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget with Preferred
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
int gender = 1;
if (patient.patientDetails != null) {
gender = patient.patientDetails.gender;
} else {
gender = patient.gender;
}
return Container( return Container(
padding: EdgeInsets.only( padding: EdgeInsets.only(
left: 0, right: 5, bottom: 5,), left: 0, right: 5, bottom: 5,),
@ -48,13 +54,13 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget with Preferred
" " + " " +
Helpers.capitalize( Helpers.capitalize(
patient.lastName)) : Helpers.capitalize(patient.patientDetails.fullName), patient.lastName)) : Helpers.capitalize(patient.patientDetails.fullName),
fontSize: SizeConfig.textMultiplier *2.5, fontSize: SizeConfig.textMultiplier *2.2,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
backGroundcolor: Colors.white, backGroundcolor: Colors.white,
fontFamily: 'Poppins', fontFamily: 'Poppins',
), ),
), ),
patient.patientDetails != null ? patient.patientDetails.gender == 1 : patient.gender == 1 gender == 1
? Icon( ? Icon(
DoctorApp.male_2, DoctorApp.male_2,
color: Colors.blue, color: Colors.blue,
@ -72,72 +78,71 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget with Preferred
width: 60, width: 60,
height: 60, height: 60,
child: Image.asset( child: Image.asset(
patient.patientDetails != null ? patient.patientDetails.gender == 1 : patient.gender == 1 gender == 1
? 'assets/images/male_avatar.png' ? 'assets/images/male_avatar.png'
: 'assets/images/female_avatar.png', : 'assets/images/female_avatar.png',
fit: BoxFit.cover, fit: BoxFit.cover,
),
), ),
), ),
), SizedBox(
SizedBox( width: 10,
width: 10, ),
), 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
MainAxisAlignment .spaceBetween,
.spaceBetween, children: [
children: [ patient.patientStatusType ==
patient.patientStatusType == 43
43 ? AppText(
? AppText( TranslationBase.of(
TranslationBase.of( context)
context) .arrivedP,
.arrivedP, color: Colors.green,
color: Colors.green, fontWeight:
fontWeight: FontWeight.bold,
FontWeight.bold, fontFamily:
fontFamily: 'Poppins',
'Poppins', fontSize: 12,
fontSize: 12, )
) : AppText(
: AppText( TranslationBase.of(
TranslationBase.of( context)
context) .notArrived,
.notArrived, color:
color: Colors.red[800],
Colors.red[800], fontWeight:
fontWeight: FontWeight.bold,
FontWeight.bold, fontFamily:
fontFamily: 'Poppins',
'Poppins', fontSize: 12,
fontSize: 12, ),
), arrivalType == '1'
arrivalType == '1' ? AppText(
? AppText( patient.startTime !=
patient.startTime != null
null ? patient
? patient .startTime
.startTime : '',
: '', fontFamily:
fontFamily: 'Poppins',
'Poppins', fontWeight:
fontWeight: FontWeight.w600,
FontWeight.w600, )
) : AppText(
: AppText( patient.arrivedOn!=null? DateUtils.convertStringToDateFormat(
DateUtils.convertStringToDateFormat( patient.arrivedOn,
patient 'MM-dd-yyyy HH:mm'):'',
.arrivedOn,
'MM-dd-yyyy HH:mm'),
fontFamily: fontFamily:
'Poppins', 'Poppins',
fontWeight: fontWeight:

@ -11,25 +11,34 @@ import 'package:hexcolor/hexcolor.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
class PatientProfileHeaderNewDesign extends StatelessWidget { class PatientProfileHeaderNewDesign extends StatelessWidget {
final PatiantInformtion patient; final PatiantInformtion patient;
final String patientType; final String patientType;
final String arrivalType; final String arrivalType;
PatientProfileHeaderNewDesign(this.patient, this.patientType, this.arrivalType); PatientProfileHeaderNewDesign(
this.patient, this.patientType, this.arrivalType);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
int gender = 1;
if (patient.patientDetails != null) {
gender = patient.patientDetails.gender;
} else {
gender = patient.gender;
}
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: [
@ -43,26 +52,26 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
), ),
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.5, fontSize: SizeConfig.textMultiplier * 2.2,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
backGroundcolor: Colors.white, backGroundcolor: Colors.white,
fontFamily: 'Poppins', fontFamily: 'Poppins',
), ),
), ),
patient.patientDetails != null ? patient.patientDetails.gender == 1 : patient.gender == 1 gender == 1
? Icon( ? Icon(
DoctorApp.male_2, DoctorApp.male_2,
color: Colors.blue, color: Colors.blue,
) )
: Icon( : Icon(
DoctorApp.female_1, DoctorApp.female_1,
color: Colors.pink, color: Colors.pink,
), ),
]), ]),
), ),
Row(children: [ Row(children: [
@ -72,7 +81,7 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
width: 60, width: 60,
height: 60, height: 60,
child: Image.asset( child: Image.asset(
patient.patientDetails != null ? patient.patientDetails.gender == 1 : patient.gender == 1 gender == 1
? 'assets/images/male_avatar.png' ? 'assets/images/male_avatar.png'
: 'assets/images/female_avatar.png', : 'assets/images/female_avatar.png',
fit: BoxFit.cover, fit: BoxFit.cover,
@ -84,119 +93,84 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
), ),
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 children: [
.spaceBetween, patient.patientStatusType == 43
children: [ ? AppText(
patient.patientStatusType == TranslationBase.of(context).arrivedP,
43 color: Colors.green,
? AppText( fontWeight: FontWeight.bold,
TranslationBase.of( fontFamily: 'Poppins',
context) fontSize: 12,
.arrivedP, )
color: Colors.green, : AppText(
fontWeight: TranslationBase.of(context).notArrived,
FontWeight.bold, color: Colors.red[800],
fontFamily: fontWeight: FontWeight.bold,
'Poppins', fontFamily: 'Poppins',
fontSize: 12, fontSize: 12,
) ),
: AppText( arrivalType == '1'
TranslationBase.of( ? AppText(
context) patient.startTime != null
.notArrived, ? patient.startTime
color: : '',
Colors.red[800], fontFamily: 'Poppins',
fontWeight: fontWeight: FontWeight.w600,
FontWeight.bold, )
fontFamily: : AppText(
'Poppins', DateUtils.convertStringToDateFormat(
fontSize: 12, patient.arrivedOn,
), 'MM-dd-yyyy HH:mm'),
arrivalType == '1' fontFamily: 'Poppins',
? AppText( fontWeight: FontWeight.w600,
patient.startTime != )
null ],
? patient ))
.startTime
: '',
fontFamily:
'Poppins',
fontWeight:
FontWeight.w600,
)
: AppText(
DateUtils.convertStringToDateFormat(
patient
.arrivedOn,
'MM-dd-yyyy HH:mm'),
fontFamily:
'Poppins',
fontWeight:
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,
), ),
patient.startTime != null patient.startTime != null
? Container( ? Container(
height: 15, height: 15,
width: 60, width: 60,
decoration: decoration: BoxDecoration(
BoxDecoration( borderRadius: BorderRadius.circular(25),
borderRadius: color: HexColor("#20A169"),
BorderRadius ),
.circular( child: AppText(
25), patient.startTime,
color: HexColor( color: Colors.white,
"#20A169"), fontSize: 1.5 * SizeConfig.textMultiplier,
), textAlign: TextAlign.center,
child: AppText( fontWeight: FontWeight.bold,
patient.startTime, ),
color: Colors.white, )
fontSize: 1.5 *
SizeConfig
.textMultiplier,
textAlign: TextAlign
.center,
fontWeight:
FontWeight.bold,
),
)
: SizedBox(), : SizedBox(),
SizedBox( SizedBox(
width: 3.5, width: 3.5,
), ),
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(
@ -209,34 +183,23 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
), ),
), ),
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)),
], ],
), ),
@ -244,32 +207,23 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
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 child: Image.network(
.circular( patient.nationalityFlagURL,
20.0), height: 25,
child: Image.network( width: 30,
patient.nationalityFlagURL, errorBuilder: (BuildContext context,
height: 25, Object exception,
width: 30, StackTrace stackTrace) {
errorBuilder: return Text('No Image');
(BuildContext },
context, ))
Object
exception,
StackTrace
stackTrace) {
return Text(
'No Image');
},
))
: SizedBox() : SizedBox()
], ],
) )
@ -279,26 +233,19 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
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)),
], ],
), ),
), ),
@ -325,10 +272,10 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
var date = new DateTime.fromMillisecondsSinceEpoch( var date = new DateTime.fromMillisecondsSinceEpoch(
int.parse(str.substring(startIndex + start.length, endIndex))); int.parse(str.substring(startIndex + start.length, endIndex)));
newDate = date.year.toString() + newDate = date.year.toString() +
"/" + "/" +
date.month.toString().padLeft(2, '0') + date.month.toString().padLeft(2, '0') +
"/" + "/" +
date.day.toString().padLeft(2, '0'); date.day.toString().padLeft(2, '0');
} }
return newDate.toString(); return newDate.toString();

@ -41,6 +41,13 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
int gender = 1;
if (patient.patientDetails != null) {
gender = patient.patientDetails.gender;
} else {
gender = patient.gender;
}
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return Container( return Container(
padding: EdgeInsets.only( padding: EdgeInsets.only(
@ -70,13 +77,13 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
" " + " " +
Helpers.capitalize( Helpers.capitalize(
patient.lastName)) : Helpers.capitalize(patient.patientDetails.fullName), patient.lastName)) : Helpers.capitalize(patient.patientDetails.fullName),
fontSize: SizeConfig.textMultiplier *2.5, fontSize: SizeConfig.textMultiplier *2.2,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
backGroundcolor: Colors.white, backGroundcolor: Colors.white,
fontFamily: 'Poppins', fontFamily: 'Poppins',
), ),
), ),
patient.patientDetails != null ? patient.patientDetails.gender == 1 : patient.gender == 1 gender == 1
? Icon( ? Icon(
DoctorApp.male_2, DoctorApp.male_2,
color: Colors.blue, color: Colors.blue,
@ -94,7 +101,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
width: 60, width: 60,
height: 60, height: 60,
child: Image.asset( child: Image.asset(
patient.patientDetails != null ? patient.patientDetails.gender == 1 : patient.gender == 1 gender == 1
? 'assets/images/male_avatar.png' ? 'assets/images/male_avatar.png'
: 'assets/images/female_avatar.png', : 'assets/images/female_avatar.png',
fit: BoxFit.cover, fit: BoxFit.cover,

@ -42,6 +42,13 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
int gender = 1;
if (patient.patientDetails != null) {
gender = patient.patientDetails.gender;
} else {
gender = patient.gender;
}
return Container( return Container(
padding: EdgeInsets.only( padding: EdgeInsets.only(
left: 0, right: 5, bottom: 5, top: 5), left: 0, right: 5, bottom: 5, top: 5),
@ -70,13 +77,13 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre
" " + " " +
Helpers.capitalize( Helpers.capitalize(
patient.lastName)) : Helpers.capitalize(patient.patientDetails.fullName), patient.lastName)) : Helpers.capitalize(patient.patientDetails.fullName),
fontSize: SizeConfig.textMultiplier *2.5, fontSize: SizeConfig.textMultiplier *2.2,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
backGroundcolor: Colors.white, backGroundcolor: Colors.white,
fontFamily: 'Poppins', fontFamily: 'Poppins',
), ),
), ),
patient.patientDetails != null ? patient.patientDetails.gender == 1 : patient.gender == 1 gender == 1
? Icon( ? Icon(
DoctorApp.male_2, DoctorApp.male_2,
color: Colors.blue, color: Colors.blue,
@ -94,7 +101,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre
width: 60, width: 60,
height: 60, height: 60,
child: Image.asset( child: Image.asset(
patient.patientDetails != null ? patient.patientDetails.gender == 1 : patient.gender == 1 gender == 1
? 'assets/images/male_avatar.png' ? 'assets/images/male_avatar.png'
: 'assets/images/female_avatar.png', : 'assets/images/female_avatar.png',
fit: BoxFit.cover, fit: BoxFit.cover,

Loading…
Cancel
Save