|
|
|
|
@ -3,6 +3,7 @@ import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/models/patient/my_referral/PendingReferral.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/util/date-utils.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/profile/PatientProfileButton.dart';
|
|
|
|
|
@ -13,6 +14,8 @@ import 'package:doctor_app_flutter/widgets/shared/borderedButton.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
|
|
import '../../../../routes.dart';
|
|
|
|
|
|
|
|
|
|
class MyReferralDetailScreen extends StatelessWidget {
|
|
|
|
|
PendingReferral pendingReferral;
|
|
|
|
|
|
|
|
|
|
@ -25,6 +28,14 @@ class MyReferralDetailScreen extends StatelessWidget {
|
|
|
|
|
pendingReferral = routeArgs['referral'];
|
|
|
|
|
|
|
|
|
|
return BaseView<PatientReferralViewModel>(
|
|
|
|
|
onModelReady: (model) => model.getPatientDetails(
|
|
|
|
|
DateUtils.convertStringToDateFormat(
|
|
|
|
|
DateTime.now().subtract(Duration(days: 350)).toString(),
|
|
|
|
|
"yyyy-MM-dd"),
|
|
|
|
|
DateUtils.convertStringToDateFormat(
|
|
|
|
|
DateTime.now().toString(), "yyyy-MM-dd"),
|
|
|
|
|
pendingReferral.patientID,
|
|
|
|
|
pendingReferral.sourceAppointmentNo),
|
|
|
|
|
builder: (_, model, w) => AppScaffold(
|
|
|
|
|
baseViewModel: model,
|
|
|
|
|
appBarTitle: TranslationBase.of(context).referPatient,
|
|
|
|
|
@ -63,8 +74,10 @@ class MyReferralDetailScreen extends StatelessWidget {
|
|
|
|
|
patientName: pendingReferral.patientName,
|
|
|
|
|
referralStatus: null,
|
|
|
|
|
isReferredTo: false,
|
|
|
|
|
isSameBranch: pendingReferral.isReferralDoctorSameBranch,
|
|
|
|
|
referralDoctorName: pendingReferral.referredByDoctorInfo,
|
|
|
|
|
isSameBranch:
|
|
|
|
|
pendingReferral.isReferralDoctorSameBranch,
|
|
|
|
|
referralDoctorName:
|
|
|
|
|
pendingReferral.referredByDoctorInfo,
|
|
|
|
|
clinicDescription: null,
|
|
|
|
|
remark: pendingReferral.remarksFromSource,
|
|
|
|
|
),
|
|
|
|
|
@ -73,7 +86,8 @@ class MyReferralDetailScreen extends StatelessWidget {
|
|
|
|
|
childAspectRatio: 1.8,
|
|
|
|
|
crossAxisSpacing: 8,
|
|
|
|
|
mainAxisSpacing: 10,
|
|
|
|
|
controller: new ScrollController(keepScrollOffset: false),
|
|
|
|
|
controller:
|
|
|
|
|
new ScrollController(keepScrollOffset: false),
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
padding: const EdgeInsets.all(4.0),
|
|
|
|
|
crossAxisCount: 2,
|
|
|
|
|
@ -82,8 +96,10 @@ class MyReferralDetailScreen extends StatelessWidget {
|
|
|
|
|
key: key,
|
|
|
|
|
// patient: patient,
|
|
|
|
|
// route: RADIOLOGY,
|
|
|
|
|
nameLine1: TranslationBase.of(context).previewHealth,
|
|
|
|
|
nameLine2: TranslationBase.of(context).summaryReport,
|
|
|
|
|
nameLine1:
|
|
|
|
|
TranslationBase.of(context).previewHealth,
|
|
|
|
|
nameLine2:
|
|
|
|
|
TranslationBase.of(context).summaryReport,
|
|
|
|
|
icon: 'radiology-1.png'),
|
|
|
|
|
PatientProfileButton(
|
|
|
|
|
key: key,
|
|
|
|
|
@ -95,7 +111,7 @@ class MyReferralDetailScreen extends StatelessWidget {
|
|
|
|
|
PatientProfileButton(
|
|
|
|
|
key: key,
|
|
|
|
|
// patient: patient,
|
|
|
|
|
// route: VITAL_SIGN_DETAILS,
|
|
|
|
|
route: PATIENT_VITAL_SIGN,
|
|
|
|
|
nameLine1: TranslationBase.of(context).vital,
|
|
|
|
|
nameLine2: TranslationBase.of(context).signs,
|
|
|
|
|
icon: 'heartbeat.png'),
|
|
|
|
|
@ -119,7 +135,7 @@ class MyReferralDetailScreen extends StatelessWidget {
|
|
|
|
|
fontSize: 16,
|
|
|
|
|
hPadding: 8,
|
|
|
|
|
vPadding: 12,
|
|
|
|
|
handler: (){
|
|
|
|
|
handler: () {
|
|
|
|
|
model.responseReferral(pendingReferral, true);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
@ -135,7 +151,7 @@ class MyReferralDetailScreen extends StatelessWidget {
|
|
|
|
|
fontSize: 16,
|
|
|
|
|
hPadding: 8,
|
|
|
|
|
vPadding: 12,
|
|
|
|
|
handler: (){
|
|
|
|
|
handler: () {
|
|
|
|
|
model.responseReferral(pendingReferral, false);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
|