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

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

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

@ -56,7 +56,7 @@ class VitalSignsViewModel extends BaseViewModel {
if (isInPatient) {
await _vitalSignService.getPatientVitalSignsHistory(patient, from, to);
} 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 PATIENTS = 'patients/patients';
const String PATIENTS_PROFILE = 'patients/patients-profile';
const String IN_PATIENTS_PROFILE = 'inpatients/patients-profile';
const String LAB_RESULT = 'patients/lab_result';
const String MEDICAL_FILE = 'patients/radiology';
const String PROGRESS_NOTE = 'patients/progress-note';

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

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

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

@ -33,7 +33,7 @@ class _InsuranceApprovalScreenNewState
PatiantInformtion patient = routeArgs['patient'];
patient = routeArgs['patient'];
String patientType = routeArgs['patientType'];
bool isInpatient = routeArgs['isInpatient'];
return BaseView<InsuranceViewModel>(
onModelReady: patient.admissionNo != null
? (model) => model.getInsuranceInPatient(mrn: patient.patientId)
@ -45,7 +45,7 @@ class _InsuranceApprovalScreenNewState
builder: (BuildContext context, InsuranceViewModel model, Widget child) =>
AppScaffold(
appBar: PatientProfileHeaderNewDesignAppBar(
patient, patientType.toString() ?? "0", patientType),
patient, patientType.toString() ?? "0", patientType,isInpatient: isInpatient,),
isShowAppBar: true,
baseViewModel: model,
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/model/PatientSearchRequestModel.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/patients/patient_search/patients_screen_new.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:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
class PatientSearchScreenNew extends StatefulWidget {
@override
@ -26,9 +28,11 @@ class _PatientSearchScreenNewState extends State<PatientSearchScreenNew> {
TextEditingController middleNameInfoController = TextEditingController();
TextEditingController lastNameFileInfoController = TextEditingController();
PatientType selectedPatientType = PatientType.inPatient;
AuthViewModel authProvider;
@override
Widget build(BuildContext context) {
authProvider =Provider.of(context);
return BaseView<PatientSearchViewModel>(
onModelReady: (model) async {},
builder: (_, model, w) => AppScaffold(
@ -248,7 +252,7 @@ class _PatientSearchScreenNewState extends State<PatientSearchScreenNew> {
isFormSubmitted = true;
});
PatientSearchRequestModel patientSearchRequestModel =
PatientSearchRequestModel();
PatientSearchRequestModel(doctorID: authProvider.doctorProfile.doctorID);
if (showOther) {
patientSearchRequestModel.firstName = firstNameInfoController.text.trim().isEmpty?"0":firstNameInfoController.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/project_view_model.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/routes.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/shared/app_scaffold_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/text_fields/app_text_form_field.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}",
),
baseViewModel: model,
body: Container(
color: Colors.grey[200],
child: ListView(
scrollDirection: Axis.vertical,
children: <Widget>[
body: Column(
children: [
if(!widget.isInpatient && !widget.isSearch)
Container(
child: Column(
children: <Widget>[
if(!widget.isInpatient && !widget.isSearch)
Container(
// color: Colors.red,
height: screenSize.height * 0.070,
decoration: TextFieldsUtils
.containerBorderDecoration(
Color(0Xffffffff),
Color(0xFFCCCCCC),
borderRadius: 4,
borderWidth: 0),
child: Row(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,
children: _locations.map((item) {
bool _isActive = _locations[_activeLocation] == item
? true
: false;
// color: Colors.red,
height: screenSize.height * 0.070,
decoration: TextFieldsUtils
.containerBorderDecoration(
Color(0Xffffffff),
Color(0xFFCCCCCC),
borderRadius: 4,
borderWidth: 0),
child: Row(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,
children: _locations.map((item) {
bool _isActive = _locations[_activeLocation] == item
? true
: false;
return Expanded(
child: InkWell(
onTap: () async {
setState(() {
_activeLocation = _locations.indexOf(item);
});
GifLoaderDialogUtils.showMyDialog(context);
await model.getPatientBasedOnDate(item: item,
selectedPatientType: widget.selectedPatientType,
patientSearchRequestModel: widget
.patientSearchRequestModel,
isSearchWithKeyInfo: widget.isSearchWithKeyInfo);
GifLoaderDialogUtils.hideDialog(context);
},
child: Center(
child: Container(
height: screenSize.height * 0.070,
decoration: TextFieldsUtils.containerBorderDecoration(
_isActive
? Color(0xFFD02127 /*B8382B*/)
: Color(0xFFEAEAEA),
_isActive ? Color(0xFFD02127) : Color(0xFFEAEAEA),
borderRadius: 4,
borderWidth: 0),
child: Center(
child: AppText(
item,
fontSize: SizeConfig.textMultiplier * 1.8,
color: _isActive ? Colors.white : Color(0xFF2B353E),
fontWeight: FontWeight.w700,
),
),
),
),
return Expanded(
child: InkWell(
onTap: () async {
setState(() {
_activeLocation = _locations.indexOf(item);
});
GifLoaderDialogUtils.showMyDialog(context);
await model.getPatientBasedOnDate(item: item,
selectedPatientType: widget.selectedPatientType,
patientSearchRequestModel: widget
.patientSearchRequestModel,
isSearchWithKeyInfo: widget.isSearchWithKeyInfo);
GifLoaderDialogUtils.hideDialog(context);
},
child: Center(
child: Container(
height: screenSize.height * 0.070,
decoration: TextFieldsUtils.containerBorderDecoration(
_isActive
? Color(0xFFD02127 /*B8382B*/)
: Color(0xFFEAEAEA),
_isActive ? Color(0xFFD02127) : Color(0xFFEAEAEA),
borderRadius: 4,
borderWidth: 0),
child: Center(
child: AppText(
item,
fontSize: SizeConfig.textMultiplier * 1.8,
color: _isActive ? Colors.white : Color(0xFF2B353E),
fontWeight: FontWeight.w700,
),
);
}).toList(),
),
),
),
),
);
}).toList(),
),
),
SizedBox(height: 18.5),
Container(
width: SizeConfig.screenWidth * 0.9,
height: 75,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
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,
SizedBox(height: 18.5),
Container(
width: SizeConfig.screenWidth * 0.9,
height: 75,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"),
),
Container(
child: model.patientList.isNotEmpty
? Column(
// mainAxisAlignment: MainAxisAlignment.center,
children: model.filterData
.map((PatiantInformtion
item) {
return PatientCard(
patientInfo: item,
patientType:
patientType,
arrivalType:
arrivalType,
isInpatient:
widget.isInpatient,
onTap: () {
// TODO change the parameter to daynamic
Navigator.of(context)
.pushNamed(
PATIENTS_PROFILE,
arguments: {
"patient": item,
"patientType":
"1",
"from": widget.patientSearchRequestModel.from,
"to": widget.patientSearchRequestModel.from,
"isSearch":
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),
)
],
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,
),
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],
isShowAppBar: true,
appBar: PatientProfileHeaderNewDesignAppBar(
patient, patient.patientType.toString() ?? '0', patientType),
patient, patient.patientType.toString() ?? '0', patientType,isInpatient: isInpatient,),
body: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: FractionallySizedBox(
@ -158,7 +158,7 @@ class _LabsHomePageState extends State<LabsHomePage> {
.toUpperCase()
: !labOrder.isInOutPatient
? TranslationBase.of(context)
.inPatient
.inPatientLabel
.toUpperCase()
: TranslationBase.of(context)
.outpatient

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

@ -71,9 +71,9 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>with SingleT
baseViewModel: patientViewModel,
appBarTitle: TranslationBase.of(context).patientProfile,
isShowAppBar: true,
appBar: PatientProfileHeaderNewDesignAppBar(patient,arrivalType??'0',patientType),
appBar: PatientProfileHeaderNewDesignAppBar(patient,arrivalType??'0',patientType,isInpatient: isInpatient,),
body: SingleChildScrollView(
child: Column(
child: isFromSearch ?Column(
children: [
DefaultTabController(
length: 2,
@ -165,6 +165,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>with SingleT
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PRESCRIPTION_NEW,
isInPatient: isInpatient,
nameLine1: TranslationBase.of(context).patient,
nameLine2: TranslationBase.of(context).prescription,
icon: 'patient/order_prescription.png'),
@ -192,6 +193,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>with SingleT
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PROCEDURE,
isInPatient: isInpatient,
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).procedures,
icon: 'patient/Order_Procedures.png'),
@ -201,7 +203,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>with SingleT
arrivalType: arrivalType,
route: MEDICAL_FILE,
nameLine1: "Health",
//TranslationBase.of(context).medicalReport,
isInPatient: isInpatient,
nameLine2: "Summary",
//TranslationBase.of(context).summaryReport,
icon: 'patient/health_summary.png'),
@ -212,7 +214,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>with SingleT
isDisable: true,
route: MEDICAL_FILE,
nameLine1: "Medical", //Health
//TranslationBase.of(context).medicalReport,
isInPatient: isInpatient,
nameLine2: "Report", //Report
//TranslationBase.of(context).summaryReport,
icon: 'patient/health_summary.png'),
@ -226,6 +228,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>with SingleT
nameLine2: TranslationBase.of(context).patient,
icon: 'patient/refer_patient.png'),
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
@ -234,7 +237,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>with SingleT
nameLine2: TranslationBase.of(context).approvals,
icon: 'patient/vital_signs.png'),
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
@ -244,7 +247,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>with SingleT
nameLine2: "Summery",
icon: 'patient/patient_sick_leave.png'),
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
@ -264,7 +267,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>with SingleT
crossAxisCount: 3,
children: [
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
@ -276,7 +279,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>with SingleT
icon: 'patient/vital_signs.png'),
// if (selectedPatientType != 7)
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
@ -287,7 +290,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>with SingleT
"Summary", //TranslationBase.of(context).summaryReport,
icon: 'patient/health_summary.png'),
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
@ -307,7 +310,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>with SingleT
nameLine2: TranslationBase.of(context).service,
icon: 'patient/health_summary.png'),
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
@ -316,7 +319,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>with SingleT
nameLine2: "ECG",
icon: 'patient/patient_sick_leave.png'),
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
@ -326,7 +329,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>with SingleT
icon: 'patient/order_prescription.png'),
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
@ -336,7 +339,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>with SingleT
icon: 'patient/Order_Procedures.png'),
//if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
@ -346,7 +349,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>with SingleT
icon: 'patient/vital_signs.png'),
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
@ -357,7 +360,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>with SingleT
if (patient.appointmentNo != null &&
patient.appointmentNo != 0)
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
@ -370,7 +373,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>with SingleT
if (patient.appointmentNo != null &&
patient.appointmentNo != 0)
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
@ -383,6 +386,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>with SingleT
if (patient.appointmentNo != null &&
patient.appointmentNo != 0)
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
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],
// appBarTitle: TranslationBase.of(context).radiology,
appBar: PatientProfileHeaderNewDesignAppBar(
patient, patient.patientType.toString() ?? '0', arrivalType),
patient, patient.patientType.toString() ?? '0', arrivalType,isInpatient: isInpatient,),
baseViewModel: model,
body: FractionallySizedBox(
widthFactor: 1.0,
@ -155,7 +155,7 @@ class _RadiologyHomePageState extends State<RadiologyHomePage> {
.toUpperCase()
: !model.radiologyList[index].isInOutPatient
? TranslationBase.of(context)
.inPatient
.inPatientLabel
.toUpperCase()
: TranslationBase.of(context)
.outpatient
@ -172,9 +172,8 @@ class _RadiologyHomePageState extends State<RadiologyHomePage> {
invoiceNO: '${model.radiologyList[index].invoiceNo}',
branch: '${model.radiologyList[index].projectName}',
clinic: model.radiologyList[index].clinicDescription,
appointmentDate: !isInpatient
? model.radiologyList[index].orderDate
: model.radiologyList[index].reportDate,
appointmentDate: model.radiologyList[index].orderDate??
model.radiologyList[index].reportDate,
onTap: () {
Navigator.push(
context,

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

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

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

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

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

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

@ -17,9 +17,10 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
final String patientType;
final String arrivalType;
final double height;
final bool isInpatient;
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
Widget build(BuildContext context) {
@ -38,7 +39,7 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
decoration: BoxDecoration(
color: Colors.white,
),
height: height == 0 ? 200 : height,
height: height == 0 ? isInpatient? 210:200 : height,
child: Container(
padding: EdgeInsets.only(left: 10, right: 10, bottom: 10),
margin: EdgeInsets.only(top: 50),
@ -254,7 +255,7 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
),
children: <TextSpan>[
new TextSpan(
text: TranslationBase.of(context).age??'' + " : ",
text: TranslationBase.of(context).age+ " : ",
style: TextStyle(fontSize: 14)),
new TextSpan(
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