|
|
|
@ -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(
|
|
|
|
|