merge-requests/487/head
Sultan Khan 5 years ago
parent 0080b66c8e
commit 9c54f85782

@ -79,8 +79,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
PatientID: 0, PatientID: 0,
From: DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd') From: DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd')
.toString(), .toString(),
To: DateUtils.convertDateToFormat( To: DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd')
DateTime.now().add(Duration(days: 7, hours: 0)), 'yyyy-MM-dd')
.toString(), .toString(),
LanguageID: 2, LanguageID: 2,
stamp: "2020-03-02T13:56:39.170Z", stamp: "2020-03-02T13:56:39.170Z",

@ -83,7 +83,26 @@ class _PatientsScreenState extends State<PatientsScreen> {
final _controller = TextEditingController(); final _controller = TextEditingController();
PatientModel patient; PatientModel patient;
var _patientSearchFormValues = PatientModel(
FirstName: "0",
MiddleName: "0",
LastName: "0",
PatientMobileNumber: "0",
PatientIdentificationID: "0",
PatientID: 0,
From: DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd')
.toString(),
To: DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd')
.toString(),
LanguageID: 2,
stamp: "2020-03-02T13:56:39.170Z",
IPAdress: "11.11.11.11",
VersionID: 1.2,
Channel: 9,
TokenID: "2Fi7HoIHB0eDyekVa6tCJg==",
SessionID: "5G0yXn0Jnq",
IsLoginForDoctorApp: true,
PatientOutSA: false);
searchData(String str) { searchData(String str) {
this.responseModelList = this.responseModelList2; this.responseModelList = this.responseModelList2;
var strExist = str.length > 0 ? true : false; var strExist = str.length > 0 ? true : false;
@ -252,6 +271,9 @@ class _PatientsScreenState extends State<PatientsScreen> {
isView = routeArgs['isView']; isView = routeArgs['isView'];
patient.Searchtype = 1; patient.Searchtype = 1;
} }
if (routeArgs != null && routeArgs.containsKey('activeFilter')) {
_activeLocation = routeArgs['activeFilter'];
}
if (!projectsProvider.isArabic) if (!projectsProvider.isArabic)
patientTypeTitle = SERVICES_PATIANT_HEADER[int.parse(patientType)]; patientTypeTitle = SERVICES_PATIANT_HEADER[int.parse(patientType)];
@ -752,11 +774,12 @@ class _PatientsScreenState extends State<PatientsScreen> {
)), )),
), ),
onTap: () { onTap: () {
filterBooking(item.toString()); //filterBooking(item.toString());
setState(() { setState(() {
_activeLocation = _locations.indexOf(item); _activeLocation = _locations.indexOf(item);
}); });
filterPatient(item.toString());
}), }),
_isActive _isActive
? Container( ? Container(
@ -775,4 +798,25 @@ class _PatientsScreenState extends State<PatientsScreen> {
), ),
); );
} }
filterPatient(item) {
if (item == 'Tomorrow') {
_patientSearchFormValues.To = DateUtils.convertDateToFormat(
DateTime(DateTime.now().year, DateTime.now().month,
DateTime.now().day + 1),
'yyyy-MM-dd');
} else if (item == 'Next Week') {
_patientSearchFormValues.To = DateUtils.convertDateToFormat(
DateTime(DateTime.now().year, DateTime.now().month,
DateTime.now().day + 6),
'yyyy-MM-dd');
}
Navigator.of(context).pop();
Navigator.of(context).pushNamed(PATIENTS, arguments: {
"patientSearchForm": _patientSearchFormValues,
"selectedType": "7",
"arrivalType": "1",
"activeFilter": _activeLocation
});
}
} }

Loading…
Cancel
Save