Add DropDownText to add progress note screen

merge-requests/970/head
RoaaGhali98 4 years ago
parent 22c26c02de
commit f3b39906f5

@ -381,6 +381,9 @@ const GET_INTERVENTION_MEDICATION_HISTORY =
const SET_ACCEPTED_OR_REJECTED =
"Services/DoctorApplication.svc/REST/DoctorApp_AcceptOrRejectIntervention";
const GET_STP_MASTER_LIST =
"Services/DoctorApplication.svc/REST/DoctorApp_GetSTPMasterList";
var selectedPatientType = 1;
//*********change value to decode json from Dropdown ************

@ -1138,4 +1138,7 @@ const Map<String, Map<String, String>> localizedValues = {
"old": {"en": "Old", "ar":"القديمه"},
"orderTypeDescription": {"en": "Order Type Description", "ar":"وصف نوع الطلب"},
"doseDetails": {"en": "Dose Details", "ar":"تفاصيل الجرعة"},
"selectCondition": {"en": "Select Condition", "ar":"قم بتحديد الشرط"},
"yourOrderAddedSuccessfully": {"en": "Your Order Added Successfully", "ar":"تم إضافة طلبك بنجاح"},
"youCannotAddOnlySpaces": {"en": "You Can't Add Only Spaces", "ar":"تم إضافة طلبك بنجاح"},
};

