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

merge-requests/763/head
Elham Rababah 5 years ago
commit 7d6123f9cb

@ -121,8 +121,8 @@
android:id="@+id/record_icon" android:id="@+id/record_icon"
android:layout_width="@dimen/local_back_icon_size" android:layout_width="@dimen/local_back_icon_size"
android:layout_height="@dimen/local_back_icon_size" android:layout_height="@dimen/local_back_icon_size"
android:layout_gravity="center"
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:layout_margin="5dp"
android:src="@drawable/ic_record" /> android:src="@drawable/ic_record" />
</FrameLayout> </FrameLayout>

@ -24,19 +24,8 @@ 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.BusyLocal); setState(ViewState.Busy);
await _service.getMedicalReportTemplate(); await _service.getMedicalReportTemplate();
if (_service.hasError) { if (_service.hasError) {
error = _service.error; error = _service.error;
@ -62,7 +51,7 @@ class PatientMedicalReportViewModel extends BaseViewModel {
error = _service.error; error = _service.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
} else } else
getMedicalReportList(patient); await getMedicalReportList(patient);
setState(ViewState.Idle); setState(ViewState.Idle);
} }
@ -73,7 +62,7 @@ class PatientMedicalReportViewModel extends BaseViewModel {
error = _service.error; error = _service.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
} else } else
getMedicalReportList(patient); await getMedicalReportList(patient);
setState(ViewState.Idle); setState(ViewState.Idle);
} }
@ -84,7 +73,7 @@ class PatientMedicalReportViewModel extends BaseViewModel {
error = _service.error; error = _service.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
} else } else
getMedicalReportList(patient); await getMedicalReportList(patient);
setState(ViewState.Idle); setState(ViewState.Idle);
} }
} }

