diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 453cef8f..c27e8b70 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -402,4 +402,17 @@ const Map> localizedValues = { 'save': {'en': "SAVE", 'ar': 'حفظ'}, 'postPlansEstimatedCost': {'en': "POST PLANS & ESTIMATED COST", 'ar': 'خطط البريد والتكلفة المقدرة'}, 'ucaf': {'en': "UCAF", 'ar': 'UCAF'}, + 'emergencyCase': {'en': "Emergency Case", 'ar': 'حالة طارئة'}, + 'durationOfIllness': {'en': "duration Of Illness", 'ar': 'مدة المرض'}, + 'chiefComplaintsAndSymptoms': {'en': "CHIEF COMPLAINTS & OTHER SYMPTOMS", 'ar': 'شكاوى الرئيس وأعراض أخرى'}, + 'patientFeelsPainInHisBackAndCough': {'en': "Patient Feels pain in his back and cough", 'ar': 'يشعر المريض بألم في ظهره ويسعل'}, + 'additionalTextComplaints': {'en': "Additional text to add about Complaints", 'ar': 'نص إضافي لإضافته حول الشكاوى'}, + 'otherConditions': {'en': "OTHER CONDITIONS", 'ar': 'شروط أخرى'}, + 'other': {'en': "Other", 'ar': 'أخرى'}, + 'how': {'en': "How", 'ar': 'كيف'}, + 'when': {'en': "When", 'ar': 'متى'}, + 'where': {'en': "Where", 'ar': 'أين'}, + 'specifyPossibleLineManagement': {'en': "Specify possible line of management", 'ar': 'حدد خط الإدارة المحتمل'}, + 'significantSigns': {'en': "SIGNIFICANT SIGNS", 'ar': 'علامات مهمة'}, + 'backAbdomen': {'en': "Back : Abdomen", 'ar': 'الظهر: البطن'}, }; diff --git a/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart b/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart index f48fadb0..82b01144 100644 --- a/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart +++ b/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart @@ -1,9 +1,16 @@ +import 'package:doctor_app_flutter/config/config.dart'; +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'; +import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.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:flutter/services.dart'; +import 'package:hexcolor/hexcolor.dart'; class UCAFInputScreen extends StatefulWidget { @override @@ -11,6 +18,33 @@ class UCAFInputScreen extends StatefulWidget { } class _UCAFInputScreenState extends State { + bool _inPatient = false; + bool _emergencyCase = false; + final _durationOfIllnessController = TextEditingController(); + final _additionalComplaintsController = TextEditingController(); + final _otherController = TextEditingController(); + final _howController = TextEditingController(); + final _whenController = TextEditingController(); + final _whereController = TextEditingController(); + final _managementsLineController = TextEditingController(); + final _signsController = TextEditingController(); + List conditionsData = [ + {"name": "CHRONIC", "isChecked": false}, + {"name": "RTA", "isChecked": false}, + {"name": "PSYCHIATRIC", "isChecked": false}, + {"name": "WORK RELATED", "isChecked": false}, + {"name": "VACCINATION", "isChecked": false}, + {"name": "CONGENITAL", "isChecked": false}, + {"name": "INFERTILITY", "isChecked": false}, + {"name": "CHECK-UP", "isChecked": false}, + {"name": "PREGNANCY/INDICATE MP", "isChecked": false}, + {"name": "CLEANING", "isChecked": false}, + {"name": "ORTHO DONTICS", "isChecked": false}, + {"name": "SPORTS RELATED", "isChecked": false}, + {"name": "REGULAR DENTAL TREATMENT", "isChecked": false}, + {"name": "IS TRAUMA TREATMENT SPECIFY ETA", "isChecked": false}, + ]; + @override Widget build(BuildContext context) { final routeArgs = ModalRoute.of(context).settings.arguments as Map; @@ -21,8 +55,379 @@ class _UCAFInputScreenState extends State { builder: (_, model, w) => AppScaffold( baseViewModel: model, appBarTitle: TranslationBase.of(context).ucaf, - body: Container(), + body: SingleChildScrollView( + child: Column( + children: [ + PatientHeaderWidget(patient), + Container( + margin: EdgeInsets.symmetric(vertical: 16, horizontal: 16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + CheckboxListTile( + title: AppText( + TranslationBase.of(context).inPatient, + fontWeight: FontWeight.bold, + fontSize: SizeConfig.textMultiplier * 2.1, + ), + value: _inPatient, + onChanged: (newValue) { + setState(() { + _inPatient = newValue; + }); + }, + controlAffinity: ListTileControlAffinity.leading, + contentPadding: EdgeInsets.all(0), + ), + CheckboxListTile( + title: AppText( + TranslationBase.of(context).emergencyCase, + fontWeight: FontWeight.bold, + fontSize: SizeConfig.textMultiplier * 2.1, + ), + value: _emergencyCase, + onChanged: (newValue) { + setState(() { + _emergencyCase = newValue; + }); + }, + controlAffinity: ListTileControlAffinity.leading, + contentPadding: EdgeInsets.all(0), + ), + Container( + height: screenSize.height * 0.070, + child: TextField( + decoration: Helpers.textFieldSelectorDecoration( + TranslationBase.of(context).durationOfIllness, + null, + false), + enabled: true, + controller: _durationOfIllnessController, + inputFormatters: [ + FilteringTextInputFormatter.allow( + RegExp(ONLY_NUMBERS)) + ], + keyboardType: TextInputType.number, + )), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + AppText( + "BP (H/L)", + fontSize: SizeConfig.textMultiplier * 1.8, + color: Colors.black, + fontWeight: FontWeight.w700, + ), + SizedBox( + width: 8, + ), + AppText( + "120/80", + fontSize: SizeConfig.textMultiplier * 2, + color: Colors.grey.shade800, + fontWeight: FontWeight.normal, + ), + ], + ), + Row( + children: [ + AppText( + "${TranslationBase.of(context).temperature}", + fontSize: SizeConfig.textMultiplier * 1.8, + color: Colors.black, + fontWeight: FontWeight.w700, + ), + SizedBox( + width: 8, + ), + AppText( + "37.5(C), 98.6(F)", + fontSize: SizeConfig.textMultiplier * 2, + color: Colors.grey.shade800, + fontWeight: FontWeight.normal, + ), + ], + ), + ], + ), + SizedBox( + height: 4, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + AppText( + "${TranslationBase.of(context).pulseBeats} :", + fontSize: SizeConfig.textMultiplier * 1.8, + color: Colors.black, + fontWeight: FontWeight.w700, + ), + SizedBox( + width: 8, + ), + AppText( + "80", + fontSize: SizeConfig.textMultiplier * 2, + color: Colors.grey.shade800, + fontWeight: FontWeight.normal, + ), + ], + ), + ], + ), + SizedBox( + height: 16, + ), + AppText( + TranslationBase.of(context).chiefComplaintsAndSymptoms, + fontWeight: FontWeight.bold, + fontSize: SizeConfig.textMultiplier * 2.5, + ), + SizedBox( + height: 8, + ), + AppText( + TranslationBase.of(context) + .patientFeelsPainInHisBackAndCough, + fontWeight: FontWeight.normal, + fontSize: SizeConfig.textMultiplier * 2.0, + ), + SizedBox( + height: 8, + ), + Container( + child: TextField( + decoration: Helpers.textFieldSelectorDecoration( + TranslationBase.of(context).additionalTextComplaints, + null, + false), + enabled: true, + controller: _additionalComplaintsController, + keyboardType: TextInputType.text, + minLines: 4, + maxLines: 6, + )), + SizedBox( + height: 16, + ), + AppText( + TranslationBase.of(context).otherConditions, + fontWeight: FontWeight.bold, + fontSize: SizeConfig.textMultiplier * 2.0, + ), + ...List.generate( + conditionsData.length, + (index) => CheckboxListTile( + title: AppText( + conditionsData[index]['name'], + fontWeight: FontWeight.bold, + fontSize: SizeConfig.textMultiplier * 2.1, + ), + value: conditionsData[index]['isChecked'], + onChanged: (newValue) { + setState(() { + conditionsData[index]['isChecked'] = newValue; + }); + }, + controlAffinity: ListTileControlAffinity.leading, + contentPadding: EdgeInsets.all(0), + )), + SizedBox( + height: 8, + ), + Container( + height: screenSize.height * 0.070, + child: TextField( + decoration: Helpers.textFieldSelectorDecoration( + TranslationBase.of(context).other, + null, + false), + enabled: true, + controller: _otherController, + keyboardType: TextInputType.text, + )), + SizedBox( + height: 8, + ), + Container( + height: screenSize.height * 0.070, + child: TextField( + decoration: Helpers.textFieldSelectorDecoration( + TranslationBase.of(context).how, + null, + false), + enabled: true, + controller: _howController, + keyboardType: TextInputType.text, + )), + SizedBox( + height: 8, + ), + Row( + children: [ + Expanded( + child: Container( + height: screenSize.height * 0.070, + child: TextField( + decoration: Helpers.textFieldSelectorDecoration( + TranslationBase.of(context).when, + null, + false), + enabled: true, + controller: _whenController, + keyboardType: TextInputType.text, + )), + ), + SizedBox( + width: 4, + ), + Expanded( + child: Container( + height: screenSize.height * 0.070, + child: TextField( + decoration: Helpers.textFieldSelectorDecoration( + TranslationBase.of(context).where, + null, + false), + enabled: true, + controller: _whereController, + keyboardType: TextInputType.text, + )), + ), + ], + ), + SizedBox( + height: 8, + ), + Container( + child: TextField( + decoration: Helpers.textFieldSelectorDecoration( + TranslationBase.of(context).specifyPossibleLineManagement, + null, + false), + enabled: true, + controller: _managementsLineController, + keyboardType: TextInputType.text, + minLines: 4, + maxLines: 6, + )), + SizedBox( + height: 16, + ), + AppText( + TranslationBase.of(context) + .significantSigns, + fontWeight: FontWeight.bold, + fontSize: SizeConfig.textMultiplier * 2.0, + ), + SizedBox( + height: 8, + ), + Container( + child: TextField( + decoration: Helpers.textFieldSelectorDecoration( + TranslationBase.of(context).backAbdomen, + null, + false), + enabled: true, + controller: _signsController, + keyboardType: TextInputType.text, + minLines: 4, + maxLines: 6, + )), + SizedBox( + height: 16, + ), + AppButton( + title: TranslationBase.of(context).next, + color: HexColor("#B8382B"), + onPressed: (){ + // Navigator.of(context).pushNamed(PATIENT_ADMISSION_REQUEST_3, arguments: {'patient': patient}); + }, + ), + ], + ), + ), + ], + ), + ), ), ); } } + +class PatientHeaderWidget extends StatelessWidget { + final PatiantInformtion patient; + + PatientHeaderWidget(this.patient); + + @override + Widget build(BuildContext context) { + return Column( + children: [ + Container( + margin: EdgeInsets.all(16), + child: Row( + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + patient.firstName + ' ' + patient.lastName, + fontWeight: FontWeight.bold, + fontSize: SizeConfig.textMultiplier * 2.2, + ), + Row( + children: [ + AppText( + "VIP", + fontWeight: FontWeight.bold, + fontSize: SizeConfig.textMultiplier * 2.2, + ), + SizedBox( + width: 8, + ), + AppText( + " ${patient.age}", + fontWeight: FontWeight.normal, + fontSize: SizeConfig.textMultiplier * 2.0, + ), + ], + ), + AppText( + "NEW VISIT", + fontWeight: FontWeight.bold, + fontSize: SizeConfig.textMultiplier * 2.0, + ), + AppText( + "${patient.companyName}", + fontWeight: FontWeight.bold, + fontSize: SizeConfig.textMultiplier * 2.0, + ), + ], + ), + ), + Icon( + Icons.info_outline, + color: Colors.black, + ), + ], + ), + ), + Container( + width: double.infinity, + height: 1, + color: Color(0xffCCCCCC), + ), + ], + ); + } +} diff --git a/lib/util/translations_delegate_base.dart b/lib/util/translations_delegate_base.dart index a67463a0..213ad371 100644 --- a/lib/util/translations_delegate_base.dart +++ b/lib/util/translations_delegate_base.dart @@ -439,6 +439,19 @@ class TranslationBase { String get save => localizedValues['save'][locale.languageCode]; String get postPlansEstimatedCost => localizedValues['postPlansEstimatedCost'][locale.languageCode]; String get ucaf => localizedValues['ucaf'][locale.languageCode]; + String get emergencyCase => localizedValues['emergencyCase'][locale.languageCode]; + String get durationOfIllness => localizedValues['durationOfIllness'][locale.languageCode]; + String get chiefComplaintsAndSymptoms => localizedValues['chiefComplaintsAndSymptoms'][locale.languageCode]; + String get patientFeelsPainInHisBackAndCough => localizedValues['patientFeelsPainInHisBackAndCough'][locale.languageCode]; + String get additionalTextComplaints => localizedValues['additionalTextComplaints'][locale.languageCode]; + String get otherConditions => localizedValues['otherConditions'][locale.languageCode]; + String get other => localizedValues['other'][locale.languageCode]; + String get how => localizedValues['how'][locale.languageCode]; + String get when => localizedValues['when'][locale.languageCode]; + String get where => localizedValues['where'][locale.languageCode]; + String get specifyPossibleLineManagement => localizedValues['specifyPossibleLineManagement'][locale.languageCode]; + String get significantSigns => localizedValues['significantSigns'][locale.languageCode]; + String get backAbdomen => localizedValues['backAbdomen'][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/widgets/patients/profile/profile_medical_info_widget.dart b/lib/widgets/patients/profile/profile_medical_info_widget.dart index 3f7baf51..35f1e586 100644 --- a/lib/widgets/patients/profile/profile_medical_info_widget.dart +++ b/lib/widgets/patients/profile/profile_medical_info_widget.dart @@ -43,13 +43,16 @@ class ProfileMedicalInfoWidget extends StatelessWidget { nameLine2: "Episode", route: UPDATE_EPISODE, icon: 'heartbeat.png'), - PatientProfileButton( - key: key, - patient: patient, - nameLine1: TranslationBase.of(context).vital, - nameLine2: TranslationBase.of(context).signs, - route: PATIENT_VITAL_SIGN, - icon: 'heartbeat.png'), + Visibility( + visible: selectedPatientType == 6 || selectedPatientType == 7, + child: PatientProfileButton( + key: key, + patient: patient, + nameLine1: TranslationBase.of(context).vital, + nameLine2: TranslationBase.of(context).signs, + route: PATIENT_VITAL_SIGN, + icon: 'heartbeat.png'), + ), PatientProfileButton( key: key, patient: patient, @@ -80,13 +83,16 @@ class ProfileMedicalInfoWidget extends StatelessWidget { nameLine1: TranslationBase.of(context).progress, nameLine2: TranslationBase.of(context).note, icon: 'heartbeat.png')), - PatientProfileButton( - key: key, - patient: patient, - route: PATIENT_ADMISSION_REQUEST, - nameLine1: TranslationBase.of(context).admission, - nameLine2: TranslationBase.of(context).request, - icon: 'heartbeat.png'), + Visibility( + visible: selectedPatientType == 6 || selectedPatientType == 7, + child: PatientProfileButton( + key: key, + patient: patient, + route: PATIENT_ADMISSION_REQUEST, + nameLine1: TranslationBase.of(context).admission, + nameLine2: TranslationBase.of(context).request, + icon: 'heartbeat.png'), + ), // PatientProfileButton( // key: key, // patient: patient, @@ -109,9 +115,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { nameLine2: 'Or Procedures', icon: 'lab.png'), Visibility( - visible: selectedPatientType != 0 && - selectedPatientType != 5 && - selectedPatientType != 2, + visible: selectedPatientType == 6 || selectedPatientType == 7, child: PatientProfileButton( key: key, patient: patient, @@ -138,7 +142,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { nameLine2: TranslationBase.of(context).leave, icon: 'sick_leaves_icons.png')), Visibility( - visible: selectedPatientType != 0 && selectedPatientType != 5, + visible: selectedPatientType == 6 || selectedPatientType == 7, child: PatientProfileButton( key: key, patient: patient,