fix referral patient

merge-requests/763/head
Elham Rababah 5 years ago
parent ec3ac18a15
commit 1af52dc5b7

@ -57,11 +57,33 @@ class MyReferralPatientModel {
bool isDoctorLate; bool isDoctorLate;
bool isDoctorResponse; bool isDoctorResponse;
String nationalityFlagURL; String nationalityFlagURL;
String nursingStationName; String nursingStationName;
String priorityDescription; String priorityDescription;
String referringClinicDescription; String referringClinicDescription;
String referringDoctorName; String referringDoctorName;
int referalStatus; int referalStatus;
String sourceSetupID;
int sourceProjectId;
String targetSetupID;
int targetProjectId;
int targetClinicID;
int targetDoctorID;
int sourceAppointmentNo;
int targetAppointmentNo;
MyReferralPatientModel( MyReferralPatientModel(
{this.rowID, {this.rowID,
@ -104,27 +126,27 @@ class MyReferralPatientModel {
this.referralResponseOn, this.referralResponseOn,
this.priority, this.priority,
this.frequency, this.frequency,
this.mAXResponseTime, this.mAXResponseTime,
this.episodeID, this.episodeID,
this.appointmentNo, this.appointmentNo,
this.appointmentDate, this.appointmentDate,
this.appointmentType, this.appointmentType,
this.patientMRN, this.patientMRN,
this.createdOn, this.createdOn,
this.clinicID, this.clinicID,
this.nationalityID, this.nationalityID,
this.age, this.age,
this.doctorImageURL, this.doctorImageURL,
this.frequencyDescription, this.frequencyDescription,
this.genderDescription, this.genderDescription,
this.isDoctorLate, this.isDoctorLate,
this.isDoctorResponse, this.isDoctorResponse,
this.nationalityFlagURL, this.nationalityFlagURL,
this.nursingStationName, this.nursingStationName,
this.priorityDescription, this.priorityDescription,
this.referringClinicDescription, this.referringClinicDescription,
this.referringDoctorName, this.referringDoctorName,
this.referalStatus}); this.referalStatus, this.sourceSetupID, this.sourceAppointmentNo, this.sourceProjectId, this.targetProjectId, this.targetAppointmentNo, this.targetClinicID, this.targetSetupID, this.targetDoctorID});
MyReferralPatientModel.fromJson(Map<String, dynamic> json) { MyReferralPatientModel.fromJson(Map<String, dynamic> json) {
rowID = json['RowID']; rowID = json['RowID'];
@ -201,7 +223,14 @@ class MyReferralPatientModel {
priorityDescription = json['PriorityDescription']; priorityDescription = json['PriorityDescription'];
referringClinicDescription = json['ReferringClinicDescription']; referringClinicDescription = json['ReferringClinicDescription'];
referringDoctorName = json['ReferringDoctorName']; referringDoctorName = json['ReferringDoctorName'];
} sourceSetupID = json['SourceSetupID'];
sourceProjectId = json['SourceProjectId'];
targetSetupID = json['TargetSetupID'];
targetProjectId = json['TargetProjectId'];
targetClinicID = json['TargetClinicID'];
targetDoctorID = json['TargetDoctorID'];
sourceAppointmentNo = json['SourceAppointmentNo'];
targetAppointmentNo = json['TargetAppointmentNo']; }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = new Map<String, dynamic>();
@ -266,6 +295,14 @@ class MyReferralPatientModel {
data['PriorityDescription'] = this.priorityDescription; data['PriorityDescription'] = this.priorityDescription;
data['ReferringClinicDescription'] = this.referringClinicDescription; data['ReferringClinicDescription'] = this.referringClinicDescription;
data['ReferringDoctorName'] = this.referringDoctorName; data['ReferringDoctorName'] = this.referringDoctorName;
data['SourceSetupID'] = this.sourceSetupID;
data['SourceProjectId'] = this.sourceProjectId;
data['TargetSetupID'] = this.targetSetupID;
data['TargetProjectId'] = this.targetProjectId;
data['TargetClinicID'] = this.targetClinicID;
data['TargetDoctorID'] = this.targetDoctorID;
data['SourceAppointmentNo'] = this.sourceAppointmentNo;
data['TargetAppointmentNo'] = this.targetAppointmentNo;
return data; return data;
} }

@ -100,20 +100,22 @@ class MyReferralInPatientService extends BaseService {
); );
} }
Future replayReferred(String referredDoctorRemarks, MyReferralPatientModel referral, int referalStatus) async { Future replayReferred(String referredDoctorRemarks, MyReferralPatientModel referral, int referralStatus) async {
hasError = false; hasError = false;
await getDoctorProfile(); await getDoctorProfile();
AddReferredRemarksRequestModel _requestAddReferredDoctorRemarks = AddReferredRemarksRequestModel( AddReferredRemarksRequestModel _requestAddReferredDoctorRemarks = AddReferredRemarksRequestModel(
editedBy: doctorProfile.doctorID, editedBy: doctorProfile.doctorID,
projectID: doctorProfile.projectID, projectID: doctorProfile.projectID,
referredDoctorRemarks: referredDoctorRemarks, referredDoctorRemarks: referredDoctorRemarks,
referalStatus: referalStatus); referalStatus: referralStatus);
_requestAddReferredDoctorRemarks.projectID = referral.projectID; _requestAddReferredDoctorRemarks.projectID = referral.projectID;
//TODO Check this in case out patient
_requestAddReferredDoctorRemarks.admissionNo = int.parse(referral.admissionNo); _requestAddReferredDoctorRemarks.admissionNo = int.parse(referral.admissionNo);
_requestAddReferredDoctorRemarks.lineItemNo = referral.lineItemNo; _requestAddReferredDoctorRemarks.lineItemNo = referral.lineItemNo;
_requestAddReferredDoctorRemarks.referredDoctorRemarks = referredDoctorRemarks; _requestAddReferredDoctorRemarks.referredDoctorRemarks = referredDoctorRemarks;
_requestAddReferredDoctorRemarks.editedBy = doctorProfile.doctorID; _requestAddReferredDoctorRemarks.editedBy = doctorProfile.doctorID;
_requestAddReferredDoctorRemarks.referalStatus = referalStatus; _requestAddReferredDoctorRemarks.referalStatus = referralStatus;
// _requestAddReferredDoctorRemarks.patientID = referral.patientID; // _requestAddReferredDoctorRemarks.patientID = referral.patientID;
// _requestAddReferredDoctorRemarks.referringDoctor = referral.referringDoctor; // _requestAddReferredDoctorRemarks.referringDoctor = referral.referringDoctor;

@ -1,4 +1,5 @@
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/referral/MyReferralPatientModel.dart';
import 'package:doctor_app_flutter/lookups/hospital_lookup.dart'; import 'package:doctor_app_flutter/lookups/hospital_lookup.dart';
import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart'; import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/models/patient/get_clinic_by_project_id_request.dart'; import 'package:doctor_app_flutter/models/patient/get_clinic_by_project_id_request.dart';
@ -242,18 +243,18 @@ class PatientReferralService extends LookupService {
} }
Future responseReferral( Future responseReferral(
PendingReferral pendingReferral, bool isAccepted) async { MyReferralPatientModel referralPatient, bool isAccepted) async {
hasError = false; hasError = false;
DoctorProfileModel doctorProfile = await getDoctorProfile(); DoctorProfileModel doctorProfile = await getDoctorProfile();
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['PatientMRN'] = pendingReferral.patientID; body['PatientMRN'] = referralPatient.patientID;
body['AppointmentNo'] = pendingReferral.targetAppointmentNo; body['AppointmentNo'] = referralPatient.targetAppointmentNo;
body['SetupID'] = pendingReferral.targetSetupID; body['SetupID'] = referralPatient.targetSetupID;
body['ProjectID'] = pendingReferral.targetProjectId; body['ProjectID'] = referralPatient.targetProjectId;
body['IsAccepted'] = isAccepted; body['IsAccepted'] = isAccepted;
body['PatientName'] = pendingReferral.patientName; body['PatientName'] = referralPatient.patientName;
body['ReferralResponse'] = pendingReferral.remarksFromSource; body['ReferralResponse'] = referralPatient.referringDoctorRemarks;
body['DoctorName'] = doctorProfile.doctorName; body['DoctorName'] = doctorProfile.doctorName;
await baseAppClient.post( await baseAppClient.post(

@ -203,9 +203,9 @@ class PatientReferralViewModel extends BaseViewModel {
getMyReferralPatientService(); getMyReferralPatientService();
} }
Future responseReferral(PendingReferral pendingReferral, bool isAccepted) async { Future responseReferral(MyReferralPatientModel referralPatient, bool isAccepted) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _referralPatientService.responseReferral(pendingReferral, isAccepted); await _referralPatientService.responseReferral(referralPatient, isAccepted);
if (_referralPatientService.hasError) { if (_referralPatientService.hasError) {
error = _referralPatientService.error; error = _referralPatientService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
@ -392,9 +392,9 @@ class PatientReferralViewModel extends BaseViewModel {
return patient; return patient;
} }
Future replayReferred(String referredDoctorRemarks, MyReferralPatientModel referral, int referalStatus) async { Future replayReferred(String referredDoctorRemarks, MyReferralPatientModel referral, int referralStatus) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _myReferralService.replayReferred(referredDoctorRemarks, referral, referalStatus); await _myReferralService.replayReferred(referredDoctorRemarks, referral, referralStatus);
if (_myReferralService.hasError) { if (_myReferralService.hasError) {
error = _myReferralService.error; error = _myReferralService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);

@ -149,14 +149,6 @@ class _AddReplayOnReferralPatientState extends State<AddReplayOnReferralPatient>
DrAppToastMsg.showSuccesToast("Has been rejected"); DrAppToastMsg.showSuccesToast("Has been rejected");
Navigator.of(context).pop(); Navigator.of(context).pop();
Navigator.of(context).pop(); Navigator.of(context).pop();
// Navigator.push(
// context,
// FadePage(
// page: ReplySummeryOnReferralPatient(
// widget.myReferralInPatientModel, replayOnReferralController.text.trim()),
// ),
// );
} }
} else { } else {
Helpers.showErrorToast("You can't add empty reply"); Helpers.showErrorToast("You can't add empty reply");
@ -190,14 +182,6 @@ class _AddReplayOnReferralPatientState extends State<AddReplayOnReferralPatient>
DrAppToastMsg.showSuccesToast("Your Reply Added Successfully"); DrAppToastMsg.showSuccesToast("Your Reply Added Successfully");
Navigator.of(context).pop(); Navigator.of(context).pop();
Navigator.of(context).pop(); Navigator.of(context).pop();
// Navigator.push(
// context,
// FadePage(
// page: ReplySummeryOnReferralPatient(
// widget.myReferralInPatientModel, replayOnReferralController.text.trim()),
// ),
// );
} }
} else { } else {
Helpers.showErrorToast("You can't add empty reply"); Helpers.showErrorToast("You can't add empty reply");
@ -214,48 +198,6 @@ class _AddReplayOnReferralPatientState extends State<AddReplayOnReferralPatient>
], ],
), ),
), ),
// Container(
// margin: EdgeInsets.all(5),
// child: AppButton(
// title: 'Submit Reply',
// color: Color(0xff359846),
// fontWeight: FontWeight.w700,
// onPressed: () async {
// setState(() {
// isSubmitted = true;
// });
// if (replayOnReferralController.text.isNotEmpty) {
// GifLoaderDialogUtils.showMyDialog(context);
// await widget.patientReferralViewModel.replay(
// replayOnReferralController.text.trim(),
// widget.myReferralInPatientModel);
// if (widget.patientReferralViewModel.state ==
// ViewState.ErrorLocal) {
// Helpers.showErrorToast(
// widget.patientReferralViewModel.error);
// } else {
// GifLoaderDialogUtils.hideDialog(context);
// DrAppToastMsg.showSuccesToast(
// "Your Reply Added Successfully");
// Navigator.of(context).pop();
// Navigator.of(context).pop();
//
// Navigator.push(
// context,
// FadePage(
// page: ReplySummeryOnReferralPatient(
// widget.myReferralInPatientModel,
// replayOnReferralController.text.trim()),
// ),
// );
// }
// } else {
// Helpers.showErrorToast("You can't add empty reply");
// setState(() {
// isSubmitted = false;
// });
// }
// })),
], ],
), ),
), ),

