Merge branch 'development' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into soap_update

 Conflicts:
	lib/routes.dart
	lib/util/helpers.dart
merge-requests/212/head
Mohammad Aljammal 5 years ago
commit d975fb021c

@ -278,6 +278,7 @@ const Map<String, Map<String, String>> localizedValues = {
"sick-leave-days": {"en": "Sick leave days", "ar": "عدد ايام الاجازة."},
'admissionDetail': {'en': 'ADMISSION DETAIL: ', 'ar': 'تفاصيل القبول: '},
'dateTime': {'en': 'DATE / TIME:', 'ar': 'التاريخ / الوقت:'},
'date': {'en': 'Date', 'ar': 'التاريخ'},
'admissionNo': {'en': 'ADMISSION #: ', 'ar': 'قبول #:'},
'losNo': {'en': 'LOS #:', 'ar': 'LOS #:'},
'area': {'en': 'AREA:', 'ar': 'المنطقة'},
@ -375,4 +376,43 @@ const Map<String, Map<String, String>> localizedValues = {
'fio2': {'en': "FIO2(%)", 'ar': 'FIO2(%)'},
'sao2': {'en': "SAO2(%)", 'ar': 'SAO2(%)'},
'painManagement': {'en': "Pain Management", 'ar': 'إدارة الألم'},
'admission': {'en': "Admission", 'ar': 'قبول'},
'request': {'en': "Request", 'ar': 'طلب'},
'admissionRequest': {'en': "Admission Request", 'ar': 'طلب قبول'},
'patientDetails': {'en': "Patient Details", 'ar': 'تفاصيل المريض'},
'specialityAndDoctorDetail': {'en': "SPECIALITY AND DOCTOR DETAILS", 'ar': 'تفاصيل التخصص والطبيب'},
'referringDate': {'en': "Referring Date", 'ar': 'تاريخ الإحالة'},
'referringDoctor': {'en': "Referring Doctor", 'ar': 'دكتور الإحالة'},
'otherInformation': {'en': "Other Information", 'ar': 'معلومات أخرى'},
'expectedDays': {'en': "Expected Days", 'ar': 'الأيام المتوقعة'},
'expectedAdmissionDate': {'en': "Expected Admission Date", 'ar': 'تاريخ القبول المتوقع'},
'emergencyAdmission': {'en': "EMERGENCY ADMISSION", 'ar': 'دخول الطوارئ'},
'patientPregnant': {'en': "Patient Pregnant", 'ar': 'حمل المريض'},
'treatmentLine': {'en': "Main line of treatment", 'ar': 'الخط الرئيسي للعلاج'},
'ward': {'en': "Ward", 'ar': 'رعاية'},
'preAnesthesiaReferred': {'en': "PRE ANESTHESIA REFERRED", 'ar': 'الاحالة قبل التخدير'},
'admissionType': {'en': "Admission Type", 'ar': 'نوع القبول'},
'diagnosis': {'en': "Diagnosis", 'ar': 'التشخيص'},
'allergies': {'en': "Allergies", 'ar': 'الحساسية'},
'preOperativeOrders': {'en': "Pre Operative Orders", 'ar': 'أوامر ما قبل العملية'},
'elementForImprovement': {'en': "Element For Improvement", 'ar': 'عنصر للتحسين'},
'dischargeDate': {'en': "Discharge Date", 'ar': 'تاريخ التفريغ'},
'dietType': {'en': "Diet Type", 'ar': 'نوع النظام الغذائي'},
'dietTypeRemarks': {'en': "Remarks on diet type", 'ar': 'ملاحظات على نوع النظام الغذائي'},
'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': 'الظهر: البطن'},
};

@ -10,7 +10,9 @@ enum MasterKeysService {
physiotherapyGoals,
DiagnosisCondition,
DiagnosisType,
ICD10
ICD10,
TemperatureMethods,
Speciality
}
extension SelectedMasterKeysService on MasterKeysService {
@ -51,6 +53,10 @@ extension SelectedMasterKeysService on MasterKeysService {
break;
case MasterKeysService.ICD10:
return 2500;
case MasterKeysService.TemperatureMethods:
return 2005;
case MasterKeysService.Speciality:
return 10;
break;
}
}

@ -35,6 +35,8 @@ class LookupService extends BaseService {
List<MasterKeyModel> listOfDiagnosisType = [];
List<MasterKeyModel> listOfDiagnosisCondition = [];
List<MasterKeyModel> listOfICD10 = [];
List<MasterKeyModel> listOfTemperatureMethods = [];
List<MasterKeyModel> listOfSpeciality = [];
Future getMasterLookup(MasterKeysService masterKeys) async {
hasError = false;
@ -122,13 +124,27 @@ class LookupService extends BaseService {
.add(MasterKeyModel.fromJson(v));
});
break;
case MasterKeysService.ICD10:
listOfICD10.clear();
case MasterKeysService.ICD10:
listOfICD10.clear();
entryList.forEach((v) {
listOfICD10
.add(MasterKeyModel.fromJson(v));
});
break;
case MasterKeysService.TemperatureMethods:
listOfTemperatureMethods.clear();
entryList.forEach((v) {
listOfTemperatureMethods
.add(MasterKeyModel.fromJson(v));
});
break;
case MasterKeysService.Speciality:
listOfSpeciality.clear();
entryList.forEach((v) {
listOfSpeciality
.add(MasterKeyModel.fromJson(v));
});
break;
}
}

