|
|
|
@ -97,9 +97,13 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
BottomSheetTitle(
|
|
|
|
BottomSheetTitle(
|
|
|
|
title: widget.visitType == 3
|
|
|
|
title: widget.visitType == 3
|
|
|
|
? (widget.isUpdate ? TranslationBase.of(context).noteUpdate : TranslationBase.of(context).noteAdd) +
|
|
|
|
? (widget.isUpdate
|
|
|
|
|
|
|
|
? TranslationBase.of(context).noteUpdate
|
|
|
|
|
|
|
|
: TranslationBase.of(context).noteAdd) +
|
|
|
|
TranslationBase.of(context).orderSheet
|
|
|
|
TranslationBase.of(context).orderSheet
|
|
|
|
: (widget.isUpdate ? TranslationBase.of(context).noteUpdate : TranslationBase.of(context).noteAdd) +
|
|
|
|
: (widget.isUpdate
|
|
|
|
|
|
|
|
? TranslationBase.of(context).noteUpdate
|
|
|
|
|
|
|
|
: TranslationBase.of(context).noteAdd) +
|
|
|
|
TranslationBase.of(context).progressNote,
|
|
|
|
TranslationBase.of(context).progressNote,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(
|
|
|
|
SizedBox(
|
|
|
|
@ -114,9 +118,17 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
AppTextFieldCustom(
|
|
|
|
AppTextFieldCustom(
|
|
|
|
hintText: widget.visitType == 3
|
|
|
|
hintText: widget.visitType == 3
|
|
|
|
? (widget.isUpdate ? TranslationBase.of(context).noteUpdate : TranslationBase.of(context).noteAdd) +
|
|
|
|
? (widget.isUpdate
|
|
|
|
|
|
|
|
? TranslationBase.of(context)
|
|
|
|
|
|
|
|
.noteUpdate
|
|
|
|
|
|
|
|
: TranslationBase.of(context)
|
|
|
|
|
|
|
|
.noteAdd) +
|
|
|
|
TranslationBase.of(context).orderSheet
|
|
|
|
TranslationBase.of(context).orderSheet
|
|
|
|
: (widget.isUpdate ? TranslationBase.of(context).noteUpdate : TranslationBase.of(context).noteAdd) +
|
|
|
|
: (widget.isUpdate
|
|
|
|
|
|
|
|
? TranslationBase.of(context)
|
|
|
|
|
|
|
|
.noteUpdate
|
|
|
|
|
|
|
|
: TranslationBase.of(context)
|
|
|
|
|
|
|
|
.noteAdd) +
|
|
|
|
TranslationBase.of(context).progressNote,
|
|
|
|
TranslationBase.of(context).progressNote,
|
|
|
|
//TranslationBase.of(context).addProgressNote,
|
|
|
|
//TranslationBase.of(context).addProgressNote,
|
|
|
|
controller: progressNoteController,
|
|
|
|
controller: progressNoteController,
|
|
|
|
@ -132,19 +144,23 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
|
|
|
|
: null,
|
|
|
|
: null,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Positioned(
|
|
|
|
Positioned(
|
|
|
|
top: -2, //MediaQuery.of(context).size.height * 0,
|
|
|
|
top:
|
|
|
|
right: projectViewModel.isArabic? MediaQuery.of(context).size.width * 0.75 : 15,
|
|
|
|
-2, //MediaQuery.of(context).size.height * 0,
|
|
|
|
child: IconButton(
|
|
|
|
right: projectViewModel.isArabic
|
|
|
|
icon: Icon(
|
|
|
|
? MediaQuery.of(context).size.width * 0.75
|
|
|
|
DoctorApp.speechtotext,
|
|
|
|
: 15,
|
|
|
|
color: Colors.black,
|
|
|
|
child: Column(
|
|
|
|
),
|
|
|
|
children: [
|
|
|
|
|
|
|
|
IconButton(
|
|
|
|
|
|
|
|
icon: Icon(DoctorApp.speechtotext,
|
|
|
|
|
|
|
|
color: Colors.black, size: 35),
|
|
|
|
onPressed: () {
|
|
|
|
onPressed: () {
|
|
|
|
initSpeechState()
|
|
|
|
initSpeechState()
|
|
|
|
.then((value) => {onVoiceText()});
|
|
|
|
.then((value) => {onVoiceText()});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
|
|
|
|
))
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
@ -161,11 +177,30 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
|
|
|
|
child: Wrap(
|
|
|
|
child: Wrap(
|
|
|
|
alignment: WrapAlignment.center,
|
|
|
|
alignment: WrapAlignment.center,
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
AppButton(
|
|
|
|
progressNoteController.text.isEmpty
|
|
|
|
|
|
|
|
? SizedBox()
|
|
|
|
|
|
|
|
: Container(
|
|
|
|
|
|
|
|
margin: EdgeInsets.all(5),
|
|
|
|
|
|
|
|
child: AppButton(
|
|
|
|
|
|
|
|
title: TranslationBase.of(context).clearText,
|
|
|
|
|
|
|
|
onPressed: () {
|
|
|
|
|
|
|
|
setState(() {
|
|
|
|
|
|
|
|
progressNoteController.text = '';
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Container(
|
|
|
|
|
|
|
|
margin: EdgeInsets.all(5),
|
|
|
|
|
|
|
|
child: AppButton(
|
|
|
|
title: widget.visitType == 3
|
|
|
|
title: widget.visitType == 3
|
|
|
|
? (widget.isUpdate ? TranslationBase.of(context).noteUpdate : TranslationBase.of(context).noteAdd) +
|
|
|
|
? (widget.isUpdate
|
|
|
|
|
|
|
|
? TranslationBase.of(context).noteUpdate
|
|
|
|
|
|
|
|
: TranslationBase.of(context).noteAdd) +
|
|
|
|
TranslationBase.of(context).orderSheet
|
|
|
|
TranslationBase.of(context).orderSheet
|
|
|
|
: (widget.isUpdate ? TranslationBase.of(context).noteUpdate : TranslationBase.of(context).noteAdd) +
|
|
|
|
: (widget.isUpdate
|
|
|
|
|
|
|
|
? TranslationBase.of(context).noteUpdate
|
|
|
|
|
|
|
|
: TranslationBase.of(context).noteAdd) +
|
|
|
|
TranslationBase.of(context).progressNote,
|
|
|
|
TranslationBase.of(context).progressNote,
|
|
|
|
color: Color(0xff359846),
|
|
|
|
color: Color(0xff359846),
|
|
|
|
// disabled: progressNoteController.text.isEmpty,
|
|
|
|
// disabled: progressNoteController.text.isEmpty,
|
|
|
|
@ -196,7 +231,8 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
|
|
|
|
.updatePatientProgressNote(reqModel);
|
|
|
|
.updatePatientProgressNote(reqModel);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
CreateNoteModel reqModel = CreateNoteModel(
|
|
|
|
CreateNoteModel reqModel = CreateNoteModel(
|
|
|
|
admissionNo: int.parse(widget.patient.admissionNo),
|
|
|
|
admissionNo:
|
|
|
|
|
|
|
|
int.parse(widget.patient.admissionNo),
|
|
|
|
createdBy: doctorProfile.doctorID,
|
|
|
|
createdBy: doctorProfile.doctorID,
|
|
|
|
visitType: widget.visitType,
|
|
|
|
visitType: widget.visitType,
|
|
|
|
patientID: widget.patient.patientId,
|
|
|
|
patientID: widget.patient.patientId,
|
|
|
|
@ -221,8 +257,8 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
|
|
|
|
projectID: widget.patient.projectId,
|
|
|
|
projectID: widget.patient.projectId,
|
|
|
|
patientTypeID: widget.patient.patientType,
|
|
|
|
patientTypeID: widget.patient.patientType,
|
|
|
|
languageID: 2);
|
|
|
|
languageID: 2);
|
|
|
|
await widget.patientModel
|
|
|
|
await widget.patientModel.getPatientProgressNote(
|
|
|
|
.getPatientProgressNote(progressNoteRequest.toJson());
|
|
|
|
progressNoteRequest.toJson());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
DrAppToastMsg.showSuccesToast(
|
|
|
|
DrAppToastMsg.showSuccesToast(
|
|
|
|
@ -231,7 +267,7 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
Helpers.showErrorToast("You cant add only spaces");
|
|
|
|
Helpers.showErrorToast("You cant add only spaces");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}),
|
|
|
|
})),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -278,7 +314,7 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
|
|
|
|
setState(() {
|
|
|
|
setState(() {
|
|
|
|
SpeechToText.closeAlertDialog(context);
|
|
|
|
SpeechToText.closeAlertDialog(context);
|
|
|
|
speech.stop();
|
|
|
|
speech.stop();
|
|
|
|
progressNoteController.text = reconizedWord;
|
|
|
|
progressNoteController.text += reconizedWord + '\n';
|
|
|
|
});
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
print(result.finalResult);
|
|
|
|
print(result.finalResult);
|
|
|
|
|