@ -1,8 +1,8 @@
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/viewstate.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/referral/MyReferralPatientModel.dart';
import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart'; import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.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/screens/base/base_view.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';
@ -13,476 +13,411 @@ 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';
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:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
// ignore: must_be_immutable // ignore: must_be_immutable
class MyReferralDetailScreen extends StatelessWidget { class MyReferralDetailScreen extends StatelessWidget {
PendingReferral pendingReferral; final MyReferralPatientModel referralPatient;
const MyReferralDetailScreen({Key key, this.referralPatient})
: super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map; // final routeArgs = ModalRoute.of(context).settings.arguments as Map;
pendingReferral = routeArgs['referral']; // pendingReferral = routeArgs['referral'];
return BaseView<PatientReferralViewModel>( return BaseView<PatientReferralViewModel>(
onModelReady: (model) => model.getPatientDetails( onModelReady: (model) => model.getDoctorProfile(),
AppDateUtils.convertStringToDateFormat(
DateTime.now() /*.subtract(Duration(days: 350))*/ .toString(),
"yyyy-MM-dd"),
AppDateUtils.convertStringToDateFormat(
DateTime.now().toString(), "yyyy-MM-dd"),
pendingReferral.patientID,
pendingReferral.sourceAppointmentNo),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
appBarTitle: TranslationBase.of(context).referPatient, appBarTitle: TranslationBase.of(context).referPatient,
isShowAppBar: false, isShowAppBar: false,
body: model.patientArrivalList != null && body: Column(
model.patientArrivalList.length > 0 children: [
? Column( Container(
children: [ padding: EdgeInsets.only(left: 0, right: 5, bottom: 5, top: 5),
Container( decoration: BoxDecoration(
padding: color: Colors.white,
EdgeInsets.only(left: 0, right: 5, bottom: 5, top: 5), ),
decoration: BoxDecoration( child: Container(
color: Colors.white, padding: EdgeInsets.only(left: 10, right: 10, bottom: 10),
), margin: EdgeInsets.only(top: 50),
child: Container( child: Column(
padding: EdgeInsets.only(left: 10, right: 10, bottom: 10), children: [
margin: EdgeInsets.only(top: 50), Container(
child: Column( padding: EdgeInsets.only(left: 12.0),
child: Row(children: [
IconButton(
icon: Icon(Icons.arrow_back_ios),
color: Colors.black, //Colors.black,
onPressed: () => Navigator.pop(context),
),
Expanded(
child: AppText(
(Helpers.capitalize(referralPatient.firstName + " "+
referralPatient.lastName)),
fontSize: SizeConfig.textMultiplier * 2.5,
fontWeight: FontWeight.bold,
fontFamily: 'Poppins',
),
),
referralPatient.gender == 1
? Icon(
DoctorApp.male_2,
color: Colors.blue,
)
: Icon(
DoctorApp.female_1,
color: Colors.pink,
),
]),
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Padding(
padding: EdgeInsets.only(left: 12.0), padding: EdgeInsets.only(left: 12.0),
child: Row(children: [ child: Container(
IconButton( width: 60,
icon: Icon(Icons.arrow_back_ios), height: 60,
color: Colors.black, //Colors.black, child: Image.asset(
onPressed: () => Navigator.pop(context), referralPatient.gender == 1
), ? 'assets/images/male_avatar.png'
Expanded( : 'assets/images/female_avatar.png',
child: AppText( fit: BoxFit.cover,
(Helpers.capitalize(model
.patientArrivalList[0]
.patientDetails
.fullName)),
fontSize: SizeConfig.textMultiplier * 2.5,
fontWeight: FontWeight.bold,
fontFamily: 'Poppins',
),
), ),
model.patientArrivalList[0].patientDetails ),
.gender ==
1
? Icon(
DoctorApp.male_2,
color: Colors.blue,
)
: Icon(
DoctorApp.female_1,
color: Colors.pink,
),
]),
), ),
Row( SizedBox(
crossAxisAlignment: CrossAxisAlignment.start, width: 10,
children: [ ),
Padding( Expanded(
padding: EdgeInsets.only(left: 12.0), child: Column(
child: Container( children: [
width: 60, Row(
height: 60, mainAxisAlignment:
child: Image.asset( MainAxisAlignment.spaceBetween,
pendingReferral.patientDetails.gender == 1 children: [
? 'assets/images/male_avatar.png' AppText(
: 'assets/images/female_avatar.png', referralPatient.referralStatus != null
fit: BoxFit.cover, ? model.getReferralStatusNameByCode(
), referralPatient.referralStatus,
context)
: "",
fontFamily: 'Poppins',
fontSize: 1.9 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w700,
color: referralPatient.referralStatus == 1
? Color(0xffc4aa54)
: referralPatient.referralStatus ==
46 ||
referralPatient
.referralStatus ==
2
? Colors.green[700]
: Colors.red[700],
),
AppText(
AppDateUtils.getDayMonthYearDateFormatted(
referralPatient.referralDate),
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
fontSize:
2.0 * SizeConfig.textMultiplier,
color: Color(0XFF28353E),
)
],
), ),
), Row(
SizedBox( mainAxisAlignment:
width: 10, MainAxisAlignment.spaceBetween,
),
Expanded(
child: Column(
children: [ children: [
Row( Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.spaceBetween, MainAxisAlignment.start,
children: [ children: [
AppText( AppText(
pendingReferral.referralStatus != null TranslationBase.of(context)
? pendingReferral.referralStatus .fileNumber,
: "",
fontFamily: 'Poppins',
fontSize:
1.9 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w700,
color: pendingReferral
.referralStatus !=
null
? pendingReferral
.referralStatus ==
'Pending'
? Color(0xffc4aa54)
: pendingReferral
.referralStatus ==
'Accepted'
? Colors.green[700]
: Colors.red[700]
: Colors.grey[500],
),
AppText(
pendingReferral.referredOn
.split(" ")[0],
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: fontSize:
2.0 * SizeConfig.textMultiplier, 1.7 * SizeConfig.textMultiplier,
color: Color(0XFF28353E), color: Color(0XFF575757),
)
],
),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context)
.fileNumber,
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
fontSize: 1.7 *
SizeConfig.textMultiplier,
color: Color(0XFF575757),
),
AppText(
"${pendingReferral.patientID}",
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
fontSize: 1.8 *
SizeConfig.textMultiplier,
color: Color(0XFF2E303A),
),
],
), ),
AppText( AppText(
pendingReferral.referredOn "${referralPatient.patientID}",
.split(" ")[1],
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w700,
fontSize: fontSize:
1.8 * SizeConfig.textMultiplier, 1.8 * SizeConfig.textMultiplier,
color: Color(0XFF575757), color: Color(0XFF2E303A),
) ),
], ],
), ),
Row( AppText(
mainAxisAlignment: AppDateUtils.getTimeHHMMA(referralPatient.referralDate),
MainAxisAlignment.spaceBetween, fontFamily: 'Poppins',
crossAxisAlignment: fontWeight: FontWeight.w600,
CrossAxisAlignment.center, fontSize:
children: [ 1.8 * SizeConfig.textMultiplier,
Expanded( color: Color(0XFF575757),
child: Column( )
],
),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: Column(
children: [
//todo Elham* return this
// Row(
// mainAxisAlignment:
// MainAxisAlignment.start,
// children: [
// AppText(
// TranslationBase.of(context)
// .referredFrom,
// fontFamily: 'Poppins',
// fontWeight: FontWeight.w600,
// fontSize: 1.7 *
// SizeConfig.textMultiplier,
// color: Color(0XFF575757),
// ),
// AppText(
// referralPatient.projectID == model.doctorProfile.projectID
// ? TranslationBase.of(
// context)
// .sameBranch
// : TranslationBase.of(
// context)
// .otherBranch,
// fontFamily: 'Poppins',
// fontWeight: FontWeight.w700,
// fontSize: 1.8 *
// SizeConfig
// .textMultiplier,
// color: Color(0XFF2E303A),
// ),
// ],
// ),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [ children: [
Row( AppText(
mainAxisAlignment: TranslationBase.of(context)
MainAxisAlignment.start, .remarks +
children: [ " : ",
AppText( fontFamily: 'Poppins',
TranslationBase.of(context) fontWeight: FontWeight.w600,
.referredFrom, fontSize: 1.7 *
fontFamily: 'Poppins', SizeConfig.textMultiplier,
fontWeight: FontWeight.w600, color: Color(0XFF575757),
fontSize: 1.7 *
SizeConfig
.textMultiplier,
color: Color(0XFF575757),
),
AppText(
pendingReferral
.isReferralDoctorSameBranch
? TranslationBase.of(
context)
.sameBranch
: TranslationBase.of(
context)
.otherBranch,
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
fontSize: 1.8 *
SizeConfig
.textMultiplier,
color: Color(0XFF2E303A),
),
],
), ),
Row( Expanded(
mainAxisAlignment: child: AppText(
MainAxisAlignment.start, referralPatient.referringDoctorRemarks??
crossAxisAlignment: '',
CrossAxisAlignment.start, fontFamily: 'Poppins',
children: [ fontWeight: FontWeight.w700,
AppText( fontSize: 1.8 *
TranslationBase.of(context) SizeConfig.textMultiplier,
.remarks + color: Color(0XFF2E303A),
" : ", ),
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
fontSize: 1.7 *
SizeConfig
.textMultiplier,
color: Color(0XFF575757),
),
Expanded(
child: AppText(
pendingReferral
.remarksFromSource,
fontFamily: 'Poppins',
fontWeight:
FontWeight.w700,
fontSize: 1.8 *
SizeConfig
.textMultiplier,
color: Color(0XFF2E303A),
),
),
],
), ),
], ],
), ),
), ],
Row( ),
children: [
AppText(
pendingReferral.patientDetails
.nationalityName !=
null
? pendingReferral
.patientDetails
.nationalityName
: "",
fontWeight: FontWeight.bold,
color: Color(0xFF2E303A),
fontSize: 1.4 *
SizeConfig.textMultiplier,
),
pendingReferral
.nationalityFlagUrl !=
null
? ClipRRect(
borderRadius:
BorderRadius.circular(
20.0),
child: Image.network(
pendingReferral
.nationalityFlagUrl,
height: 25,
width: 30,
errorBuilder:
(BuildContext context,
Object exception,
StackTrace
stackTrace) {
return Text('No Image');
},
))
: SizedBox()
],
)
],
), ),
Row( Row(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [ children: [
Container( AppText(
margin: EdgeInsets.only( referralPatient.nationalityName !=
left: 10, right: 0), null
child: Image.asset( ? referralPatient.nationalityName
'assets/images/patient/ic_ref_arrow_up.png', : "",
height: 50, fontWeight: FontWeight.bold,
width: 30, color: Color(0xFF2E303A),
), fontSize:
1.4 * SizeConfig.textMultiplier,
), ),
Container( referralPatient.nationalityFlagURL !=
margin: EdgeInsets.only( null
left: 0, ? ClipRRect(
top: 25, borderRadius:
right: 0, BorderRadius.circular(20.0),
bottom: 0), child: Image.network(
padding: EdgeInsets.only( referralPatient
left: 4.0, right: 4.0), .nationalityFlagURL,
child: Container( height: 25,
width: 40, width: 30,
height: 40, errorBuilder: (BuildContext
child: CircleAvatar( context,
radius: 25.0, Object exception,
backgroundImage: NetworkImage( StackTrace stackTrace) {
pendingReferral return Text('No Image');
.doctorImageUrl), },
backgroundColor: ))
Colors.transparent, : SizedBox()
), ],
), )
],
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin:
EdgeInsets.only(left: 10, right: 0),
child: Image.asset(
'assets/images/patient/ic_ref_arrow_up.png',
height: 50,
width: 30,
),
),
Container(
margin: EdgeInsets.only(
left: 0,
top: 25,
right: 0,
bottom: 0),
padding: EdgeInsets.only(
left: 4.0, right: 4.0),
child: Container(
width: 40,
height: 40,
child: CircleAvatar(
radius: 25.0,
backgroundImage: NetworkImage(
referralPatient.doctorImageURL),
backgroundColor: Colors.transparent,
), ),
Expanded( ),
flex: 4, ),
child: Container( Expanded(
margin: EdgeInsets.only( flex: 4,
left: 10, child: Container(
top: 25, margin: EdgeInsets.only(
right: 10, left: 10,
bottom: 0), top: 25,
child: Column( right: 10,
children: [ bottom: 0),
AppText( child: Column(
pendingReferral children: [
.referredByDoctorInfo, AppText(
fontFamily: 'Poppins', referralPatient.doctorName,
fontWeight: FontWeight.w700, fontFamily: 'Poppins',
fontSize: 1.7 * fontWeight: FontWeight.w700,
SizeConfig.textMultiplier, fontSize: 1.7 *
color: Color(0XFF2E303A), SizeConfig.textMultiplier,
), color: Color(0XFF2E303A),
],
), ),
), ],
), ),
], ),
), ),
], ],
), ),
), ],
], ),
), ),
], ],
), ),
), ],
),
Expanded(
child: SingleChildScrollView(
child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 16,
),
Padding(
padding:
const EdgeInsets.symmetric(horizontal: 16),
child: SizedBox(
child: ProfileMedicalInfoWidgetSearch(
patient: model.patientArrivalList[0],
patientType: "7",
from: null,
to: null,
),
),
),
],
),
),
),
), ),
Container( ),
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16), ),
child: Row( Expanded(
child: SingleChildScrollView(
child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Expanded(
child: AppButton(
title: TranslationBase.of(context).accept,
color: Color(0xFF4BA821),
fontColor: Colors.white,
fontSize: 1.6,
hPadding: 8,
vPadding: 12,
onPressed: () async {
await model.responseReferral(
pendingReferral, true);
if (model.state == ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(model.error);
} else {
DrAppToastMsg.showSuccesToast(
TranslationBase.of(context)
.referralSuccessMsgAccept);
Navigator.pop(context);
Navigator.pop(context);
}
},
),
),
SizedBox( SizedBox(
width: 8, height: 16,
), ),
Expanded( Padding(
child: AppButton( padding: const EdgeInsets.symmetric(horizontal: 16),
title: TranslationBase.of(context).reject, child: SizedBox(
color: Color(0xFFB9382C), child: ProfileMedicalInfoWidgetSearch(
fontColor: Colors.white, patient: model
fontSize: 1.6, .getPatientFromReferralO(referralPatient),
hPadding: 8, patientType: "7",
vPadding: 12, isInpatient: false,
onPressed: () async { from: null,
await model.responseReferral( to: null,
pendingReferral, true); ),
if (model.state == ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(model.error);
} else {
DrAppToastMsg.showSuccesToast(
TranslationBase.of(context)
.referralSuccessMsgReject);
Navigator.pop(context);
Navigator.pop(context);
}
},
), ),
), ),
], ],
), ),
), ),
], ),
) ),
: Column( Container(
children: [ margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
Container( child: Row(
padding: EdgeInsets.only(left: 12.0), children: [
child: Row(children: [ Expanded(
IconButton( child: AppButton(
icon: Icon(Icons.arrow_back_ios), title: TranslationBase.of(context).accept,
color: Colors.black, //Colors.black, color: Color(0xFF4BA821),
onPressed: () => Navigator.pop(context), fontColor: Colors.white,
), fontSize: 1.6,
Expanded( hPadding: 8,
child: AppText( vPadding: 12,
"", onPressed: () async {
fontSize: SizeConfig.textMultiplier * 2.5, await model.responseReferral(referralPatient, true);
fontWeight: FontWeight.bold, if (model.state == ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(model.error);
fontFamily: 'Poppins', } else {
), DrAppToastMsg.showSuccesToast(
TranslationBase.of(context)
.referralSuccessMsgAccept);
Navigator.pop(context);
Navigator.pop(context);
}
},
), ),
]), ),
), SizedBox(
Container( width: 8,
child: Center( ),
child: AppText( Expanded(
TranslationBase.of(context).patientNoDetailErrMsg, child: AppButton(
color: HexColor("#B8382B"), title: TranslationBase.of(context).reject,
fontWeight: FontWeight.bold, color: Color(0xFFB9382C),
fontSize: 16, fontColor: Colors.white,
fontSize: 1.6,
hPadding: 8,
vPadding: 12,
onPressed: () async {
await model.responseReferral(referralPatient, false);
if (model.state == ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(model.error);
} else {
DrAppToastMsg.showSuccesToast(
TranslationBase.of(context)
.referralSuccessMsgReject);
Navigator.pop(context);
Navigator.pop(context);
}
},
), ),
), ),
), ],
], ),
), ),
), ],
)),
); );
} }
} }

