From a3eb9dbb55eb14e781632e87cfa182d492a63539 Mon Sep 17 00:00:00 2001 From: mosazaid Date: Sat, 24 Apr 2021 23:30:02 +0300 Subject: [PATCH] vital sign design --- assets/images/patient/vital_signs/oxg.png | Bin 0 -> 3506 bytes .../images/patient/vital_signs/painScale.png | Bin 0 -> 4004 bytes .../patient-vital-sign-viewmodel.dart | 29 +- .../vital_sign_detail_pain_scale.dart | 276 +++++++ .../vital_sign/vital_sign_details_screen.dart | 710 +++++++++++++----- .../vital_sign_item_details_screen.dart | 6 +- 6 files changed, 816 insertions(+), 205 deletions(-) create mode 100644 assets/images/patient/vital_signs/oxg.png create mode 100644 assets/images/patient/vital_signs/painScale.png create mode 100644 lib/screens/patients/profile/vital_sign/vital_sign_detail_pain_scale.dart diff --git a/assets/images/patient/vital_signs/oxg.png b/assets/images/patient/vital_signs/oxg.png new file mode 100644 index 0000000000000000000000000000000000000000..344344e58f6929288a1db05964a1c9578ccebbd2 GIT binary patch literal 3506 zcmV;j4NdZiP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##R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i%_9Cj`$x-CurQDBhv}g$-?{roTQ`iFi=kS;7|FTMZj(?LNzd7^VtPd z`iN|CyzlS89-s;+&0-RVfkc`ePilfCY7c`B;CrAIyP1&d$ec#KAzB~&Q@F^>lG8t0WJehNi#r;c5WlE64;!^ z8kGhZlD#?>yR-l)3+Y#&hu^)@Ql74XtkQ94?n5CA9&2Pe+*2PQm*ru)Utpb zJi+sPn;dFAu*^Jv0{BkyuQKT?!(@pFv%?bU3*0RE0I*#0tESJL5fZuE$S>=+3HaH>bti`* zGSwWN*NhJAkmm&$CdDi?1_PH%-s)Jsc}AWdhRAJ3ZgAS3GV-(th}`0tIKV5OerbuE zp-U06NL!rt<-k74HwN4}az(vyg7clW{l=ONcCQOAk-I#rZ?VuQeO&=b)R_2cp~tMh z=rKq~5SeB|j3u5A&hrhHC+;)y^PWB*C}cvuu75frw*tpYUIhH(8Em@=V@7&zgt;hr zwd7VOOmbl(@0l)f?EPlgD!Qk?lU9UC+uxgg|z# zqky)A!tXu>Sk=#baZmsj0OJdlMftHn$762}@3a=^+k4`UZO#X;=kQKLfxf*o4m_RX zYFe!I_Qe z+4zC7>+M>FuVk{xkTvxAl(EXT1YwlIpGqYK|B|oSDxya??4aDz8kL?vi%M30Bnq?# zv>k}zgHaLbmt$MbNEB$CGM)V~3O+{%^j!gbE#uM*d`VZbuE&U+23##`GoJ8&sHsw^ zHRg8}T?z9>1)o_Xmczer)aVj+Z2@=GqEV@*#;9~84m_uon;a1d=t|Hn1D29SMl%~C zrNABCXo9Z;&Wu7w4l2N_?j|D5AtH?bbR?Nf(i;$`m!Q`W`F8+Pp8Vt1cLFH@0000< KMNUMnLSTZPxM* vitalList; + + VitalSignDetailPainScale(this.vitalList); + + @override + Widget build(BuildContext context) { + return BaseView( + builder: (_, model, w) => NetworkBaseView( + baseViewModel: model, + child: SingleChildScrollView( + child: Column( + children: [ + ...List.generate( + vitalList.length, + (index) => Container( + child: Column( + children: [ + Row( + children: [ + Expanded( + child: Container( + child: Center( + child: AppText( + TranslationBase.of(context).description, + color: Colors.black, + bold: true, + ), + ), + ), + ), + Expanded( + child: Container( + child: Center( + child: AppText( + TranslationBase.of(context).value, + color: Colors.black, + bold: true, + ), + ), + ), + ), + Expanded( + child: Container( + child: Center( + child: AppText( + TranslationBase.of(context).date, + color: Colors.black, + bold: true, + ), + ), + ), + ) + ], + ), + SizedBox( + height: 7, + ), + Divider( + color: Colors.black, + thickness: 1, + ), + SizedBox( + height: 12, + ), + Container( + margin: EdgeInsets.symmetric(horizontal: 16), + padding: EdgeInsets.only(left: 8), + child: Row( + children: [ + Expanded( + flex: 2, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Expanded( + child: Container( + child: AppText( + TranslationBase.of(context).painScale, + fontSize: SizeConfig.textMultiplier * 1.5, + color: Color(0XFF28353E), + fontWeight: FontWeight.w600, + ), + ), + ), + Expanded( + child: Container( + child: Center( + child: AppText( + "${vitalList[index].painScore ?? "-"}", + fontWeight: FontWeight.w700, + color: Color(0XFF28353E), + fontSize: SizeConfig.textMultiplier * 1.3, + ), + ), + ), + ), + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Expanded( + child: Container( + child: AppText( + "Location", + fontSize: SizeConfig.textMultiplier * 1.5, + color: Color(0XFF28353E), + fontWeight: FontWeight.w600, + ), + ), + ), + Expanded( + child: Container( + child: Center( + child: AppText( + "${vitalList[index].painLocation ?? "-"}", + fontWeight: FontWeight.w700, + color: Color(0XFF28353E), + fontSize: SizeConfig.textMultiplier * 1.3, + ), + ), + ), + ), + ], + ), + Row( + children: [ + Expanded( + child: Container( + child: AppText( + "Character", + fontSize: SizeConfig.textMultiplier * 1.5, + color: Color(0XFF28353E), + fontWeight: FontWeight.w600, + ), + ), + ), + Expanded( + child: Container( + child: Center( + child: AppText( + "${vitalList[index].painCharacter ?? "-"}", + fontWeight: FontWeight.w700, + color: Color(0XFF28353E), + fontSize: SizeConfig.textMultiplier * 1.3, + ), + ), + ), + ), + ], + ), + Row( + children: [ + Expanded( + child: Container( + child: AppText( + "Duration", + fontSize: SizeConfig.textMultiplier * 1.5, + color: Color(0XFF28353E), + fontWeight: FontWeight.w600, + ), + ), + ), + Expanded( + child: Container( + child: Center( + child: AppText( + "${vitalList[index].painDuration ?? "-"}", + fontWeight: FontWeight.w700, + color: Color(0XFF28353E), + fontSize: SizeConfig.textMultiplier * 1.3, + ), + ), + ), + ), + ], + ), + Row( + children: [ + Expanded( + child: Container( + child: AppText( + TranslationBase.of(context).painManagement, + fontSize: SizeConfig.textMultiplier * 1.5, + color: Color(0XFF28353E), + fontWeight: FontWeight.w600, + ), + ), + ), + Expanded( + child: Container( + child: Center( + child: AppText( + "${vitalList[index].isPainManagementDone ?? "-"}", + fontWeight: FontWeight.w700, + color: Color(0XFF28353E), + fontSize: SizeConfig.textMultiplier * 1.3, + ), + ), + ), + ), + ], + ), + Row( + children: [ + Expanded( + child: Container( + child: AppText( + "Frequency", + fontSize: SizeConfig.textMultiplier * 1.5, + color: Color(0XFF28353E), + fontWeight: FontWeight.w600, + ), + ), + ), + Expanded( + child: Container( + child: Center( + child: AppText( + "${vitalList[index].painFrequency ?? "-"}", + fontWeight: FontWeight.w700, + color: Color(0XFF28353E), + fontSize: SizeConfig.textMultiplier * 1.3, + ), + ), + ), + ), + ], + ), + ], + ), + ), + Expanded( + child: Container( + padding: EdgeInsets.all(8), + child: Center( + child: AppText( + "${DateUtils.convertDateFromServerFormat(vitalList[index].createdOn, "E , dd MMM, yyyy hh:mm a")}", + fontWeight: FontWeight.w700, + color: Color(0XFF28353E), + fontSize: SizeConfig.textMultiplier * 1.6, + ), + ), + ), + ) + ], + ), + ), + SizedBox( + height: 8, + ), + ], + ), + ), + ), + ], + ), + ), + ), + ); + } +} diff --git a/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart b/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart index 88085c7e..76684959 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart @@ -10,7 +10,10 @@ import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-head import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart'; +import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart'; import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; +import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; @@ -45,10 +48,10 @@ class VitalSignDetailsScreen extends StatelessWidget { appBarTitle: TranslationBase.of(context).vitalSign, body: mode.patientVitalSignsHistory.length > 0 ? Column( - children: [ - Expanded( - child: Container( - child: Column( + children: [ + Expanded( + child: Container( + child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Container( @@ -75,7 +78,8 @@ class VitalSignDetailsScreen extends StatelessWidget { height: MediaQuery.of(context).size.height * 0.23, width: double.infinity, padding: EdgeInsets.all(12.0), - margin: EdgeInsets.symmetric(horizontal: 16.0, vertical: 8.0), + margin: EdgeInsets.symmetric( + horizontal: 16.0, vertical: 8.0), decoration: BoxDecoration( shape: BoxShape.rectangle, color: Colors.white, @@ -99,14 +103,17 @@ class VitalSignDetailsScreen extends StatelessWidget { children: [ Expanded( child: Column( - crossAxisAlignment: CrossAxisAlignment.center, + crossAxisAlignment: + CrossAxisAlignment.center, children: [ Image.asset( mode.getBMIStatus() != 1 ? '${assetBasePath}underweight_BMI.png' : '${assetBasePath}underweight_BMI-r.png', - height: - MediaQuery.of(context).size.height * 0.10, + height: MediaQuery.of(context) + .size + .height * + 0.10, ), const SizedBox( height: 4, @@ -114,7 +121,8 @@ class VitalSignDetailsScreen extends StatelessWidget { AppText( "${TranslationBase.of(context).bmiUnderWeight}", fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.15, + fontSize: + SizeConfig.textMultiplier * 1.15, color: mode.getBMIStatus() == 1 ? Color(0XFFD02127) : null, @@ -123,7 +131,8 @@ class VitalSignDetailsScreen extends StatelessWidget { AppText( "(<18.5)", fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.15, + fontSize: + SizeConfig.textMultiplier * 1.15, color: mode.getBMIStatus() == 1 ? Color(0XFFD02127) : null, @@ -133,14 +142,17 @@ class VitalSignDetailsScreen extends StatelessWidget { )), Expanded( child: Column( - crossAxisAlignment: CrossAxisAlignment.center, + crossAxisAlignment: + CrossAxisAlignment.center, children: [ Image.asset( mode.getBMIStatus() != 2 ? '${assetBasePath}health_BMI.png' : '${assetBasePath}health_BMI-r.png', - height: - MediaQuery.of(context).size.height * 0.10, + height: MediaQuery.of(context) + .size + .height * + 0.10, ), const SizedBox( height: 4, @@ -149,7 +161,9 @@ class VitalSignDetailsScreen extends StatelessWidget { child: AppText( "${TranslationBase.of(context).normal}", fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.15, + fontSize: + SizeConfig.textMultiplier * + 1.15, fontWeight: FontWeight.w700, color: mode.getBMIStatus() == 2 ? Color(0XFFD02127) @@ -159,7 +173,8 @@ class VitalSignDetailsScreen extends StatelessWidget { AppText( "(18.5-24.9)", fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.15, + fontSize: + SizeConfig.textMultiplier * 1.15, fontWeight: FontWeight.w700, color: mode.getBMIStatus() == 2 ? Color(0XFFD02127) @@ -169,14 +184,17 @@ class VitalSignDetailsScreen extends StatelessWidget { )), Expanded( child: Column( - crossAxisAlignment: CrossAxisAlignment.center, + crossAxisAlignment: + CrossAxisAlignment.center, children: [ Image.asset( mode.getBMIStatus() != 3 ? '${assetBasePath}ovrweight_BMI.png' : '${assetBasePath}ovrweight_BMI-r.png', - height: - MediaQuery.of(context).size.height * 0.10, + height: MediaQuery.of(context) + .size + .height * + 0.10, ), const SizedBox( height: 4, @@ -184,7 +202,8 @@ class VitalSignDetailsScreen extends StatelessWidget { AppText( "${TranslationBase.of(context).bmiOverWeight}", fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.155, + fontSize: + SizeConfig.textMultiplier * 1.155, fontWeight: FontWeight.w700, color: mode.getBMIStatus() == 3 ? Color(0XFFD02127) @@ -193,7 +212,8 @@ class VitalSignDetailsScreen extends StatelessWidget { AppText( "(25-29.9)", fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.155, + fontSize: + SizeConfig.textMultiplier * 1.155, fontWeight: FontWeight.w700, color: mode.getBMIStatus() == 3 ? Color(0XFFD02127) @@ -203,14 +223,17 @@ class VitalSignDetailsScreen extends StatelessWidget { )), Expanded( child: Column( - crossAxisAlignment: CrossAxisAlignment.center, + crossAxisAlignment: + CrossAxisAlignment.center, children: [ Image.asset( mode.getBMIStatus() != 4 ? '${assetBasePath}Obese_BMI.png' : '${assetBasePath}Obese_BMI-r.png', - height: - MediaQuery.of(context).size.height * 0.10, + height: MediaQuery.of(context) + .size + .height * + 0.10, ), const SizedBox( height: 4, @@ -218,7 +241,8 @@ class VitalSignDetailsScreen extends StatelessWidget { AppText( "${TranslationBase.of(context).bmiObese}", fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.15, + fontSize: + SizeConfig.textMultiplier * 1.15, fontWeight: FontWeight.w700, color: mode.getBMIStatus() == 4 ? Color(0XFFD02127) @@ -227,7 +251,8 @@ class VitalSignDetailsScreen extends StatelessWidget { AppText( "(30-34.9)", fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.15, + fontSize: + SizeConfig.textMultiplier * 1.15, fontWeight: FontWeight.w700, color: mode.getBMIStatus() == 4 ? Color(0XFFD02127) @@ -237,14 +262,17 @@ class VitalSignDetailsScreen extends StatelessWidget { )), Expanded( child: Column( - crossAxisAlignment: CrossAxisAlignment.center, + crossAxisAlignment: + CrossAxisAlignment.center, children: [ Image.asset( mode.getBMIStatus() != 5 ? '${assetBasePath}Obese_BMI.png' : '${assetBasePath}Obese_BMI-r.png', - height: - MediaQuery.of(context).size.height * 0.10, + height: MediaQuery.of(context) + .size + .height * + 0.10, ), const SizedBox( height: 4, @@ -254,7 +282,9 @@ class VitalSignDetailsScreen extends StatelessWidget { child: AppText( "${TranslationBase.of(context).bmiObeseExtreme}", fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.15, + fontSize: + SizeConfig.textMultiplier * + 1.15, fontWeight: FontWeight.w700, color: mode.getBMIStatus() == 5 ? Color(0XFFD02127) @@ -264,7 +294,8 @@ class VitalSignDetailsScreen extends StatelessWidget { AppText( "(35<)", fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.15, + fontSize: + SizeConfig.textMultiplier * 1.15, fontWeight: FontWeight.w700, color: mode.getBMIStatus() == 5 ? Color(0XFFD02127) @@ -280,194 +311,467 @@ class VitalSignDetailsScreen extends StatelessWidget { Expanded( child: SingleChildScrollView( child: Container( - margin: EdgeInsets.symmetric(horizontal: 16.0, vertical: 16), - child: GridView.count( - shrinkWrap: true, - physics: NeverScrollableScrollPhysics(), - crossAxisSpacing: 6, - mainAxisSpacing: 6, - crossAxisCount: 3, + margin: EdgeInsets.symmetric( + horizontal: 16.0, vertical: 16), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, children: [ - InkWell( - onTap: () => isNotOneAppointment - ? Navigator.push( - context, - FadePage( - page: VitalSignItemDetailsScreen( - pageKey: vitalSignDetails.Height, - pageTitle: - TranslationBase.of(context).height, - vitalList: - mode.patientVitalSignsHistory, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, + GridView.count( + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + crossAxisSpacing: 6, + mainAxisSpacing: 6, + crossAxisCount: 3, + children: [ + InkWell( + onTap: () => isNotOneAppointment + ? Navigator.push( + context, + FadePage( + page: + VitalSignItemDetailsScreen( + pageKey: vitalSignDetails + .Height, + pageTitle: + TranslationBase.of( + context) + .height, + vitalList: mode + .patientVitalSignsHistory, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + ), + ), + ) + : null, + child: Container( + child: VitalSignItem( + des: TranslationBase.of(context) + .height, + imagePath: + "${assetBasePath}height.png", + lastVal: mode.heightCm, + unit: TranslationBase.of(context) + .cm, + ), ), ), - ) - : null, - child: Container( - child: VitalSignItem( - des: TranslationBase.of(context).height, - imagePath: "${assetBasePath}height.png", - lastVal: mode.heightCm, - unit: TranslationBase.of(context).cm, - ), - ), - ), - InkWell( - onTap: () => isNotOneAppointment - ? Navigator.push( - context, - FadePage( - page: VitalSignItemDetailsScreen( - pageKey: vitalSignDetails.Weight, - pageTitle: - TranslationBase.of(context).weight, - vitalList: - mode.patientVitalSignsHistory, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, + InkWell( + onTap: () => isNotOneAppointment + ? Navigator.push( + context, + FadePage( + page: + VitalSignItemDetailsScreen( + pageKey: vitalSignDetails + .Weight, + pageTitle: + TranslationBase.of( + context) + .weight, + vitalList: mode + .patientVitalSignsHistory, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + ), + ), + ) + : null, + child: VitalSignItem( + des: TranslationBase.of(context) + .weight, + imagePath: + "${assetBasePath}weight.png", + unit: + TranslationBase.of(context).kg, + lastVal: mode.weightKg, ), ), - ) - : null, - child: VitalSignItem( - des: TranslationBase.of(context).weight, - imagePath: "${assetBasePath}weight.png", - unit: TranslationBase.of(context).kg, - lastVal: mode.weightKg, - ), - ), - InkWell( - onTap: () => isNotOneAppointment - ? Navigator.push( - context, - FadePage( - page: VitalSignItemDetailsScreen( - pageKey: vitalSignDetails.Temperature, - pageTitle: TranslationBase.of(context) - .temperature, - vitalList: - mode.patientVitalSignsHistory, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, + InkWell( + onTap: () => isNotOneAppointment + ? Navigator.push( + context, + FadePage( + page: + VitalSignItemDetailsScreen( + pageKey: vitalSignDetails + .Temperature, + pageTitle: + TranslationBase.of( + context) + .temperature, + vitalList: mode + .patientVitalSignsHistory, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + ), + ), + ) + : null, + child: Container( + child: VitalSignItem( + des: TranslationBase.of(context) + .temperature, + imagePath: + "${assetBasePath}temperature.png", + lastVal: mode.temperatureCelcius, + unit: TranslationBase.of(context) + .tempC, + ), ), ), - ) - : null, - child: Container( - child: VitalSignItem( - des: TranslationBase.of(context).temperature, - imagePath: "${assetBasePath}temperature.png", - lastVal: mode.temperatureCelcius, - unit: TranslationBase.of(context).tempC, - ), - ), - ), - InkWell( - onTap: () => isNotOneAppointment - ? Navigator.push( - context, - FadePage( - page: VitalSignItemDetailsScreen( - pageKey: vitalSignDetails.heart, - pageTitle: - TranslationBase.of(context).heart, - vitalList: - mode.patientVitalSignsHistory, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, + InkWell( + onTap: () => isNotOneAppointment + ? Navigator.push( + context, + FadePage( + page: + VitalSignItemDetailsScreen( + pageKey: vitalSignDetails + .heart, + pageTitle: + TranslationBase.of( + context) + .heart, + vitalList: mode + .patientVitalSignsHistory, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + ), + ), + ) + : null, + child: VitalSignItem( + des: TranslationBase.of(context) + .heart, + imagePath: + "${assetBasePath}heart_rate.png", + lastVal: mode.hartRat, + unit: + TranslationBase.of(context).bpm, ), ), - ) - : null, - child: VitalSignItem( - des: TranslationBase.of(context).heart, - imagePath: "${assetBasePath}heart_rate.png", - lastVal: mode.hartRat, - unit: TranslationBase.of(context).bpm, - ), - ), - InkWell( - onTap: () => isNotOneAppointment - ? Navigator.push( - context, - FadePage( - page: VitalSignItemDetailsScreen( - pageKey: vitalSignDetails.Respiration, - pageTitle: TranslationBase.of(context) + InkWell( + onTap: () => isNotOneAppointment + ? Navigator.push( + context, + FadePage( + page: + VitalSignItemDetailsScreen( + pageKey: vitalSignDetails + .Respiration, + pageTitle: + TranslationBase.of( + context) + .respirationRate, + vitalList: mode + .patientVitalSignsHistory, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + ), + ), + ) + : null, + child: VitalSignItem( + des: TranslationBase.of(context) .respirationRate, - vitalList: - mode.patientVitalSignsHistory, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, + imagePath: + "${assetBasePath}respiration_rate.png", + lastVal: + mode.respirationBeatPerMinute, + unit: TranslationBase.of(context) + .respirationSigns, ), ), - ) - : null, - child: VitalSignItem( - des: TranslationBase.of(context).respirationRate, - imagePath: "${assetBasePath}respiration_rate.png", - lastVal: mode.respirationBeatPerMinute, - unit: - TranslationBase.of(context).respirationSigns, - ), - ), - InkWell( - onTap: () => isNotOneAppointment - ? Navigator.push( - context, - FadePage( - page: VitalSignItemDetailsScreen( - pageKey: vitalSignDetails.BloodPressure, - pageTitle: TranslationBase.of(context) + InkWell( + onTap: () => isNotOneAppointment + ? Navigator.push( + context, + FadePage( + page: + VitalSignItemDetailsScreen( + pageKey: vitalSignDetails + .BloodPressure, + pageTitle: + TranslationBase.of( + context) + .bloodPressure, + vitalList: mode + .patientVitalSignsHistory, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + ), + ), + ) + : null, + child: VitalSignItem( + des: TranslationBase.of(context) .bloodPressure, - vitalList: - mode.patientVitalSignsHistory, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, + imagePath: + "${assetBasePath}blood_pressure.png", + lastVal: mode.bloodPressure, + unit: TranslationBase.of(context) + .sysDias, ), ), - ) - : null, - child: VitalSignItem( - des: TranslationBase.of(context).bloodPressure, - imagePath: "${assetBasePath}blood_pressure.png", - lastVal: mode.bloodPressure, - unit: TranslationBase.of(context).sysDias, - ), - ), - InkWell( - onTap: () => isNotOneAppointment - ? Navigator.push( - context, - FadePage( - page: VitalSignItemDetailsScreen( - pageKey: vitalSignDetails.Oxygenation, - pageTitle: TranslationBase.of(context) + InkWell( + onTap: () => isNotOneAppointment + ? Navigator.push( + context, + FadePage( + page: + VitalSignItemDetailsScreen( + pageKey: vitalSignDetails + .Oxygenation, + pageTitle: + TranslationBase.of( + context) + .oxygenation, + vitalList: mode + .patientVitalSignsHistory, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + ), + ), + ) + : null, + child: VitalSignItem( + des: TranslationBase.of(context) .oxygenation, - vitalList: - mode.patientVitalSignsHistory, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, + imagePath: + "${assetBasePath}oxg.png", + lastVal: mode.oxygenation, + unit: "%", ), ), - ) - : null, - child: VitalSignItem( - des: TranslationBase.of(context).oxygenation, - imagePath: "${assetBasePath}blood_pressure.png", - lastVal: mode.oxygenation, - unit: "%", - ), + InkWell( + onTap: () => isNotOneAppointment + ? Navigator.push( + context, + FadePage( + page: + VitalSignItemDetailsScreen( + pageKey: vitalSignDetails + .PainScale, + pageTitle: + TranslationBase.of( + context) + .painScale, + vitalList: mode + .patientVitalSignsHistory, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + ), + ), + ) + : null, + child: VitalSignItem( + des: TranslationBase.of(context) + .painScale, + imagePath: + "${assetBasePath}painScale.png", + lastVal: mode.painScore, + unit: "", + ), + ), + ], ), + /*RoundedContainer( + width: MediaQuery.of(context).size.width / 2, + margin: EdgeInsets.symmetric( + horizontal: 0.0, vertical: 16), + child: Container( + padding: EdgeInsets.all(5), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Container( + padding: EdgeInsets.only(top: 8), + child: Row( + crossAxisAlignment: + CrossAxisAlignment.start, + mainAxisAlignment: + MainAxisAlignment + .spaceBetween, + children: [ + Expanded( + child: Container( + child: Column( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + Row( + children: [ + AppText( + "${TranslationBase.of(context).painScale}", + fontSize: SizeConfig.textMultiplier * 1.5, + color: Colors.black, + fontWeight: FontWeight.w700, + ), + SizedBox( + width: 8, + ), + AppText( + "${mode.painScore}", + fontSize: SizeConfig.textMultiplier * 1.3, + color: Colors.grey.shade700, + fontWeight: FontWeight.normal, + ), + ], + ), + Row( + children: [ + AppText( + "Location", + fontSize: SizeConfig.textMultiplier * 1.5, + color: Colors.black, + fontWeight: FontWeight.w700, + ), + SizedBox( + width: 8, + ), + AppText( + "${mode.painLocation}", + fontSize: SizeConfig.textMultiplier * 1.3, + color: Colors.grey.shade700, + fontWeight: FontWeight.normal, + ), + ], + ), + Row( + children: [ + AppText( + "Character", + fontSize: SizeConfig.textMultiplier * 1.5, + color: Colors.black, + fontWeight: FontWeight.w700, + ), + SizedBox( + width: 8, + ), + AppText( + "${mode.painCharacter}", + fontSize: SizeConfig.textMultiplier * 1.3, + color: Colors.grey.shade700, + fontWeight: FontWeight.normal, + ), + ], + ), + Row( + children: [ + AppText( + "Duration", + fontSize: SizeConfig.textMultiplier * 1.5, + color: Colors.black, + fontWeight: FontWeight.w700, + ), + SizedBox( + width: 8, + ), + AppText( + "${mode.painDuration}", + fontSize: SizeConfig.textMultiplier * 1.3, + color: Colors.grey.shade700, + fontWeight: FontWeight.normal, + ), + ], + ), + Row( + children: [ + AppText( + TranslationBase.of(context).painManagement, + fontSize: SizeConfig.textMultiplier * 1.5, + color: Colors.black, + fontWeight: FontWeight.w700, + ), + SizedBox( + width: 8, + ), + AppText( + "${mode.isPainDone}", + fontSize: SizeConfig.textMultiplier * 1.3, + color: Colors.grey.shade700, + fontWeight: FontWeight.normal, + ), + ], + ), + Row( + children: [ + AppText( + TranslationBase.of(context).frequency, + fontSize: SizeConfig.textMultiplier * 1.5, + color: Colors.black, + fontWeight: FontWeight.w700, + ), + SizedBox( + width: 8, + ), + AppText( + "${mode.painFrequency}", + fontSize: SizeConfig.textMultiplier * 1.3, + color: Colors.grey.shade700, + fontWeight: FontWeight.normal, + ), + ], + ), + ], + ), + ), + ), + Container( + child: Image.asset( + "${assetBasePath}painScale.png", + width: 40, + height: 40, + )) + ], + ), + ), + Container( + child: Column( + children: [ + Align( + alignment: + Alignment.topRight, + child: Icon( + EvaIcons.eye, + ), + ), + Align( + alignment: + Alignment.topLeft, + child: Container( + margin: EdgeInsets.only( + left: 5, right: 5), + child: AppText( + "${TranslationBase.of(context).painScale}", + fontFamily: 'Poppins', + fontSize: SizeConfig + .textMultiplier * + 1.3, + fontWeight: + FontWeight.bold, + ), + ), + ), + ], + ), + ), + ], + ), + ), + ),*/ ], ), ), @@ -475,10 +779,10 @@ class VitalSignDetailsScreen extends StatelessWidget { ), ], ), + ), ), - ), - ], - ) + ], + ) : Center( child: Column( crossAxisAlignment: CrossAxisAlignment.center, @@ -502,4 +806,4 @@ class VitalSignDetailsScreen extends StatelessWidget { ), ); } -} +} \ No newline at end of file diff --git a/lib/screens/patients/profile/vital_sign/vital_sign_item_details_screen.dart b/lib/screens/patients/profile/vital_sign/vital_sign_item_details_screen.dart index 57fdca16..343d0590 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sign_item_details_screen.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sign_item_details_screen.dart @@ -2,8 +2,8 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/lookups/patient_lookup.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; -import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart'; import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sign_detail_pain_scale.dart'; import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sing_chart_and_detials.dart'; import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sing_chart_blood_pressure.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; @@ -225,6 +225,10 @@ class VitalSignItemDetailsScreen extends StatelessWidget { (element) => element.toJson()[chartInfo['viewKey']] != null, ); + if (chartInfo['viewKey'] == 'PainScore') { + return VitalSignDetailPainScale(vitalList); + } + if (vitalListTemp.length != 0 && chartInfo['viewKey'] == 'BloodPressure' || chartInfo['viewKey'] == 'O2') { return VitalSingChartBloodPressure(