Merge branch 'reply-doctor_changes' into 'development'

Merge branch 'development' into procedure_refactoring

See merge request Cloud_Solution/doctor_app_flutter!732
merge-requests/735/head
Mohammad Aljammal 5 years ago
commit a74f4a3d5a

@ -163,6 +163,8 @@ class MyReferralPatientModel {
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'];

@ -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'];

@ -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,10 +60,11 @@ 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: [
Column( Expanded(
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
BottomSheetTitle(title: 'Reply'), BottomSheetTitle(title: 'Reply'),
@ -83,14 +84,15 @@ class _AddReplayOnReferralPatientState
maxLines: 35, maxLines: 35,
minLines: 25, minLines: 25,
hasBorder: true, hasBorder: true,
validationError: validationError: replayOnReferralController
replayOnReferralController.text.isEmpty && .text.isEmpty &&
isSubmitted isSubmitted
? TranslationBase.of(context).emptyMessage ? TranslationBase.of(context).emptyMessage
: null, : null,
), ),
Positioned( Positioned(
top: 0, //MediaQuery.of(context).size.height * 0, top: 0,
//MediaQuery.of(context).size.height * 0,
right: 15, right: 15,
child: IconButton( child: IconButton(
icon: Icon( icon: Icon(
@ -111,6 +113,8 @@ 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),
@ -120,7 +124,6 @@ class _AddReplayOnReferralPatientState
? SizedBox() ? SizedBox()
: Container( : Container(
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
child: Expanded(
child: AppButton( child: AppButton(
title: TranslationBase.of(context).clearText, title: TranslationBase.of(context).clearText,
onPressed: () { onPressed: () {
@ -128,7 +131,7 @@ class _AddReplayOnReferralPatientState
replayOnReferralController.text = ''; replayOnReferralController.text = '';
}); });
}, },
)), ),
), ),
Container( Container(
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
@ -177,7 +180,6 @@ class _AddReplayOnReferralPatientState
), ),
], ],
), ),
),
); );
} }

Loading…
Cancel
Save