@ -0,0 +1,31 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/service/base/lookup-service.dart';
class AdmissionRequestService extends LookupService {
List<dynamic> doctorsList = [];
List<dynamic> specialityList = [];
setSpecialityList() {
specialityList.clear();
listOfSpeciality.forEach((element) {
specialityList.add(element.toJson());
});
}
Future getDoctorsList() async {
hasError = false;
await baseAppClient.post(
PATIENT_GET_DOCTOR_BY_CLINIC_URL,
onSuccess: (dynamic response, int statusCode) {
doctorsList = [];
doctorsList = response['List_Doctors_All'];
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
},
body: Map(),
);
}
}

@ -0,0 +1,5 @@
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
class UcafService extends BaseService {
}

@ -0,0 +1,46 @@
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/service/patient-admission-request-service.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import '../../locator.dart';
class AdmissionRequestViewModel extends BaseViewModel{
AdmissionRequestService _admissionRequestService = locator<AdmissionRequestService>();
List<dynamic> get doctorsList => _admissionRequestService.doctorsList;
List<dynamic> get speciality => _admissionRequestService.specialityList;
String selectedLanguage;
Future getLanguage() async {
selectedLanguage = await sharedPref.getString(APP_Language);
}
Future getMasterLookup() async {
setState(ViewState.Busy);
await getLanguage();
await _admissionRequestService.getMasterLookup(MasterKeysService.Speciality);
if (_admissionRequestService.hasError) {
error = _admissionRequestService.error;
setState(ViewState.Error);
} else {
_admissionRequestService.setSpecialityList();
await getClinicDoctors();
}
}
Future getClinicDoctors() async {
setState(ViewState.Busy);
await _admissionRequestService.getDoctorsList();
if (_admissionRequestService.hasError) {
error = _admissionRequestService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
}

@ -0,0 +1,9 @@
import 'package:doctor_app_flutter/core/service/patient-ucaf-service.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import '../../locator.dart';
class UcafViewModel extends BaseViewModel {
UcafService _ucafService = locator<UcafService>();
}

@ -18,14 +18,16 @@ class VitalSignsViewModel extends BaseViewModel {
Future getPatientArrivalList(String date, PatiantInformtion patient,
{String fromDate}) async {
setState(ViewState.Busy);
// TODO when arrival list work un comment below lines
/* setState(ViewState.Busy);
await _vitalSignService.getPatientArrivalList(date, fromDate: fromDate);
if (_vitalSignService.hasError) {
error = _vitalSignService.error;
setState(ViewState.Error);
} else {
await getPatientVitalSign(patient);
}
}*/
makeVitalSignDemoData();
}
PatientArrivalEntity getPatientAppointmentEntity(PatiantInformtion patient) {
@ -60,41 +62,73 @@ class VitalSignsViewModel extends BaseViewModel {
setState(ViewState.Error);
} else {
if (patientVitalSigns == null) {
_vitalSignService.patientVitalSigns = VitalSignData(
appointmentNo: 2016053265,
bloodPressureCuffLocation: 0,
bloodPressureCuffSize: 0,
bloodPressureHigher: 38,
bloodPressureLower: 32,
bloodPressurePatientPosition: 1,
bodyMassIndex: 31.11,
fio2: 0,
headCircumCm: 0,
heightCm: 150,
idealBodyWeightLbs: -2,
isPainManagementDone: false,
isVitalsRequired: true,
leanBodyWeightLbs: 0,
painCharacter: null,
painDuration: null,
painFrequency: null,
painLocation: null,
painScore: 0,
patientMRN: 3333274,
patientType: 1,
pulseBeatPerMinute: 0,
pulseRhythm: 0,
respirationBeatPerMinute: 0,
respirationPattern: 0,
sao2: 0,
status: 47,
temperatureCelcius: 40,
temperatureCelciusMethod: 1,
waistSizeInch: 39,
weightKg: 70,
);
makeVitalSignDemoData();
}
setState(ViewState.Idle);
}
}
makeVitalSignDemoData(){
_vitalSignService.patientVitalSigns = VitalSignData(
appointmentNo: 2016053265,
bloodPressureCuffLocation: 0,
bloodPressureCuffSize: 0,
bloodPressureHigher: 38,
bloodPressureLower: 32,
bloodPressurePatientPosition: 1,
bodyMassIndex: 31.11,
fio2: 0,
headCircumCm: 0,
heightCm: 150,
idealBodyWeightLbs: -2,
isPainManagementDone: false,
isVitalsRequired: true,
leanBodyWeightLbs: 0,
painCharacter: null,
painDuration: null,
painFrequency: null,
painLocation: null,
painScore: 0,
patientMRN: 3333274,
patientType: 1,
pulseBeatPerMinute: 0,
pulseRhythm: 0,
respirationBeatPerMinute: 0,
respirationPattern: 0,
sao2: 0,
status: 47,
temperatureCelcius: 40,
temperatureCelciusMethod: 1,
waistSizeInch: 39,
weightKg: 70,
);
}
String getBMI(double bodyMassIndex) {
if (bodyMassIndex <= 18.5) {
return "Underweight";
} else if (bodyMassIndex <= 25.0) {
return "Normal";
} else if (bodyMassIndex <= 30) {
return "Overweight";
} else { // > 30.0
return "Obese";
}
}
String getTempratureMethod(int temperatureCelciusMethod){
// temperatureCelciusMethod ( vital sign response field )- master 2005
if(temperatureCelciusMethod == 1){
return "Oral";
} else if(temperatureCelciusMethod == 2){
return "Axilla";
} else if(temperatureCelciusMethod == 3){
return "Rectal";
} else if(temperatureCelciusMethod == 4){
return "Tympanic";
} else if(temperatureCelciusMethod == 5){
return "Temporal";
}
}
}

@ -13,8 +13,10 @@ import 'package:doctor_app_flutter/core/viewModel/sick_leave_view_model.dart';
import 'package:get_it/get_it.dart';
import 'core/service/SOAP_service.dart';
import 'core/service/patient-admission-request-service.dart';
import 'core/service/doctor_reply_service.dart';
import 'core/service/medicine_service.dart';
import 'core/service/patient-ucaf-service.dart';
import 'core/service/patient-vital-signs-service.dart';
import 'core/service/patient-doctor-referral-service.dart';
import 'core/service/referral_patient_service.dart';
@ -23,6 +25,8 @@ import 'core/service/schedule_service.dart';
import 'core/viewModel/SOAP_view_model.dart';
import 'core/viewModel/doctor_replay_view_model.dart';
import 'core/viewModel/medicine_view_model.dart';
import 'core/viewModel/patient-admission-request-viewmodel.dart';
import 'core/viewModel/patient-ucaf-viewmodel.dart';
import 'core/viewModel/patient-vital-sign-viewmodel.dart';
import 'core/viewModel/patient-referral-viewmodel.dart';
import 'core/viewModel/referral_view_model.dart';
@ -48,6 +52,8 @@ void setupLocator() {
locator.registerLazySingleton(() => ProcedureService());
locator.registerLazySingleton(() => VitalSignsService());
locator.registerLazySingleton(() => MedicalFileService());
locator.registerLazySingleton(() => AdmissionRequestService());
locator.registerLazySingleton(() => UcafService());
/// View Model
locator.registerFactory(() => DoctorReplayViewModel());
@ -63,5 +69,7 @@ void setupLocator() {
locator.registerFactory(() => PrescriptionViewModel());
locator.registerFactory(() => ProcedureViewModel());
locator.registerFactory(() => VitalSignsViewModel());
locator.registerFactory(() => AdmissionRequestViewModel());
locator.registerFactory(() => UcafViewModel());
locator.registerFactory(() => MedicalFileViewModel());
}

@ -1,6 +1,7 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/root_page.dart';
import 'package:doctor_app_flutter/screens/medical-file/medical_file_page.dart';
import 'package:doctor_app_flutter/screens/patients/profile/UCAF/UCAF-input-screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/insurance_approvals_screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/patient_orders_screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/progress_note_screen.dart';
@ -43,6 +44,9 @@ import './screens/settings/settings_screen.dart';
import 'landing_page.dart';
import 'screens/doctor/doctor_reply_screen.dart';
import 'screens/live_care/panding_list.dart';
import 'screens/patients/profile/admission-request/admission-request-detail-screen.dart';
import 'screens/patients/profile/admission-request/admission-request-third-screen.dart';
import 'screens/patients/profile/admission-request/admission-request_second-screen.dart';
import 'screens/patients/profile/referral/my-referral-detail-screen.dart';
import 'screens/patients/profile/referral/refer-patient-screen.dart';
import 'screens/prescription/prescription_screen.dart';
@ -84,6 +88,10 @@ const String VITAL_SIGN_DETAILS = 'patients/vital-sign-details';
const String CREATE_EPISODE = 'patients/create-episode';
const String UPDATE_EPISODE = 'patients/update-episode';
const String PATIENT_VITAL_SIGN = 'patients/vital-sign-data';
const String PATIENT_ADMISSION_REQUEST = 'patients/admission-request';
const String PATIENT_ADMISSION_REQUEST_2 = 'patients/admission-request-second';
const String PATIENT_ADMISSION_REQUEST_3 = 'patients/admission-request-third';
const String PATIENT_UCAF_REQUEST = 'patients/ucaf';
const String BODY_MEASUREMENTS = 'patients/body-measurements';
const String IN_PATIENT_PRESCRIPTIONS_DETAILS = 'patients/prescription-details';
@ -128,6 +136,9 @@ var routes = {
PATIENT_INSURANCE_APPROVALS: (_) => InsuranceApprovalsScreen(),
VITAL_SIGN_DETAILS: (_) => VitalSignDetailsScreen(),
PATIENT_VITAL_SIGN: (_) => PatientVitalSignScreen(),
PATIENT_ADMISSION_REQUEST: (_) => AdmissionRequestDetailScreen(),
PATIENT_ADMISSION_REQUEST_2: (_) => AdmissionRequestSecondScreen(),
PATIENT_ADMISSION_REQUEST_3: (_) => AdmissionRequestThirdScreen(),
CREATE_EPISODE: (_) => UpdateSoapIndex(isUpdate: true,),
UPDATE_EPISODE: (_) => UpdateSoapIndex(
isUpdate: true,
@ -144,4 +155,5 @@ var routes = {
// LIVECARE_END_DIALOG: (_) => EndCallDialogBox()
MY_REFERRAL_DETAIL: (_) => MyReferralDetailScreen(),
PATIENT_UCAF_REQUEST: (_) => UCAFInputScreen(),
};

@ -0,0 +1,433 @@
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
_UCAFInputScreenState createState() => _UCAFInputScreenState();
}
class _UCAFInputScreenState extends State<UCAFInputScreen> {
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<Map> 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;
PatiantInformtion patient = routeArgs['patient'];
final screenSize = MediaQuery.of(context).size;
return BaseView<UcafViewModel>(
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
appBarTitle: TranslationBase.of(context).ucaf,
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),
),
],
);
}
}

