Merge branch 'development' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into design-updates

merge-requests/220/head
hussam al-habibeh 5 years ago
commit e72ef46efb

@ -278,6 +278,7 @@ const Map<String, Map<String, String>> localizedValues = {
"sick-leave-days": {"en": "Sick leave days", "ar": "عدد ايام الاجازة."}, "sick-leave-days": {"en": "Sick leave days", "ar": "عدد ايام الاجازة."},
'admissionDetail': {'en': 'ADMISSION DETAIL: ', 'ar': 'تفاصيل القبول: '}, 'admissionDetail': {'en': 'ADMISSION DETAIL: ', 'ar': 'تفاصيل القبول: '},
'dateTime': {'en': 'DATE / TIME:', 'ar': 'التاريخ / الوقت:'}, 'dateTime': {'en': 'DATE / TIME:', 'ar': 'التاريخ / الوقت:'},
'date': {'en': 'Date', 'ar': 'التاريخ'},
'admissionNo': {'en': 'ADMISSION #: ', 'ar': 'قبول #:'}, 'admissionNo': {'en': 'ADMISSION #: ', 'ar': 'قبول #:'},
'losNo': {'en': 'LOS #:', 'ar': 'LOS #:'}, 'losNo': {'en': 'LOS #:', 'ar': 'LOS #:'},
'area': {'en': 'AREA:', 'ar': 'المنطقة'}, 'area': {'en': 'AREA:', 'ar': 'المنطقة'},
@ -375,4 +376,43 @@ const Map<String, Map<String, String>> localizedValues = {
'fio2': {'en': "FIO2(%)", 'ar': 'FIO2(%)'}, 'fio2': {'en': "FIO2(%)", 'ar': 'FIO2(%)'},
'sao2': {'en': "SAO2(%)", 'ar': 'SAO2(%)'}, 'sao2': {'en': "SAO2(%)", 'ar': 'SAO2(%)'},
'painManagement': {'en': "Pain Management", 'ar': 'إدارة الألم'}, '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, physiotherapyGoals,
DiagnosisCondition, DiagnosisCondition,
DiagnosisType, DiagnosisType,
ICD10 ICD10,
TemperatureMethods,
Speciality
} }
extension SelectedMasterKeysService on MasterKeysService { extension SelectedMasterKeysService on MasterKeysService {
@ -51,6 +53,10 @@ extension SelectedMasterKeysService on MasterKeysService {
break; break;
case MasterKeysService.ICD10: case MasterKeysService.ICD10:
return 2500; return 2500;
case MasterKeysService.TemperatureMethods:
return 2005;
case MasterKeysService.Speciality:
return 10;
break; break;
} }
} }

