Merge branch 'development' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into medical_report_changes

merge-requests/770/head
hussam al-habibeh 5 years ago
commit b41c0036d3

@ -5,8 +5,8 @@ const ONLY_NUMBERS = "[0-9]";
const ONLY_LETTERS = "[a-zA-Z &'\"]";
const ONLY_DATE = "[0-9/]";
const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/';
// const BASE_URL = 'https://hmgwebservices.com/';
const BASE_URL = 'https://uat.hmgwebservices.com/';
const BASE_URL = 'https://hmgwebservices.com/';
// const BASE_URL = 'https://uat.hmgwebservices.com/';
const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh";
const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList";
const PATIENT_PROGRESS_NOTE_URL = "Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient";

@ -62,6 +62,15 @@ class MyReferralPatientModel {
String referringClinicDescription;
String referringDoctorName;
int referalStatus;
String sourceSetupID;
int sourceProjectId;
String targetSetupID;
int targetProjectId;
int targetClinicID;
int targetDoctorID;
int sourceAppointmentNo;
int targetAppointmentNo;
String remarksFromSource;
MyReferralPatientModel(
{this.rowID,
@ -104,27 +113,27 @@ class MyReferralPatientModel {
this.referralResponseOn,
this.priority,
this.frequency,
this.mAXResponseTime,
this.episodeID,
this.appointmentNo,
this.appointmentDate,
this.appointmentType,
this.patientMRN,
this.createdOn,
this.clinicID,
this.nationalityID,
this.age,
this.doctorImageURL,
this.frequencyDescription,
this.genderDescription,
this.isDoctorLate,
this.isDoctorResponse,
this.nationalityFlagURL,
this.nursingStationName,
this.priorityDescription,
this.referringClinicDescription,
this.referringDoctorName,
this.referalStatus});
this.mAXResponseTime,
this.episodeID,
this.appointmentNo,
this.appointmentDate,
this.appointmentType,
this.patientMRN,
this.createdOn,
this.clinicID,
this.nationalityID,
this.age,
this.doctorImageURL,
this.frequencyDescription,
this.genderDescription,
this.isDoctorLate,
this.isDoctorResponse,
this.nationalityFlagURL,
this.nursingStationName,
this.priorityDescription,
this.referringClinicDescription,
this.referringDoctorName,
this.referalStatus, this.sourceSetupID, this.sourceAppointmentNo, this.sourceProjectId, this.targetProjectId, this.targetAppointmentNo, this.targetClinicID, this.targetSetupID, this.targetDoctorID, this.remarksFromSource});
MyReferralPatientModel.fromJson(Map<String, dynamic> json) {
rowID = json['RowID'];
@ -201,6 +210,16 @@ class MyReferralPatientModel {
priorityDescription = json['PriorityDescription'];
referringClinicDescription = json['ReferringClinicDescription'];
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'];
remarksFromSource = json['RemarksFromSource'];
}
Map<String, dynamic> toJson() {
@ -266,6 +285,15 @@ class MyReferralPatientModel {
data['PriorityDescription'] = this.priorityDescription;
data['ReferringClinicDescription'] = this.referringClinicDescription;
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;
data['RemarksFromSource'] = this.remarksFromSource;
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;
await getDoctorProfile();
AddReferredRemarksRequestModel _requestAddReferredDoctorRemarks = AddReferredRemarksRequestModel(
editedBy: doctorProfile.doctorID,
projectID: doctorProfile.projectID,
referredDoctorRemarks: referredDoctorRemarks,
referalStatus: referalStatus);
referalStatus: referralStatus);
_requestAddReferredDoctorRemarks.projectID = referral.projectID;
//TODO Check this in case out patient
_requestAddReferredDoctorRemarks.admissionNo = int.parse(referral.admissionNo);
_requestAddReferredDoctorRemarks.lineItemNo = referral.lineItemNo;
_requestAddReferredDoctorRemarks.referredDoctorRemarks = referredDoctorRemarks;
_requestAddReferredDoctorRemarks.editedBy = doctorProfile.doctorID;
_requestAddReferredDoctorRemarks.referalStatus = referalStatus;
_requestAddReferredDoctorRemarks.referalStatus = referralStatus;
// _requestAddReferredDoctorRemarks.patientID = referral.patientID;
// _requestAddReferredDoctorRemarks.referringDoctor = referral.referringDoctor;

@ -1,4 +1,5 @@
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/models/doctor/doctor_profile_model.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(
PendingReferral pendingReferral, bool isAccepted) async {
MyReferralPatientModel referralPatient, bool isAccepted) async {
hasError = false;
DoctorProfileModel doctorProfile = await getDoctorProfile();
Map<String, dynamic> body = Map();
body['PatientMRN'] = pendingReferral.patientID;
body['AppointmentNo'] = pendingReferral.targetAppointmentNo;
body['SetupID'] = pendingReferral.targetSetupID;
body['ProjectID'] = pendingReferral.targetProjectId;
body['PatientMRN'] = referralPatient.patientID;
body['AppointmentNo'] = referralPatient.targetAppointmentNo;
body['SetupID'] = referralPatient.targetSetupID;
body['ProjectID'] = referralPatient.targetProjectId;
body['IsAccepted'] = isAccepted;
body['PatientName'] = pendingReferral.patientName;
body['ReferralResponse'] = pendingReferral.remarksFromSource;
body['PatientName'] = referralPatient.patientName;
body['ReferralResponse'] = referralPatient.remarksFromSource;
body['DoctorName'] = doctorProfile.doctorName;
await baseAppClient.post(

@ -60,10 +60,12 @@ class PatientMedicalReportViewModel extends BaseViewModel {
await _service.addMedicalReport(patient, htmlText);
if (_service.hasError) {
error = _service.error;
await getMedicalReportList(patient);
setState(ViewState.ErrorLocal);
} else
await getMedicalReportList(patient);
setState(ViewState.Idle);
{ await getMedicalReportList(patient);
setState(ViewState.Idle);
}
}
Future updateMedicalReport(PatiantInformtion patient, String htmlText, int limitNumber, String invoiceNumber) async {
@ -71,9 +73,11 @@ class PatientMedicalReportViewModel extends BaseViewModel {
await _service.updateMedicalReport(patient, htmlText, limitNumber, invoiceNumber);
if (_service.hasError) {
error = _service.error;
await getMedicalReportList(patient);
setState(ViewState.ErrorLocal);
} else
await getMedicalReportList(patient);
setState(ViewState.Idle);
{
await getMedicalReportList(patient);
setState(ViewState.Idle);}
}
}

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

@ -107,8 +107,8 @@ class ProjectViewModel with ChangeNotifier {
return Future.value(localRes);
} catch (error) {
print(error);
throw error;
//print(error);
//throw error;
}
}

@ -105,12 +105,12 @@ class _AddVerifyMedicalReportState extends State<AddVerifyMedicalReport> {
if (txtOfMedicalReport.isNotEmpty) {
GifLoaderDialogUtils.showMyDialog(context);
widget.medicalReport != null
? widget.model.updateMedicalReport(
?await widget.model.updateMedicalReport(
widget.patient,
txtOfMedicalReport,
widget.medicalReport != null ? widget.medicalReport.lineItemNo : null,
widget.medicalReport != null ? widget.medicalReport.invoiceNo : null)
: widget.model.addMedicalReport(widget.patient, txtOfMedicalReport);
: await widget.model.addMedicalReport(widget.patient, txtOfMedicalReport);
//model.getMedicalReportList(patient);
Navigator.pop(context);

@ -92,29 +92,15 @@ class _MedicalReportPageState extends State<MedicalReportPage> {
)),
);
// Navigator.of(context).pushNamed(PATIENT_MEDICAL_REPORT_INSERT, arguments: {
// 'patient': patient,
// 'patientType': patientType,
// 'arrivalType': arrivalType,
// 'type': MedicalReportStatus.ADD,
// 'model': model,
// });
},
label: TranslationBase.of(context).createNewMedicalReport,
),
if (model.state != ViewState.ErrorLocal)
// if (model.state != ViewState.ErrorLocal)ß
...List.generate(
model.medicalReportList.length,
(index) => InkWell(
onTap: () {
if (model.medicalReportList[index].status == 1) {
// Navigator.of(context).pushNamed(PATIENT_MEDICAL_REPORT_INSERT, arguments: {
// 'patient': patient,
// 'patientType': patientType,
// 'arrivalType': arrivalType,
// 'medicalReport': model.medicalReportList[index],
// 'model': model,
// });
Navigator.push(
context,
MaterialPageRoute(

@ -149,14 +149,6 @@ class _AddReplayOnReferralPatientState extends State<AddReplayOnReferralPatient>
DrAppToastMsg.showSuccesToast("Has been rejected");
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");
@ -190,14 +182,6 @@ class _AddReplayOnReferralPatientState extends State<AddReplayOnReferralPatient>
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");
@ -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/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/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/util/date-utils.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
@ -13,476 +13,415 @@ 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:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
// ignore: must_be_immutable
class MyReferralDetailScreen extends StatelessWidget {
PendingReferral pendingReferral;
final MyReferralPatientModel referralPatient;
const MyReferralDetailScreen({Key key, this.referralPatient})
: super(key: key);
@override
Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
pendingReferral = routeArgs['referral'];
// final routeArgs = ModalRoute.of(context).settings.arguments as Map;
// pendingReferral = routeArgs['referral'];
return BaseView<PatientReferralViewModel>(
onModelReady: (model) => model.getPatientDetails(
AppDateUtils.convertStringToDateFormat(
DateTime.now() /*.subtract(Duration(days: 350))*/ .toString(),
"yyyy-MM-dd"),
AppDateUtils.convertStringToDateFormat(
DateTime.now().toString(), "yyyy-MM-dd"),
pendingReferral.patientID,
pendingReferral.sourceAppointmentNo),
onModelReady: (model) => model.getDoctorProfile(),
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
appBarTitle: TranslationBase.of(context).referPatient,
isShowAppBar: false,
body: model.patientArrivalList != null &&
model.patientArrivalList.length > 0
? Column(
children: [
Container(
padding:
EdgeInsets.only(left: 0, right: 5, bottom: 5, top: 5),
decoration: BoxDecoration(
color: Colors.white,
),
child: Container(
padding: EdgeInsets.only(left: 10, right: 10, bottom: 10),
margin: EdgeInsets.only(top: 50),
child: Column(
baseViewModel: model,
appBarTitle: TranslationBase.of(context).referPatient,
isShowAppBar: false,
body: Column(
children: [
Container(
padding: EdgeInsets.only(left: 0, right: 5, bottom: 5, top: 5),
decoration: BoxDecoration(
color: Colors.white,
),
child: Container(
padding: EdgeInsets.only(left: 10, right: 10, bottom: 10),
margin: EdgeInsets.only(top: 50),
child: Column(
children: [
Container(
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: [
Container(
Padding(
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(model
.patientArrivalList[0]
.patientDetails
.fullName)),
fontSize: SizeConfig.textMultiplier * 2.5,
fontWeight: FontWeight.bold,
fontFamily: 'Poppins',
),
child: Container(
width: 60,
height: 60,
child: Image.asset(
referralPatient.gender == 1
? 'assets/images/male_avatar.png'
: 'assets/images/female_avatar.png',
fit: BoxFit.cover,
),
model.patientArrivalList[0].patientDetails
.gender ==
1
? Icon(
DoctorApp.male_2,
color: Colors.blue,
)
: Icon(
DoctorApp.female_1,
color: Colors.pink,
),
]),
),
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.only(left: 12.0),
child: Container(
width: 60,
height: 60,
child: Image.asset(
pendingReferral.patientDetails.gender == 1
? 'assets/images/male_avatar.png'
: 'assets/images/female_avatar.png',
fit: BoxFit.cover,
),
SizedBox(
width: 10,
),
Expanded(
child: Column(
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
AppText(
referralPatient.referralStatus != null
? 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),
)
],
),
),
SizedBox(
width: 10,
),
Expanded(
child: Column(
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
MainAxisAlignment.start,
children: [
AppText(
pendingReferral.referralStatus != null
? pendingReferral.referralStatus
: "",
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],
TranslationBase.of(context)
.fileNumber,
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
fontSize:
2.0 * SizeConfig.textMultiplier,
color: Color(0XFF28353E),
)
],
),
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),
),
],
1.7 * SizeConfig.textMultiplier,
color: Color(0XFF575757),
),
AppText(
pendingReferral.referredOn
.split(" ")[1],
"${referralPatient.patientID}",
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
fontWeight: FontWeight.w700,
fontSize:
1.8 * SizeConfig.textMultiplier,
color: Color(0XFF575757),
)
color: Color(0XFF2E303A),
),
],
),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
Expanded(
child: Column(
AppText(
AppDateUtils.getTimeHHMMA(referralPatient.referralDate),
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
fontSize:
1.8 * SizeConfig.textMultiplier,
color: Color(0XFF575757),
)
],
),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: Column(
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context)
.referredFrom,
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
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),
),
],
AppText(
TranslationBase.of(context)
.referredFrom,
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
fontSize: 1.7 *
SizeConfig.textMultiplier,
color: Color(0XFF575757),
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context)
.remarks +
" : ",
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),
),
),
],
AppText(
referralPatient.targetProjectId ==referralPatient.sourceProjectId
? TranslationBase.of(
context)
.sameBranch
: TranslationBase.of(
context)
.otherBranch,
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(
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(
pendingReferral
.doctorImageUrl),
backgroundColor:
Colors.transparent,
),
),
),
Expanded(
flex: 4,
child: Container(
margin: EdgeInsets.only(
left: 10,
top: 25,
right: 10,
bottom: 0),
child: Column(
children: [
AppText(
pendingReferral
.referredByDoctorInfo,
Row(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context)
.remarks +
" : ",
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
fontSize: 1.7 *
SizeConfig.textMultiplier,
color: Color(0XFF575757),
),
Expanded(
child: AppText(
referralPatient.referringDoctorRemarks??
'',
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
fontSize: 1.7 *
fontSize: 1.8 *
SizeConfig.textMultiplier,
color: Color(0XFF2E303A),
),
],
),
),
],
),
],
),
),
Row(
children: [
AppText(
referralPatient.nationalityName !=
null
? referralPatient.nationalityName
: "",
fontWeight: FontWeight.bold,
color: Color(0xFF2E303A),
fontSize:
1.4 * SizeConfig.textMultiplier,
),
referralPatient.nationalityFlagURL !=
null
? ClipRRect(
borderRadius:
BorderRadius.circular(20.0),
child: Image.network(
referralPatient
.nationalityFlagURL,
height: 25,
width: 30,
errorBuilder: (BuildContext
context,
Object exception,
StackTrace stackTrace) {
return Text('No Image');
},
))
: 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(
margin: EdgeInsets.only(
left: 10,
top: 25,
right: 10,
bottom: 0),
child: Column(
children: [
AppText(
referralPatient.doctorName,
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
fontSize: 1.7 *
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: [
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(
width: 8,
height: 16,
),
Expanded(
child: AppButton(
title: TranslationBase.of(context).reject,
color: Color(0xFFB9382C),
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)
.referralSuccessMsgReject);
Navigator.pop(context);
Navigator.pop(context);
}
},
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: SizedBox(
child: ProfileMedicalInfoWidgetSearch(
patient: model
.getPatientFromReferralO(referralPatient),
patientType: "7",
isInpatient: false,
from: null,
to: null,
),
),
),
],
),
),
],
)
: Column(
children: [
Container(
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),
),
),
),
if (referralPatient.referralStatus == 1)
Container(
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
child: Row(
children: [
Expanded(
child: AppText(
"",
fontSize: SizeConfig.textMultiplier * 2.5,
fontWeight: FontWeight.bold,
fontFamily: 'Poppins',
child: AppButton(
title: TranslationBase.of(context).accept,
color: Color(0xFF4BA821),
fontColor: Colors.white,
fontSize: 1.6,
hPadding: 8,
vPadding: 12,
disabled: model.state == ViewState.Busy,
onPressed: () async {
await model.responseReferral(referralPatient, true);
if (model.state == ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(model.error);
} else {
DrAppToastMsg.showSuccesToast(
TranslationBase.of(context)
.referralSuccessMsgAccept);
model.getMyReferralOutPatientService();
Navigator.pop(context);
Navigator.pop(context);
}
},
),
),
]),
),
Container(
child: Center(
child: AppText(
TranslationBase.of(context).patientNoDetailErrMsg,
color: HexColor("#B8382B"),
fontWeight: FontWeight.bold,
fontSize: 16,
SizedBox(
width: 8,
),
),
Expanded(
child: AppButton(
title: TranslationBase.of(context).reject,
color: Color(0xFFB9382C),
fontColor: Colors.white,
fontSize: 1.6,
hPadding: 8,
vPadding: 12,
disabled: model.state == ViewState.Busy,
onPressed: () async {
await model.responseReferral(referralPatient, false);
if (model.state == ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(model.error);
} else {
DrAppToastMsg.showSuccesToast(
TranslationBase.of(context)
.referralSuccessMsgReject);
model.getMyReferralOutPatientService();
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/viewModel/patient-referral-viewmodel.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/referred-patient-screen.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
@ -13,7 +14,14 @@ import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
class MyReferralInPatientScreen extends StatelessWidget {
import 'my-referral-patient-screen.dart';
class MyReferralInPatientScreen extends StatefulWidget {
@override
_MyReferralInPatientScreenState createState() => _MyReferralInPatientScreenState();
}
class _MyReferralInPatientScreenState extends State<MyReferralInPatientScreen> {
PatientType patientType = PatientType.IN_PATIENT;
@override
@ -30,7 +38,9 @@ class MyReferralInPatientScreen extends StatelessWidget {
margin: EdgeInsets.only(top: 70),
child: PatientTypeRadioWidget(
(patientType) async {
this.patientType = patientType;
setState(() {
this.patientType = patientType;
});
GifLoaderDialogUtils.showMyDialog(context);
if (patientType == PatientType.IN_PATIENT) {
await model.getMyReferralPatientService(localBusy: true);
@ -70,12 +80,22 @@ class MyReferralInPatientScreen extends StatelessWidget {
model.myReferralPatients.length,
(index) => InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: ReferralPatientDetailScreen(model.myReferralPatients[index], model),
),
);
if(patientType == PatientType.OUT_PATIENT) {
Navigator.push(
context,
FadePage(
page: MyReferralDetailScreen(referralPatient: model.myReferralPatients[index]),
),
);
} else{
Navigator.push(
context,
FadePage(
page: ReferralPatientDetailScreen(model.myReferralPatients[index], model),
),
);
}
},
child: PatientReferralItemWidget(
referralStatus: model.getReferralStatusNameByCode(

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

@ -46,500 +46,168 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
height: MediaQuery.of(context).size.height * 1.0,
width: double.infinity,
child: Scaffold(
appBar: AppBar(
backgroundColor: Colors.white,
toolbarHeight: 55,
elevation: 0,
bottom: TabBar(
controller: _tabController,
indicator: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(10), // Creates border
color: Color(0xffD02126),
),
//isScrollable: true,
//indicatorWeight: 4.0,
indicatorColor: Colors.red[500],
// labelPadding:
// EdgeInsets.symmetric(horizontal: 13.0, vertical: 2.0),
unselectedLabelColor: Color(0xff5A6168),
labelColor: Colors.white,
tabs: <Widget>[
Container(
width: MediaQuery.of(context).size.width * 0.35,
height: MediaQuery.of(context).size.height * 0.06,
child: Center(
child: Text('Inpatient Info'),
),
),
Container(
width: MediaQuery.of(context).size.width * 0.35,
height: MediaQuery.of(context).size.height * 0.06,
child: Center(
child: Text('OutPatient Info'),
),
),
]),
),
body: Padding(
padding: const EdgeInsets.symmetric(vertical: 15.0),
child: TabBarView(
physics: BouncingScrollPhysics(),
controller: _tabController,
children: [
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,
isInPatient: true,
icon: 'patient/vital_signs.png'),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: LAB_RESULT,
isInPatient: true,
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).result,
icon: 'patient/health_summary.png'),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PRESCRIPTION_NEW,
nameLine1: TranslationBase.of(context).patient,
nameLine2: TranslationBase.of(context).prescription,
icon: 'patient/order_prescription.png'),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PROGRESS_NOTE,
isDischargedPatient: isDischargedPatient,
nameLine1: TranslationBase.of(context).progress,
nameLine2: TranslationBase.of(context).note,
icon: 'patient/Progress_notes.png'),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_NOTE,
isDischargedPatient: isDischargedPatient,
nameLine1: "Order", //"Text",
nameLine2:
"Sheet", //TranslationBase.of(context).orders,
icon: 'patient/Progress_notes.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: 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,
isDisable: true,
route: HEALTH_SUMMARY,
nameLine1: "Medical", //Health
//TranslationBase.of(context).medicalReport,
nameLine2: "Report", //Report
//TranslationBase.of(context).summaryReport,
icon: 'patient/health_summary.png'),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: REFER_IN_PATIENT_TO_DOCTOR,
isInPatient: true,
nameLine1: TranslationBase.of(context).referral,
nameLine2: TranslationBase.of(context).patient,
icon: 'patient/refer_patient.png'),
PatientProfileButton(
key: key,
patient: patient,
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'),
],
),
],
),
body: GridView.count(
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
crossAxisSpacing: 8,
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