fix Discharged Patient

merge-requests/590/head
Mohammad Aljammal 5 years ago
parent 57d22aca13
commit 55c63c9531

@ -39,7 +39,7 @@ class RadiologyService extends BaseService {
await baseAppClient.postPatient(url,
patient: patient,
onSuccess: (dynamic response, int statusCode) {
finalRadiologyList.clear();
finalRadiologyList = [];
String label = "ListRAD";
if(isInPatient) {
label ="List_GetRadOreders";

@ -13,15 +13,12 @@ class DischargedPatientViewModel extends BaseViewModel {
_dischargedPatientService.myDischargedPatients;
List<PatiantInformtion> get filterData => filterData2.isNotEmpty? filterData2:myDischargedPatient;
List<PatiantInformtion> filterData2 = [];
List<PatiantInformtion> filterData = [];
searchData(String str) {
var strExist = str.length > 0 ? true : false;
if (strExist) {
filterData2 = [];
filterData = [];
for (var i = 0; i < myDischargedPatient.length; i++) {
String firstName = myDischargedPatient[i].firstName.toUpperCase();
String lastName = myDischargedPatient[i].lastName.toUpperCase();
@ -32,12 +29,12 @@ class DischargedPatientViewModel extends BaseViewModel {
lastName.contains(str.toUpperCase()) ||
mobile.contains(str) ||
patientID.contains(str)) {
filterData2.add(myDischargedPatient[i]);
filterData.add(myDischargedPatient[i]);
}
}
notifyListeners();
} else {
filterData2 = myDischargedPatient;
filterData = myDischargedPatient;
notifyListeners();
}
}
@ -49,8 +46,9 @@ class DischargedPatientViewModel extends BaseViewModel {
if (_dischargedPatientService.hasError) {
error = _dischargedPatientService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
} else{
filterData = myDischargedPatient;
setState(ViewState.Idle);}
}
Future gtMyDischargeReferralPatient() async {

@ -30,7 +30,7 @@ class _DischargedPatientState extends State<DischargedPatient> {
backgroundColor: Colors.grey[200],
isShowAppBar: true,
baseViewModel: model,
body: model.filterData.isEmpty?Center(
body: model.myDischargedPatient.isEmpty?Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [

@ -168,6 +168,7 @@ class _LabsHomePageState extends State<LabsHomePage> {
clinic: labOrder.clinicDescription,
appointmentDate: labOrder.orderDate,
orderNo: labOrder.orderNo,
isShowTime: false,
);
}).toList(),
),

@ -19,6 +19,7 @@ class DoctorCard extends StatelessWidget {
final bool isPrescriptions;
final String clinic;
final bool isShowEye;
final bool isShowTime;
DoctorCard(
{this.doctorName,
@ -30,7 +31,7 @@ class DoctorCard extends StatelessWidget {
this.orderNo,
this.isPrescriptions = false,
this.clinic,
this.isShowEye = true});
this.isShowEye = true, this.isShowTime= true});
@override
Widget build(BuildContext context) {
@ -71,7 +72,7 @@ class DoctorCard extends StatelessWidget {
fontWeight: FontWeight.w600,
fontSize: 14,
),
if (!isPrescriptions)
if (!isPrescriptions&& isShowTime)
AppText(
'${DateUtils.getHour(appointmentDate)}',
fontWeight: FontWeight.w600,

Loading…
Cancel
Save