From 9fb6997e1d7650de92eb0c12a4dd4a3bcc695b5a Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Wed, 22 May 2024 17:06:25 +0300 Subject: [PATCH] updates & fixes --- lib/config/config.dart | 4 +- lib/core/model/radiology/final_radiology.dart | 4 +- .../insurance_approval_screen_patient.dart | 1 + .../patients/insurance_approvals_details.dart | 1099 +++++++---------- .../profile/diagnosis/diagnosis_screen.dart | 2 +- .../profile/lab_result/labs_home_page.dart | 2 +- .../prescription/new_prescriptions_page.dart | 2 +- .../shared/loader/gif_loader_container.dart | 3 +- pubspec.yaml | 6 +- 9 files changed, 448 insertions(+), 675 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index e7423937..3b502940 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -7,11 +7,11 @@ const ONLY_DATE = "[0-9/]"; const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/'; const DOCTOR_ROTATION = 'https://doctorrota.hmg.com/'; // const BASE_URL_LIVE_CARE = 'https://livecareuat.hmg.com/'; -// const BASE_URL = 'https://hmgwebservices.com/'; +const BASE_URL = 'https://hmgwebservices.com/'; // const BASE_URL = 'https://uat.hmgwebservices.com/'; -const BASE_URL = 'https://webservices.hmg.com/'; +// const BASE_URL = 'https://webservices.hmg.com/'; // const BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; //Vida Plus URL diff --git a/lib/core/model/radiology/final_radiology.dart b/lib/core/model/radiology/final_radiology.dart index 7149ff2f..9a14b2d8 100644 --- a/lib/core/model/radiology/final_radiology.dart +++ b/lib/core/model/radiology/final_radiology.dart @@ -45,7 +45,7 @@ class FinalRadiology { bool? isRadMedicalReport; bool? isLiveCareAppodynamicment; bool? isRecordFromVidaPlus; - String? invoiceType; + dynamic invoiceType; FinalRadiology( {this.setupID, @@ -105,7 +105,7 @@ class FinalRadiology { doctorID = json['DoctorID']; clinicID = json['ClinicID']; orderDate = AppDateUtils.convertStringToDate(json['OrderDate']); - reportDate = AppDateUtils.convertStringToDate(json['ReportDate']); + reportDate = AppDateUtils.convertStringToDate(json['ReadOn']); reportData = json['ReportData']; imageURL = json['ImageURL']; procedureID = json['ProcedureID']; diff --git a/lib/screens/patients/insurance_approval_screen_patient.dart b/lib/screens/patients/insurance_approval_screen_patient.dart index 1c672582..302b0009 100644 --- a/lib/screens/patients/insurance_approval_screen_patient.dart +++ b/lib/screens/patients/insurance_approval_screen_patient.dart @@ -185,6 +185,7 @@ class _InsuranceApprovalScreenNewState '', branch2: model .insuranceApproval[index].projectName!, + onTap: (){}, ), ), ), diff --git a/lib/screens/patients/insurance_approvals_details.dart b/lib/screens/patients/insurance_approvals_details.dart index 2e9f0099..1b2e31e1 100644 --- a/lib/screens/patients/insurance_approvals_details.dart +++ b/lib/screens/patients/insurance_approvals_details.dart @@ -38,7 +38,7 @@ class _InsuranceApprovalsDetailsState extends State { @override Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); - final routeArgs = ModalRoute.of(context)!.settings.arguments as Map; + // final routeArgs = ModalRoute.of(context)!.settings.arguments as Map; return BaseView( onModelReady: (model) => model.insuranceApprovalInPatient.length == 0 @@ -48,676 +48,472 @@ class _InsuranceApprovalsDetailsState extends State { ? (model) => model.getInsuranceApproval(patient, appointmentNo: patient!.appointmentNo, projectId: patient!.projectId) : (model) => model.getInsuranceApproval(patient) : null, - builder: (BuildContext context, InsuranceViewModel model, Widget? child) => - AppScaffold( - isShowAppBar: true, - baseViewModel: model, - appBar: PatientProfileAppBar(patient!), - body: patient!.admissionNo != null - ? SingleChildScrollView( - child: Container( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - ServiceTitle( - title: TranslationBase.of(context).insurance22, - subTitle: TranslationBase.of(context).approvals22, - ), - Container( - margin: EdgeInsets.all(10), - decoration: BoxDecoration( - border: Border.all( - width: 0.5, - color: Colors.white, - ), - borderRadius: BorderRadius.all( - Radius.circular(15.0), - ), - color: Colors.white), - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( + builder: (BuildContext context, InsuranceViewModel model, Widget? child) => AppScaffold( + isShowAppBar: true, + baseViewModel: model, + appBar: PatientProfileAppBar(patient!), + body: patient!.admissionNo != null + ? SingleChildScrollView( + child: Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + ServiceTitle( + title: TranslationBase.of(context).insurance22, + subTitle: TranslationBase.of(context).approvals22, + ), + Container( + margin: EdgeInsets.all(10), + decoration: BoxDecoration( + border: Border.all( + width: 0.5, + color: Colors.white, + ), + borderRadius: BorderRadius.all( + Radius.circular(15.0), + ), + color: Colors.white), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + children: [ + Row( children: [ - Row( - children: [ - AppText( - model - .insuranceApprovalInPatient[ - indexInsurance] - .approvalStatusDescption != - null - ? model - .insuranceApprovalInPatient[ - indexInsurance] - .approvalStatusDescption ?? - "" - : "", - color: model - .insuranceApprovalInPatient[ - indexInsurance] - .approvalStatusDescption != - null - ? "${model.insuranceApprovalInPatient[indexInsurance].approvalStatusDescption}" == - "Approved" || - "${model.insuranceApprovalInPatient[indexInsurance].approvalStatusDescption}" == - "تمت الموافقة" - ? AppGlobal.appGreenColor - : Color(0xffD02127) - : Color(0xffD02127), - letterSpacing: -0.4, - fontWeight: FontWeight.w600, - fontSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 2.7, - ), - ], - ), - Row( - children: [ - AppText( - model - .insuranceApprovalInPatient[ - indexInsurance] - .doctorName! - .toUpperCase(), - color: Color(0xff2E303A), - fontSize: 16, - letterSpacing: -0.64, - fontWeight: FontWeight.w600, - ) - ], + AppText( + model.insuranceApprovalInPatient[indexInsurance].approvalStatusDescption != null + ? model.insuranceApprovalInPatient[indexInsurance].approvalStatusDescption ?? "" + : "", + color: model.insuranceApprovalInPatient[indexInsurance].approvalStatusDescption != null + ? "${model.insuranceApprovalInPatient[indexInsurance].approvalStatusDescption}" == "Approved" || + "${model.insuranceApprovalInPatient[indexInsurance].approvalStatusDescption}" == "تمت الموافقة" + ? AppGlobal.appGreenColor + : Color(0xffD02127) + : Color(0xffD02127), + letterSpacing: -0.4, + fontWeight: FontWeight.w600, + fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 2.7, ), - Padding( - padding: const EdgeInsets.symmetric( - horizontal: 8.0), - child: Row( + ], + ), + Row( + children: [ + AppText( + model.insuranceApprovalInPatient[indexInsurance].doctorName!.toUpperCase(), + color: Color(0xff2E303A), + fontSize: 16, + letterSpacing: -0.64, + fontWeight: FontWeight.w600, + ) + ], + ), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 8.0), + child: Row( + children: [ + Column( children: [ - Column( - children: [ - Container( - height: MediaQuery.of(context) - .size - .height * - 0.065, - width: MediaQuery.of(context) - .size - .height * - 0.065, - child: CircleAvatar( - radius: SizeConfig - .imageSizeMultiplier! * - 12, - // radius: (52) - child: ClipRRect( - borderRadius: - BorderRadius.circular( - 50), - child: Image.network( - model - .insuranceApprovalInPatient[ - indexInsurance] - .doctorImage!, - fit: BoxFit.fill, - width: 700, - ), - ), - backgroundColor: - Colors.transparent, + Container( + height: MediaQuery.of(context).size.height * 0.065, + width: MediaQuery.of(context).size.height * 0.065, + child: CircleAvatar( + radius: SizeConfig.imageSizeMultiplier! * 12, + // radius: (52) + child: ClipRRect( + borderRadius: BorderRadius.circular(50), + child: Image.network( + model.insuranceApprovalInPatient[indexInsurance].doctorImage!, + fit: BoxFit.fill, + width: 700, ), ), - ], - ), - Expanded( - child: Padding( - padding: - const EdgeInsets.symmetric( - horizontal: 8.0), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - //mainAxisAlignment: MainAxisAlignment.center, - children: [ - SizedBox( - height: 25.0, - ), - CustomRow( - label: TranslationBase.of( - context) - .clinic + - ": ", - value: model - .insuranceApprovalInPatient[ - indexInsurance] - .clinicName!, - ), - CustomRow( - label: TranslationBase.of( - context) - .approvalNo + - ": ", - value: model - .insuranceApprovalInPatient[ - indexInsurance] - .approvalNo - .toString(), - ), - CustomRow( - label: 'Unused Count:', - value: model - .insuranceApprovalInPatient[ - indexInsurance] - .unUsedCount - .toString(), - ), - CustomRow( - label: TranslationBase.of( - context) - .companyName + - ": ", - value: 'Sample'), - CustomRow( - label: TranslationBase.of( - context) - .receiptOn + - ": ", - value: - '${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(model.insuranceApprovalInPatient[indexInsurance].receiptOn ?? ""), isArabic: projectViewModel.isArabic)}'), - CustomRow( - label: TranslationBase.of( - context) - .expiryDate + - ": ", - value: - '${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(model.insuranceApprovalInPatient[indexInsurance].expiryDate ?? ""), isArabic: projectViewModel.isArabic)}'), - ], - ), + backgroundColor: Colors.transparent, ), ), ], ), - ), - SizedBox( - height: 20.0, - ), - Container( - child: Column( - children: [ - Padding( - padding: const EdgeInsets.symmetric( - horizontal: 8.0), - child: Row( - children: [ - Expanded( - child: AppText( - TranslationBase.of(context) - .procedure, - fontWeight: FontWeight.w600, - color: Color(0xff2E303A), - letterSpacing: -0.48, - fontSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 2.9, - ), - ), - Expanded( - child: AppText( - TranslationBase.of(context) - .status, - fontWeight: FontWeight.w600, - color: Color(0xff2E303A), - letterSpacing: -0.48, - fontSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 2.9, - ), - ), - Expanded( - child: AppText( - TranslationBase.of(context) - .usageStatus, - fontWeight: FontWeight.w600, - color: Color(0xff2E303A), - letterSpacing: -0.48, - fontSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 2.9, - ), - ) - ], - ), - ), - Divider( - color: Colors.black, + Expanded( + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + //mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + height: 25.0, + ), + CustomRow( + label: TranslationBase.of(context).clinic + ": ", + value: model.insuranceApprovalInPatient[indexInsurance].clinicName!, + ), + CustomRow( + label: TranslationBase.of(context).approvalNo + ": ", + value: model.insuranceApprovalInPatient[indexInsurance].approvalNo.toString(), + ), + CustomRow( + label: 'Unused Count:', + value: model.insuranceApprovalInPatient[indexInsurance].unUsedCount.toString(), + ), + CustomRow(label: TranslationBase.of(context).companyName + ": ", value: model.insuranceApprovalInPatient[indexInsurance].companyName.toString()), + CustomRow( + label: TranslationBase.of(context).receiptOn + ": ", + value: + '${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(model.insuranceApprovalInPatient[indexInsurance].receiptOn ?? ""), isArabic: projectViewModel.isArabic)}'), + CustomRow( + label: TranslationBase.of(context).expiryDate + ": ", + value: + '${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(model.insuranceApprovalInPatient[indexInsurance].expiryDate ?? ""), isArabic: projectViewModel.isArabic)}'), + ], ), - Padding( - padding: const EdgeInsets.symmetric( - horizontal: 8.0), - child: ListView.builder( - shrinkWrap: true, - physics: ScrollPhysics(), - itemCount: model - .insuranceApprovalInPatient[ - indexInsurance] - .apporvalDetails! - .length, - itemBuilder: - (BuildContext context, - int index) { - return Container( - child: Column( + ), + ), + ], + ), + ), + SizedBox( + height: 20.0, + ), + Container( + child: Column( + children: [ + Padding( + padding: const EdgeInsets.symmetric(horizontal: 8.0), + child: Row( + children: [ + Expanded( + child: AppText( + TranslationBase.of(context).procedure, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + letterSpacing: -0.48, + fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 2.9, + ), + ), + Expanded( + child: AppText( + TranslationBase.of(context).status, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + letterSpacing: -0.48, + fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 2.9, + ), + ), + Expanded( + child: AppText( + TranslationBase.of(context).usageStatus, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + letterSpacing: -0.48, + fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 2.9, + ), + ) + ], + ), + ), + Divider( + color: Colors.black, + ), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 8.0), + child: ListView.builder( + shrinkWrap: true, + physics: ScrollPhysics(), + itemCount: model.insuranceApprovalInPatient[indexInsurance].apporvalDetails!.length, + itemBuilder: (BuildContext context, int index) { + return Container( + child: Column( + children: [ + Row( children: [ - Row( - children: [ - Expanded( - child: Container( - child: AppText( - model - .insuranceApprovalInPatient[ - indexInsurance] - ?.apporvalDetails![ - index] - ?.procedureName ?? - "", - textAlign: - TextAlign - .center, - fontSize: - SizeConfig - .getTextMultiplierBasedOnWidth() * - 2.7, - letterSpacing: - -0.4, - color: Color( - 0xff575757), - fontWeight: - FontWeight - .w500, - ), - ), + Expanded( + child: Container( + child: AppText( + model.insuranceApprovalInPatient[indexInsurance]?.apporvalDetails![index]?.procedureName ?? "", + textAlign: TextAlign.center, + fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 2.7, + letterSpacing: -0.4, + color: Color(0xff575757), + fontWeight: FontWeight.w500, ), - Expanded( - child: Container( - child: AppText( - model - .insuranceApprovalInPatient[ - indexInsurance] - ?.apporvalDetails![ - index] - ?.status ?? - "", - textAlign: - TextAlign - .center, - fontSize: - SizeConfig - .getTextMultiplierBasedOnWidth() * - 2.7, - letterSpacing: - -0.4, - color: Color( - 0xff575757), - fontWeight: - FontWeight - .w500, - ), - ), - ), - Expanded( - child: Container( - child: AppText( - model - .insuranceApprovalInPatient[ - indexInsurance] - ?.apporvalDetails![ - index] - ?.isInvoicedDesc ?? - "", - textAlign: - TextAlign - .center, - fontSize: - SizeConfig - .getTextMultiplierBasedOnWidth() * - 2.7, - letterSpacing: - -0.4, - color: Color( - 0xff575757), - fontWeight: - FontWeight - .w500, - ), - ), - ), - ], + ), ), - SizedBox( - width: 5, + Expanded( + child: Container( + child: AppText( + model.insuranceApprovalInPatient[indexInsurance]?.apporvalDetails![index]?.status ?? "", + textAlign: TextAlign.center, + fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 2.7, + letterSpacing: -0.4, + color: Color(0xff575757), + fontWeight: FontWeight.w500, + ), + ), ), - Divider( - color: Colors.black38, + Expanded( + child: Container( + child: AppText( + model.insuranceApprovalInPatient[indexInsurance]?.apporvalDetails![index]?.isInvoicedDesc ?? "", + textAlign: TextAlign.center, + fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 2.7, + letterSpacing: -0.4, + color: Color(0xff575757), + fontWeight: FontWeight.w500, + ), + ), ), ], ), - ); - }), - ), - ], + SizedBox( + width: 5, + ), + Divider( + color: Colors.black38, + ), + ], + ), + ); + }), ), - ), - ], + ], + ), ), - ), + ], ), - ], + ), ), - ), - ) - : SingleChildScrollView( - child: Container( - child: Column( - children: [ - Padding( - padding: const EdgeInsets.all(8.0), - child: Column( + ], + ), + ), + ) + : SingleChildScrollView( + child: Container( + child: Column( + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + children: [ + Row( children: [ - Row( - children: [ - AppText( - TranslationBase.of(context).insurance22, - fontSize: 15.0, - fontWeight: FontWeight.w600, - fontFamily: 'Poppins', - ), - ], - ), - Row( - children: [ - AppText( - TranslationBase.of(context).approvals22, - fontSize: 30.0, - fontWeight: FontWeight.w700, - ), - ], + AppText( + TranslationBase.of(context).insurance22, + fontSize: 15.0, + fontWeight: FontWeight.w600, + fontFamily: 'Poppins', ), ], ), - ), - Container( - margin: EdgeInsets.all(10), - decoration: BoxDecoration( - border: Border.all( - width: 0.5, - color: Colors.white, - ), - borderRadius: BorderRadius.all( - Radius.circular(15.0), + Row( + children: [ + AppText( + TranslationBase.of(context).approvals22, + fontSize: 30.0, + fontWeight: FontWeight.w700, ), - color: Colors.white), - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( + ], + ), + ], + ), + ), + Container( + margin: EdgeInsets.all(10), + decoration: BoxDecoration( + border: Border.all( + width: 0.5, + color: Colors.white, + ), + borderRadius: BorderRadius.all( + Radius.circular(15.0), + ), + color: Colors.white), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + children: [ + Row( children: [ - Row( - children: [ - AppText( - model - .insuranceApproval[ - indexInsurance] - .approvalStatusDescption != - null - ? model - .insuranceApproval[ - indexInsurance] - .approvalStatusDescption ?? - "" - : "", - color: model - .insuranceApproval[ - indexInsurance] - .approvalStatusDescption != - null - ? "${model.insuranceApproval[indexInsurance].approvalStatusDescption}" == - "Approved" - ? AppGlobal.appGreenColor - : Color(0xffD02127) - : Color(0xffD02127), - ), - ], + AppText( + model.insuranceApproval[indexInsurance].approvalStatusDescption != null ? model.insuranceApproval[indexInsurance].approvalStatusDescption ?? "" : "", + color: model.insuranceApproval[indexInsurance].approvalStatusDescption != null + ? "${model.insuranceApproval[indexInsurance].approvalStatusDescption}" == "Approved" + ? AppGlobal.appGreenColor + : Color(0xffD02127) + : Color(0xffD02127), ), - Row( - children: [ - AppText( - model - .insuranceApproval[indexInsurance] - .doctorName! - .toUpperCase(), - color: Colors.black, - fontSize: 18, - fontWeight: FontWeight.bold, - ) - ], - ), - Padding( - padding: const EdgeInsets.symmetric( - horizontal: 8.0), - child: Row( + ], + ), + Row( + children: [ + AppText( + model.insuranceApproval[indexInsurance].doctorName!.toUpperCase(), + color: Colors.black, + fontSize: 18, + fontWeight: FontWeight.bold, + ) + ], + ), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 8.0), + child: Row( + children: [ + Column( children: [ - Column( - children: [ - Container( - height: 85.0, - width: 85.0, - child: CircleAvatar( - radius: SizeConfig - .imageSizeMultiplier! * - 12, - // radius: (52) - child: ClipRRect( - borderRadius: - BorderRadius.circular( - 50), - child: Image.network( - model - .insuranceApproval[ - indexInsurance] - .doctorImage!, - fit: BoxFit.fill, - width: 700, - ), - ), - backgroundColor: - Colors.transparent, + Container( + height: 85.0, + width: 85.0, + child: CircleAvatar( + radius: SizeConfig.imageSizeMultiplier! * 12, + // radius: (52) + child: ClipRRect( + borderRadius: BorderRadius.circular(50), + child: Image.network( + model.insuranceApproval[indexInsurance].doctorImage!, + fit: BoxFit.fill, + width: 700, ), ), - ], + backgroundColor: Colors.transparent, + ), ), - Expanded( - child: Padding( - padding: - const EdgeInsets.symmetric( - horizontal: 8.0), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - //mainAxisAlignment: MainAxisAlignment.center, + ], + ), + Expanded( + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + //mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + height: 25.0, + ), + Row( children: [ - SizedBox( - height: 25.0, + AppText( + TranslationBase.of(context).clinic + ": ", + color: Colors.grey[500], + fontSize: 14, ), - Row( - children: [ - AppText( - TranslationBase.of( - context) - .clinic + - ": ", - color: Colors.grey[500], - fontSize: 14, - ), - Expanded( - child: AppText( - model - .insuranceApproval[ - indexInsurance] - .clinicName!, - fontSize: 14, - ), - ) - ], + Expanded( + child: AppText( + model.insuranceApproval[indexInsurance].clinicName!, + fontSize: 14, + ), + ) + ], + ), + Row( + children: [ + AppText( + TranslationBase.of(context).approvalNo + ": ", + color: Colors.grey[500], + fontSize: 14, ), - Row( - children: [ - AppText( - TranslationBase.of( - context) - .approvalNo + - ": ", - color: Colors.grey[500], - fontSize: 14, - ), - AppText( - model - .insuranceApproval[ - indexInsurance] - .approvalNo - .toString(), - fontSize: 14, - ) - ], + AppText( + model.insuranceApproval[indexInsurance].approvalNo.toString(), + fontSize: 14, + ) + ], + ), + Row( + children: [ + AppText( + TranslationBase.of(context).unusedCount + ": ", + color: Colors.grey[500], + fontSize: 14, ), - Row( - children: [ - AppText( - TranslationBase.of( - context) - .unusedCount + - ": ", - color: Colors.grey[500], - fontSize: 14, - ), - AppText( - model - .insuranceApproval[ - indexInsurance] - .unUsedCount - .toString(), - fontSize: 14, - ) - ], + AppText( + model.insuranceApproval[indexInsurance].unUsedCount.toString(), + fontSize: 14, + ) + ], + ), + Row( + children: [ + AppText( + TranslationBase.of(context).companyName + ": ", + color: Colors.grey[500], ), - Row( - children: [ - AppText( - TranslationBase.of( - context) - .companyName + - ": ", - color: Colors.grey[500], - ), - AppText('Sample') - ], + AppText('Sample') + ], + ), + Row( + children: [ + AppText( + TranslationBase.of(context).receiptOn + ": ", + color: Colors.grey[500], ), - Row( - children: [ - AppText( - TranslationBase.of( - context) - .receiptOn + - ": ", - color: Colors.grey[500], - ), - Expanded( - child: AppText( - '${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(model.insuranceApproval[indexInsurance].rceiptOn!), isArabic: projectViewModel.isArabic)}', - color: Colors.black, - fontWeight: - FontWeight.w600, - ), - ), - ], + Expanded( + child: AppText( + '${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(model.insuranceApproval[indexInsurance].rceiptOn!), isArabic: projectViewModel.isArabic)}', + color: Colors.black, + fontWeight: FontWeight.w600, + ), ), - Row( - children: [ - AppText( - TranslationBase.of( - context) - .expiryDate + - ": ", - color: Colors.grey[500], - ), - if (model - .insuranceApproval[ - indexInsurance] - .expiryDate != - null) - AppText( - '${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(model.insuranceApproval[indexInsurance].expiryDate!), isArabic: projectViewModel.isArabic)}', - color: Colors.black, - fontWeight: - FontWeight.w600, - ), - ], + ], + ), + Row( + children: [ + AppText( + TranslationBase.of(context).expiryDate + ": ", + color: Colors.grey[500], ), + if (model.insuranceApproval[indexInsurance].expiryDate != null) + AppText( + '${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(model.insuranceApproval[indexInsurance].expiryDate!), isArabic: projectViewModel.isArabic)}', + color: Colors.black, + fontWeight: FontWeight.w600, + ), ], ), - ), + ], ), - ], + ), ), - ), - SizedBox( - height: 20.0, - ), - Container( - child: Column( - children: [ - Padding( - padding: const EdgeInsets.symmetric( - horizontal: 8.0), - child: Row( - children: [ - Expanded( - child: AppText( - TranslationBase.of(context) - .procedure, - fontWeight: FontWeight.w700, - ), - ), - Expanded( - child: AppText( - TranslationBase.of(context) - .status, - fontWeight: FontWeight.w700, - ), - ), - Expanded( - child: AppText( - TranslationBase.of(context) - .usageStatus, - fontWeight: FontWeight.w700, - ), - ) - ], + ], + ), + ), + SizedBox( + height: 20.0, + ), + Container( + child: Column( + children: [ + Padding( + padding: const EdgeInsets.symmetric(horizontal: 8.0), + child: Row( + children: [ + Expanded( + child: AppText( + TranslationBase.of(context).procedure, + fontWeight: FontWeight.w700, + ), ), - ), - Divider( - color: Colors.black, - ), - Padding( - padding: const EdgeInsets.symmetric( - horizontal: 8.0), - child: (model.insuranceApproval[indexInsurance].apporvalDetails != null && model.insuranceApproval[indexInsurance].apporvalDetails!.isNotEmpty) ? ListView.builder( + Expanded( + child: AppText( + TranslationBase.of(context).status, + fontWeight: FontWeight.w700, + ), + ), + Expanded( + child: AppText( + TranslationBase.of(context).usageStatus, + fontWeight: FontWeight.w700, + ), + ) + ], + ), + ), + Divider( + color: Colors.black, + ), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 8.0), + child: (model.insuranceApproval[indexInsurance].apporvalDetails != null && model.insuranceApproval[indexInsurance].apporvalDetails!.isNotEmpty) + ? ListView.builder( shrinkWrap: true, physics: ScrollPhysics(), - itemCount: model - .insuranceApproval[ - indexInsurance] - .apporvalDetails! - .length, - itemBuilder: - (BuildContext context, - int index) { + itemCount: model.insuranceApproval[indexInsurance].apporvalDetails!.length, + itemBuilder: (BuildContext context, int index) { return Container( child: Column( children: [ @@ -726,48 +522,24 @@ class _InsuranceApprovalsDetailsState extends State { Expanded( child: Container( child: AppText( - model - .insuranceApproval[ - indexInsurance] - ?.apporvalDetails![ - index] - ?.procedureName ?? - "", - textAlign: - TextAlign - .start, + model.insuranceApproval[indexInsurance]?.apporvalDetails![index]?.procedureName ?? "", + textAlign: TextAlign.start, ), ), ), Expanded( child: Container( child: AppText( - model - .insuranceApproval[ - indexInsurance] - ?.apporvalDetails![ - index] - ?.status ?? - "", - textAlign: - TextAlign - .center, + model.insuranceApproval[indexInsurance]?.apporvalDetails![index]?.status ?? "", + textAlign: TextAlign.center, ), ), ), Expanded( child: Container( child: AppText( - model - .insuranceApproval[ - indexInsurance] - ?.apporvalDetails![ - index] - ?.isInvoicedDesc ?? - "", - textAlign: - TextAlign - .center, + model.insuranceApproval[indexInsurance]?.apporvalDetails![index]?.isInvoicedDesc ?? "", + textAlign: TextAlign.center, ), ), ), @@ -782,19 +554,20 @@ class _InsuranceApprovalsDetailsState extends State { ], ), ); - }) : NoData(), - ), - ], + }) + : NoData(), ), - ), - ], + ], + ), ), - ), + ], ), - ], + ), ), - ), - )), + ], + ), + ), + )), ); } } diff --git a/lib/screens/patients/profile/diagnosis/diagnosis_screen.dart b/lib/screens/patients/profile/diagnosis/diagnosis_screen.dart index 2bf1d249..f7b89bb4 100644 --- a/lib/screens/patients/profile/diagnosis/diagnosis_screen.dart +++ b/lib/screens/patients/profile/diagnosis/diagnosis_screen.dart @@ -34,7 +34,7 @@ class _ProgressNoteState extends State { {bool isLocalBusy = false}) async { final routeArgs = ModalRoute.of(context)!.settings.arguments as Map; PatiantInformtion patient = routeArgs['patient']; - String type = await sharedPref.getString(SLECTED_PATIENT_TYPE); + String type = await sharedPref.getString(SLECTED_PATIENT_TYPE) == '0' ? "2" : "1"; print(type); GetDiagnosisForInPatientRequestModel getDiagnosisForInPatientRequestModel = diff --git a/lib/screens/patients/profile/lab_result/labs_home_page.dart b/lib/screens/patients/profile/lab_result/labs_home_page.dart index 463a971c..a234e9e1 100644 --- a/lib/screens/patients/profile/lab_result/labs_home_page.dart +++ b/lib/screens/patients/profile/lab_result/labs_home_page.dart @@ -182,7 +182,7 @@ class _LabsHomePageState extends State { ), ), ), - if (model.patientLabOrdersList.isEmpty && (patient!.patientStatusType != 43 && patient!.patientStatusType !=null)) + if (model.patientLabOrdersList.isEmpty && patient!.patientStatusType != 43) Center( child: ErrorMessage( error: TranslationBase.of(context).noDataAvailable, diff --git a/lib/screens/prescription/new_prescriptions_page.dart b/lib/screens/prescription/new_prescriptions_page.dart index ddd622c2..e7facba7 100644 --- a/lib/screens/prescription/new_prescriptions_page.dart +++ b/lib/screens/prescription/new_prescriptions_page.dart @@ -28,7 +28,7 @@ class NewPrescriptionsPage extends StatelessWidget { return BaseView( onModelReady: (model) async { await model.getPrescriptionListNew( - mrn: patient.patientMRN, appNo: patient.appointmentNo); + mrn: patient.patientMRN, appNo: patient.appointmentNo == null ? 0 : patient.appointmentNo); await model.isPrincipalCovered(patient: patient); }, builder: (_, model, w) => AppScaffold( diff --git a/lib/widgets/shared/loader/gif_loader_container.dart b/lib/widgets/shared/loader/gif_loader_container.dart index 8f315d6a..3871892f 100644 --- a/lib/widgets/shared/loader/gif_loader_container.dart +++ b/lib/widgets/shared/loader/gif_loader_container.dart @@ -14,8 +14,7 @@ class _GifLoaderContainerState extends State with TickerProv controller1 = GifController(vsync: this); WidgetsBinding.instance.addPostFrameCallback((_) { - // controller1.repeat( - // min: 0, max: 11, period: Duration(milliseconds: 750), reverse: true); + controller1.repeat(period: Duration(milliseconds: 750), reverse: true); }); super.initState(); } diff --git a/pubspec.yaml b/pubspec.yaml index 5b904af2..c0ca7a34 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -80,7 +80,7 @@ dependencies: #GIF image # flutter_gifimage: ^1.0.1 - flutter_gif: ^0.0.4 +# flutter_gif: ^0.0.4 gif: ^2.3.0 #Autocomplete TextField autocomplete_textfield: ^2.0.1 @@ -130,8 +130,8 @@ dependencies: flutter_math_fork: ^0.7.2 - flutter_zoom_videosdk: ^1.10.11 - dart_jsonwebtoken: ^2.14.0 +# flutter_zoom_videosdk: ^1.10.11 +# dart_jsonwebtoken: ^2.14.0 dependency_overrides: