|
|
|
|
@ -100,187 +100,194 @@ 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"),
|
|
|
|
|
),
|
|
|
|
|
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(
|
|
|
|
|
// color: Colors.grey[200],
|
|
|
|
|
child: ListView(
|
|
|
|
|
scrollDirection: Axis.vertical,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
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),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
child: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10.0,
|
|
|
|
|
),
|
|
|
|
|
)),
|
|
|
|
|
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),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
|