@ -0,0 +1,285 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/patient-admission-request-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/date-utils.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/patients/profile/patient-page-header-widget.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:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import '../../../../routes.dart';
import 'admission-request_second-screen.dart';
class AdmissionRequestDetailScreen extends StatefulWidget {
@override
_AdmissionRequestDetailScreenState createState() =>
_AdmissionRequestDetailScreenState();
}
class _AdmissionRequestDetailScreenState
extends State<AdmissionRequestDetailScreen> {
DateTime selectedDate;
dynamic _selectedSpeciality;
dynamic _selectedDoctor;
@override
Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
final screenSize = MediaQuery.of(context).size;
return BaseView<AdmissionRequestViewModel>(
onModelReady: (model) => model.getMasterLookup(),
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
appBarTitle: TranslationBase.of(context).admissionRequest,
body: model.doctorsList != null
? Column(
children: [
Expanded(
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
PatientPageHeaderWidget(patient),
Container(
margin: EdgeInsets.symmetric(
vertical: 16, horizontal: 16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 16,
),
AppText(
TranslationBase.of(context).patientDetails,
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.5,
),
SizedBox(
height: 10,
),
Container(
decoration:
Helpers.containerBorderDecoration(
Color(0xFFEEEEEE),
Color(0xFFCCCCCC),
borderWidth: 0.0),
height: screenSize.height * 0.070,
child: TextField(
decoration:
Helpers.textFieldSelectorDecoration(
"Pre Admission Number :01",
null,
false),
enabled: false,
// controller: _remarksController,
keyboardType: TextInputType.text,
)),
SizedBox(
height: 10,
),
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap: () => _selectDate(context, model),
child: TextField(
decoration:
Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).date,
selectedDate != null
? "${DateUtils.convertStringToDateFormat(selectedDate.toString(), "yyyy-MM-dd")}"
: null,
true,
suffixIcon: Icon(
Icons.calendar_today,
color: Colors.black,
)),
enabled: false,
),
),
),
SizedBox(
height: 20,
),
AppText(
TranslationBase.of(context)
.specialityAndDoctorDetail,
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.5,
),
SizedBox(
height: 10,
),
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap: () {
ListSelectDialog dialog =
ListSelectDialog(
list: model.speciality,
attributeName: model.selectedLanguage == 'ar' ? 'nameAr' :'nameEn' ,
attributeValueId: 'id',
okText:
TranslationBase.of(context)
.ok,
okFunction: (selectedValue) {
setState(() {
_selectedSpeciality =
selectedValue;
});
});
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
},
child: TextField(
decoration:
Helpers.textFieldSelectorDecoration(
TranslationBase.of(context)
.speciality,
_selectedSpeciality != null
? model.selectedLanguage == 'ar' ? _selectedSpeciality['nameAr'] : _selectedSpeciality['nameEn']
: null,
true),
enabled: false,
),
),
),
SizedBox(
height: 10,
),
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap: model.doctorsList != null &&
model.doctorsList.length > 0
? () {
ListSelectDialog dialog =
ListSelectDialog(
list: model.doctorsList,
attributeName: 'DoctorName',
attributeValueId: 'DoctorID',
okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) {
setState(() {
_selectedDoctor = selectedValue;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
: null,
child: TextField(
decoration: Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).doctor,
_selectedDoctor != null
? _selectedDoctor['DoctorName']
: null,
true),
enabled: false,
),
),
),
SizedBox(
height: 10,
),
Container(
height: screenSize.height * 0.070,
decoration:
Helpers.containerBorderDecoration(
Color(0xFFEEEEEE),
Color(0xFFCCCCCC),
borderWidth: 0.0),
child: InkWell(
onTap: () => null,
child: TextField(
decoration:
Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).referringDate,
null,
true,
suffixIcon: Icon(
Icons.calendar_today,
color: Color(0xFFCCCCCC),
)),
enabled: false,
),
),
),
SizedBox(
height: 10,
),
Container(
decoration:
Helpers.containerBorderDecoration(
Color(0xFFEEEEEE),
Color(0xFFCCCCCC),
borderWidth: 0.0),
height: screenSize.height * 0.070,
child: TextField(
decoration:
Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).referringDoctor,
null,
true, dropDownColor: Color(0xFFCCCCCC)),
enabled: false,
// controller: _remarksController,
keyboardType: TextInputType.text,
)),
],
),
),
],
),
),
),
Container(
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
child: AppButton(
title: TranslationBase.of(context).next,
color: HexColor("#B8382B"),
onPressed: (){
Navigator.of(context).pushNamed(PATIENT_ADMISSION_REQUEST_2, arguments: {'patient': patient});
},
),
),
],
)
: Container(),
),
);
}
_selectDate(BuildContext context, AdmissionRequestViewModel model) async {
selectedDate = DateTime.now();
final DateTime picked = await showDatePicker(
context: context,
initialDate: selectedDate,
firstDate: DateTime.now().add(Duration(hours: 2)),
lastDate: DateTime(2040),
initialEntryMode: DatePickerEntryMode.calendar,
);
if (picked != null && picked != selectedDate) {
setState(() {
selectedDate = picked;
});
}
}
}

