diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index ef5aaaa5..ff3ebd74 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -509,4 +509,12 @@ const Map> localizedValues = { 'vitalSignEmptyMsg': {'en': "There is no vital signs for this patient", 'ar':"لا توجد علامات حيوية لهذا المريض" }, 'referralEmptyMsg': {'en': "There is no referral data", 'ar':"لا توجد بيانات إحالة" }, 'referralSuccessMsg': {'en': "You make referral successfully", 'ar':"You make referral successfully" }, + 'diagnoseType': {'en': "Diagnose Type", 'ar':"نوع التشخيص" }, + 'condition': {'en': "Condition", 'ar':"الحالة" }, + 'id': {'en': "ID", 'ar':"بطاقة هوية" }, + 'quantity': {'en': "Quantity", 'ar':"الكمية" }, + 'codeNo': {'en': "Code #", 'ar':"# الرمز" }, + 'covered': {'en': "Covered", 'ar':"مغطى" }, + 'approvalRequired': {'en': "Approval Required", 'ar':"الموافقة مطلوبة" }, + 'uncoveredByDoctor': {'en': "Uncovered By Doctor", 'ar':"غير مغطى من قبل الدكتور" }, }; diff --git a/lib/core/service/patient-vital-signs-service.dart b/lib/core/service/patient-vital-signs-service.dart index 31c8721d..43786ac0 100644 --- a/lib/core/service/patient-vital-signs-service.dart +++ b/lib/core/service/patient-vital-signs-service.dart @@ -59,7 +59,7 @@ class VitalSignsService extends BaseService{ onSuccess: (dynamic response, int statusCode) { if(response['VitalSignsList'] != null){ if(response['VitalSignsList']['entityList'] != null && (response['VitalSignsList']['entityList'] as List).length > 0){ - patientVitalSigns = VitalSignData.fromJson(response['VitalSignsList']['entityList']['0']); + patientVitalSigns = VitalSignData.fromJson(response['VitalSignsList']['entityList'][0]); } } }, diff --git a/lib/core/viewModel/patient-vital-sign-viewmodel.dart b/lib/core/viewModel/patient-vital-sign-viewmodel.dart index f53def7b..4282141c 100644 --- a/lib/core/viewModel/patient-vital-sign-viewmodel.dart +++ b/lib/core/viewModel/patient-vital-sign-viewmodel.dart @@ -95,7 +95,7 @@ class VitalSignsViewModel extends BaseViewModel { ); } - String getBMI(double bodyMassIndex) { + String getBMI(var bodyMassIndex) { if (bodyMassIndex <= 18.5) { return "Underweight"; } else if (bodyMassIndex <= 25.0) { diff --git a/lib/models/patient/vital_sign/patient-vital-sign-data.dart b/lib/models/patient/vital_sign/patient-vital-sign-data.dart index 5d20e017..c5e503c2 100644 --- a/lib/models/patient/vital_sign/patient-vital-sign-data.dart +++ b/lib/models/patient/vital_sign/patient-vital-sign-data.dart @@ -5,7 +5,7 @@ class VitalSignData { int bloodPressureHigher; int bloodPressureLower; int bloodPressurePatientPosition; - double bodyMassIndex; + var bodyMassIndex; int fio2; int headCircumCm; int heightCm; diff --git a/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart b/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart index 302b77a8..f9c2470a 100644 --- a/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart +++ b/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart @@ -1,3 +1,4 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/patient-ucaf-viewmodel.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; @@ -5,6 +6,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/PatientHeaderWidgetNoAvatar.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:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; @@ -14,7 +16,6 @@ class UcafDetailScreen extends StatefulWidget { } class _UcafDetailScreenState extends State { - int _activeTap = 0; @override @@ -45,7 +46,7 @@ class _UcafDetailScreenState extends State { SizedBox( height: 16, ), - getSelectedTreatmentStepItem(context), + ...getSelectedTreatmentStepItem(context), ], ), ), @@ -64,8 +65,8 @@ class _UcafDetailScreenState extends State { ]; return Container( height: screenSize.height * 0.070, - decoration: - Helpers.containerBorderDecoration(Color(0Xffffffff), Color(0xFFCCCCCC)), + decoration: Helpers.containerBorderDecoration( + Color(0Xffffffff), Color(0xFFCCCCCC)), child: Row( mainAxisSize: MainAxisSize.max, crossAxisAlignment: CrossAxisAlignment.center, @@ -105,8 +106,296 @@ class _UcafDetailScreenState extends State { ); } - Widget getSelectedTreatmentStepItem(BuildContext _context) { - return Container(); + List getSelectedTreatmentStepItem(BuildContext _context) { + switch (_activeTap) { + case 0: + return [...List.generate(2, (index) => DiagnosisWidget()).toList()]; + case 1: + return [...List.generate(2, (index) => MedicationWidget()).toList()]; + case 2: + return [...List.generate(2, (index) => ProceduresWidget()).toList()]; + default: + return [ + Container(), + ]; + } + } +} + +class DiagnosisWidget extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + AppText( + "${TranslationBase.of(context).diagnoseType}: ", + fontWeight: FontWeight.bold, + fontSize: SizeConfig.textMultiplier * 2.0, + ), + AppText( + "Preliminary Diagnosis", + fontWeight: FontWeight.normal, + fontSize: SizeConfig.textMultiplier * 2.0, + ), + ], + ), + SizedBox( + height: 4, + ), + Row( + children: [ + Expanded( + child: AppText( + "B34.2 | CORONA VIRUS INFECTION, UNSPECIFIED SITE", + fontWeight: FontWeight.bold, + fontSize: SizeConfig.textMultiplier * 2.0, + ), + ), + ], + ), + SizedBox( + height: 4, + ), + Row( + children: [ + AppText( + "${TranslationBase.of(context).condition}: ", + fontWeight: FontWeight.bold, + fontSize: SizeConfig.textMultiplier * 2.0, + ), + AppText( + "174.00 Same", + fontWeight: FontWeight.normal, + fontSize: SizeConfig.textMultiplier * 2.0, + ), + ], + ), + SizedBox( + height: 16, + ), + const Divider( + color: Color(0xffCCCCCC), + height: 1, + thickness: 1, + indent: 0, + endIndent: 0, + ), + SizedBox( + height: 16, + ), + ], + ); + } +} + +class MedicationWidget extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + AppText( + "${TranslationBase.of(context).id}: ", + fontWeight: FontWeight.bold, + fontSize: SizeConfig.textMultiplier * 2.0, + ), + AppText( + "6", + fontWeight: FontWeight.normal, + fontSize: SizeConfig.textMultiplier * 2.0, + ), + SizedBox( + width: 16, + ), + AppText( + "${TranslationBase.of(context).price}: ", + fontWeight: FontWeight.bold, + fontSize: SizeConfig.textMultiplier * 2.0, + ), + AppText( + "35.6", + fontWeight: FontWeight.normal, + fontSize: SizeConfig.textMultiplier * 2.0, + ), + SizedBox( + width: 16, + ), + AppText( + "${TranslationBase.of(context).quantity}: ", + fontWeight: FontWeight.bold, + fontSize: SizeConfig.textMultiplier * 2.0, + ), + AppText( + "3", + fontWeight: FontWeight.normal, + fontSize: SizeConfig.textMultiplier * 2.0, + ), + ], + ), + SizedBox( + height: 4, + ), + Row( + children: [ + Expanded( + child: AppText( + "EVE SKIN CREAM WITH HONEY -170GM", + fontWeight: FontWeight.bold, + fontSize: SizeConfig.textMultiplier * 2.0, + ), + ), + ], + ), + SizedBox( + height: 4, + ), + Row( + children: [ + Expanded( + child: AppText( + "Every other day for 5 days", + fontWeight: FontWeight.normal, + fontSize: SizeConfig.textMultiplier * 2.0, + ), + ), + ], + ), + SizedBox( + height: 16, + ), + const Divider( + color: Color(0xffCCCCCC), + height: 1, + thickness: 1, + indent: 0, + endIndent: 0, + ), + SizedBox( + height: 16, + ), + ], + ); } +} + +class ProceduresWidget extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Column( + children: [ + Row( + children: [ + AppText( + "${TranslationBase.of(context).codeNo}: ", + fontWeight: FontWeight.bold, + fontSize: SizeConfig.textMultiplier * 2.0, + ), + AppText( + "019054846", + fontWeight: FontWeight.normal, + fontSize: SizeConfig.textMultiplier * 2.0, + ), + Expanded( + child: Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + AppText( + "${TranslationBase.of(context).quantity}: ", + fontWeight: FontWeight.bold, + fontSize: SizeConfig.textMultiplier * 2.0, + ), + AppText( + "1", + fontWeight: FontWeight.normal, + fontSize: SizeConfig.textMultiplier * 2.0, + ), + ], + ), + ), + ], + ), + SizedBox( + height: 4, + ), + Row( + children: [ + Expanded( + child: AppText( + "SCAN - RENAL MASS PROTOCOL", + fontWeight: FontWeight.bold, + fontSize: SizeConfig.textMultiplier * 2.0, + ), + ), + ], + ), + SizedBox( + height: 4, + ), + Row( + children: [ + AppText( + "${TranslationBase.of(context).covered}: ", + fontWeight: FontWeight.bold, + fontSize: SizeConfig.textMultiplier * 2.0, + ), + AppText( + "Yes", + fontWeight: FontWeight.normal, + color: Colors.green, + fontSize: SizeConfig.textMultiplier * 2.0, + ), + SizedBox( + width: 16, + ), + AppText( + "${TranslationBase.of(context).approvalRequired}: ", + fontWeight: FontWeight.bold, + fontSize: SizeConfig.textMultiplier * 2.0, + ), + AppText( + "Yes", + fontWeight: FontWeight.normal, + fontSize: SizeConfig.textMultiplier * 2.0, + ), + ], + ), + SizedBox( + height: 4, + ), + Row( + children: [ + AppText( + "${TranslationBase.of(context).uncoveredByDoctor}: ", + fontWeight: FontWeight.bold, + fontSize: SizeConfig.textMultiplier * 2.0, + ), + AppText( + "Yes", + fontWeight: FontWeight.normal, + fontSize: SizeConfig.textMultiplier * 2.0, + ), + ], + ), + SizedBox( + height: 16, + ), + const Divider( + color: Color(0xffCCCCCC), + height: 1, + thickness: 1, + indent: 0, + endIndent: 0, + ), + SizedBox( + height: 16, + ), + ], + ); + } } diff --git a/lib/util/translations_delegate_base.dart b/lib/util/translations_delegate_base.dart index 5dee728a..4bbe718f 100644 --- a/lib/util/translations_delegate_base.dart +++ b/lib/util/translations_delegate_base.dart @@ -535,6 +535,14 @@ class TranslationBase { String get vitalSignEmptyMsg => localizedValues['vitalSignEmptyMsg'][locale.languageCode]; String get referralEmptyMsg => localizedValues['referralEmptyMsg'][locale.languageCode]; String get referralSuccessMsg => localizedValues['referralSuccessMsg'][locale.languageCode]; + String get diagnoseType => localizedValues['diagnoseType'][locale.languageCode]; + String get condition => localizedValues['condition'][locale.languageCode]; + String get id => localizedValues['id'][locale.languageCode]; + String get quantity => localizedValues['quantity'][locale.languageCode]; + String get codeNo => localizedValues['codeNo'][locale.languageCode]; + String get covered => localizedValues['covered'][locale.languageCode]; + String get approvalRequired => localizedValues['approvalRequired'][locale.languageCode]; + String get uncoveredByDoctor => localizedValues['uncoveredByDoctor'][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate {