Merge branches 'development' and 'headers_refactor' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into headers_refactor

merge-requests/737/head
Elham Rababah 5 years ago
commit 132565c298

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

@ -64,65 +64,65 @@ class MyReferralPatientModel {
MyReferralPatientModel( MyReferralPatientModel(
{this.rowID, {this.rowID,
this.projectID, this.projectID,
this.lineItemNo, this.lineItemNo,
this.doctorID, this.doctorID,
this.patientID, this.patientID,
this.doctorName, this.doctorName,
this.doctorNameN, this.doctorNameN,
this.firstName, this.firstName,
this.middleName, this.middleName,
this.lastName, this.lastName,
this.firstNameN, this.firstNameN,
this.middleNameN, this.middleNameN,
this.lastNameN, this.lastNameN,
this.gender, this.gender,
this.dateofBirth, this.dateofBirth,
this.mobileNumber, this.mobileNumber,
this.emailAddress, this.emailAddress,
this.patientIdentificationNo, this.patientIdentificationNo,
this.patientType, this.patientType,
this.admissionNo, this.admissionNo,
this.admissionDate, this.admissionDate,
this.roomID, this.roomID,
this.bedID, this.bedID,
this.nursingStationID, this.nursingStationID,
this.description, this.description,
this.nationalityName, this.nationalityName,
this.nationalityNameN, this.nationalityNameN,
this.clinicDescription, this.clinicDescription,
this.clinicDescriptionN, this.clinicDescriptionN,
this.referralDoctor, this.referralDoctor,
this.referringDoctor, this.referringDoctor,
this.referralClinic, this.referralClinic,
this.referringClinic, this.referringClinic,
this.referralStatus, this.referralStatus,
this.referralDate, this.referralDate,
this.referringDoctorRemarks, this.referringDoctorRemarks,
this.referredDoctorRemarks, this.referredDoctorRemarks,
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});
MyReferralPatientModel.fromJson(Map<String, dynamic> json) { MyReferralPatientModel.fromJson(Map<String, dynamic> json) {
rowID = json['RowID']; rowID = json['RowID'];
@ -158,11 +158,19 @@ class MyReferralPatientModel {
referringDoctor = json['ReferringDoctor']; referringDoctor = json['ReferringDoctor'];
referralClinic = json['ReferralClinic']; referralClinic = json['ReferralClinic'];
referringClinic = json['ReferringClinic']; referringClinic = json['ReferringClinic'];
referralStatus = json["ReferralStatus"] is String ?json['ReferralStatus']== "Accepted"?46:json['ReferralStatus']=="Pending"?1:0: json["ReferralStatus"]; referralStatus = json["ReferralStatus"] is String
? json['ReferralStatus'] == "Accepted"
? 46
: json['ReferralStatus'] == "Pending"
? 1
: 0
: json["ReferralStatus"];
try { try {
referralDate = AppDateUtils.getDateTimeFromString(json['ReferralDate']); referralDate = AppDateUtils.getDateTimeFromString(json['ReferralDate']);
} catch (e){ } catch (e) {
referralDate = AppDateUtils.convertStringToDate(json['ReferralDate']); referralDate = AppDateUtils.convertStringToDate(json['ReferralDate']);
} finally {
referralDate = DateTime.now();
} }
referringDoctorRemarks = json['ReferringDoctorRemarks']; referringDoctorRemarks = json['ReferringDoctorRemarks'];
@ -258,6 +266,6 @@ class MyReferralPatientModel {
} }
get patientName { get patientName {
return this.firstName+" "+this.lastName; return this.firstName + " " + this.lastName;
} }
} }

@ -25,12 +25,24 @@ class PatientMedicalReportViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
bool hasOnHold(){
bool hasHold = false;
medicalReportList.forEach((element) {
if(element.status == 1){
hasHold = true;
}
});
return hasHold;
}
Future getMedicalReportTemplate() async { Future getMedicalReportTemplate() async {
setState(ViewState.Busy); setState(ViewState.BusyLocal);
await _service.getMedicalReportTemplate(); await _service.getMedicalReportTemplate();
if (_service.hasError) { if (_service.hasError) {
error = _service.error; error = _service.error;
setState(ViewState.Error); setState(ViewState.ErrorLocal);
} else } else
setState(ViewState.Idle); setState(ViewState.Idle);
} }

@ -166,8 +166,9 @@ class MyReferredPatientModel {
referringDoctor = json['ReferringDoctor']; referringDoctor = json['ReferringDoctor'];
referralClinic = json['ReferralClinic']; referralClinic = json['ReferralClinic'];
referringClinic = json['ReferringClinic']; referringClinic = json['ReferringClinic'];
createdOn = json['CreatedOn'];
referralStatus = json["ReferralStatus"] is String?json['ReferralStatus']== "Accepted"?46:json['ReferralStatus']=="Pending"?1:0 : json['ReferralStatus']; referralStatus = json["ReferralStatus"] is String?json['ReferralStatus']== "Accepted"?46:json['ReferralStatus']=="Pending"?1:0 : json['ReferralStatus'];
referralDate = json['ReferralDate']; referralDate = json['ReferralDate'] ?? createdOn;
referringDoctorRemarks = json['ReferringDoctorRemarks']; referringDoctorRemarks = json['ReferringDoctorRemarks'];
referredDoctorRemarks = json['ReferredDoctorRemarks']; referredDoctorRemarks = json['ReferredDoctorRemarks'];
referralResponseOn = json['ReferralResponseOn']; referralResponseOn = json['ReferralResponseOn'];
@ -179,7 +180,6 @@ class MyReferredPatientModel {
appointmentDate = json['AppointmentDate']; appointmentDate = json['AppointmentDate'];
appointmentType = json['AppointmentType']; appointmentType = json['AppointmentType'];
patientMRN = json['PatientMRN']; patientMRN = json['PatientMRN'];
createdOn = json['CreatedOn'];
clinicID = json['ClinicID']; clinicID = json['ClinicID'];
nationalityID = json['NationalityID']; nationalityID = json['NationalityID'];
age = json['Age']; age = json['Age'];

@ -6,6 +6,7 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_loader_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
@ -40,27 +41,35 @@ class _AddVerifyMedicalReportState extends State<AddVerifyMedicalReport> {
? TranslationBase.of(context).medicalReportAdd ? TranslationBase.of(context).medicalReportAdd
: TranslationBase.of(context).medicalReportVerify, : TranslationBase.of(context).medicalReportVerify,
backgroundColor: Theme.of(context).scaffoldBackgroundColor, backgroundColor: Theme.of(context).scaffoldBackgroundColor,
body: Column( body: model.state == ViewState.BusyLocal
children: [ ? AppLoaderWidget()
Expanded( : Column(
child: Container( children: [
margin: EdgeInsets.all(16), Expanded(
child: Column( child: Container(
children: [ margin: EdgeInsets.all(16),
Expanded( child: Column(
child: SingleChildScrollView( children: [
child: Container( Expanded(
child: Column( child: SingleChildScrollView(
crossAxisAlignment: CrossAxisAlignment.start, child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
if (model.medicalReportTemplate.length > 0) // if (model.medicalReportTemplate.length > 0)
HtmlRichEditor( HtmlRichEditor(
initialText: model initialText: (medicalReport != null
.medicalReportTemplate[0] ? medicalReport.reportDataHtml
.templateTextHtml, : model.medicalReportTemplate
.length > 0 ? model
.medicalReportTemplate[0] : ""),
hint: "Write the medical report ",
height: height:
MediaQuery.of(context).size.height * MediaQuery
0.75, .of(context)
.size
.height *
0.75,
), ),
], ],
), ),

@ -7,6 +7,7 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/large_avatar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/large_avatar.dart';
@ -17,7 +18,6 @@ import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../../../../routes.dart'; import '../../../../routes.dart';
@ -75,13 +75,18 @@ class MedicalReportPage extends StatelessWidget {
), ),
AddNewOrder( AddNewOrder(
onTap: () { onTap: () {
Navigator.of(context) if (model.hasOnHold()) {
.pushNamed(PATIENT_MEDICAL_REPORT_INSERT, arguments: { Helpers.showErrorToast(
'patient': patient, "Please Verified the on hold report to be able to add new one");
'patientType': patientType, } else {
'arrivalType': arrivalType, Navigator.of(context)
'type': MedicalReportStatus.ADD .pushNamed(PATIENT_MEDICAL_REPORT_INSERT, arguments: {
}); 'patient': patient,
'patientType': patientType,
'arrivalType': arrivalType,
'type': MedicalReportStatus.ADD
});
}
}, },
label: TranslationBase.of(context).createNewMedicalReport, label: TranslationBase.of(context).createNewMedicalReport,
), ),
@ -92,7 +97,7 @@ class MedicalReportPage extends StatelessWidget {
onTap: () { onTap: () {
if (model.medicalReportList[index].status == 1) { if (model.medicalReportList[index].status == 1) {
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
PATIENT_MEDICAL_REPORT_DETAIL, PATIENT_MEDICAL_REPORT_INSERT,
arguments: { arguments: {
'patient': patient, 'patient': patient,
'patientType': patientType, 'patientType': patientType,
@ -101,7 +106,7 @@ class MedicalReportPage extends StatelessWidget {
}); });
} else { } else {
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
PATIENT_MEDICAL_REPORT_INSERT, PATIENT_MEDICAL_REPORT_DETAIL,
arguments: { arguments: {
'patient': patient, 'patient': patient,
'patientType': patientType, 'patientType': patientType,
@ -116,7 +121,7 @@ class MedicalReportPage extends StatelessWidget {
child: CardWithBgWidget( child: CardWithBgWidget(
hasBorder: false, hasBorder: false,
bgColor: model.medicalReportList[index].status == 1 bgColor: model.medicalReportList[index].status == 1
? Colors.red[700] ? Color(0xFFCC9B14)
: Colors.green[700], : Colors.green[700],
widget: Column( widget: Column(
children: [ children: [
@ -132,9 +137,9 @@ class MedicalReportPage extends StatelessWidget {
: TranslationBase.of(context) : TranslationBase.of(context)
.verified, .verified,
color: model.medicalReportList[index] color: model.medicalReportList[index]
.status == .status ==
1 1
? Colors.red[700] ? Color(0xFFCC9B14)
: Colors.green[700], : Colors.green[700],
fontSize: 1.4 * SizeConfig.textMultiplier, fontSize: 1.4 * SizeConfig.textMultiplier,
bold: true, bold: true,
@ -226,8 +231,8 @@ class MedicalReportPage extends StatelessWidget {
Icon( Icon(
model.medicalReportList[index].status == model.medicalReportList[index].status ==
1 1
? EvaIcons.eye ? DoctorApp.edit_1
: DoctorApp.edit_1, :EvaIcons.eye ,
), ),
], ],
), ),

@ -51,8 +51,8 @@ class _AddReplayOnReferralPatientState
void initState() { void initState() {
requestPermissions(); requestPermissions();
super.initState(); super.initState();
replayOnReferralController.text = widget.myReferralInPatientModel.referredDoctorRemarks?? ""; replayOnReferralController.text =
widget.myReferralInPatientModel.referredDoctorRemarks ?? "";
} }
@override @override
@ -60,67 +60,70 @@ class _AddReplayOnReferralPatientState
return AppScaffold( return AppScaffold(
isShowAppBar: false, isShowAppBar: false,
backgroundColor: Theme.of(context).scaffoldBackgroundColor, backgroundColor: Theme.of(context).scaffoldBackgroundColor,
body: SingleChildScrollView( body: Column(
child: Column( children: [
children: [ Expanded(
Column( child: SingleChildScrollView(
crossAxisAlignment: CrossAxisAlignment.start, child: Column(
children: [ crossAxisAlignment: CrossAxisAlignment.start,
BottomSheetTitle(title: 'Reply'), children: [
SizedBox( BottomSheetTitle(title: 'Reply'),
height: 10.0, SizedBox(
), height: 10.0,
Center( ),
child: FractionallySizedBox( Center(
widthFactor: 0.9, child: FractionallySizedBox(
child: Column( widthFactor: 0.9,
children: [ child: Column(
Stack( children: [
children: [ Stack(
AppTextFieldCustom( children: [
hintText: 'Reply your responses here', AppTextFieldCustom(
controller: replayOnReferralController, hintText: 'Reply your responses here',
maxLines: 35, controller: replayOnReferralController,
minLines: 25, maxLines: 35,
hasBorder: true, minLines: 25,
validationError: hasBorder: true,
replayOnReferralController.text.isEmpty && validationError: replayOnReferralController
isSubmitted .text.isEmpty &&
? TranslationBase.of(context).emptyMessage isSubmitted
: null, ? TranslationBase.of(context).emptyMessage
), : null,
Positioned(
top: 0, //MediaQuery.of(context).size.height * 0,
right: 15,
child: IconButton(
icon: Icon(
DoctorApp.speechtotext,
color: Colors.black,
size: 35,
),
onPressed: () {
onVoiceText();
},
), ),
) Positioned(
], top: 0,
), //MediaQuery.of(context).size.height * 0,
], right: 15,
child: IconButton(
icon: Icon(
DoctorApp.speechtotext,
color: Colors.black,
size: 35,
),
onPressed: () {
onVoiceText();
},
),
)
],
),
],
),
), ),
), ),
), ],
], ),
), ),
Container( ),
height: replayOnReferralController.text.isNotEmpty ? 130 : 70, Container(
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5), // height: replayOnReferralController.text.isNotEmpty ? 130 : 70,
child: Column( // margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5),
children: <Widget>[ child: Column(
replayOnReferralController.text.isEmpty children: <Widget>[
? SizedBox() replayOnReferralController.text.isEmpty
: Container( ? SizedBox()
margin: EdgeInsets.all(5), : Container(
child: Expanded( margin: EdgeInsets.all(16),
child: AppButton( child: AppButton(
title: TranslationBase.of(context).clearText, title: TranslationBase.of(context).clearText,
onPressed: () { onPressed: () {
@ -128,14 +131,27 @@ class _AddReplayOnReferralPatientState
replayOnReferralController.text = ''; replayOnReferralController.text = '';
}); });
}, },
)), ),
), ),
Container( Container(
margin: EdgeInsets.all(5), margin: EdgeInsets.fromLTRB(16, 0, 16, 16),
child: AppButton( child: Row(
title: 'Submit Reply', children: [
color: Color(0xff359846), Expanded(
fontWeight: FontWeight.w700, child: AppButton(
onPressed: () {
Navigator.of(context).pop();
},
title: TranslationBase.of(context).reject,
fontColor: Colors.white,
color: Colors.red[600],
),
),
SizedBox(
width: 4,
),
Expanded(
child: AppButton(
onPressed: () async { onPressed: () async {
setState(() { setState(() {
isSubmitted = true; isSubmitted = true;
@ -166,17 +182,67 @@ class _AddReplayOnReferralPatientState
); );
} }
} else { } else {
Helpers.showErrorToast("You can't add empty reply"); Helpers.showErrorToast(
"You can't add empty reply");
setState(() { setState(() {
isSubmitted = false; isSubmitted = false;
}); });
} }
})), },
], title: TranslationBase.of(context).noteConfirm,
), fontColor: Colors.white,
color: Colors.green[600],
),
),
],
),
),
// 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;
// });
// }
// })),
],
), ),
], ),
), ],
), ),
); );
} }

@ -27,7 +27,6 @@ class MyReferralInPatientScreen extends StatelessWidget {
appBarTitle: TranslationBase.of(context).referPatient, appBarTitle: TranslationBase.of(context).referPatient,
body: Column( body: Column(
children: [ children: [
Container( Container(
margin: EdgeInsets.only(top: 70), margin: EdgeInsets.only(top: 70),
child: PatientTypeRadioWidget( child: PatientTypeRadioWidget(
@ -62,50 +61,51 @@ class MyReferralInPatientScreen extends StatelessWidget {
], ],
), ),
) )
: SingleChildScrollView( : Expanded(
child: Container( child: SingleChildScrollView(
child: Column( child: Container(
crossAxisAlignment: CrossAxisAlignment.start, child: Column(
children: [ crossAxisAlignment: CrossAxisAlignment.start,
children: [
...List.generate( ...List.generate(
model.myReferralPatients.length, model.myReferralPatients.length,
(index) => InkWell( (index) => InkWell(
onTap: () { onTap: () {
Navigator.push( Navigator.push(
context, context,
FadePage( FadePage(
page: ReferralPatientDetailScreen(model.myReferralPatients[index],model), page: ReferralPatientDetailScreen(model.myReferralPatients[index],model),
), ),
); );
}, },
child: PatientReferralItemWidget( child: PatientReferralItemWidget(
referralStatus: model.getReferralStatusNameByCode(model.myReferralPatients[index].referralStatus,context), referralStatus: model.getReferralStatusNameByCode(model.myReferralPatients[index].referralStatus,context),
referralStatusCode: model.myReferralPatients[index].referralStatus, referralStatusCode: model.myReferralPatients[index].referralStatus,
patientName: model.myReferralPatients[index].patientName, patientName: model.myReferralPatients[index].patientName,
patientGender: model.myReferralPatients[index].gender, patientGender: model.myReferralPatients[index].gender,
referredDate: AppDateUtils.getDayMonthYearDateFormatted(model.myReferralPatients[index].referralDate), referredDate: AppDateUtils.getDayMonthYearDateFormatted(model.myReferralPatients[index].referralDate),
referredTime: AppDateUtils.getTimeHHMMA(model.myReferralPatients[index].referralDate), referredTime: AppDateUtils.getTimeHHMMA(model.myReferralPatients[index].referralDate),
patientID: "${model.myReferralPatients[index].patientID}", patientID: "${model.myReferralPatients[index].patientID}",
isSameBranch: false, isSameBranch: false,
isReferral: true, isReferral: true,
isReferralClinic: true, isReferralClinic: true,
referralClinic:"${model.myReferralPatients[index].referringClinicDescription}", referralClinic:"${model.myReferralPatients[index].referringClinicDescription}",
remark: model.myReferralPatients[index].referringDoctorRemarks, remark: model.myReferralPatients[index].referringDoctorRemarks,
nationality: model.myReferralPatients[index].nationalityName, nationality: model.myReferralPatients[index].nationalityName,
nationalityFlag: model.myReferralPatients[index].nationalityFlagURL, nationalityFlag: model.myReferralPatients[index].nationalityFlagURL,
doctorAvatar: model.myReferralPatients[index].doctorImageURL, doctorAvatar: model.myReferralPatients[index].doctorImageURL,
referralDoctorName: model.myReferralPatients[index].referringDoctorName, referralDoctorName: model.myReferralPatients[index].referringDoctorName,
clinicDescription: model.myReferralPatients[index].referringClinicDescription, clinicDescription: model.myReferralPatients[index].referringClinicDescription,
infoIcon: Icon(FontAwesomeIcons.arrowRight, infoIcon: Icon(FontAwesomeIcons.arrowRight,
size: 25, color: Colors.black), size: 25, color: Colors.black),
),
), ),
), ),
), ],
], ),
), ),
), ),
), ),
], ],
), ),
), ),

@ -154,7 +154,7 @@ class ReferralPatientDetailScreen extends StatelessWidget {
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: referredPatient.referralStatus == 1 color: referredPatient.referralStatus == 1
? Color(0xffc4aa54) ? Color(0xffc4aa54)
: referredPatient.referralStatus == 46 : referredPatient.referralStatus == 46 || referredPatient.referralStatus == 2
? Colors.green[700] ? Colors.green[700]
: Colors.red[700], : Colors.red[700],
), ),
@ -548,30 +548,32 @@ class ReferralPatientDetailScreen extends StatelessWidget {
), ),
), ),
), ),
Container( if (referredPatient.referralStatus == 1)
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16), Container(
child: AppButton( margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
title: referredPatient.referredDoctorRemarks.isEmpty ? TranslationBase.of(context).replay : TranslationBase.of(context).edit, child: AppButton(
color: Colors.red[700], title: TranslationBase.of(context).replay,
fontColor: Colors.white, color: Colors.red[700],
fontWeight: FontWeight.w700, fontColor: Colors.white,
fontSize: 1.8, fontWeight: FontWeight.w700,
hPadding: 8, fontSize: 1.8,
vPadding: 12, hPadding: 8,
onPressed: () async { vPadding: 12,
Navigator.push( onPressed: () async {
context, Navigator.push(
SlideUpPageRoute( context,
widget: AddReplayOnReferralPatient( SlideUpPageRoute(
patientReferralViewModel: patientReferralViewModel, widget: AddReplayOnReferralPatient(
myReferralInPatientModel: referredPatient, patientReferralViewModel: patientReferralViewModel,
isEdited: referredPatient.referredDoctorRemarks.isNotEmpty, myReferralInPatientModel: referredPatient,
isEdited: referredPatient
.referredDoctorRemarks.isNotEmpty,
),
), ),
), );
); },
}, ),
), ),
),
], ],
), ),
), ),

@ -58,7 +58,7 @@ class PatientReferralItemWidget extends StatelessWidget {
child: CardWithBgWidget( child: CardWithBgWidget(
bgColor: referralStatusCode == 1 bgColor: referralStatusCode == 1
? Color(0xffc4aa54) ? Color(0xffc4aa54)
: referralStatusCode == 46 : referralStatusCode == 46 || referralStatusCode == 2
? Colors.green[700] ? Colors.green[700]
: Colors.red[700], : Colors.red[700],
hasBorder: false, hasBorder: false,
@ -78,7 +78,7 @@ class PatientReferralItemWidget extends StatelessWidget {
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: referralStatusCode == 1 color: referralStatusCode == 1
? Color(0xffc4aa54) ? Color(0xffc4aa54)
: referralStatusCode == 46 : referralStatusCode == 46 || referralStatusCode == 2
? Colors.green[700] ? Colors.green[700]
: Colors.red[700], : Colors.red[700],
), ),

Loading…
Cancel
Save