@ -0,0 +1,208 @@
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-admission-request-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/date-utils.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/patients/profile/patient-page-header-widget.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 AdmissionRequestThirdScreen extends StatefulWidget {
@override
_AdmissionRequestThirdScreenState createState() => _AdmissionRequestThirdScreenState();
}
class _AdmissionRequestThirdScreenState extends State<AdmissionRequestThirdScreen> {
final _postPlansEstimatedCostController = TextEditingController();
final _dietTypeRemarksController = TextEditingController();
DateTime _dischargeDate;
dynamic _selectedDietType;
@override
Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
final screenSize = MediaQuery.of(context).size;
return BaseView<AdmissionRequestViewModel>(
// onModelReady: (model) => model.getMasterLookup(),
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
appBarTitle: TranslationBase.of(context).admissionRequest,
body: model.doctorsList != null
? Column(
children: [
Expanded(
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
PatientPageHeaderWidget(patient),
Container(
margin: EdgeInsets.symmetric(
vertical: 16, horizontal: 16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 16,
),
AppText(
TranslationBase.of(context).postPlansEstimatedCost,
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.5,
),
SizedBox(
height: 10,
),
Container(
child: TextField(
decoration:
Helpers.textFieldSelectorDecoration(
TranslationBase.of(context)
.postPlansEstimatedCost,
null,
false),
enabled: true,
controller: _postPlansEstimatedCostController,
keyboardType: TextInputType.text,
minLines: 4,
maxLines: 6,
)),
SizedBox(
height: 10,
),
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap: () {
if (_dischargeDate == null) {
_dischargeDate = DateTime.now();
}
_selectDate(
context, _dischargeDate,
(picked) {
setState(() {
_dischargeDate = picked;
});
});
},
child: TextField(
decoration:
Helpers.textFieldSelectorDecoration(
TranslationBase.of(context)
.expectedAdmissionDate,
_dischargeDate != null
? "${DateUtils.convertStringToDateFormat(_dischargeDate.toString(), "yyyy-MM-dd")}"
: null,
true,
suffixIcon: Icon(
Icons.calendar_today,
color: Colors.black,
)),
enabled: false,
),
),
),
SizedBox(
height: 10,
),
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap: /*model.doctorsList != null &&
model.doctorsList.length > 0
? () {
ListSelectDialog dialog =
ListSelectDialog(
list: model.doctorsList,
attributeName: 'DoctorName',
attributeValueId: 'DoctorID',
okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) {
setState(() {
_selectedDoctor = selectedValue;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
:*/ null,
child: TextField(
decoration: Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).dietType,
/* _admissionType != null
? _admissionType['DoctorName']
:*/ null,
true),
enabled: false,
),
),
),
SizedBox(
height: 10,
),
Container(
child: TextField(
decoration:
Helpers.textFieldSelectorDecoration(
TranslationBase.of(context)
.dietTypeRemarks,
null,
false),
enabled: true,
controller: _dietTypeRemarksController,
keyboardType: TextInputType.text,
minLines: 4,
maxLines: 6,
)),
],
),
),
],
),
),
),
Container(
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
child: AppButton(
title: TranslationBase.of(context).save,
color: HexColor("#B8382B"),
onPressed: null,
),
),
],
)
: Container(),
),
);
}
Future _selectDate(BuildContext context, DateTime dateTime,
Function(DateTime picked) updateDate) async {
final DateTime picked = await showDatePicker(
context: context,
initialDate: dateTime,
firstDate: DateTime.now(),
lastDate: DateTime(2040),
initialEntryMode: DatePickerEntryMode.calendar,
);
if (picked != null && picked != dateTime) {
updateDate(picked);
}
}
}

