Merge branch 'development' into in-patient_re-design

merge-requests/608/head
mosazaid 5 years ago
commit b91d41428f

@ -48,6 +48,7 @@ const Map<String, Map<String, String>> localizedValues = {
'service': {'en': 'Service', 'ar': 'خدمة'}, 'service': {'en': 'Service', 'ar': 'خدمة'},
'referral': {'en': 'Referral', 'ar': 'الإحالة'}, 'referral': {'en': 'Referral', 'ar': 'الإحالة'},
'inPatient': {'en': 'My InPatients', 'ar': 'المريض الداخلي'}, 'inPatient': {'en': 'My InPatients', 'ar': 'المريض الداخلي'},
'inPatientLabel': {'en': 'InPatients', 'ar': 'المريض الداخلي'},
'inPatientAll': {'en': 'All InPatients', 'ar': 'كل المرضى الداخليين'}, 'inPatientAll': {'en': 'All InPatients', 'ar': 'كل المرضى الداخليين'},
'operations': {'en': 'Operations', 'ar': 'عمليات'}, 'operations': {'en': 'Operations', 'ar': 'عمليات'},
'patientServices': {'en': 'Patient Services', 'ar': 'خدمات المرضى'}, 'patientServices': {'en': 'Patient Services', 'ar': 'خدمات المرضى'},
@ -769,7 +770,7 @@ const Map<String, Map<String, String>> localizedValues = {
'arrived_p': {'en': "Arrived", 'ar': "وصل"}, 'arrived_p': {'en': "Arrived", 'ar': "وصل"},
'details': {'en': 'Details', 'ar': 'التفاصيل'}, 'details': {'en': 'Details', 'ar': 'التفاصيل'},
"liveCare": {"en": "Live Care", "ar": "لايف كير"}, "liveCare": {"en": "Live Care", "ar": "لايف كير"},
"out-patient": {"en": "Out Patient", "ar": "عيادات خارجية"}, "out-patient": {"en": "OutPatient", "ar": "عيادات خارجية"},
"BillNo": {"en": "Bill No :", "ar": "رقم الفاتورة"}, "BillNo": {"en": "Bill No :", "ar": "رقم الفاتورة"},
"labResults": {"en": "Lab Result", "ar": "نتيجة المختبر"}, "labResults": {"en": "Lab Result", "ar": "نتيجة المختبر"},
"sendSuc": { "sendSuc": {

@ -39,25 +39,29 @@ class VitalSignsService extends BaseService {
patientVitalSigns = null; patientVitalSigns = null;
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['PatientMRN'] = patient.patientId; // patient.patientMRN body['PatientID'] = patient.patientId; // patient.patientMRN
// body['AppointmentNo'] = patient.appointmentNo; body['InOutPatientType'] = 1;
// body['EpisodeID'] = patient.episodeNo;
body['PatientTypeID'] = 1; body['PatientTypeID'] = 1;
body['PatientType'] = 1; body['PatientType'] = 1;
body['DeviceTypeID'] = 1; body['DeviceTypeID'] = 1;
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
body['From'] = fromDate; body['ProjectID'] = patient.projectId;
body['To'] = toDate; // body['From'] = fromDate;
// body['To'] = toDate;
if (patient.appointmentNo != null && patient.projectId != null) {
body['TransNo'] = patient.appointmentNo;
body['ProjectID'] = patient.projectId;
}
await baseAppClient.post( await baseAppClient.post(
GET_PATIENT_VITAL_SIGN_DATA, GET_PATIENT_VITAL_SIGN,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
patientVitalSignsHistory.clear(); patientVitalSignsHistory.clear();
if (response['VitalSignsHistory'] != null) { if (response['List_DoctorPatientVitalSign'] != null) {
response['VitalSignsHistory'].forEach((v) { response['List_DoctorPatientVitalSign'].forEach((v) {
patientVitalSignsHistory.add(new VitalSignHistory.fromJson(v)); patientVitalSignsHistory.add(new VitalSignHistory.fromJson(v));
}); });
} }
}, },
onFailure: (String error, int statusCode) { onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
@ -67,31 +71,26 @@ class VitalSignsService extends BaseService {
); );
} }
Future getInPatientVitalSignHistory(PatiantInformtion patient, bool isInPatient) async { Future getOutPatientVitalSignHistory(PatiantInformtion patient, String fromDate, String toDate) async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['PatientID'] = patient.patientId; body['PatientID'] = patient.patientId;
body['PatientTypeID'] = patient.patientType; body['PatientTypeID'] = patient.patientType;
// if(isInPatient){ // if(isInPatient){
body['InOutPatientType'] = 0; body['InOutPatientType'] = 0;
// }else { // }else {
// body['InOutPatientType'] = 2; // body['InOutPatientType'] = 2;
// } // }
if (patient.appointmentNo != null && patient.projectId != null) {
body['TransNo'] = patient.appointmentNo;
body['ProjectID'] = patient.projectId;
}
await baseAppClient.postPatient( await baseAppClient.postPatient(
GET_PATIENT_VITAL_SIGN, GET_PATIENT_VITAL_SIGN,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
patientVitalSignsHistory.clear(); patientVitalSignsHistory.clear();
if (response['List_DoctorPatientVitalSign'] != null) { if (response['List_DoctorPatientVitalSign'] != null) {
response['List_DoctorPatientVitalSign'].forEach((v) { response['List_DoctorPatientVitalSign'].forEach((v) {
patientVitalSignsHistory.add(new VitalSignHistory.fromJson(v)); patientVitalSignsHistory.add(new VitalSignHistory.fromJson(v));
}); });}
}
}, },
onFailure: (String error, int statusCode) { onFailure: (String error, int statusCode) {
hasError = true; hasError = true;

@ -124,6 +124,7 @@ class PatientSearchViewModel extends BaseViewModel{
currentModel.firstName = patientSearchRequestModel.firstName; currentModel.firstName = patientSearchRequestModel.firstName;
currentModel.lastName = patientSearchRequestModel.lastName; currentModel.lastName = patientSearchRequestModel.lastName;
currentModel.middleName = patientSearchRequestModel.middleName; currentModel.middleName = patientSearchRequestModel.middleName;
currentModel.doctorID = patientSearchRequestModel.doctorID;
currentModel.from = dateFrom; currentModel.from = dateFrom;
currentModel.to = dateTo; currentModel.to = dateTo;
@ -152,7 +153,7 @@ class PatientSearchViewModel extends BaseViewModel{
setState(ViewState.Busy); setState(ViewState.Busy);
else else
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
await _inPatientService.getInPatientList(requestModel, isMyInpatient); await _inPatientService.getInPatientList(requestModel, false);
if (_inPatientService.hasError) { if (_inPatientService.hasError) {
error = _inPatientService.error; error = _inPatientService.error;
setState(ViewState.Error); setState(ViewState.Error);

@ -56,7 +56,7 @@ class VitalSignsViewModel extends BaseViewModel {
if (isInPatient) { if (isInPatient) {
await _vitalSignService.getPatientVitalSignsHistory(patient, from, to); await _vitalSignService.getPatientVitalSignsHistory(patient, from, to);
} else { } else {
await _vitalSignService.getInPatientVitalSignHistory(patient, isInPatient); await _vitalSignService.getOutPatientVitalSignHistory(patient, from, to);
} }

@ -35,6 +35,7 @@ const String LOGIN = 'login';
const String VERIFICATION_METHODS = 'verification-methods'; const String VERIFICATION_METHODS = 'verification-methods';
const String PATIENTS = 'patients/patients'; const String PATIENTS = 'patients/patients';
const String PATIENTS_PROFILE = 'patients/patients-profile'; const String PATIENTS_PROFILE = 'patients/patients-profile';
const String IN_PATIENTS_PROFILE = 'inpatients/patients-profile';
const String LAB_RESULT = 'patients/lab_result'; const String LAB_RESULT = 'patients/lab_result';
const String MEDICAL_FILE = 'patients/radiology'; const String MEDICAL_FILE = 'patients/radiology';
const String PROGRESS_NOTE = 'patients/progress-note'; const String PROGRESS_NOTE = 'patients/progress-note';

@ -559,7 +559,7 @@ class _HomeScreenState extends State<HomeScreen> {
isSearch: false, isSearch: false,
isInpatient: false, isInpatient: false,
patientSearchRequestModel: patientSearchRequestModel:
PatientSearchRequestModel(from: date, to: date), PatientSearchRequestModel(from: date, to: date,doctorID: authProvider.doctorProfile.doctorID),
selectedPatientType: selectedPatientType:
PatientType.OutPatient, PatientType.OutPatient,
isSearchWithKeyInfo: false, isSearchWithKeyInfo: false,

@ -24,14 +24,14 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
patient = routeArgs['patient']; patient = routeArgs['patient'];
String patientType = routeArgs['patientType']; String patientType = routeArgs['patientType'];
String arrivalType = routeArgs['arrivalType']; String arrivalType = routeArgs['arrivalType'];
bool isInpatient = routeArgs['isInpatient'];
return BaseView<MedicalFileViewModel>( return BaseView<MedicalFileViewModel>(
onModelReady: (model) => model.getMedicalFile(mrn: patient.patientId), onModelReady: (model) => model.getMedicalFile(mrn: patient.patientId),
builder: builder:
(BuildContext context, MedicalFileViewModel model, Widget child) => (BuildContext context, MedicalFileViewModel model, Widget child) =>
AppScaffold( AppScaffold(
appBar: PatientProfileHeaderNewDesignAppBar( appBar: PatientProfileHeaderNewDesignAppBar(
patient, patientType.toString() ?? "0", arrivalType), patient, patientType.toString() ?? "0", arrivalType,isInpatient:isInpatient ,),
isShowAppBar: true, isShowAppBar: true,
appBarTitle: TranslationBase.of(context).medicalReport.toUpperCase(), appBarTitle: TranslationBase.of(context).medicalReport.toUpperCase(),
body: NetworkBaseView( body: NetworkBaseView(

@ -101,32 +101,60 @@ class _PatientInPatientScreenState extends State<PatientInPatientScreen> {
// const SizedBox( // const SizedBox(
// height: 16, // height: 16,
// ), // ),
...model.filteredInPatientItems.map((item) { ...List.generate(model.filteredInPatientItems.length, (index) {
return PatientCard( if(_activeTab == 0)
patientInfo: item, return PatientCard(
patientType: "1", patientInfo: model.filteredInPatientItems[index],
arrivalType: "1", patientType: "1",
isInpatient: true, arrivalType: "1",
isMyPatient: _activeTab!=0? false:item.doctorId==model.doctorProfile.doctorID, isInpatient: true,
onTap: () { isMyPatient: model.filteredInPatientItems[index].doctorId==model.doctorProfile.doctorID,
FocusScopeNode currentFocus = FocusScope.of(context); onTap: () {
if (!currentFocus.hasPrimaryFocus) { FocusScopeNode currentFocus = FocusScope.of(context);
currentFocus.unfocus(); if (!currentFocus.hasPrimaryFocus) {
} currentFocus.unfocus();
}
Navigator.of(context) Navigator.of(context)
.pushNamed(PATIENTS_PROFILE, arguments: { .pushNamed(PATIENTS_PROFILE, arguments: {
"patient": item, "patient": model.filteredInPatientItems[index],
"patientType": "1", "patientType": "1",
"from": "0", "from": "0",
"to": "0", "to": "0",
"isSearch": false, "isSearch": false,
"isInpatient": true, "isInpatient": true,
"arrivalType": "1", "arrivalType": "1",
}); });
}, },
); );
}).toList(), else if(model.filteredInPatientItems[index].doctorId==model.doctorProfile.doctorID && _activeTab==1)
return PatientCard(
patientInfo: model.filteredInPatientItems[index],
patientType: "1",
arrivalType: "1",
isInpatient: true,
isMyPatient: model.filteredInPatientItems[index].doctorId==model.doctorProfile.doctorID,
onTap: () {
FocusScopeNode currentFocus = FocusScope.of(context);
if (!currentFocus.hasPrimaryFocus) {
currentFocus.unfocus();
}
Navigator.of(context)
.pushNamed(PATIENTS_PROFILE, arguments: {
"patient": model.filteredInPatientItems[index],
"patientType": "1",
"from": "0",
"to": "0",
"isSearch": false,
"isInpatient": true,
"arrivalType": "1",
});
},
);
else return SizedBox();
}),
SizedBox(height: 15,)
], ],
), ),
), ),
@ -173,12 +201,14 @@ class _PatientInPatientScreenState extends State<PatientInPatientScreen> {
if (!currentFocus.hasPrimaryFocus) { if (!currentFocus.hasPrimaryFocus) {
currentFocus.unfocus(); currentFocus.unfocus();
} }
GifLoaderDialogUtils.showMyDialog( if (_activeTab==0) {
context); GifLoaderDialogUtils.showMyDialog(
await model.getInPatientList(requestModel, context);
isMyInpatient: _activeTab == 1, isFirstTime: false); await model.getInPatientList(requestModel,
GifLoaderDialogUtils.hideDialog( isMyInpatient: _activeTab == 1, isFirstTime: false);
context); GifLoaderDialogUtils.hideDialog(
context);
}
}, },
child: Center( child: Center(
child: Container( child: Container(

@ -33,7 +33,7 @@ class _InsuranceApprovalScreenNewState
PatiantInformtion patient = routeArgs['patient']; PatiantInformtion patient = routeArgs['patient'];
patient = routeArgs['patient']; patient = routeArgs['patient'];
String patientType = routeArgs['patientType']; String patientType = routeArgs['patientType'];
bool isInpatient = routeArgs['isInpatient'];
return BaseView<InsuranceViewModel>( return BaseView<InsuranceViewModel>(
onModelReady: patient.admissionNo != null onModelReady: patient.admissionNo != null
? (model) => model.getInsuranceInPatient(mrn: patient.patientId) ? (model) => model.getInsuranceInPatient(mrn: patient.patientId)
@ -45,7 +45,7 @@ class _InsuranceApprovalScreenNewState
builder: (BuildContext context, InsuranceViewModel model, Widget child) => builder: (BuildContext context, InsuranceViewModel model, Widget child) =>
AppScaffold( AppScaffold(
appBar: PatientProfileHeaderNewDesignAppBar( appBar: PatientProfileHeaderNewDesignAppBar(
patient, patientType.toString() ?? "0", patientType), patient, patientType.toString() ?? "0", patientType,isInpatient: isInpatient,),
isShowAppBar: true, isShowAppBar: true,
baseViewModel: model, baseViewModel: model,
appBarTitle: TranslationBase.of(context).approvals, appBarTitle: TranslationBase.of(context).approvals,

@ -1,6 +1,7 @@
import 'package:doctor_app_flutter/core/enum/patient_type.dart'; import 'package:doctor_app_flutter/core/enum/patient_type.dart';
import 'package:doctor_app_flutter/core/model/PatientSearchRequestModel.dart'; import 'package:doctor_app_flutter/core/model/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart'; import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart';
import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/patients/patient_search/patients_screen_new.dart'; import 'package:doctor_app_flutter/screens/patients/patient_search/patients_screen_new.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart';
@ -12,6 +13,7 @@ import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils
import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
class PatientSearchScreenNew extends StatefulWidget { class PatientSearchScreenNew extends StatefulWidget {
@override @override
@ -26,9 +28,11 @@ class _PatientSearchScreenNewState extends State<PatientSearchScreenNew> {
TextEditingController middleNameInfoController = TextEditingController(); TextEditingController middleNameInfoController = TextEditingController();
TextEditingController lastNameFileInfoController = TextEditingController(); TextEditingController lastNameFileInfoController = TextEditingController();
PatientType selectedPatientType = PatientType.inPatient; PatientType selectedPatientType = PatientType.inPatient;
AuthViewModel authProvider;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
authProvider =Provider.of(context);
return BaseView<PatientSearchViewModel>( return BaseView<PatientSearchViewModel>(
onModelReady: (model) async {}, onModelReady: (model) async {},
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
@ -248,7 +252,7 @@ class _PatientSearchScreenNewState extends State<PatientSearchScreenNew> {
isFormSubmitted = true; isFormSubmitted = true;
}); });
PatientSearchRequestModel patientSearchRequestModel = PatientSearchRequestModel patientSearchRequestModel =
PatientSearchRequestModel(); PatientSearchRequestModel(doctorID: authProvider.doctorProfile.doctorID);
if (showOther) { if (showOther) {
patientSearchRequestModel.firstName = firstNameInfoController.text.trim().isEmpty?"0":firstNameInfoController.text.trim(); patientSearchRequestModel.firstName = firstNameInfoController.text.trim().isEmpty?"0":firstNameInfoController.text.trim();
patientSearchRequestModel.middleName = middleNameInfoController.text.trim().isEmpty?"0":middleNameInfoController.text.trim(); patientSearchRequestModel.middleName = middleNameInfoController.text.trim().isEmpty?"0":middleNameInfoController.text.trim();

@ -5,7 +5,6 @@ import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart';
import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/patient/patient_model.dart'; import 'package:doctor_app_flutter/models/patient/patient_model.dart';
import 'package:doctor_app_flutter/routes.dart'; import 'package:doctor_app_flutter/routes.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
@ -14,6 +13,7 @@ import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/PatientCard.dart'; import 'package:doctor_app_flutter/widgets/patients/PatientCard.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_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/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart';
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_form_field.dart'; import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_form_field.dart';
import 'package:doctor_app_flutter/widgets/shared/text_fields/text_fields_utils.dart'; import 'package:doctor_app_flutter/widgets/shared/text_fields/text_fields_utils.dart';
@ -100,187 +100,155 @@ class _PatientsScreenNewState extends State<PatientsScreenNew> {
title: "Search for ${widget.searchKey}", title: "Search for ${widget.searchKey}",
), ),
baseViewModel: model, baseViewModel: model,
body: Container( body: Column(
color: Colors.grey[200], children: [
child: ListView( if(!widget.isInpatient && !widget.isSearch)
scrollDirection: Axis.vertical,
children: <Widget>[
Container( Container(
child: Column( // color: Colors.red,
children: <Widget>[ height: screenSize.height * 0.070,
if(!widget.isInpatient && !widget.isSearch) decoration: TextFieldsUtils
Container( .containerBorderDecoration(
// color: Colors.red, Color(0Xffffffff),
height: screenSize.height * 0.070, Color(0xFFCCCCCC),
decoration: TextFieldsUtils borderRadius: 4,
.containerBorderDecoration( borderWidth: 0),
Color(0Xffffffff), child: Row(
Color(0xFFCCCCCC), mainAxisSize: MainAxisSize.max,
borderRadius: 4, crossAxisAlignment: CrossAxisAlignment.center,
borderWidth: 0), children: _locations.map((item) {
child: Row( bool _isActive = _locations[_activeLocation] == item
mainAxisSize: MainAxisSize.max, ? true
crossAxisAlignment: CrossAxisAlignment.center, : false;
children: _locations.map((item) {
bool _isActive = _locations[_activeLocation] == item
? true
: false;
return Expanded( return Expanded(
child: InkWell( child: InkWell(
onTap: () async { onTap: () async {
setState(() { setState(() {
_activeLocation = _locations.indexOf(item); _activeLocation = _locations.indexOf(item);
}); });
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
await model.getPatientBasedOnDate(item: item, await model.getPatientBasedOnDate(item: item,
selectedPatientType: widget.selectedPatientType, selectedPatientType: widget.selectedPatientType,
patientSearchRequestModel: widget patientSearchRequestModel: widget
.patientSearchRequestModel, .patientSearchRequestModel,
isSearchWithKeyInfo: widget.isSearchWithKeyInfo); isSearchWithKeyInfo: widget.isSearchWithKeyInfo);
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
}, },
child: Center( child: Center(
child: Container( child: Container(
height: screenSize.height * 0.070, height: screenSize.height * 0.070,
decoration: TextFieldsUtils.containerBorderDecoration( decoration: TextFieldsUtils.containerBorderDecoration(
_isActive _isActive
? Color(0xFFD02127 /*B8382B*/) ? Color(0xFFD02127 /*B8382B*/)
: Color(0xFFEAEAEA), : Color(0xFFEAEAEA),
_isActive ? Color(0xFFD02127) : Color(0xFFEAEAEA), _isActive ? Color(0xFFD02127) : Color(0xFFEAEAEA),
borderRadius: 4, borderRadius: 4,
borderWidth: 0), borderWidth: 0),
child: Center( child: Center(
child: AppText( child: AppText(
item, item,
fontSize: SizeConfig.textMultiplier * 1.8, fontSize: SizeConfig.textMultiplier * 1.8,
color: _isActive ? Colors.white : Color(0xFF2B353E), color: _isActive ? Colors.white : Color(0xFF2B353E),
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
),
),
),
),
), ),
); ),
}).toList(), ),
), ),
), ),
);
}).toList(),
),
),
SizedBox(height: 18.5), SizedBox(height: 18.5),
Container( Container(
width: SizeConfig.screenWidth * 0.9, width: SizeConfig.screenWidth * 0.9,
height: 75, height: 75,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(6.0)), Radius.circular(6.0)),
border: Border.all( border: Border.all(
width: 1.0, width: 1.0,
color: HexColor("#CCCCCC"), color: HexColor("#CCCCCC"),
),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.only(
left: 10, top: 10),
child: AppText(
TranslationBase.of(
context)
.searchPatientName,
fontSize: 13,
)),
AppTextFormField(
// focusNode: focusProject,
controller: _controller,
borderColor: Colors.white,
prefix: IconButton(
icon: Icon(
DoctorApp.filter_1,
color: Colors.black,
),
iconSize: 20,
padding:
EdgeInsets.only(
bottom: 30),
),
onChanged: (String str) {
model.searchData(str);
}),
])),
SizedBox(
height: 10.0,
),
SizedBox(
height: 10.0,
), ),
Container( color: Colors.white),
child: model.patientList.isNotEmpty child: Column(
? Column( crossAxisAlignment:
// mainAxisAlignment: MainAxisAlignment.center, CrossAxisAlignment.start,
children: model.filterData children: [
.map((PatiantInformtion Padding(
item) { padding: EdgeInsets.only(
return PatientCard( left: 10, top: 10),
patientInfo: item, child: AppText(
patientType: TranslationBase.of(
patientType, context)
arrivalType: .searchPatientName,
arrivalType, fontSize: 13,
isInpatient: )),
widget.isInpatient, AppTextFormField(
onTap: () { // focusNode: focusProject,
// TODO change the parameter to daynamic controller: _controller,
Navigator.of(context) borderColor: Colors.white,
.pushNamed( prefix: IconButton(
PATIENTS_PROFILE, icon: Icon(
arguments: { DoctorApp.filter_1,
"patient": item, color: Colors.black,
"patientType": ),
"1", iconSize: 20,
"from": widget.patientSearchRequestModel.from, padding:
"to": widget.patientSearchRequestModel.from, EdgeInsets.only(
"isSearch": bottom: 30),
widget.isSearch,
"isInpatient":
widget.isInpatient,
"arrivalType":
"7",
});
},
isFromSearch: widget.isSearch,
);
}).toList(),
)
: Center(
child: Column(
crossAxisAlignment:
CrossAxisAlignment
.center,
children: [
SizedBox(
height: 100,
),
Image.asset(
'assets/images/no-data.png'),
Padding(
padding:
const EdgeInsets
.all(8.0),
child: AppText(
TranslationBase.of(
context)
.youDontHaveAnyPatient),
)
],
), ),
)), onChanged: (String str) {
], model.searchData(str);
), }),
) ])),
], SizedBox(
), height: 10.0,
),
Expanded(
child: Container(
child: model.filterData.isEmpty
? Center(
child: ErrorMessage(
error: TranslationBase.of(context)
.youDontHaveAnyPatient,
),
)
: ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: model.filterData.length,
itemBuilder: (BuildContext ctxt, int index) {
return Padding(
padding: EdgeInsets.all(8.0),
child: PatientCard(
patientInfo: model.filterData[index],
patientType: patientType,
arrivalType: arrivalType,
isInpatient: widget.isInpatient,
onTap: () {
// TODO change the parameter to daynamic
Navigator.of(context).pushNamed(
PATIENTS_PROFILE,
arguments: {
"patient": model.filterData[index],
"patientType": "1",
"from": widget
.patientSearchRequestModel.from,
"to": widget
.patientSearchRequestModel.from,
"isSearch": widget.isSearch,
"isInpatient": widget.isInpatient,
"arrivalType": "7",
});
},
isFromSearch: widget.isSearch,
),
);
})),
),
],
) )
), ),
); );

@ -0,0 +1,227 @@
import 'package:doctor_app_flutter/core/viewModel/patient_view_model.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/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/PatientProfileButton.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design_in_patient.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import '../../../routes.dart';
class InPatientProfileScreen extends StatefulWidget {
@override
_InPatientProfileScreenState createState() => _InPatientProfileScreenState();
}
class _InPatientProfileScreenState extends State<InPatientProfileScreen>with SingleTickerProviderStateMixin {
PatiantInformtion patient;
bool isFromSearch = false;
bool isInpatient = false;
bool isDischargedPatient = false;
String patientType;
String arrivalType;
String from;
String to;
@override
void didChangeDependencies() {
super.didChangeDependencies();
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
patient = routeArgs['patient'];
patientType = routeArgs['patientType'];
arrivalType = routeArgs['arrivalType'];
from = routeArgs['from'];
to = routeArgs['to'];
if (routeArgs.containsKey("isSearch")) {
isFromSearch = routeArgs['isSearch'];
}
if (routeArgs.containsKey("isInpatient")) {
isInpatient = routeArgs['isInpatient'];
}
if (routeArgs.containsKey("isDischargedPatient")) {
isDischargedPatient = routeArgs['isDischargedPatient'];
}
}
@override
Widget build(BuildContext context) {
return BaseView<PatientViewModel>(
builder: (_, patientViewModel, w) => AppScaffold(
baseViewModel: patientViewModel,
appBarTitle: TranslationBase.of(context).patientProfile,
isShowAppBar: true,
appBar: PatientProfileHeaderNewDesignAppBar(patient,arrivalType??'0',patientType),
body: SingleChildScrollView(
child: Container(
margin: EdgeInsets.only(top: 10),
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 15.0,horizontal: 15),
child: GridView.count(
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
crossAxisSpacing: 10,
mainAxisSpacing: 10,
childAspectRatio: 1 / 1.0,
crossAxisCount: 3,
children: [
PatientProfileButton(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
from: from,
to: to,
nameLine1: TranslationBase.of(context).vital,
nameLine2: TranslationBase.of(context).signs,
route: VITAL_SIGN_DETAILS,
isInPatient: true,
icon: 'patient/vital_signs.png'),
PatientProfileButton(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: LAB_RESULT,
isInPatient: true,
nameLine1: TranslationBase.of(context).lab,
nameLine2: TranslationBase.of(context).result,
icon: 'patient/lab_results.png'),
PatientProfileButton(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
isInPatient: isInpatient,
route: RADIOLOGY_PATIENT,
nameLine1: TranslationBase.of(context).radiology,
nameLine2: TranslationBase.of(context).result,
icon: 'patient/health_summary.png'),
PatientProfileButton(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PRESCRIPTION_NEW,
nameLine1: TranslationBase.of(context).patient,
nameLine2: TranslationBase.of(context).prescription,
icon: 'patient/order_prescription.png'),
PatientProfileButton(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PROGRESS_NOTE,
isDischargedPatient: isDischargedPatient,
nameLine1: TranslationBase.of(context).progress,
nameLine2: TranslationBase.of(context).note,
icon: 'patient/Progress_notes.png'),
PatientProfileButton(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_NOTE,
isDischargedPatient: isDischargedPatient,
nameLine1: "Order", //"Text",
nameLine2:
"Sheet", //TranslationBase.of(context).orders,
icon: 'patient/Progress_notes.png'),
PatientProfileButton(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PROCEDURE,
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).procedures,
icon: 'patient/Order_Procedures.png'),
PatientProfileButton(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: MEDICAL_FILE,
nameLine1: "Health",
//TranslationBase.of(context).medicalReport,
nameLine2: "Summary",
//TranslationBase.of(context).summaryReport,
icon: 'patient/health_summary.png'),
PatientProfileButton(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
isDisable: true,
route: MEDICAL_FILE,
nameLine1: "Medical", //Health
//TranslationBase.of(context).medicalReport,
nameLine2: "Report", //Report
//TranslationBase.of(context).summaryReport,
icon: 'patient/health_summary.png'),
PatientProfileButton(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: REFER_IN_PATIENT_TO_DOCTOR,
isInPatient: true,
nameLine1: TranslationBase.of(context).referral,
nameLine2: TranslationBase.of(context).patient,
icon: 'patient/refer_patient.png'),
PatientProfileButton(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_INSURANCE_APPROVALS_NEW,
nameLine1: TranslationBase.of(context).insurance,
nameLine2: TranslationBase.of(context).approvals,
icon: 'patient/vital_signs.png'),
PatientProfileButton(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
isDisable: true,
route: null,
nameLine1: "Discharge",
nameLine2: "Summery",
icon: 'patient/patient_sick_leave.png'),
PatientProfileButton(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ADD_SICKLEAVE,
nameLine1: TranslationBase.of(context).patientSick,
nameLine2: TranslationBase.of(context).leave,
icon: 'patient/patient_sick_leave.png'),
],
),
),
),
),
));
}
}
class AvatarWidget extends StatelessWidget {
final Widget avatarIcon;
AvatarWidget(this.avatarIcon);
@override
Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
color: Color.fromRGBO(0, 0, 0, 0.08),
offset: Offset(0.0, 5.0),
blurRadius: 16.0)
],
borderRadius: BorderRadius.all(Radius.circular(35.0)),
color: Color(0xffCCCCCC),
),
child: avatarIcon,
);
}
}

@ -44,7 +44,7 @@ class _LabsHomePageState extends State<LabsHomePage> {
backgroundColor: Colors.grey[100], backgroundColor: Colors.grey[100],
isShowAppBar: true, isShowAppBar: true,
appBar: PatientProfileHeaderNewDesignAppBar( appBar: PatientProfileHeaderNewDesignAppBar(
patient, patient.patientType.toString() ?? '0', patientType), patient, patient.patientType.toString() ?? '0', patientType,isInpatient: isInpatient,),
body: SingleChildScrollView( body: SingleChildScrollView(
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
child: FractionallySizedBox( child: FractionallySizedBox(
@ -158,7 +158,7 @@ class _LabsHomePageState extends State<LabsHomePage> {
.toUpperCase() .toUpperCase()
: !labOrder.isInOutPatient : !labOrder.isInOutPatient
? TranslationBase.of(context) ? TranslationBase.of(context)
.inPatient .inPatientLabel
.toUpperCase() .toUpperCase()
: TranslationBase.of(context) : TranslationBase.of(context)
.outpatient .outpatient

@ -79,7 +79,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
backgroundColor: Theme.of(context).scaffoldBackgroundColor, backgroundColor: Theme.of(context).scaffoldBackgroundColor,
// appBarTitle: TranslationBase.of(context).progressNote, // appBarTitle: TranslationBase.of(context).progressNote,
appBar: PatientProfileHeaderNewDesignAppBar( appBar: PatientProfileHeaderNewDesignAppBar(
patient, patient.patientType.toString() ?? '0', arrivalType), patient, patient.patientType.toString() ?? '0', arrivalType,isInpatient: true,),
body: model.patientProgressNoteList == null || model.patientProgressNoteList.length == 0 body: model.patientProgressNoteList == null || model.patientProgressNoteList.length == 0
? DrAppEmbeddedError( ? DrAppEmbeddedError(
error: TranslationBase.of(context).errorNoProgressNote) error: TranslationBase.of(context).errorNoProgressNote)

@ -71,9 +71,9 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>with SingleT
baseViewModel: patientViewModel, baseViewModel: patientViewModel,
appBarTitle: TranslationBase.of(context).patientProfile, appBarTitle: TranslationBase.of(context).patientProfile,
isShowAppBar: true, isShowAppBar: true,
appBar: PatientProfileHeaderNewDesignAppBar(patient,arrivalType??'0',patientType), appBar: PatientProfileHeaderNewDesignAppBar(patient,arrivalType??'0',patientType,isInpatient: isInpatient,),
body: SingleChildScrollView( body: SingleChildScrollView(
child: Column( child: isFromSearch ?Column(
children: [ children: [
DefaultTabController( DefaultTabController(
length: 2, length: 2,
@ -165,6 +165,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>with SingleT
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
route: ORDER_PRESCRIPTION_NEW, route: ORDER_PRESCRIPTION_NEW,
isInPatient: isInpatient,
nameLine1: TranslationBase.of(context).patient, nameLine1: TranslationBase.of(context).patient,
nameLine2: TranslationBase.of(context).prescription, nameLine2: TranslationBase.of(context).prescription,
icon: 'patient/order_prescription.png'), icon: 'patient/order_prescription.png'),
@ -192,6 +193,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>with SingleT
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
route: ORDER_PROCEDURE, route: ORDER_PROCEDURE,
isInPatient: isInpatient,
nameLine1: TranslationBase.of(context).orders, nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).procedures, nameLine2: TranslationBase.of(context).procedures,
icon: 'patient/Order_Procedures.png'), icon: 'patient/Order_Procedures.png'),
@ -201,7 +203,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>with SingleT
arrivalType: arrivalType, arrivalType: arrivalType,
route: MEDICAL_FILE, route: MEDICAL_FILE,
nameLine1: "Health", nameLine1: "Health",
//TranslationBase.of(context).medicalReport, isInPatient: isInpatient,
nameLine2: "Summary", nameLine2: "Summary",
//TranslationBase.of(context).summaryReport, //TranslationBase.of(context).summaryReport,
icon: 'patient/health_summary.png'), icon: 'patient/health_summary.png'),
@ -212,7 +214,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>with SingleT
isDisable: true, isDisable: true,
route: MEDICAL_FILE, route: MEDICAL_FILE,
nameLine1: "Medical", //Health nameLine1: "Medical", //Health
//TranslationBase.of(context).medicalReport, isInPatient: isInpatient,
nameLine2: "Report", //Report nameLine2: "Report", //Report
//TranslationBase.of(context).summaryReport, //TranslationBase.of(context).summaryReport,
icon: 'patient/health_summary.png'), icon: 'patient/health_summary.png'),
@ -226,6 +228,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>with SingleT
nameLine2: TranslationBase.of(context).patient, nameLine2: TranslationBase.of(context).patient,
icon: 'patient/refer_patient.png'), icon: 'patient/refer_patient.png'),
PatientProfileButton( PatientProfileButton(
isInPatient: isInpatient,
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
@ -234,7 +237,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>with SingleT
nameLine2: TranslationBase.of(context).approvals, nameLine2: TranslationBase.of(context).approvals,
icon: 'patient/vital_signs.png'), icon: 'patient/vital_signs.png'),
PatientProfileButton( PatientProfileButton(
isInPatient: isInpatient,
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
@ -244,7 +247,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>with SingleT
nameLine2: "Summery", nameLine2: "Summery",
icon: 'patient/patient_sick_leave.png'), icon: 'patient/patient_sick_leave.png'),
PatientProfileButton( PatientProfileButton(
isInPatient: isInpatient,
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
@ -264,7 +267,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>with SingleT
crossAxisCount: 3, crossAxisCount: 3,
children: [ children: [
PatientProfileButton( PatientProfileButton(
isInPatient: isInpatient,
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
@ -276,7 +279,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>with SingleT
icon: 'patient/vital_signs.png'), icon: 'patient/vital_signs.png'),
// if (selectedPatientType != 7) // if (selectedPatientType != 7)
PatientProfileButton( PatientProfileButton(
isInPatient: isInpatient,
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
@ -287,7 +290,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>with SingleT
"Summary", //TranslationBase.of(context).summaryReport, "Summary", //TranslationBase.of(context).summaryReport,
icon: 'patient/health_summary.png'), icon: 'patient/health_summary.png'),
PatientProfileButton( PatientProfileButton(
isInPatient: isInpatient,
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
@ -307,7 +310,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>with SingleT
nameLine2: TranslationBase.of(context).service, nameLine2: TranslationBase.of(context).service,
icon: 'patient/health_summary.png'), icon: 'patient/health_summary.png'),
PatientProfileButton( PatientProfileButton(
isInPatient: isInpatient,
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
@ -316,7 +319,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>with SingleT
nameLine2: "ECG", nameLine2: "ECG",
icon: 'patient/patient_sick_leave.png'), icon: 'patient/patient_sick_leave.png'),
PatientProfileButton( PatientProfileButton(
isInPatient: isInpatient,
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
@ -326,7 +329,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>with SingleT
icon: 'patient/order_prescription.png'), icon: 'patient/order_prescription.png'),
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6) // if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton( PatientProfileButton(
isInPatient: isInpatient,
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
@ -336,7 +339,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>with SingleT
icon: 'patient/Order_Procedures.png'), icon: 'patient/Order_Procedures.png'),
//if (int.parse(patientType) == 7 || int.parse(patientType) == 6) //if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton( PatientProfileButton(
isInPatient: isInpatient,
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
@ -346,7 +349,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>with SingleT
icon: 'patient/vital_signs.png'), icon: 'patient/vital_signs.png'),
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6) // if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton( PatientProfileButton(
isInPatient: isInpatient,
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
@ -357,7 +360,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>with SingleT
if (patient.appointmentNo != null && if (patient.appointmentNo != null &&
patient.appointmentNo != 0) patient.appointmentNo != 0)
PatientProfileButton( PatientProfileButton(
isInPatient: isInpatient,
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
@ -370,7 +373,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>with SingleT
if (patient.appointmentNo != null && if (patient.appointmentNo != null &&
patient.appointmentNo != 0) patient.appointmentNo != 0)
PatientProfileButton( PatientProfileButton(
isInPatient: isInpatient,
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
@ -383,6 +386,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>with SingleT
if (patient.appointmentNo != null && if (patient.appointmentNo != null &&
patient.appointmentNo != 0) patient.appointmentNo != 0)
PatientProfileButton( PatientProfileButton(
isInPatient: isInpatient,
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
@ -404,6 +408,280 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>with SingleT
), ),
], ],
):isInpatient?GridView.count(
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
crossAxisSpacing: 10,
mainAxisSpacing: 10,
childAspectRatio: 1 / 1.0,
crossAxisCount: 3,
children: [
PatientProfileButton(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
from: from,
to: to,
nameLine1: TranslationBase.of(context).vital,
nameLine2: TranslationBase.of(context).signs,
route: VITAL_SIGN_DETAILS,
isInPatient: true,
icon: 'patient/vital_signs.png'),
PatientProfileButton(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: LAB_RESULT,
isInPatient: true,
nameLine1: TranslationBase.of(context).lab,
nameLine2: TranslationBase.of(context).result,
icon: 'patient/lab_results.png'),
PatientProfileButton(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
isInPatient: isInpatient,
route: RADIOLOGY_PATIENT,
nameLine1: TranslationBase.of(context).radiology,
nameLine2: TranslationBase.of(context).result,
icon: 'patient/health_summary.png'),
PatientProfileButton(
patient: patient,
isInPatient: isInpatient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PRESCRIPTION_NEW,
nameLine1: TranslationBase.of(context).patient,
nameLine2: TranslationBase.of(context).prescription,
icon: 'patient/order_prescription.png'),
PatientProfileButton(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PROGRESS_NOTE,
isInPatient: isInpatient,
isDischargedPatient: isDischargedPatient,
nameLine1: TranslationBase.of(context).progress,
nameLine2: TranslationBase.of(context).note,
icon: 'patient/Progress_notes.png'),
PatientProfileButton(
patient: patient,
isInPatient: isInpatient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_NOTE,
isDischargedPatient: isDischargedPatient,
nameLine1: "Order", //"Text",
nameLine2:
"Sheet", //TranslationBase.of(context).orders,
icon: 'patient/Progress_notes.png'),
PatientProfileButton(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PROCEDURE,
isInPatient: isInpatient,
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).procedures,
icon: 'patient/Order_Procedures.png'),
PatientProfileButton(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: MEDICAL_FILE,
nameLine1: "Health",
isInPatient: isInpatient,
nameLine2: "Summary",
//TranslationBase.of(context).summaryReport,
icon: 'patient/health_summary.png'),
PatientProfileButton(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
isDisable: true,
route: MEDICAL_FILE,
nameLine1: "Medical", //Health
isInPatient: isInpatient,
nameLine2: "Report", //Report
//TranslationBase.of(context).summaryReport,
icon: 'patient/health_summary.png'),
PatientProfileButton(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: REFER_IN_PATIENT_TO_DOCTOR,
isInPatient: true,
nameLine1: TranslationBase.of(context).referral,
nameLine2: TranslationBase.of(context).patient,
icon: 'patient/refer_patient.png'),
PatientProfileButton(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_INSURANCE_APPROVALS_NEW,
nameLine1: TranslationBase.of(context).insurance,
nameLine2: TranslationBase.of(context).approvals,
icon: 'patient/vital_signs.png'),
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
isDisable: true,
route: null,
nameLine1: "Discharge",
nameLine2: "Summery",
icon: 'patient/patient_sick_leave.png'),
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ADD_SICKLEAVE,
nameLine1: TranslationBase.of(context).patientSick,
nameLine2: TranslationBase.of(context).leave,
icon: 'patient/patient_sick_leave.png'),
],
):GridView.count(
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
crossAxisSpacing: 10,
mainAxisSpacing: 10,
childAspectRatio: 1 / 1.0,
crossAxisCount: 3,
children: [
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
from: from,
to: to,
nameLine1: TranslationBase.of(context).vital,
nameLine2: TranslationBase.of(context).signs,
route: VITAL_SIGN_DETAILS,
icon: 'patient/vital_signs.png'),
// if (selectedPatientType != 7)
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: MEDICAL_FILE,
nameLine1:
"Health", //TranslationBase.of(context).medicalReport,
nameLine2:
"Summary", //TranslationBase.of(context).summaryReport,
icon: 'patient/health_summary.png'),
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: LAB_RESULT,
nameLine1: TranslationBase.of(context).lab,
nameLine2: TranslationBase.of(context).result,
icon: 'patient/lab_results.png'),
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
isInPatient: isInpatient,
route: RADIOLOGY_PATIENT,
nameLine1: TranslationBase.of(context).radiology,
nameLine2: TranslationBase.of(context).service,
icon: 'patient/health_summary.png'),
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_ECG,
nameLine1: TranslationBase.of(context).patient,
nameLine2: "ECG",
icon: 'patient/patient_sick_leave.png'),
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PRESCRIPTION_NEW,
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).prescription,
icon: 'patient/order_prescription.png'),
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PROCEDURE,
isInPatient: isInpatient,
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).procedures,
icon: 'patient/Order_Procedures.png'),
//if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_INSURANCE_APPROVALS_NEW,
nameLine1: TranslationBase.of(context).insurance,
nameLine2: TranslationBase.of(context).service,
icon: 'patient/vital_signs.png'),
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ADD_SICKLEAVE,
nameLine1: TranslationBase.of(context).patientSick,
nameLine2: TranslationBase.of(context).leave,
icon: 'patient/patient_sick_leave.png'),
if (patient.appointmentNo != null &&
patient.appointmentNo != 0)
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_UCAF_REQUEST,
isDisable:
patient.patientStatusType != 43 ? true : false,
nameLine1: TranslationBase.of(context).patient,
nameLine2: TranslationBase.of(context).ucaf,
icon: 'patient/ucaf.png'),
if (patient.appointmentNo != null &&
patient.appointmentNo != 0)
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: REFER_PATIENT_TO_DOCTOR,
isDisable:
patient.patientStatusType != 43 ? true : false,
nameLine1: TranslationBase.of(context).referral,
nameLine2: TranslationBase.of(context).patient,
icon: 'patient/refer_patient.png'),
if (patient.appointmentNo != null &&
patient.appointmentNo != 0)
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_ADMISSION_REQUEST,
isDisable:
patient.patientStatusType != 43 ? true : false,
nameLine1: TranslationBase.of(context).admission,
nameLine2: TranslationBase.of(context).request,
icon: 'patient/admission_req.png'),
],
), ),
), ),
)); ));

@ -47,7 +47,7 @@ class _RadiologyHomePageState extends State<RadiologyHomePage> {
backgroundColor: Colors.grey[100], backgroundColor: Colors.grey[100],
// appBarTitle: TranslationBase.of(context).radiology, // appBarTitle: TranslationBase.of(context).radiology,
appBar: PatientProfileHeaderNewDesignAppBar( appBar: PatientProfileHeaderNewDesignAppBar(
patient, patient.patientType.toString() ?? '0', arrivalType), patient, patient.patientType.toString() ?? '0', arrivalType,isInpatient: isInpatient,),
baseViewModel: model, baseViewModel: model,
body: FractionallySizedBox( body: FractionallySizedBox(
widthFactor: 1.0, widthFactor: 1.0,
@ -155,7 +155,7 @@ class _RadiologyHomePageState extends State<RadiologyHomePage> {
.toUpperCase() .toUpperCase()
: !model.radiologyList[index].isInOutPatient : !model.radiologyList[index].isInOutPatient
? TranslationBase.of(context) ? TranslationBase.of(context)
.inPatient .inPatientLabel
.toUpperCase() .toUpperCase()
: TranslationBase.of(context) : TranslationBase.of(context)
.outpatient .outpatient
@ -172,9 +172,8 @@ class _RadiologyHomePageState extends State<RadiologyHomePage> {
invoiceNO: '${model.radiologyList[index].invoiceNo}', invoiceNO: '${model.radiologyList[index].invoiceNo}',
branch: '${model.radiologyList[index].projectName}', branch: '${model.radiologyList[index].projectName}',
clinic: model.radiologyList[index].clinicDescription, clinic: model.radiologyList[index].clinicDescription,
appointmentDate: !isInpatient appointmentDate: model.radiologyList[index].orderDate??
? model.radiologyList[index].orderDate model.radiologyList[index].reportDate,
: model.radiologyList[index].reportDate,
onTap: () { onTap: () {
Navigator.push( Navigator.push(
context, context,

@ -48,7 +48,7 @@ class _PatientMakeInPatientReferralScreenState
patient = routeArgs['patient']; patient = routeArgs['patient'];
String patientType = routeArgs['patientType']; String patientType = routeArgs['patientType'];
String arrivalType = routeArgs['arrivalType']; String arrivalType = routeArgs['arrivalType'];
bool isInpatient = routeArgs['isInpatient'];
referToList = List(); referToList = List();
dynamic sameBranch = { dynamic sameBranch = {
"id": 1, "id": 1,
@ -70,7 +70,7 @@ class _PatientMakeInPatientReferralScreenState
appBarTitle: TranslationBase.of(context).referPatient, appBarTitle: TranslationBase.of(context).referPatient,
isShowAppBar: true, isShowAppBar: true,
appBar: PatientProfileHeaderNewDesignAppBar( appBar: PatientProfileHeaderNewDesignAppBar(
patient, patientType, arrivalType), patient, patientType, arrivalType,isInpatient: isInpatient,),
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
child: Column( child: Column(

@ -24,6 +24,7 @@ class PrescriptionsPage extends StatelessWidget {
PatiantInformtion patient = routeArgs['patient']; PatiantInformtion patient = routeArgs['patient'];
String patientType = routeArgs['patientType']; String patientType = routeArgs['patientType'];
String arrivalType = routeArgs['arrivalType']; String arrivalType = routeArgs['arrivalType'];
bool isInpatient = routeArgs['isInpatient'];
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<PrescriptionViewModel>( return BaseView<PrescriptionViewModel>(
onModelReady: (model) => onModelReady: (model) =>
@ -35,7 +36,7 @@ class PrescriptionsPage extends StatelessWidget {
isShowAppBar: true, isShowAppBar: true,
backgroundColor: Colors.grey[100], backgroundColor: Colors.grey[100],
appBar: PatientProfileHeaderNewDesignAppBar( appBar: PatientProfileHeaderNewDesignAppBar(
patient, patientType ?? '0', arrivalType), patient, patientType ?? '0', arrivalType,isInpatient: isInpatient,),
body: patient.admissionNo == null body: patient.admissionNo == null
? FractionallySizedBox( ? FractionallySizedBox(
widthFactor: 1.0, widthFactor: 1.0,

@ -30,17 +30,17 @@ class ProcedureScreen extends StatelessWidget {
PatiantInformtion patient = routeArgs['patient']; PatiantInformtion patient = routeArgs['patient'];
String patientType = routeArgs['patientType']; String patientType = routeArgs['patientType'];
String arrivalType = routeArgs['arrivalType']; String arrivalType = routeArgs['arrivalType'];
bool isInpatient = routeArgs['isInpatient'];
return BaseView<ProcedureViewModel>( return BaseView<ProcedureViewModel>(
onModelReady: (model) => onModelReady: (model) =>
model.getProcedure(mrn: patient.patientId, patientType: patientType), model.getProcedure(mrn: patient.patientId, patientType: patientType,),
builder: (BuildContext context, ProcedureViewModel model, Widget child) => builder: (BuildContext context, ProcedureViewModel model, Widget child) =>
AppScaffold( AppScaffold(
isShowAppBar: true, isShowAppBar: true,
backgroundColor: Colors.grey[100], backgroundColor: Colors.grey[100],
baseViewModel: model, baseViewModel: model,
appBar: PatientProfileHeaderNewDesignAppBar( appBar: PatientProfileHeaderNewDesignAppBar(
patient, arrivalType ?? '0', patientType), patient, arrivalType ?? '0', patientType,isInpatient: isInpatient,),
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
child: Column( child: Column(

@ -21,6 +21,7 @@ class AddSickLeavScreen extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map; final routeArgs = ModalRoute.of(context).settings.arguments as Map;
patient = routeArgs['patient']; patient = routeArgs['patient'];
bool isInpatient = routeArgs['isInpatient'];
return BaseView<SickLeaveViewModel>( return BaseView<SickLeaveViewModel>(
onModelReady: (model) => onModelReady: (model) =>
model.getSickLeavePatient(patient.patientMRN ?? patient.patientId), model.getSickLeavePatient(patient.patientMRN ?? patient.patientId),
@ -32,6 +33,7 @@ class AddSickLeavScreen extends StatelessWidget {
patient, patient,
routeArgs['patientType'] ?? "0", routeArgs['patientType'] ?? "0",
routeArgs['arrivalType'] ?? "0", routeArgs['arrivalType'] ?? "0",
isInpatient: isInpatient,
), ),
body: SingleChildScrollView( body: SingleChildScrollView(
child: Column(children: [ child: Column(children: [

@ -92,7 +92,8 @@ class DrAppSharedPreferances {
clear() async { clear() async {
final SharedPreferences prefs = await _prefs; final SharedPreferences prefs = await _prefs;
prefs.clear(); var vvas= await prefs.clear();
var asd;
} }
remove(String key) async { remove(String key) async {

@ -100,6 +100,7 @@ class TranslationBase {
String get referral => localizedValues['referral'][locale.languageCode]; String get referral => localizedValues['referral'][locale.languageCode];
String get inPatient => localizedValues['inPatient'][locale.languageCode]; String get inPatient => localizedValues['inPatient'][locale.languageCode];
String get inPatientLabel => localizedValues['inPatientLabel'][locale.languageCode];
String get inPatientAll => localizedValues['inPatientAll'][locale.languageCode]; String get inPatientAll => localizedValues['inPatientAll'][locale.languageCode];

@ -17,9 +17,10 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
final String patientType; final String patientType;
final String arrivalType; final String arrivalType;
final double height; final double height;
final bool isInpatient;
PatientProfileHeaderNewDesignAppBar( PatientProfileHeaderNewDesignAppBar(
this.patient, this.patientType, this.arrivalType, {this.height = 0.0}); this.patient, this.patientType, this.arrivalType, {this.height = 0.0, this.isInpatient=false});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -38,7 +39,7 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
), ),
height: height == 0 ? 200 : height, height: height == 0 ? isInpatient? 210:200 : height,
child: Container( child: Container(
padding: EdgeInsets.only(left: 10, right: 10, bottom: 10), padding: EdgeInsets.only(left: 10, right: 10, bottom: 10),
margin: EdgeInsets.only(top: 50), margin: EdgeInsets.only(top: 50),
@ -254,7 +255,7 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
), ),
children: <TextSpan>[ children: <TextSpan>[
new TextSpan( new TextSpan(
text: TranslationBase.of(context).age??'' + " : ", text: TranslationBase.of(context).age+ " : ",
style: TextStyle(fontSize: 14)), style: TextStyle(fontSize: 14)),
new TextSpan( new TextSpan(
text: text:
@ -265,6 +266,50 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
), ),
), ),
), ),
if(isInpatient)
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
child: RichText(
text: new TextSpan(
style: new TextStyle(
fontSize:
2.0 * SizeConfig.textMultiplier,
color: Colors.black,
fontFamily: 'Poppins',
),
children: <TextSpan>[
new TextSpan(
text: patient.admissionDate == null
? ""
: TranslationBase.of(context)
.admissionDate +
" : ",
style: TextStyle(fontSize: 14)),
new TextSpan(
text: patient.admissionDate == null
? ""
: "${DateUtils.convertDateFromServerFormat(patient.admissionDate.toString(), 'yyyy-MM-dd')}",
style: TextStyle(
fontWeight: FontWeight.w700,
fontSize: 15)),
]))),
if (patient.admissionDate != null)
Row(
children: [
AppText(
"${TranslationBase.of(context).numOfDays}: ",
fontSize: 15,
),
AppText(
"${DateTime.now().difference(DateUtils.getDateTimeFromServerFormat(patient.admissionDate)).inDays + 1}",
fontSize: 15,
fontWeight: FontWeight.w700),
],
),
],
)
], ],
), ),
), ),

Loading…
Cancel
Save