screen fixes 3

dev_v2.8_reverting
Elham Rababh 4 years ago
parent 8eaf834734
commit efd4b0221b

@ -405,7 +405,7 @@ class _CheckBoxListState extends State<CheckBoxListWidget> {
onChanged: (newValue) {
setState(() {
widget.model!
.setSelectedCheckboxValues(element, newValue);
.setSelectedCheckboxValues(element, newValue!);
});
},
activeColor: Color(0xFFD02127),

@ -166,7 +166,7 @@ class _ProgressNoteState extends State<DiagnosisScreen> {
.getDateTimeFromServerFormat(model
.diagnosisForInPatientList[
index]
.createdOn),
.createdOn!),
isArabic:
projectViewModel
.isArabic,
@ -192,7 +192,7 @@ class _ProgressNoteState extends State<DiagnosisScreen> {
.getDateTimeFromServerFormat(model
.diagnosisForInPatientList[
index]
.createdOn))
.createdOn!))
: AppDateUtils.getHour(
DateTime.now()),
fontWeight: FontWeight.w600,
@ -214,7 +214,7 @@ class _ProgressNoteState extends State<DiagnosisScreen> {
children: [
AppText(
TranslationBase.of(context)
.icd +
.icd! +
" : ",
fontSize: 12,
),

@ -40,7 +40,7 @@ class _DischargeSummaryWidgetState extends State<DischargeSummaryWidget> {
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
border: Border.all(color: Colors.grey[200], width: 0.5),
border: Border.all(color: Colors.grey[200]!, width: 0.5),
),
child: Padding(
padding: EdgeInsets.all(15.0),
@ -52,14 +52,14 @@ class _DischargeSummaryWidgetState extends State<DischargeSummaryWidget> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
CustomRow(
label: TranslationBase.of(context).doctorName + ": ",
label: TranslationBase.of(context).doctorName! + ": ",
value:
widget.dischargeSummary.createdByName.toString() ??
"".toString(),
isCopyable: false,
),
CustomRow(
label: TranslationBase.of(context).branch + ": ",
label: TranslationBase.of(context).branch! + ": ",
value: widget.dischargeSummary.projectName.toString() ??
"".toString(),
isCopyable: false,
@ -72,7 +72,7 @@ class _DischargeSummaryWidgetState extends State<DischargeSummaryWidget> {
),
CustomRow(
label:
TranslationBase.of(context).dischargeDate + ": ",
TranslationBase.of(context).dischargeDate! + ": ",
value: AppDateUtils.getDateTimeFromServerFormat(
widget.dischargeSummary.createdOn!)
.day
@ -132,7 +132,7 @@ class _DischargeSummaryWidgetState extends State<DischargeSummaryWidget> {
children: <TextSpan>[
new TextSpan(
text: TranslationBase.of(context)
.pastMedicalHistory +
.pastMedicalHistory! +
": ",
style: TextStyle(
fontSize: SizeConfig
@ -171,7 +171,7 @@ class _DischargeSummaryWidgetState extends State<DischargeSummaryWidget> {
children: <TextSpan>[
new TextSpan(
text: TranslationBase.of(context)
.investigation +
.investigation! +
": ",
style: TextStyle(
fontSize: SizeConfig
@ -211,7 +211,7 @@ class _DischargeSummaryWidgetState extends State<DischargeSummaryWidget> {
children: <TextSpan>[
new TextSpan(
text: TranslationBase.of(context)
.investigation +
.investigation! +
": ",
style: TextStyle(
fontSize: SizeConfig
@ -250,7 +250,7 @@ class _DischargeSummaryWidgetState extends State<DischargeSummaryWidget> {
children: <TextSpan>[
new TextSpan(
text: TranslationBase.of(context)
.planedProcedure +
.planedProcedure! +
": ",
style: TextStyle(
fontSize: SizeConfig

@ -13,9 +13,8 @@ import 'all_discharge_summary.dart';
import 'pending_discharge_summary.dart';
class DischargeSummaryPage extends StatefulWidget {
final Function changeCurrentTab;
const DischargeSummaryPage({Key ? key, this.changeCurrentTab})
const DischargeSummaryPage({Key? key, })
: super(key: key);
@override
@ -24,7 +23,7 @@ class DischargeSummaryPage extends StatefulWidget {
class _DoctorReplyScreenState extends State<DischargeSummaryPage>
with SingleTickerProviderStateMixin {
TabController _tabController;
late TabController _tabController;
int _activeTab = 0;
int pageIndex = 1;
@ -50,16 +49,15 @@ class _DoctorReplyScreenState extends State<DischargeSummaryPage>
@override
Widget build(BuildContext context) {
final screenSize = MediaQuery.of(context).size;
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
final routeArgs = ModalRoute.of(context)!.settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
return WillPopScope(
onWillPop: () async {
widget.changeCurrentTab();
return false;
},
child: AppScaffold(
appBarTitle: TranslationBase.of(context).replay2,
appBarTitle: TranslationBase.of(context).replay2!,
isShowAppBar: true,
patientProfileAppBarModel: PatientProfileAppBarModel(
patient:patient,
@ -98,12 +96,12 @@ class _DoctorReplyScreenState extends State<DischargeSummaryPage>
tabWidget(
screenSize,
_activeTab == 0,
TranslationBase.of(context).pending,
TranslationBase.of(context).pending!,
),
tabWidget(
screenSize,
_activeTab == 1,
TranslationBase.of(context).all,
TranslationBase.of(context).all!,
),
],
),

@ -9,10 +9,9 @@ import 'package:flutter/material.dart';
import 'discharge_Summary_widget.dart';
class PendingDischargeSummary extends StatefulWidget {
final Function changeCurrentTab;
final PatiantInformtion patient;
const PendingDischargeSummary({Key ? key, this.changeCurrentTab, this.patient})
const PendingDischargeSummary({Key? key, required this.patient})
: super(key: key);
@override
@ -29,17 +28,16 @@ class _PendingDischargeSummaryState extends State<PendingDischargeSummary> {
onModelReady: (model) {
model.getPendingDischargeSummary(
patientId: widget.patient.patientId,
admissionNo: int.parse(widget.patient.admissionNo),
admissionNo: int.parse(widget.patient.admissionNo!),
);
},
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
isShowAppBar: false,
body: model.pendingDischargeSummaryList.isEmpty
? Center(
child: ErrorMessage(
error: TranslationBase.of(context).noDataAvailable),
) // DrAppEmbeddedError(error: TranslationBase.of(context).noItem)
? ErrorMessage(
error: TranslationBase.of(context)
.noDataAvailable!) // DrAppEmbeddedError(error: TranslationBase.of(context).noItem!)
: Column(
children: [
Padding(

@ -20,7 +20,7 @@ class FlowChartPage extends StatelessWidget {
final bool isInpatient;
FlowChartPage(
{this.patientLabOrder, this.filterName, this.patient, this.isInpatient});
{required this.patientLabOrder, required this.filterName, required this.patient, required this.isInpatient});
@override
Widget build(BuildContext context) {

@ -14,7 +14,7 @@ class LabResultHistoryPage extends StatelessWidget {
final String filterName;
final PatiantInformtion patient;
LabResultHistoryPage({this.patientLabOrder, this.filterName, this.patient});
LabResultHistoryPage({required this.patientLabOrder, required this.filterName, required this.patient});
// TODO mosa UI changes
@override
Widget build(BuildContext context) {

@ -21,14 +21,14 @@ class LabResultWidget extends StatelessWidget {
final bool isInpatient;
LabResultWidget(
{Key ? key,
this.filterName,
this.patientLabResultList,
this.patientLabOrder,
this.patient,
this.isInpatient})
{Key? key,
required this.filterName,
required this.patientLabResultList,
required this.patientLabOrder,
required this.patient,
required this.isInpatient})
: super(key: key);
ProjectViewModel projectViewModel;
late ProjectViewModel projectViewModel;
@override
Widget build(BuildContext context) {
@ -222,7 +222,7 @@ class LabResultWidget extends StatelessWidget {
FadePage(
page: FlowChartPage(
filterName:
patientLabResultList[index].description,
patientLabResultList[index].description!,
patientLabOrder: patientLabOrder,
patient: patient,
isInpatient: isInpatient,

@ -12,7 +12,7 @@ class LabResultDetailsWidget extends StatefulWidget {
final List<LabOrderResult> labResult;
LabResultDetailsWidget({
this.labResult,
required this.labResult,
});
@override

@ -12,7 +12,7 @@ class LabResultHistoryDetailsWidget extends StatefulWidget {
final List<LabResultHistory> labResultHistory;
LabResultHistoryDetailsWidget({
this.labResultHistory,
required this.labResultHistory,
});
@override
@ -72,7 +72,7 @@ class _VitalSignDetailsWidgetState extends State<LabResultHistoryDetailsWidget>
),
Table(
border: TableBorder.symmetric(
inside: BorderSide(width: 1.0, color: Colors.grey[300]),
inside: BorderSide(width: 1.0, color: Colors.grey[300]!),
),
children: fullData(projectViewModel),
),
@ -85,7 +85,7 @@ class _VitalSignDetailsWidgetState extends State<LabResultHistoryDetailsWidget>
List<TableRow> fullData(ProjectViewModel projectViewModel) {
List<TableRow> tableRow = [];
widget.labResultHistory.forEach((vital) {
var date = AppDateUtils.convertStringToDate(vital.verifiedOnDateTime);
var date = AppDateUtils.convertStringToDate(vital.verifiedOnDateTime!);
tableRow.add(TableRow(children: [
Container(
child: Container(

@ -15,24 +15,24 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class AllLabSpecialResult extends StatefulWidget {
const AllLabSpecialResult({Key key}) : super(key: key);
const AllLabSpecialResult({Key? key}) : super(key: key);
@override
_AllLabSpecialResultState createState() => _AllLabSpecialResultState();
}
class _AllLabSpecialResultState extends State<AllLabSpecialResult> {
String patientType;
late String patientType;
String arrivalType;
PatiantInformtion patient;
bool isInpatient;
bool isFromLiveCare;
late String arrivalType;
late PatiantInformtion patient;
late bool isInpatient;
late bool isFromLiveCare;
@override
void didChangeDependencies() {
super.didChangeDependencies();
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
final routeArgs = ModalRoute.of(context)!.settings.arguments as Map;
patient = routeArgs['patient'];
patientType = routeArgs['patientType'];
arrivalType = routeArgs['arrivalType'];
@ -47,7 +47,7 @@ class _AllLabSpecialResultState extends State<AllLabSpecialResult> {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<LabsViewModel>(
onModelReady: (model) =>
model.getAllSpecialLabResult(patientId: patient.patientMRN),
model.getAllSpecialLabResult(patientId: patient!.patientMRN!),
builder: (context, LabsViewModel model, widget) => AppScaffold(
baseViewModel: model,
backgroundColor: Colors.grey[100],
@ -72,9 +72,9 @@ class _AllLabSpecialResultState extends State<AllLabSpecialResult> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).special +
TranslationBase.of(context).special! +
" " +
TranslationBase.of(context).lab,
TranslationBase.of(context).lab!,
style: "caption2",
color: Colors.black,
fontSize: 13,
@ -111,10 +111,10 @@ class _AllLabSpecialResultState extends State<AllLabSpecialResult> {
height: 160,
decoration: BoxDecoration(
color: model.allSpecialLabList[index]
.isLiveCareAppointment
.isLiveCareAppointment!
? Colors.red[900]
: !model.allSpecialLabList[index]
.isInOutPatient
.isInOutPatient!
? Colors.black
: Color(0xffa9a089),
borderRadius: BorderRadius.only(
@ -136,17 +136,17 @@ class _AllLabSpecialResultState extends State<AllLabSpecialResult> {
child: Center(
child: Text(
model.allSpecialLabList[index]
.isLiveCareAppointment
.isLiveCareAppointment!
? TranslationBase.of(context)
.liveCare
.liveCare!
.toUpperCase()
: !model.allSpecialLabList[index]
.isInOutPatient
.isInOutPatient!
? TranslationBase.of(context)
.inPatientLabel
.inPatientLabel!
.toUpperCase()
: TranslationBase.of(context)
.outpatient
.outpatient!
.toUpperCase(),
style: TextStyle(color: Colors.white),
),
@ -160,21 +160,21 @@ class _AllLabSpecialResultState extends State<AllLabSpecialResult> {
FadePage(
page: SpecialLabResultDetailsPage(
resultData: model.allSpecialLabList[index]
.resultDataHTML,
.resultDataHTML!,
patient: patient,
),
),
),
doctorName:
model.allSpecialLabList[index].doctorName,
model.allSpecialLabList[index].doctorName!,
invoiceNO:
' ${model.allSpecialLabList[index].invoiceNo}',
profileUrl: model
.allSpecialLabList[index].doctorImageURL,
.allSpecialLabList[index].doctorImageURL!,
branch:
model.allSpecialLabList[index].projectName,
clinic: model
.allSpecialLabList[index].clinicDescription,
model.allSpecialLabList[index].projectName!,
clinic: model.allSpecialLabList[index]
.clinicDescription!,
appointmentDate:
AppDateUtils.getDateTimeFromServerFormat(
model.allSpecialLabList[index].createdOn,

@ -11,9 +11,9 @@ import 'Lab_Result_details_wideget.dart';
class LabResultChartAndDetails extends StatelessWidget {
LabResultChartAndDetails({
Key ? key,
@required this.labResult,
@required this.name,
Key? key,
required this.labResult,
required this.name,
}) : super(key: key);
final List<LabOrderResult> labResult;

@ -9,9 +9,9 @@ import 'LineChartCurvedLabHistory.dart';
class LabResultHistoryChartAndDetails extends StatelessWidget {
LabResultHistoryChartAndDetails({
Key ? key,
@required this.labResultHistory,
@required this.name,
Key? key,
required this.labResultHistory,
required this.name,
}) : super(key: key);
final List<LabResultHistory> labResultHistory;

@ -14,7 +14,7 @@ import 'package:flutter/material.dart';
class LabResult extends StatefulWidget {
final LabOrdersResModel labOrders;
LabResult({Key ? key, this.labOrders});
LabResult({Key? key, required this.labOrders});
@override
_LabResultState createState() => _LabResultState();
@ -27,10 +27,9 @@ class _LabResultState extends State<LabResult> {
onModelReady: (model) => model.getLabResult(widget.labOrders),
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
appBarTitle: TranslationBase.of(context).labOrders,
appBarTitle: TranslationBase.of(context).labOrders ?? "",
body: model.labResultList.length == 0
? DrAppEmbeddedError(
error: TranslationBase.of(context).errorNoLabOrders)
? DrAppEmbeddedError(error: TranslationBase.of(context).errorNoLabOrders ?? "")
: Container(
margin: EdgeInsets.fromLTRB(SizeConfig.realScreenWidth * 0.05,
0, SizeConfig.realScreenWidth * 0.05, 0),

@ -1,6 +1,7 @@
import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart';
import 'package:doctor_app_flutter/core/viewModel/labs_view_model.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/patient/profile/patient_profile_app_bar_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
@ -17,12 +18,12 @@ class LaboratoryResultPage extends StatefulWidget {
final bool isInpatient;
LaboratoryResultPage(
{Key ? key,
this.patientLabOrders,
this.patient,
this.patientType,
this.arrivalType,
this.isInpatient});
{Key? key,
required this.patientLabOrders,
required this.patient,
required this.patientType,
required this.arrivalType,
required this.isInpatient});
@override
_LaboratoryResultPageState createState() => _LaboratoryResultPageState();
@ -33,16 +34,14 @@ class _LaboratoryResultPageState extends State<LaboratoryResultPage> {
Widget build(BuildContext context) {
return BaseView<LabsViewModel>(
onModelReady: (model) => model.getPatientLabResult(
patientLabOrder: widget.patientLabOrders,
patient: widget.patient,
isInpatient: true),
patientLabOrder: widget.patientLabOrders, patient: widget.patient, isInpatient: true),
builder: (_, model, w) => AppScaffold(
isShowAppBar: true,
appBar: PatientProfileAppBar(
widget.patient,
isInpatient:widget.isInpatient,
isFromLabResult: true,
appointmentDate: widget.patientLabOrders.orderDate,
patientProfileAppBarModel: PatientProfileAppBarModel(
patient: widget.patient,
isInpatient: widget.isInpatient,
isFromLabResult: true,
appointmentDate: widget.patientLabOrders.orderDate!,
),
baseViewModel: model,
@ -51,11 +50,10 @@ class _LaboratoryResultPageState extends State<LaboratoryResultPage> {
body: SingleChildScrollView(
child: LaboratoryResultWidget(
onTap: () async {},
billNo: widget.patientLabOrders.invoiceNo,
details: model.patientLabSpecialResult.length > 0
? model.patientLabSpecialResult[0].resultDataHTML
: null,
orderNo: widget.patientLabOrders.orderNo,
billNo: widget.patientLabOrders.invoiceNo!,
details:
model.patientLabSpecialResult.length > 0 ? model.patientLabSpecialResult[0].resultDataHTML : null,
orderNo: widget.patientLabOrders.orderNo!,
patientLabOrder: widget.patientLabOrders,
patient: widget.patient,
isInpatient: widget.patientType == "1",

@ -18,21 +18,21 @@ import 'package:provider/provider.dart';
class LaboratoryResultWidget extends StatefulWidget {
final GestureTapCallback onTap;
final String billNo;
final String details;
final String? details;
final String orderNo;
final PatientLabOrders patientLabOrder;
final PatiantInformtion patient;
final bool isInpatient;
const LaboratoryResultWidget(
{Key ? key,
this.onTap,
this.billNo,
this.details,
this.orderNo,
this.patientLabOrder,
this.patient,
this.isInpatient})
{Key? key,
required this.onTap,
required this.billNo,
required this.details,
required this.orderNo,
required this.patientLabOrder,
required this.patient,
required this.isInpatient})
: super(key: key);
@override
@ -42,7 +42,7 @@ class LaboratoryResultWidget extends StatefulWidget {
class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
bool _isShowMoreGeneral = true;
bool _isShowMore = true;
ProjectViewModel projectViewModel;
late ProjectViewModel projectViewModel;
@override
Widget build(BuildContext context) {
@ -158,13 +158,13 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
else if (widget.details == null)
Container(
child: ErrorMessage(
error: TranslationBase.of(context).noDataAvailable,
error: TranslationBase.of(context).noDataAvailable!,
),
),
SizedBox(
height: 15,
),
if (widget.details != null && widget.details.isNotEmpty)
if (widget.details != null && widget.details!.isNotEmpty)
Column(
children: [
InkWell(
@ -223,7 +223,7 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
duration: Duration(milliseconds: 7000),
child: Container(
width: double.infinity,
child: !Helpers.isTextHtml(widget.details)
child: !Helpers.isTextHtml(widget.details!)
? AppText(
widget.details ??
TranslationBase.of(context)

@ -13,7 +13,7 @@ class SpecialLabResultDetailsPage extends StatelessWidget {
final String resultData;
final PatiantInformtion patient;
const SpecialLabResultDetailsPage({Key ? key, this.resultData, this.patient}) : super(key: key);
const SpecialLabResultDetailsPage({Key? key, required this.resultData, required this.patient}) : super(key: key);
@override
Widget build(BuildContext context) {

@ -14,13 +14,13 @@ import 'package:html_editor_enhanced/html_editor.dart';
import 'package:permission_handler/permission_handler.dart';
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;
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,
@ -38,6 +38,7 @@ class AddVerifyMedicalReport extends StatefulWidget {
}
class _AddVerifyMedicalReportState extends State<AddVerifyMedicalReport> {
HtmlEditorController _controller = HtmlEditorController();
@override
Widget build(BuildContext context) {
String txtOfMedicalReport;
@ -50,8 +51,8 @@ class _AddVerifyMedicalReportState extends State<AddVerifyMedicalReport> {
baseViewModel: model,
isShowAppBar: true,
appBarTitle: widget.status == MedicalReportStatus.ADD
? TranslationBase.of(context).medicalReportAdd
: TranslationBase.of(context).medicalReportVerify,
? TranslationBase.of(context).medicalReportAdd!
: TranslationBase.of(context).medicalReportVerify!,
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
body: Column(
children: [
@ -68,13 +69,26 @@ class _AddVerifyMedicalReportState extends State<AddVerifyMedicalReport> {
children: [
if (model.medicalReportTemplate.length > 0)
HtmlRichEditor(
initialText: (widget.medicalReport != null
initialText: (widget.medicalReport !=
null
? widget.medicalNote
: widget.model.medicalReportTemplate[0].templateText.length > 0
? widget.model.medicalReportTemplate[0].templateText
: widget
.model!
.medicalReportTemplate[
0]
.templateText!
.length >
0
? widget
.model!
.medicalReportTemplate[0]
.templateText
: ""),
hint: "Write the medical report ",
height: MediaQuery.of(context).size.height * 0.75,
height:
MediaQuery.of(context).size.height *
0.75,
controller: _controller,
),
],
),
@ -100,64 +114,77 @@ class _AddVerifyMedicalReportState extends State<AddVerifyMedicalReport> {
// disabled: progressNoteController.text.isEmpty,
fontWeight: FontWeight.w700,
onPressed: () async {
txtOfMedicalReport = await HtmlEditor.getText();
txtOfMedicalReport = await _controller.getText();
if (txtOfMedicalReport.isNotEmpty) {
GifLoaderDialogUtils.showMyDialog(context);
if (txtOfMedicalReport.isNotEmpty) {
GifLoaderDialogUtils.showMyDialog(context);
widget.medicalReport != null
? await widget.model!.updateMedicalReport(
widget.patient!,
txtOfMedicalReport,
widget.medicalReport != null
?await widget.model.updateMedicalReport(
widget.patient,
txtOfMedicalReport,
widget.medicalReport != null ? widget.medicalReport.lineItemNo : null,
widget.medicalReport != null ? widget.medicalReport.invoiceNo : null)
: await widget.model.addMedicalReport(widget.patient, txtOfMedicalReport);
//model.getMedicalReportList(patient);
? widget.medicalReport!.lineItemNo!
: '',
widget.medicalReport != null
? widget.medicalReport!.invoiceNo!
: '')
: await widget.model!.addMedicalReport(
widget.patient!, txtOfMedicalReport);
//model.getMedicalReportList(patient);
Navigator.pop(context);
Navigator.pop(context);
GifLoaderDialogUtils.hideDialog(context);
if (widget.model.state == ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(widget.model.error);
}
} else {
DrAppToastMsg.showErrorToast("Please enter medical note");
GifLoaderDialogUtils.hideDialog(context);
if (widget.model!.state ==
ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(
widget.model!.error);
}
} else {
DrAppToastMsg.showErrorToast(
"Please enter medical note");
}
},
),
),
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 _controller.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);
}
},
),
),
SizedBox(
width: 8,
} else {
DrAppToastMsg.showErrorToast(
"Please enter medical note");
}
},
),
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");
}
},
),
),
],
),
),
],
),
],
),
),
));
],
),
));
}
void requestPermissions() async {

@ -20,7 +20,7 @@ class MedicalReportDetailPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
final routeArgs = ModalRoute.of(context)!.settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
String patientType = routeArgs['patientType'];
String arrivalType = routeArgs['arrivalType'];

@ -7,6 +7,7 @@ import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/locator.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/patient/profile/patient_profile_app_bar_model.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/dr_app_toast_msg.dart';
@ -34,7 +35,7 @@ class MedicalReportPage extends StatefulWidget {
class _MedicalReportPageState extends State<MedicalReportPage> {
@override
Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
final routeArgs = ModalRoute.of(context)!.settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
String patientType = routeArgs['patientType'];
String arrivalType = routeArgs['arrivalType'];
@ -49,9 +50,8 @@ class _MedicalReportPageState extends State<MedicalReportPage> {
baseViewModel: model,
isShowAppBar: true,
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
appBar: PatientProfileAppBar(
patient,
),
patientProfileAppBarModel: PatientProfileAppBarModel(
patient:patient),
body: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Column(
@ -85,22 +85,21 @@ class _MedicalReportPageState extends State<MedicalReportPage> {
await locator<AnalyticsService>().logEvent(
eventCategory: "Medical Report Page",
eventAction: "Add New Medical Report",
);
Navigator.push(
);Navigator.push(
context,
MaterialPageRoute(
builder: (context) => AddVerifyMedicalReport(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
model: model,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
model: model,
status: MedicalReportStatus.ADD,
),
),
settings: RouteSettings(name: 'AddVerifyMedicalReport'),
),
);
},
label: TranslationBase.of(context).createNewMedicalReport,
label: TranslationBase.of(context).createNewMedicalReport!,
),
// if (model.state != ViewState.ErrorLocal)ß
...List.generate(
@ -191,8 +190,8 @@ class _MedicalReportPageState extends State<MedicalReportPage> {
margin: EdgeInsets.only(left: 0, top: 4, right: 8, bottom: 0),
child: LargeAvatar(
name: projectViewModel.isArabic
? model.medicalReportList[index].doctorNameN
: model.medicalReportList[index].doctorName,
? model.medicalReportList[index].doctorNameN??""
: model.medicalReportList[index].doctorName??"",
url: model.medicalReportList[index].doctorImageURL,
),
width: 50,

@ -28,19 +28,19 @@ import 'package:speech_to_text/speech_recognition_error.dart';
import 'package:speech_to_text/speech_to_text.dart' as stt;
class UpdateNoteOrder extends StatefulWidget {
final NoteModel note;
final NoteModel? note;
final PatientViewModel patientModel;
final PatiantInformtion patient;
final int visitType;
final bool isUpdate;
const UpdateNoteOrder(
{Key ? key,
{Key? key,
this.note,
this.patientModel,
this.patient,
this.visitType,
this.isUpdate})
required this.patientModel,
required this.patient,
required this.visitType,
required this.isUpdate})
: super(key: key);
@override
@ -48,12 +48,12 @@ class UpdateNoteOrder extends StatefulWidget {
}
class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
int selectedType;
int? selectedType;
bool isSubmitted = false;
stt.SpeechToText speech = stt.SpeechToText();
var reconizedWord;
var event = RobotProvider();
ProjectViewModel projectViewModel;
ProjectViewModel? projectViewModel;
TextEditingController progressNoteController = TextEditingController();
@ -81,7 +81,7 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
projectViewModel = Provider.of(context);
if (widget.note != null) {
progressNoteController.text = widget.note.notes;
progressNoteController.text = widget.note!.notes!;
}
return AppScaffold(
@ -99,12 +99,12 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
title: widget.visitType == 3
? (widget.isUpdate
? TranslationBase.of(context).noteUpdate
: TranslationBase.of(context).noteAdd) +
TranslationBase.of(context).orderSheet
: TranslationBase.of(context).noteAdd)! +
TranslationBase.of(context).orderSheet!
: (widget.isUpdate
? TranslationBase.of(context).noteUpdate
: TranslationBase.of(context).noteAdd) +
TranslationBase.of(context).progressNote,
: TranslationBase.of(context).noteAdd)! +
TranslationBase.of(context).progressNote!,
),
SizedBox(
height: 10.0,
@ -119,17 +119,13 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
AppTextFieldCustom(
hintText: widget.visitType == 3
? (widget.isUpdate
? TranslationBase.of(context)
.noteUpdate
: TranslationBase.of(context)
.noteAdd) +
TranslationBase.of(context).orderSheet
? TranslationBase.of(context).noteUpdate
: TranslationBase.of(context).noteAdd)! +
TranslationBase.of(context).orderSheet!
: (widget.isUpdate
? TranslationBase.of(context)
.noteUpdate
: TranslationBase.of(context)
.noteAdd) +
TranslationBase.of(context).progressNote,
? TranslationBase.of(context).noteUpdate
: TranslationBase.of(context).noteAdd)! +
TranslationBase.of(context).progressNote!,
//TranslationBase.of(context).addProgressNote,
controller: progressNoteController,
maxLines: 35,
@ -144,11 +140,8 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
: null,
),
Positioned(
top:
-2, //MediaQuery.of(context).size.height * 0,
right: projectViewModel.isArabic
? MediaQuery.of(context).size.width * 0.75
: 15,
top: -2, //MediaQuery.of(context).size.height * 0,
right: projectViewModel!.isArabic ? MediaQuery.of(context).size.width * 0.75 : 15,
child: Column(
children: [
IconButton(
@ -195,12 +188,12 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
title: widget.visitType == 3
? (widget.isUpdate
? TranslationBase.of(context).noteUpdate
: TranslationBase.of(context).noteAdd) +
TranslationBase.of(context).orderSheet
: TranslationBase.of(context).noteAdd)! +
TranslationBase.of(context).orderSheet!
: (widget.isUpdate
? TranslationBase.of(context).noteUpdate
: TranslationBase.of(context).noteAdd) +
TranslationBase.of(context).progressNote,
? TranslationBase.of(context).noteUpdate!
: TranslationBase.of(context).noteAdd!) +
TranslationBase.of(context).progressNote!,
color: Color(0xff359846),
// disabled: progressNoteController.text.isEmpty,
fontWeight: FontWeight.w700,
@ -219,8 +212,8 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
UpdateNoteReqModel reqModel = UpdateNoteReqModel(
admissionNo: int.parse(widget.patient!.admissionNo!),
cancelledNote: false,
lineItemNo: widget.note.lineItemNo,
createdBy: widget.note.createdBy,
lineItemNo: widget.note!.lineItemNo,
createdBy: widget.note?.createdBy,
notes: progressNoteController.text,
verifiedNote: false,
patientTypeID: widget.patient.patientType,

@ -32,22 +32,22 @@ import 'package:provider/provider.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
class NursingProgressNoteScreen extends StatefulWidget {
const NursingProgressNoteScreen({Key key}) : super(key: key);
const NursingProgressNoteScreen({Key? key}) : super(key: key);
@override
_ProgressNoteState createState() => _ProgressNoteState();
}
class _ProgressNoteState extends State<NursingProgressNoteScreen> {
List<NoteModel> notesList;
late List<NoteModel> notesList;
var filteredNotesList;
bool isDischargedPatient = false;
AuthenticationViewModel authenticationViewModel;
ProjectViewModel projectViewModel;
late AuthenticationViewModel authenticationViewModel;
late ProjectViewModel projectViewModel;
getProgressNoteList(BuildContext context, PatientViewModel model,
{bool isLocalBusy = false}) async {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
final routeArgs = ModalRoute.of(context)!.settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
String type = await sharedPref.getString(SLECTED_PATIENT_TYPE);
@ -55,7 +55,7 @@ class _ProgressNoteState extends State<NursingProgressNoteScreen> {
GetNursingProgressNoteRequestModel getNursingProgressNoteRequestModel =
GetNursingProgressNoteRequestModel(
admissionNo: int.parse(patient!.admissionNo!),
patientTypeID: patient.patientType,
patientTypeID: patient!.patientType!,
patientID: patient.patientId,
setupID: "010266");
model.getNursingProgressNote(getNursingProgressNoteRequestModel);
@ -65,7 +65,7 @@ class _ProgressNoteState extends State<NursingProgressNoteScreen> {
Widget build(BuildContext context) {
authenticationViewModel = Provider.of(context);
projectViewModel = Provider.of(context);
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
final routeArgs = ModalRoute.of(context)!.settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
if (routeArgs.containsKey('isDischargedPatient'))
isDischargedPatient = routeArgs['isDischargedPatient'];
@ -168,8 +168,8 @@ class _ProgressNoteState extends State<NursingProgressNoteScreen> {
AppDateUtils
.getDateTimeFromServerFormat(model
.patientNursingProgressNoteList[
index]
.createdOn),
index]!
.createdOn!),
isArabic:
projectViewModel
.isArabic,
@ -194,8 +194,8 @@ class _ProgressNoteState extends State<NursingProgressNoteScreen> {
AppDateUtils
.getDateTimeFromServerFormat(model
.patientNursingProgressNoteList[
index]
.createdOn))
index]!
.createdOn!))
: AppDateUtils.getHour(
DateTime.now()),
fontWeight: FontWeight.w600,

@ -43,22 +43,22 @@ class OperationReportScreen extends StatefulWidget {
}
class _ProgressNoteState extends State<OperationReportScreen> {
List<NoteModel> notesList;
late List<NoteModel> notesList;
var filteredNotesList;
bool isDischargedPatient = false;
AuthenticationViewModel authenticationViewModel;
ProjectViewModel projectViewModel;
late AuthenticationViewModel authenticationViewModel;
late ProjectViewModel projectViewModel;
@override
Widget build(BuildContext context) {
authenticationViewModel = Provider.of(context);
projectViewModel = Provider.of(context);
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
final routeArgs = ModalRoute.of(context)!.settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
if (routeArgs.containsKey('isDischargedPatient'))
isDischargedPatient = routeArgs['isDischargedPatient'];
return BaseView<OperationReportViewModel>(
onModelReady: (model) => model.getReservations(patient.patientMRN),
onModelReady: (model) => model.getReservations(patient!.patientMRN!),
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
backgroundColor: Theme.of(context).scaffoldBackgroundColor,

@ -134,7 +134,7 @@ class _UpdateOperationReportState extends State<UpdateOperationReport> {
baseViewModel: model,
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
appBar: BottomSheetTitle(
title: TranslationBase.of(context).operationReports,
title: TranslationBase.of(context).operationReports!,
),
body: SingleChildScrollView(
child: Container(
@ -523,8 +523,8 @@ class _UpdateOperationReportState extends State<UpdateOperationReport> {
child: AppButton(
title: (widget.isUpdate
? TranslationBase.of(context).noteUpdate
: TranslationBase.of(context).noteAdd) +" "+
TranslationBase.of(context).operationReports,
: TranslationBase.of(context).noteAdd)! +
TranslationBase.of(context).operationReports!,
color: Color(0xff359846),
// disabled: operationReportsController.text.isEmpty,
fontWeight: FontWeight.w700,

@ -36,7 +36,7 @@ class PendingOrdersScreen extends StatelessWidget {
model.pendingOrdersList.length == 0
? Center(
child: ErrorMessage(
error: TranslationBase.of(context).noDataAvailable, ),
error: TranslationBase.of(context).noDataAvailable!, ),
)
: Column(
children: [

@ -17,10 +17,10 @@ class InpatientPrescriptionDetailsScreen extends StatefulWidget {
class _InpatientPrescriptionDetailsScreenState
extends State<InpatientPrescriptionDetailsScreen> {
bool _showDetails = false;
String error;
TextEditingController answerController;
String? error;
TextEditingController? answerController;
bool _isInit = true;
PrescriptionReportForInPatient prescription;
late PrescriptionReportForInPatient prescription;
@override
void initState() {
@ -31,7 +31,7 @@ class _InpatientPrescriptionDetailsScreenState
void didChangeDependencies() {
super.didChangeDependencies();
if (_isInit) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
final routeArgs = ModalRoute.of(context)!.settings.arguments as Map;
prescription = routeArgs['prescription'];
}
_isInit = false;
@ -40,7 +40,7 @@ class _InpatientPrescriptionDetailsScreenState
@override
Widget build(BuildContext context) {
return AppScaffold(
appBarTitle: TranslationBase.of(context).prescriptionInfo,
appBarTitle: TranslationBase.of(context).prescriptionInfo ?? "",
body: CardWithBgWidgetNew(
widget: Container(
child: ListView(
@ -96,11 +96,11 @@ class _InpatientPrescriptionDetailsScreenState
key: 'UOM'),
buildTableRow(
des:
'${AppDateUtils.getDate(prescription.startDatetime)}',
'${AppDateUtils.getDate(prescription.startDatetime!)}',
key: 'Start Date'),
buildTableRow(
des:
'${AppDateUtils.getDate(prescription.stopDatetime)}',
'${AppDateUtils.getDate(prescription.stopDatetime!)}',
key: 'Stop Date'),
buildTableRow(
des: '${prescription.noOfDoses}',
@ -115,7 +115,7 @@ class _InpatientPrescriptionDetailsScreenState
key: 'Pharmacy Remarks'),
buildTableRow(
des:
'${AppDateUtils.getDate(prescription.prescriptionDatetime)}',
'${AppDateUtils.getDate(prescription.prescriptionDatetime!)}',
key: 'Prescription Date'),
buildTableRow(
des: '${prescription.refillID}',

@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
class OutPatientPrescriptionDetailsItem extends StatefulWidget {
final PrescriptionReport prescriptionReport;
OutPatientPrescriptionDetailsItem({Key? key, this.prescriptionReport});
OutPatientPrescriptionDetailsItem({Key? key, required this.prescriptionReport});
@override
_OutPatientPrescriptionDetailsItemState createState() =>

@ -8,12 +8,12 @@ class PatientProfileCardModel {
final bool isInPatient;
final bool isDisable;
final bool isLoading;
final Function onTap;
final GestureTapCallback? onTap;
final bool isDischargedPatient;
final bool isSelectInpatient;
final bool isDartIcon;
final IconData dartIcon;
final Color color;
final IconData? dartIcon;
final Color? color;
PatientProfileCardModel(
this.nameLine1,

@ -36,14 +36,14 @@ class ProfileGridForInPatient extends StatelessWidget {
Widget build(BuildContext context) {
final List<PatientProfileCardModel> cardsList = [
PatientProfileCardModel(
TranslationBase.of(context).vital ,
TranslationBase.of(context).signs ,
TranslationBase.of(context).vital ?? "",
TranslationBase.of(context).signs ?? "",
VITAL_SIGN_DETAILS,
'assets/images/svgs/profile_screen/vital signs.svg',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).lab ,
TranslationBase.of(context).result ,
TranslationBase.of(context).lab ?? "",
TranslationBase.of(context).result ?? "",
LAB_RESULT,
'assets/images/svgs/profile_screen/lab results.svg',
isInPatient: isInpatient),
@ -54,116 +54,116 @@ class ProfileGridForInPatient extends StatelessWidget {
'assets/images/svgs/profile_screen/lab results.svg',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).radiology,
TranslationBase.of(context).result,
TranslationBase.of(context).radiology!,
TranslationBase.of(context).result!,
RADIOLOGY_PATIENT,
'assets/images/svgs/profile_screen/Radiology.svg',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).patient,
TranslationBase.of(context).prescription,
TranslationBase.of(context).patient!,
TranslationBase.of(context).prescription!,
ORDER_PRESCRIPTION_NEW,
'assets/images/svgs/profile_screen/order prescription.svg',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).progress,
TranslationBase.of(context).note,
TranslationBase.of(context).progress!,
TranslationBase.of(context).note!,
PROGRESS_NOTE,
'assets/images/svgs/profile_screen/Progress notes.svg',
isInPatient: isInpatient,
isDischargedPatient: isDischargedPatient),
PatientProfileCardModel(
TranslationBase.of(context).order,
TranslationBase.of(context).sheet,
TranslationBase.of(context).order!,
TranslationBase.of(context).sheet!,
ORDER_NOTE,
'assets/images/svgs/profile_screen/order sheets.svg',
isInPatient: isInpatient,
isDischargedPatient: isDischargedPatient),
PatientProfileCardModel(
TranslationBase.of(context).orders,
TranslationBase.of(context).procedures,
TranslationBase.of(context).orders!,
TranslationBase.of(context).procedures!,
ORDER_PROCEDURE,
'assets/images/svgs/profile_screen/Order Procedures.svg',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).health,
TranslationBase.of(context).summary,
TranslationBase.of(context).health!,
TranslationBase.of(context).summary!,
HEALTH_SUMMARY,
'assets/images/svgs/profile_screen/health summary.svg',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).medical,
TranslationBase.of(context).report,
TranslationBase.of(context).medical!,
TranslationBase.of(context).report!,
PATIENT_MEDICAL_REPORT,
'assets/images/svgs/profile_screen/medical report.svg',
isInPatient: isInpatient,
isDisable: false),
PatientProfileCardModel(
TranslationBase.of(context).referral,
TranslationBase.of(context).patient,
TranslationBase.of(context).referral!,
TranslationBase.of(context).patient!,
REFER_IN_PATIENT_TO_DOCTOR,
'assets/images/svgs/profile_screen/refer patient.svg',
isInPatient: isInpatient,
isDisable: isDischargedPatient || isFromSearch,
),
PatientProfileCardModel(
TranslationBase.of(context).insurance,
TranslationBase.of(context).approvals,
TranslationBase.of(context).insurance!,
TranslationBase.of(context).approvals!,
PATIENT_INSURANCE_APPROVALS_NEW,
'assets/images/svgs/profile_screen/insurance approval.svg',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).discharge,
TranslationBase.of(context).report,
TranslationBase.of(context).discharge!,
TranslationBase.of(context).report!,
DISCHARGE_SUMMARY,
'assets/images/svgs/profile_screen/discharge summary.svg',
isInPatient: isInpatient,
),
PatientProfileCardModel(
TranslationBase.of(context).patientSick,
TranslationBase.of(context).leave,
TranslationBase.of(context).patientSick!,
TranslationBase.of(context).leave!,
ADD_SICKLEAVE,
'assets/images/svgs/profile_screen/patient sick leave.svg',
isInPatient: isInpatient,
),
PatientProfileCardModel(
TranslationBase.of(context).operation,
TranslationBase.of(context).report,
"Operation",
"Report",
GET_OPERATION_REPORT,
'assets/images/svgs/profile_screen/operating report.svg',
isInPatient: isInpatient,
),
PatientProfileCardModel(
TranslationBase.of(context).pending,
TranslationBase.of(context).orders,
TranslationBase.of(context).pending!,
TranslationBase.of(context).orders!,
PENDING_ORDERS,
'assets/images/svgs/profile_screen/pending orders.svg',
isInPatient: isInpatient,
),
PatientProfileCardModel(
TranslationBase.of(context).admission,
TranslationBase.of(context).orders,
TranslationBase.of(context).admission!,
TranslationBase.of(context).orders!,
ADMISSION_ORDERS,
'assets/images/svgs/profile_screen/admission req.svg',
isInPatient: isInpatient,
),
PatientProfileCardModel(
"Nursing",
TranslationBase.of(context).progressNote,
TranslationBase.of(context).progressNote!,
NURSING_PROGRESS_NOTE,
'assets/images/svgs/profile_screen/Progress notes.svg',
isInPatient: isInpatient,
),
PatientProfileCardModel(
TranslationBase.of(context).diagnosis,
TranslationBase.of(context).diagnosis!,
"",
DIAGNOSIS_FOR_IN_PATIENT,
'assets/images/svgs/profile_screen/diagnosis.svg',
isInPatient: isInpatient,
),
PatientProfileCardModel(
TranslationBase.of(context).diabetic,
TranslationBase.of(context).chart,
TranslationBase.of(context).diabetic!,
TranslationBase.of(context).chart!,
DIABETIC_CHART_VALUES,
'assets/images/svgs/profile_screen/diabetic chart.svg',
isInPatient: isInpatient,

Loading…
Cancel
Save