@ -0,0 +1,402 @@
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-admission-request-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/date-utils.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/patients/profile/patient-page-header-widget.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';
import '../../../../routes.dart';
class AdmissionRequestSecondScreen extends StatefulWidget {
@override
_AdmissionRequestSecondScreenState createState() =>
_AdmissionRequestSecondScreenState();
}
class _AdmissionRequestSecondScreenState
extends State<AdmissionRequestSecondScreen> {
final _expectedDaysController = TextEditingController();
final _treatmentLineController = TextEditingController();
final _preOperativeOrdersController = TextEditingController();
DateTime _expectedAdmissionDate;
bool _emergencyAdmission = false;
bool _patientPregnant = false;
bool _preAnesthesiaReferred = false;
dynamic _selectedWard;
dynamic _selectedAdmissionType;
@override
Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
final screenSize = MediaQuery.of(context).size;
return BaseView<AdmissionRequestViewModel>(
// onModelReady: (model) => model.getMasterLookup(),
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
appBarTitle: TranslationBase.of(context).admissionRequest,
body: model.doctorsList != null
? Column(
children: [
Expanded(
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
PatientPageHeaderWidget(patient),
Container(
margin: EdgeInsets.symmetric(
vertical: 16, horizontal: 16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 16,
),
AppText(
TranslationBase.of(context).otherInformation,
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.5,
),
SizedBox(
height: 10,
),
Container(
height: screenSize.height * 0.070,
child: TextField(
decoration:
Helpers.textFieldSelectorDecoration(
TranslationBase.of(context)
.expectedDays,
null,
false),
enabled: true,
controller: _expectedDaysController,
inputFormatters: [
FilteringTextInputFormatter.allow(
RegExp(ONLY_NUMBERS))
],
keyboardType: TextInputType.number,
)),
SizedBox(
height: 10,
),
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap: () {
if (_expectedAdmissionDate == null) {
_expectedAdmissionDate = DateTime.now();
}
_selectDate(
context, _expectedAdmissionDate,
(picked) {
setState(() {
_expectedAdmissionDate = picked;
});
});
},
child: TextField(
decoration:
Helpers.textFieldSelectorDecoration(
TranslationBase.of(context)
.expectedAdmissionDate,
_expectedAdmissionDate != null
? "${DateUtils.convertStringToDateFormat(_expectedAdmissionDate.toString(), "yyyy-MM-dd")}"
: null,
true,
suffixIcon: Icon(
Icons.calendar_today,
color: Colors.black,
)),
enabled: false,
),
),
),
SizedBox(
height: 10,
),
CheckboxListTile(
title: AppText(
TranslationBase.of(context)
.emergencyAdmission,
fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 2.1,
),
value: _emergencyAdmission,
onChanged: (newValue) {
setState(() {
_emergencyAdmission = newValue;
});
},
controlAffinity: ListTileControlAffinity.leading,
contentPadding: EdgeInsets.all(0),
),
CheckboxListTile(
title: AppText(
TranslationBase.of(context)
.patientPregnant,
fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 2.1,
),
value: _patientPregnant,
onChanged: (newValue) {
setState(() {
_patientPregnant = newValue;
});
},
controlAffinity: ListTileControlAffinity.leading,
contentPadding: EdgeInsets.all(0),
),
Container(
child: TextField(
decoration: Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).treatmentLine,
null,
false),
enabled: true,
controller: _treatmentLineController,
keyboardType: TextInputType.text,
minLines: 4,
maxLines: 6,
)),
SizedBox(
height: 10,
),
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap: /*model.doctorsList != null &&
model.doctorsList.length > 0
? () {
ListSelectDialog dialog =
ListSelectDialog(
list: model.doctorsList,
attributeName: 'DoctorName',
attributeValueId: 'DoctorID',
okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) {
setState(() {
_selectedDoctor = selectedValue;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
:*/ null,
child: TextField(
decoration: Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).ward,
/* _selectedWard != null
? _selectedWard['DoctorName']
:*/ null,
true),
enabled: false,
),
),
),
CheckboxListTile(
title: AppText(
TranslationBase.of(context)
.preAnesthesiaReferred,
fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 2.1,
),
value: _preAnesthesiaReferred,
onChanged: (newValue) {
setState(() {
_preAnesthesiaReferred = newValue;
});
},
controlAffinity: ListTileControlAffinity.leading,
contentPadding: EdgeInsets.all(0),
),
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap: /*model.doctorsList != null &&
model.doctorsList.length > 0
? () {
ListSelectDialog dialog =
ListSelectDialog(
list: model.doctorsList,
attributeName: 'DoctorName',
attributeValueId: 'DoctorID',
okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) {
setState(() {
_selectedDoctor = selectedValue;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
:*/ null,
child: TextField(
decoration: Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).admissionType,
/* _admissionType != null
? _admissionType['DoctorName']
:*/ null,
true),
enabled: false,
),
),
),
SizedBox(
height: 10,
),
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap: /*model.doctorsList != null &&
model.doctorsList.length > 0
? () {
ListSelectDialog dialog =
ListSelectDialog(
list: model.doctorsList,
attributeName: 'DoctorName',
attributeValueId: 'DoctorID',
okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) {
setState(() {
_selectedDoctor = selectedValue;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
:*/ null,
child: TextField(
decoration: Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).diagnosis,
/* _admissionType != null
? _admissionType['DoctorName']
:*/ null,
true),
enabled: false,
),
),
),
SizedBox(
height: 10,
),
Container(
child: TextField(
decoration: Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).preOperativeOrders,
null,
false),
enabled: true,
controller: _preOperativeOrdersController,
keyboardType: TextInputType.text,
minLines: 4,
maxLines: 6,
)),
SizedBox(
height: 10,
),
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap: /*model.doctorsList != null &&
model.doctorsList.length > 0
? () {
ListSelectDialog dialog =
ListSelectDialog(
list: model.doctorsList,
attributeName: 'DoctorName',
attributeValueId: 'DoctorID',
okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) {
setState(() {
_selectedDoctor = selectedValue;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
:*/ null,
child: TextField(
decoration: Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).allergies,
/* _admissionType != null
? _admissionType['DoctorName']
:*/ null,
true),
enabled: false,
),
),
),
],
),
),
],
),
),
),
Container(
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
child: AppButton(
title: TranslationBase.of(context).next,
color: HexColor("#B8382B"),
onPressed: (){
Navigator.of(context).pushNamed(PATIENT_ADMISSION_REQUEST_3, arguments: {'patient': patient});
},
),
),
],
)
: Container(),
),
);
}
Future _selectDate(BuildContext context, DateTime dateTime,
Function(DateTime picked) updateDate) async {
final DateTime picked = await showDatePicker(
context: context,
initialDate: dateTime,
firstDate: DateTime.now(),
lastDate: DateTime(2040),
initialEntryMode: DatePickerEntryMode.calendar,
);
if (picked != null && picked != dateTime) {
updateDate(picked);
}
}
}

