|
|
|
@ -3,10 +3,12 @@ import 'package:doctor_app_flutter/core/enum/patient_type.dart';
|
|
|
|
import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart';
|
|
|
|
import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart';
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart';
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart';
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart';
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/authentication_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/patient_search/patient_search_result_screen.dart';
|
|
|
|
import 'package:doctor_app_flutter/screens/patients/patient_search/patient_search_result_screen.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/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';
|
|
|
|
@ -30,10 +32,12 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
|
|
|
|
TextEditingController lastNameFileInfoController = TextEditingController();
|
|
|
|
TextEditingController lastNameFileInfoController = TextEditingController();
|
|
|
|
PatientType selectedPatientType = PatientType.inPatient;
|
|
|
|
PatientType selectedPatientType = PatientType.inPatient;
|
|
|
|
AuthenticationViewModel authenticationViewModel = AuthenticationViewModel();
|
|
|
|
AuthenticationViewModel authenticationViewModel = AuthenticationViewModel();
|
|
|
|
|
|
|
|
ProjectViewModel projectViewModel = ProjectViewModel();
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
authenticationViewModel = Provider.of(context);
|
|
|
|
authenticationViewModel = Provider.of(context);
|
|
|
|
|
|
|
|
projectViewModel= Provider.of(context);
|
|
|
|
return BaseView<PatientSearchViewModel>(
|
|
|
|
return BaseView<PatientSearchViewModel>(
|
|
|
|
onModelReady: (model) async {},
|
|
|
|
onModelReady: (model) async {},
|
|
|
|
builder: (_, model, w) => AppScaffold(
|
|
|
|
builder: (_, model, w) => AppScaffold(
|
|
|
|
@ -126,6 +130,11 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
|
|
|
|
isFormSubmitted = true;
|
|
|
|
isFormSubmitted = true;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
PatientSearchRequestModel patientSearchRequestModel = PatientSearchRequestModel(doctorID: authenticationViewModel.doctorProfile!.doctorID);
|
|
|
|
PatientSearchRequestModel patientSearchRequestModel = PatientSearchRequestModel(doctorID: authenticationViewModel.doctorProfile!.doctorID);
|
|
|
|
|
|
|
|
var isVidaPlusProject =
|
|
|
|
|
|
|
|
Utils.isVidaPlusProject(projectViewModel, authenticationViewModel.doctorProfile!.projectID ?? -1);
|
|
|
|
|
|
|
|
if(isVidaPlusProject){
|
|
|
|
|
|
|
|
patientSearchRequestModel.transformDataForVidaPlus();
|
|
|
|
|
|
|
|
}
|
|
|
|
if (showOther) {
|
|
|
|
if (showOther) {
|
|
|
|
patientSearchRequestModel.firstName = firstNameInfoController.text.trim().isEmpty ? "0" : firstNameInfoController.text.trim();
|
|
|
|
patientSearchRequestModel.firstName = firstNameInfoController.text.trim().isEmpty ? "0" : firstNameInfoController.text.trim();
|
|
|
|
patientSearchRequestModel.middleName = middleNameInfoController.text.trim().isEmpty ? "0" : middleNameInfoController.text.trim();
|
|
|
|
patientSearchRequestModel.middleName = middleNameInfoController.text.trim().isEmpty ? "0" : middleNameInfoController.text.trim();
|
|
|
|
|