Merge branch 'fix_issues' into 'dev_v2.8'

Fix issues

See merge request Cloud_Solution/doctor_app_flutter!935
dev_v2.8
Elham Ali 4 years ago
commit bf1d893e12

@ -107,7 +107,7 @@ class ProcedureService extends BaseService {
}, body: _procedureTempleteDetailsRequestModel.toJson()); }, body: _procedureTempleteDetailsRequestModel.toJson());
} }
Future getProcedure({int? mrn, required int appointmentNo}) async { Future getProcedure({int? mrn}) async {
_getOrderedProcedureRequestModel = GetOrderedProcedureRequestModel( _getOrderedProcedureRequestModel = GetOrderedProcedureRequestModel(
patientMRN: mrn, patientMRN: mrn,
); );

@ -66,7 +66,7 @@ class ProcedureViewModel extends BaseViewModel {
//_insuranceCardService.clearInsuranceCard(); //_insuranceCardService.clearInsuranceCard();
setState(ViewState.Busy); setState(ViewState.Busy);
await _procedureService.getProcedure(mrn: mrn, appointmentNo: appointmentNo!); await _procedureService.getProcedure(mrn: mrn);
if (_procedureService.hasError) { if (_procedureService.hasError) {
error = _procedureService.error!; error = _procedureService.error!;
if (patientType == "7") if (patientType == "7")

@ -1,3 +1,6 @@
import 'dart:ui';
import '../patiant_info_model.dart'; import '../patiant_info_model.dart';
class PatientProfileAppBarModel { class PatientProfileAppBarModel {
@ -21,6 +24,8 @@ class PatientProfileAppBarModel {
bool? isFromLabResult; bool? isFromLabResult;
Stream <String> ?videoCallDurationStream; Stream <String> ?videoCallDurationStream;
VoidCallback? onPressed;
PatientProfileAppBarModel( PatientProfileAppBarModel(
{this.height = 0.0, {this.height = 0.0,
@ -40,7 +45,7 @@ class PatientProfileAppBarModel {
this.visitDate, this.visitDate,
this.clinic, this.clinic,
this.isAppointmentHeader = false, this.isAppointmentHeader = false,
this.isFromLabResult =false, this.videoCallDurationStream}); this.isFromLabResult =false, this.videoCallDurationStream, this.onPressed});
PatientProfileAppBarModel.fromJson(Map<String, dynamic> json) { PatientProfileAppBarModel.fromJson(Map<String, dynamic> json) {
height = json['height']; height = json['height'];
@ -62,6 +67,7 @@ class PatientProfileAppBarModel {
isAppointmentHeader = json['isAppointmentHeader']; isAppointmentHeader = json['isAppointmentHeader'];
isFromLabResult = json['isFromLabResult']; isFromLabResult = json['isFromLabResult'];
videoCallDurationStream = json['videoCallDurationStream']; videoCallDurationStream = json['videoCallDurationStream'];
onPressed = json['onPressed'];
} }
@ -86,6 +92,7 @@ class PatientProfileAppBarModel {
data['isAppointmentHeader'] = this.isAppointmentHeader; data['isAppointmentHeader'] = this.isAppointmentHeader;
data['isFromLabResult'] = this.isFromLabResult; data['isFromLabResult'] = this.isFromLabResult;
data['videoCallDurationStream'] = this.videoCallDurationStream; data['videoCallDurationStream'] = this.videoCallDurationStream;
data['onPressed'] = this.onPressed;
return data; return data;
} }
} }

@ -210,9 +210,8 @@ class _EndCallScreenState extends State<EndCallScreen> {
appBarTitle: TranslationBase.of(context).patientProfile!, appBarTitle: TranslationBase.of(context).patientProfile!,
backgroundColor: Theme.of(context).scaffoldBackgroundColor, backgroundColor: Theme.of(context).scaffoldBackgroundColor,
isShowAppBar: true, isShowAppBar: true,
appBar: PatientProfileAppBar(patient, onPressed: () { patientProfileAppBarModel: PatientProfileAppBarModel(
Navigator.pop(context); patient: patient,
},
isInpatient: isInpatient, isInpatient: isInpatient,
height: (patient!.patientStatusType != null && height: (patient!.patientStatusType != null &&
patient!.patientStatusType == 43) patient!.patientStatusType == 43)
@ -220,7 +219,11 @@ class _EndCallScreenState extends State<EndCallScreen> {
: isDischargedPatient : isDischargedPatient
? 240 ? 240
: 0, : 0,
isDischargedPatient: isDischargedPatient), onPressed: () {
Navigator.pop(context);
} ,
isDischargedPatient: isDischargedPatient
),
body: Container( body: Container(
height: !isSearchAndOut height: !isSearchAndOut
? isDischargedPatient ? isDischargedPatient

@ -183,7 +183,6 @@ class _UCAFPagerScreenState extends State<UCAFPagerScreen>
borderColor: Colors.white, borderColor: Colors.white,
color: Colors.white, color: Colors.white,
fontColor: Color(0xFFB8382B), fontColor: Color(0xFFB8382B),
fontSize: 2.2,
onPressed: () { onPressed: () {
Navigator.of(context).popUntil((route) { Navigator.of(context).popUntil((route) {
return route.settings.name == PATIENTS_PROFILE; return route.settings.name == PATIENTS_PROFILE;
@ -205,7 +204,6 @@ class _UCAFPagerScreenState extends State<UCAFPagerScreen>
borderColor: Color(0xFFB8382B), borderColor: Color(0xFFB8382B),
color: AppGlobal.appRedColor, color: AppGlobal.appRedColor,
fontColor: Colors.white, fontColor: Colors.white,
fontSize: 2.0,
onPressed: () { onPressed: () {
model.saveUCAFOnTap(); model.saveUCAFOnTap();
}, },

@ -1,6 +1,7 @@
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/PatientMedicalReportViewModel.dart'; import 'package:doctor_app_flutter/core/viewModel/PatientMedicalReportViewModel.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/patient/profile/patient_profile_app_bar_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
@ -9,8 +10,6 @@ import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart'; import 'package:flutter_html/flutter_html.dart';
import '../../../../models/patient/profile/patient_profile_app_bar_model.dart';
class SpecialLabResultDetailsPage extends StatelessWidget { class SpecialLabResultDetailsPage extends StatelessWidget {
final String resultData; final String resultData;
final PatiantInformtion patient; final PatiantInformtion patient;

@ -4,6 +4,7 @@ import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/models/patient/MedicalReport/MeidcalReportModel.dart'; import 'package:doctor_app_flutter/models/patient/MedicalReport/MeidcalReportModel.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/patient/profile/patient_profile_app_bar_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/large_avatar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/large_avatar.dart';
@ -31,8 +32,10 @@ class MedicalReportDetailPage extends StatelessWidget {
baseViewModel: model, baseViewModel: model,
isShowAppBar: true, isShowAppBar: true,
backgroundColor: Theme.of(context).scaffoldBackgroundColor, backgroundColor: Theme.of(context).scaffoldBackgroundColor,
appBar: PatientProfileAppBar(
patient,
patientProfileAppBarModel: PatientProfileAppBarModel(
patient: patient,
), ),
body: Container( body: Container(
child: SingleChildScrollView( child: SingleChildScrollView(

@ -253,7 +253,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
radius: 30, radius: 30,
hPadding: 20, hPadding: 20,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
fontSize: 1.6, // fontSize: 1.6,
icon: Image.asset( icon: Image.asset(
"assets/images/create-episod.png", "assets/images/create-episod.png",
color: Colors.white, color: Colors.white,
@ -289,7 +289,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
radius: 30, radius: 30,
hPadding: 20, hPadding: 20,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
fontSize: 1.6, // fontSize: 1.6,
icon: Image.asset( icon: Image.asset(
"assets/images/modilfy-episode.png", "assets/images/modilfy-episode.png",
color: Colors.white, color: Colors.white,

@ -378,7 +378,6 @@ class MyReferralDetailScreen extends StatelessWidget {
title: TranslationBase.of(context).accept, title: TranslationBase.of(context).accept,
color: Color(0xFF4BA821), color: Color(0xFF4BA821),
fontColor: Colors.white, fontColor: Colors.white,
fontSize: 1.6,
hPadding: 8, hPadding: 8,
vPadding: 12, vPadding: 12,
disabled: model.state == ViewState.Busy, disabled: model.state == ViewState.Busy,
@ -406,7 +405,6 @@ class MyReferralDetailScreen extends StatelessWidget {
title: TranslationBase.of(context).reject, title: TranslationBase.of(context).reject,
color: AppGlobal.appRedColor, color: AppGlobal.appRedColor,
fontColor: Colors.white, fontColor: Colors.white,
fontSize: 1.6,
hPadding: 8, hPadding: 8,
vPadding: 12, vPadding: 12,
disabled: model.state == ViewState.Busy, disabled: model.state == ViewState.Busy,

@ -484,7 +484,6 @@ class ReferralPatientDetailScreen extends StatelessWidget {
color: Colors.red[700], color: Colors.red[700],
fontColor: Colors.white, fontColor: Colors.white,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: 1.8,
hPadding: 8, hPadding: 8,
vPadding: 12, vPadding: 12,
onPressed: () async { onPressed: () async {

@ -557,7 +557,6 @@ class ReferredPatientDetailScreen extends StatelessWidget {
color: Colors.red[700], color: Colors.red[700],
fontColor: Colors.white, fontColor: Colors.white,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: 1.8,
hPadding: 8, hPadding: 8,
vPadding: 12, vPadding: 12,
disabled: referredPatient.referredDoctorRemarks == null disabled: referredPatient.referredDoctorRemarks == null

@ -363,7 +363,6 @@ class _RegisterConfirmationPatientPageState
borderColor: Color(0xFFeaeaea), borderColor: Color(0xFFeaeaea),
color: Color(0xFFeaeaea), color: Color(0xFFeaeaea),
fontColor: Colors.black, fontColor: Colors.black,
fontSize: 2.2,
onPressed: () { onPressed: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
@ -383,7 +382,6 @@ class _RegisterConfirmationPatientPageState
borderColor: Color(0xFFB8382B), borderColor: Color(0xFFB8382B),
color: Color(0xFFB8382B), color: Color(0xFFB8382B),
fontColor: Colors.white, fontColor: Colors.white,
fontSize: 2.0,
onPressed: () async { onPressed: () async {
setState(() { setState(() {
isSubmitted = true; isSubmitted = true;

@ -143,7 +143,6 @@ class _RegisterPatientPageState extends State<RegisterPatientPage>
borderColor: Color(0xFFeaeaea), borderColor: Color(0xFFeaeaea),
color: Color(0xFFeaeaea), color: Color(0xFFeaeaea),
fontColor: Colors.black, fontColor: Colors.black,
fontSize: 2.2,
onPressed: () { onPressed: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
@ -163,7 +162,6 @@ class _RegisterPatientPageState extends State<RegisterPatientPage>
borderColor: Color(0xFF359846), borderColor: Color(0xFF359846),
color: Color(0xFF359846), color: Color(0xFF359846),
fontColor: Colors.white, fontColor: Colors.white,
fontSize: 2.0,
onPressed: () {}, onPressed: () {},
), ),
), ),
@ -186,7 +184,6 @@ class _RegisterPatientPageState extends State<RegisterPatientPage>
borderColor: Color(0xFFeaeaea), borderColor: Color(0xFFeaeaea),
color: Color(0xFFeaeaea), color: Color(0xFFeaeaea),
fontColor: Colors.black, fontColor: Colors.black,
fontSize: 2.2,
onPressed: () { onPressed: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
@ -206,7 +203,6 @@ class _RegisterPatientPageState extends State<RegisterPatientPage>
borderColor: Color(0xFFB8382B), borderColor: Color(0xFFB8382B),
color: AppGlobal.appRedColor, color: AppGlobal.appRedColor,
fontColor: Colors.white, fontColor: Colors.white,
fontSize: 2.0,
onPressed: () { onPressed: () {
changePageViewIndex(_currentIndex + 1); changePageViewIndex(_currentIndex + 1);
}, },

@ -283,7 +283,6 @@ class _RegisterSearchPatientPageState extends State<RegisterSearchPatientPage> {
borderColor: Color(0xFFeaeaea), borderColor: Color(0xFFeaeaea),
color: Color(0xFFeaeaea), color: Color(0xFFeaeaea),
fontColor: Colors.black, fontColor: Colors.black,
fontSize: 2.2,
onPressed: () { onPressed: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
@ -303,7 +302,6 @@ class _RegisterSearchPatientPageState extends State<RegisterSearchPatientPage> {
borderColor: Color(0xFFB8382B), borderColor: Color(0xFFB8382B),
color: Color(0xFFB8382B), color: Color(0xFFB8382B),
fontColor: Colors.white, fontColor: Colors.white,
fontSize: 2.0,
onPressed: () async { onPressed: () async {
setState(() { setState(() {
isSubmitted = true; isSubmitted = true;

@ -440,7 +440,6 @@ class _ActivationPageState extends State<ActivationPage> {
borderColor: Color(0xFFeaeaea), borderColor: Color(0xFFeaeaea),
color: Color(0xFFeaeaea), color: Color(0xFFeaeaea),
fontColor: Colors.black, fontColor: Colors.black,
fontSize: 2.2,
onPressed: () { onPressed: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
@ -460,7 +459,6 @@ class _ActivationPageState extends State<ActivationPage> {
borderColor: Color(0xFFB8382B), borderColor: Color(0xFFB8382B),
color: HexColor("#D02127"), color: HexColor("#D02127"),
fontColor: Colors.white, fontColor: Colors.white,
fontSize: 2.0,
onPressed: () async { onPressed: () async {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
await widget.model.checkActivationCode( await widget.model.checkActivationCode(

@ -108,8 +108,7 @@ class PatientReferralItemWidget extends StatelessWidget {
Row( Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Expanded( AppText(
child: AppText(
patientName!, patientName!,
fontSize: 16.0, fontSize: 16.0,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
@ -117,7 +116,6 @@ class PatientReferralItemWidget extends StatelessWidget {
fontFamily: 'Poppins', fontFamily: 'Poppins',
letterSpacing: -0.64, letterSpacing: -0.64,
), ),
),
SizedBox( SizedBox(
width: 0, width: 0,
), ),
@ -147,21 +145,12 @@ class PatientReferralItemWidget extends StatelessWidget {
children: [ children: [
Expanded( Expanded(
child: Column( child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
CustomRow( CustomRow(
label: label:
TranslationBase.of(context).fileNumber!, TranslationBase.of(context).fileNumber!,
value: patientID!, value: patientID!,
), ),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
CustomRow( CustomRow(
label: isSameBranch label: isSameBranch
? TranslationBase.of(context) ? TranslationBase.of(context)
@ -177,8 +166,6 @@ class PatientReferralItemWidget extends StatelessWidget {
), ),
], ],
), ),
],
),
), ),
Row( Row(
children: [ children: [
@ -205,16 +192,10 @@ class PatientReferralItemWidget extends StatelessWidget {
) )
], ],
), ),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
CustomRow( CustomRow(
label: TranslationBase.of(context).remarks! + " : ", label: TranslationBase.of(context).remarks! + " : ",
value: remark ?? "", value: remark ?? "",
), ),
],
),
Row( Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -256,9 +237,7 @@ class PatientReferralItemWidget extends StatelessWidget {
), ),
), ),
), ),
Expanded( Container(
flex: 4,
child: Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: 10, top: 25, right: 10, bottom: 0), left: 10, top: 25, right: 10, bottom: 0),
child: Column( child: Column(
@ -284,7 +263,6 @@ class PatientReferralItemWidget extends StatelessWidget {
], ],
), ),
), ),
),
], ],
), ),
Container( Container(

@ -12,50 +12,14 @@ import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
import 'large_avatar.dart'; import 'large_avatar.dart';
import 'package:flutter_svg/svg.dart';
class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget { class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget {
final PatiantInformtion? patient; final PatiantInformtion? patient;
final PatientProfileAppBarModel? patientProfileAppBarModel; final PatientProfileAppBarModel? patientProfileAppBarModel;
final double? height;
final bool isInpatient;
final bool isDischargedPatient;
final bool isFromLiveCare;
final String? doctorName;
final String? branch;
final DateTime? appointmentDate;
final String? profileUrl;
final String? invoiceNO;
final String? orderNo;
final bool? isPrescriptions;
final bool? isMedicalFile;
final String? episode;
final String? visitDate;
final String? clinic;
final bool? isAppointmentHeader;
final bool? isFromLabResult;
final VoidCallback? onPressed;
PatientProfileAppBar(this.patient, PatientProfileAppBar(this.patient,
{ this.patientProfileAppBarModel, { this.patientProfileAppBarModel,
this.isFromLabResult = false, });
this.onPressed,
this.height=0,
this.isInpatient = false,
this.isDischargedPatient = false,
this.isFromLiveCare = false,
this.doctorName,
this.branch,
this.appointmentDate,
this.profileUrl,
this.invoiceNO,
this.orderNo,
this.isPrescriptions=false,
this.isMedicalFile =false,
this.episode,
this.visitDate,
this.clinic,
this.isAppointmentHeader= false});
PatiantInformtion? localPatient; PatiantInformtion? localPatient;
@override @override
@ -96,7 +60,7 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget {
icon: Icon(Icons.arrow_back_ios), icon: Icon(Icons.arrow_back_ios),
color: Color(0xFF2B353E), //Colors.black, color: Color(0xFF2B353E), //Colors.black,
onPressed: () { onPressed: () {
if (onPressed != null) onPressed!(); if (patientProfileAppBarModel!.onPressed != null) patientProfileAppBarModel!.onPressed!();
Navigator.pop(context); Navigator.pop(context);
}, },
), ),
@ -169,11 +133,10 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget {
child: Container( child: Container(
width: SizeConfig.getTextMultiplierBasedOnWidth() * 20, width: SizeConfig.getTextMultiplierBasedOnWidth() * 20,
height: SizeConfig.getTextMultiplierBasedOnWidth() * 20, height: SizeConfig.getTextMultiplierBasedOnWidth() * 20,
child: Image.asset( child: SvgPicture.asset(
gender == 1 gender == 1?"assets/images/svgs/male avatar.svg":"assets/images/svgs/female avatar.svg",
? 'assets/images/male_avatar.png' width: 30,
: 'assets/images/female_avatar.png', height: 30,
fit: BoxFit.cover,
), ),
), ),
), ),
@ -284,11 +247,11 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget {
HeaderRow( HeaderRow(
label: TranslationBase.of(context).age! + " : ", label: TranslationBase.of(context).age! + " : ",
value: value:
"${AppDateUtils.getAgeByBirthday(localPatient!.patientDetails != null ? localPatient!.patientDetails!.dateofBirth ?? "" : localPatient!.dateofBirth ?? "", context, isServerFormat: !isFromLiveCare)}", "${AppDateUtils.getAgeByBirthday(localPatient!.patientDetails != null ? localPatient!.patientDetails!.dateofBirth ?? "" : localPatient!.dateofBirth ?? "", context, isServerFormat: !patientProfileAppBarModel!.isFromLiveCare!)}",
), ),
if (localPatient!.appointmentDate != null && if (localPatient!.appointmentDate != null &&
localPatient!.appointmentDate!.isNotEmpty && localPatient!.appointmentDate!.isNotEmpty &&
!isFromLabResult!) !patientProfileAppBarModel!.isFromLabResult!)
HeaderRow( HeaderRow(
label: TranslationBase.of(context).appointmentDate! + label: TranslationBase.of(context).appointmentDate! +
" : ", " : ",
@ -320,7 +283,7 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget {
if (localPatient!.admissionDate != null) if (localPatient!.admissionDate != null)
HeaderRow( HeaderRow(
label: "${TranslationBase.of(context).numOfDays}: ", label: "${TranslationBase.of(context).numOfDays}: ",
value: isDischargedPatient && value: patientProfileAppBarModel!.isDischargedPatient! &&
localPatient!.dischargeDate != null localPatient!.dischargeDate != null
? "${AppDateUtils.getDateTimeFromServerFormat(localPatient!.dischargeDate!).difference(AppDateUtils.getDateTimeFromServerFormat(localPatient!.admissionDate!)).inDays + 1}" ? "${AppDateUtils.getDateTimeFromServerFormat(localPatient!.dischargeDate!).difference(AppDateUtils.getDateTimeFromServerFormat(localPatient!.admissionDate!)).inDays + 1}"
: "${DateTime.now().difference(AppDateUtils.getDateTimeFromServerFormat(localPatient!.admissionDate!)).inDays + 1}", : "${DateTime.now().difference(AppDateUtils.getDateTimeFromServerFormat(localPatient!.admissionDate!)).inDays + 1}",
@ -374,7 +337,7 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
'${TranslationBase.of(context).dr}$doctorName', '${TranslationBase.of(context).dr}${patientProfileAppBarModel!.doctorName}',
color: Color(0xFF2E303A), color: Color(0xFF2E303A),
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: SizeConfig fontSize: SizeConfig
@ -382,43 +345,45 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget {
3.5, 3.5,
isCopyable: true, isCopyable: true,
), ),
if (orderNo != null && !isPrescriptions!) if (patientProfileAppBarModel!.orderNo != null && !(patientProfileAppBarModel!.isPrescriptions!))
HeaderRow( HeaderRow(
label: 'Order No: ', label: 'Order No: ',
value: orderNo ?? '', value: patientProfileAppBarModel!.orderNo ?? '',
), ),
if (invoiceNO != null && !isPrescriptions!) if (patientProfileAppBarModel!.invoiceNO != null && !(patientProfileAppBarModel!.isPrescriptions!))
HeaderRow( HeaderRow(
label: 'Invoice: ', label: 'Invoice: ',
value: invoiceNO ?? "", value: patientProfileAppBarModel!.invoiceNO ?? "",
), ),
if (branch != null) if (patientProfileAppBarModel!.branch != null)
HeaderRow( HeaderRow(
label: 'Branch: ', label: 'Branch: ',
value: branch ?? '', value: patientProfileAppBarModel!.branch ?? '',
), ),
if (clinic != null) if (patientProfileAppBarModel!.clinic != null)
HeaderRow( Container(
child: HeaderRow(
label: 'Clinic: ', label: 'Clinic: ',
value: clinic ?? '', value: patientProfileAppBarModel!.clinic ?? '',
),
), ),
if (isMedicalFile! && episode != null) if (patientProfileAppBarModel!.isMedicalFile! && patientProfileAppBarModel!.episode != null)
HeaderRow( HeaderRow(
label: 'Episode: ', label: 'Episode: ',
value: episode ?? '', value: patientProfileAppBarModel!.episode ?? '',
), ),
if (isMedicalFile! && visitDate != null) if (patientProfileAppBarModel!.isMedicalFile! && patientProfileAppBarModel!.visitDate != null)
HeaderRow( HeaderRow(
label: 'Visit Date: ', label: 'Visit Date: ',
value: visitDate ?? '', value: patientProfileAppBarModel!.visitDate ?? '',
), ),
if (!isMedicalFile!) if (!(patientProfileAppBarModel!.isMedicalFile!))
HeaderRow( HeaderRow(
label: !isPrescriptions! label: !(patientProfileAppBarModel!.isPrescriptions!)
? 'Result Date:' ? 'Result Date:'
: 'Prescriptions Date ', : 'Prescriptions Date ',
value: value: AppDateUtils.getDayMonthYearDateFormatted(
'${AppDateUtils.getDayMonthYearDateFormatted(appointmentDate!, isArabic: projectViewModel.isArabic)}', patientProfileAppBarModel!.appointmentDate! )
), ),
]), ]),
), ),
@ -438,34 +403,21 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget {
@override @override
Size get preferredSize => Size( Size get preferredSize => Size(
double.maxFinite, double.maxFinite,
height! == 0 patientProfileAppBarModel!.height == 0
? isInpatient ? patientProfileAppBarModel!.isAppointmentHeader!
? (isFromLabResult! ? 210 : 200) ? 270
: isAppointmentHeader! : ((patientProfileAppBarModel!.patient!.appointmentDate!.isNotEmpty)
? 290 ? patientProfileAppBarModel!.isFromLabResult!
: SizeConfig.isHeightVeryShort
? 137
: SizeConfig.isHeightShort
? 190 ? 190
: SizeConfig.heightMultiplier * : 200
(SizeConfig.isWidthLarge ? 25 : 20) : patientProfileAppBarModel!.patient!.admissionDate != null
: height! ? patientProfileAppBarModel!.isFromLabResult!
// TODO Elham*2 ? 210
// patientProfileAppBarModel!.height == 0 : patientProfileAppBarModel!.isMedicalFile!?650:200
// ? patientProfileAppBarModel!.isAppointmentHeader! : patientProfileAppBarModel!.isDischargedPatient!
// ? 270 ? 240
// : ((localPatient!.appointmentDate!.isNotEmpty) : 190)
// ? patientProfileAppBarModel!.isFromLabResult! : patientProfileAppBarModel!.height!
// ? 190
// : 170
// : localPatient!.admissionDate != null
// ? patientProfileAppBarModel!.isFromLabResult!
// ? 190
// : 170
// : patientProfileAppBarModel!.isDischargedPatient!
// ? 240
// : 130)
// : patientProfileAppBarModel!.height!
); );
} }

@ -55,7 +55,7 @@ class AppTextFieldCustomSearch extends StatelessWidget {
onPressed: () {}, onPressed: () {},
), ),
controller: searchController, controller: searchController,
onChanged: (value)=>onChangeFun, onChanged: (value){onChangeFun!(value);},
onFieldSubmitted: ()=>onFieldSubmitted, onFieldSubmitted: ()=>onFieldSubmitted,
validationError: validationError), validationError: validationError),
if (positionedChild != null) if (positionedChild != null)

Loading…
Cancel
Save