@ -207,6 +207,21 @@ class PatientVitalSignScreen extends StatelessWidget {
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
SizedBox(
width: 8,
),
Container(
color: Colors.green,
child: Padding(
padding: EdgeInsets.symmetric(vertical: 2, horizontal: 8),
child: AppText(
"${model.getBMI(model.patientVitalSigns.bodyMassIndex)}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.white,
fontWeight: FontWeight.bold,
),
),
)
],
),
],
@ -251,7 +266,7 @@ class PatientVitalSignScreen extends StatelessWidget {
SizedBox(
height: 16,
),
TemperatureWidget(model.patientVitalSigns),
TemperatureWidget(model, model.patientVitalSigns),
SizedBox(
height: 16,
),
@ -349,9 +364,10 @@ class PatientVitalSignScreen extends StatelessWidget {
}
class TemperatureWidget extends StatefulWidget {
final VitalSignsViewModel model;
final VitalSignData vitalSign;
TemperatureWidget(this.vitalSign);
TemperatureWidget(this.model, this.vitalSign);
@override
_TemperatureWidgetState createState() => _TemperatureWidgetState();
@ -450,7 +466,7 @@ class _TemperatureWidgetState extends State<TemperatureWidget> {
width: 8,
),
AppText(
"${widget.vitalSign.temperatureCelciusMethod}",
"${widget.model.getTempratureMethod(widget.vitalSign.temperatureCelciusMethod)}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,

@ -360,4 +360,49 @@ class Helpers {
return parsedString;
}
static InputDecoration textFieldSelectorDecoration(
String hintText, String selectedText, bool isDropDown,
{Icon suffixIcon, Color dropDownColor}) {
return InputDecoration(
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
borderRadius: BorderRadius.circular(8),
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
borderRadius: BorderRadius.circular(8),
),
disabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
borderRadius: BorderRadius.circular(8),
),
hintText: selectedText != null ? selectedText : hintText,
suffixIcon: isDropDown
? suffixIcon != null
? suffixIcon
: Icon(
Icons.arrow_drop_down,
color: dropDownColor != null ? dropDownColor : Colors.black,
)
: null,
hintStyle: TextStyle(
fontSize: 14,
color: Colors.grey.shade600,
),
);
}
static BoxDecoration containerBorderDecoration(
Color containerColor, Color borderColor, {double borderWidth = -1}) {
return BoxDecoration(
color: containerColor,
shape: BoxShape.rectangle,
borderRadius: BorderRadius.all(Radius.circular(8)),
border: Border.fromBorderSide(BorderSide(
color: borderColor,
width: borderWidth == -1 ? 2.0 : borderWidth,
)),
);
}
}