@ -19,12 +19,12 @@ class BaseViewModel extends ChangeNotifier {
void setState(ViewState viewState) { void setState(ViewState viewState) {
_state = viewState; _state = viewState;
notifyListeners(); notifyListeners();
} }
Future<DoctorProfileModel> getDoctorProfile({bool isGetProfile = false}) async { Future<DoctorProfileModel> getDoctorProfile({bool isGetProfile = false}) async {
if(isGetProfile) if (isGetProfile) {
{
Map profile = await sharedPref.getObj(DOCTOR_PROFILE); Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
if (profile != null) { if (profile != null) {
doctorProfile = DoctorProfileModel.fromJson(profile); doctorProfile = DoctorProfileModel.fromJson(profile);
@ -47,9 +47,9 @@ class BaseViewModel extends ChangeNotifier {
} }
} }
setDoctorProfile(DoctorProfileModel doctorProfile)async { setDoctorProfile(DoctorProfileModel doctorProfile) async {
await sharedPref.setObj(DOCTOR_PROFILE, doctorProfile); await sharedPref.setObj(DOCTOR_PROFILE, doctorProfile);
this.doctorProfile = doctorProfile; this.doctorProfile = doctorProfile;
notifyListeners(); notifyListeners();
} }
} }

@ -322,6 +322,7 @@ class PatientReferralViewModel extends BaseViewModel {
patient.doctorId = referredPatient.doctorID; patient.doctorId = referredPatient.doctorID;
patient.doctorName = referredPatient.doctorName; patient.doctorName = referredPatient.doctorName;
patient.patientId = referredPatient.patientID; patient.patientId = referredPatient.patientID;
patient.patientMRN = referredPatient.patientID;
patient.firstName = referredPatient.firstName; patient.firstName = referredPatient.firstName;
patient.middleName = referredPatient.middleName; patient.middleName = referredPatient.middleName;
patient.lastName = referredPatient.lastName; patient.lastName = referredPatient.lastName;
@ -339,6 +340,8 @@ class PatientReferralViewModel extends BaseViewModel {
patient.nationalityFlagURL = referredPatient.nationalityFlagURL; patient.nationalityFlagURL = referredPatient.nationalityFlagURL;
patient.age = referredPatient.age; patient.age = referredPatient.age;
patient.clinicDescription = referredPatient.clinicDescription; patient.clinicDescription = referredPatient.clinicDescription;
patient.appointmentNo = referredPatient.appointmentNo;
return patient; return patient;
} }

@ -124,6 +124,6 @@ void setupLocator() {
locator.registerFactory(() => PatientSearchViewModel()); locator.registerFactory(() => PatientSearchViewModel());
locator.registerFactory(() => HospitalViewModel()); locator.registerFactory(() => HospitalViewModel());
locator.registerFactory(() => LiveCarePatientViewModel()); locator.registerFactory(() => LiveCarePatientViewModel());
locator.registerLazySingleton(() => PatientMedicalReportViewModel()); locator.registerFactory(() => PatientMedicalReportViewModel());
locator.registerFactory(() => ScanQrViewModel()); locator.registerFactory(() => ScanQrViewModel());
} }

@ -1,13 +1,10 @@
import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/viewModel/PatientMedicalReportViewModel.dart'; import 'package:doctor_app_flutter/core/viewModel/PatientMedicalReportViewModel.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/models/patient/MedicalReport/MeidcalReportModel.dart'; import 'package:doctor_app_flutter/models/patient/MedicalReport/MeidcalReportModel.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; 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/screens/patients/profile/medical_report/MedicalReportPage.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';
@ -15,9 +12,27 @@ import 'package:doctor_app_flutter/widgets/shared/text_fields/html_rich_editor.d
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:html_editor_enhanced/html_editor.dart'; import 'package:html_editor_enhanced/html_editor.dart';
import 'package:permission_handler/permission_handler.dart'; import 'package:permission_handler/permission_handler.dart';
import 'package:provider/provider.dart';
class AddVerifyMedicalReport extends StatefulWidget { class AddVerifyMedicalReport extends StatefulWidget {
final PatiantInformtion patient;
final String patientType;
final String arrivalType;
final MedicalReportModel medicalReport;
final PatientMedicalReportViewModel model;
final MedicalReportStatus status;
final String medicalNote;
const AddVerifyMedicalReport(
{Key key,
this.patient,
this.patientType,
this.arrivalType,
this.medicalReport,
this.model,
this.status,
this.medicalNote})
: super(key: key);
@override @override
_AddVerifyMedicalReportState createState() => _AddVerifyMedicalReportState(); _AddVerifyMedicalReportState createState() => _AddVerifyMedicalReportState();
} }
@ -25,121 +40,121 @@ class AddVerifyMedicalReport extends StatefulWidget {
class _AddVerifyMedicalReportState extends State<AddVerifyMedicalReport> { class _AddVerifyMedicalReportState extends State<AddVerifyMedicalReport> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of<ProjectViewModel>(context); String txtOfMedicalReport;
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
PatientMedicalReportViewModel patientMedicalReportViewModel = routeArgs['model'];
PatiantInformtion patient = routeArgs['patient'];
MedicalReportStatus status = routeArgs['status'] as MedicalReportStatus;
MedicalReportModel medicalReport = routeArgs.containsKey("medicalReport") ? routeArgs['medicalReport'] : null;
return BaseView<PatientMedicalReportViewModel>( return BaseView<PatientMedicalReportViewModel>(
onModelReady: (_) => patientMedicalReportViewModel.getMedicalReportTemplate(), onModelReady: (model) async {},
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: true, isShowAppBar: true,
appBarTitle: status == MedicalReportStatus.ADD appBarTitle: widget.status == MedicalReportStatus.ADD
? 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: model.state == ViewState.BusyLocal body: Column(
? AppLoaderWidget() children: [
: Column( Expanded(
children: [ child: Container(
Expanded( margin: EdgeInsets.all(16),
child: Container( child: Column(
margin: EdgeInsets.all(16), children: [
child: Column( Expanded(
children: [ child: SingleChildScrollView(
Expanded( child: Container(
child: SingleChildScrollView( child: Column(
child: Container( crossAxisAlignment: CrossAxisAlignment.start,
child: Column( children: [
crossAxisAlignment: CrossAxisAlignment.start, if (model.medicalReportTemplate.length > 0)
children: [ HtmlRichEditor(
// if (model.medicalReportTemplate.length > 0) initialText: (widget.medicalReport != null
HtmlRichEditor( ? widget.medicalNote
initialText: (medicalReport != null : widget.model.medicalReportTemplate[0].templateText.length > 0
? medicalReport.reportDataHtml ? widget.model.medicalReportTemplate[0].templateText
: model.medicalReportTemplate[0].templateText.length > 0 : ""),
? model.medicalReportTemplate[0].templateText hint: "Write the medical report ",
: ""), height: MediaQuery.of(context).size.height * 0.75,
hint: "Write the medical report ",
height: MediaQuery.of(context).size.height * 0.75,
),
],
), ),
), ],
),
), ),
], ),
), ),
), ),
), ],
Container( ),
padding: EdgeInsets.all(16.0), ),
color: Colors.white, ),
child: Row( Container(
children: [ padding: EdgeInsets.all(16.0),
Expanded( color: Colors.white,
child: AppButton( child: Row(
title: status == MedicalReportStatus.ADD children: [
? TranslationBase.of(context).save Expanded(
: TranslationBase.of(context).save, child: AppButton(
color: Color(0xffEAEAEA), title: widget.status == MedicalReportStatus.ADD
fontColor: Colors.black, ? TranslationBase.of(context).save
// disabled: progressNoteController.text.isEmpty, : TranslationBase.of(context).save,
fontWeight: FontWeight.w700, color: Color(0xffEAEAEA),
onPressed: () async { fontColor: Colors.black,
String txtOfMedicalReport = await HtmlEditor.getText(); // disabled: progressNoteController.text.isEmpty,
fontWeight: FontWeight.w700,
onPressed: () async {
txtOfMedicalReport = await HtmlEditor.getText();
if (txtOfMedicalReport.isNotEmpty) { if (txtOfMedicalReport.isNotEmpty) {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
medicalReport != null widget.medicalReport != null
? model.updateMedicalReport( ? widget.model.updateMedicalReport(
patient, widget.patient,
txtOfMedicalReport, txtOfMedicalReport,
medicalReport != null ? medicalReport.lineItemNo : null, widget.medicalReport != null ? widget.medicalReport.lineItemNo : null,
medicalReport != null ? medicalReport.invoiceNo : null) widget.medicalReport != null ? widget.medicalReport.invoiceNo : null)
: model.addMedicalReport(patient, txtOfMedicalReport); : widget.model.addMedicalReport(widget.patient, txtOfMedicalReport);
//model.getMedicalReportList(patient); //model.getMedicalReportList(patient);
Navigator.pop(context); Navigator.pop(context);
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (model.state == ViewState.ErrorLocal) { if (widget.model.state == ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(model.error); DrAppToastMsg.showErrorToast(widget.model.error);
} }
} } else {
}, DrAppToastMsg.showErrorToast("Please enter medical note");
), }
), },
SizedBox(
width: 8,
),
if (medicalReport != null)
Expanded(
child: AppButton(
title: status == MedicalReportStatus.ADD
? TranslationBase.of(context).add
: TranslationBase.of(context).verify,
color: Color(0xff359846),
fontWeight: FontWeight.w700,
onPressed: () async {
GifLoaderDialogUtils.showMyDialog(context);
await model.verifyMedicalReport(patient, medicalReport);
GifLoaderDialogUtils.hideDialog(context);
Navigator.pop(context);
if (model.state == ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(model.error);
}
},
),
),
],
), ),
), ),
SizedBox(
width: 8,
),
if (widget.medicalReport != null)
Expanded(
child: AppButton(
title: widget.status == MedicalReportStatus.ADD
? TranslationBase.of(context).add
: TranslationBase.of(context).verify,
color: Color(0xff359846),
fontWeight: FontWeight.w700,
onPressed: () async {
txtOfMedicalReport = await HtmlEditor.getText();
if (txtOfMedicalReport.isNotEmpty) {
GifLoaderDialogUtils.showMyDialog(context);
await widget.model.verifyMedicalReport(widget.patient, widget.medicalReport);
GifLoaderDialogUtils.hideDialog(context);
Navigator.pop(context);
if (widget.model.state == ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(widget.model.error);
}
} else {
DrAppToastMsg.showErrorToast("Please enter medical note");
}
},
),
),
], ],
), ),
),
],
),
)); ));
} }

