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) { onChanged: (newValue) {
setState(() { setState(() {
widget.model! widget.model!
.setSelectedCheckboxValues(element, newValue); .setSelectedCheckboxValues(element, newValue!);
}); });
}, },
activeColor: Color(0xFFD02127), activeColor: Color(0xFFD02127),

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

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

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

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

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

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

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

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

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

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

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

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

@ -14,7 +14,7 @@ import 'package:flutter/material.dart';
class LabResult extends StatefulWidget { class LabResult extends StatefulWidget {
final LabOrdersResModel labOrders; final LabOrdersResModel labOrders;
LabResult({Key ? key, this.labOrders}); LabResult({Key? key, required this.labOrders});
@override @override
_LabResultState createState() => _LabResultState(); _LabResultState createState() => _LabResultState();
@ -27,10 +27,9 @@ class _LabResultState extends State<LabResult> {
onModelReady: (model) => model.getLabResult(widget.labOrders), onModelReady: (model) => model.getLabResult(widget.labOrders),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
appBarTitle: TranslationBase.of(context).labOrders, appBarTitle: TranslationBase.of(context).labOrders ?? "",
body: model.labResultList.length == 0 body: model.labResultList.length == 0
? DrAppEmbeddedError( ? DrAppEmbeddedError(error: TranslationBase.of(context).errorNoLabOrders ?? "")
error: TranslationBase.of(context).errorNoLabOrders)
: Container( : Container(
margin: EdgeInsets.fromLTRB(SizeConfig.realScreenWidth * 0.05, margin: EdgeInsets.fromLTRB(SizeConfig.realScreenWidth * 0.05,
0, SizeConfig.realScreenWidth * 0.05, 0), 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/model/labs/patient_lab_orders.dart';
import 'package:doctor_app_flutter/core/viewModel/labs_view_model.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/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/screens/base/base_view.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.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'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
@ -17,12 +18,12 @@ class LaboratoryResultPage extends StatefulWidget {
final bool isInpatient; final bool isInpatient;
LaboratoryResultPage( LaboratoryResultPage(
{Key ? key, {Key? key,
this.patientLabOrders, required this.patientLabOrders,
this.patient, required this.patient,
this.patientType, required this.patientType,
this.arrivalType, required this.arrivalType,
this.isInpatient}); required this.isInpatient});
@override @override
_LaboratoryResultPageState createState() => _LaboratoryResultPageState(); _LaboratoryResultPageState createState() => _LaboratoryResultPageState();
@ -33,16 +34,14 @@ class _LaboratoryResultPageState extends State<LaboratoryResultPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<LabsViewModel>( return BaseView<LabsViewModel>(
onModelReady: (model) => model.getPatientLabResult( onModelReady: (model) => model.getPatientLabResult(
patientLabOrder: widget.patientLabOrders, patientLabOrder: widget.patientLabOrders, patient: widget.patient, isInpatient: true),
patient: widget.patient,
isInpatient: true),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBar: PatientProfileAppBar( patientProfileAppBarModel: PatientProfileAppBarModel(
widget.patient, patient: widget.patient,
isInpatient:widget.isInpatient, isInpatient: widget.isInpatient,
isFromLabResult: true, isFromLabResult: true,
appointmentDate: widget.patientLabOrders.orderDate, appointmentDate: widget.patientLabOrders.orderDate!,
), ),
baseViewModel: model, baseViewModel: model,
@ -51,11 +50,10 @@ class _LaboratoryResultPageState extends State<LaboratoryResultPage> {
body: SingleChildScrollView( body: SingleChildScrollView(
child: LaboratoryResultWidget( child: LaboratoryResultWidget(
onTap: () async {}, onTap: () async {},
billNo: widget.patientLabOrders.invoiceNo, billNo: widget.patientLabOrders.invoiceNo!,
details: model.patientLabSpecialResult.length > 0 details:
? model.patientLabSpecialResult[0].resultDataHTML model.patientLabSpecialResult.length > 0 ? model.patientLabSpecialResult[0].resultDataHTML : null,
: null, orderNo: widget.patientLabOrders.orderNo!,
orderNo: widget.patientLabOrders.orderNo,
patientLabOrder: widget.patientLabOrders, patientLabOrder: widget.patientLabOrders,
patient: widget.patient, patient: widget.patient,
isInpatient: widget.patientType == "1", isInpatient: widget.patientType == "1",

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

@ -13,7 +13,7 @@ class SpecialLabResultDetailsPage extends StatelessWidget {
final String resultData; final String resultData;
final PatiantInformtion patient; 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 @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

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

@ -20,7 +20,7 @@ class MedicalReportDetailPage extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(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']; PatiantInformtion patient = routeArgs['patient'];
String patientType = routeArgs['patientType']; String patientType = routeArgs['patientType'];
String arrivalType = routeArgs['arrivalType']; 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/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/locator.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/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/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';
@ -34,7 +35,7 @@ class MedicalReportPage extends StatefulWidget {
class _MedicalReportPageState extends State<MedicalReportPage> { class _MedicalReportPageState extends State<MedicalReportPage> {
@override @override
Widget build(BuildContext context) { 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']; PatiantInformtion patient = routeArgs['patient'];
String patientType = routeArgs['patientType']; String patientType = routeArgs['patientType'];
String arrivalType = routeArgs['arrivalType']; String arrivalType = routeArgs['arrivalType'];
@ -49,9 +50,8 @@ class _MedicalReportPageState extends State<MedicalReportPage> {
baseViewModel: model, baseViewModel: model,
isShowAppBar: true, isShowAppBar: true,
backgroundColor: Theme.of(context).scaffoldBackgroundColor, backgroundColor: Theme.of(context).scaffoldBackgroundColor,
appBar: PatientProfileAppBar( patientProfileAppBarModel: PatientProfileAppBarModel(
patient, patient:patient),
),
body: SingleChildScrollView( body: SingleChildScrollView(
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
child: Column( child: Column(
@ -85,22 +85,21 @@ class _MedicalReportPageState extends State<MedicalReportPage> {
await locator<AnalyticsService>().logEvent( await locator<AnalyticsService>().logEvent(
eventCategory: "Medical Report Page", eventCategory: "Medical Report Page",
eventAction: "Add New Medical Report", eventAction: "Add New Medical Report",
); );Navigator.push(
Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: (context) => AddVerifyMedicalReport( builder: (context) => AddVerifyMedicalReport(
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
model: model, model: model,
status: MedicalReportStatus.ADD, status: MedicalReportStatus.ADD,
), ),
settings: RouteSettings(name: 'AddVerifyMedicalReport'), settings: RouteSettings(name: 'AddVerifyMedicalReport'),
), ),
); );
}, },
label: TranslationBase.of(context).createNewMedicalReport, label: TranslationBase.of(context).createNewMedicalReport!,
), ),
// if (model.state != ViewState.ErrorLocal)ß // if (model.state != ViewState.ErrorLocal)ß
...List.generate( ...List.generate(
@ -191,8 +190,8 @@ class _MedicalReportPageState extends State<MedicalReportPage> {
margin: EdgeInsets.only(left: 0, top: 4, right: 8, bottom: 0), margin: EdgeInsets.only(left: 0, top: 4, right: 8, bottom: 0),
child: LargeAvatar( child: LargeAvatar(
name: projectViewModel.isArabic name: projectViewModel.isArabic
? model.medicalReportList[index].doctorNameN ? model.medicalReportList[index].doctorNameN??""
: model.medicalReportList[index].doctorName, : model.medicalReportList[index].doctorName??"",
url: model.medicalReportList[index].doctorImageURL, url: model.medicalReportList[index].doctorImageURL,
), ),
width: 50, 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; import 'package:speech_to_text/speech_to_text.dart' as stt;
class UpdateNoteOrder extends StatefulWidget { class UpdateNoteOrder extends StatefulWidget {
final NoteModel note; final NoteModel? note;
final PatientViewModel patientModel; final PatientViewModel patientModel;
final PatiantInformtion patient; final PatiantInformtion patient;
final int visitType; final int visitType;
final bool isUpdate; final bool isUpdate;
const UpdateNoteOrder( const UpdateNoteOrder(
{Key ? key, {Key? key,
this.note, this.note,
this.patientModel, required this.patientModel,
this.patient, required this.patient,
this.visitType, required this.visitType,
this.isUpdate}) required this.isUpdate})
: super(key: key); : super(key: key);
@override @override
@ -48,12 +48,12 @@ class UpdateNoteOrder extends StatefulWidget {
} }
class _UpdateNoteOrderState extends State<UpdateNoteOrder> { class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
int selectedType; int? selectedType;
bool isSubmitted = false; bool isSubmitted = false;
stt.SpeechToText speech = stt.SpeechToText(); stt.SpeechToText speech = stt.SpeechToText();
var reconizedWord; var reconizedWord;
var event = RobotProvider(); var event = RobotProvider();
ProjectViewModel projectViewModel; ProjectViewModel? projectViewModel;
TextEditingController progressNoteController = TextEditingController(); TextEditingController progressNoteController = TextEditingController();
@ -81,7 +81,7 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
if (widget.note != null) { if (widget.note != null) {
progressNoteController.text = widget.note.notes; progressNoteController.text = widget.note!.notes!;
} }
return AppScaffold( return AppScaffold(
@ -99,12 +99,12 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
title: widget.visitType == 3 title: widget.visitType == 3
? (widget.isUpdate ? (widget.isUpdate
? TranslationBase.of(context).noteUpdate ? TranslationBase.of(context).noteUpdate
: TranslationBase.of(context).noteAdd) + : TranslationBase.of(context).noteAdd)! +
TranslationBase.of(context).orderSheet TranslationBase.of(context).orderSheet!
: (widget.isUpdate : (widget.isUpdate
? TranslationBase.of(context).noteUpdate ? TranslationBase.of(context).noteUpdate
: TranslationBase.of(context).noteAdd) + : TranslationBase.of(context).noteAdd)! +
TranslationBase.of(context).progressNote, TranslationBase.of(context).progressNote!,
), ),
SizedBox( SizedBox(
height: 10.0, height: 10.0,
@ -119,17 +119,13 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
AppTextFieldCustom( AppTextFieldCustom(
hintText: widget.visitType == 3 hintText: widget.visitType == 3
? (widget.isUpdate ? (widget.isUpdate
? TranslationBase.of(context) ? TranslationBase.of(context).noteUpdate
.noteUpdate : TranslationBase.of(context).noteAdd)! +
: TranslationBase.of(context) TranslationBase.of(context).orderSheet!
.noteAdd) +
TranslationBase.of(context).orderSheet
: (widget.isUpdate : (widget.isUpdate
? TranslationBase.of(context) ? TranslationBase.of(context).noteUpdate
.noteUpdate : TranslationBase.of(context).noteAdd)! +
: TranslationBase.of(context) TranslationBase.of(context).progressNote!,
.noteAdd) +
TranslationBase.of(context).progressNote,
//TranslationBase.of(context).addProgressNote, //TranslationBase.of(context).addProgressNote,
controller: progressNoteController, controller: progressNoteController,
maxLines: 35, maxLines: 35,
@ -144,11 +140,8 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
: null, : null,
), ),
Positioned( Positioned(
top: top: -2, //MediaQuery.of(context).size.height * 0,
-2, //MediaQuery.of(context).size.height * 0, right: projectViewModel!.isArabic ? MediaQuery.of(context).size.width * 0.75 : 15,
right: projectViewModel.isArabic
? MediaQuery.of(context).size.width * 0.75
: 15,
child: Column( child: Column(
children: [ children: [
IconButton( IconButton(
@ -195,12 +188,12 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
title: widget.visitType == 3 title: widget.visitType == 3
? (widget.isUpdate ? (widget.isUpdate
? TranslationBase.of(context).noteUpdate ? TranslationBase.of(context).noteUpdate
: TranslationBase.of(context).noteAdd) + : TranslationBase.of(context).noteAdd)! +
TranslationBase.of(context).orderSheet TranslationBase.of(context).orderSheet!
: (widget.isUpdate : (widget.isUpdate
? TranslationBase.of(context).noteUpdate ? TranslationBase.of(context).noteUpdate!
: TranslationBase.of(context).noteAdd) + : TranslationBase.of(context).noteAdd!) +
TranslationBase.of(context).progressNote, TranslationBase.of(context).progressNote!,
color: Color(0xff359846), color: Color(0xff359846),
// disabled: progressNoteController.text.isEmpty, // disabled: progressNoteController.text.isEmpty,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
@ -219,8 +212,8 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
UpdateNoteReqModel reqModel = UpdateNoteReqModel( UpdateNoteReqModel reqModel = UpdateNoteReqModel(
admissionNo: int.parse(widget.patient!.admissionNo!), admissionNo: int.parse(widget.patient!.admissionNo!),
cancelledNote: false, cancelledNote: false,
lineItemNo: widget.note.lineItemNo, lineItemNo: widget.note!.lineItemNo,
createdBy: widget.note.createdBy, createdBy: widget.note?.createdBy,
notes: progressNoteController.text, notes: progressNoteController.text,
verifiedNote: false, verifiedNote: false,
patientTypeID: widget.patient.patientType, patientTypeID: widget.patient.patientType,

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

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

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

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

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

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

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

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

Loading…
Cancel
Save