4 step from fix screen

merge-requests/891/head
Elham Rababh 4 years ago
parent f4a9ab14c8
commit d808f8b2ac

@ -68,9 +68,9 @@ class PatientMedicalReportViewModel extends BaseViewModel {
} }
} }
Future updateMedicalReport(PatiantInformtion patient, String htmlText, int limitNumber, String invoiceNumber) async { Future updateMedicalReport(PatiantInformtion patient, String htmlText, int? limitNumber, String? invoiceNumber) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _service.updateMedicalReport(patient, htmlText, limitNumber, invoiceNumber); await _service.updateMedicalReport(patient, htmlText, limitNumber!, invoiceNumber!);
if (_service.hasError) { if (_service.hasError) {
error = _service.error!; error = _service.error!;
await getMedicalReportList(patient); await getMedicalReportList(patient);

@ -189,19 +189,20 @@ class _EndCallScreenState extends State<EndCallScreen> {
.of(context) .of(context)
.scaffoldBackgroundColor, .scaffoldBackgroundColor,
isShowAppBar: true, isShowAppBar: true,
appBar: PatientProfileAppBar(patientProfileAppBarModel :PatientProfileAppBarModel(patient: patient!,isInpatient: isInpatient, appBar: PatientProfileAppBar(
isDischargedPatient: isDischargedPatient, patient,
height: (patient!.patientStatusType != null && patient!.patientStatusType == 43)
? 210
: isDischargedPatient
? 240
: 0,
),
onPressed: (){ onPressed: (){
Navigator.pop(context); Navigator.pop(context);
}, },
), isInpatient: isInpatient,
height: (patient!.patientStatusType != null &&
patient!.patientStatusType == 43)
? 210
: isDischargedPatient
? 240
: 0,
isDischargedPatient: isDischargedPatient),
body: Container( body: Container(
height: !isSearchAndOut height: !isSearchAndOut
? isDischargedPatient ? isDischargedPatient

@ -10,10 +10,9 @@ import 'package:flutter/material.dart';
import 'discharge_Summary_widget.dart'; import 'discharge_Summary_widget.dart';
class AllDischargeSummary extends StatefulWidget { class AllDischargeSummary extends StatefulWidget {
final Function changeCurrentTab;
final PatiantInformtion patient; final PatiantInformtion patient;
const AllDischargeSummary({this.changeCurrentTab, this.patient}); const AllDischargeSummary({ required this.patient});
@override @override
_AllDischargeSummaryState createState() => _AllDischargeSummaryState(); _AllDischargeSummaryState createState() => _AllDischargeSummaryState();
@ -27,7 +26,7 @@ class _AllDischargeSummaryState extends State<AllDischargeSummary> {
onModelReady: (model) { onModelReady: (model) {
model.getAllDischargeSummary( model.getAllDischargeSummary(
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(
@ -36,7 +35,7 @@ class _AllDischargeSummaryState extends State<AllDischargeSummary> {
body: // DrAppEmbeddedError(error: TranslationBase.of(context).noItem) body: // DrAppEmbeddedError(error: TranslationBase.of(context).noItem)
model.allDisChargeSummaryList.isEmpty model.allDisChargeSummaryList.isEmpty
? ErrorMessage( ? ErrorMessage(
error: TranslationBase.of(context).noDataAvailable) error: TranslationBase.of(context).noDataAvailable!)
: Column( : Column(
children: [ children: [
Padding( Padding(

@ -17,7 +17,7 @@ class DischargeSummaryWidget extends StatefulWidget {
final GetDischargeSummaryResModel dischargeSummary; final GetDischargeSummaryResModel dischargeSummary;
bool isShowMore = false; bool isShowMore = false;
DischargeSummaryWidget({Key? key, this.dischargeSummary}); DischargeSummaryWidget({Key? key, required this.dischargeSummary});
@override @override
_DischargeSummaryWidgetState createState() => _DischargeSummaryWidgetState(); _DischargeSummaryWidgetState createState() => _DischargeSummaryWidgetState();
@ -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,26 +52,26 @@ 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,
), ),
CustomRow( CustomRow(
label: TranslationBase.of(context).clinicName + ": ", label: TranslationBase.of(context).clinicName! + ": ",
value: widget.dischargeSummary.clinicName.toString() ?? value: widget.dischargeSummary.clinicName.toString() ??
"".toString(), "".toString(),
isCopyable: false, isCopyable: false,
), ),
CustomRow( CustomRow(
label: TranslationBase.of(context).dischargeDate + ": ", label: TranslationBase.of(context).dischargeDate! + ": ",
value: AppDateUtils.getDateTimeFromServerFormat( value: AppDateUtils.getDateTimeFromServerFormat(
widget.dischargeSummary.createdOn) widget.dischargeSummary.createdOn)
.day .day

@ -12,9 +12,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
@ -23,7 +22,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;
@ -54,11 +53,10 @@ class _DoctorReplyScreenState extends State<DischargeSummaryPage>
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,
// appBarTitle: TranslationBase.of(context).progressNote, // appBarTitle: TranslationBase.of(context).progressNote,
appBar: PatientProfileAppBar( appBar: PatientProfileAppBar(
@ -103,7 +101,7 @@ class _DoctorReplyScreenState extends State<DischargeSummaryPage>
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,7 +28,7 @@ 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(
@ -38,7 +37,7 @@ class _PendingDischargeSummaryState extends State<PendingDischargeSummary> {
body: model.pendingDischargeSummaryList.isEmpty body: model.pendingDischargeSummaryList.isEmpty
? ErrorMessage( ? ErrorMessage(
error: TranslationBase.of(context) error: TranslationBase.of(context)
.noDataAvailable) // DrAppEmbeddedError(error: TranslationBase.of(context).noItem!) .noDataAvailable!) // 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) {

@ -220,7 +220,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 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),
), ),

@ -9,14 +9,14 @@ class LineChartCurvedLabHistory extends StatefulWidget {
final String title; final String title;
final List<LabResultHistory> labResultHistory; final List<LabResultHistory> labResultHistory;
LineChartCurvedLabHistory({this.title, this.labResultHistory}); LineChartCurvedLabHistory({required this.title, required this.labResultHistory});
@override @override
State<StatefulWidget> createState() => LineChartCurvedLabHistoryState(); State<StatefulWidget> createState() => LineChartCurvedLabHistoryState();
} }
class LineChartCurvedLabHistoryState extends State<LineChartCurvedLabHistory> { class LineChartCurvedLabHistoryState extends State<LineChartCurvedLabHistory> {
bool isShowingMainData; late bool isShowingMainData;
List<int> xAxixs = []; List<int> xAxixs = [];
int indexes = 0; int indexes = 0;

@ -21,12 +21,12 @@ class AllLabSpecialResult extends StatefulWidget {
} }
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() {
@ -46,7 +46,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],
@ -71,9 +71,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,
@ -137,15 +137,15 @@ class _AllLabSpecialResultState extends State<AllLabSpecialResult> {
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),
), ),

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

@ -151,7 +151,7 @@ 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(

@ -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) {

@ -15,20 +15,20 @@ 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,
this.patient, required this.patient,
this.patientType, this.patientType,
this.arrivalType, this.arrivalType,
this.medicalReport, this.medicalReport,
this.model, required this.model,
this.status, this.status,
this.medicalNote}) this.medicalNote})
: super(key: key); : super(key: key);
@ -71,11 +71,11 @@ class _AddVerifyMedicalReportState extends State<AddVerifyMedicalReport> {
HtmlRichEditor( HtmlRichEditor(
initialText: (widget.medicalReport != null initialText: (widget.medicalReport != null
? widget.medicalNote ? widget.medicalNote
: widget.model.medicalReportTemplate[0].templateText.length > 0 : widget.model.medicalReportTemplate[0].templateText!.length > 0
? widget.model.medicalReportTemplate[0].templateText ? 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,
), ),
], ],
), ),
@ -101,7 +101,7 @@ 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);
@ -109,8 +109,8 @@ class _AddVerifyMedicalReportState extends State<AddVerifyMedicalReport> {
?await widget.model.updateMedicalReport( ?await widget.model.updateMedicalReport(
widget.patient, widget.patient,
txtOfMedicalReport, txtOfMedicalReport,
widget.medicalReport != null ? widget.medicalReport.lineItemNo : null, widget.medicalReport != null ? widget.medicalReport!.lineItemNo : null,
widget.medicalReport != null ? widget.medicalReport.invoiceNo : null) widget.medicalReport != null ? widget.medicalReport!.invoiceNo : null)
: await widget.model.addMedicalReport(widget.patient, txtOfMedicalReport); : await widget.model.addMedicalReport(widget.patient, txtOfMedicalReport);
//model.getMedicalReportList(patient); //model.getMedicalReportList(patient);
@ -138,10 +138,10 @@ class _AddVerifyMedicalReportState extends State<AddVerifyMedicalReport> {
color: Color(0xff359846), color: Color(0xff359846),
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);
await widget.model.verifyMedicalReport(widget.patient, widget.medicalReport); await widget.model.verifyMedicalReport(widget.patient, widget.medicalReport!);
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
Navigator.pop(context); Navigator.pop(context);
if (widget.model.state == ViewState.ErrorLocal) { if (widget.model.state == ViewState.ErrorLocal) {

@ -87,7 +87,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
body: model.patientProgressNoteList == null || body: model.patientProgressNoteList == null ||
model.patientProgressNoteList.length == 0 model.patientProgressNoteList.length == 0
? DrAppEmbeddedError( ? DrAppEmbeddedError(
error: TranslationBase.of(context).errorNoProgressNote) error: TranslationBase.of(context).errorNoProgressNote!)
: Container( : Container(
color: Colors.grey[200], color: Colors.grey[200],
child: Column( child: Column(
@ -113,8 +113,8 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
); );
}, },
label: widget.visitType == 3 label: widget.visitType == 3
? TranslationBase.of(context).addNewOrderSheet ? TranslationBase.of(context).addNewOrderSheet!
: TranslationBase.of(context).addProgressNote, : TranslationBase.of(context).addProgressNote!,
), ),
Expanded( Expanded(
child: Container( child: Container(
@ -129,7 +129,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
.status == .status ==
1 && 1 &&
authenticationViewModel authenticationViewModel
.doctorProfile.doctorID != .doctorProfile!.doctorID !=
model model
.patientProgressNoteList[ .patientProgressNoteList[
index] index]
@ -156,7 +156,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
.status == .status ==
1 && 1 &&
authenticationViewModel authenticationViewModel
.doctorProfile.doctorID != .doctorProfile!.doctorID !=
model model
.patientProgressNoteList[ .patientProgressNoteList[
index] index]
@ -201,7 +201,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
.status != .status !=
4 && 4 &&
authenticationViewModel authenticationViewModel
.doctorProfile.doctorID == .doctorProfile!.doctorID ==
model model
.patientProgressNoteList[ .patientProgressNoteList[
index] index]

@ -37,11 +37,11 @@ class NursingProgressNoteScreen extends StatefulWidget {
} }
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 {
@ -52,8 +52,8 @@ class _ProgressNoteState extends State<NursingProgressNoteScreen> {
print(type); print(type);
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, setupID: "010266"); patientID: patient.patientId, setupID: "010266");
model.getNursingProgressNote(getNursingProgressNoteRequestModel); model.getNursingProgressNote(getNursingProgressNoteRequestModel);
} }
@ -79,7 +79,7 @@ class _ProgressNoteState extends State<NursingProgressNoteScreen> {
body: model.patientNursingProgressNoteList == null || body: model.patientNursingProgressNoteList == null ||
model.patientNursingProgressNoteList.length == 0 model.patientNursingProgressNoteList.length == 0
? DrAppEmbeddedError( ? DrAppEmbeddedError(
error: TranslationBase.of(context).errorNoProgressNote) error: TranslationBase.of(context).errorNoProgressNote!)
: Container( : Container(
color: Colors.grey[200], color: Colors.grey[200],
child: Column( child: Column(

@ -31,7 +31,7 @@ import '../../../../widgets/shared/app_texts_widget.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
class OperationReportScreen extends StatefulWidget { class OperationReportScreen extends StatefulWidget {
final int visitType; final int? visitType;
const OperationReportScreen({Key? key, this.visitType}) : super(key: key); const OperationReportScreen({Key? key, this.visitType}) : super(key: key);
@ -40,11 +40,11 @@ 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) {
@ -55,7 +55,7 @@ class _ProgressNoteState extends State<OperationReportScreen> {
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,
@ -71,7 +71,7 @@ class _ProgressNoteState extends State<OperationReportScreen> {
model.reservationList == null || model.reservationList == null ||
model.reservationList.length == 0 model.reservationList.length == 0
? DrAppEmbeddedError( ? DrAppEmbeddedError(
error: TranslationBase.of(context).errorNoProgressNote) error: TranslationBase.of(context).errorNoProgressNote!)
: Expanded( : Expanded(
child: Container( child: Container(
child: ListView.builder( child: ListView.builder(

@ -36,16 +36,16 @@ class UpdateOperationReport extends StatefulWidget {
final GetReservationsResponseModel reservation; final GetReservationsResponseModel reservation;
// final OperationReportViewModel operationReportViewModel; // final OperationReportViewModel operationReportViewModel;
final PatiantInformtion patient; final PatiantInformtion patient;
final int visitType; final int? visitType;
final bool isUpdate; final bool isUpdate;
const UpdateOperationReport( const UpdateOperationReport(
{Key? key, {Key? key,
// this.operationReportViewModel, // this.operationReportViewModel,
this.patient, required this.patient,
this.visitType, this.visitType,
this.isUpdate, required this.isUpdate,
this.reservation}) required this.reservation})
: super(key: key); : super(key: key);
@override @override
@ -53,12 +53,12 @@ class UpdateOperationReport extends StatefulWidget {
} }
class _UpdateOperationReportState extends State<UpdateOperationReport> { class _UpdateOperationReportState extends State<UpdateOperationReport> {
int selectedType; late 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; late ProjectViewModel projectViewModel;
TextEditingController preOpDiagmosisController = TextEditingController(); TextEditingController preOpDiagmosisController = TextEditingController();
TextEditingController postOpDiagmosisNoteController = TextEditingController(); TextEditingController postOpDiagmosisNoteController = TextEditingController();
@ -135,7 +135,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(
@ -540,8 +540,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,
@ -590,9 +590,9 @@ class _UpdateOperationReportState extends State<UpdateOperationReport> {
bloodLossDetailController.text, bloodLossDetailController.text,
patientID: widget.patient.patientId, patientID: widget.patient.patientId,
admissionNo: admissionNo:
int.parse(widget.patient.admissionNo), int.parse(widget.patient.admissionNo!),
createdBy: model createdBy: model
.doctorProfile.doctorID, .doctorProfile!.doctorID!,
setupID: "010266"); setupID: "010266");
await model await model
.updateOperationReport( .updateOperationReport(

@ -9,11 +9,11 @@ import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.d
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class PendingOrdersScreen extends StatelessWidget { class PendingOrdersScreen extends StatelessWidget {
const PendingOrdersScreen({Key? key}) : super(key: key); const PendingOrdersScreen({Key key}) : super(key: key);
@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'];
patient = routeArgs['patient']; patient = routeArgs['patient'];
String patientType = routeArgs['patientType']; String patientType = routeArgs['patientType'];
@ -24,73 +24,73 @@ class PendingOrdersScreen extends StatelessWidget {
admissionNo: int.parse(patient.admissionNo)), admissionNo: int.parse(patient.admissionNo)),
builder: builder:
(BuildContext context, PendingOrdersViewModel model, Widget child) => (BuildContext context, PendingOrdersViewModel model, Widget child) =>
AppScaffold( AppScaffold(
appBar: PatientProfileAppBar( appBar: PatientProfileAppBar(
patient, patient,
isInpatient: isInpatient, isInpatient: isInpatient,
), ),
isShowAppBar: true, isShowAppBar: true,
baseViewModel: model, baseViewModel: model,
appBarTitle: "Pending Orders", appBarTitle: "Pending Orders",
body: model.pendingOrdersList == null || body: model.pendingOrdersList == null ||
model.pendingOrdersList.length == 0 model.pendingOrdersList.length == 0
? DrAppEmbeddedError( ? DrAppEmbeddedError(
error: TranslationBase.of(context).noDataAvailable) error: TranslationBase.of(context).noDataAvailable)
: Column( : Column(
children: [ children: [
Padding( Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Column( child: Column(
children: [ children: [
Row( Row(
children: [ children: [
AppText( AppText(
TranslationBase.of(context).pending, TranslationBase.of(context).pending,
fontSize: 15.0, fontSize: 15.0,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontFamily: 'Poppins', fontFamily: 'Poppins',
), ),
], ],
), ),
Row( Row(
children: [ children: [
AppText( AppText(
TranslationBase.of(context).orders, TranslationBase.of(context).orders,
fontSize: 25.0, fontSize: 25.0,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
], ],
), ),
], ],
),
), ),
Container( ),
child: ListView.builder( Container(
scrollDirection: Axis.vertical, child: ListView.builder(
shrinkWrap: true, scrollDirection: Axis.vertical,
itemCount: model.pendingOrdersList.length, shrinkWrap: true,
itemBuilder: (BuildContext ctxt, int index) { itemCount: model.pendingOrdersList.length,
return Padding( itemBuilder: (BuildContext ctxt, int index) {
padding: EdgeInsets.all(8.0), return Padding(
child: Container( padding: EdgeInsets.all(8.0),
decoration: BoxDecoration( child: Container(
borderRadius: BorderRadius.all( decoration: BoxDecoration(
Radius.circular(10.0), borderRadius: BorderRadius.all(
), Radius.circular(10.0),
border: Border.all(
color: Color(0xFF707070), width: 0.30),
),
child: Padding(
padding: EdgeInsets.all(8.0),
child: AppText(
model.pendingOrdersList[index].notes),
), ),
border: Border.all(
color: Color(0xFF707070), width: 0.30),
), ),
); child: Padding(
})), padding: EdgeInsets.all(8.0),
], child: AppText(
), model.pendingOrdersList[index].notes),
), ),
),
);
})),
],
),
),
); );
} }
} }

@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
class CustomEditableText extends StatefulWidget { class CustomEditableText extends StatefulWidget {
CustomEditableText({ CustomEditableText({
Key key, Key key,
@required this.controller, required this.controller,
this.hint, this.hint,
this.isEditable = false, this.isSubmitted, this.isEditable = false, this.isSubmitted,
}) : super(key: key); }) : super(key: key);

@ -501,15 +501,15 @@ class _ActivationPageState extends State<ActivationPage> {
counterText: " ", counterText: " ",
enabledBorder: OutlineInputBorder( enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(10)), borderRadius: BorderRadius.all(Radius.circular(10)),
borderSide: BorderSide(color: Colors.grey[300]), borderSide: BorderSide(color: Colors.grey[300]!),
), ),
focusedBorder: OutlineInputBorder( focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(10.0)), borderRadius: BorderRadius.all(Radius.circular(10.0)),
borderSide: BorderSide(color: Colors.grey[300]), borderSide: BorderSide(color: Colors.grey[300]!),
), ),
errorBorder: OutlineInputBorder( errorBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(10.0)), borderRadius: BorderRadius.all(Radius.circular(10.0)),
borderSide: BorderSide(color: Colors.grey[300]), borderSide: BorderSide(color: Colors.grey[300]!),
), ),
focusedErrorBorder: OutlineInputBorder( focusedErrorBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(10.0)), borderRadius: BorderRadius.all(Radius.circular(10.0)),

@ -21,7 +21,7 @@ class BaseAddProcedureTabPage extends StatefulWidget {
final ProcedureType? procedureType; final ProcedureType? procedureType;
const BaseAddProcedureTabPage( const BaseAddProcedureTabPage(
{Key? key, this.model, this.prescriptionModel, this.patient, @required this.procedureType}) {Key? key, this.model, this.prescriptionModel, this.patient, required this.procedureType})
: super(key: key); : super(key: key);
@override @override

Loading…
Cancel
Save