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_LETTERS = "[a-zA-Z &'\"]";
const ONLY_DATE = "[0-9/]"; const ONLY_DATE = "[0-9/]";
const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/'; const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/';
// const BASE_URL = 'https://hmgwebservices.com/'; const BASE_URL = 'https://hmgwebservices.com/';
const BASE_URL = 'https://uat.hmgwebservices.com/'; // const BASE_URL = 'https://uat.hmgwebservices.com/';
const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh"; const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh";
const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList"; const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList";
const PATIENT_PROGRESS_NOTE_URL = "Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient"; const PATIENT_PROGRESS_NOTE_URL = "Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient";

@ -62,6 +62,15 @@ class MyReferralPatientModel {
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;
String remarksFromSource;
MyReferralPatientModel( MyReferralPatientModel(
{this.rowID, {this.rowID,
@ -104,27 +113,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, this.remarksFromSource});
MyReferralPatientModel.fromJson(Map<String, dynamic> json) { MyReferralPatientModel.fromJson(Map<String, dynamic> json) {
rowID = json['RowID']; rowID = json['RowID'];
@ -201,6 +210,16 @@ 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'];
remarksFromSource = json['RemarksFromSource'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -266,6 +285,15 @@ 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;
data['RemarksFromSource'] = this.remarksFromSource;
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.remarksFromSource;
body['DoctorName'] = doctorProfile.doctorName; body['DoctorName'] = doctorProfile.doctorName;
await baseAppClient.post( await baseAppClient.post(

@ -60,10 +60,12 @@ class PatientMedicalReportViewModel extends BaseViewModel {
await _service.addMedicalReport(patient, htmlText); await _service.addMedicalReport(patient, htmlText);
if (_service.hasError) { if (_service.hasError) {
error = _service.error; error = _service.error;
await getMedicalReportList(patient);
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
} else } else
await getMedicalReportList(patient); { await getMedicalReportList(patient);
setState(ViewState.Idle); setState(ViewState.Idle);
}
} }
Future updateMedicalReport(PatiantInformtion patient, String htmlText, int limitNumber, String invoiceNumber) async { 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); await _service.updateMedicalReport(patient, htmlText, limitNumber, invoiceNumber);
if (_service.hasError) { if (_service.hasError) {
error = _service.error; error = _service.error;
await getMedicalReportList(patient);
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
} else } else
await getMedicalReportList(patient); {
setState(ViewState.Idle); await getMedicalReportList(patient);
setState(ViewState.Idle);}
} }
} }

@ -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);
@ -395,9 +395,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);

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

@ -105,12 +105,12 @@ class _AddVerifyMedicalReportState extends State<AddVerifyMedicalReport> {
if (txtOfMedicalReport.isNotEmpty) { if (txtOfMedicalReport.isNotEmpty) {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
widget.medicalReport != null widget.medicalReport != null
? widget.model.updateMedicalReport( ?await widget.model.updateMedicalReport(
widget.patient, widget.patient,
txtOfMedicalReport, txtOfMedicalReport,
widget.medicalReport != null ? widget.medicalReport.lineItemNo : null, widget.medicalReport != null ? widget.medicalReport.lineItemNo : null,
widget.medicalReport != null ? widget.medicalReport.invoiceNo : null) widget.medicalReport != null ? widget.medicalReport.invoiceNo : null)
: widget.model.addMedicalReport(widget.patient, txtOfMedicalReport); : await widget.model.addMedicalReport(widget.patient, txtOfMedicalReport);
//model.getMedicalReportList(patient); //model.getMedicalReportList(patient);
Navigator.pop(context); 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, label: TranslationBase.of(context).createNewMedicalReport,
), ),
if (model.state != ViewState.ErrorLocal) // if (model.state != ViewState.ErrorLocal)ß
...List.generate( ...List.generate(
model.medicalReportList.length, model.medicalReportList.length,
(index) => InkWell( (index) => InkWell(
onTap: () { onTap: () {
if (model.medicalReportList[index].status == 1) { 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( Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(

@ -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,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/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: [
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [ children: [
Row( AppText(
mainAxisAlignment: TranslationBase.of(context)
MainAxisAlignment.start, .referredFrom,
children: [ fontFamily: 'Poppins',
AppText( fontWeight: FontWeight.w600,
TranslationBase.of(context) fontSize: 1.7 *
.referredFrom, SizeConfig.textMultiplier,
fontFamily: 'Poppins', color: Color(0XFF575757),
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),
),
],
), ),
Row( AppText(
mainAxisAlignment: referralPatient.targetProjectId ==referralPatient.sourceProjectId
MainAxisAlignment.start, ? TranslationBase.of(
crossAxisAlignment: context)
CrossAxisAlignment.start, .sameBranch
children: [ : TranslationBase.of(
AppText( context)
TranslationBase.of(context) .otherBranch,
.remarks + fontFamily: 'Poppins',
" : ", fontWeight: FontWeight.w700,
fontFamily: 'Poppins', fontSize: 1.8 *
fontWeight: FontWeight.w600, SizeConfig
fontSize: 1.7 * .textMultiplier,
SizeConfig color: Color(0XFF2E303A),
.textMultiplier,
color: Color(0XFF575757),
),
Expanded(
child: AppText(
pendingReferral
.remarksFromSource,
fontFamily: 'Poppins',
fontWeight:
FontWeight.w700,
fontSize: 1.8 *
SizeConfig
.textMultiplier,
color: Color(0XFF2E303A),
),
),
],
), ),
], ],
), ),
), Row(
Row( mainAxisAlignment:
children: [ MainAxisAlignment.start,
AppText( crossAxisAlignment:
pendingReferral.patientDetails CrossAxisAlignment.start,
.nationalityName != children: [
null AppText(
? pendingReferral TranslationBase.of(context)
.patientDetails .remarks +
.nationalityName " : ",
: "", fontFamily: 'Poppins',
fontWeight: FontWeight.bold, fontWeight: FontWeight.w600,
color: Color(0xFF2E303A), fontSize: 1.7 *
fontSize: 1.4 * SizeConfig.textMultiplier,
SizeConfig.textMultiplier, color: Color(0XFF575757),
), ),
pendingReferral Expanded(
.nationalityFlagUrl != child: AppText(
null referralPatient.referringDoctorRemarks??
? 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,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: 1.7 * fontSize: 1.8 *
SizeConfig.textMultiplier, SizeConfig.textMultiplier,
color: Color(0XFF2E303A), 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( Expanded(
child: Column( child: SingleChildScrollView(
crossAxisAlignment: CrossAxisAlignment.start, child: Container(
children: [ child: Column(
SizedBox( crossAxisAlignment: CrossAxisAlignment.start,
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(
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( if (referralPatient.referralStatus == 1)
children: [ Container(
Container( margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
padding: EdgeInsets.only(left: 12.0), child: Row(
child: Row(children: [ children: [
IconButton(
icon: Icon(Icons.arrow_back_ios),
color: Colors.black, //Colors.black,
onPressed: () => Navigator.pop(context),
),
Expanded( Expanded(
child: AppText( child: AppButton(
"", title: TranslationBase.of(context).accept,
fontSize: SizeConfig.textMultiplier * 2.5, color: Color(0xFF4BA821),
fontWeight: FontWeight.bold, fontColor: Colors.white,
fontSize: 1.6,
fontFamily: 'Poppins', 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);
}
},
), ),
), ),
]), SizedBox(
), width: 8,
Container(
child: Center(
child: AppText(
TranslationBase.of(context).patientNoDetailErrMsg,
color: HexColor("#B8382B"),
fontWeight: FontWeight.bold,
fontSize: 16,
), ),
), 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/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,7 +14,14 @@ 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';
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; PatientType patientType = PatientType.IN_PATIENT;
@override @override
@ -30,7 +38,9 @@ class MyReferralInPatientScreen extends StatelessWidget {
margin: EdgeInsets.only(top: 70), margin: EdgeInsets.only(top: 70),
child: PatientTypeRadioWidget( child: PatientTypeRadioWidget(
(patientType) async { (patientType) async {
this.patientType = patientType; setState(() {
this.patientType = patientType;
});
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
if (patientType == PatientType.IN_PATIENT) { if (patientType == PatientType.IN_PATIENT) {
await model.getMyReferralPatientService(localBusy: true); await model.getMyReferralPatientService(localBusy: true);
@ -70,12 +80,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,
), ),
), ),
); );

@ -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