fix in note and AddReplayOnReferralPatient

merge-requests/643/head
Mohammad Aljammal 5 years ago
parent c350463bd1
commit bf86fcc168

@ -322,4 +322,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: 649616dc336b3659ac6b2b25159d8e488e042b69 PODFILE CHECKSUM: 649616dc336b3659ac6b2b25159d8e488e042b69
COCOAPODS: 1.10.0.rc.1 COCOAPODS: 1.10.1

@ -88,7 +88,6 @@ class BaseAppClient {
onFailure(Helpers.generateContactAdminMsg(), statusCode); onFailure(Helpers.generateContactAdminMsg(), statusCode);
} else { } else {
var parsed = json.decode(response.body.toString()); var parsed = json.decode(response.body.toString());
if (parsed['ErrorType'] == 4) { if (parsed['ErrorType'] == 4) {
helpers.navigateToUpdatePage(parsed['ErrorEndUserMessage'], helpers.navigateToUpdatePage(parsed['ErrorEndUserMessage'],
parsed['AndroidLink'], parsed['IOSLink']); parsed['AndroidLink'], parsed['IOSLink']);
@ -99,7 +98,7 @@ class BaseAppClient {
onFailure(getError(parsed), statusCode); onFailure(getError(parsed), statusCode);
} else if (!isAllowAny) { } else if (!isAllowAny) {
await Helpers.logout(); await Helpers.logout();
Helpers.showErrorToast('Your session expired Please login agian'); Helpers.showErrorToast('Your session expired Please login again');
} }
if (isAllowAny) { if (isAllowAny) {
onFailure(getError(parsed), statusCode); onFailure(getError(parsed), statusCode);

@ -47,7 +47,7 @@ const Map<String, Map<String, String>> localizedValues = {
'radiology': {'en': 'Radiology', 'ar': 'الأشعة'}, 'radiology': {'en': 'Radiology', 'ar': 'الأشعة'},
'service': {'en': 'Service', 'ar': 'خدمة'}, 'service': {'en': 'Service', 'ar': 'خدمة'},
'referral': {'en': 'Referral', 'ar': 'الإحالة'}, 'referral': {'en': 'Referral', 'ar': 'الإحالة'},
'inPatient': {'en': 'My InPatients', 'ar': 'مرضاي'}, 'inPatient': {'en': 'My\n InPatients', 'ar': 'مرضاي'},
'inPatientLabel': {'en': 'InPatients', 'ar': 'المريض الداخلي'}, 'inPatientLabel': {'en': 'InPatients', 'ar': 'المريض الداخلي'},
'inPatientAll': {'en': 'All InPatients', 'ar': 'كل المرضى'}, 'inPatientAll': {'en': 'All InPatients', 'ar': 'كل المرضى'},
'operations': {'en': 'Operations', 'ar': 'عمليات'}, 'operations': {'en': 'Operations', 'ar': 'عمليات'},

@ -44,7 +44,7 @@ class DischargedPatientService extends BaseService {
Future gtMyDischargeReferralPatient() async { Future gtMyDischargeReferralPatient() async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
await getDoctorProfile(); await getDoctorProfile(isGetProfile: true);
body['DoctorID'] = doctorProfile.doctorID; body['DoctorID'] = doctorProfile.doctorID;
body['FirstName'] = "0"; body['FirstName'] = "0";
body['MiddleName'] = "0"; body['MiddleName'] = "0";

@ -24,7 +24,7 @@ class HomePageCard extends StatelessWidget {
return InkWell( return InkWell(
onTap: onTap, onTap: onTap,
child: Container( child: Container(
width: 100, width: 120,
height: MediaQuery.of(context).orientation == Orientation.portrait height: MediaQuery.of(context).orientation == Orientation.portrait
? 130 ? 130
: 250, : 250,

@ -173,13 +173,12 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
), ),
), ),
bottomSheet: Container( bottomSheet: Container(
height: progressNoteController.text.isNotEmpty? 130:70,
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5), margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5),
child: Wrap( child: Column(
alignment: WrapAlignment.center,
children: <Widget>[ children: <Widget>[
progressNoteController.text.isEmpty if(progressNoteController.text.isNotEmpty)
? SizedBox() Container(
: Container(
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
child: AppButton( child: AppButton(
title: TranslationBase.of(context).clearText, title: TranslationBase.of(context).clearText,

@ -22,7 +22,7 @@ import 'package:speech_to_text/speech_to_text.dart' as stt;
class AddReplayOnReferralPatient extends StatefulWidget { class AddReplayOnReferralPatient extends StatefulWidget {
final PatientReferralViewModel patientReferralViewModel; final PatientReferralViewModel patientReferralViewModel;
final MyReferralPatientModel myReferralInPatientModel; final MyReferralPatientModel myReferralInPatientModel;
//TODO Jammal
const AddReplayOnReferralPatient( const AddReplayOnReferralPatient(
{Key key, this.patientReferralViewModel, this.myReferralInPatientModel}) {Key key, this.patientReferralViewModel, this.myReferralInPatientModel})
: super(key: key); : super(key: key);
@ -38,7 +38,7 @@ class _AddReplayOnReferralPatientState
stt.SpeechToText speech = stt.SpeechToText(); stt.SpeechToText speech = stt.SpeechToText();
var reconizedWord; var reconizedWord;
var event = RobotProvider(); var event = RobotProvider();
TextEditingController progressNoteController = TextEditingController(); TextEditingController replayOnReferralController = TextEditingController();
@override @override
void initState() { void initState() {
requestPermissions(); requestPermissions();
@ -71,12 +71,12 @@ class _AddReplayOnReferralPatientState
children: [ children: [
AppTextFieldCustom( AppTextFieldCustom(
hintText: 'Replay your responses here', hintText: 'Replay your responses here',
controller: progressNoteController, controller: replayOnReferralController,
maxLines: 35, maxLines: 35,
minLines: 25, minLines: 25,
hasBorder: true, hasBorder: true,
validationError: validationError:
progressNoteController.text.isEmpty && replayOnReferralController.text.isEmpty &&
isSubmitted isSubmitted
? TranslationBase.of(context).emptyMessage ? TranslationBase.of(context).emptyMessage
: null, : null,
@ -107,11 +107,11 @@ class _AddReplayOnReferralPatientState
), ),
), ),
bottomSheet: Container( bottomSheet: Container(
height: replayOnReferralController.text.isNotEmpty? 130:70,
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5), margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5),
child: Wrap( child: Column(
alignment: WrapAlignment.center,
children: <Widget>[ children: <Widget>[
progressNoteController.text.isEmpty replayOnReferralController.text.isEmpty
? SizedBox() ? SizedBox()
: Container( : Container(
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
@ -120,7 +120,7 @@ class _AddReplayOnReferralPatientState
title: TranslationBase.of(context).clearText, title: TranslationBase.of(context).clearText,
onPressed: () { onPressed: () {
setState(() { setState(() {
progressNoteController.text = ''; replayOnReferralController.text = '';
}); });
}, },
)), )),
@ -135,10 +135,10 @@ class _AddReplayOnReferralPatientState
setState(() { setState(() {
isSubmitted = true; isSubmitted = true;
}); });
if (progressNoteController.text.isNotEmpty) { if (replayOnReferralController.text.isNotEmpty) {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
await widget.patientReferralViewModel.replay( await widget.patientReferralViewModel.replay(
progressNoteController.text.trim(), replayOnReferralController.text.trim(),
widget.myReferralInPatientModel); widget.myReferralInPatientModel);
if (widget.patientReferralViewModel.state == if (widget.patientReferralViewModel.state ==
ViewState.ErrorLocal) { ViewState.ErrorLocal) {
@ -199,7 +199,7 @@ class _AddReplayOnReferralPatientState
if (result.finalResult == true) { if (result.finalResult == true) {
setState(() { setState(() {
SpeechToText.closeAlertDialog(context); SpeechToText.closeAlertDialog(context);
progressNoteController.text += reconizedWord + '\n'; replayOnReferralController.text += reconizedWord + '\n';
}); });
} }
} }

Loading…
Cancel
Save