@ -1,6 +1,7 @@
import 'package:doctor_app_flutter/core/enum/PatientType.dart'; import 'package:doctor_app_flutter/core/enum/PatientType.dart';
import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart'; import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.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/referral/my-referral-detail-screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/referral/referral_patient_detail_in-paint.dart'; import 'package:doctor_app_flutter/screens/patients/profile/referral/referral_patient_detail_in-paint.dart';
import 'package:doctor_app_flutter/screens/patients/profile/referral/referred-patient-screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/referral/referred-patient-screen.dart';
import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
@ -13,6 +14,8 @@ import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'my-referral-patient-screen.dart';
class MyReferralInPatientScreen extends StatelessWidget { class MyReferralInPatientScreen extends StatelessWidget {
PatientType patientType = PatientType.IN_PATIENT; PatientType patientType = PatientType.IN_PATIENT;
@ -70,12 +73,22 @@ class MyReferralInPatientScreen extends StatelessWidget {
model.myReferralPatients.length, model.myReferralPatients.length,
(index) => InkWell( (index) => InkWell(
onTap: () { onTap: () {
Navigator.push( if(patientType == PatientType.OUT_PATIENT) {
context, Navigator.push(
FadePage( context,
page: ReferralPatientDetailScreen(model.myReferralPatients[index], model), FadePage(
), page: MyReferralDetailScreen(referralPatient: model.myReferralPatients[index]),
); ),
);
} else{
Navigator.push(
context,
FadePage(
page: ReferralPatientDetailScreen(model.myReferralPatients[index], model),
),
);
}
}, },
child: PatientReferralItemWidget( child: PatientReferralItemWidget(
referralStatus: model.getReferralStatusNameByCode( referralStatus: model.getReferralStatusNameByCode(

@ -433,7 +433,7 @@ class ReferralPatientDetailScreen extends StatelessWidget {
], ],
), ),
), ),
if (referredPatient.referredDoctorRemarks.isNotEmpty) if (referredPatient.referredDoctorRemarks!= null && referredPatient.referredDoctorRemarks.isNotEmpty)
Container( Container(
width: double.infinity, width: double.infinity,
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 0), margin: EdgeInsets.symmetric(horizontal: 16, vertical: 0),
@ -492,7 +492,7 @@ class ReferralPatientDetailScreen extends StatelessWidget {
widget: AddReplayOnReferralPatient( widget: AddReplayOnReferralPatient(
patientReferralViewModel: patientReferralViewModel, patientReferralViewModel: patientReferralViewModel,
myReferralInPatientModel: referredPatient, myReferralInPatientModel: referredPatient,
isEdited: referredPatient.referredDoctorRemarks.isNotEmpty, isEdited: referredPatient.referredDoctorRemarks!=null && referredPatient.referredDoctorRemarks.isNotEmpty,
), ),
), ),
); );

@ -79,6 +79,7 @@ class ReferredPatientScreen extends StatelessWidget {
), ),
); );
}, },
/// TODO Elham* check why we call fun to access attribute
child: PatientReferralItemWidget( child: PatientReferralItemWidget(
referralStatus: model referralStatus: model
.getReferredPatientItem(index) .getReferredPatientItem(index)

@ -46,500 +46,168 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
height: MediaQuery.of(context).size.height * 1.0, height: MediaQuery.of(context).size.height * 1.0,
width: double.infinity, width: double.infinity,
child: Scaffold( child: Scaffold(
appBar: AppBar( body: GridView.count(
backgroundColor: Colors.white, shrinkWrap: true,
toolbarHeight: 55, physics: NeverScrollableScrollPhysics(),
elevation: 0, crossAxisSpacing: 8,
bottom: TabBar( mainAxisSpacing: 10,
controller: _tabController, childAspectRatio: 1 / 1.0,
indicator: BoxDecoration( crossAxisCount: 3,
shape: BoxShape.rectangle, children: [
borderRadius: BorderRadius.circular(10), // Creates border PatientProfileButton(
color: Color(0xffD02126), key: key,
), patient: patient,
//isScrollable: true, patientType: patientType,
arrivalType: arrivalType,
//indicatorWeight: 4.0, from: from,
indicatorColor: Colors.red[500], to: to,
nameLine1: TranslationBase.of(context).vital,
// labelPadding: nameLine2: TranslationBase.of(context).signs,
// EdgeInsets.symmetric(horizontal: 13.0, vertical: 2.0), route: VITAL_SIGN_DETAILS,
unselectedLabelColor: Color(0xff5A6168), icon: 'patient/vital_signs.png'),
labelColor: Colors.white, // if (selectedPatientType != 7)
tabs: <Widget>[ PatientProfileButton(
Container( key: key,
width: MediaQuery.of(context).size.width * 0.35, patient: patient,
height: MediaQuery.of(context).size.height * 0.06, patientType: patientType,
child: Center( arrivalType: arrivalType,
child: Text('Inpatient Info'), route: HEALTH_SUMMARY,
), nameLine1:
), "Health", //TranslationBase.of(context).medicalReport,
Container( nameLine2:
width: MediaQuery.of(context).size.width * 0.35, "Summary", //TranslationBase.of(context).summaryReport,
height: MediaQuery.of(context).size.height * 0.06, icon: 'patient/health_summary.png'),
child: Center( PatientProfileButton(
child: Text('OutPatient Info'), key: key,
), patient: patient,
), patientType: patientType,
]), arrivalType: arrivalType,
), route: LAB_RESULT,
body: Padding( nameLine1: TranslationBase.of(context).lab,
padding: const EdgeInsets.symmetric(vertical: 15.0), nameLine2: TranslationBase.of(context).result,
child: TabBarView( icon: 'patient/lab_results.png'),
physics: BouncingScrollPhysics(), // if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
controller: _tabController, PatientProfileButton(
children: [ key: key,
GridView.count( patient: patient,
shrinkWrap: true, patientType: patientType,
physics: NeverScrollableScrollPhysics(), arrivalType: arrivalType,
crossAxisSpacing: 10, isInPatient: isInpatient,
mainAxisSpacing: 10, route: RADIOLOGY_PATIENT,
childAspectRatio: 1 / 1.0, nameLine1: TranslationBase.of(context).radiology,
crossAxisCount: 3, nameLine2: TranslationBase.of(context).service,
children: [ icon: 'patient/health_summary.png'),
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
from: from, route: PATIENT_ECG,
to: to, nameLine1: TranslationBase.of(context).patient,
nameLine1: TranslationBase.of(context).vital, nameLine2: "ECG",
nameLine2: TranslationBase.of(context).signs, icon: 'patient/patient_sick_leave.png'),
route: VITAL_SIGN_DETAILS, PatientProfileButton(
isInPatient: true, key: key,
icon: 'patient/vital_signs.png'), patient: patient,
PatientProfileButton( patientType: patientType,
key: key, arrivalType: arrivalType,
patient: patient, route: ORDER_PRESCRIPTION_NEW,
patientType: patientType, nameLine1: TranslationBase.of(context).orders,
arrivalType: arrivalType, nameLine2: TranslationBase.of(context).prescription,
route: LAB_RESULT, icon: 'patient/order_prescription.png'),
isInPatient: true, // if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
nameLine1: TranslationBase.of(context).lab, PatientProfileButton(
nameLine2: TranslationBase.of(context).result, key: key,
icon: 'patient/lab_results.png'), patient: patient,
PatientProfileButton( patientType: patientType,
key: key, arrivalType: arrivalType,
patient: patient, route: ORDER_PROCEDURE,
patientType: patientType, nameLine1: TranslationBase.of(context).orders,
arrivalType: arrivalType, nameLine2: TranslationBase.of(context).procedures,
isInPatient: isInpatient, icon: 'patient/Order_Procedures.png'),
route: RADIOLOGY_PATIENT, //if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
nameLine1: TranslationBase.of(context).radiology, PatientProfileButton(
nameLine2: TranslationBase.of(context).result, key: key,
icon: 'patient/health_summary.png'), patient: patient,
PatientProfileButton( patientType: patientType,
key: key, arrivalType: arrivalType,
patient: patient, route: PATIENT_INSURANCE_APPROVALS_NEW,
patientType: patientType, nameLine1: TranslationBase.of(context).insurance,
arrivalType: arrivalType, nameLine2: TranslationBase.of(context).service,
route: ORDER_PRESCRIPTION_NEW, icon: 'patient/vital_signs.png'),
nameLine1: TranslationBase.of(context).patient, // if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
nameLine2: TranslationBase.of(context).prescription, PatientProfileButton(
icon: 'patient/order_prescription.png'), key: key,
PatientProfileButton( patient: patient,
key: key, patientType: patientType,
patient: patient, arrivalType: arrivalType,
patientType: patientType, route: ADD_SICKLEAVE,
arrivalType: arrivalType, nameLine1: TranslationBase.of(context).patientSick,
route: PROGRESS_NOTE, nameLine2: TranslationBase.of(context).leave,
isDischargedPatient: isDischargedPatient, icon: 'patient/patient_sick_leave.png'),
nameLine1: TranslationBase.of(context).progress, if (patient.appointmentNo != null &&
nameLine2: TranslationBase.of(context).note, patient.appointmentNo != 0)
icon: 'patient/Progress_notes.png'), PatientProfileButton(
PatientProfileButton( key: key,
key: key, patient: patient,
patient: patient, patientType: patientType,
patientType: patientType, arrivalType: arrivalType,
arrivalType: arrivalType, route: PATIENT_UCAF_REQUEST,
route: ORDER_NOTE, isDisable:
isDischargedPatient: isDischargedPatient, patient.patientStatusType != 43 ? true : false,
nameLine1: "Order", //"Text", nameLine1: TranslationBase.of(context).patient,
nameLine2: nameLine2: TranslationBase.of(context).ucaf,
"Sheet", //TranslationBase.of(context).orders, icon: 'patient/ucaf.png'),
icon: 'patient/Progress_notes.png'), if (patient.appointmentNo != null &&
PatientProfileButton( patient.appointmentNo != 0)
key: key, PatientProfileButton(
patient: patient, key: key,
patientType: patientType, patient: patient,
arrivalType: arrivalType, patientType: patientType,
route: ORDER_PROCEDURE, arrivalType: arrivalType,
nameLine1: TranslationBase.of(context).orders, route: REFER_PATIENT_TO_DOCTOR,
nameLine2: TranslationBase.of(context).procedures, isDisable:
icon: 'patient/Order_Procedures.png'), patient.patientStatusType != 43 ? true : false,
PatientProfileButton( nameLine1: TranslationBase.of(context).referral,
key: key, nameLine2: TranslationBase.of(context).patient,
patient: patient, icon: 'patient/refer_patient.png'),
patientType: patientType, if (patient.appointmentNo != null &&
arrivalType: arrivalType, patient.appointmentNo != 0)
route: HEALTH_SUMMARY, PatientProfileButton(
nameLine1: "Health", key: key,
//TranslationBase.of(context).medicalReport, patient: patient,
nameLine2: "Summary", patientType: patientType,
//TranslationBase.of(context).summaryReport, arrivalType: arrivalType,
icon: 'patient/health_summary.png'), route: PATIENT_ADMISSION_REQUEST,
PatientProfileButton( isDisable:
key: key, patient.patientStatusType != 43 ? true : false,
patient: patient, nameLine1: TranslationBase.of(context).admission,
patientType: patientType, nameLine2: TranslationBase.of(context).request,
arrivalType: arrivalType, icon: 'patient/admission_req.png'),
isDisable: true, if (isInpatient)
route: HEALTH_SUMMARY, PatientProfileButton(
nameLine1: "Medical", //Health key: key,
//TranslationBase.of(context).medicalReport, patient: patient,
nameLine2: "Report", //Report patientType: patientType,
//TranslationBase.of(context).summaryReport, arrivalType: arrivalType,
icon: 'patient/health_summary.png'), route: PROGRESS_NOTE,
PatientProfileButton( nameLine1: TranslationBase.of(context).progress,
key: key, nameLine2: TranslationBase.of(context).note,
patient: patient, icon: 'patient/Progress_notes.png'),
patientType: patientType, if (isInpatient)
arrivalType: arrivalType, PatientProfileButton(
route: REFER_IN_PATIENT_TO_DOCTOR, key: key,
isInPatient: true, patient: patient,
nameLine1: TranslationBase.of(context).referral, patientType: patientType,
nameLine2: TranslationBase.of(context).patient, arrivalType: arrivalType,
icon: 'patient/refer_patient.png'), route: ORDER_NOTE,
PatientProfileButton( nameLine1: "Order", //"Text",
key: key, nameLine2: "Sheet",
patient: patient, icon: 'patient/Progress_notes.png'),
patientType: patientType, ],
arrivalType: arrivalType,
route: PATIENT_INSURANCE_APPROVALS_NEW,
nameLine1: TranslationBase.of(context).insurance,
nameLine2: TranslationBase.of(context).approvals,
icon: 'patient/vital_signs.png'),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
isDisable: true,
route: null,
nameLine1: "Discharge",
nameLine2: "Summery",
icon: 'patient/patient_sick_leave.png'),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ADD_SICKLEAVE,
nameLine1: TranslationBase.of(context).patientSick,
nameLine2: TranslationBase.of(context).leave,
icon: 'patient/patient_sick_leave.png'),
],
),
GridView.count(
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
crossAxisSpacing: 10,
mainAxisSpacing: 10,
childAspectRatio: 1 / 1.0,
crossAxisCount: 3,
children: [
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
from: from,
to: to,
nameLine1: TranslationBase.of(context).vital,
nameLine2: TranslationBase.of(context).signs,
route: VITAL_SIGN_DETAILS,
icon: 'patient/vital_signs.png'),
// if (selectedPatientType != 7)
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: HEALTH_SUMMARY,
nameLine1:
"Health", //TranslationBase.of(context).medicalReport,
nameLine2:
"Summary", //TranslationBase.of(context).summaryReport,
icon: 'patient/health_summary.png'),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: LAB_RESULT,
nameLine1: TranslationBase.of(context).lab,
nameLine2: TranslationBase.of(context).result,
icon: 'patient/lab_results.png'),
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
isInPatient: isInpatient,
route: RADIOLOGY_PATIENT,
nameLine1: TranslationBase.of(context).radiology,
nameLine2: TranslationBase.of(context).service,
icon: 'patient/health_summary.png'),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_ECG,
nameLine1: TranslationBase.of(context).patient,
nameLine2: "ECG",
icon: 'patient/patient_sick_leave.png'),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PRESCRIPTION_NEW,
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).prescription,
icon: 'patient/order_prescription.png'),
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PROCEDURE,
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).procedures,
icon: 'patient/Order_Procedures.png'),
//if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_INSURANCE_APPROVALS_NEW,
nameLine1: TranslationBase.of(context).insurance,
nameLine2: TranslationBase.of(context).service,
icon: 'patient/vital_signs.png'),
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ADD_SICKLEAVE,
nameLine1: TranslationBase.of(context).patientSick,
nameLine2: TranslationBase.of(context).leave,
icon: 'patient/patient_sick_leave.png'),
if (patient.appointmentNo != null &&
patient.appointmentNo != 0)
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_UCAF_REQUEST,
isDisable:
patient.patientStatusType != 43 ? true : false,
nameLine1: TranslationBase.of(context).patient,
nameLine2: TranslationBase.of(context).ucaf,
icon: 'patient/ucaf.png'),
if (patient.appointmentNo != null &&
patient.appointmentNo != 0)
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: REFER_PATIENT_TO_DOCTOR,
isDisable:
patient.patientStatusType != 43 ? true : false,
nameLine1: TranslationBase.of(context).referral,
nameLine2: TranslationBase.of(context).patient,
icon: 'patient/refer_patient.png'),
if (patient.appointmentNo != null &&
patient.appointmentNo != 0)
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_ADMISSION_REQUEST,
isDisable:
patient.patientStatusType != 43 ? true : false,
nameLine1: TranslationBase.of(context).admission,
nameLine2: TranslationBase.of(context).request,
icon: 'patient/admission_req.png'),
if (isInpatient)
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PROGRESS_NOTE,
nameLine1: TranslationBase.of(context).progress,
nameLine2: TranslationBase.of(context).note,
icon: 'patient/Progress_notes.png'),
if (isInpatient)
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_NOTE,
nameLine1: "Order", //"Text",
nameLine2: "Sheet",
icon: 'patient/Progress_notes.png'),
],
),
],
),
), ),
), ),
), ),
// GridView.count(
// shrinkWrap: true,
// physics: NeverScrollableScrollPhysics(),
// crossAxisSpacing: 10,
// mainAxisSpacing: 10,
// childAspectRatio: 1 / 1.0,
// crossAxisCount: 3,
// children: [
// PatientProfileButton(
// key: key,
// patient: patient,
// patientType: patientType,
// arrivalType: arrivalType,
// from: from,
// to: to,
// nameLine1: TranslationBase.of(context).vital,
// nameLine2: TranslationBase.of(context).signs,
// route: VITAL_SIGN_DETAILS,
// icon: 'patient/vital_signs.png'),
// PatientProfileButton(
// key: key,
// patient: patient,
// patientType: patientType,
// arrivalType: arrivalType,
// route: MEDICAL_FILE,
// nameLine1:
// "Health", //TranslationBase.of(context).medicalReport,
// nameLine2:
// "Summary", //TranslationBase.of(context).summaryReport,
// icon: 'patient/health_summary.png'),
// PatientProfileButton(
// key: key,
// patient: patient,
// patientType: patientType,
// arrivalType: arrivalType,
// route: LAB_RESULT,
// nameLine1: TranslationBase.of(context).lab,
// nameLine2: TranslationBase.of(context).result,
// icon: 'patient/lab_results.png'),
// PatientProfileButton(
// key: key,
// patient: patient,
// patientType: patientType,
// arrivalType: arrivalType,
// isInPatient: isInpatient,
// route: RADIOLOGY_PATIENT,
// nameLine1: TranslationBase.of(context).radiology,
// nameLine2: TranslationBase.of(context).service,
// icon: 'patient/health_summary.png'),
// PatientProfileButton(
// key: key,
// patient: patient,
// patientType: patientType,
// arrivalType: arrivalType,
// route: PATIENT_ECG,
// nameLine1: TranslationBase.of(context).patient,
// nameLine2: "ECG",
// icon: 'patient/patient_sick_leave.png'),
// (int.parse(patientType) == 7 ||
// int.parse(patientType) == 6)
// ? PatientProfileButton(
// key: key,
// patient: patient,
// patientType: patientType,
// arrivalType: arrivalType,
// route: ORDER_PRESCRIPTION_NEW,
// nameLine1: TranslationBase.of(context).orders,
// nameLine2:
// TranslationBase.of(context).prescription,
// icon: 'patient/order_prescription.png')
// : PatientProfileButton(
// key: key,
// patient: patient,
// patientType: patientType,
// arrivalType: arrivalType,
// route: ORDER_PRESCRIPTION_NEW,
// nameLine1: TranslationBase.of(context).orders,
// nameLine2:
// TranslationBase.of(context).prescription,
// icon: 'patient/order_prescription.png'),
// PatientProfileButton(
// key: key,
// patient: patient,
// patientType: patientType,
// arrivalType: arrivalType,
// route: ORDER_PROCEDURE,
// nameLine1: TranslationBase.of(context).orders,
// nameLine2: TranslationBase.of(context).procedures,
// icon: 'patient/Order_Procedures.png'),
// PatientProfileButton(
// key: key,
// patient: patient,
// patientType: patientType,
// arrivalType: arrivalType,
// route: PATIENT_INSURANCE_APPROVALS_NEW,
// nameLine1: TranslationBase.of(context).insurance,
// nameLine2: TranslationBase.of(context).service,
// icon: 'patient/vital_signs.png'),
// PatientProfileButton(
// key: key,
// patient: patient,
// patientType: patientType,
// arrivalType: arrivalType,
// route: SHOW_SICKLEAVE,
// nameLine1: TranslationBase.of(context).patientSick,
// nameLine2: TranslationBase.of(context).leave,
// icon: 'patient/patient_sick_leave.png'),
// if (patient.admissionNo != null &&
// patient.admissionNo != "0")
// PatientProfileButton(
// key: key,
// patient: patient,
// patientType: patientType,
// arrivalType: arrivalType,
// route: PROGRESS_NOTE,
// nameLine1: TranslationBase.of(context).progress,
// nameLine2: TranslationBase.of(context).note,
// icon: 'patient/Progress_notes.png'),
// if (patient.admissionNo != null &&
// patient.admissionNo != "0")
// PatientProfileButton(
// key: key,
// patient: patient,
// patientType: patientType,
// arrivalType: arrivalType,
// route: ORDER_NOTE,
// nameLine1: "Order", //"Text",
// nameLine2: "Sheet",
// icon: 'patient/Progress_notes.png'),
// if (patient.appointmentNo != null &&
// patient.appointmentNo != 0)
// PatientProfileButton(
// key: key,
// patient: patient,
// patientType: patientType,
// arrivalType: arrivalType,
// route: REFER_PATIENT_TO_DOCTOR,
// // isDisable: patient.patientStatusType != 43 ? true : false,
// nameLine1: TranslationBase.of(context).referral,
// nameLine2: TranslationBase.of(context).patient,
// icon: 'patient/refer_patient.png'),
// ],
// ),
), ),
); );
} }

Loading…
Cancel
Save