Merge branch 'reply-doctor_changes' into 'development'

reply changes

See merge request Cloud_Solution/doctor_app_flutter!735
merge-requests/734/merge
Mohammad Aljammal 5 years ago
commit fb28b7e910

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

@ -158,10 +158,16 @@ 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 { } finally {
referralDate = DateTime.now(); referralDate = DateTime.now();
@ -260,6 +266,6 @@ class MyReferralPatientModel {
} }
get patientName { get patientName {
return this.firstName+" "+this.lastName; return this.firstName + " " + this.lastName;
} }
} }

@ -116,14 +116,14 @@ class _AddReplayOnReferralPatientState
), ),
), ),
Container( Container(
height: replayOnReferralController.text.isNotEmpty ? 130 : 70, // height: replayOnReferralController.text.isNotEmpty ? 130 : 70,
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5), // margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5),
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
replayOnReferralController.text.isEmpty replayOnReferralController.text.isEmpty
? SizedBox() ? SizedBox()
: Container( : Container(
margin: EdgeInsets.all(5), margin: EdgeInsets.all(16),
child: AppButton( child: AppButton(
title: TranslationBase.of(context).clearText, title: TranslationBase.of(context).clearText,
onPressed: () { onPressed: () {
@ -134,11 +134,24 @@ class _AddReplayOnReferralPatientState
), ),
), ),
Container( Container(
margin: EdgeInsets.all(5), margin: EdgeInsets.fromLTRB(16, 0, 16, 16),
child: Row(
children: [
Expanded(
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( child: AppButton(
title: 'Submit Reply',
color: Color(0xff359846),
fontWeight: FontWeight.w700,
onPressed: () async { onPressed: () async {
setState(() { setState(() {
isSubmitted = true; isSubmitted = true;
@ -169,12 +182,63 @@ 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,12 +61,12 @@ class MyReferralInPatientScreen extends StatelessWidget {
], ],
), ),
) )
: SingleChildScrollView( : Expanded(
child: SingleChildScrollView(
child: Container( child: Container(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
...List.generate( ...List.generate(
model.myReferralPatients.length, model.myReferralPatients.length,
(index) => InkWell( (index) => InkWell(
@ -106,6 +105,7 @@ class MyReferralInPatientScreen extends StatelessWidget {
), ),
), ),
), ),
),
], ],
), ),
), ),

@ -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,10 +548,11 @@ class ReferralPatientDetailScreen extends StatelessWidget {
), ),
), ),
), ),
if (referredPatient.referralStatus == 1)
Container( Container(
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16), margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
child: AppButton( child: AppButton(
title: referredPatient.referredDoctorRemarks.isEmpty ? TranslationBase.of(context).replay : TranslationBase.of(context).edit, title: TranslationBase.of(context).replay,
color: Colors.red[700], color: Colors.red[700],
fontColor: Colors.white, fontColor: Colors.white,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
@ -565,7 +566,8 @@ class ReferralPatientDetailScreen extends StatelessWidget {
widget: AddReplayOnReferralPatient( widget: AddReplayOnReferralPatient(
patientReferralViewModel: patientReferralViewModel, patientReferralViewModel: patientReferralViewModel,
myReferralInPatientModel: referredPatient, myReferralInPatientModel: referredPatient,
isEdited: referredPatient.referredDoctorRemarks.isNotEmpty, 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