diff --git a/lib/core/model/insurance_approval.dart b/lib/core/model/insurance_approval.dart index b8a9d2fe..a3717c42 100644 --- a/lib/core/model/insurance_approval.dart +++ b/lib/core/model/insurance_approval.dart @@ -58,6 +58,7 @@ class InsuranceApprovalModel { String approvalStatusDescption; int unUsedCount; String doctorImage; + String projectName; //String companyName; String expiryDate; @@ -91,7 +92,8 @@ class InsuranceApprovalModel { this.rceiptOn, this.apporvalDetails, this.appointmentNo, - this.doctorImage}); + this.doctorImage, + this.projectName}); //InsuranceApprovalDetails x = InsuranceApprovalDetails(); @@ -115,6 +117,7 @@ class InsuranceApprovalModel { deviceTypeID = json['DeviceTypeID']; patientID = json['PatientID']; tokenID = json['TokenID']; + projectName = json['ProjectName']; patientTypeID = json['PatientTypeID']; patientType = json['PatientType']; eXuldAPPNO = json['EXuldAPPNO']; @@ -148,6 +151,7 @@ class InsuranceApprovalModel { data['PatientID'] = this.patientID; data['TokenID'] = this.tokenID; data['DoctorImageURL'] = this.doctorImage; + data['ProjectName'] = this.projectName; data['PatientTypeID'] = this.patientTypeID; data['PatientType'] = this.patientType; diff --git a/lib/icons_app/config.json b/lib/icons_app/config.json index 7c33c9e0..683e03f3 100644 --- a/lib/icons_app/config.json +++ b/lib/icons_app/config.json @@ -2355,6 +2355,34 @@ "search": [ "verify-sms" ] + }, + { + "uid": "efc8c6ed2dab146bc55ca80fdd9bc511", + "css": "124", + "code": 59555, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M315.2 3.2L315.2 3.2A45.2 45.2 0 0 1 322.4 3.2S326 3.2 328.4 3.2H328.4A42.4 42.4 0 0 1 336 3.2H336A26.4 26.4 0 0 1 342 3.2H342A37.6 37.6 0 0 1 346.8 6.8 40 40 0 0 1 353.6 11.6L353.6 11.6 600.8 278.8A40 40 0 0 1 604.4 335.2 40 40 0 0 1 547.6 335.2L370 142.8V920H1250A40 40 0 0 1 1250 1000H330A40 40 0 0 1 290 960V129.2L66.4 329.2A40 40 0 0 1 10 325.6 40 40 0 0 1 0 299.2 40 40 0 0 1 13.2 269.2L304.8 10.4A36.4 36.4 0 0 1 310 7.2 40 40 0 0 1 315.2 3.2Z", + "width": 1290 + }, + "search": [ + "124" + ] + }, + { + "uid": "2251120e332d8914aca7fb2d3fbe00f2", + "css": "123", + "code": 59556, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M773 755.3S773 755.3 773 755.3A38.8 38.8 0 0 0 773 749.5 21.7 21.7 0 0 0 773 745.1V745.1A55.8 55.8 0 0 0 773 739.2H773A25.7 25.7 0 0 0 773 734.6V734.6S770.9 732.1 769.9 730.5A31 31 0 0 0 766.2 725.3H766.2L558.1 529.6A31 31 0 0 0 514.1 531.5 31 31 0 0 0 516 575.2L665.1 713.2H62V31A31 31 0 0 0 0 31V744.2A31 31 0 0 0 31 775.2H675.3L520.3 948.5A31 31 0 1 0 566.8 989.5L766.2 764.7S766.2 762.2 768.4 760.9A33.5 33.5 0 0 0 773 755.3Z", + "width": 775 + }, + "search": [ + "123" + ] } - ] + ] } \ No newline at end of file diff --git a/lib/screens/medical-file/medical_file_details.dart b/lib/screens/medical-file/medical_file_details.dart index bc3323ad..765275b0 100644 --- a/lib/screens/medical-file/medical_file_details.dart +++ b/lib/screens/medical-file/medical_file_details.dart @@ -9,6 +9,7 @@ import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; @@ -26,6 +27,11 @@ class MedicalFileDetails extends StatefulWidget { int encounterNumber; int pp; PatiantInformtion patient; + String clinicName; + String episode; + String doctorName; + String vistDate; + String doctorImage; MedicalFileDetails( {this.age, @@ -34,7 +40,12 @@ class MedicalFileDetails extends StatefulWidget { this.gender, this.encounterNumber, this.pp, - this.patient}); + this.patient, + this.doctorName, + this.vistDate, + this.clinicName, + this.episode, + this.doctorImage}); @override _MedicalFileDetailsState createState() => _MedicalFileDetailsState( @@ -45,6 +56,11 @@ class MedicalFileDetails extends StatefulWidget { encounterNumber: encounterNumber, pp: pp, patient: patient, + clinicName: clinicName, + doctorName: doctorName, + episode: episode, + vistDate: vistDate, + doctorImage: doctorImage, ); } @@ -56,6 +72,11 @@ class _MedicalFileDetailsState extends State { String gender; int pp; PatiantInformtion patient; + String clinicName; + String episode; + String doctorName; + String vistDate; + String doctorImage; _MedicalFileDetailsState( {this.age, @@ -64,7 +85,12 @@ class _MedicalFileDetailsState extends State { this.gender, this.encounterNumber, this.pp, - this.patient}); + this.patient, + this.doctorName, + this.vistDate, + this.clinicName, + this.episode, + this.doctorImage}); bool isPhysicalExam = true; bool isProcedureExpand = true; bool isHistoryExpand = true; @@ -78,8 +104,21 @@ class _MedicalFileDetailsState extends State { builder: (BuildContext context, MedicalFileViewModel model, Widget child) => AppScaffold( - appBar: PatientProfileHeaderNewDesignAppBar( - patient, patient.patientType.toString(), patient.arrivedOn), + appBar: PatientProfileHeaderWhitAppointmentAppBar( + patient: patient, + patientType: patient.patientType.toString() ?? "0", + arrivalType: patient.arrivedOn.toString() ?? 0, + doctorName: doctorName, + profileUrl: doctorImage, + clinic: clinicName, + isPrescriptions: true, + isMedicalFile: true, + episode: episode, + vistDate: + '${DateUtils.getDayMonthYearDateFormatted(DateUtils.getDateTimeFromServerFormat( + vistDate, + ), isArabic: projectViewModel.isArabic)}', + ), isShowAppBar: true, appBarTitle: TranslationBase.of(context).medicalReport.toUpperCase(), body: NetworkBaseView( @@ -105,160 +144,160 @@ class _MedicalFileDetailsState extends State { child: Container( child: Column( children: [ - Container( - width: double.infinity, - margin: EdgeInsets.only( - top: 10, left: 10, right: 10), - padding: EdgeInsets.all(8.0), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.all( - Radius.circular(10.0), - ), - border: Border.all( - color: Colors.grey[200], width: 0.5), - ), - child: Column( - children: [ - Row( - children: [ - if (model.medicalFileList.length != - 0 && - model - .medicalFileList[0] - .entityList[0] - .timelines[ - encounterNumber] - .timeLineEvents[0] - .consulations - .length != - 0) - Expanded( - child: AppText( - model - .medicalFileList[0] - .entityList[0] - .timelines[ - encounterNumber] - .timeLineEvents[0] - .consulations[0] - .doctorName - .toUpperCase(), - fontWeight: FontWeight.w700, - ), - ), - ], - ), - if (model.medicalFileList.length != 0) - Row( - children: [ - AppText( - TranslationBase.of(context) - .clinic + - ": ", - ), - if (model.medicalFileList - .length != - 0 && - model - .medicalFileList[0] - .entityList[0] - .timelines[ - encounterNumber] - .timeLineEvents[0] - .consulations - .length != - 0) - AppText( - model - .medicalFileList[0] - .entityList[0] - .timelines[ - encounterNumber] - .timeLineEvents[0] - .consulations[0] - .clinicName, - fontWeight: FontWeight.w700, - ), - ], - ), - Row( - children: [ - AppText( - TranslationBase.of(context) - .episode + - ": ", - //fontWeight: FontWeight.w700, - ), - if (model.medicalFileList.length != - 0 && - model - .medicalFileList[0] - .entityList[0] - .timelines[ - encounterNumber] - .timeLineEvents[0] - .consulations - .length != - 0) - AppText( - model - .medicalFileList[0] - .entityList[0] - .timelines[encounterNumber] - .timeLineEvents[0] - .consulations[0] - .episodeID - .toString(), - fontWeight: FontWeight.w700, - ), - ], - ), - Row( - children: [ - AppText( - TranslationBase.of(context) - .visitDate + - ": ", - //fontWeight: FontWeight.w700, - ), - if (model.medicalFileList.length != - 0 && - model - .medicalFileList[0] - .entityList[0] - .timelines[ - encounterNumber] - .timeLineEvents[0] - .consulations - .length != - 0) - AppText( - '${DateUtils.getDayMonthYearDateFormatted(DateUtils.getDateTimeFromServerFormat( - model - .medicalFileList[0] - .entityList[0] - .timelines[ - encounterNumber] - .date, - ), isArabic: projectViewModel.isArabic)}', - color: Colors.black, - fontWeight: FontWeight.w700, - fontSize: 14, - ), - SizedBox(width: 35.0), - // AppText( - // 'Appt Date : ', - // fontWeight: FontWeight.w700, - // ), - // AppText( - // '23/12/2020', - // ), - ], - ), - ], - ), - ), + // Container( + // width: double.infinity, + // margin: EdgeInsets.only( + // top: 10, left: 10, right: 10), + // padding: EdgeInsets.all(8.0), + // decoration: BoxDecoration( + // color: Colors.white, + // borderRadius: BorderRadius.all( + // Radius.circular(10.0), + // ), + // border: Border.all( + // color: Colors.grey[200], width: 0.5), + // ), + // child: Column( + // children: [ + // Row( + // children: [ + // if (model.medicalFileList.length != + // 0 && + // model + // .medicalFileList[0] + // .entityList[0] + // .timelines[ + // encounterNumber] + // .timeLineEvents[0] + // .consulations + // .length != + // 0) + // Expanded( + // child: AppText( + // model + // .medicalFileList[0] + // .entityList[0] + // .timelines[ + // encounterNumber] + // .timeLineEvents[0] + // .consulations[0] + // .doctorName + // .toUpperCase(), + // fontWeight: FontWeight.w700, + // ), + // ), + // ], + // ), + // if (model.medicalFileList.length != 0) + // Row( + // children: [ + // AppText( + // TranslationBase.of(context) + // .clinic + + // ": ", + // ), + // if (model.medicalFileList + // .length != + // 0 && + // model + // .medicalFileList[0] + // .entityList[0] + // .timelines[ + // encounterNumber] + // .timeLineEvents[0] + // .consulations + // .length != + // 0) + // AppText( + // model + // .medicalFileList[0] + // .entityList[0] + // .timelines[ + // encounterNumber] + // .timeLineEvents[0] + // .consulations[0] + // .clinicName, + // fontWeight: FontWeight.w700, + // ), + // ], + // ), + // Row( + // children: [ + // AppText( + // TranslationBase.of(context) + // .episode + + // ": ", + // //fontWeight: FontWeight.w700, + // ), + // if (model.medicalFileList.length != + // 0 && + // model + // .medicalFileList[0] + // .entityList[0] + // .timelines[ + // encounterNumber] + // .timeLineEvents[0] + // .consulations + // .length != + // 0) + // AppText( + // model + // .medicalFileList[0] + // .entityList[0] + // .timelines[encounterNumber] + // .timeLineEvents[0] + // .consulations[0] + // .episodeID + // .toString(), + // fontWeight: FontWeight.w700, + // ), + // ], + // ), + // Row( + // children: [ + // AppText( + // TranslationBase.of(context) + // .visitDate + + // ": ", + // //fontWeight: FontWeight.w700, + // ), + // if (model.medicalFileList.length != + // 0 && + // model + // .medicalFileList[0] + // .entityList[0] + // .timelines[ + // encounterNumber] + // .timeLineEvents[0] + // .consulations + // .length != + // 0) + // AppText( + // '${DateUtils.getDayMonthYearDateFormatted(DateUtils.getDateTimeFromServerFormat( + // model + // .medicalFileList[0] + // .entityList[0] + // .timelines[ + // encounterNumber] + // .date, + // ), isArabic: projectViewModel.isArabic)}', + // color: Colors.black, + // fontWeight: FontWeight.w700, + // fontSize: 14, + // ), + // SizedBox(width: 35.0), + // // AppText( + // // 'Appt Date : ', + // // fontWeight: FontWeight.w700, + // // ), + // // AppText( + // // '23/12/2020', + // // ), + // ], + // ), + // ], + // ), + // ), SizedBox(height: 25.0), if (model.medicalFileList.length != 0 && diff --git a/lib/screens/medical-file/medical_file_page.dart b/lib/screens/medical-file/medical_file_page.dart index e9203b9c..00648473 100644 --- a/lib/screens/medical-file/medical_file_page.dart +++ b/lib/screens/medical-file/medical_file_page.dart @@ -110,6 +110,36 @@ class _MedicalFilePageState extends State { encounterNumber: index, pp: patient.patientId, patient: patient, + doctorName: model + .medicalFileList[0] + .entityList[0] + .timelines[index] + .doctorName, + clinicName: model + .medicalFileList[0] + .entityList[0] + .timelines[index] + .clinicName, + doctorImage: model + .medicalFileList[0] + .entityList[0] + .timelines[index] + .doctorImage, + episode: model + .medicalFileList[0] + .entityList[0] + .timelines[index] + .timeLineEvents[0] + .consulations[0] + .episodeID + .toString(), + vistDate: model + .medicalFileList[0] + .entityList[0] + .timelines[index] + .date + .toString() + .toString(), )), ); }, diff --git a/lib/screens/patients/insurance_approval_screen_patient.dart b/lib/screens/patients/insurance_approval_screen_patient.dart index b342de9c..8fcc9f66 100644 --- a/lib/screens/patients/insurance_approval_screen_patient.dart +++ b/lib/screens/patients/insurance_approval_screen_patient.dart @@ -150,6 +150,8 @@ class _InsuranceApprovalScreenNewState approvalStatus: model.insuranceApproval[index] .approvalStatusDescption ?? '', + branch2: + model.insuranceApproval[index].projectName, ), ), ), diff --git a/lib/screens/procedures/ProcedureCard.dart b/lib/screens/procedures/ProcedureCard.dart index 43be9b71..e9cdd316 100644 --- a/lib/screens/procedures/ProcedureCard.dart +++ b/lib/screens/procedures/ProcedureCard.dart @@ -148,7 +148,7 @@ class ProcedureCard extends StatelessWidget { color: Colors.grey, ), Texts( - entityList.clinicDescription??"", + entityList.clinicDescription ?? "", bold: true, fontSize: 12, ), diff --git a/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart b/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart index 3031b0d1..02f859fa 100644 --- a/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart +++ b/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart @@ -15,8 +15,8 @@ import 'package:provider/provider.dart'; import 'large_avatar.dart'; -class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with PreferredSizeWidget { - +class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget + with PreferredSizeWidget { final PatiantInformtion patient; final String patientType; final String arrivalType; @@ -27,6 +27,9 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre final String invoiceNO; final String orderNo; final bool isPrescriptions; + final bool isMedicalFile; + final String episode; + final String vistDate; final String clinic; PatientProfileHeaderWhitAppointmentAppBar( @@ -38,7 +41,12 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre this.appointmentDate, this.profileUrl, this.invoiceNO, - this.orderNo, this.isPrescriptions = false, this.clinic}); + this.orderNo, + this.isPrescriptions = false, + this.clinic, + this.isMedicalFile = false, + this.episode, + this.vistDate}); @override Widget build(BuildContext context) { @@ -51,8 +59,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre } return Container( - padding: EdgeInsets.only( - left: 0, right: 5, bottom: 5, top: 5), + padding: EdgeInsets.only(left: 0, right: 5, bottom: 5, top: 5), decoration: BoxDecoration( color: Colors.white, ), @@ -73,12 +80,12 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre ), 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', @@ -86,13 +93,13 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre ), 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: [ @@ -114,119 +121,84 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre ), Expanded( child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, children: [ - SERVICES_PATIANT2[ - int.parse(patientType)] == - "patientArrivalList" + SERVICES_PATIANT2[int.parse(patientType)] == + "patientArrivalList" ? Container( - child: Row( - mainAxisAlignment: - MainAxisAlignment - .spaceBetween, - children: [ - patient.patientStatusType == - 43 - ? AppText( - 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, - ), - arrivalType == '1' || patient.arrivedOn == null - ? AppText( - 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, - ) - ], - )) + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + patient.patientStatusType == 43 + ? AppText( + 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, + ), + arrivalType == '1' || patient.arrivedOn == null + ? AppText( + 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(), - if (SERVICES_PATIANT2[ - int.parse(patientType)] == + if (SERVICES_PATIANT2[int.parse(patientType)] == "List_MyOutPatient") Container( child: Row( - mainAxisAlignment: - MainAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, children: [ 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( @@ -239,34 +211,23 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre ), ), 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: [ 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)), ], ), @@ -274,32 +235,23 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre 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() ], ) @@ -309,26 +261,19 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre child: RichText( text: new TextSpan( style: new TextStyle( - fontSize: 1.6 * - SizeConfig.textMultiplier, + fontSize: 1.6 * SizeConfig.textMultiplier, color: Colors.black, fontFamily: 'Poppins', ), children: [ 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)), ], ), ), @@ -343,14 +288,16 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre Container( width: 30, height: 30, - margin: EdgeInsets.only(left: projectViewModel.isArabic?10:85, right: projectViewModel.isArabic?85:10,top: 5), + margin: EdgeInsets.only( + left: projectViewModel.isArabic ? 10 : 85, + right: projectViewModel.isArabic ? 85 : 10, + top: 5), decoration: BoxDecoration( - shape: BoxShape.rectangle, - border: Border( - bottom:BorderSide(color: Colors.grey[400],width: 2.5), - left: BorderSide(color: Colors.grey[400],width: 2.5), - ) - ), + shape: BoxShape.rectangle, + border: Border( + bottom: BorderSide(color: Colors.grey[400], width: 2.5), + left: BorderSide(color: Colors.grey[400], width: 2.5), + )), ), Expanded( child: Container( @@ -380,79 +327,81 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre fontWeight: FontWeight.w600, fontSize: 12, ), - if (orderNo != null ) + if (orderNo != null && !isPrescriptions) Row( children: [ - Texts( - 'Order No: ', - color: Colors.grey[800], - fontSize: 12 - ), - Texts( - orderNo ?? '',fontSize: 12 - ) + Texts('Order No: ', + color: Colors.grey[800], + fontSize: 12), + Texts(orderNo ?? '', fontSize: 12) ], ), - if (invoiceNO != null ) + if (invoiceNO != null && !isPrescriptions) Row( children: [ - Texts( - 'Invoice: ', - color: Colors.grey[800], - fontSize: 12 - ), - Texts( - invoiceNO, - fontSize: 12 - ) + Texts('Invoice: ', + color: Colors.grey[800], + fontSize: 12), + Texts(invoiceNO, fontSize: 12) ], ), - if( branch!=null) + if (branch != null) Row( children: [ - Texts( - 'Branch: ', - color: Colors.grey[800], - fontSize: 12 - ), - Texts( - branch?? '', - fontSize: 12 - ) + Texts('Branch: ', + color: Colors.grey[800], + fontSize: 12), + Texts(branch ?? '', fontSize: 12) ], ), - if(clinic!=null) + if (isPrescriptions) + if (clinic != null) + Row( + children: [ + Texts('Clinic: ', + color: Colors.grey[800], + fontSize: 12), + Texts(clinic ?? '', fontSize: 12) + ], + ), + if (isMedicalFile && episode != null) Row( children: [ - Texts( - 'Clinic: ', - color: Colors.grey[800], - fontSize: 12 - ), - Texts( - clinic?? '', - fontSize: 12 - ) + Texts('Episode: ', + color: Colors.grey[800], + fontSize: 12), + Texts(episode ?? '', fontSize: 12) + ], + ), + if (isMedicalFile && vistDate != null) + Row( + children: [ + Texts('Visit Date: ', + color: Colors.grey[800], + fontSize: 12), + Texts(vistDate ?? '', fontSize: 12) ], ), Row( children: [ Expanded( child: Texts( - !isPrescriptions? 'Result Date: ': 'Prescriptions Date ', + !isPrescriptions + ? 'Result Date: ' + : 'Prescriptions Date ', color: Colors.grey[800], fontSize: 12, ), ), Texts( - '${DateUtils.getDayMonthYearDateFormatted(appointmentDate, isArabic: projectViewModel.isArabic)}',fontSize: 14, + '${DateUtils.getDayMonthYearDateFormatted(appointmentDate, isArabic: projectViewModel.isArabic)}', + fontSize: 14, ) ], ) ]), ), ), - ], ), ), @@ -466,7 +415,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre } convertDateFormat2(String str) { - String newDate =""; + String newDate = ""; const start = "/Date("; const end = "+0300)"; @@ -477,10 +426,10 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre 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(); @@ -504,5 +453,5 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre } @override - Size get preferredSize => Size(double.maxFinite,290); + Size get preferredSize => Size(double.maxFinite, 290); } diff --git a/lib/widgets/shared/doctor_card_insurance.dart b/lib/widgets/shared/doctor_card_insurance.dart index 6b144f53..fce3e316 100644 --- a/lib/widgets/shared/doctor_card_insurance.dart +++ b/lib/widgets/shared/doctor_card_insurance.dart @@ -19,6 +19,7 @@ class DoctorCardInsurance extends StatelessWidget { final String clinic; final String approvalStatus; final String patientOut; + final String branch2; DoctorCardInsurance( {this.doctorName, @@ -31,7 +32,8 @@ class DoctorCardInsurance extends StatelessWidget { this.isPrescriptions = false, this.clinic, this.approvalStatus, - this.patientOut}); + this.patientOut, + this.branch2}); @override Widget build(BuildContext context) { @@ -108,7 +110,7 @@ class DoctorCardInsurance extends StatelessWidget { ], ), Row( - crossAxisAlignment: CrossAxisAlignment.end, + crossAxisAlignment: CrossAxisAlignment.center, children: [ Container( child: LargeAvatar( @@ -161,23 +163,38 @@ class DoctorCardInsurance extends StatelessWidget { child: Texts( clinic, fontWeight: FontWeight.w700, + fontSize: 15.0, ), ) ], ), - if (branch != null) + if (branch2 != null) Row( children: [ Texts( - 'Approval No: ', + 'Branch:', //color: Colors.grey[500], ), Texts( - branch, + branch2, fontWeight: FontWeight.w700, + fontSize: 15.0, ) ], - ) + ), + Row( + children: [ + Texts( + 'Approval No: ', + //color: Colors.grey[500], + ), + Texts( + branch, + fontWeight: FontWeight.w700, + fontSize: 15.0, + ) + ], + ), ]), ), ),