@ -316,6 +316,7 @@ class TranslationBase {
String get admissionDetail =>
localizedValues['admissionDetail'][locale.languageCode];
String get dateTime => localizedValues['dateTime'][locale.languageCode];
String get date => localizedValues['date'][locale.languageCode];
String get admissionNo => localizedValues['admissionNo'][locale.languageCode];
String get losNo => localizedValues['losNo'][locale.languageCode];
String get area => localizedValues['area'][locale.languageCode];
@ -412,6 +413,45 @@ class TranslationBase {
String get fio2 => localizedValues['fio2'][locale.languageCode];
String get sao2 => localizedValues['sao2'][locale.languageCode];
String get painManagement => localizedValues['painManagement'][locale.languageCode];
String get admission => localizedValues['admission'][locale.languageCode];
String get request => localizedValues['request'][locale.languageCode];
String get admissionRequest => localizedValues['admissionRequest'][locale.languageCode];
String get patientDetails => localizedValues['patientDetails'][locale.languageCode];
String get specialityAndDoctorDetail => localizedValues['specialityAndDoctorDetail'][locale.languageCode];
String get referringDate => localizedValues['referringDate'][locale.languageCode];
String get referringDoctor => localizedValues['referringDoctor'][locale.languageCode];
String get otherInformation => localizedValues['otherInformation'][locale.languageCode];
String get expectedDays => localizedValues['expectedDays'][locale.languageCode];
String get expectedAdmissionDate => localizedValues['expectedAdmissionDate'][locale.languageCode];
String get emergencyAdmission => localizedValues['emergencyAdmission'][locale.languageCode];
String get patientPregnant => localizedValues['patientPregnant'][locale.languageCode];
String get treatmentLine => localizedValues['treatmentLine'][locale.languageCode];
String get ward => localizedValues['ward'][locale.languageCode];
String get preAnesthesiaReferred => localizedValues['preAnesthesiaReferred'][locale.languageCode];
String get admissionType => localizedValues['admissionType'][locale.languageCode];
String get diagnosis => localizedValues['diagnosis'][locale.languageCode];
String get allergies => localizedValues['allergies'][locale.languageCode];
String get preOperativeOrders => localizedValues['preOperativeOrders'][locale.languageCode];
String get elementForImprovement => localizedValues['elementForImprovement'][locale.languageCode];
String get dischargeDate => localizedValues['dischargeDate'][locale.languageCode];
String get dietType => localizedValues['dietType'][locale.languageCode];
String get dietTypeRemarks => localizedValues['dietTypeRemarks'][locale.languageCode];
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<TranslationBase> {

@ -42,13 +42,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,
@ -79,13 +82,23 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).progress,
nameLine2: TranslationBase.of(context).note,
icon: 'heartbeat.png')),
PatientProfileButton(
key: key,
patient: patient,
route: PATIENT_INSURANCE_APPROVALS,
nameLine1: TranslationBase.of(context).insurance,
nameLine2: TranslationBase.of(context).approvals,
icon: 'lab.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,
// route: PATIENT_INSURANCE_APPROVALS,
// nameLine1: TranslationBase.of(context).insurance,
// nameLine2: TranslationBase.of(context).approvals,
// icon: 'lab.png'),
PatientProfileButton(
key: key,
patient: patient,
@ -101,9 +114,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,
@ -129,6 +140,15 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).patientSick,
nameLine2: TranslationBase.of(context).leave,
icon: 'sick_leaves_icons.png')),
Visibility(
visible: selectedPatientType == 6 || selectedPatientType == 7,
child: PatientProfileButton(
key: key,
patient: patient,
route: PATIENT_UCAF_REQUEST,
nameLine1: TranslationBase.of(context).patient,
nameLine2: TranslationBase.of(context).ucaf,
icon: 'lab.png')),
]);
}
}

Loading…
Cancel
Save