@ -3,6 +3,8 @@ import 'package:doctor_app_flutter/models/SOAP/ChiefComplaint/GetChiefComplaintR
import 'package:doctor_app_flutter/models/SOAP/ChiefComplaint/GetChiefComplaintResModel.dart'; import 'package:doctor_app_flutter/models/SOAP/ChiefComplaint/GetChiefComplaintResModel.dart';
import 'package:doctor_app_flutter/models/SOAP/GeneralGetReqForSOAP.dart'; import 'package:doctor_app_flutter/models/SOAP/GeneralGetReqForSOAP.dart';
import 'package:doctor_app_flutter/models/SOAP/GetAllergiesResModel.dart'; import 'package:doctor_app_flutter/models/SOAP/GetAllergiesResModel.dart';
import 'package:doctor_app_flutter/models/SOAP/GetAssessmentReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/GetAssessmentResModel.dart';
import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteReqModel.dart'; import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteResModel.dart'; import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteResModel.dart';
import 'package:doctor_app_flutter/models/SOAP/GetHistoryReqModel.dart'; import 'package:doctor_app_flutter/models/SOAP/GetHistoryReqModel.dart';
@ -27,6 +29,7 @@ class SOAPService extends LookupService {
List<GetHistoryResModel> patientHistoryList = []; List<GetHistoryResModel> patientHistoryList = [];
List<GetPhysicalExamResModel> patientPhysicalExamList = []; List<GetPhysicalExamResModel> patientPhysicalExamList = [];
List<GetGetProgressNoteResModel> patientProgressNoteList = []; List<GetGetProgressNoteResModel> patientProgressNoteList = [];
List<GetAssessmentResModel> patientAssessmentList = [];
Future getAllergies(GetAllergiesRequestModel getAllergiesRequestModel) async { Future getAllergies(GetAllergiesRequestModel getAllergiesRequestModel) async {
await baseAppClient.post( await baseAppClient.post(
@ -266,6 +269,7 @@ class SOAPService extends LookupService {
response['ProgressNoteList']['entityList'].forEach((v) { response['ProgressNoteList']['entityList'].forEach((v) {
patientProgressNoteList.add(GetGetProgressNoteResModel.fromJson(v)); patientProgressNoteList.add(GetGetProgressNoteResModel.fromJson(v));
}); });
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
@ -273,14 +277,18 @@ class SOAPService extends LookupService {
} }
Future getPatientAssessment( Future getPatientAssessment(
PostAssessmentRequestModel getPatientAssessmentRequestModel) async { GetAssessmentReqModel getAssessmentReqModel) async {
hasError = false; hasError = false;
await baseAppClient.post (GET_ASSESSMENT, await baseAppClient.post (GET_ASSESSMENT,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
print("Success"); print("Success");
patientAssessmentList.clear();
response['AssessmentList']['entityList'].forEach((v) {
patientAssessmentList.add(GetAssessmentResModel.fromJson(v));
});
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: getPatientAssessmentRequestModel.toJson()); }, body: getAssessmentReqModel.toJson());
} }
} }

@ -35,6 +35,8 @@ class LookupService extends BaseService {
List<MasterKeyModel> listOfDiagnosisType = []; List<MasterKeyModel> listOfDiagnosisType = [];
List<MasterKeyModel> listOfDiagnosisCondition = []; List<MasterKeyModel> listOfDiagnosisCondition = [];
List<MasterKeyModel> listOfICD10 = []; List<MasterKeyModel> listOfICD10 = [];
List<MasterKeyModel> listOfTemperatureMethods = [];
List<MasterKeyModel> listOfSpeciality = [];
Future getMasterLookup(MasterKeysService masterKeys) async { Future getMasterLookup(MasterKeysService masterKeys) async {
hasError = false; hasError = false;
@ -129,6 +131,20 @@ class LookupService extends BaseService {
.add(MasterKeyModel.fromJson(v)); .add(MasterKeyModel.fromJson(v));
}); });
break; 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 {
}

@ -5,6 +5,8 @@ import 'package:doctor_app_flutter/models/SOAP/ChiefComplaint/GetChiefComplaintR
import 'package:doctor_app_flutter/models/SOAP/ChiefComplaint/GetChiefComplaintResModel.dart'; import 'package:doctor_app_flutter/models/SOAP/ChiefComplaint/GetChiefComplaintResModel.dart';
import 'package:doctor_app_flutter/models/SOAP/GeneralGetReqForSOAP.dart'; import 'package:doctor_app_flutter/models/SOAP/GeneralGetReqForSOAP.dart';
import 'package:doctor_app_flutter/models/SOAP/GetAllergiesResModel.dart'; import 'package:doctor_app_flutter/models/SOAP/GetAllergiesResModel.dart';
import 'package:doctor_app_flutter/models/SOAP/GetAssessmentReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/GetAssessmentResModel.dart';
import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteReqModel.dart'; import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteResModel.dart'; import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteResModel.dart';
import 'package:doctor_app_flutter/models/SOAP/GetHistoryReqModel.dart'; import 'package:doctor_app_flutter/models/SOAP/GetHistoryReqModel.dart';
@ -64,14 +66,19 @@ class SOAPViewModel extends BaseViewModel {
List<GetAllergiesResModel> get patientAllergiesList => List<GetAllergiesResModel> get patientAllergiesList =>
_SOAPService.patientAllergiesList; _SOAPService.patientAllergiesList;
List<GetHistoryResModel> get patientHistoryList => List<GetHistoryResModel> get patientHistoryList =>
_SOAPService.patientHistoryList; _SOAPService.patientHistoryList;
List<GetPhysicalExamResModel> get patientPhysicalExamList => List<GetPhysicalExamResModel> get patientPhysicalExamList =>
_SOAPService.patientPhysicalExamList; _SOAPService.patientPhysicalExamList;
List<GetGetProgressNoteResModel> get patientProgressNoteList => List<GetGetProgressNoteResModel> get patientProgressNoteList =>
_SOAPService.patientProgressNoteList; _SOAPService.patientProgressNoteList;
List<GetAssessmentResModel> get patientAssessmentList =>
_SOAPService.patientAssessmentList;
Future getAllergies(GetAllergiesRequestModel getAllergiesRequestModel) async { Future getAllergies(GetAllergiesRequestModel getAllergiesRequestModel) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _SOAPService.getAllergies(getAllergiesRequestModel); await _SOAPService.getAllergies(getAllergiesRequestModel);
@ -266,9 +273,9 @@ class SOAPViewModel extends BaseViewModel {
} }
Future getPatientAssessment( Future getPatientAssessment(
PostAssessmentRequestModel getPatientAssessmentRequestModel) async { GetAssessmentReqModel getAssessmentReqModel) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _SOAPService.getPatientAssessment(getPatientAssessmentRequestModel); await _SOAPService.getPatientAssessment(getAssessmentReqModel);
if (_SOAPService.hasError) { if (_SOAPService.hasError) {
error = _SOAPService.error; error = _SOAPService.error;
setState(ViewState.Busy); setState(ViewState.Busy);
@ -276,14 +283,12 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
// ignore: missing_return // ignore: missing_return
MasterKeyModel getOneMasterKey( MasterKeyModel getOneMasterKey(
{@required MasterKeysService masterKeys, int id, int typeId}) { {@required MasterKeysService masterKeys, dynamic id, int typeId}) {
switch (masterKeys) { switch (masterKeys) {
case MasterKeysService.Allergies: case MasterKeysService.Allergies:
List<MasterKeyModel> result = allergiesList.where((element) { List<MasterKeyModel> result = allergiesList.where((element) {
print(element.id == id);
return element.id == id && return element.id == id &&
element.typeId == masterKeys.getMasterKeyService(); element.typeId == masterKeys.getMasterKeyService();
}).toList(); }).toList();
@ -294,7 +299,6 @@ class SOAPViewModel extends BaseViewModel {
case MasterKeysService.HistoryFamily: case MasterKeysService.HistoryFamily:
List<MasterKeyModel> result = historyFamilyList.where((element) { List<MasterKeyModel> result = historyFamilyList.where((element) {
print(element.id == id);
return element.id == id && return element.id == id &&
element.typeId == masterKeys.getMasterKeyService(); element.typeId == masterKeys.getMasterKeyService();
}).toList(); }).toList();
@ -304,7 +308,6 @@ class SOAPViewModel extends BaseViewModel {
break; break;
case MasterKeysService.HistoryMedical: case MasterKeysService.HistoryMedical:
List<MasterKeyModel> result = historyMedicalList.where((element) { List<MasterKeyModel> result = historyMedicalList.where((element) {
print(element.id == id);
return element.id == id && return element.id == id &&
element.typeId == masterKeys.getMasterKeyService(); element.typeId == masterKeys.getMasterKeyService();
}).toList(); }).toList();
@ -314,7 +317,6 @@ class SOAPViewModel extends BaseViewModel {
break; break;
case MasterKeysService.HistorySocial: case MasterKeysService.HistorySocial:
List<MasterKeyModel> result = historySocialList.where((element) { List<MasterKeyModel> result = historySocialList.where((element) {
print(element.id == id);
return element.id == id && return element.id == id &&
element.typeId == masterKeys.getMasterKeyService(); element.typeId == masterKeys.getMasterKeyService();
}).toList(); }).toList();
@ -324,7 +326,6 @@ class SOAPViewModel extends BaseViewModel {
break; break;
case MasterKeysService.HistorySports: case MasterKeysService.HistorySports:
List<MasterKeyModel> result = historySocialList.where((element) { List<MasterKeyModel> result = historySocialList.where((element) {
print(element.id == id);
return element.id == id && return element.id == id &&
element.typeId == masterKeys.getMasterKeyService(); element.typeId == masterKeys.getMasterKeyService();
}).toList(); }).toList();
@ -334,17 +335,13 @@ class SOAPViewModel extends BaseViewModel {
break; break;
case MasterKeysService.HistorySurgical: case MasterKeysService.HistorySurgical:
List<MasterKeyModel> result = historySurgicalList.where((element) { List<MasterKeyModel> result = historySurgicalList.where((element) {
print(element.id == id); return element.id == id;}).toList();
return element.id == id &&
element.typeId == masterKeys.getMasterKeyService();
}).toList();
if (result.isNotEmpty) { if (result.isNotEmpty) {
return result.first; return result.first;
} }
break; break;
case MasterKeysService.PhysicalExamination: case MasterKeysService.PhysicalExamination:
List<MasterKeyModel> result = physicalExaminationList.where((element) { List<MasterKeyModel> result = physicalExaminationList.where((element) {
print(element.id == id);
return element.id == id && return element.id == id &&
element.typeId == masterKeys.getMasterKeyService(); element.typeId == masterKeys.getMasterKeyService();
}).toList(); }).toList();
@ -354,7 +351,6 @@ class SOAPViewModel extends BaseViewModel {
break; break;
case MasterKeysService.AllergySeverity: case MasterKeysService.AllergySeverity:
List<MasterKeyModel> result = allergySeverityList.where((element) { List<MasterKeyModel> result = allergySeverityList.where((element) {
print(element.id == id);
return element.id == id && return element.id == id &&
element.typeId == masterKeys.getMasterKeyService(); element.typeId == masterKeys.getMasterKeyService();
}).toList(); }).toList();
@ -371,7 +367,6 @@ class SOAPViewModel extends BaseViewModel {
case MasterKeysService.DiagnosisType: case MasterKeysService.DiagnosisType:
List<MasterKeyModel> result = listOfDiagnosisType.where((element) { List<MasterKeyModel> result = listOfDiagnosisType.where((element) {
print(element.id == id);
return element.id == id && return element.id == id &&
element.typeId == masterKeys.getMasterKeyService(); element.typeId == masterKeys.getMasterKeyService();
}).toList(); }).toList();
@ -381,7 +376,6 @@ class SOAPViewModel extends BaseViewModel {
break; break;
case MasterKeysService.DiagnosisCondition: case MasterKeysService.DiagnosisCondition:
List<MasterKeyModel> result = listOfDiagnosisCondition.where((element) { List<MasterKeyModel> result = listOfDiagnosisCondition.where((element) {
print(element.id == id);
return element.id == id && return element.id == id &&
element.typeId == masterKeys.getMasterKeyService(); element.typeId == masterKeys.getMasterKeyService();
}).toList(); }).toList();
@ -390,11 +384,8 @@ class SOAPViewModel extends BaseViewModel {
} }
break; break;
case MasterKeysService.ICD10: case MasterKeysService.ICD10:
listOfICD10.clear();
List<MasterKeyModel> result = listOfICD10.where((element) { List<MasterKeyModel> result = listOfICD10.where((element) {
print(element.id == id); return element.code == id ;
return element.id == id &&
element.typeId == masterKeys.getMasterKeyService();
}).toList(); }).toList();
if (result.isNotEmpty) { if (result.isNotEmpty) {
return result.first; return result.first;

@ -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, Future getPatientArrivalList(String date, PatiantInformtion patient,
{String fromDate}) async { {String fromDate}) async {
setState(ViewState.Busy); // TODO when arrival list work un comment below lines
/* setState(ViewState.Busy);
await _vitalSignService.getPatientArrivalList(date, fromDate: fromDate); await _vitalSignService.getPatientArrivalList(date, fromDate: fromDate);
if (_vitalSignService.hasError) { if (_vitalSignService.hasError) {
error = _vitalSignService.error; error = _vitalSignService.error;
setState(ViewState.Error); setState(ViewState.Error);
} else { } else {
await getPatientVitalSign(patient); await getPatientVitalSign(patient);
} }*/
makeVitalSignDemoData();
} }
PatientArrivalEntity getPatientAppointmentEntity(PatiantInformtion patient) { PatientArrivalEntity getPatientAppointmentEntity(PatiantInformtion patient) {
@ -60,6 +62,13 @@ class VitalSignsViewModel extends BaseViewModel {
setState(ViewState.Error); setState(ViewState.Error);
} else { } else {
if (patientVitalSigns == null) { if (patientVitalSigns == null) {
makeVitalSignDemoData();
}
setState(ViewState.Idle);
}
}
makeVitalSignDemoData(){
_vitalSignService.patientVitalSigns = VitalSignData( _vitalSignService.patientVitalSigns = VitalSignData(
appointmentNo: 2016053265, appointmentNo: 2016053265,
bloodPressureCuffLocation: 0, bloodPressureCuffLocation: 0,
@ -94,7 +103,32 @@ class VitalSignsViewModel extends BaseViewModel {
weightKg: 70, weightKg: 70,
); );
} }
setState(ViewState.Idle);
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 'package:get_it/get_it.dart';
import 'core/service/SOAP_service.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/doctor_reply_service.dart';
import 'core/service/medicine_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-vital-signs-service.dart';
import 'core/service/patient-doctor-referral-service.dart'; import 'core/service/patient-doctor-referral-service.dart';
import 'core/service/referral_patient_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/SOAP_view_model.dart';
import 'core/viewModel/doctor_replay_view_model.dart'; import 'core/viewModel/doctor_replay_view_model.dart';
import 'core/viewModel/medicine_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-vital-sign-viewmodel.dart';
import 'core/viewModel/patient-referral-viewmodel.dart'; import 'core/viewModel/patient-referral-viewmodel.dart';
import 'core/viewModel/referral_view_model.dart'; import 'core/viewModel/referral_view_model.dart';
@ -48,6 +52,8 @@ void setupLocator() {
locator.registerLazySingleton(() => ProcedureService()); locator.registerLazySingleton(() => ProcedureService());
locator.registerLazySingleton(() => VitalSignsService()); locator.registerLazySingleton(() => VitalSignsService());
locator.registerLazySingleton(() => MedicalFileService()); locator.registerLazySingleton(() => MedicalFileService());
locator.registerLazySingleton(() => AdmissionRequestService());
locator.registerLazySingleton(() => UcafService());
/// View Model /// View Model
locator.registerFactory(() => DoctorReplayViewModel()); locator.registerFactory(() => DoctorReplayViewModel());
@ -63,5 +69,7 @@ void setupLocator() {
locator.registerFactory(() => PrescriptionViewModel()); locator.registerFactory(() => PrescriptionViewModel());
locator.registerFactory(() => ProcedureViewModel()); locator.registerFactory(() => ProcedureViewModel());
locator.registerFactory(() => VitalSignsViewModel()); locator.registerFactory(() => VitalSignsViewModel());
locator.registerFactory(() => AdmissionRequestViewModel());
locator.registerFactory(() => UcafViewModel());
locator.registerFactory(() => MedicalFileViewModel()); locator.registerFactory(() => MedicalFileViewModel());
} }

@ -0,0 +1,40 @@
class GetAssessmentReqModel {
int patientMRN;
int appointmentNo;
String episodeID;
String from;
String to;
int clinicID;
int doctorID;
GetAssessmentReqModel(
{this.patientMRN,
this.appointmentNo,
this.episodeID,
this.from,
this.to,
this.clinicID,
this.doctorID});
GetAssessmentReqModel.fromJson(Map<String, dynamic> json) {
patientMRN = json['PatientMRN'];
appointmentNo = json['AppointmentNo'];
episodeID = json['EpisodeID'];
from = json['From'];
to = json['To'];
clinicID = json['ClinicID'];
doctorID = json['DoctorID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['PatientMRN'] = this.patientMRN;
data['AppointmentNo'] = this.appointmentNo;
data['EpisodeID'] = this.episodeID;
data['From'] = this.from;
data['To'] = this.to;
data['ClinicID'] = this.clinicID;
data['DoctorID'] = this.doctorID;
return data;
}
}

@ -0,0 +1,72 @@
class GetAssessmentResModel {
int appointmentNo;
String asciiDesc;
String clinicDescription;
int clinicID;
bool complexDiagnosis;
int conditionID;
int createdBy;
String createdOn;
int diagnosisTypeID;
int doctorID;
String doctorName;
int episodeId;
String icdCode10ID;
int patientMRN;
String remarks;
GetAssessmentResModel(
{this.appointmentNo,
this.asciiDesc,
this.clinicDescription,
this.clinicID,
this.complexDiagnosis,
this.conditionID,
this.createdBy,
this.createdOn,
this.diagnosisTypeID,
this.doctorID,
this.doctorName,
this.episodeId,
this.icdCode10ID,
this.patientMRN,
this.remarks});
GetAssessmentResModel.fromJson(Map<String, dynamic> json) {
appointmentNo = json['appointmentNo'];
asciiDesc = json['ascii_Desc'];
clinicDescription = json['clinicDescription'];
clinicID = json['clinicID'];
complexDiagnosis = json['complexDiagnosis'];
conditionID = json['conditionID'];
createdBy = json['createdBy'];
createdOn = json['createdOn'];
diagnosisTypeID = json['diagnosisTypeID'];
doctorID = json['doctorID'];
doctorName = json['doctorName'];
episodeId = json['episodeId'];
icdCode10ID = json['icdCode10ID'];
patientMRN = json['patientMRN'];
remarks = json['remarks'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['appointmentNo'] = this.appointmentNo;
data['ascii_Desc'] = this.asciiDesc;
data['clinicDescription'] = this.clinicDescription;
data['clinicID'] = this.clinicID;
data['complexDiagnosis'] = this.complexDiagnosis;
data['conditionID'] = this.conditionID;
data['createdBy'] = this.createdBy;
data['createdOn'] = this.createdOn;
data['diagnosisTypeID'] = this.diagnosisTypeID;
data['doctorID'] = this.doctorID;
data['doctorName'] = this.doctorName;
data['episodeId'] = this.episodeId;
data['icdCode10ID'] = this.icdCode10ID;
data['patientMRN'] = this.patientMRN;
data['remarks'] = this.remarks;
return data;
}
}

@ -1,18 +1,45 @@
class GetHistoryReqModel { class GetHistoryReqModel {
int patientMRN; int patientMRN;
int historyType; int historyType;
String episodeID;
String from;
String to;
int clinicID;
int doctorID;
int appointmentNo;
GetHistoryReqModel({this.patientMRN, this.historyType}); GetHistoryReqModel(
{this.patientMRN,
this.historyType,
this.episodeID,
this.from,
this.to,
this.clinicID,
this.doctorID,
this.appointmentNo});
GetHistoryReqModel.fromJson(Map<String, dynamic> json) { GetHistoryReqModel.fromJson(Map<String, dynamic> json) {
patientMRN = json['PatientMRN']; patientMRN = json['PatientMRN'];
historyType = json['HistoryType']; historyType = json['HistoryType'];
episodeID = json['EpisodeID'];
from = json['From'];
to = json['To'];
clinicID = json['ClinicID'];
doctorID = json['DoctorID'];
appointmentNo = json['AppointmentNo'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = new Map<String, dynamic>();
data['PatientMRN'] = this.patientMRN; data['PatientMRN'] = this.patientMRN;
data['HistoryType'] = this.historyType; data['HistoryType'] = this.historyType;
data['AppointmentNo'] = this.appointmentNo;
data['EpisodeID'] = this.episodeID;
data['From'] = this.from;
data['To'] = this.to;
data['ClinicID'] = this.clinicID;
data['DoctorID'] = this.doctorID;
return data; return data;
} }
} }

@ -1,6 +1,7 @@
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/root_page.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/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/insurance_approvals_screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/patient_orders_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'; 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 'landing_page.dart';
import 'screens/doctor/doctor_reply_screen.dart'; import 'screens/doctor/doctor_reply_screen.dart';
import 'screens/live_care/panding_list.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/my-referral-detail-screen.dart';
import 'screens/patients/profile/referral/refer-patient-screen.dart'; import 'screens/patients/profile/referral/refer-patient-screen.dart';
import 'screens/prescription/prescription_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 CREATE_EPISODE = 'patients/create-episode';
const String UPDATE_EPISODE = 'patients/update-episode'; const String UPDATE_EPISODE = 'patients/update-episode';
const String PATIENT_VITAL_SIGN = 'patients/vital-sign-data'; 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 BODY_MEASUREMENTS = 'patients/body-measurements';
const String IN_PATIENT_PRESCRIPTIONS_DETAILS = 'patients/prescription-details'; const String IN_PATIENT_PRESCRIPTIONS_DETAILS = 'patients/prescription-details';
@ -128,7 +136,10 @@ var routes = {
PATIENT_INSURANCE_APPROVALS: (_) => InsuranceApprovalsScreen(), PATIENT_INSURANCE_APPROVALS: (_) => InsuranceApprovalsScreen(),
VITAL_SIGN_DETAILS: (_) => VitalSignDetailsScreen(), VITAL_SIGN_DETAILS: (_) => VitalSignDetailsScreen(),
PATIENT_VITAL_SIGN: (_) => PatientVitalSignScreen(), PATIENT_VITAL_SIGN: (_) => PatientVitalSignScreen(),
CREATE_EPISODE: (_) => AddSOAPIndex(), PATIENT_ADMISSION_REQUEST: (_) => AdmissionRequestDetailScreen(),
PATIENT_ADMISSION_REQUEST_2: (_) => AdmissionRequestSecondScreen(),
PATIENT_ADMISSION_REQUEST_3: (_) => AdmissionRequestThirdScreen(),
CREATE_EPISODE: (_) => UpdateSoapIndex(isUpdate: true,),
UPDATE_EPISODE: (_) => UpdateSoapIndex( UPDATE_EPISODE: (_) => UpdateSoapIndex(
isUpdate: true, isUpdate: true,
), ),
@ -144,4 +155,5 @@ var routes = {
// LIVECARE_END_DIALOG: (_) => EndCallDialogBox() // LIVECARE_END_DIALOG: (_) => EndCallDialogBox()
MY_REFERRAL_DETAIL: (_) => MyReferralDetailScreen(), 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, color: Colors.grey.shade800,
fontWeight: FontWeight.normal, 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( SizedBox(
height: 16, height: 16,
), ),
TemperatureWidget(model.patientVitalSigns), TemperatureWidget(model, model.patientVitalSigns),
SizedBox( SizedBox(
height: 16, height: 16,
), ),
@ -349,9 +364,10 @@ class PatientVitalSignScreen extends StatelessWidget {
} }
class TemperatureWidget extends StatefulWidget { class TemperatureWidget extends StatefulWidget {
final VitalSignsViewModel model;
final VitalSignData vitalSign; final VitalSignData vitalSign;
TemperatureWidget(this.vitalSign); TemperatureWidget(this.model, this.vitalSign);
@override @override
_TemperatureWidgetState createState() => _TemperatureWidgetState(); _TemperatureWidgetState createState() => _TemperatureWidgetState();
@ -450,7 +466,7 @@ class _TemperatureWidgetState extends State<TemperatureWidget> {
width: 8, width: 8,
), ),
AppText( AppText(
"${widget.vitalSign.temperatureCelciusMethod}", "${widget.model.getTempratureMethod(widget.vitalSign.temperatureCelciusMethod)}",
fontSize: SizeConfig.textMultiplier * 2, fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800, color: Colors.grey.shade800,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,

@ -5,6 +5,7 @@ import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:html/parser.dart';
import '../config/size_config.dart'; import '../config/size_config.dart';
import '../util/dr_app_toast_msg.dart'; import '../util/dr_app_toast_msg.dart';
@ -352,4 +353,56 @@ class Helpers {
// TODO Fix it // TODO Fix it
// Navigator.of(AppGlobal.CONTEX).popUntil((ModalRoute.withName(LOGIN))); // Navigator.of(AppGlobal.CONTEX).popUntil((ModalRoute.withName(LOGIN)));
} }
String parseHtmlString(String htmlString) {
final document = parse(htmlString);
final String parsedString = parse(document.body.text).documentElement.text;
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 => String get admissionDetail =>
localizedValues['admissionDetail'][locale.languageCode]; localizedValues['admissionDetail'][locale.languageCode];
String get dateTime => localizedValues['dateTime'][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 admissionNo => localizedValues['admissionNo'][locale.languageCode];
String get losNo => localizedValues['losNo'][locale.languageCode]; String get losNo => localizedValues['losNo'][locale.languageCode];
String get area => localizedValues['area'][locale.languageCode]; String get area => localizedValues['area'][locale.languageCode];
@ -412,6 +413,45 @@ class TranslationBase {
String get fio2 => localizedValues['fio2'][locale.languageCode]; String get fio2 => localizedValues['fio2'][locale.languageCode];
String get sao2 => localizedValues['sao2'][locale.languageCode]; String get sao2 => localizedValues['sao2'][locale.languageCode];
String get painManagement => localizedValues['painManagement'][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> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -15,7 +15,7 @@ import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'steps_widget.dart'; import '../soap_update/steps_widget.dart';
class AddSOAPIndex extends StatefulWidget { class AddSOAPIndex extends StatefulWidget {
final bool isUpdate; final bool isUpdate;

@ -42,13 +42,16 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine2: "Episode", nameLine2: "Episode",
route: UPDATE_EPISODE, route: UPDATE_EPISODE,
icon: 'heartbeat.png'), icon: 'heartbeat.png'),
PatientProfileButton( Visibility(
visible: selectedPatientType == 6 || selectedPatientType == 7,
child: PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
nameLine1: TranslationBase.of(context).vital, nameLine1: TranslationBase.of(context).vital,
nameLine2: TranslationBase.of(context).signs, nameLine2: TranslationBase.of(context).signs,
route: PATIENT_VITAL_SIGN, route: PATIENT_VITAL_SIGN,
icon: 'heartbeat.png'), icon: 'heartbeat.png'),
),
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
@ -79,13 +82,23 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).progress, nameLine1: TranslationBase.of(context).progress,
nameLine2: TranslationBase.of(context).note, nameLine2: TranslationBase.of(context).note,
icon: 'heartbeat.png')), icon: 'heartbeat.png')),
PatientProfileButton( Visibility(
visible: selectedPatientType == 6 || selectedPatientType == 7,
child: PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
route: PATIENT_INSURANCE_APPROVALS, route: PATIENT_ADMISSION_REQUEST,
nameLine1: TranslationBase.of(context).insurance, nameLine1: TranslationBase.of(context).admission,
nameLine2: TranslationBase.of(context).approvals, nameLine2: TranslationBase.of(context).request,
icon: 'lab.png'), 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( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
@ -101,9 +114,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine2: 'Or Procedures', nameLine2: 'Or Procedures',
icon: 'lab.png'), icon: 'lab.png'),
Visibility( Visibility(
visible: selectedPatientType != 0 && visible: selectedPatientType == 6 || selectedPatientType == 7,
selectedPatientType != 5 &&
selectedPatientType != 2,
child: PatientProfileButton( child: PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
@ -129,6 +140,15 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).patientSick, nameLine1: TranslationBase.of(context).patientSick,
nameLine2: TranslationBase.of(context).leave, nameLine2: TranslationBase.of(context).leave,
icon: 'sick_leaves_icons.png')), 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')),
]); ]);
} }
} }

@ -24,6 +24,7 @@ import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.
import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:html/parser.dart';
class UpdateSubjectivePage extends StatefulWidget { class UpdateSubjectivePage extends StatefulWidget {
final Function changePageViewIndex; final Function changePageViewIndex;
@ -50,26 +51,12 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
TextEditingController complaintsController = TextEditingController(); TextEditingController complaintsController = TextEditingController();
final formKey = GlobalKey<FormState>(); final formKey = GlobalKey<FormState>();
getHistory(SOAPViewModel model) async{ getHistory(SOAPViewModel model) async{
GetHistoryReqModel getHistoryMedicalReqModel = GetHistoryReqModel( GetHistoryReqModel getHistoryReqModel = GetHistoryReqModel(
patientMRN: widget.patientInfo.patientMRN, patientMRN: widget.patientInfo.patientMRN,
historyType: episodeID: widget.patientInfo.episodeNo.toString(),
MasterKeysService.HistoryMedical.getMasterKeyService()); appointmentNo: widget.patientInfo.appointmentNo
GetHistoryReqModel getHistorySportsReqModel = GetHistoryReqModel( );
patientMRN: widget.patientInfo.patientMRN, await model.getPatientHistories(getHistoryReqModel);
historyType:
MasterKeysService.HistorySports.getMasterKeyService());
GetHistoryReqModel getHistorySurgicalReqModel = GetHistoryReqModel(
patientMRN: widget.patientInfo.patientMRN,
historyType:
MasterKeysService.HistorySurgical.getMasterKeyService());
GetHistoryReqModel getHistoryFamilyReqModel = GetHistoryReqModel(
patientMRN: widget.patientInfo.patientMRN,
historyType:
MasterKeysService.HistoryFamily.getMasterKeyService());
await model.getPatientHistories(getHistoryMedicalReqModel);
await model.getPatientHistories(getHistorySportsReqModel);
await model.getPatientHistories(getHistorySurgicalReqModel);
await model.getPatientHistories(getHistoryFamilyReqModel);
if (model.patientHistoryList.isNotEmpty) { if (model.patientHistoryList.isNotEmpty) {
if (model.historyFamilyList.isEmpty) { if (model.historyFamilyList.isEmpty) {
@ -112,6 +99,7 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<SOAPViewModel>( return BaseView<SOAPViewModel>(
onModelReady: (model) async { onModelReady: (model) async {
GeneralGetReqForSOAP generalGetReqForSOAP = GeneralGetReqForSOAP( GeneralGetReqForSOAP generalGetReqForSOAP = GeneralGetReqForSOAP(
@ -126,8 +114,8 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
episodeID: widget.patientInfo.episodeNo); episodeID: widget.patientInfo.episodeNo);
await model.getPatientChiefComplaint(getChiefComplaintReqModel); await model.getPatientChiefComplaint(getChiefComplaintReqModel);
if (model.patientChiefComplaintList.isNotEmpty) { if (model.patientChiefComplaintList.isNotEmpty) {
complaintsController.text = complaintsController.text = helpers.parseHtmlString(model.patientChiefComplaintList[0].chiefComplaint)
model.patientChiefComplaintList[0].chiefComplaint; ;
illnessController.text = model.patientChiefComplaintList[0].hopi; illnessController.text = model.patientChiefComplaintList[0].hopi;
} }
await model.getPatientAllergy(generalGetReqForSOAP); await model.getPatientAllergy(generalGetReqForSOAP);
@ -390,41 +378,27 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
await postChiefComplaint(model: model); await postChiefComplaint(model: model);
if (model.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error); helpers.showErrorToast(model.error);
} else { }
if (myHistoryList.length != 0) { if (myHistoryList.length != 0) {
await postHistories(model: model, myHistoryList: myHistoryList); await postHistories(model: model, myHistoryList: myHistoryList);
if (model.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error); helpers.showErrorToast(model.error);
} else {
if (myAllergiesList.length != 0) {
await postAllergy(myAllergiesList: myAllergiesList, model: model);
if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error);
} else {
widget.changePageViewIndex(1);
}
} else {
widget.changePageViewIndex(1);
} }
} }
} else {
if (myAllergiesList.length != 0) { if (myAllergiesList.length != 0) {
await postAllergy(myAllergiesList: myAllergiesList, model: model); await postAllergy(myAllergiesList: myAllergiesList, model: model);
if (model.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error); helpers.showErrorToast(model.error);
} else {
widget.changePageViewIndex(1);
}
} else {
widget.changePageViewIndex(1);
}
} }
} }
widget.changePageViewIndex(1);
} else { } else {
helpers.showErrorToast('Please add required field correctly'); helpers.showErrorToast('Please add required field correctly');
} }
widget.changePageViewIndex(1);
} }
@ -487,13 +461,12 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
}); });
if (model.patientAllergiesList.isEmpty) { if (model.patientHistoryList.isEmpty) {
await model.postHistories(postHistoriesRequestModel); await model.postHistories(postHistoriesRequestModel);
} else { } else {
await model.patchHistories(postHistoriesRequestModel); await model.patchHistories(postHistoriesRequestModel);
} }
await model.patchHistories(postHistoriesRequestModel);
if (model.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error); helpers.showErrorToast(model.error);

@ -4,6 +4,7 @@ import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.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/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/GetAssessmentReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/SOAP/my_selected_assement.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_assement.dart';
import 'package:doctor_app_flutter/models/SOAP/post_assessment_request_model.dart'; import 'package:doctor_app_flutter/models/SOAP/post_assessment_request_model.dart';
@ -36,19 +37,53 @@ class UpdateAssessmentPage extends StatefulWidget {
class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> { class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
bool isAssessmentExpand = false; bool isAssessmentExpand = false;
List<dynamic> assessmentList;
dynamic _referTo;
TextEditingController remarksController = TextEditingController();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final screenSize = MediaQuery.of(context).size; final screenSize = MediaQuery.of(context).size;
return BaseView<SOAPViewModel>( return BaseView<SOAPViewModel>(
onModelReady: (model) async{
widget.mySelectedAssessment.appointmentId =widget.patientInfo.appointmentNo;
GetAssessmentReqModel getAssessmentReqModel = GetAssessmentReqModel(
patientMRN: widget.patientInfo.patientMRN,
episodeID: widget.patientInfo.episodeNo.toString(),
appointmentNo: widget.patientInfo.appointmentNo);
await model.getPatientAssessment(getAssessmentReqModel);
if(model.patientAssessmentList.isNotEmpty){
if (model.listOfDiagnosisCondition.length == 0) {
await model.getMasterLookup(MasterKeysService.DiagnosisCondition);
}
if (model.listOfDiagnosisType.length == 0) {
await model.getMasterLookup(MasterKeysService.DiagnosisType);
}
if (model.listOfICD10.length == 0) {
await model.getMasterLookup(MasterKeysService.ICD10);
}
MasterKeyModel selectedICD = model.getOneMasterKey(
masterKeys: MasterKeysService.ICD10,
id: model.patientAssessmentList[0].icdCode10ID,
);
widget.mySelectedAssessment.selectedICD= selectedICD;
MasterKeyModel diagnosisCondition = model.getOneMasterKey(
masterKeys: MasterKeysService.DiagnosisCondition,
id: model.patientAssessmentList[0].conditionID,
);
widget.mySelectedAssessment.selectedDiagnosisCondition = diagnosisCondition;
MasterKeyModel diagnosisType = model.getOneMasterKey(
masterKeys: MasterKeysService.DiagnosisType,
id: model.patientAssessmentList[0].diagnosisTypeID,
);
widget.mySelectedAssessment.selectedDiagnosisType = diagnosisType;
widget.mySelectedAssessment.remark = model.patientAssessmentList[0].remarks;
}
},
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: false, isShowAppBar: false,
baseViewModel: model,
body: SingleChildScrollView( body: SingleChildScrollView(
physics: ScrollPhysics(), physics: ScrollPhysics(),
child: Center( child: Center(
@ -107,7 +142,8 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
readOnly: true, readOnly: true,
// hintColor: Colors.black, // hintColor: Colors.black,
suffixIcon: EvaIcons.plusCircleOutline, suffixIcon: EvaIcons.plusCircleOutline,
suffixIconColor: AppGlobal.appPrimaryColor, suffixIconColor: AppGlobal
.appPrimaryColor,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
// controller: messageController, // controller: messageController,
validator: (value) { validator: (value) {
@ -242,7 +278,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
height: 6, height: 6,
), ),
AppText( AppText(
widget.mySelectedAssessment.remark, widget.mySelectedAssessment.remark??"",
fontSize: 10, fontSize: 10,
color: Colors.grey, color: Colors.grey,
), ),
@ -263,7 +299,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
fontSize: 16, fontSize: 16,
), ),
AppText( AppText(
"R07.1".toUpperCase(), widget.mySelectedAssessment.selectedICD.code.toUpperCase()??"",
fontSize: 10, fontSize: 10,
color: Colors.grey, color: Colors.grey,
), ),
@ -294,7 +330,9 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
height: 30, height: 30,
), ),
AppButton( AppButton(
title: TranslationBase.of(context).next, title: TranslationBase
.of(context)
.next,
loading: model.state == ViewState.BusyLocal, loading: model.state == ViewState.BusyLocal,
onPressed: () async { onPressed: () async {
await submitAssessment(model); await submitAssessment(model);
@ -312,23 +350,45 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
submitAssessment(SOAPViewModel model) async { submitAssessment(SOAPViewModel model) async {
if (widget.mySelectedAssessment.selectedDiagnosisCondition != null && if (widget.mySelectedAssessment.selectedDiagnosisCondition != null &&
widget.mySelectedAssessment.selectedDiagnosisType != null) { widget.mySelectedAssessment.selectedDiagnosisType != null && widget.mySelectedAssessment.selectedICD !=null ) {
PatchAssessmentReqModel patchAssessmentReqModel =
new PatchAssessmentReqModel( if(model.patientAssessmentList.isEmpty){
PostAssessmentRequestModel postAssessmentRequestModel =
new PostAssessmentRequestModel(
patientMRN: widget.patientInfo.patientMRN, patientMRN: widget.patientInfo.patientMRN,
episodeId: widget.patientInfo.episodeNo, episodeId: widget.patientInfo.episodeNo,
appointmentNo: widget.patientInfo.appointmentNo, appointmentNo: widget.patientInfo.appointmentNo,
icdCodeDetails: [
new IcdCodeDetails(
remarks: widget.mySelectedAssessment.remark, remarks: widget.mySelectedAssessment.remark,
complexDiagnosis: true, complexDiagnosis: true,
conditionId: conditionId:
widget.mySelectedAssessment.selectedDiagnosisCondition.id, widget.mySelectedAssessment.selectedDiagnosisCondition.id,
diagnosisTypeId: diagnosisTypeId:
widget.mySelectedAssessment.selectedDiagnosisType.id, widget.mySelectedAssessment.selectedDiagnosisType.id,
icdcode10Id: "1", icdcode10Id: widget.mySelectedAssessment.selectedICD.code)
prevIcdCode10ID: "1" ]);
await model.postAssessment(postAssessmentRequestModel);
} else {
PatchAssessmentReqModel patchAssessmentReqModel =
PatchAssessmentReqModel(
patientMRN: widget.patientInfo.patientMRN,
episodeID: widget.patientInfo.episodeNo,
appointmentNo: widget.patientInfo.appointmentNo,
remarks: widget.mySelectedAssessment.remark,
complexDiagnosis: true,
conditionId:
widget.mySelectedAssessment.selectedDiagnosisCondition.id,
diagnosisTypeId:
widget.mySelectedAssessment.selectedDiagnosisType.id,
icdcode10Id: widget.mySelectedAssessment.selectedICD.code,
prevIcdCode10ID: model.patientAssessmentList[0].icdCode10ID
); );
await model.patchAssessment(patchAssessmentReqModel); await model.patchAssessment(patchAssessmentReqModel);
}
if (model.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error); helpers.showErrorToast(model.error);
@ -363,9 +423,9 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
class AddAssessmentDetails extends StatefulWidget { class AddAssessmentDetails extends StatefulWidget {
final MySelectedAssessment mySelectedAssessment; final MySelectedAssessment mySelectedAssessment;
final Function() addSelectedAssessment; final Function() addSelectedAssessment;
final PatiantInformtion patientInfo;
const AddAssessmentDetails( const AddAssessmentDetails(
{Key key, this.mySelectedAssessment, this.addSelectedAssessment}) {Key key, this.mySelectedAssessment, this.addSelectedAssessment, this.patientInfo})
: super(key: key); : super(key: key);
@override @override
@ -376,13 +436,13 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
// MasterKeyModel _selectedDiagnosisCondition; // MasterKeyModel _selectedDiagnosisCondition;
// MasterKeyModel _selectedDiagnosisType; // MasterKeyModel _selectedDiagnosisType;
TextEditingController remarkController = TextEditingController(); TextEditingController remarkController = TextEditingController();
TextEditingController appointmentIdController = TextEditingController( TextEditingController appointmentIdController = TextEditingController();
text: "234567");
GlobalKey key = new GlobalKey<AutoCompleteTextFieldState<MasterKeyModel>>(); GlobalKey key = new GlobalKey<AutoCompleteTextFieldState<MasterKeyModel>>();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
remarkController.text = widget.mySelectedAssessment.remark??""; remarkController.text = widget.mySelectedAssessment.remark??"";
appointmentIdController.text = widget.mySelectedAssessment.appointmentId.toString();
final screenSize = MediaQuery final screenSize = MediaQuery
.of(context) .of(context)
.size; .size;
@ -644,7 +704,7 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
class PatchAssessmentReqModel { class PatchAssessmentReqModel {
int patientMRN; int patientMRN;
int appointmentNo; int appointmentNo;
int episodeId; int episodeID;
String icdcode10Id; String icdcode10Id;
String prevIcdCode10ID; String prevIcdCode10ID;
int conditionId; int conditionId;
@ -655,7 +715,7 @@ class PatchAssessmentReqModel {
PatchAssessmentReqModel( PatchAssessmentReqModel(
{this.patientMRN, {this.patientMRN,
this.appointmentNo, this.appointmentNo,
this.episodeId, this.episodeID,
this.icdcode10Id, this.icdcode10Id,
this.prevIcdCode10ID, this.prevIcdCode10ID,
this.conditionId, this.conditionId,
@ -664,28 +724,28 @@ class PatchAssessmentReqModel {
this.remarks}); this.remarks});
PatchAssessmentReqModel.fromJson(Map<String, dynamic> json) { PatchAssessmentReqModel.fromJson(Map<String, dynamic> json) {
patientMRN = json['patientMRN']; patientMRN = json['PatientMRN'];
appointmentNo = json['appointmentNo']; appointmentNo = json['AppointmentNo'];
episodeId = json['episodeId']; episodeID = json['EpisodeID'];
icdcode10Id = json['icdcode10Id']; icdcode10Id = json['Icdcode10Id'];
prevIcdCode10ID = json['prevIcdCode10ID']; prevIcdCode10ID = json['PrevIcdCode10ID'];
conditionId = json['conditionId']; conditionId = json['ConditionId'];
diagnosisTypeId = json['diagnosisTypeId']; diagnosisTypeId = json['DiagnosisTypeId'];
complexDiagnosis = json['complexDiagnosis']; complexDiagnosis = json['ComplexDiagnosis'];
remarks = json['remarks']; remarks = json['Remarks'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = new Map<String, dynamic>();
data['patientMRN'] = this.patientMRN; data['PatientMRN'] = this.patientMRN;
data['appointmentNo'] = this.appointmentNo; data['AppointmentNo'] = this.appointmentNo;
data['episodeId'] = this.episodeId; data['EpisodeID'] = this.episodeID;
data['icdcode10Id'] = this.icdcode10Id; data['Icdcode10Id'] = this.icdcode10Id;
data['prevIcdCode10ID'] = this.prevIcdCode10ID; data['PrevIcdCode10ID'] = this.prevIcdCode10ID;
data['conditionId'] = this.conditionId; data['ConditionId'] = this.conditionId;
data['diagnosisTypeId'] = this.diagnosisTypeId; data['DiagnosisTypeId'] = this.diagnosisTypeId;
data['complexDiagnosis'] = this.complexDiagnosis; data['ComplexDiagnosis'] = this.complexDiagnosis;
data['remarks'] = this.remarks; data['Remarks'] = this.remarks;
return data; return data;
} }
} }

@ -84,8 +84,7 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
}, },
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: false, isShowAppBar: false,
//TODO: retrun it back baseViewModel: model,
// baseViewModel: model,
body: SingleChildScrollView( body: SingleChildScrollView(
physics: ScrollPhysics(), physics: ScrollPhysics(),
child: Center( child: Center(
@ -379,7 +378,11 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
)); ));
}); });
if(model.patientPhysicalExamList.isEmpty) {
await model.postPhysicalExam(postPhysicalExamRequestModel);
} else {
await model.patchPhysicalExam(postPhysicalExamRequestModel); await model.patchPhysicalExam(postPhysicalExamRequestModel);
}
if (model.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error); helpers.showErrorToast(model.error);

@ -63,8 +63,8 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
await model.getPatientProgressNote(getGetProgressNoteReqModel); await model.getPatientProgressNote(getGetProgressNoteReqModel);
if (model.patientProgressNoteList.isNotEmpty) { if (model.patientProgressNoteList.isNotEmpty) {
progressNoteController.text = progressNoteController.text = helpers
model.patientProgressNoteList[0].planNote; .parseHtmlString(model.patientProgressNoteList[0].planNote);
} }
}, },
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(

@ -9,7 +9,7 @@ import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/assessment_page.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/assessment_page.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/objective_page.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/objective_page.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/plan_page.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/plan_page.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/steps_widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/steps_widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/subjective/subjective_page.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/subjective/subjective_page.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart';

@ -239,6 +239,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.5" version: "2.1.5"
csslib:
dependency: transitive
description:
name: csslib
url: "https://pub.dartlang.org"
source: hosted
version: "0.16.2"
cupertino_icons: cupertino_icons:
dependency: "direct main" dependency: "direct main"
description: description:
@ -385,6 +392,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.0.6" version: "1.0.6"
html:
dependency: "direct main"
description:
name: html
url: "https://pub.dartlang.org"
source: hosted
version: "0.14.0+4"
http: http:
dependency: "direct main" dependency: "direct main"
description: description:

@ -63,6 +63,9 @@ dependencies:
#Autocomplete TextField #Autocomplete TextField
autocomplete_textfield: ^1.7.3 autocomplete_textfield: ^1.7.3
# Html
html: ^0.14.0+4
#speech to text #speech to text

Loading…
Cancel
Save