You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
343 lines
16 KiB
Dart
343 lines
16 KiB
Dart
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/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/provider/robot_provider.dart';
|
|
import 'package:doctor_app_flutter/core/viewModel/operation_report_view_model.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/models/doctor/doctor_profile_model.dart';
|
|
import 'package:doctor_app_flutter/models/operation_report/create_update_operation_report_request_model.dart';
|
|
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
|
import 'package:doctor_app_flutter/models/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';
|
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_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/speech-text-popup.dart';
|
|
import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart';
|
|
import 'package:doctor_app_flutter/widgets/shared/text_fields/text_fields_utils.dart';
|
|
import 'package:flutter/material.dart';
|
|
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 'CustomEditableText.dart';
|
|
|
|
class RegisterConfirmationPatientPage extends StatefulWidget {
|
|
final OperationReportViewModel operationReportViewModel;
|
|
final PatiantInformtion patient;
|
|
final int visitType;
|
|
final bool isUpdate;
|
|
|
|
const RegisterConfirmationPatientPage(
|
|
{Key key,
|
|
this.operationReportViewModel,
|
|
this.patient,
|
|
this.visitType,
|
|
this.isUpdate})
|
|
: super(key: key);
|
|
|
|
@override
|
|
_RegisterConfirmationPatientPageState createState() =>
|
|
_RegisterConfirmationPatientPageState();
|
|
}
|
|
|
|
class _RegisterConfirmationPatientPageState
|
|
extends State<RegisterConfirmationPatientPage> {
|
|
int selectedType;
|
|
bool isSubmitted = false;
|
|
stt.SpeechToText speech = stt.SpeechToText();
|
|
var reconizedWord;
|
|
var event = RobotProvider();
|
|
ProjectViewModel projectViewModel;
|
|
TextEditingController firstName = TextEditingController(text: "Elham");
|
|
TextEditingController middleName = TextEditingController(text: "Ali");
|
|
TextEditingController lastName = TextEditingController(text: "Rababah");
|
|
TextEditingController emailAddressController = TextEditingController(text: "Elham@Rababah.com");
|
|
|
|
setSelectedType(int val) {
|
|
setState(() {
|
|
selectedType = val;
|
|
});
|
|
}
|
|
|
|
@override
|
|
void initState() {
|
|
super.initState();
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
projectViewModel = Provider.of(context);
|
|
return AppScaffold(
|
|
isShowAppBar: false,
|
|
backgroundColor: Color(0xFFF8F8F8),
|
|
body: SingleChildScrollView(
|
|
child: Container(
|
|
height: MediaQuery.of(context).size.height * 1.0,
|
|
child: Padding(
|
|
padding: EdgeInsets.all(0.0),
|
|
child: SingleChildScrollView(
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
SizedBox(
|
|
height: 10.0,
|
|
),
|
|
SingleChildScrollView(
|
|
child: Center(
|
|
child: FractionallySizedBox(
|
|
widthFactor: 0.9,
|
|
child: Column(
|
|
children: [
|
|
CustomEditableText(
|
|
controller: firstName, hint: TranslationBase.of(context).firstName),
|
|
SizedBox(
|
|
height: 4,
|
|
),
|
|
CustomEditableText(
|
|
controller: middleName, hint: TranslationBase.of(context).middleName),
|
|
SizedBox(
|
|
height: 4,
|
|
),
|
|
CustomEditableText(
|
|
controller: lastName, hint: TranslationBase.of(context).lastName),
|
|
SizedBox(
|
|
height: 20,
|
|
),
|
|
|
|
FractionallySizedBox(
|
|
widthFactor: .9,
|
|
child: Center(
|
|
child: Column(
|
|
children: [
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
|
|
Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
AppText(TranslationBase.of(context).healthID, fontSize: 12, color: Colors.black),
|
|
AppText(
|
|
"123456",
|
|
fontSize: 12,
|
|
color: Colors.grey[600],
|
|
),
|
|
],
|
|
),
|
|
Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
AppText(TranslationBase.of(context).identityNumber, fontSize: 12, color: Colors.black),
|
|
AppText(
|
|
"ss",
|
|
fontSize: 12,
|
|
color: Colors.grey[600],
|
|
),
|
|
],
|
|
),
|
|
SizedBox(width: 20,)
|
|
],
|
|
),
|
|
SizedBox(
|
|
height: 20,
|
|
),
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
|
|
Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
AppText(TranslationBase.of(context).nationality, fontSize: 12, color: Colors.black),
|
|
AppText(
|
|
"Jordanian",
|
|
fontSize: 12,
|
|
color: Colors.grey[600],
|
|
),
|
|
],
|
|
),
|
|
Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
AppText(TranslationBase.of(context).occupation, fontSize: 12, color: Colors.black),
|
|
AppText(
|
|
"--",
|
|
fontSize: 12,
|
|
color: Colors.grey[600],
|
|
),
|
|
],
|
|
),
|
|
SizedBox(width: 20,)
|
|
],
|
|
),
|
|
SizedBox(
|
|
height: 20,
|
|
),
|
|
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
|
|
Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
AppText(TranslationBase.of(context).mobileNo, fontSize: 12, color: Colors.black),
|
|
AppText(
|
|
"075XXXXXX",
|
|
fontSize: 12,
|
|
color: Colors.grey[600],
|
|
),
|
|
],
|
|
),
|
|
SizedBox(width: 20,)
|
|
],
|
|
),
|
|
SizedBox(
|
|
height: 20,
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
|
|
AppTextFieldCustom(
|
|
height: Helpers.getTextFieldHeight(),
|
|
enabled: false,
|
|
onClick: () {
|
|
// MasterKeyDailog dialog =
|
|
// MasterKeyDailog(
|
|
// list:
|
|
// model.medicationDoseTimeList,
|
|
// okText:
|
|
// TranslationBase.of(context)
|
|
// .ok,
|
|
// selectedValue:
|
|
// _selectedMedicationDose,
|
|
// okFunction: (selectedValue) {
|
|
// setState(() {
|
|
// _selectedMedicationDose =
|
|
// selectedValue;
|
|
//
|
|
// doseController
|
|
// .text = projectViewModel
|
|
// .isArabic
|
|
// ? _selectedMedicationDose
|
|
// .nameAr
|
|
// : _selectedMedicationDose
|
|
// .nameEn;
|
|
// });
|
|
// },
|
|
// );
|
|
// showDialog(
|
|
// barrierDismissible: false,
|
|
// context: context,
|
|
// builder: (BuildContext context) {
|
|
// return dialog;
|
|
// },
|
|
// );
|
|
},
|
|
hintText:
|
|
TranslationBase.of(context).maritalStatus,
|
|
maxLines: 1,
|
|
minLines: 1,
|
|
isTextFieldHasSuffix: true,
|
|
// controller: doseController,
|
|
// validationError: isFormSubmitted &&
|
|
// _selectedMedicationDose == null
|
|
// ? TranslationBase.of(context)
|
|
// .emptyMessage
|
|
// : null,
|
|
),
|
|
SizedBox(
|
|
height: 20,
|
|
),
|
|
AppTextFieldCustom(
|
|
height: Helpers.getTextFieldHeight(),
|
|
enabled: false,
|
|
onClick: () {
|
|
// MasterKeyDailog dialog =
|
|
// MasterKeyDailog(
|
|
// list:
|
|
// model.medicationDoseTimeList,
|
|
// okText:
|
|
// TranslationBase.of(context)
|
|
// .ok,
|
|
// selectedValue:
|
|
// _selectedMedicationDose,
|
|
// okFunction: (selectedValue) {
|
|
// setState(() {
|
|
// _selectedMedicationDose =
|
|
// selectedValue;
|
|
//
|
|
// doseController
|
|
// .text = projectViewModel
|
|
// .isArabic
|
|
// ? _selectedMedicationDose
|
|
// .nameAr
|
|
// : _selectedMedicationDose
|
|
// .nameEn;
|
|
// });
|
|
// },
|
|
// );
|
|
// showDialog(
|
|
// barrierDismissible: false,
|
|
// context: context,
|
|
// builder: (BuildContext context) {
|
|
// return dialog;
|
|
// },
|
|
// );
|
|
},
|
|
hintText:
|
|
TranslationBase.of(context).lanEnglish,
|
|
maxLines: 1,
|
|
minLines: 1,
|
|
isTextFieldHasSuffix: true,
|
|
// controller: doseController,
|
|
// validationError: isFormSubmitted &&
|
|
// _selectedMedicationDose == null
|
|
// ? TranslationBase.of(context)
|
|
// .emptyMessage
|
|
// : null,
|
|
),
|
|
SizedBox(
|
|
height: 20,
|
|
),
|
|
AppTextFieldCustom(
|
|
hintText: "Email Address",
|
|
//TranslationBase.of(context).addoperationReports,
|
|
controller: emailAddressController,
|
|
maxLines: 1,
|
|
minLines: 1,
|
|
hasBorder: true,
|
|
),
|
|
|
|
SizedBox(
|
|
height: 400,
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|