|
|
|
@ -5,10 +5,12 @@ import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dar
|
|
|
|
import 'package:doctor_app_flutter/locator.dart';
|
|
|
|
import 'package:doctor_app_flutter/locator.dart';
|
|
|
|
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
|
|
|
import 'package:doctor_app_flutter/models/patient/patiant_info_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_dialog_button.dart';
|
|
|
|
import 'package:doctor_app_flutter/util/date-utils.dart';
|
|
|
|
import 'package:doctor_app_flutter/util/date-utils.dart';
|
|
|
|
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
|
|
|
|
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
|
|
|
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
|
|
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
|
|
|
import 'package:doctor_app_flutter/widgets/patients/patient-referral-item-widget.dart';
|
|
|
|
import 'package:doctor_app_flutter/widgets/patients/patient-referral-item-widget.dart';
|
|
|
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/patients/patient_service_title.dart';
|
|
|
|
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
|
|
|
|
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.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/app_texts_widget.dart';
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
|
|
|
@ -85,26 +87,11 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
|
|
|
|
Column(
|
|
|
|
Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
/*PatientProfileHeaderNewDesign(
|
|
|
|
Padding(
|
|
|
|
patient, patientType, arrivalType),*/
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
|
|
|
Container(
|
|
|
|
child: ServiceTitle(
|
|
|
|
margin: EdgeInsets.all(16.0),
|
|
|
|
title: TranslationBase.of(context).refer,
|
|
|
|
child: Column(
|
|
|
|
subTitle: TranslationBase.of(context).patient,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
AppText(
|
|
|
|
|
|
|
|
"${TranslationBase.of(context).refer}",
|
|
|
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 1.6,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
AppText(
|
|
|
|
|
|
|
|
"${TranslationBase.of(context).patient}",
|
|
|
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 3,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
model.patientReferral.length == 0
|
|
|
|
model.patientReferral.length == 0
|
|
|
|
@ -165,16 +152,15 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
|
|
|
|
.referredByDoctorInfo,
|
|
|
|
.referredByDoctorInfo,
|
|
|
|
clinicDescription: null,
|
|
|
|
clinicDescription: null,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
SizedBox(
|
|
|
|
|
|
|
|
height: 10,
|
|
|
|
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
if (model.patientReferral.length == 0)
|
|
|
|
if (model.patientReferral.length == 0)
|
|
|
|
Container(
|
|
|
|
BottomSheetDialogButton(
|
|
|
|
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
|
|
|
label: "${TranslationBase.of(context).refer}",
|
|
|
|
child: AppButton(
|
|
|
|
onTap: () async {
|
|
|
|
title: TranslationBase.of(context).refer,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
|
|
|
color: HexColor("#359846"),
|
|
|
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
|
|
|
await locator<AnalyticsService>().logEvent(
|
|
|
|
await locator<AnalyticsService>().logEvent(
|
|
|
|
eventCategory: "Refer Patient",
|
|
|
|
eventCategory: "Refer Patient",
|
|
|
|
eventAction: "Submit Refer",
|
|
|
|
eventAction: "Submit Refer",
|
|
|
|
@ -222,9 +208,63 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
|
|
|
|
TranslationBase.of(context).referralSuccessMsg);
|
|
|
|
TranslationBase.of(context).referralSuccessMsg);
|
|
|
|
Navigator.pop(context);
|
|
|
|
Navigator.pop(context);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
}
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
// child: AppButton(
|
|
|
|
|
|
|
|
// title: TranslationBase.of(context).refer,
|
|
|
|
|
|
|
|
// fontWeight: FontWeight.w700,
|
|
|
|
|
|
|
|
// color: HexColor("#359846"),
|
|
|
|
|
|
|
|
// onPressed: () async {
|
|
|
|
|
|
|
|
// await locator<AnalyticsService>().logEvent(
|
|
|
|
|
|
|
|
// eventCategory: "Refer Patient",
|
|
|
|
|
|
|
|
// eventAction: "Submit Refer",
|
|
|
|
|
|
|
|
// );
|
|
|
|
|
|
|
|
// if (_referTo == null) {
|
|
|
|
|
|
|
|
// branchError =
|
|
|
|
|
|
|
|
// TranslationBase.of(context).fieldRequired;
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// branchError = null;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// if (_selectedBranch == null) {
|
|
|
|
|
|
|
|
// hospitalError =
|
|
|
|
|
|
|
|
// TranslationBase.of(context).fieldRequired;
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// hospitalError = null;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// if (_selectedClinic == null) {
|
|
|
|
|
|
|
|
// clinicError =
|
|
|
|
|
|
|
|
// TranslationBase.of(context).fieldRequired;
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// clinicError = null;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// if (_selectedDoctor == null) {
|
|
|
|
|
|
|
|
// doctorError =
|
|
|
|
|
|
|
|
// TranslationBase.of(context).fieldRequired;
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// doctorError = null;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// if (appointmentDate == null ||
|
|
|
|
|
|
|
|
// _selectedBranch == null ||
|
|
|
|
|
|
|
|
// _selectedClinic == null ||
|
|
|
|
|
|
|
|
// _selectedDoctor == null ||
|
|
|
|
|
|
|
|
// _remarksController.text == null) return;
|
|
|
|
|
|
|
|
// model
|
|
|
|
|
|
|
|
// .makeReferral(
|
|
|
|
|
|
|
|
// patient,
|
|
|
|
|
|
|
|
// appointmentDate.toIso8601String(),
|
|
|
|
|
|
|
|
// _selectedBranch['facilityId'],
|
|
|
|
|
|
|
|
// _selectedClinic['ClinicID'],
|
|
|
|
|
|
|
|
// _selectedDoctor['DoctorID'],
|
|
|
|
|
|
|
|
// _remarksController.text)
|
|
|
|
|
|
|
|
// .then((_) {
|
|
|
|
|
|
|
|
// DrAppToastMsg.showSuccesToast(
|
|
|
|
|
|
|
|
// TranslationBase.of(context).referralSuccessMsg);
|
|
|
|
|
|
|
|
// Navigator.pop(context);
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|