diff --git a/lib/core/service/patient_service.dart b/lib/core/service/patient_service.dart index 6caaf0fc..3c11898d 100644 --- a/lib/core/service/patient_service.dart +++ b/lib/core/service/patient_service.dart @@ -293,14 +293,13 @@ class PatientService extends BaseService { ); } - Future updatePatientProgressNote(UpdateNoteReqModel req) async { hasError = false; await baseAppClient.post( UPDATE_PROGRESS_NOTE_FOR_INPATIENT, onSuccess: (dynamic response, int statusCode) { - print("ok"); + print("ok"); }, onFailure: (String error, int statusCode) { hasError = true; @@ -316,7 +315,7 @@ class PatientService extends BaseService { await baseAppClient.post( CREATE_PROGRESS_NOTE_FOR_INPATIENT, onSuccess: (dynamic response, int statusCode) { - print("ok"); + print("ok"); }, onFailure: (String error, int statusCode) { hasError = true; diff --git a/lib/screens/home/home_screen.dart b/lib/screens/home/home_screen.dart index c1d384dc..346ad3c2 100644 --- a/lib/screens/home/home_screen.dart +++ b/lib/screens/home/home_screen.dart @@ -499,7 +499,8 @@ class _HomeScreenState extends State { "patientSearchForm": _patientSearchFormValues, "selectedType": "1", - "arrivalType": "1" + "arrivalType": "1", + "isInpatient": true }); }, ), @@ -538,7 +539,7 @@ class _HomeScreenState extends State { .pushNamed(PATIENTS, arguments: { "patientSearchForm": _patientSearchFormValues, - "selectedType": "7", + "selectedType": "0", "arrivalType": "1" }); }, diff --git a/lib/screens/patients/patient_search_screen.dart b/lib/screens/patients/patient_search_screen.dart index 04cd8c41..17d44839 100644 --- a/lib/screens/patients/patient_search_screen.dart +++ b/lib/screens/patients/patient_search_screen.dart @@ -93,7 +93,7 @@ class _PatientSearchScreenState extends State { }); Navigator.of(context).pushNamed(PATIENTS, arguments: { "patientSearchForm": _patientSearchFormValues, - "selectedType": isView == false ? '0' : _selectedType, + "selectedType": _selectedType, "isSearch": true, "isView": isView }); diff --git a/lib/screens/patients/patients_screen.dart b/lib/screens/patients/patients_screen.dart index 9c06ee1b..30cc7dcf 100644 --- a/lib/screens/patients/patients_screen.dart +++ b/lib/screens/patients/patients_screen.dart @@ -68,7 +68,7 @@ class _PatientsScreenState extends State { List _locations = []; //['All', 'Today', 'Tomorrow', 'Next Week']; int _activeLocation = 0; - + bool isInpatient = false; bool _isInit = true; String patientType; bool isSearch = false; @@ -274,6 +274,9 @@ class _PatientsScreenState extends State { if (routeArgs != null && routeArgs.containsKey('activeFilter')) { _activeLocation = routeArgs['activeFilter']; } + if (routeArgs != null && routeArgs.containsKey('isInpatient')) { + isInpatient = routeArgs['isInpatient']; + } if (!projectsProvider.isArabic) patientTypeTitle = SERVICES_PATIANT_HEADER[int.parse(patientType)]; @@ -623,6 +626,8 @@ class _PatientsScreenState extends State { patientType, arrivalType: arrivalType, + isInpatient: + isInpatient, onTap: () { Navigator.of(context) .pushNamed( diff --git a/lib/widgets/patients/PatientCard.dart b/lib/widgets/patients/PatientCard.dart index 586cfb79..579655bc 100644 --- a/lib/widgets/patients/PatientCard.dart +++ b/lib/widgets/patients/PatientCard.dart @@ -17,12 +17,14 @@ class PatientCard extends StatelessWidget { final Function onTap; final String patientType; final String arrivalType; + final bool isInpatient; const PatientCard( {Key key, this.patientInfo, this.onTap, this.patientType, - this.arrivalType}) + this.arrivalType, + this.isInpatient}) : super(key: key); @override Widget build(BuildContext context) { @@ -239,8 +241,7 @@ class PatientCard extends StatelessWidget { ), ), ), - if (SERVICES_PATIANT2[int.parse(patientType)] == - "List_MyInPatient") + if (isInpatient == true) Container( child: RichText( text: new TextSpan( @@ -375,8 +376,7 @@ class PatientCard extends StatelessWidget { width: 35, )), ]) - : (SERVICES_PATIANT2[int.parse(patientType)] == - "List_MyInPatient") + : (isInpatient == true) ? Row( mainAxisAlignment: MainAxisAlignment.end, children: [