@ -40,6 +40,7 @@ class _MedicalReportPageState extends State<MedicalReportPage> {
return BaseView<PatientMedicalReportViewModel>( return BaseView<PatientMedicalReportViewModel>(
onModelReady: (model) async { onModelReady: (model) async {
await model.getMedicalReportList(patient); await model.getMedicalReportList(patient);
await model.getMedicalReportTemplate();
}, },
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
@ -79,13 +80,25 @@ class _MedicalReportPageState extends State<MedicalReportPage> {
// Helpers.showErrorToast("Please Verified the on hold report to be able to add new one"); // Helpers.showErrorToast("Please Verified the on hold report to be able to add new one");
// } else // } else
Navigator.of(context).pushNamed(PATIENT_MEDICAL_REPORT_INSERT, arguments: { Navigator.push(
'patient': patient, context,
'patientType': patientType, MaterialPageRoute(
'arrivalType': arrivalType, builder: (context) => AddVerifyMedicalReport(
'type': MedicalReportStatus.ADD, patient: patient,
'model': model, patientType: patientType,
}); arrivalType: arrivalType,
model: model,
status: MedicalReportStatus.ADD,
)),
);
// 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,
), ),
@ -95,13 +108,25 @@ class _MedicalReportPageState extends State<MedicalReportPage> {
(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: { // Navigator.of(context).pushNamed(PATIENT_MEDICAL_REPORT_INSERT, arguments: {
'patient': patient, // 'patient': patient,
'patientType': patientType, // 'patientType': patientType,
'arrivalType': arrivalType, // 'arrivalType': arrivalType,
'medicalReport': model.medicalReportList[index], // 'medicalReport': model.medicalReportList[index],
'model': model, // 'model': model,
}); // });
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => AddVerifyMedicalReport(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
medicalReport: model.medicalReportList[index],
model: model,
medicalNote: model.medicalReportList[index].reportDataHtml,
)),
);
} else { } else {
Navigator.of(context).pushNamed(PATIENT_MEDICAL_REPORT_DETAIL, arguments: { Navigator.of(context).pushNamed(PATIENT_MEDICAL_REPORT_DETAIL, arguments: {
'patient': patient, 'patient': patient,
@ -138,8 +163,8 @@ class _MedicalReportPageState extends State<MedicalReportPage> {
), ),
AppText( AppText(
projectViewModel.isArabic projectViewModel.isArabic
? model.medicalReportList[index].doctorNameN ? model.medicalReportList[index].doctorNameN ?? ""
: model.medicalReportList[index].doctorName, : model.medicalReportList[index].doctorName ?? "",
fontSize: 1.9 * SizeConfig.textMultiplier, fontSize: 1.9 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: Color(0xFF2E303A), color: Color(0xFF2E303A),

@ -309,7 +309,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
// .openVideo( // .openVideo(
// model.startCallRes, // model.startCallRes,
// patient, // patient,
// false, callConnected, // model.startCallRes.isRecording // model.startCallRes != null ? model.startCallRes.isRecording : true, callConnected,
// callDisconnected); // callDisconnected);
// }); // });
if (isCallFinished) { if (isCallFinished) {
@ -349,7 +349,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
.openVideo( .openVideo(
model.startCallRes, model.startCallRes,
patient, patient,
/*model.startCallRes != null ? model.startCallRes.isRecording : */ true model.startCallRes != null ? model.startCallRes.isRecording : true
, callConnected, , callConnected,
callDisconnected); callDisconnected);
}); });

@ -12,8 +12,13 @@ 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 ReferredPatientScreen extends StatelessWidget { class ReferredPatientScreen extends StatefulWidget {
@override
_ReferredPatientScreenState createState() => _ReferredPatientScreenState();
}
class _ReferredPatientScreenState extends State<ReferredPatientScreen> {
PatientType patientType = PatientType.IN_PATIENT; PatientType patientType = PatientType.IN_PATIENT;
@override @override
@ -30,7 +35,9 @@ class ReferredPatientScreen 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.getMyReferredPatient(isFirstTime: false); await model.getMyReferredPatient(isFirstTime: false);
@ -75,7 +82,7 @@ class ReferredPatientScreen extends StatelessWidget {
context, context,
FadePage( FadePage(
page: ReferredPatientDetailScreen( page: ReferredPatientDetailScreen(
model.getReferredPatientItem(index)), model.getReferredPatientItem(index), this.patientType),
), ),
); );
}, },

@ -1,4 +1,5 @@
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/PatientType.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/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';
@ -18,8 +19,9 @@ import '../../../../routes.dart';
class ReferredPatientDetailScreen extends StatelessWidget { class ReferredPatientDetailScreen extends StatelessWidget {
final MyReferredPatientModel referredPatient; final MyReferredPatientModel referredPatient;
final PatientType patientType;
ReferredPatientDetailScreen(this.referredPatient); ReferredPatientDetailScreen(this.referredPatient, this.patientType);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -74,7 +76,8 @@ class ReferredPatientDetailScreen extends StatelessWidget {
.pushNamed(PATIENTS_PROFILE, arguments: { .pushNamed(PATIENTS_PROFILE, arguments: {
"patient": patient, "patient": patient,
"patientType": "1", "patientType": "1",
"isInpatient": true, "isInpatient":
patientType == PatientType.IN_PATIENT,
"arrivalType": "1", "arrivalType": "1",
"from": AppDateUtils.convertDateToFormat( "from": AppDateUtils.convertDateToFormat(
DateTime.now(), 'yyyy-MM-dd'), DateTime.now(), 'yyyy-MM-dd'),
@ -93,14 +96,15 @@ class ReferredPatientDetailScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
InkWell( InkWell(
onTap: (){ onTap: () {
PatiantInformtion patient = PatiantInformtion patient =
model.getPatientFromReferral(referredPatient); model.getPatientFromReferral(referredPatient);
Navigator.of(context) Navigator.of(context)
.pushNamed(PATIENTS_PROFILE, arguments: { .pushNamed(PATIENTS_PROFILE, arguments: {
"patient": patient, "patient": patient,
"patientType": "1", "patientType": "1",
"isInpatient": true, "isInpatient":
patientType == PatientType.IN_PATIENT,
"arrivalType": "1", "arrivalType": "1",
"from": AppDateUtils.convertDateToFormat( "from": AppDateUtils.convertDateToFormat(
DateTime.now(), 'yyyy-MM-dd'), DateTime.now(), 'yyyy-MM-dd'),
@ -236,36 +240,37 @@ class ReferredPatientDetailScreen extends StatelessWidget {
), ),
], ],
), ),
if(referredPatient if (referredPatient
.frequencyDescription != null) .frequencyDescription !=
Row( null)
mainAxisAlignment: Row(
MainAxisAlignment.start, mainAxisAlignment:
crossAxisAlignment: MainAxisAlignment.start,
CrossAxisAlignment.start, crossAxisAlignment:
children: [ CrossAxisAlignment.start,
AppText( children: [
TranslationBase.of(context) AppText(
.frequency + TranslationBase.of(context)
": ", .frequency +
fontFamily: 'Poppins', ": ",
fontWeight: FontWeight.w600,
fontSize: 1.7 *
SizeConfig.textMultiplier,
color: Color(0XFF575757),
),
Expanded(
child: AppText(
referredPatient
.frequencyDescription,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w700, fontWeight: FontWeight.w600,
fontSize: 14, fontSize: 1.7 *
color: Color(0XFF2E303A), SizeConfig.textMultiplier,
color: Color(0XFF575757),
), ),
), Expanded(
], child: AppText(
), referredPatient
.frequencyDescription,
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
fontSize: 14,
color: Color(0XFF2E303A),
),
),
],
),
], ],
), ),
), ),
@ -303,56 +308,65 @@ class ReferredPatientDetailScreen extends StatelessWidget {
) )
], ],
), ),
if(referredPatient.priorityDescription != null) if (referredPatient.priorityDescription != null)
Row( Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment:
children: [ CrossAxisAlignment.start,
AppText( children: [
TranslationBase.of(context).priority + AppText(
": ", TranslationBase.of(context).priority +
fontFamily: 'Poppins', ": ",
fontWeight: FontWeight.w600,
fontSize: 1.7 * SizeConfig.textMultiplier,
color: Color(0XFF575757),
),
AppText(
referredPatient.priorityDescription,
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
fontSize: 14,
color: Color(0XFF2E303A),
),
],
),
if(referredPatient.mAXResponseTime != null)
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context)
.maxResponseTime +
": ",
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
fontSize: 1.7 * SizeConfig.textMultiplier,
color: Color(0XFF575757),
),
Expanded(
child: AppText(
referredPatient.mAXResponseTime != null?AppDateUtils.convertDateFromServerFormat(
referredPatient.mAXResponseTime,
"dd MMM,yyyy"):'',
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w700, fontWeight: FontWeight.w600,
fontSize: fontSize:
1.8 * SizeConfig.textMultiplier, 1.7 * SizeConfig.textMultiplier,
color: Color(0XFF575757),
),
AppText(
referredPatient.priorityDescription,
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
fontSize: 14,
color: Color(0XFF2E303A), color: Color(0XFF2E303A),
), ),
), ],
], ),
), if (referredPatient.mAXResponseTime != null)
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context)
.maxResponseTime +
": ",
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
fontSize:
1.7 * SizeConfig.textMultiplier,
color: Color(0XFF575757),
),
Expanded(
child: AppText(
referredPatient.mAXResponseTime !=
null
? AppDateUtils
.convertDateFromServerFormat(
referredPatient
.mAXResponseTime,
"dd MMM,yyyy")
: '',
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
fontSize:
1.8 * SizeConfig.textMultiplier,
color: Color(0XFF2E303A),
),
),
],
),
Row( Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -518,11 +532,15 @@ class ReferredPatientDetailScreen extends StatelessWidget {
color: Color(0XFF2E303A), color: Color(0XFF2E303A),
), ),
AppText( AppText(
referredPatient referredPatient.referredDoctorRemarks ==
.referredDoctorRemarks == null ?'':referredPatient null
.referredDoctorRemarks.isNotEmpty ? ''
? referredPatient.referredDoctorRemarks : referredPatient.referredDoctorRemarks
: TranslationBase.of(context).notRepliedYet, .isNotEmpty
? referredPatient
.referredDoctorRemarks
: TranslationBase.of(context)
.notRepliedYet,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 1.6 * SizeConfig.textMultiplier, fontSize: 1.6 * SizeConfig.textMultiplier,
@ -538,6 +556,7 @@ class ReferredPatientDetailScreen extends StatelessWidget {
), ),
), ),
), ),
if (patientType == PatientType.IN_PATIENT)
Container( Container(
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16), margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
child: AppButton( child: AppButton(
@ -548,9 +567,11 @@ class ReferredPatientDetailScreen extends StatelessWidget {
fontSize: 1.8, fontSize: 1.8,
hPadding: 8, hPadding: 8,
vPadding: 12, vPadding: 12,
disabled: referredPatient.referredDoctorRemarks == null? true: referredPatient.referredDoctorRemarks.isNotEmpty disabled: referredPatient.referredDoctorRemarks == null
? false ? true
: true, : referredPatient.referredDoctorRemarks.isNotEmpty
? false
: true,
onPressed: () async { onPressed: () async {
await model.verifyReferralDoctorRemarks(referredPatient); await model.verifyReferralDoctorRemarks(referredPatient);
if (model.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {

@ -7,14 +7,14 @@ packages:
name: _fe_analyzer_shared name: _fe_analyzer_shared
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "14.0.0" version: "12.0.0"
analyzer: analyzer:
dependency: transitive dependency: transitive
description: description:
name: analyzer name: analyzer
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.41.2" version: "0.40.6"
archive: archive:
dependency: transitive dependency: transitive
description: description:
@ -119,7 +119,7 @@ packages:
name: build_web_compilers name: build_web_compilers
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.15.3" version: "2.12.2"
built_collection: built_collection:
dependency: transitive dependency: transitive
description: description:
@ -280,7 +280,7 @@ packages:
name: dart_style name: dart_style
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.12" version: "1.3.10"
date_time_picker: date_time_picker:
dependency: "direct main" dependency: "direct main"
description: description:
@ -629,7 +629,7 @@ packages:
name: meta name: meta
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.0-nullsafety.4" version: "1.3.0-nullsafety.3"
mime: mime:
dependency: transitive dependency: transitive
description: description:
@ -921,7 +921,7 @@ packages:
name: stack_trace name: stack_trace
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.10.0-nullsafety.2" version: "1.10.0-nullsafety.1"
sticky_headers: sticky_headers:
dependency: "direct main" dependency: "direct main"
description: description:
@ -1119,5 +1119,5 @@ packages:
source: hosted source: hosted
version: "2.2.1" version: "2.2.1"
sdks: sdks:
dart: ">=2.11.0-162.0 <=2.11.0-213.1.beta" dart: ">=2.10.0 <2.11.0"
flutter: ">=1.22.0 <2.0.0" flutter: ">=1.22.0 <2.0.0"

Loading…
Cancel
Save