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

merge-requests/849/head
Mohammad Aljammal 5 years ago
commit faf8c8ede7

@ -551,7 +551,7 @@ const Map<String, Map<String, String>> localizedValues = {
"sendSuc": {"en": "A copy has been sent to the email", "ar": "تم إرسال نسخة إلى البريد الإلكتروني"}, "sendSuc": {"en": "A copy has been sent to the email", "ar": "تم إرسال نسخة إلى البريد الإلكتروني"},
"SpecialResult": {"en": "Special Result", "ar": "نتيجة خاصة"}, "SpecialResult": {"en": "Special Result", "ar": "نتيجة خاصة"},
"noDataAvailable": {"en": "No data available", "ar": " لا يوجد بيانات متاحة "}, "noDataAvailable": {"en": "No data available", "ar": " لا يوجد بيانات متاحة "},
"show-more-btn": {"en": "Flow Chart", "ar": "النتائج التراكمية"}, "show-more-btn": {"en": "Flowchart", "ar": "النتائج التراكمية"},
"open-rad": {"en": "Open Radiology Image", "ar": "فتح صور الاشعة"}, "open-rad": {"en": "Open Radiology Image", "ar": "فتح صور الاشعة"},
"fileNumber": {"en": "File Number: ", "ar": "رقم الملف : "}, "fileNumber": {"en": "File Number: ", "ar": "رقم الملف : "},
"searchPatient-name": {"en": "Search Name, Medical File, Phone Number", "ar": "اسم البحث ، الملف الطبي ، رقم الهاتف"}, "searchPatient-name": {"en": "Search Name, Medical File, Phone Number", "ar": "اسم البحث ، الملف الطبي ، رقم الهاتف"},

@ -211,7 +211,8 @@ class LabsService extends BaseService {
_allSpecialLab.clear(); _allSpecialLab.clear();
await baseAppClient.post(ALL_SPECIAL_LAB_RESULT, onSuccess: (dynamic response, int statusCode) { await baseAppClient.post(ALL_SPECIAL_LAB_RESULT, onSuccess: (dynamic response, int statusCode) {
response['ListPLSRALL'].forEach((lab) { response['ListPLSRALL'].forEach((lab) {
_allSpecialLab.add(AllSpecialLabResultModel.fromJson(lab)); var labs = AllSpecialLabResultModel.fromJson(lab);
if (labs.invoiceNo != "0") _allSpecialLab.add(AllSpecialLabResultModel.fromJson(lab));
}); });
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;

@ -234,9 +234,14 @@ class PatientSearchViewModel extends BaseViewModel {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
await getDoctorProfile(); await getDoctorProfile();
resetInPatientPagination(); resetInPatientPagination();
if (inPatientList.length > 0) if (inPatientList.length > 0) {
lastSubsetIndex = (inPatientList.length < inPatientPageSize - 1
? inPatientList.length
: inPatientPageSize - 1);
filteredInPatientItems filteredInPatientItems
.addAll(inPatientList.sublist(firstSubsetIndex, lastSubsetIndex)); .addAll(inPatientList.sublist(firstSubsetIndex, lastSubsetIndex));
}
if (myIinPatientList.length > 0) { if (myIinPatientList.length > 0) {
filteredMyInPatientItems.addAll(myIinPatientList); filteredMyInPatientItems.addAll(myIinPatientList);
@ -245,6 +250,7 @@ class PatientSearchViewModel extends BaseViewModel {
} }
generateInpatientClinicList() { generateInpatientClinicList() {
InpatientClinicList.clear();
inPatientList.forEach((element) { inPatientList.forEach((element) {
if (!InpatientClinicList.contains(element.clinicDescription)) { if (!InpatientClinicList.contains(element.clinicDescription)) {
InpatientClinicList.add(element.clinicDescription); InpatientClinicList.add(element.clinicDescription);

@ -1,13 +1,30 @@
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/models/dashboard/get_special_clinical_care_List_Respose_Model.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.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:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class InPatientHeader extends StatelessWidget with PreferredSizeWidget{ class InPatientHeader extends StatelessWidget with PreferredSizeWidget {
const InPatientHeader() : super(); InPatientHeader(
{this.model,
this.specialClinic,
this.activeTab,
this.selectedMapId,
this.onChangeFunc})
: super();
final PatientSearchViewModel model;
final GetSpecialClinicalCareListResponseModel specialClinic;
final activeTab;
final selectedMapId;
final onChangeFunc;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectsProvider = Provider.of<ProjectViewModel>(context);
return Container( return Container(
padding: EdgeInsets.only(left: 0, right: 5, bottom: 5, top: 5), padding: EdgeInsets.only(left: 0, right: 5, bottom: 5, top: 5),
decoration: BoxDecoration( decoration: BoxDecoration(
@ -24,19 +41,87 @@ class InPatientHeader extends StatelessWidget with PreferredSizeWidget{
), ),
Expanded( Expanded(
child: AppText( child: AppText(
TranslationBase TranslationBase.of(context).inPatient,
.of(context)
.inPatient,
fontSize: SizeConfig.textMultiplier * 2.8, fontSize: SizeConfig.textMultiplier * 2.8,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Color(0xFF2B353E), color: Color(0xFF2B353E),
), ),
), ),
if (model.specialClinicalCareMappingList.isNotEmpty &&
specialClinic != null &&
activeTab != 2)
Container(
width: MediaQuery.of(context).size.width * .3,
child: DropdownButtonHideUnderline(
child: DropdownButton(
dropdownColor: Colors.white,
iconEnabledColor: Colors.black,
isExpanded: true,
value: selectedMapId == null
? model.specialClinicalCareMappingList[0].nursingStationID
: selectedMapId,
iconSize: 25,
elevation: 16,
selectedItemBuilder: (BuildContext context) {
return model.specialClinicalCareMappingList.map((item) {
return Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
padding: EdgeInsets.all(2),
margin: EdgeInsets.all(2),
decoration: new BoxDecoration(
color: Colors.red[800],
borderRadius: BorderRadius.circular(20),
),
constraints: BoxConstraints(
minWidth: 20,
minHeight: 20,
),
child: Center(
child: AppText(
model.specialClinicalCareMappingList.length
.toString(),
color: Colors.white,
fontSize:
projectsProvider.isArabic ? 10 : 11,
textAlign: TextAlign.center,
),
)),
],
),
AppText(item.description,
fontSize: 12,
color: Colors.black,
fontWeight: FontWeight.bold,
textAlign: TextAlign.end),
],
);
}).toList();
},
onChanged: (newValue) async {
onChangeFunc(newValue);
},
items: model.specialClinicalCareMappingList.map((item) {
return DropdownMenuItem(
child: AppText(
item.description,
textAlign: TextAlign.left,
),
value: item.nursingStationID,
);
}).toList(),
)),
),
]), ]),
), ),
); );
} }
@override @override
Size get preferredSize => Size(double.maxFinite,85); Size get preferredSize => Size(double.maxFinite, 85);
} }

@ -18,7 +18,18 @@ class InPatientListPage extends StatefulWidget {
final bool isMyInPatient; final bool isMyInPatient;
final PatientSearchViewModel patientSearchViewModel; final PatientSearchViewModel patientSearchViewModel;
InPatientListPage(this.isMyInPatient, this.patientSearchViewModel); final bool isAllClinic;
final bool showBottomSheet;
final String selectedClinicName;
final Function onChangeValue;
InPatientListPage(
{this.isMyInPatient,
this.patientSearchViewModel,
this.selectedClinicName,
this.onChangeValue,
this.isAllClinic,
this.showBottomSheet});
@override @override
_InPatientListPageState createState() => _InPatientListPageState(); _InPatientListPageState createState() => _InPatientListPageState();
@ -28,10 +39,7 @@ class _InPatientListPageState extends State<InPatientListPage> {
TextEditingController _searchController = TextEditingController(); TextEditingController _searchController = TextEditingController();
bool isSortDes = false; bool isSortDes = false;
bool isAllClinic = true;
bool hasQuery = false; bool hasQuery = false;
bool showBottomSheet = false;
String selectedClinicName;
@override @override
void dispose() { void dispose() {
@ -47,7 +55,8 @@ class _InPatientListPageState extends State<InPatientListPage> {
body: Column( body: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
if (!widget.isMyInPatient) if (!widget.isMyInPatient &&
widget.patientSearchViewModel.inPatientList.isNotEmpty)
Container( Container(
margin: EdgeInsets.only(left: 10.0, right: 10, top: 10), margin: EdgeInsets.only(left: 10.0, right: 10, top: 10),
child: Row( child: Row(
@ -58,14 +67,14 @@ class _InPatientListPageState extends State<InPatientListPage> {
children: [ children: [
Radio( Radio(
value: 1, value: 1,
groupValue: isAllClinic ? 1 : 2, groupValue: widget.isAllClinic ? 1 : 2,
onChanged: (value) { onChanged: (value) {
setState(() { setState(() {
setState(() { widget.onChangeValue(
isAllClinic = true; isAllClinic: true,
showBottomSheet = false; showBottomSheet: false,
selectedClinicName = null; selectedClinicName: null);
});
widget.patientSearchViewModel widget.patientSearchViewModel
.setDefaultInPatientList(); .setDefaultInPatientList();
}); });
@ -79,48 +88,55 @@ class _InPatientListPageState extends State<InPatientListPage> {
], ],
), ),
onTap: () { onTap: () {
setState(() { widget.onChangeValue(
isAllClinic = true; isAllClinic: true,
selectedClinicName = null; showBottomSheet: false,
showBottomSheet = false; selectedClinicName: null);
});
widget.patientSearchViewModel.setDefaultInPatientList(); widget.patientSearchViewModel.setDefaultInPatientList();
}, },
), ),
InkWell( if (widget
onTap: () { .patientSearchViewModel.InpatientClinicList.isNotEmpty)
setState(() { InkWell(
onTap: () {
if (widget.patientSearchViewModel.InpatientClinicList if (widget.patientSearchViewModel.InpatientClinicList
.length > .length >
0) showBottomSheet = true; 0) {
}); widget.onChangeValue(
}, isAllClinic: false,
child: Row( showBottomSheet: true,
children: [ selectedClinicName: widget.selectedClinicName);
Radio( }
value: 2, },
groupValue: isAllClinic ? 1 : 2, child: Row(
onChanged: (value) { children: [
setState(() { Radio(
setState(() { value: 2,
if (widget.patientSearchViewModel groupValue: widget.isAllClinic ? 1 : 2,
.InpatientClinicList.length > onChanged: (value) {
0) showBottomSheet = true; if (widget.patientSearchViewModel
}); .InpatientClinicList.length >
}); 0) {
}, widget.onChangeValue(
activeColor: Colors.red, isAllClinic: false,
), showBottomSheet: true,
AppText( selectedClinicName:
selectedClinicName ?? TranslationBase.of(context).clinicSelect, widget.selectedClinicName);
fontSize: 15, }
), },
Container( activeColor: Colors.red,
margin: EdgeInsets.only(bottom: 10), ),
child: Icon(FontAwesomeIcons.sortDown)) AppText(
], widget.selectedClinicName ??
)), TranslationBase.of(context).clinicSelect,
fontSize: 15,
),
Container(
margin: EdgeInsets.only(bottom: 10),
child: Icon(FontAwesomeIcons.sortDown))
],
)),
], ],
), ),
), ),
@ -148,7 +164,7 @@ class _InPatientListPageState extends State<InPatientListPage> {
hasQuery = true; hasQuery = true;
}); });
widget.patientSearchViewModel.filterSearchResults(value, widget.patientSearchViewModel.filterSearchResults(value,
isAllClinic: isAllClinic, isAllClinic: widget.isAllClinic,
isMyInPatient: widget.isMyInPatient); isMyInPatient: widget.isMyInPatient);
}), }),
Positioned( Positioned(
@ -167,7 +183,7 @@ class _InPatientListPageState extends State<InPatientListPage> {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
widget.patientSearchViewModel.sortInPatient( widget.patientSearchViewModel.sortInPatient(
isDes: isSortDes, isDes: isSortDes,
isAllClinic: isAllClinic, isAllClinic: widget.isAllClinic,
isMyInPatient: widget.isMyInPatient); isMyInPatient: widget.isMyInPatient);
isSortDes = !isSortDes; isSortDes = !isSortDes;
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
@ -181,7 +197,7 @@ class _InPatientListPageState extends State<InPatientListPage> {
? (widget.isMyInPatient && ? (widget.isMyInPatient &&
widget.patientSearchViewModel.myIinPatientList.length > 0) widget.patientSearchViewModel.myIinPatientList.length > 0)
? ListOfMyInpatient( ? ListOfMyInpatient(
isAllClinic: isAllClinic, isAllClinic: widget.isAllClinic,
hasQuery: hasQuery, hasQuery: hasQuery,
patientSearchViewModel: widget.patientSearchViewModel) patientSearchViewModel: widget.patientSearchViewModel)
: widget.patientSearchViewModel.filteredInPatientItems : widget.patientSearchViewModel.filteredInPatientItems
@ -193,7 +209,7 @@ class _InPatientListPageState extends State<InPatientListPage> {
0) 0)
? NoData() ? NoData()
: ListOfAllInPatient( : ListOfAllInPatient(
isAllClinic: isAllClinic, isAllClinic: widget.isAllClinic,
hasQuery: hasQuery, hasQuery: hasQuery,
patientSearchViewModel: patientSearchViewModel:
widget.patientSearchViewModel) widget.patientSearchViewModel)
@ -206,7 +222,7 @@ class _InPatientListPageState extends State<InPatientListPage> {
), ),
], ],
), ),
bottomSheet: !showBottomSheet bottomSheet: !widget.showBottomSheet
? Container( ? Container(
height: 0, height: 0,
) )
@ -224,9 +240,10 @@ class _InPatientListPageState extends State<InPatientListPage> {
children: [ children: [
InkWell( InkWell(
onTap: () { onTap: () {
setState(() { widget.onChangeValue(
showBottomSheet = false; isAllClinic: widget.isAllClinic,
}); showBottomSheet: false,
selectedClinicName: widget.selectedClinicName);
}, },
child: Icon(DoctorApp.close_1, child: Icon(DoctorApp.close_1,
size: SizeConfig.getTextMultiplierBasedOnWidth() * size: SizeConfig.getTextMultiplierBasedOnWidth() *
@ -257,13 +274,13 @@ class _InPatientListPageState extends State<InPatientListPage> {
itemBuilder: (context, index) { itemBuilder: (context, index) {
return InkWell( return InkWell(
onTap: () { onTap: () {
setState(() { widget.onChangeValue(
isAllClinic = false; isAllClinic: false,
showBottomSheet = false; showBottomSheet: false,
selectedClinicName = widget selectedClinicName: widget
.patientSearchViewModel .patientSearchViewModel
.InpatientClinicList[index]; .InpatientClinicList[index]);
});
widget.patientSearchViewModel.filterByClinic( widget.patientSearchViewModel.filterByClinic(
clinicName: widget.patientSearchViewModel clinicName: widget.patientSearchViewModel
.InpatientClinicList[index]); .InpatientClinicList[index]);
@ -273,16 +290,15 @@ class _InPatientListPageState extends State<InPatientListPage> {
Radio( Radio(
value: widget.patientSearchViewModel value: widget.patientSearchViewModel
.InpatientClinicList[index], .InpatientClinicList[index],
groupValue: selectedClinicName, groupValue: widget.selectedClinicName,
onChanged: (value) { onChanged: (value) {
setState(() { setState(() {
setState(() { widget.onChangeValue(
isAllClinic = false; isAllClinic: false,
showBottomSheet = false; showBottomSheet: false,
selectedClinicName = widget selectedClinicName: widget
.patientSearchViewModel .patientSearchViewModel
.InpatientClinicList[index]; .InpatientClinicList[index]);
});
widget.patientSearchViewModel widget.patientSearchViewModel
.filterByClinic(clinicName: value); .filterByClinic(clinicName: value);
}); });

@ -21,6 +21,9 @@ import 'in_patient_list_page.dart';
class InPatientScreen extends StatefulWidget { class InPatientScreen extends StatefulWidget {
GetSpecialClinicalCareListResponseModel specialClinic; GetSpecialClinicalCareListResponseModel specialClinic;
bool isAllClinic = true;
bool showBottomSheet = false;
String selectedClinicName;
InPatientScreen({Key key, this.specialClinic}); InPatientScreen({Key key, this.specialClinic});
@override @override
@ -31,7 +34,6 @@ class _InPatientScreenState extends State<InPatientScreen>
with SingleTickerProviderStateMixin { with SingleTickerProviderStateMixin {
TabController _tabController; TabController _tabController;
int _activeTab = 0; int _activeTab = 0;
int selectedMapId; int selectedMapId;
@override @override
@ -74,95 +76,35 @@ class _InPatientScreenState extends State<InPatientScreen>
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: true, isShowAppBar: true,
appBar: InPatientHeader(), appBar: InPatientHeader(
model: model,
selectedMapId: selectedMapId,
specialClinic: widget.specialClinic,
activeTab: _activeTab,
onChangeFunc: (newValue) async {
setState(() {
selectedMapId = newValue;
});
model.clearPatientList();
GifLoaderDialogUtils.showMyDialog(context);
PatientSearchRequestModel requestModel =
PatientSearchRequestModel(
nursingStationID: selectedMapId, clinicID: 0);
await model.getInPatientList(requestModel, isLocalBusy: true);
GifLoaderDialogUtils.hideDialog(context);
if (model.state == ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(model.error);
} else {
onChangeState(
isAllClinic: true,
showBottomSheet: false,
selectedClinicName: null);
}
}),
body: Column( body: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
if (model.specialClinicalCareMappingList.isNotEmpty &&
widget.specialClinic != null &&
_activeTab != 2)
Container(
width: MediaQuery.of(context).size.width * .3,
child: DropdownButtonHideUnderline(
child: DropdownButton(
dropdownColor: Colors.white,
iconEnabledColor: Colors.black,
isExpanded: true,
value: selectedMapId == null
? model.specialClinicalCareMappingList[0].nursingStationID
: selectedMapId,
iconSize: 25,
elevation: 16,
selectedItemBuilder: (BuildContext context) {
return model.specialClinicalCareMappingList.map((item) {
return Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
padding: EdgeInsets.all(2),
margin: EdgeInsets.all(2),
decoration: new BoxDecoration(
color: Colors.red[800],
borderRadius: BorderRadius.circular(20),
),
constraints: BoxConstraints(
minWidth: 20,
minHeight: 20,
),
child: Center(
child: AppText(
model
.specialClinicalCareMappingList.length
.toString(),
color: Colors.white,
fontSize:
projectsProvider.isArabic ? 10 : 11,
textAlign: TextAlign.center,
),
)),
],
),
AppText(item.description,
fontSize: 12,
color: Colors.black,
fontWeight: FontWeight.bold,
textAlign: TextAlign.end),
],
);
}).toList();
},
onChanged: (newValue) async {
setState(() {
selectedMapId = newValue;
});
model.clearPatientList();
GifLoaderDialogUtils.showMyDialog(context);
PatientSearchRequestModel requestModel =
PatientSearchRequestModel(
nursingStationID: selectedMapId, clinicID: 0);
await model.getInPatientList(requestModel,
isLocalBusy: true);
GifLoaderDialogUtils.hideDialog(context);
if (model.state == ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(model.error);
}
},
items: model.specialClinicalCareMappingList.map((item) {
return DropdownMenuItem(
child: AppText(
item.description,
textAlign: TextAlign.left,
),
value: item.nursingStationID,
);
}).toList(),
)),
),
Expanded( Expanded(
child: Scaffold( child: Scaffold(
extendBodyBehindAppBar: false, extendBodyBehindAppBar: false,
@ -210,8 +152,20 @@ class _InPatientScreenState extends State<InPatientScreen>
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
controller: _tabController, controller: _tabController,
children: [ children: [
InPatientListPage(false, model), InPatientListPage(
InPatientListPage(true, model), isMyInPatient: false,
patientSearchViewModel: model,
isAllClinic: widget.isAllClinic,
showBottomSheet: widget.showBottomSheet,
selectedClinicName: widget.selectedClinicName,
onChangeValue: onChangeState),
InPatientListPage(
isMyInPatient: true,
patientSearchViewModel: model,
isAllClinic: widget.isAllClinic,
showBottomSheet: widget.showBottomSheet,
selectedClinicName: widget.selectedClinicName,
onChangeValue: onChangeState),
DischargedPatient(), DischargedPatient(),
], ],
), ),
@ -226,6 +180,14 @@ class _InPatientScreenState extends State<InPatientScreen>
); );
} }
onChangeState({isAllClinic, showBottomSheet, selectedClinicName}) {
setState(() {
widget.isAllClinic = isAllClinic;
widget.showBottomSheet = showBottomSheet;
widget.selectedClinicName = selectedClinicName;
});
}
Widget tabWidget(Size screenSize, bool isActive, String title, Widget tabWidget(Size screenSize, bool isActive, String title,
{int counter = -1}) { {int counter = -1}) {
return Center( return Center(

@ -32,6 +32,7 @@ class ListOfAllInPatient extends StatelessWidget {
patientSearchViewModel.filteredInPatientItems.length, patientSearchViewModel.filteredInPatientItems.length,
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
shrinkWrap: true, shrinkWrap: true,
physics: const AlwaysScrollableScrollPhysics (),
itemBuilder: (context, index) { itemBuilder: (context, index) {
return PatientCard( return PatientCard(
patientInfo: patientSearchViewModel patientInfo: patientSearchViewModel

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/model/labs/lab_result.dart'; import 'package:doctor_app_flutter/core/model/labs/lab_result.dart';
import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart'; import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
@ -44,7 +45,11 @@ class LabResultWidget extends StatelessWidget {
children: [ children: [
Row( Row(
children: [ children: [
AppText(filterName), AppText(
filterName,
fontSize: SizeConfig.textMultiplier * 2.0,
fontWeight: FontWeight.w700,
),
], ],
), ),
// InkWell( // InkWell(
@ -69,6 +74,9 @@ class LabResultWidget extends StatelessWidget {
// ), // ),
], ],
), ),
SizedBox(
height: 8,
),
Row( Row(
children: [ children: [
Expanded( Expanded(
@ -77,7 +85,8 @@ class LabResultWidget extends StatelessWidget {
child: AppText( child: AppText(
TranslationBase.of(context).description, TranslationBase.of(context).description,
color: Colors.black, color: Colors.black,
bold: true, fontSize: SizeConfig.textMultiplier * 2.0,
fontWeight: FontWeight.w700,
), ),
), ),
), ),
@ -88,7 +97,8 @@ class LabResultWidget extends StatelessWidget {
child: AppText( child: AppText(
TranslationBase.of(context).value, TranslationBase.of(context).value,
color: Colors.black, color: Colors.black,
bold: true, fontSize: SizeConfig.textMultiplier * 2.0,
fontWeight: FontWeight.w700,
), ),
), ),
), ),
@ -98,16 +108,19 @@ class LabResultWidget extends StatelessWidget {
child: Center( child: Center(
child: AppText( child: AppText(
TranslationBase.of(context).range, TranslationBase.of(context).range,
color: Colors.black, fontSize: SizeConfig.textMultiplier * 2.0,
bold: true, fontWeight: FontWeight.w700,
), ),
), ),
), ),
),
Expanded(
child: Container(),
) )
], ],
), ),
SizedBox( SizedBox(
height: 7, height: 4,
), ),
Divider( Divider(
color: Colors.black, color: Colors.black,
@ -117,107 +130,132 @@ class LabResultWidget extends StatelessWidget {
height: 12, height: 12,
), ),
...List.generate( ...List.generate(
patientLabResultList.length, patientLabResultList.length,
(index) => Column( (index) => Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
color: Color(0XFFF2F2F2),
borderRadius: BorderRadius.all(
Radius.circular(8.0),
),
),
child: Row(
children: [ children: [
Row( Expanded(
children: [ child: Container(
Expanded( padding: EdgeInsets.all(10),
child: Container( child: Center(
padding: EdgeInsets.all(10), child: AppText(
color: Colors.white, /*'${patientLabResultList[index].testCode}\n' +*/
child: Center( patientLabResultList[index].description,
child: AppText( textAlign: TextAlign.center,
'${patientLabResultList[index].testCode}\n' + fontSize: SizeConfig.textMultiplier * 1.8,
patientLabResultList[index].description, isCopyable: true,
textAlign: TextAlign.center,
isCopyable: true,
),
),
), ),
), ),
Expanded( ),
child: Container( ),
padding: EdgeInsets.all(10), Expanded(
color: Colors.white, child: Row(
child: Center( children: [
child: AppText( Container(
patientLabResultList[index].resultValue ?? decoration: BoxDecoration(
"" + shape: BoxShape.circle,
" " + color: Colors.red.shade700,
"${patientLabResultList[index].uOM ?? ""}", // borderRadius: BorderRadius.all(
textAlign: TextAlign.center, // Radius.circular(25.0),
isCopyable: true, // ),
),
child: Icon(
Icons.arrow_circle_up_sharp,
),
),
Expanded(
child: Container(
padding: EdgeInsets.all(10),
child: Center(
child: AppText(
patientLabResultList[index].resultValue ??
"" +
" " +
"${patientLabResultList[index].uOM ?? ""}",
textAlign: TextAlign.center,
isCopyable: true,
fontSize: SizeConfig.textMultiplier * 1.8,
),
), ),
), ),
), ),
],
),
),
Expanded(
child: Container(
padding: EdgeInsets.all(10),
// color: Colors.white,
child: Center(
child: AppText(
patientLabResultList[index].referanceRange,
textAlign: TextAlign.center,
fontSize: SizeConfig.textMultiplier * 1.8,
isCopyable: true,
),
), ),
Expanded( ),
child: Column( ),
children: [ Expanded(
Container( child: Container(
padding: EdgeInsets.all(10), child: InkWell(
color: Colors.white, onTap: () {
child: Center( Navigator.push(
child: AppText( context,
patientLabResultList[index].referanceRange, FadePage(
textAlign: TextAlign.center, page: FlowChartPage(
isCopyable: true, filterName:
), patientLabResultList[index].description,
patientLabOrder: patientLabOrder,
patient: patient,
isInpatient: isInpatient,
), ),
// page: LabResultHistoryPage(
// filterName: patientLabResultList[index].description,
// patientLabOrder: patientLabOrder,
// patient: patient,
// ),
), ),
SizedBox( );
height: 12, },
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
AppText(
TranslationBase.of(context).showMoreBtn,
textDecoration: TextDecoration.underline,
color: Colors.red.shade700,
fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.w700,
), ),
InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: FlowChartPage(
filterName:
patientLabResultList[index].description,
patientLabOrder: patientLabOrder,
patient: patient,
isInpatient: isInpatient,
),
// page: LabResultHistoryPage(
// filterName: patientLabResultList[index].description,
// patientLabOrder: patientLabOrder,
// patient: patient,
// ),
),
);
},
// child: AppText(
// " (show details)",
// color: Colors.blue,
// fontSize: 12,
// ),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
AppText(
TranslationBase.of(context).showMoreBtn,
textDecoration: TextDecoration.underline,
color: Colors.blue,
fontSize: 12,
),
],
),
)
], ],
), ),
), ),
], ),
), ),
// SizedBox(
// height: 12,
// ),
Divider(),
], ],
)) ),
),
SizedBox(
height: 4,
),
],
),
),
SizedBox(
height: 6,
),
Divider(),
// Table( // Table(
// border: TableBorder.symmetric( // border: TableBorder.symmetric(
// inside: BorderSide(width: 2.0, color: Colors.grey[300],style: BorderStyle.solid), // inside: BorderSide(width: 2.0, color: Colors.grey[300],style: BorderStyle.solid),

@ -82,75 +82,78 @@ class _AllLabSpecialResultState extends State<AllLabSpecialResult> {
], ],
), ),
), ),
...List.generate( ListView.builder(
model.allSpecialLabList.length, itemCount: model.allSpecialLabList.length,
(index) => Container( scrollDirection: Axis.vertical,
margin: EdgeInsets.all(10), shrinkWrap: true,
decoration: BoxDecoration( itemBuilder: (BuildContext ctxt, int index) {
border: Border.all( return Container(
width: 0.5, margin: EdgeInsets.all(10),
color: Colors.white, decoration: BoxDecoration(
), border: Border.all(
borderRadius: BorderRadius.all( width: 0.5,
Radius.circular(8.0), color: Colors.white,
), ),
color: Colors.white), borderRadius: BorderRadius.all(
child: Row( Radius.circular(8.0),
children: [ ),
Container( color: Colors.white),
width: 20, child: Row(
height: 160, children: [
decoration: BoxDecoration( Container(
color: model.allSpecialLabList[index].isLiveCareAppointment width: 20,
? Colors.red[900] height: 160,
: !model.allSpecialLabList[index].isInOutPatient decoration: BoxDecoration(
? Colors.black color: model.allSpecialLabList[index].isLiveCareAppointment
: Color(0xffa9a089), ? Colors.red[900]
borderRadius: BorderRadius.only( : !model.allSpecialLabList[index].isInOutPatient
topLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(8), ? Colors.black
bottomLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(8), : Color(0xffa9a089),
topRight: projectViewModel.isArabic ? Radius.circular(8) : Radius.circular(0), borderRadius: BorderRadius.only(
bottomRight: projectViewModel.isArabic ? Radius.circular(8) : Radius.circular(0)), topLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(8),
), bottomLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(8),
child: RotatedBox( topRight: projectViewModel.isArabic ? Radius.circular(8) : Radius.circular(0),
quarterTurns: 3, bottomRight: projectViewModel.isArabic ? Radius.circular(8) : Radius.circular(0)),
child: Center( ),
child: Text( child: RotatedBox(
model.allSpecialLabList[index].isLiveCareAppointment quarterTurns: 3,
? TranslationBase.of(context).liveCare.toUpperCase() child: Center(
: !model.allSpecialLabList[index].isInOutPatient child: Text(
? TranslationBase.of(context).inPatientLabel.toUpperCase() model.allSpecialLabList[index].isLiveCareAppointment
: TranslationBase.of(context).outpatient.toUpperCase(), ? TranslationBase.of(context).liveCare.toUpperCase()
style: TextStyle(color: Colors.white), : !model.allSpecialLabList[index].isInOutPatient
), ? TranslationBase.of(context).inPatientLabel.toUpperCase()
)), : TranslationBase.of(context).outpatient.toUpperCase(),
), style: TextStyle(color: Colors.white),
Expanded( ),
child: DoctorCard( )),
isNoMargin: true, ),
onTap: () => Navigator.push( Expanded(
context, child: DoctorCard(
FadePage( isNoMargin: true,
page: SpecialLabResultDetailsPage( onTap: () => Navigator.push(
resultData: model.allSpecialLabList[index].resultDataHTML, context,
patient: patient, FadePage(
page: SpecialLabResultDetailsPage(
resultData: model.allSpecialLabList[index].resultDataHTML,
patient: patient,
),
),
), ),
doctorName: model.allSpecialLabList[index].doctorName,
invoiceNO: ' ${model.allSpecialLabList[index].invoiceNo}',
profileUrl: model.allSpecialLabList[index].doctorImageURL,
branch: model.allSpecialLabList[index].projectName,
clinic: model.allSpecialLabList[index].clinicDescription,
appointmentDate: model.allSpecialLabList[index].orderDate,
orderNo: model.allSpecialLabList[index].orderNo,
isShowTime: false,
), ),
), ),
doctorName: model.allSpecialLabList[index].doctorName, ],
invoiceNO: ' ${model.allSpecialLabList[index].invoiceNo}',
profileUrl: model.allSpecialLabList[index].doctorImageURL,
branch: model.allSpecialLabList[index].projectName,
clinic: model.allSpecialLabList[index].clinicDescription,
appointmentDate: model.allSpecialLabList[index].orderDate,
orderNo: model.allSpecialLabList[index].orderNo,
isShowTime: false,
),
), ),
], );
), }),
),
),
if (model.allSpecialLabList.isEmpty && patient.patientStatusType != 43) if (model.allSpecialLabList.isEmpty && patient.patientStatusType != 43)
Center( Center(
child: Column( child: Column(

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart'; import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart';
import 'package:doctor_app_flutter/core/viewModel/labs_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/labs_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';
@ -84,17 +85,18 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(5.0), Radius.circular(5.0),
)), ),),
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: Container( child: Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: 10, right: 10), left: 0, right: 0),
child: AppText( child: AppText(
TranslationBase.of(context) TranslationBase.of(context)
.generalResult, .generalResult,
bold: true, fontSize: SizeConfig.textMultiplier * 2.3,
bold: false,
))), ))),
Container( Container(
width: 25, width: 25,
@ -141,7 +143,7 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
patient: widget.patient, patient: widget.patient,
isInpatient: widget.isInpatient, isInpatient: widget.isInpatient,
), ),
) ),
], ],
), ),
), ),
@ -149,7 +151,7 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
], ],
), ),
) )
else else if (widget.details == null)
Container( Container(
child: ErrorMessage( child: ErrorMessage(
error: TranslationBase.of(context).noDataAvailable, error: TranslationBase.of(context).noDataAvailable,

@ -35,69 +35,36 @@ class ProfileGridForInPatient extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final List<PatientProfileCardModel> cardsList = [ final List<PatientProfileCardModel> cardsList = [
PatientProfileCardModel( PatientProfileCardModel(TranslationBase.of(context).vital, TranslationBase.of(context).signs, VITAL_SIGN_DETAILS,
TranslationBase.of(context).vital,
TranslationBase.of(context).signs,
VITAL_SIGN_DETAILS,
'patient/vital_signs.png', 'patient/vital_signs.png',
isInPatient: isInpatient), isInPatient: isInpatient),
PatientProfileCardModel( PatientProfileCardModel(
TranslationBase.of(context).lab, TranslationBase.of(context).lab, TranslationBase.of(context).result, LAB_RESULT, 'patient/lab_results.png',
TranslationBase.of(context).result,
LAB_RESULT,
'patient/lab_results.png',
isInPatient: isInpatient), isInPatient: isInpatient),
PatientProfileCardModel( PatientProfileCardModel(TranslationBase.of(context).lab, TranslationBase.of(context).special,
TranslationBase.of(context).lab, ALL_SPECIAL_LAB_RESULT, 'patient/lab_results.png',
TranslationBase.of(context).specialResult,
ALL_SPECIAL_LAB_RESULT,
'patient/lab_results.png',
isInPatient: isInpatient), isInPatient: isInpatient),
PatientProfileCardModel( PatientProfileCardModel(TranslationBase.of(context).radiology, TranslationBase.of(context).result,
TranslationBase.of(context).radiology, RADIOLOGY_PATIENT, 'patient/health_summary.png',
TranslationBase.of(context).result,
RADIOLOGY_PATIENT,
'patient/health_summary.png',
isInPatient: isInpatient), isInPatient: isInpatient),
PatientProfileCardModel( PatientProfileCardModel(TranslationBase.of(context).patient, TranslationBase.of(context).prescription,
TranslationBase.of(context).patient, ORDER_PRESCRIPTION_NEW, 'patient/order_prescription.png',
TranslationBase.of(context).prescription,
ORDER_PRESCRIPTION_NEW,
'patient/order_prescription.png',
isInPatient: isInpatient), isInPatient: isInpatient),
PatientProfileCardModel( PatientProfileCardModel(TranslationBase.of(context).progress, TranslationBase.of(context).note, PROGRESS_NOTE,
TranslationBase.of(context).progress,
TranslationBase.of(context).note,
PROGRESS_NOTE,
'patient/Progress_notes.png', 'patient/Progress_notes.png',
isInPatient: isInpatient, isInPatient: isInpatient, isDischargedPatient: isDischargedPatient),
isDischargedPatient: isDischargedPatient), PatientProfileCardModel(TranslationBase.of(context).order, TranslationBase.of(context).sheet, ORDER_NOTE,
PatientProfileCardModel(
TranslationBase.of(context).order,
TranslationBase.of(context).sheet,
ORDER_NOTE,
'patient/Progress_notes.png', 'patient/Progress_notes.png',
isInPatient: isInpatient, isInPatient: isInpatient, isDischargedPatient: isDischargedPatient),
isDischargedPatient: isDischargedPatient), PatientProfileCardModel(TranslationBase.of(context).orders, TranslationBase.of(context).procedures,
PatientProfileCardModel( ORDER_PROCEDURE, 'patient/Order_Procedures.png',
TranslationBase.of(context).orders,
TranslationBase.of(context).procedures,
ORDER_PROCEDURE,
'patient/Order_Procedures.png',
isInPatient: isInpatient), isInPatient: isInpatient),
PatientProfileCardModel( PatientProfileCardModel(TranslationBase.of(context).health, TranslationBase.of(context).summary, HEALTH_SUMMARY,
TranslationBase.of(context).health,
TranslationBase.of(context).summary,
HEALTH_SUMMARY,
'patient/health_summary.png', 'patient/health_summary.png',
isInPatient: isInpatient), isInPatient: isInpatient),
PatientProfileCardModel( PatientProfileCardModel(TranslationBase.of(context).medical, TranslationBase.of(context).report,
TranslationBase.of(context).medical, PATIENT_MEDICAL_REPORT, 'patient/health_summary.png',
TranslationBase.of(context).report, isInPatient: isInpatient, isDisable: false),
PATIENT_MEDICAL_REPORT,
'patient/health_summary.png',
isInPatient: isInpatient,
isDisable: false),
PatientProfileCardModel( PatientProfileCardModel(
TranslationBase.of(context).referral, TranslationBase.of(context).referral,
TranslationBase.of(context).patient, TranslationBase.of(context).patient,
@ -106,19 +73,12 @@ class ProfileGridForInPatient extends StatelessWidget {
isInPatient: isInpatient, isInPatient: isInpatient,
isDisable: isDischargedPatient || isFromSearch, isDisable: isDischargedPatient || isFromSearch,
), ),
PatientProfileCardModel( PatientProfileCardModel(TranslationBase.of(context).insurance, TranslationBase.of(context).approvals,
TranslationBase.of(context).insurance, PATIENT_INSURANCE_APPROVALS_NEW, 'patient/vital_signs.png',
TranslationBase.of(context).approvals,
PATIENT_INSURANCE_APPROVALS_NEW,
'patient/vital_signs.png',
isInPatient: isInpatient), isInPatient: isInpatient),
PatientProfileCardModel( PatientProfileCardModel(TranslationBase.of(context).discharge, TranslationBase.of(context).report, null,
TranslationBase.of(context).discharge,
TranslationBase.of(context).report,
null,
'patient/patient_sick_leave.png', 'patient/patient_sick_leave.png',
isInPatient: isInpatient, isInPatient: isInpatient, isDisable: true),
isDisable: true),
PatientProfileCardModel( PatientProfileCardModel(
TranslationBase.of(context).patientSick, TranslationBase.of(context).patientSick,
TranslationBase.of(context).leave, TranslationBase.of(context).leave,

@ -39,7 +39,7 @@ class ProfileGridForOther extends StatelessWidget {
PatientProfileCardModel( PatientProfileCardModel(
TranslationBase.of(context).lab, TranslationBase.of(context).result, LAB_RESULT, 'patient/lab_results.png', TranslationBase.of(context).lab, TranslationBase.of(context).result, LAB_RESULT, 'patient/lab_results.png',
isInPatient: isInpatient), isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).lab, TranslationBase.of(context).specialResult, PatientProfileCardModel(TranslationBase.of(context).lab, TranslationBase.of(context).special,
ALL_SPECIAL_LAB_RESULT, 'patient/lab_results.png', ALL_SPECIAL_LAB_RESULT, 'patient/lab_results.png',
isInPatient: isInpatient), isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).radiology, TranslationBase.of(context).service, PatientProfileCardModel(TranslationBase.of(context).radiology, TranslationBase.of(context).service,

@ -29,7 +29,7 @@ class ProfileGridForSearch extends StatelessWidget {
PatientProfileCardModel( PatientProfileCardModel(
TranslationBase.of(context).lab, TranslationBase.of(context).result, LAB_RESULT, 'patient/lab_results.png', TranslationBase.of(context).lab, TranslationBase.of(context).result, LAB_RESULT, 'patient/lab_results.png',
isInPatient: isInpatient), isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).lab, TranslationBase.of(context).specialResult, PatientProfileCardModel(TranslationBase.of(context).lab, TranslationBase.of(context).special,
ALL_SPECIAL_LAB_RESULT, 'patient/lab_results.png', ALL_SPECIAL_LAB_RESULT, 'patient/lab_results.png',
isInPatient: isInpatient), isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).radiology, TranslationBase.of(context).service, PatientProfileCardModel(TranslationBase.of(context).radiology, TranslationBase.of(context).service,

@ -6,3 +6,17 @@ extension Extension on Object {
bool isNullEmptyZeroOrFalse() => bool isNullEmptyZeroOrFalse() =>
this == null || this == '' || !this || this == 0; this == null || this == '' || !this || this == 0;
} }
/// truncate the [String] without cutting words. The length is calculated with the suffix.
extension Truncate on String {
String truncate(int max, {String suffix = ''}) {
try {
return length <= max
? this
: '${substring(0, max - suffix.length)}$suffix';
} catch (e){
return this;
}
}
}

@ -10,6 +10,7 @@ import 'package:doctor_app_flutter/widgets/shared/user-guid/CusomRow.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:cached_network_image/cached_network_image.dart'; import 'package:cached_network_image/cached_network_image.dart';
import '../../../util/extenstions.dart';
import 'ShowTimer.dart'; import 'ShowTimer.dart';
@ -37,6 +38,15 @@ class PatientCard extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
String nationalityName = patientInfo.nationalityName != null
? patientInfo.nationalityName.trim()
: patientInfo.nationality != null
? patientInfo.nationality.trim()
: patientInfo.nationalityId !=
null
? patientInfo.nationalityId
: "";
return Container( return Container(
width: SizeConfig.screenWidth * 0.9, width: SizeConfig.screenWidth * 0.9,
margin: EdgeInsets.all(6), margin: EdgeInsets.all(6),
@ -82,7 +92,8 @@ class PatientCard extends StatelessWidget {
? Row( ? Row(
children: [ children: [
AppText( AppText(
TranslationBase.of(context).arrivedP, TranslationBase.of(context)
.arrivedP,
color: Colors.green, color: Colors.green,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontFamily: 'Poppins', fontFamily: 'Poppins',
@ -102,8 +113,12 @@ class PatientCard extends StatelessWidget {
width: 8, width: 8,
), ),
AppText( AppText(
patientInfo.status == 2 ? 'Confirmed' : 'Booked', patientInfo.status == 2
color: patientInfo.status == 2 ? Colors.green : Colors.grey, ? 'Confirmed'
: 'Booked',
color: patientInfo.status == 2
? Colors.green
: Colors.grey,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: 10, fontSize: 10,
@ -114,7 +129,8 @@ class PatientCard extends StatelessWidget {
? Row( ? Row(
children: [ children: [
AppText( AppText(
TranslationBase.of(context).notArrived, TranslationBase.of(context)
.notArrived,
color: Colors.red[800], color: Colors.red[800],
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontFamily: 'Poppins', fontFamily: 'Poppins',
@ -134,19 +150,27 @@ class PatientCard extends StatelessWidget {
width: 8, width: 8,
), ),
AppText( AppText(
patientInfo.status == 2 ? 'Confirmed' : 'Booked', patientInfo.status == 2
color: patientInfo.status == 2 ? Colors.green : Colors.grey, ? 'Confirmed'
: 'Booked',
color: patientInfo.status == 2
? Colors.green
: Colors.grey,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: 10, fontSize: 10,
), ),
], ],
) )
: !isFromSearch && !isFromLiveCare && patientInfo.patientStatusType == null : !isFromSearch &&
!isFromLiveCare &&
patientInfo.patientStatusType ==
null
? Row( ? Row(
children: [ children: [
AppText( AppText(
TranslationBase.of(context).notArrived, TranslationBase.of(context)
.notArrived,
color: Colors.red[800], color: Colors.red[800],
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontFamily: 'Poppins', fontFamily: 'Poppins',
@ -166,8 +190,13 @@ class PatientCard extends StatelessWidget {
width: 8, width: 8,
), ),
AppText( AppText(
patientInfo.status == 2 ? 'Booked' : 'Confirmed', patientInfo.status == 2
color: patientInfo.status == 2 ? Colors.grey : Colors.green, ? 'Booked'
: 'Confirmed',
color:
patientInfo.status == 2
? Colors.grey
: Colors.green,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: 12, fontSize: 12,
@ -177,13 +206,17 @@ class PatientCard extends StatelessWidget {
: SizedBox(), : SizedBox(),
this.arrivalType == '1' this.arrivalType == '1'
? AppText( ? AppText(
patientInfo.startTime != null ? patientInfo.startTime : patientInfo.startTimes, patientInfo.startTime != null
? patientInfo.startTime
: patientInfo.startTimes,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
) )
: patientInfo.arrivedOn != null : patientInfo.arrivedOn != null
? AppText( ? AppText(
AppDateUtils.getDayMonthYearDate(AppDateUtils.convertStringToDate( AppDateUtils.getDayMonthYearDate(
AppDateUtils
.convertStringToDate(
patientInfo.arrivedOn, patientInfo.arrivedOn,
)) + )) +
" " + " " +
@ -192,8 +225,10 @@ class PatientCard extends StatelessWidget {
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
fontSize: 15, fontSize: 15,
) )
: (patientInfo.appointmentDate != null && : (patientInfo.appointmentDate !=
patientInfo.appointmentDate.isNotEmpty) null &&
patientInfo
.appointmentDate.isNotEmpty)
? AppText( ? AppText(
"${AppDateUtils.getDayMonthYearDate(AppDateUtils.convertStringToDate( "${AppDateUtils.getDayMonthYearDate(AppDateUtils.convertStringToDate(
patientInfo.appointmentDate, patientInfo.appointmentDate,
@ -224,71 +259,89 @@ class PatientCard extends StatelessWidget {
Padding( Padding(
padding: EdgeInsets.only(left: 12.0), padding: EdgeInsets.only(left: 12.0),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Expanded( Expanded(
child: Row(children: [ flex: 2,
Expanded( child: Row(
// width: MediaQuery.of(context).size.width*0.51, crossAxisAlignment: CrossAxisAlignment.start,
child: AppText( mainAxisAlignment:
isFromLiveCare MainAxisAlignment.start,
? Helpers.capitalize(patientInfo.fullName) children: [
: (Helpers.capitalize(patientInfo.firstName) + Expanded(
" " + // width: MediaQuery.of(context).size.width*0.51,
Helpers.capitalize(patientInfo.lastName)), child: AppText(
fontSize: 16, isFromLiveCare
color: Color(0xff2e303a), ? Helpers.capitalize(
fontWeight: FontWeight.w700, patientInfo.fullName)
fontFamily: 'Poppins', : (Helpers.capitalize(
textOverflow: TextOverflow.ellipsis, patientInfo.firstName) +
), " " +
), Helpers.capitalize(
if (patientInfo.gender == 1) patientInfo.lastName)),
Icon( fontSize: 16,
DoctorApp.male_2, color: Color(0xff2e303a),
color: Colors.blue, fontWeight: FontWeight.w700,
) fontFamily: 'Poppins',
else textOverflow: TextOverflow.ellipsis,
Icon( ),
DoctorApp.female_1, ),
color: Colors.pink, if (patientInfo.gender == 1)
), Icon(
if (isFromLiveCare) DoctorApp.male_2,
ShowTimer( color: Colors.blue,
patientInfo: patientInfo, )
), else
]), Icon(
DoctorApp.female_1,
color: Colors.pink,
),
if (isFromLiveCare)
ShowTimer(
patientInfo: patientInfo,
),
]),
), ),
Row( Expanded(
children: [ child: Row(
AppText( mainAxisAlignment: MainAxisAlignment.end,
patientInfo.nationalityName != null crossAxisAlignment: CrossAxisAlignment.start,
? patientInfo.nationalityName.trim() children: [
: patientInfo.nationality != null Expanded(
? patientInfo.nationality.trim() child: Container(
: patientInfo.nationalityId != null alignment: Alignment.centerRight,
? patientInfo.nationalityId child: AppText(
: "", nationalityName.truncate(14),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 14, fontSize: 14,
textOverflow: TextOverflow.ellipsis, textOverflow: TextOverflow.ellipsis,
), ),
patientInfo.nationality != null || patientInfo.nationalityId != null ),
? ClipRRect( ),
borderRadius: BorderRadius.circular(20.0), patientInfo.nationality != null ||
child: CachedNetworkImage( patientInfo.nationalityId != null
imageUrl: patientInfo.nationalityFlagURL != null ? ClipRRect(
? patientInfo.nationalityFlagURL borderRadius:
: '', BorderRadius.circular(20.0),
height: 25, child: CachedNetworkImage(
width: 30, imageUrl: patientInfo
errorWidget: (context, url, error) => AppText( .nationalityFlagURL !=
'No Image', null
fontSize: 10, ? patientInfo.nationalityFlagURL
), : '',
)) height: 25,
: SizedBox() width: 30,
], errorWidget:
(context, url, error) =>
AppText(
'No Image',
fontSize: 10,
),
))
: SizedBox()
],
),
) )
], ],
)), )),
@ -332,12 +385,13 @@ class PatientCard extends StatelessWidget {
value: value:
"${AppDateUtils.getAgeByBirthday(patientInfo.dateofBirth, context, isServerFormat: !isFromLiveCare)}", "${AppDateUtils.getAgeByBirthday(patientInfo.dateofBirth, context, isServerFormat: !isFromLiveCare)}",
), ),
if (isInpatient) if (isInpatient)
CustomRow( CustomRow(
label: patientInfo.admissionDate == null label: patientInfo.admissionDate == null
? "" ? ""
: TranslationBase.of(context).admissionDate + " : ", : TranslationBase.of(context)
.admissionDate +
" : ",
value: patientInfo.admissionDate == null value: patientInfo.admissionDate == null
? "" ? ""
: "${AppDateUtils.convertDateFromServerFormat(patientInfo.admissionDate.toString(), 'yyyy-MM-dd')}", : "${AppDateUtils.convertDateFromServerFormat(patientInfo.admissionDate.toString(), 'yyyy-MM-dd')}",
@ -352,9 +406,9 @@ class PatientCard extends StatelessWidget {
), ),
if (patientInfo.admissionDate != null) if (patientInfo.admissionDate != null)
CustomRow( CustomRow(
label: label: TranslationBase.of(context)
TranslationBase.of(context).clinicName + .clinicName +
" : ", " : ",
value: "${patientInfo.clinicDescription}", value: "${patientInfo.clinicDescription}",
), ),
if (patientInfo.admissionDate != null) if (patientInfo.admissionDate != null)
@ -399,29 +453,36 @@ class PatientCard extends StatelessWidget {
], ],
) )
: !isInpatient && !isFromSearch : !isInpatient && !isFromSearch
? Row(mainAxisAlignment: MainAxisAlignment.end, children: [ ? Row(
Container( mainAxisAlignment: MainAxisAlignment.end,
padding: EdgeInsets.all(4), children: [
child: Image.asset(
patientInfo.appointmentType == 'Regular' && patientInfo.visitTypeId == 100
? 'assets/images/livecare.png'
: patientInfo.appointmentType == 'Walkin'
? 'assets/images/walkin.png'
: 'assets/images/booked.png',
height: 25,
width: 35,
)),
])
: (isInpatient == true)
? Row(mainAxisAlignment: MainAxisAlignment.end, children: [
Container( Container(
padding: EdgeInsets.all(4), padding: EdgeInsets.all(4),
child: Image.asset( child: Image.asset(
'assets/images/inpatient.png', patientInfo.appointmentType ==
'Regular' &&
patientInfo.visitTypeId == 100
? 'assets/images/livecare.png'
: patientInfo.appointmentType ==
'Walkin'
? 'assets/images/walkin.png'
: 'assets/images/booked.png',
height: 25, height: 25,
width: 35, width: 35,
)), )),
]) ])
: (isInpatient == true)
? Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Container(
padding: EdgeInsets.all(4),
child: Image.asset(
'assets/images/inpatient.png',
height: 25,
width: 35,
)),
])
: SizedBox() : SizedBox()
], ],
), ),

@ -53,7 +53,7 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
), ),
height: height == 0 height: height == 0
? isInpatient ? isInpatient
? 215 ? 220
: 200 : 200
: height, : height,
child: Container( child: Container(
@ -245,37 +245,46 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
), ),
), ),
Row( Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
HeaderRow( HeaderRow(
label: TranslationBase.of(context).fileNumber, label: TranslationBase.of(context).fileNumber,
value: patient.patientId.toString(), value: patient.patientId.toString(),
), ),
Row( Expanded(
children: [ child: Row(
AppText( crossAxisAlignment: CrossAxisAlignment.start,
patient.nationalityName ?? children: [
patient.nationality ?? Expanded(
patient.nationalityId ?? child: Container(
'', alignment: Alignment.centerRight,
fontWeight: FontWeight.bold, child: AppText(
fontSize: 12, patient.nationalityName ??
), patient.nationality ??
patient.nationalityFlagURL != null patient.nationalityId ??
? ClipRRect( '',
borderRadius: BorderRadius.circular(20.0), fontWeight: FontWeight.bold,
child: Image.network( fontSize: 12,
patient.nationalityFlagURL, ),
height: 25, ),
width: 30, ),
errorBuilder: (BuildContext context, patient.nationalityFlagURL != null
Object exception, ? ClipRRect(
StackTrace stackTrace) { borderRadius: BorderRadius.circular(20.0),
return Text('No Image'); child: Image.network(
}, patient.nationalityFlagURL,
)) height: 25,
: SizedBox() width: 30,
], errorBuilder: (BuildContext context,
Object exception,
StackTrace stackTrace) {
return Text('');
},
))
: SizedBox()
],
),
) )
], ],
), ),

@ -67,7 +67,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
arrivalType: arrivalType, arrivalType: arrivalType,
route: ALL_SPECIAL_LAB_RESULT, route: ALL_SPECIAL_LAB_RESULT,
nameLine1: TranslationBase.of(context).lab, nameLine1: TranslationBase.of(context).lab,
nameLine2: 'Special Result', nameLine2: TranslationBase.of(context).special,
icon: 'patient/lab_results.png'), icon: 'patient/lab_results.png'),
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6) // if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton( PatientProfileButton(

@ -141,13 +141,6 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "7.1.0" version: "7.1.0"
cached_network_image:
dependency: "direct main"
description:
name: cached_network_image
url: "https://pub.dartlang.org"
source: hosted
version: "2.5.1"
characters: characters:
dependency: transitive dependency: transitive
description: description:
@ -440,20 +433,6 @@ packages:
description: flutter description: flutter
source: sdk source: sdk
version: "0.0.0" version: "0.0.0"
flutter_blurhash:
dependency: transitive
description:
name: flutter_blurhash
url: "https://pub.dartlang.org"
source: hosted
version: "0.5.0"
flutter_cache_manager:
dependency: transitive
description:
name: flutter_cache_manager
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.2"
flutter_device_type: flutter_device_type:
dependency: "direct main" dependency: "direct main"
description: description:
@ -616,13 +595,6 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.1.4" version: "3.1.4"
image:
dependency: transitive
description:
name: image
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.19"
imei_plugin: imei_plugin:
dependency: "direct main" dependency: "direct main"
description: description:
@ -692,7 +664,7 @@ packages:
name: meta name: meta
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.0-nullsafety.3" version: "1.3.0-nullsafety.4"
mime: mime:
dependency: transitive dependency: transitive
description: description:
@ -721,13 +693,6 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.2.0" version: "1.2.0"
octo_image:
dependency: transitive
description:
name: octo_image
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.0"
open_iconic_flutter: open_iconic_flutter:
dependency: transitive dependency: transitive
description: description:
@ -763,13 +728,6 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.1.4" version: "0.1.4"
path_provider:
dependency: transitive
description:
name: path_provider
url: "https://pub.dartlang.org"
source: hosted
version: "1.6.28"
path_provider_linux: path_provider_linux:
dependency: transitive dependency: transitive
description: description:
@ -777,13 +735,6 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.0.1+2" version: "0.0.1+2"
path_provider_macos:
dependency: transitive
description:
name: path_provider_macos
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.4+8"
path_provider_platform_interface: path_provider_platform_interface:
dependency: transitive dependency: transitive
description: description:
@ -903,13 +854,6 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.5" version: "2.1.5"
rxdart:
dependency: transitive
description:
name: rxdart
url: "https://pub.dartlang.org"
source: hosted
version: "0.25.0"
scratch_space: scratch_space:
dependency: transitive dependency: transitive
description: description:
@ -1006,27 +950,13 @@ packages:
relative: true relative: true
source: path source: path
version: "0.0.0" version: "0.0.0"
sqflite:
dependency: transitive
description:
name: sqflite
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.2+4"
sqflite_common:
dependency: transitive
description:
name: sqflite_common
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.3+3"
stack_trace: stack_trace:
dependency: transitive dependency: transitive
description: description:
name: stack_trace name: stack_trace
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.10.0-nullsafety.1" version: "1.10.0-nullsafety.2"
sticky_headers: sticky_headers:
dependency: "direct main" dependency: "direct main"
description: description:
@ -1055,13 +985,6 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.1.0-nullsafety.1" version: "1.1.0-nullsafety.1"
synchronized:
dependency: transitive
description:
name: synchronized
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.0+2"
term_glyph: term_glyph:
dependency: transitive dependency: transitive
description: description:
@ -1231,5 +1154,5 @@ packages:
source: hosted source: hosted
version: "2.2.1" version: "2.2.1"
sdks: sdks:
dart: ">=2.10.2 <2.11.0" dart: ">=2.10.0 <=2.11.0-213.1.beta"
flutter: ">=1.22.2 <2.0.0" flutter: ">=1.22.0 <2.0.0"

Loading…
Cancel
Save