@ -1,17 +1,17 @@
import ' package:doctor_app_flutter/config/size_config.dart ' ;
import ' package:doctor_app_flutter/config/size_config.dart ' ;
import ' package:doctor_app_flutter/core/enum/view_state.dart ' ;
import ' package:doctor_app_flutter/core/enum/view_state.dart ' ;
import ' package:doctor_app_flutter/core/provider/robot_provider.dart ' ;
import ' package:doctor_app_flutter/core/viewModel/profile/operation_report_view_model.dart ' ;
import ' package:doctor_app_flutter/core/viewModel/project_view_model.dart ' ;
import ' package:doctor_app_flutter/core/model/operation_report/create_update_operation_report_request_model.dart ' ;
import ' package:doctor_app_flutter/core/model/operation_report/create_update_operation_report_request_model.dart ' ;
import ' package:doctor_app_flutter/core/model/operation_report/get_operation_details_response_modle.dart ' ;
import ' package:doctor_app_flutter/core/model/operation_report/get_operation_details_response_modle.dart ' ;
import ' package:doctor_app_flutter/core/model/operation_report/get_reservations_response_model.dart ' ;
import ' package:doctor_app_flutter/core/model/operation_report/get_reservations_response_model.dart ' ;
import ' package:doctor_app_flutter/core/model/patient/patiant_info_model.dart ' ;
import ' package:doctor_app_flutter/core/model/patient/patiant_info_model.dart ' ;
import ' package:doctor_app_flutter/core/provider/robot_provider.dart ' ;
import ' package:doctor_app_flutter/core/viewModel/profile/operation_report_view_model.dart ' ;
import ' package:doctor_app_flutter/core/viewModel/project_view_model.dart ' ;
import ' package:doctor_app_flutter/screens/base/base_view.dart ' ;
import ' package:doctor_app_flutter/screens/base/base_view.dart ' ;
import ' package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart ' ;
import ' package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart ' ;
import ' package:doctor_app_flutter/utils/dr_app_toast_msg.dart ' ;
import ' package:doctor_app_flutter/utils/dr_app_toast_msg.dart ' ;
import ' package:doctor_app_flutter/utils/utils.dart ' ;
import ' package:doctor_app_flutter/utils/translations_delegate_base_utils.dart ' ;
import ' package:doctor_app_flutter/utils/translations_delegate_base_utils.dart ' ;
import ' package:doctor_app_flutter/utils/utils.dart ' ;
import ' package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart ' ;
import ' package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart ' ;
import ' package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart ' ;
import ' package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart ' ;
import ' package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart ' ;
import ' package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart ' ;
@ -23,19 +23,19 @@ import 'package:speech_to_text/speech_to_text.dart' as stt;
import ' ../../../../config/config.dart ' ;
import ' ../../../../config/config.dart ' ;
class UpdateOperationReport extends StatefulWidget {
class UpdateOperationReport extends StatefulWidget {
final GetReservationsResponseModel reservation ;
final GetReservationsResponseModel ? reservation ;
/ / final OperationReportViewModel operationReportViewModel ;
/ / final OperationReportViewModel operationReportViewModel ;
final PatiantInformtion patient ;
final PatiantInformtion ? patient ;
final int visitType ;
final int ? visitType ;
final bool isUpdate ;
final bool isUpdate ;
const UpdateOperationReport (
const UpdateOperationReport (
{ Key key ,
{ Key ? key ,
/ / this . operationReportViewModel ,
/ / this . operationReportViewModel ,
this . patient ,
this . patient ,
this . visitType ,
this . visitType ,
this . isUpdate ,
required this . isUpdate ,
this . reservation } )
this . reservation } )
: super ( key: key ) ;
: super ( key: key ) ;
@ -44,12 +44,12 @@ class UpdateOperationReport extends StatefulWidget {
}
}
class _UpdateOperationReportState extends State < UpdateOperationReport > {
class _UpdateOperationReportState extends State < UpdateOperationReport > {
int selectedType ;
int ? selectedType ;
bool isSubmitted = false ;
bool isSubmitted = false ;
stt . SpeechToText speech = stt . SpeechToText ( ) ;
stt . SpeechToText speech = stt . SpeechToText ( ) ;
var recognizedWord ;
var recognizedWord ;
var event = RobotProvider ( ) ;
var event = RobotProvider ( ) ;
ProjectViewModel projectViewModel ;
late ProjectViewModel projectViewModel ;
TextEditingController preOpDiagmosisController = TextEditingController ( ) ;
TextEditingController preOpDiagmosisController = TextEditingController ( ) ;
TextEditingController postOpDiagmosisNoteController = TextEditingController ( ) ;
TextEditingController postOpDiagmosisNoteController = TextEditingController ( ) ;
@ -63,13 +63,11 @@ class _UpdateOperationReportState extends State<UpdateOperationReport> {
TextEditingController complicationDetailsController = TextEditingController ( ) ;
TextEditingController complicationDetailsController = TextEditingController ( ) ;
TextEditingController bloodLossDetailController = TextEditingController ( ) ;
TextEditingController bloodLossDetailController = TextEditingController ( ) ;
TextEditingController histopathSpecimenController = TextEditingController ( ) ;
TextEditingController histopathSpecimenController = TextEditingController ( ) ;
TextEditingController microbiologySpecimenController =
TextEditingController microbiologySpecimenController = TextEditingController ( ) ;
TextEditingController ( ) ;
TextEditingController otherSpecimenController = TextEditingController ( ) ;
TextEditingController otherSpecimenController = TextEditingController ( ) ;
TextEditingController scrubNurseController = TextEditingController ( ) ;
TextEditingController scrubNurseController = TextEditingController ( ) ;
TextEditingController circulatingNurseController = TextEditingController ( ) ;
TextEditingController circulatingNurseController = TextEditingController ( ) ;
TextEditingController BloodTransfusedDetailController =
TextEditingController BloodTransfusedDetailController = TextEditingController ( ) ;
TextEditingController ( ) ;
TextEditingController anasthetistController = TextEditingController ( ) ;
TextEditingController anasthetistController = TextEditingController ( ) ;
TextEditingController OTReservationID = TextEditingController ( ) ;
TextEditingController OTReservationID = TextEditingController ( ) ;
@ -91,33 +89,30 @@ class _UpdateOperationReportState extends State<UpdateOperationReport> {
return BaseView < OperationReportViewModel > (
return BaseView < OperationReportViewModel > (
onModelReady: ( model ) async {
onModelReady: ( model ) async {
await model . getOperationReportDetails ( widget . reservation ) ;
await model . getOperationReportDetails ( widget . reservation ! ) ;
OTReservationID . text = widget . reservation . oTReservationID . toString ( ) ;
OTReservationID . text = widget . reservation ! . oTReservationID . toString ( ) ;
if ( model . operationDetailsList . isNotEmpty ) {
if ( model . operationDetailsList . isNotEmpty ) {
GetOperationDetailsResponseModel oldDetails =
GetOperationDetailsResponseModel oldDetails = model . operationDetailsList [ 0 ] ;
model . operationDetailsList [ 0 ] ;
postOpDiagmosisNoteController . text = oldDetails . postOpInstruction ! ;
postOpDiagmosisNoteController . text = oldDetails . postOpInstruction ;
preOpDiagmosisController . text = oldDetails . preOpDiagnosis ! ;
preOpDiagmosisController . text = oldDetails . preOpDiagnosis ;
surgeonController . text = oldDetails . surgeon ! ;
surgeonController . text = oldDetails . surgeon ;
assistantNoteController . text = oldDetails . assistant ! ;
assistantNoteController . text = oldDetails . assistant ;
operationController . text = oldDetails . operation ! ;
operationController . text = oldDetails . operation ;
inasionController . text = oldDetails . inasion ! ;
inasionController . text = oldDetails . inasion ;
findingController . text = oldDetails . finding ! ;
findingController . text = oldDetails . finding ;
surgeryProcedureController . text = oldDetails . surgeryProcedure ! ;
surgeryProcedureController . text = oldDetails . surgeryProcedure ;
postOpInstructionController . text = oldDetails . postOpInstruction ! ;
postOpInstructionController . text = oldDetails . postOpInstruction ;
complicationDetailsController . text = oldDetails . complicationDetail ! ;
complicationDetailsController . text = oldDetails . complicationDetail ;
bloodLossDetailController . text = oldDetails . bloodLossDetail ! ;
bloodLossDetailController . text = oldDetails . bloodLossDetail ;
histopathSpecimenController . text = oldDetails . histopathSpecimen ! ;
histopathSpecimenController . text = oldDetails . histopathSpecimen ;
microbiologySpecimenController . text = oldDetails . microbiologySpecimen ! ;
microbiologySpecimenController . text =
otherSpecimenController . text = oldDetails . otherSpecimen ! ;
oldDetails . microbiologySpecimen ;
otherSpecimenController . text = oldDetails . otherSpecimen ;
scrubNurseController . text = oldDetails . scrubNurse ;
scrubNurseController . text = oldDetails . scrubNurse ;
circulatingNurseController . text = oldDetails . circulatingNurse ;
circulatingNurseController . text = oldDetails . circulatingNurse ;
BloodTransfusedDetailController . text =
BloodTransfusedDetailController . text = oldDetails . bloodTransfusedDetail ;
oldDetails . bloodTransfusedDetail ;
anasthetistController . text = oldDetails . anasthetist ! ;
anasthetistController . text = oldDetails . anasthetist ;
}
}
} ,
} ,
builder: ( _ , model , w ) = > AppScaffold (
builder: ( _ , model , w ) = > AppScaffold (
@ -146,107 +141,82 @@ class _UpdateOperationReportState extends State<UpdateOperationReport> {
child: Column (
child: Column (
children: [
children: [
AppTextFieldCustom (
AppTextFieldCustom (
hintText: TranslationBase . of ( context )
hintText: TranslationBase . of ( context ) . reservation ,
. reservation ,
controller: OTReservationID ,
controller: OTReservationID ,
maxLines: 1 ,
maxLines: 1 ,
minLines: 1 ,
minLines: 1 ,
enabled: false ,
enabled: false ,
hasBorder: true ,
hasBorder: true ,
onChanged: ( String value ) { } ,
onFieldSubmitted: ( ) { } ,
) ,
) ,
SizedBox (
SizedBox (
height: 4 ,
height: 4 ,
) ,
) ,
AppTextFieldCustom (
AppTextFieldCustom (
hintText: TranslationBase . of ( context )
hintText: TranslationBase . of ( context ) . preOperationDiagnosis ,
. preOperationDiagnosis ,
controller: preOpDiagmosisController ,
controller: preOpDiagmosisController ,
maxLines: 20 ,
maxLines: 20 ,
minLines: 8 ,
minLines: 8 ,
hasBorder: true ,
hasBorder: true ,
/ / isTextFieldHasSuffix: true ,
/ / isTextFieldHasSuffix: true ,
validationError: preOpDiagmosisController
validationError: preOpDiagmosisController . text . isEmpty & & isSubmitted ? TranslationBase . of ( context ) . emptyMessage : null , onChanged: ( String value ) { } ,
. text . isEmpty & &
onFieldSubmitted: ( ) { } ,
isSubmitted
? TranslationBase . of ( context )
. emptyMessage
: null ,
) ,
) ,
SizedBox (
SizedBox (
height: 4 ,
height: 4 ,
) ,
) ,
AppTextFieldCustom (
AppTextFieldCustom (
hintText: TranslationBase . of ( context )
hintText: TranslationBase . of ( context ) . postOperationDiagnosis ,
. postOperationDiagnosis ,
controller: postOpDiagmosisNoteController ,
controller: postOpDiagmosisNoteController ,
maxLines: 20 ,
maxLines: 20 ,
minLines: 8 ,
minLines: 8 ,
hasBorder: true ,
hasBorder: true ,
/ / isTextFieldHasSuffix: true ,
/ / isTextFieldHasSuffix: true ,
validationError:
validationError: postOpDiagmosisNoteController . text . isEmpty & & isSubmitted ? TranslationBase . of ( context ) . emptyMessage : null , onChanged: ( String value ) { } ,
postOpDiagmosisNoteController
onFieldSubmitted: ( ) { } ,
. text . isEmpty & &
isSubmitted
? TranslationBase . of ( context )
. emptyMessage
: null ,
) ,
) ,
SizedBox (
SizedBox (
height: 4 ,
height: 4 ,
) ,
) ,
AppTextFieldCustom (
AppTextFieldCustom (
hintText:
hintText: TranslationBase . of ( context ) . surgeon ,
TranslationBase . of ( context ) . surgeon ,
controller: surgeonController ,
controller: surgeonController ,
maxLines: 1 ,
maxLines: 1 ,
minLines: 1 ,
minLines: 1 ,
hasBorder: true ,
hasBorder: true ,
/ / isTextFieldHasSuffix: true ,
/ / isTextFieldHasSuffix: true ,
validationError:
validationError: surgeonController . text . isEmpty & & isSubmitted ? TranslationBase . of ( context ) . emptyMessage : null , onChanged: ( String value ) { } ,
surgeonController . text . isEmpty & &
onFieldSubmitted: ( ) { } ,
isSubmitted
? TranslationBase . of ( context )
. emptyMessage
: null ,
) ,
) ,
SizedBox (
SizedBox (
height: 4 ,
height: 4 ,
) ,
) ,
AppTextFieldCustom (
AppTextFieldCustom (
hintText:
hintText: TranslationBase . of ( context ) . assistant ,
TranslationBase . of ( context ) . assistant ,
controller: assistantNoteController ,
controller: assistantNoteController ,
maxLines: 1 ,
maxLines: 1 ,
minLines: 1 ,
minLines: 1 ,
hasBorder: true ,
hasBorder: true ,
/ / isTextFieldHasSuffix: true ,
/ / isTextFieldHasSuffix: true ,
validationError: assistantNoteController
validationError: assistantNoteController . text . isEmpty & & isSubmitted ? TranslationBase . of ( context ) . emptyMessage : null , onChanged: ( String value ) { } ,
. text . isEmpty & &
onFieldSubmitted: ( ) { } ,
isSubmitted
? TranslationBase . of ( context )
. emptyMessage
: null ,
) ,
) ,
SizedBox (
SizedBox (
height: 4 ,
height: 4 ,
) ,
) ,
AppTextFieldCustom (
AppTextFieldCustom (
hintText:
hintText: TranslationBase . of ( context ) . operation ,
TranslationBase . of ( context ) . operation ,
controller: operationController ,
controller: operationController ,
maxLines: 20 ,
maxLines: 20 ,
minLines: 4 ,
minLines: 4 ,
hasBorder: true ,
hasBorder: true ,
/ / isTextFieldHasSuffix: true ,
/ / isTextFieldHasSuffix: true ,
validationError:
validationError: operationController . text . isEmpty & & isSubmitted ? TranslationBase . of ( context ) . emptyMessage : null ,
operationController . text . isEmpty & &
onChanged: ( String value ) { } , onFieldSubmitted: ( ) { } ,
isSubmitted
? TranslationBase . of ( context )
. emptyMessage
: null ,
) ,
) ,
SizedBox (
SizedBox (
height: 4 ,
height: 4 ,
@ -260,248 +230,175 @@ class _UpdateOperationReportState extends State<UpdateOperationReport> {
hasBorder: true ,
hasBorder: true ,
/ / isTextFieldHasSuffix: true ,
/ / isTextFieldHasSuffix: true ,
validationError:
validationError: inasionController . text . isEmpty & & isSubmitted ? TranslationBase . of ( context ) . emptyMessage : null ,
inasionController . text . isEmpty & &
onChanged: ( String value ) { } , onFieldSubmitted: ( ) { } ,
isSubmitted
? TranslationBase . of ( context )
. emptyMessage
: null ,
) ,
) ,
SizedBox (
SizedBox (
height: 4 ,
height: 4 ,
) ,
) ,
AppTextFieldCustom (
AppTextFieldCustom (
hintText:
hintText: TranslationBase . of ( context ) . finding ,
TranslationBase . of ( context ) . finding ,
controller: findingController ,
controller: findingController ,
maxLines: 20 ,
maxLines: 20 ,
minLines: 4 ,
minLines: 4 ,
hasBorder: true ,
hasBorder: true ,
/ / isTextFieldHasSuffix: true ,
/ / isTextFieldHasSuffix: true ,
validationError:
validationError: findingController . text . isEmpty & & isSubmitted ? TranslationBase . of ( context ) . emptyMessage : null ,
findingController . text . isEmpty & &
onChanged: ( String value ) { } , onFieldSubmitted: ( ) { } ,
isSubmitted
? TranslationBase . of ( context )
. emptyMessage
: null ,
) ,
) ,
SizedBox (
SizedBox (
height: 4 ,
height: 4 ,
) ,
) ,
AppTextFieldCustom (
AppTextFieldCustom (
hintText: TranslationBase . of ( context )
hintText: TranslationBase . of ( context ) . surgeryProcedure ,
. surgeryProcedure ,
controller: surgeryProcedureController ,
controller: surgeryProcedureController ,
maxLines: 20 ,
maxLines: 20 ,
minLines: 8 ,
minLines: 8 ,
hasBorder: true ,
hasBorder: true ,
/ / isTextFieldHasSuffix: true ,
/ / isTextFieldHasSuffix: true ,
validationError:
validationError: surgeryProcedureController . text . isEmpty & & isSubmitted ? TranslationBase . of ( context ) . emptyMessage : null ,
surgeryProcedureController
onChanged: ( String value ) { } , onFieldSubmitted: ( ) { } ,
. text . isEmpty & &
isSubmitted
? TranslationBase . of ( context )
. emptyMessage
: null ,
) ,
) ,
SizedBox (
SizedBox (
height: 4 ,
height: 4 ,
) ,
) ,
AppTextFieldCustom (
AppTextFieldCustom (
hintText: TranslationBase . of ( context )
hintText: TranslationBase . of ( context ) . postOperationInstruction ,
. postOperationInstruction ,
controller: postOpInstructionController ,
controller: postOpInstructionController ,
maxLines: 20 ,
maxLines: 20 ,
minLines: 8 ,
minLines: 8 ,
hasBorder: true ,
hasBorder: true ,
/ / isTextFieldHasSuffix: true ,
/ / isTextFieldHasSuffix: true ,
validationError:
validationError: postOpInstructionController . text . isEmpty & & isSubmitted ? TranslationBase . of ( context ) . emptyMessage : null ,
postOpInstructionController
onChanged: ( String value ) { } , onFieldSubmitted: ( ) { } ,
. text . isEmpty & &
isSubmitted
? TranslationBase . of ( context )
. emptyMessage
: null ,
) ,
) ,
SizedBox (
SizedBox (
height: 4 ,
height: 4 ,
) ,
) ,
AppTextFieldCustom (
AppTextFieldCustom (
hintText: TranslationBase . of ( context )
hintText: TranslationBase . of ( context ) . complicationDetails1 ,
. complicationDetails1 ,
controller: complicationDetailsController ,
controller: complicationDetailsController ,
maxLines: 20 ,
maxLines: 20 ,
minLines: 4 ,
minLines: 4 ,
hasBorder: true ,
hasBorder: true ,
/ / isTextFieldHasSuffix: true ,
/ / isTextFieldHasSuffix: true ,
validationError:
validationError: complicationDetailsController . text . isEmpty & & isSubmitted ? TranslationBase . of ( context ) . emptyMessage : null ,
complicationDetailsController
onChanged: ( String value ) { } , onFieldSubmitted: ( ) { } ,
. text . isEmpty & &
isSubmitted
? TranslationBase . of ( context )
. emptyMessage
: null ,
) ,
) ,
SizedBox (
SizedBox (
height: 4 ,
height: 4 ,
) ,
) ,
AppTextFieldCustom (
AppTextFieldCustom (
hintText: TranslationBase . of ( context )
hintText: TranslationBase . of ( context ) . bloodLossDetail ,
. bloodLossDetail ,
controller: bloodLossDetailController ,
controller: bloodLossDetailController ,
maxLines: 20 ,
maxLines: 20 ,
minLines: 4 ,
minLines: 4 ,
hasBorder: true ,
hasBorder: true ,
/ / isTextFieldHasSuffix: true ,
/ / isTextFieldHasSuffix: true ,
validationError: bloodLossDetailController
validationError: bloodLossDetailController . text . isEmpty & & isSubmitted ? TranslationBase . of ( context ) . emptyMessage : null ,
. text . isEmpty & &
onChanged: ( String value ) { } , onFieldSubmitted: ( ) { } ,
isSubmitted
? TranslationBase . of ( context )
. emptyMessage
: null ,
) ,
) ,
SizedBox (
SizedBox (
height: 4 ,
height: 4 ,
) ,
) ,
AppTextFieldCustom (
AppTextFieldCustom (
hintText: TranslationBase . of ( context )
hintText: TranslationBase . of ( context ) . histopathSpecimen ,
. histopathSpecimen ,
controller: histopathSpecimenController ,
controller: histopathSpecimenController ,
maxLines: 20 ,
maxLines: 20 ,
minLines: 4 ,
minLines: 4 ,
hasBorder: true ,
hasBorder: true ,
/ / isTextFieldHasSuffix: true ,
/ / isTextFieldHasSuffix: true ,
validationError:
validationError: histopathSpecimenController . text . isEmpty & & isSubmitted ? TranslationBase . of ( context ) . emptyMessage : null ,
histopathSpecimenController
onChanged: ( String value ) { } , onFieldSubmitted: ( ) { } ,
. text . isEmpty & &
isSubmitted
? TranslationBase . of ( context )
. emptyMessage
: null ,
) ,
) ,
SizedBox (
SizedBox (
height: 4 ,
height: 4 ,
) ,
) ,
AppTextFieldCustom (
AppTextFieldCustom (
hintText: TranslationBase . of ( context )
hintText: TranslationBase . of ( context ) . microbiologySpecimen ,
. microbiologySpecimen ,
controller: microbiologySpecimenController ,
controller:
microbiologySpecimenController ,
maxLines: 20 ,
maxLines: 20 ,
minLines: 4 ,
minLines: 4 ,
hasBorder: true ,
hasBorder: true ,
/ / isTextFieldHasSuffix: true ,
/ / isTextFieldHasSuffix: true ,
validationError:
validationError: microbiologySpecimenController . text . isEmpty & & isSubmitted ? TranslationBase . of ( context ) . emptyMessage : null ,
microbiologySpecimenController
onChanged: ( String value ) { } , onFieldSubmitted: ( ) { } ,
. text . isEmpty & &
isSubmitted
? TranslationBase . of ( context )
. emptyMessage
: null ,
) ,
) ,
SizedBox (
SizedBox (
height: 4 ,
height: 4 ,
) ,
) ,
AppTextFieldCustom (
AppTextFieldCustom (
hintText: TranslationBase . of ( context )
hintText: TranslationBase . of ( context ) . otherSpecimen ,
. otherSpecimen ,
controller: otherSpecimenController ,
controller: otherSpecimenController ,
maxLines: 20 ,
maxLines: 20 ,
minLines: 4 ,
minLines: 4 ,
hasBorder: true ,
hasBorder: true ,
/ / isTextFieldHasSuffix: true ,
/ / isTextFieldHasSuffix: true ,
validationError: otherSpecimenController
validationError: otherSpecimenController . text . isEmpty & & isSubmitted ? TranslationBase . of ( context ) . emptyMessage : null ,
. text . isEmpty & &
onChanged: ( String value ) { } , onFieldSubmitted: ( ) { } ,
isSubmitted
? TranslationBase . of ( context )
. emptyMessage
: null ,
) ,
) ,
SizedBox (
SizedBox (
height: 4 ,
height: 4 ,
) ,
) ,
AppTextFieldCustom (
AppTextFieldCustom (
hintText: TranslationBase . of ( context )
hintText: TranslationBase . of ( context ) . scrubNurse ,
. scrubNurse ,
controller: scrubNurseController ,
controller: scrubNurseController ,
maxLines: 1 ,
maxLines: 1 ,
minLines: 1 ,
minLines: 1 ,
hasBorder: true ,
hasBorder: true ,
/ / isTextFieldHasSuffix: true ,
/ / isTextFieldHasSuffix: true ,
validationError:
validationError: scrubNurseController . text . isEmpty & & isSubmitted ? TranslationBase . of ( context ) . emptyMessage : null ,
scrubNurseController . text . isEmpty & &
onChanged: ( String value ) { } , onFieldSubmitted: ( ) { } ,
isSubmitted
? TranslationBase . of ( context )
. emptyMessage
: null ,
) ,
) ,
SizedBox (
SizedBox (
height: 4 ,
height: 4 ,
) ,
) ,
AppTextFieldCustom (
AppTextFieldCustom (
hintText: TranslationBase . of ( context )
hintText: TranslationBase . of ( context ) . circulatingNurse ,
. circulatingNurse ,
controller: circulatingNurseController ,
controller: circulatingNurseController ,
maxLines: 1 ,
maxLines: 1 ,
minLines: 1 ,
minLines: 1 ,
hasBorder: true ,
hasBorder: true ,
/ / isTextFieldHasSuffix: true ,
/ / isTextFieldHasSuffix: true ,
validationError:
validationError: circulatingNurseController . text . isEmpty & & isSubmitted ? TranslationBase . of ( context ) . emptyMessage : null ,
circulatingNurseController
onChanged: ( String value ) { } , onFieldSubmitted: ( ) { } ,
. text . isEmpty & &
isSubmitted
? TranslationBase . of ( context )
. emptyMessage
: null ,
) ,
) ,
SizedBox (
SizedBox (
height: 4 ,
height: 4 ,
) ,
) ,
AppTextFieldCustom (
AppTextFieldCustom (
hintText: TranslationBase . of ( context )
hintText: TranslationBase . of ( context ) . bloodTransfusedDetail ,
. bloodTransfusedDetail ,
controller: BloodTransfusedDetailController ,
controller:
BloodTransfusedDetailController ,
maxLines: 20 ,
maxLines: 20 ,
minLines: 4 ,
minLines: 4 ,
hasBorder: true ,
hasBorder: true ,
/ / isTextFieldHasSuffix: true ,
/ / isTextFieldHasSuffix: true ,
validationError:
validationError: BloodTransfusedDetailController . text . isEmpty & & isSubmitted ? TranslationBase . of ( context ) . emptyMessage : null ,
BloodTransfusedDetailController
onChanged: ( String value ) { } , onFieldSubmitted: ( ) { } ,
. text . isEmpty & &
isSubmitted
? TranslationBase . of ( context )
. emptyMessage
: null ,
) ,
) ,
SizedBox (
SizedBox (
height: 4 ,
height: 4 ,
) ,
) ,
AppTextFieldCustom (
AppTextFieldCustom (
hintText: TranslationBase . of ( context )
hintText: TranslationBase . of ( context ) . anesthetist ,
. anesthetist ,
controller: anasthetistController ,
controller: anasthetistController ,
maxLines: 1 ,
maxLines: 1 ,
minLines: 1 ,
minLines: 1 ,
hasBorder: true ,
hasBorder: true ,
/ / isTextFieldHasSuffix: true ,
/ / isTextFieldHasSuffix: true ,
validationError:
validationError: anasthetistController . text . isEmpty & & isSubmitted ? TranslationBase . of ( context ) . emptyMessage : null ,
anasthetistController . text . isEmpty & &
onChanged: ( String value ) { } , onFieldSubmitted: ( ) { } ,
isSubmitted
? TranslationBase . of ( context )
. emptyMessage
: null ,
) ,
) ,
SizedBox (
SizedBox (
height: 250 ,
height: 250 ,
@ -523,17 +420,13 @@ class _UpdateOperationReportState extends State<UpdateOperationReport> {
)
)
: Container (
: Container (
height: 70 ,
height: 70 ,
margin: EdgeInsets . all ( SizeConfig . widthMultiplier * 5 ) ,
margin: EdgeInsets . all ( SizeConfig . widthMultiplier ! * 5 ) ,
child: Column (
child: Column (
children: < Widget > [
children: < Widget > [
Container (
Container (
margin: EdgeInsets . all ( 5 ) ,
margin: EdgeInsets . all ( 5 ) ,
child: AppButton (
child: AppButton (
title: ( widget . isUpdate
title: ( widget . isUpdate ? TranslationBase . of ( context ) . noteUpdate : TranslationBase . of ( context ) . noteAdd ) + " " + TranslationBase . of ( context ) . operationReports ,
? TranslationBase . of ( context ) . noteUpdate
: TranslationBase . of ( context ) . noteAdd ) +
" " +
TranslationBase . of ( context ) . operationReports ,
color: AppGlobal . appGreenColor ,
color: AppGlobal . appGreenColor ,
/ / disabled: operationReportsController . text . isEmpty ,
/ / disabled: operationReportsController . text . isEmpty ,
fontWeight: FontWeight . w700 ,
fontWeight: FontWeight . w700 ,
@ -545,55 +438,33 @@ class _UpdateOperationReportState extends State<UpdateOperationReport> {
GifLoaderDialogUtils . showMyDialog ( context ) ;
GifLoaderDialogUtils . showMyDialog ( context ) ;
await model . getDoctorProfile ( ) ;
await model . getDoctorProfile ( ) ;
CreateUpdateOperationReportRequestModel
CreateUpdateOperationReportRequestModel createUpdateOperationReportRequestModel = CreateUpdateOperationReportRequestModel (
createUpdateOperationReportRequestModel =
inasion: inasionController . text ,
CreateUpdateOperationReportRequestModel (
inasion: inasionController . text ,
/ / / TODO Elham * Add dynamic reservation
reservationNo: widget . reservation ! . oTReservationID ,
/ / / TODO Elham * Add dynamic reservation
preOpDiagmosis: preOpDiagmosisController . text ,
reservationNo: widget
postOpDiagmosis: postOpDiagmosisNoteController . text ,
. reservation . oTReservationID ,
surgeon: surgeonController . text ,
preOpDiagmosis:
assistant: assistantNoteController . text ,
preOpDiagmosisController . text ,
anasthetist: assistantNoteController . text ,
postOpDiagmosis:
operation: operationController . text ,
postOpDiagmosisNoteController
finding: findingController . text ,
. text ,
surgeryProcedure: surgeonController . text ,
surgeon: surgeonController . text ,
postOpInstruction: postOpInstructionController . text ,
assistant:
complicationDetails: complicationDetailsController . text ,
assistantNoteController . text ,
bloodLossDetail: bloodLossDetailController . text ,
anasthetist:
histopathSpecimen: histopathSpecimenController . text ,
assistantNoteController . text ,
microbiologySpecimen: microbiologySpecimenController . text ,
operation: operationController . text ,
otherSpecimen: otherSpecimenController . text ,
finding: findingController . text ,
scrubNurse: surgeonController . text ,
surgeryProcedure:
circulatingNurse: circulatingNurseController . text ,
surgeonController . text ,
bloodTransfusedDetail: bloodLossDetailController . text ,
postOpInstruction:
patientID: widget . patient ! . patientId ,
postOpInstructionController . text ,
admissionNo: int . parse ( widget . patient ! . admissionNo ! ) ,
complicationDetails:
createdBy: model . doctorProfile ! . doctorID ,
complicationDetailsController
) ;
. text ,
await model . updateOperationReport ( createUpdateOperationReportRequestModel ) ;
bloodLossDetail:
bloodLossDetailController . text ,
histopathSpecimen:
histopathSpecimenController . text ,
microbiologySpecimen:
microbiologySpecimenController
. text ,
otherSpecimen:
otherSpecimenController . text ,
scrubNurse: surgeonController . text ,
circulatingNurse:
circulatingNurseController . text ,
bloodTransfusedDetail:
bloodLossDetailController . text ,
patientID: widget . patient . patientId ,
admissionNo: int . parse (
widget . patient . admissionNo ) ,
createdBy:
model . doctorProfile . doctorID ,
) ;
await model . updateOperationReport (
createUpdateOperationReportRequestModel ) ;
if ( model . state = = ViewState . ErrorLocal ) {
if ( model . state = = ViewState . ErrorLocal ) {
Utils . showErrorToast ( model . error ) ;
Utils . showErrorToast ( model . error ) ;
@ -601,8 +472,7 @@ class _UpdateOperationReportState extends State<UpdateOperationReport> {
/ / await model . (
/ / await model . (
/ / operationReportsRequest . toJson ( ) ) ;
/ / operationReportsRequest . toJson ( ) ) ;
DrAppToastMsg . showSuccesToast (
DrAppToastMsg . showSuccesToast ( " Your Order added Successfully " ) ;
" Your Order added Successfully " ) ;
}
}
GifLoaderDialogUtils . hideDialog ( context ) ;
GifLoaderDialogUtils . hideDialog ( context ) ;
}
}