diff --git a/lib/screens/patients/patients_screen.dart b/lib/screens/patients/patients_screen.dart index a18aed2f..5cffe283 100644 --- a/lib/screens/patients/patients_screen.dart +++ b/lib/screens/patients/patients_screen.dart @@ -589,24 +589,23 @@ class _PatientsScreenState extends State { SizedBox( height: 10.0, ), - if (int.parse(patientType) == 7) - Container( - padding: EdgeInsets.all(5), - decoration: BoxDecoration( - color: Colors.white, - border: Border.all( - color: Colors.grey), - borderRadius: - BorderRadius.circular( - 10)), - child: ClinicList( - clinicId: clinicId, - onClinicChange: (newValue) { - clinicId = newValue; - changeClinic( - newValue, context, model); - }, - )), + // if (int.parse(patientType) == 7) + // Container( + // padding: EdgeInsets.all(5), + // decoration: BoxDecoration( + // color: Colors.white, + // border: Border.all( + // color: Colors.grey), + // borderRadius: + // BorderRadius.circular(10)), + // child: ClinicList( + // clinicId: clinicId, + // onClinicChange: (newValue) { + // clinicId = newValue; + // changeClinic( + // newValue, context, model); + // }, + // )), Padding( padding: EdgeInsets.only( top: MediaQuery.of(context) @@ -616,7 +615,7 @@ class _PatientsScreenState extends State { // child: _locationBar(context) child: SERVICES_PATIANT2[ int.parse(patientType)] == - "patientArrivalList" + "List_MyOutPatient" ? _locationBar(context, model) : Container(), ), @@ -657,7 +656,8 @@ class _PatientsScreenState extends State { isInpatient, "arrivalType": arrivalType, - "isInpatient":isInpatient + "isInpatient": + isInpatient }); }, ); @@ -903,13 +903,17 @@ class _PatientsScreenState extends State { GifLoaderDialogUtils.showMyDialog(context); int val2 = int.parse(patientType); GetPatientArrivalListRequestModel getPatientArrivalListRequestModel; - if (val2 == 7) { - getPatientArrivalListRequestModel = GetPatientArrivalListRequestModel( - from: _patientSearchFormValues.From, - to: _patientSearchFormValues.To, - pageIndex: 0, - pageSize: 0, - patientMRN: patient.getPatientID); + if (val2 == 0) { + patient = PatientModel( + From: _patientSearchFormValues.From, + To: _patientSearchFormValues.To, + FirstName: "0", + MiddleName: "0", + LastName: "0", + PatientMobileNumber: "0", + PatientIdentificationID: "0", + PatientID: 0, + ); } model diff --git a/lib/screens/patients/profile/note/update_note.dart b/lib/screens/patients/profile/note/update_note.dart index 9585e115..27549010 100644 --- a/lib/screens/patients/profile/note/update_note.dart +++ b/lib/screens/patients/profile/note/update_note.dart @@ -61,6 +61,13 @@ class _UpdateNoteOrderState extends State { @override void initState() { requestPermissions(); + event.controller.stream.listen((p) { + if (p['startPopUp'] == 'true') { + if (this.mounted) { + onVoiceText(); + } + } + }); super.initState(); } @@ -226,7 +233,11 @@ class _UpdateNoteOrderState extends State { } } - void errorListener(SpeechRecognitionError error) {} + void errorListener(SpeechRecognitionError error) { + event.setValue({"searchText": 'null'}); + //SpeechToText.closeAlertDialog(context); + print(error); + } void statusListener(String status) { reconizedWord = status == 'listening' ? 'Lisening...' : 'Sorry....'; @@ -247,6 +258,8 @@ class _UpdateNoteOrderState extends State { SpeechToText.closeAlertDialog(context); progressNoteController.text = reconizedWord; }); + } else { + print(result.finalResult); } } } diff --git a/lib/widgets/shared/speech-text-popup.dart b/lib/widgets/shared/speech-text-popup.dart index 41b64249..ac48c3fe 100644 --- a/lib/widgets/shared/speech-text-popup.dart +++ b/lib/widgets/shared/speech-text-popup.dart @@ -75,6 +75,10 @@ class _MyStatefulBuilderState extends State { setState(() { searchText = p['searchText']; }); + } else if (p['searchText'] == 'null') { + setState(() { + searchText = p['searchText']; + }); } }); super.initState();