@ -18,6 +18,7 @@ class CreateNoteModel {
String sessionID;
bool isLoginForDoctorApp;
bool patientOutSA;
int conditionId;
CreateNoteModel(
{this.visitType,
@ -38,7 +39,8 @@ class CreateNoteModel {
this.tokenID,
this.sessionID,
this.isLoginForDoctorApp,
this.patientOutSA});
this.patientOutSA,
this.conditionId});
CreateNoteModel.fromJson(Map<String, dynamic> json) {
visitType = json['VisitType'];
@ -60,6 +62,7 @@ class CreateNoteModel {
sessionID = json['SessionID'];
isLoginForDoctorApp = json['IsLoginForDoctorApp'];
patientOutSA = json['PatientOutSA'];
conditionId = json['ConditionId'];
}
Map<String, dynamic> toJson() {
@ -83,6 +86,7 @@ class CreateNoteModel {
data['SessionID'] = this.sessionID;
data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp;
data['PatientOutSA'] = this.patientOutSA;
data['ConditionId'] = this.conditionId;
return data;
}
}

@ -0,0 +1,32 @@
class StpMasterListRequestModel {
bool isDentalAllowedBackend;
int languageID;
int projectID;
int parameterGroup;
int parameterType;
StpMasterListRequestModel(
{this.isDentalAllowedBackend,
this.languageID,
this.projectID,
this.parameterGroup,
this.parameterType});
StpMasterListRequestModel.fromJson(Map<String, dynamic> json) {
isDentalAllowedBackend = json['isDentalAllowedBackend'];
languageID = json['LanguageID'];
projectID = json['ProjectID'];
parameterGroup = json['parameterGroup'];
parameterType = json['parameterType'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['LanguageID'] = this.languageID;
data['ProjectID'] = this.projectID;
data['parameterGroup'] = this.parameterGroup;
data['parameterType'] = this.parameterType;
return data;
}
}

@ -0,0 +1,22 @@
class StpMasterListResponseModel {
int parameterCode;
String description;
Null descriptionN;
StpMasterListResponseModel(
{this.parameterCode, this.description, this.descriptionN});
StpMasterListResponseModel.fromJson(Map<String, dynamic> json) {
parameterCode = json['ParameterCode'];
description = json['Description'];
descriptionN = json['DescriptionN'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ParameterCode'] = this.parameterCode;
data['Description'] = this.description;
data['DescriptionN'] = this.descriptionN;
return data;
}
}

@ -16,6 +16,7 @@ class UpdateNoteReqModel {
bool isLoginForDoctorApp;
bool patientOutSA;
int patientTypeID;
int conditionId;
UpdateNoteReqModel(
{this.projectID,
@ -34,7 +35,8 @@ class UpdateNoteReqModel {
this.sessionID,
this.isLoginForDoctorApp,
this.patientOutSA,
this.patientTypeID});
this.patientTypeID,
this.conditionId});
UpdateNoteReqModel.fromJson(Map<String, dynamic> json) {
projectID = json['ProjectID'];
@ -54,6 +56,7 @@ class UpdateNoteReqModel {
isLoginForDoctorApp = json['IsLoginForDoctorApp'];
patientOutSA = json['PatientOutSA'];
patientTypeID = json['PatientTypeID'];
conditionId = json['ConditionId'];
}
Map<String, dynamic> toJson() {
@ -75,6 +78,7 @@ class UpdateNoteReqModel {
data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp;
data['PatientOutSA'] = this.patientOutSA;
data['PatientTypeID'] = this.patientTypeID;
data['ConditionId'] = this.conditionId;
return data;
}
}

@ -5,14 +5,14 @@ import 'package:doctor_app_flutter/core/model/diabetic_chart/GetDiabeticChartVal
import 'package:doctor_app_flutter/core/model/diabetic_chart/GetDiabeticChartValuesResponseModel.dart';
import 'package:doctor_app_flutter/core/model/diagnosis/GetDiagnosisForInPatientRequestModel.dart';
import 'package:doctor_app_flutter/core/model/diagnosis/GetDiagnosisForInPatientResponseModel.dart';
import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/core/model/note/CreateNoteModel.dart';
import 'package:doctor_app_flutter/core/model/note/GetNursingProgressNoteRequestModel.dart';
import 'package:doctor_app_flutter/core/model/note/GetNursingProgressNoteResposeModel.dart';
import 'package:doctor_app_flutter/core/model/note/note_model.dart';
import 'package:doctor_app_flutter/core/model/note/stp_master_list_req_model.dart';
import 'package:doctor_app_flutter/core/model/note/stp_master_list_res_model.dart';
import 'package:doctor_app_flutter/core/model/note/update_note_model.dart';
import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/core/model/patient/get_clinic_by_project_id_request.dart';
import 'package:doctor_app_flutter/core/model/patient/get_doctor_by_clinic_id_request.dart';
import 'package:doctor_app_flutter/core/model/patient/get_list_stp_referral_frequency_request.dart';
@ -26,6 +26,8 @@ import 'package:doctor_app_flutter/core/model/patient/prescription/prescription_
import 'package:doctor_app_flutter/core/model/patient/radiology/radiology_res_model.dart';
import 'package:doctor_app_flutter/core/model/patient/refer_to_doctor_request.dart';
import 'package:doctor_app_flutter/core/model/patient/vital_sign/vital_sign_res_model.dart';
import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
class PatientService extends BaseService {
List<VitalSignResModel> _patientVitalSignList = [];
@ -78,6 +80,10 @@ class PatientService extends BaseService {
List<GetDiabeticChartValuesResponseModel> get diabeticChartValuesList =>
_diabeticChartValuesList;
List<dynamic> stpMasterList = [];
// TODO: replace var with model
var _insuranceApporvalsList = [];
@ -558,4 +564,26 @@ class PatientService extends BaseService {
body: getDiabeticChartValuesRequestModel.toJson(),
);
}
Future getStpMasterList(
StpMasterListRequestModel stpMasterListRequestModel) async {
hasError = false;
await baseAppClient.post(
GET_STP_MASTER_LIST,
onSuccess: (dynamic response, int statusCode) {
stpMasterList = [];
stpMasterList = response['List_STPMasterList'];
// response['List_STPMasterList'].forEach((v) {
// _stpMasterList
// .add(StpMasterListResponseModel.fromJson(v));
// });
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
},
body: stpMasterListRequestModel.toJson(),
);
}
}

@ -8,8 +8,6 @@ import 'package:doctor_app_flutter/core/model/note/GetNursingProgressNoteRequest
import 'package:doctor_app_flutter/core/model/note/GetNursingProgressNoteResposeModel.dart';
import 'package:doctor_app_flutter/core/model/note/note_model.dart';
import 'package:doctor_app_flutter/core/model/note/update_note_model.dart';
import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/service/patient/patient_service.dart';
import 'package:doctor_app_flutter/core/model/patient/lab_orders/lab_orders_res_model.dart';
import 'package:doctor_app_flutter/core/model/patient/lab_result/lab_result.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
@ -18,10 +16,12 @@ import 'package:doctor_app_flutter/core/model/patient/prescription/prescription_
import 'package:doctor_app_flutter/core/model/patient/prescription/prescription_res_model.dart';
import 'package:doctor_app_flutter/core/model/patient/radiology/radiology_res_model.dart';
import 'package:doctor_app_flutter/core/model/patient/vital_sign/vital_sign_res_model.dart';
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
import 'package:flutter/cupertino.dart';
import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/service/patient/patient_service.dart';
import '../../locator.dart';
import '../model/note/stp_master_list_req_model.dart';
import '../model/note/stp_master_list_res_model.dart';
import 'base_view_model.dart';
class PatientViewModel extends BaseViewModel {
@ -73,6 +73,9 @@ class PatientViewModel extends BaseViewModel {
List<dynamic> get referralFrequencyList =>
_patientService.referalFrequancyList;
List<dynamic> get stpMasterList =>
_patientService.stpMasterList;
Future getPatientList(patient, patientType,
{bool isBusyLocal = false, isView}) async {
var localRes;
@ -363,4 +366,30 @@ class PatientViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
}
Future getStpMasterList({bool isLocalBusy = false}) async {
if (isLocalBusy)
setState(ViewState.BusyLocal);
else
setState(ViewState.Busy);
StpMasterListRequestModel requestModel = StpMasterListRequestModel(
isDentalAllowedBackend: false,
languageID: 1,
projectID: 15,
parameterGroup: 7,
parameterType: 362);
await _patientService.getStpMasterList(requestModel);
if (_patientService.hasError) {
error = _patientService.error;
if (isLocalBusy)
setState(ViewState.ErrorLocal);
else
setState(ViewState.ErrorLocal);
} else {
setState(ViewState.Idle);
}
}
}

@ -2,16 +2,16 @@ import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/core/model/note/CreateNoteModel.dart';
import 'package:doctor_app_flutter/core/model/note/note_model.dart';
import 'package:doctor_app_flutter/core/model/note/update_note_model.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/core/model/patient/progress_note_request.dart';
import 'package:doctor_app_flutter/core/provider/robot_provider.dart';
import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/core/model/patient/progress_note_request.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
@ -26,6 +26,8 @@ import 'package:permission_handler/permission_handler.dart';
import 'package:provider/provider.dart';
import 'package:speech_to_text/speech_recognition_error.dart';
import 'package:speech_to_text/speech_to_text.dart' as stt;
import '../../../../../widgets/shared/dialogs/dailog-list-select.dart';
import '../../../../base/base_view.dart';
class UpdateNoteOrder extends StatefulWidget {
final NoteModel note;
@ -33,6 +35,8 @@ class UpdateNoteOrder extends StatefulWidget {
final PatiantInformtion patient;
final int visitType;
final bool isUpdate;
final List<dynamic> elementList;
final Function(dynamic) okFunction;
const UpdateNoteOrder(
{Key key,
@ -40,7 +44,9 @@ class UpdateNoteOrder extends StatefulWidget {
this.patientModel,
this.patient,
this.visitType,
this.isUpdate})
this.isUpdate,
this.elementList,
this.okFunction})
: super(key: key);
@override
@ -48,6 +54,7 @@ class UpdateNoteOrder extends StatefulWidget {
}
class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
dynamic selectValue;
int selectedType;
bool isSubmitted = false;
stt.SpeechToText speech = stt.SpeechToText();
@ -78,120 +85,30 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
@override
Widget build(BuildContext context) {
String keyId = 'ParameterCode';
projectViewModel = Provider.of(context);
if (widget.note != null) {
progressNoteController.text = widget.note.notes;
}
return AppScaffold(
isShowAppBar: false,
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
body: SingleChildScrollView(
child: Container(
height: MediaQuery.of(context).size.height * 1.0,
child: Padding(
padding: EdgeInsets.all(0.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
BottomSheetTitle(
title: widget.visitType == 3
? (widget.isUpdate
? TranslationBase.of(context).noteUpdate
: TranslationBase.of(context).noteAdd) +
TranslationBase.of(context).orderSheet
: (widget.isUpdate
? TranslationBase.of(context).noteUpdate
: TranslationBase.of(context).noteAdd) +
TranslationBase.of(context).progressNote,
),
SizedBox(
height: 10.0,
),
Center(
child: FractionallySizedBox(
widthFactor: 0.9,
child: Column(
children: [
Stack(
children: [
AppTextFieldCustom(
hintText: widget.visitType == 3
? (widget.isUpdate
? TranslationBase.of(context)
.noteUpdate
: TranslationBase.of(context)
.noteAdd) +
TranslationBase.of(context).orderSheet
: (widget.isUpdate
? TranslationBase.of(context)
.noteUpdate
: TranslationBase.of(context)
.noteAdd) +
TranslationBase.of(context).progressNote,
//TranslationBase.of(context).addProgressNote,
controller: progressNoteController,
maxLines: 35,
minLines: 25,
hasBorder: true,
// isTextFieldHasSuffix: true,
validationError:
progressNoteController.text.isEmpty &&
isSubmitted
? TranslationBase.of(context).emptyMessage
: null,
),
Positioned(
top:
-2, //MediaQuery.of(context).size.height * 0,
right: projectViewModel.isArabic
? MediaQuery.of(context).size.width * 0.75
: 15,
child: Column(
children: [
IconButton(
icon: Icon(DoctorApp.speechtotext,
color: Colors.black, size: 35),
onPressed: () {
initSpeechState()
.then((value) => {onVoiceText()});
},
),
],
))
],
),
],
),
),
),
],
),
),
),
),
bottomSheet: Container(
height: progressNoteController.text.isNotEmpty ? 130 : 70,
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5),
child: Column(
children: <Widget>[
if (progressNoteController.text.isNotEmpty)
Container(
margin: EdgeInsets.all(5),
child: AppButton(
title: TranslationBase.of(context).clearText,
onPressed: () {
setState(() {
progressNoteController.text = '';
});
},
),
),
Container(
margin: EdgeInsets.all(5),
child: AppButton(
return BaseView<PatientViewModel>(
onModelReady: (model) {
model.getStpMasterList(isLocalBusy: false);
},
builder: (_, model, w) => AppScaffold(
isShowAppBar: false,
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
body: SingleChildScrollView(
child: Container(
height: MediaQuery.of(context).size.height * 1.0,
child: Padding(
padding: EdgeInsets.all(0.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
BottomSheetTitle(
title: widget.visitType == 3
? (widget.isUpdate
? TranslationBase.of(context).noteUpdate
@ -201,73 +118,220 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
? TranslationBase.of(context).noteUpdate
: TranslationBase.of(context).noteAdd) +
TranslationBase.of(context).progressNote,
color: AppGlobal.appGreenColor,
// disabled: progressNoteController.text.isEmpty,
fontWeight: FontWeight.w700,
onPressed: () async {
),
SizedBox(
height: 10.0,
),
Container(
padding: EdgeInsets.only(right: 20, left: 20),
child: InkWell(
onTap: model.stpMasterList != null
? () {
Helpers.hideKeyboard(context);
ListSelectDialog dialog = ListSelectDialog(
list: model.stpMasterList,
attributeName: 'Description',
attributeValueId:
model.stpMasterList.length == 1
? model.stpMasterList[0]['${keyId}']
.toString()
: '${keyId}',
okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) => {
setState(() {
selectValue = selectedValue;
selectValue['isDefault'] = true;
})
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
: null,
child: AppTextFieldCustom(
hintText: TranslationBase.of(context).selectCondition,//'Select Condition',
dropDownText: model.stpMasterList.length == 1
? model.stpMasterList[0]['Description']
: selectValue == null
? null
: selectValue['Description'],
enabled: false,
isTextFieldHasSuffix: true,
),
),
),
SizedBox(
height: 10.0,
),
Center(
child: FractionallySizedBox(
widthFactor: 0.9,
child: Column(
children: [
Stack(
children: [
AppTextFieldCustom(
hintText: widget.visitType == 3
? (widget.isUpdate
? TranslationBase.of(context)
.noteUpdate
: TranslationBase.of(context)
.noteAdd) +
TranslationBase.of(context).orderSheet
: (widget.isUpdate
? TranslationBase.of(context)
.noteUpdate
: TranslationBase.of(context)
.noteAdd) +
TranslationBase.of(context)
.progressNote,
//TranslationBase.of(context).addProgressNote,
controller: progressNoteController,
maxLines: 35,
minLines: 25,
hasBorder: true,
// isTextFieldHasSuffix: true,
validationError: progressNoteController
.text.isEmpty &&
isSubmitted
? TranslationBase.of(context).emptyMessage
: null,
),
Positioned(
top: -2,
//MediaQuery.of(context).size.height * 0,
right: projectViewModel.isArabic
? MediaQuery.of(context).size.width * 0.75
: 15,
child: Column(
children: [
IconButton(
icon: Icon(DoctorApp.speechtotext,
color: Colors.black, size: 35),
onPressed: () {
initSpeechState()
.then((value) => {onVoiceText()});
},
),
],
))
],
),
],
),
),
),
],
),
),
),
),
bottomSheet: Container(
height: progressNoteController.text.isNotEmpty ? 130 : 70,
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5),
child: Column(
children: <Widget>[
if (progressNoteController.text.isNotEmpty)
Container(
margin: EdgeInsets.all(5),
child: AppButton(
title: TranslationBase.of(context).clearText,
onPressed: () {
setState(() {
isSubmitted = true;
progressNoteController.text = '';
});
if (progressNoteController.text.trim().isNotEmpty) {
GifLoaderDialogUtils.showMyDialog(context);
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
},
),
),
Container(
margin: EdgeInsets.all(5),
child: AppButton(
title: widget.visitType == 3
? (widget.isUpdate
? TranslationBase.of(context).noteUpdate
: TranslationBase.of(context).noteAdd) +
TranslationBase.of(context).orderSheet
: (widget.isUpdate
? TranslationBase.of(context).noteUpdate
: TranslationBase.of(context).noteAdd) +
TranslationBase.of(context).progressNote,
color: AppGlobal.appGreenColor,
// disabled: progressNoteController.text.isEmpty,
fontWeight: FontWeight.w700,
onPressed: () async {
setState(() {
isSubmitted = true;
});
if (progressNoteController.text.trim().isNotEmpty) {
GifLoaderDialogUtils.showMyDialog(context);
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
DoctorProfileModel doctorProfile =
DoctorProfileModel.fromJson(profile);
DoctorProfileModel doctorProfile =
DoctorProfileModel.fromJson(profile);
if (widget.isUpdate) {
UpdateNoteReqModel reqModel = UpdateNoteReqModel(
admissionNo: int.parse(widget.patient.admissionNo),
cancelledNote: false,
lineItemNo: widget.note.lineItemNo,
createdBy: widget.note.createdBy,
notes: progressNoteController.text,
verifiedNote: false,
patientTypeID: widget.patient.patientType,
patientOutSA: false,
);
await widget.patientModel
.updatePatientProgressNote(reqModel);
} else {
CreateNoteModel reqModel = CreateNoteModel(
admissionNo:
int.parse(widget.patient.admissionNo),
createdBy: doctorProfile.doctorID,
visitType: widget.visitType,
patientID: widget.patient.patientId,
nursingRemarks: ' ',
patientTypeID: widget.patient.patientType,
patientOutSA: false,
notes: progressNoteController.text);
if (widget.isUpdate) {
UpdateNoteReqModel reqModel = UpdateNoteReqModel(
admissionNo:
int.parse(widget.patient.admissionNo),
cancelledNote: false,
lineItemNo: widget.note.lineItemNo,
createdBy: widget.note.createdBy,
notes: progressNoteController.text,
verifiedNote: false,
patientTypeID: widget.patient.patientType,
patientOutSA: false,
conditionId: selectValue['ParameterCode']);
await widget.patientModel
.updatePatientProgressNote(reqModel);
} else {
CreateNoteModel reqModel = CreateNoteModel(
admissionNo:
int.parse(widget.patient.admissionNo),
createdBy: doctorProfile.doctorID,
visitType: widget.visitType,
patientID: widget.patient.patientId,
nursingRemarks: ' ',
patientTypeID: widget.patient.patientType,
patientOutSA: false,
notes: progressNoteController.text,
conditionId: selectValue['ParameterCode']);
await widget.patientModel
.createPatientProgressNote(reqModel);
}
await widget.patientModel
.createPatientProgressNote(reqModel);
}
if (widget.patientModel.state == ViewState.ErrorLocal) {
Helpers.showErrorToast(widget.patientModel.error);
if (widget.patientModel.state ==
ViewState.ErrorLocal) {
Helpers.showErrorToast(widget.patientModel.error);
} else {
ProgressNoteRequest progressNoteRequest =
ProgressNoteRequest(
visitType: widget.visitType,
// if equal 5 then this will return progress note
admissionNo:
int.parse(widget.patient.admissionNo),
projectID: widget.patient.projectId,
patientTypeID: widget.patient.patientType,
languageID: 2);
await widget.patientModel.getPatientProgressNote(
progressNoteRequest.toJson());
}
GifLoaderDialogUtils.hideDialog(context);
DrAppToastMsg.showSuccesToast(
TranslationBase.of(context).yourOrderAddedSuccessfully);
Navigator.of(context).pop();
} else {
ProgressNoteRequest progressNoteRequest =
ProgressNoteRequest(
visitType: widget.visitType,
// if equal 5 then this will return progress note
admissionNo:
int.parse(widget.patient.admissionNo),
projectID: widget.patient.projectId,
patientTypeID: widget.patient.patientType,
languageID: 2);
await widget.patientModel.getPatientProgressNote(
progressNoteRequest.toJson());
Helpers.showErrorToast(TranslationBase.of(context).youCannotAddOnlySpaces);
}
GifLoaderDialogUtils.hideDialog(context);
DrAppToastMsg.showSuccesToast(
"Your Order added Successfully");
Navigator.of(context).pop();
} else {
Helpers.showErrorToast("You cant add only spaces");
}
})),
],
})),
],
),
),
),
);

@ -1716,6 +1716,12 @@ class TranslationBase {
String get doseDetails => localizedValues['doseDetails'][locale.languageCode];
String get selectCondition => localizedValues['selectCondition'][locale.languageCode];
String get yourOrderAddedSuccessfully => localizedValues['yourOrderAddedSuccessfully'][locale.languageCode];
String get youCannotAddOnlySpaces => localizedValues['youCannotAddOnlySpaces'][locale.languageCode];
}

Loading…
Cancel
Save