|
|
|
|
@ -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';
|
|
|
|
|
@ -208,85 +208,46 @@ class _PatientsScreenNewState extends State<PatientsScreenNew> {
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Container(
|
|
|
|
|
// color: Colors.grey[200],
|
|
|
|
|
child: ListView(
|
|
|
|
|
scrollDirection: Axis.vertical,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Container(
|
|
|
|
|
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),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
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,
|
|
|
|
|
),
|
|
|
|
|
)),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
})),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
),
|
|
|
|
|
|