Null Safety Update

update_flutter_3.16.0_voipcall
Aamir Muhammad 2 years ago
parent 76f8b37d1e
commit ea7744254b

@ -20,7 +20,7 @@ import '../../widgets/shared/errors/error_message.dart';
class NewPrescriptionsPage extends StatelessWidget { class NewPrescriptionsPage extends StatelessWidget {
@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'];
bool isInpatient = routeArgs['isInpatient']; bool isInpatient = routeArgs['isInpatient'];
bool isFromLiveCare = routeArgs['isFromLiveCare']; bool isFromLiveCare = routeArgs['isFromLiveCare'];
@ -32,7 +32,7 @@ class NewPrescriptionsPage extends StatelessWidget {
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: true, isShowAppBar: true,
backgroundColor: Colors.grey[100], backgroundColor: Colors.grey[100]!,
appBar: PatientProfileAppBar( appBar: PatientProfileAppBar(
patient, patient,
isInpatient: isInpatient, isInpatient: isInpatient,

@ -21,7 +21,7 @@ import '../../widgets/shared/errors/error_message.dart';
class OldPrescriptionsPage extends StatelessWidget { class OldPrescriptionsPage extends StatelessWidget {
@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'];
@ -37,7 +37,7 @@ class OldPrescriptionsPage extends StatelessWidget {
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: true, isShowAppBar: true,
backgroundColor: Colors.grey[100], backgroundColor: Colors.grey[100]!,
appBar: PatientProfileAppBar( appBar: PatientProfileAppBar(
patient, patient,
isInpatient: isInpatient, isInpatient: isInpatient,
@ -89,19 +89,19 @@ class OldPrescriptionsPage extends StatelessWidget {
doctorName: doctorName:
Utils.convertToTitleCase(model Utils.convertToTitleCase(model
.prescriptionsList[index] .prescriptionsList[index]
.doctorName), .doctorName!),
profileUrl: model profileUrl: model
.prescriptionsList[index] .prescriptionsList[index]
.doctorImageURL, .doctorImageURL!,
branch: model branch: model
.prescriptionsList[index].name, .prescriptionsList[index].name!,
clinic: model.prescriptionsList[index] clinic: model.prescriptionsList[index]
.clinicDescription, .clinicDescription!,
isPrescriptions: true, isPrescriptions: true,
appointmentDate: AppDateUtils appointmentDate: AppDateUtils
.getDateTimeFromServerFormat( .getDateTimeFromServerFormat(
model.prescriptionsList[index] model.prescriptionsList[index]
.appointmentDate, .appointmentDate!,
), ),
), ),
], ],
@ -155,7 +155,7 @@ class OldPrescriptionsPage extends StatelessWidget {
label: "", label: "",
value: Utils.convertToTitleCase(model value: Utils.convertToTitleCase(model
.medicationForInPatient[index] .medicationForInPatient[index]
.pHRItemDescription), .pHRItemDescription!),
valueSize: SizeConfig valueSize: SizeConfig
.getTextMultiplierBasedOnWidth() * .getTextMultiplierBasedOnWidth() *
3.5, 3.5,
@ -207,12 +207,12 @@ class OldPrescriptionsPage extends StatelessWidget {
startOn: AppDateUtils startOn: AppDateUtils
.getDateTimeFromServerFormat( .getDateTimeFromServerFormat(
model.medicationForInPatient[index] model.medicationForInPatient[index]
.startDatetime, .startDatetime!,
), ),
stopOn: AppDateUtils stopOn: AppDateUtils
.getDateTimeFromServerFormat( .getDateTimeFromServerFormat(
model.medicationForInPatient[index] model.medicationForInPatient[index]
.stopDatetime, .stopDatetime!,
), ),
), ),
), ),

@ -32,66 +32,57 @@ 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 PrescriptionCheckOutScreen extends StatefulWidget { class PrescriptionCheckOutScreen extends StatefulWidget {
final PrescriptionViewModel model; final PrescriptionViewModel? model;
final PatiantInformtion patient; final PatiantInformtion? patient;
final List<PrescriptionModel> prescriptionList; final List<PrescriptionModel>? prescriptionList;
final ProcedureTempleteDetailsModel groupProcedures; final ProcedureTempleteDetailsModel? groupProcedures;
const PrescriptionCheckOutScreen( const PrescriptionCheckOutScreen({Key? key, this.model, this.patient, this.prescriptionList, this.groupProcedures}) : super(key: key);
{Key key,
this.model,
this.patient,
this.prescriptionList,
this.groupProcedures})
: super(key: key);
@override @override
_PrescriptionCheckOutScreenState createState() => _PrescriptionCheckOutScreenState createState() => _PrescriptionCheckOutScreenState();
_PrescriptionCheckOutScreenState();
} }
class _PrescriptionCheckOutScreenState class _PrescriptionCheckOutScreenState extends State<PrescriptionCheckOutScreen> {
extends State<PrescriptionCheckOutScreen> {
postPrescription( postPrescription(
{String duration, {String? duration,
String doseTimeIn, String? doseTimeIn,
String dose, String? dose,
String drugId, String? drugId,
String strength, String? strength,
String route, String? route,
String frequency, String? frequency,
String indication, String? indication,
String instruction, String? instruction,
PrescriptionViewModel model, PrescriptionViewModel? model,
DateTime doseTime, DateTime? doseTime,
String doseUnit, String? doseUnit,
String icdCode, String? icdCode,
PatiantInformtion patient, PatiantInformtion? patient,
String patientType}) async { String? patientType}) async {
PostPrescriptionReqModel postProcedureReqModel = PostPrescriptionReqModel postProcedureReqModel = new PostPrescriptionReqModel();
new PostPrescriptionReqModel();
List<PrescriptionRequestModel> prescriptionList = []; List<PrescriptionRequestModel> prescriptionList = [];
postProcedureReqModel.appointmentNo = patient.appointmentNo; postProcedureReqModel.appointmentNo = patient!.appointmentNo;
postProcedureReqModel.clinicID = patient.clinicId; postProcedureReqModel.clinicID = patient.clinicId;
postProcedureReqModel.episodeID = patient.episodeNo; postProcedureReqModel.episodeID = patient.episodeNo;
postProcedureReqModel.patientMRN = patient.patientMRN; postProcedureReqModel.patientMRN = patient.patientMRN;
prescriptionList.add(PrescriptionRequestModel( prescriptionList.add(PrescriptionRequestModel(
covered: true, covered: true,
dose: double.parse(dose), dose: double.parse(dose!),
itemId: drugId.isEmpty ? 1 : int.parse(drugId), itemId: drugId!.isEmpty ? 1 : int.parse(drugId),
doseUnitId: int.parse(doseUnit), doseUnitId: int.parse(doseUnit!),
route: route.isEmpty ? 1 : int.parse(route), route: route!.isEmpty ? 1 : int.parse(route),
frequency: frequency.isEmpty ? 1 : int.parse(frequency), frequency: frequency!.isEmpty ? 1 : int.parse(frequency),
remarks: instruction, remarks: instruction,
approvalRequired: true, approvalRequired: true,
icdcode10Id: icdCode.toString(), icdcode10Id: icdCode.toString(),
doseTime: doseTimeIn.isEmpty ? 1 : int.parse(doseTimeIn), doseTime: doseTimeIn!.isEmpty ? 1 : int.parse(doseTimeIn),
duration: duration.isEmpty ? 1 : int.parse(duration), duration: duration!.isEmpty ? 1 : int.parse(duration),
doseStartDate: doseTime.toIso8601String())); doseStartDate: doseTime!.toIso8601String()));
postProcedureReqModel.prescriptionRequestModel = prescriptionList; postProcedureReqModel.prescriptionRequestModel = prescriptionList;
await model.postPrescription(postProcedureReqModel, patient.patientMRN); await model!.postPrescription(postProcedureReqModel, patient.patientMRN!);
if (model.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {
Utils.showErrorToast(model.error); Utils.showErrorToast(model.error);
@ -101,14 +92,14 @@ class _PrescriptionCheckOutScreenState
} }
} }
String routeError; String? routeError;
String frequencyError; String? frequencyError;
String doseTimeError; String? doseTimeError;
String durationError; String? durationError;
String unitError; String? unitError;
String strengthError; String? strengthError;
int selectedType; int? selectedType;
TextEditingController strengthController = TextEditingController(); TextEditingController strengthController = TextEditingController();
TextEditingController indicationController = TextEditingController(); TextEditingController indicationController = TextEditingController();
@ -118,11 +109,10 @@ class _PrescriptionCheckOutScreenState
bool visibilitySearch = true; bool visibilitySearch = true;
final myController = TextEditingController(); final myController = TextEditingController();
DateTime selectedDate; DateTime? selectedDate;
int strengthChar; int? strengthChar;
GetMedicationResponseModel _selectedMedication; GetMedicationResponseModel _selectedMedication = GetMedicationResponseModel();
GlobalKey key = GlobalKey<AutoCompleteTextFieldState<GetMedicationResponseModel>> key = GlobalKey<AutoCompleteTextFieldState<GetMedicationResponseModel>>();
new GlobalKey<AutoCompleteTextFieldState<GetMedicationResponseModel>>();
TextEditingController drugIdController = TextEditingController(); TextEditingController drugIdController = TextEditingController();
TextEditingController doseController = TextEditingController(); TextEditingController doseController = TextEditingController();
@ -160,8 +150,7 @@ class _PrescriptionCheckOutScreenState
onVoiceText() async { onVoiceText() async {
new SpeechToText(context: context).showAlertDialog(context); new SpeechToText(context: context).showAlertDialog(context);
var lang = TranslationBase.of(AppGlobal.CONTEX).locale.languageCode; var lang = TranslationBase.of(AppGlobal.CONTEX).locale.languageCode;
bool available = await speech.initialize( bool available = await speech.initialize(onStatus: statusListener, onError: errorListener);
onStatus: statusListener, onError: errorListener);
if (available) { if (available) {
speech.listen( speech.listen(
onResult: resultListener, onResult: resultListener,
@ -204,8 +193,7 @@ class _PrescriptionCheckOutScreenState
} }
Future<void> initSpeechState() async { Future<void> initSpeechState() async {
bool hasSpeech = await speech.initialize( bool hasSpeech = await speech.initialize(onError: errorListener, onStatus: statusListener);
onError: errorListener, onStatus: statusListener);
print(hasSpeech); print(hasSpeech);
if (!mounted) return; if (!mounted) return;
} }
@ -222,19 +210,13 @@ class _PrescriptionCheckOutScreenState
return BaseView<MedicineViewModel>( return BaseView<MedicineViewModel>(
onModelReady: (model) async { onModelReady: (model) async {
// TODO Elham* move this logic to the model // TODO Elham* move this logic to the model
model.getItem( model.getItem(itemID: int.parse(widget.groupProcedures!.aliasN!.replaceAll("item code ;", "")));
itemID: int.parse(
widget.groupProcedures.aliasN.replaceAll("item code ;", "")));
x = model.patientAssessmentList.map((element) { x = model.patientAssessmentList.map((element) {
return element.icdCode10ID; return element.icdCode10ID;
}); });
GetAssessmentReqModel getAssessmentReqModel = GetAssessmentReqModel( GetAssessmentReqModel getAssessmentReqModel =
patientMRN: widget.patient.patientMRN, GetAssessmentReqModel(patientMRN: widget.patient!.patientMRN, episodeID: widget.patient!.episodeNo.toString(), editedBy: '', doctorID: '', appointmentNo: widget.patient!.appointmentNo);
episodeID: widget.patient.episodeNo.toString(),
editedBy: '',
doctorID: '',
appointmentNo: widget.patient.appointmentNo);
if (model.medicationStrengthList.length == 0) { if (model.medicationStrengthList.length == 0) {
await model.getMedicationStrength(); await model.getMedicationStrength();
} }
@ -249,7 +231,7 @@ class _PrescriptionCheckOutScreenState
builder: ( builder: (
BuildContext context, BuildContext context,
MedicineViewModel model, MedicineViewModel model,
Widget child, Widget? child,
) => ) =>
AppScaffold( AppScaffold(
backgroundColor: Color(0xffF8F8F8).withOpacity(0.9), backgroundColor: Color(0xffF8F8F8).withOpacity(0.9),
@ -265,8 +247,7 @@ class _PrescriptionCheckOutScreenState
height: MediaQuery.of(context).size.height * 1.35, height: MediaQuery.of(context).size.height * 1.35,
color: Color(0xffF8F8F8), color: Color(0xffF8F8F8),
child: Padding( child: Padding(
padding: padding: EdgeInsets.symmetric(horizontal: 12.0, vertical: 10.0),
EdgeInsets.symmetric(horizontal: 12.0, vertical: 10.0),
child: Column( child: Column(
children: [ children: [
Column( Column(
@ -290,8 +271,7 @@ class _PrescriptionCheckOutScreenState
width: 7.0, width: 7.0,
), ),
AppText( AppText(
TranslationBase.of(context) TranslationBase.of(context).newPrescriptionOrder,
.newPrescriptionOrder,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: 20, fontSize: 20,
), ),
@ -325,16 +305,14 @@ class _PrescriptionCheckOutScreenState
child: Column( child: Column(
children: [ children: [
AppText( AppText(
widget.groupProcedures.procedureName ?? widget.groupProcedures!.procedureName ?? "",
"",
bold: true, bold: true,
), ),
Container( Container(
child: Row( child: Row(
children: [ children: [
AppText( AppText(
TranslationBase.of(context) TranslationBase.of(context).orderType,
.orderType,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
Radio( Radio(
@ -342,11 +320,10 @@ class _PrescriptionCheckOutScreenState
value: 1, value: 1,
groupValue: selectedType, groupValue: selectedType,
onChanged: (value) { onChanged: (value) {
setSelectedType(value); setSelectedType(value!);
}, },
), ),
Text(TranslationBase.of(context) Text(TranslationBase.of(context).regular),
.regular),
], ],
), ),
), ),
@ -356,13 +333,10 @@ class _PrescriptionCheckOutScreenState
child: Row( child: Row(
children: [ children: [
Container( Container(
width: MediaQuery.of(context) width: MediaQuery.of(context).size.width * 0.35,
.size
.width *
0.35,
child: AppTextFieldCustom( child: AppTextFieldCustom(
height: 40, height: 40,
validationError: strengthError, validationError: strengthError!,
hintText: TranslationBase.of(context).strength, hintText: TranslationBase.of(context).strength,
isTextFieldHasSuffix: false, isTextFieldHasSuffix: false,
enabled: true, enabled: true,
@ -371,17 +345,13 @@ class _PrescriptionCheckOutScreenState
setState(() { setState(() {
strengthChar = value.length; strengthChar = value.length;
}); });
if (strengthChar >= 5) { if (strengthChar! >= 5) {
DrAppToastMsg DrAppToastMsg.showErrorToast(
.showErrorToast( TranslationBase.of(context).only5DigitsAllowedForStrength,
TranslationBase.of(
context)
.only5DigitsAllowedForStrength,
); );
} }
}, },
inputType: TextInputType inputType: TextInputType.numberWithOptions(
.numberWithOptions(
decimal: true, decimal: true,
), ),
), ),
@ -390,17 +360,13 @@ class _PrescriptionCheckOutScreenState
width: 5.0, width: 5.0,
), ),
PrescriptionTextFiled( PrescriptionTextFiled(
width: MediaQuery.of(context) width: MediaQuery.of(context).size.width * 0.560,
.size
.width *
0.560,
element: units, element: units,
elementError: unitError, elementError: unitError!,
keyName: 'description', keyName: 'description',
keyId: 'parameterCode', keyId: 'parameterCode',
hintText: 'Select', hintText: 'Select',
elementList: elementList: model.itemMedicineListUnit,
model.itemMedicineListUnit,
okFunction: (selectedValue) { okFunction: (selectedValue) {
setState(() { setState(() {
units = selectedValue; units = selectedValue;
@ -413,10 +379,9 @@ class _PrescriptionCheckOutScreenState
), ),
SizedBox(height: spaceBetweenTextFields), SizedBox(height: spaceBetweenTextFields),
PrescriptionTextFiled( PrescriptionTextFiled(
elementList: elementList: model.itemMedicineListRoute,
model.itemMedicineListRoute,
element: route, element: route,
elementError: routeError, elementError: routeError!,
keyId: 'parameterCode', keyId: 'parameterCode',
keyName: 'description', keyName: 'description',
okFunction: (selectedValue) { okFunction: (selectedValue) {
@ -425,14 +390,12 @@ class _PrescriptionCheckOutScreenState
route['isDefault'] = true; route['isDefault'] = true;
}); });
}, },
hintText: hintText: TranslationBase.of(context).route,
TranslationBase.of(context).route,
), ),
SizedBox(height: spaceBetweenTextFields), SizedBox(height: spaceBetweenTextFields),
PrescriptionTextFiled( PrescriptionTextFiled(
hintText: TranslationBase.of(context) hintText: TranslationBase.of(context).frequency,
.frequency, elementError: frequencyError!,
elementError: frequencyError,
element: frequency, element: frequency,
elementList: model.itemMedicineList, elementList: model.itemMedicineList,
keyId: 'parameterCode', keyId: 'parameterCode',
@ -441,21 +404,9 @@ class _PrescriptionCheckOutScreenState
setState(() { setState(() {
frequency = selectedValue; frequency = selectedValue;
frequency['isDefault'] = true; frequency['isDefault'] = true;
if (_selectedMedication != null && if (_selectedMedication != null && duration != null && frequency != null && strengthController.text != null) {
duration != null &&
frequency != null &&
strengthController.text !=
null) {
model.getBoxQuantity( model.getBoxQuantity(
freq: frequency[ freq: frequency['parameterCode'], duration: duration['id'], itemCode: _selectedMedication.itemId, strength: double.parse(strengthController.text));
'parameterCode'],
duration: duration['id'],
itemCode:
_selectedMedication
.itemId,
strength: double.parse(
strengthController
.text));
return; return;
} }
@ -463,12 +414,10 @@ class _PrescriptionCheckOutScreenState
}), }),
SizedBox(height: spaceBetweenTextFields), SizedBox(height: spaceBetweenTextFields),
PrescriptionTextFiled( PrescriptionTextFiled(
hintText: TranslationBase.of(context) hintText: TranslationBase.of(context).doseTime,
.doseTime, elementError: doseTimeError!,
elementError: doseTimeError,
element: doseTime, element: doseTime,
elementList: elementList: model.medicationDoseTimeList,
model.medicationDoseTimeList,
keyId: 'id', keyId: 'id',
keyName: 'nameEn', keyName: 'nameEn',
okFunction: (selectedValue) { okFunction: (selectedValue) {
@ -477,8 +426,7 @@ class _PrescriptionCheckOutScreenState
}); });
}), }),
SizedBox(height: spaceBetweenTextFields), SizedBox(height: spaceBetweenTextFields),
if (model if (model.patientAssessmentList.isNotEmpty)
.patientAssessmentList.isNotEmpty)
Container( Container(
height: screenSize.height * 0.070, height: screenSize.height * 0.070,
width: double.infinity, width: double.infinity,
@ -486,47 +434,19 @@ class _PrescriptionCheckOutScreenState
child: Row( child: Row(
children: [ children: [
Container( Container(
width: MediaQuery.of(context) width: MediaQuery.of(context).size.width * 0.29,
.size
.width *
0.29,
child: TextField( child: TextField(
decoration: decoration: textFieldSelectorDecoration(model.patientAssessmentList[0].icdCode10ID.toString(), indication != null ? indication['name'] : null, false),
textFieldSelectorDecoration(
model
.patientAssessmentList[
0]
.icdCode10ID
.toString(),
indication != null
? indication[
'name']
: null,
false),
enabled: true, enabled: true,
readOnly: true, readOnly: true,
), ),
), ),
Container( Container(
width: MediaQuery.of(context) width: MediaQuery.of(context).size.width * 0.65,
.size
.width *
0.65,
color: Colors.white, color: Colors.white,
child: TextField( child: TextField(
maxLines: 5, maxLines: 5,
decoration: decoration: textFieldSelectorDecoration(model.patientAssessmentList[0].asciiDesc.toString(), indication != null ? indication['name'] : null, false),
textFieldSelectorDecoration(
model
.patientAssessmentList[
0]
.asciiDesc
.toString(),
indication != null
? indication[
'name']
: null,
false),
enabled: true, enabled: true,
readOnly: true, readOnly: true,
), ),
@ -539,16 +459,10 @@ class _PrescriptionCheckOutScreenState
height: screenSize.height * 0.070, height: screenSize.height * 0.070,
color: Colors.white, color: Colors.white,
child: InkWell( child: InkWell(
onTap: () => onTap: () => selectDate(context, widget.model!),
selectDate(context, widget.model),
child: TextField( child: TextField(
decoration: textFieldSelectorDecoration( decoration: textFieldSelectorDecoration(
TranslationBase.of(context) TranslationBase.of(context).date, selectedDate != null ? "${AppDateUtils.convertStringToDateFormat(selectedDate.toString(), "yyyy-MM-dd")}" : "", true,
.date,
selectedDate != null
? "${AppDateUtils.convertStringToDateFormat(selectedDate.toString(), "yyyy-MM-dd")}"
: null,
true,
suffixIcon: Icon( suffixIcon: Icon(
Icons.calendar_today, Icons.calendar_today,
color: Colors.black, color: Colors.black,
@ -560,29 +474,20 @@ class _PrescriptionCheckOutScreenState
SizedBox(height: spaceBetweenTextFields), SizedBox(height: spaceBetweenTextFields),
PrescriptionTextFiled( PrescriptionTextFiled(
element: duration, element: duration,
elementError: durationError, elementError: durationError!,
hintText: TranslationBase.of(context) hintText: TranslationBase.of(context).duration,
.duration, elementList: model.medicationDurationList,
elementList:
model.medicationDurationList,
keyName: 'nameEn', keyName: 'nameEn',
keyId: 'id', keyId: 'id',
okFunction: (selectedValue) { okFunction: (selectedValue) {
setState(() { setState(() {
duration = selectedValue; duration = selectedValue;
if (_selectedMedication != null && if (_selectedMedication != null && duration != null && frequency != null && strengthController.text != null) {
duration != null &&
frequency != null &&
strengthController.text !=
null) {
model.getBoxQuantity( model.getBoxQuantity(
freq: freq: frequency['parameterCode'],
frequency['parameterCode'],
duration: duration['id'], duration: duration['id'],
itemCode: itemCode: _selectedMedication.itemId,
_selectedMedication.itemId, strength: double.parse(strengthController.text),
strength: double.parse(
strengthController.text),
); );
box = model.boxQuintity; box = model.boxQuintity;
@ -595,20 +500,13 @@ class _PrescriptionCheckOutScreenState
SizedBox(height: spaceBetweenTextFields), SizedBox(height: spaceBetweenTextFields),
SizedBox(height: spaceBetweenTextFields), SizedBox(height: spaceBetweenTextFields),
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(borderRadius: BorderRadius.all(Radius.circular(6.0)), border: Border.all(width: 1.0, color: HexColor("#CCCCCC"))),
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
child: Stack( child: Stack(
children: [ children: [
TextFields( TextFields(
maxLines: 6, maxLines: 6,
minLines: 4, minLines: 4,
hintText: hintText: TranslationBase.of(context).instruction,
TranslationBase.of(context)
.instruction,
controller: instructionController, controller: instructionController,
//keyboardType: TextInputType.number, //keyboardType: TextInputType.number,
), ),
@ -622,9 +520,7 @@ class _PrescriptionCheckOutScreenState
size: 35, size: 35,
), ),
onPressed: () { onPressed: () {
initSpeechState().then( initSpeechState().then((value) => {onVoiceText()});
(value) =>
{onVoiceText()});
}, },
), ),
), ),
@ -633,15 +529,13 @@ class _PrescriptionCheckOutScreenState
), ),
SizedBox(height: spaceBetweenTextFields), SizedBox(height: spaceBetweenTextFields),
Container( Container(
margin: EdgeInsets.all( margin: EdgeInsets.all(SizeConfig.widthMultiplier! * 5),
SizeConfig.widthMultiplier! * 5),
child: Wrap( child: Wrap(
alignment: WrapAlignment.center, alignment: WrapAlignment.center,
children: <Widget>[ children: <Widget>[
AppButton( AppButton(
color: AppGlobal.appGreenColor, color: AppGlobal.appGreenColor,
title: TranslationBase.of(context) title: TranslationBase.of(context).addMedication,
.addMedication,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
onPressed: () async { onPressed: () async {
if (route != null && if (route != null &&
@ -650,101 +544,41 @@ class _PrescriptionCheckOutScreenState
frequency != null && frequency != null &&
units != null && units != null &&
selectedDate != null && selectedDate != null &&
strengthController.text != strengthController.text != "") {
"") { if (double.parse(strengthController.text) > 1000.0) {
if (double.parse(
strengthController
.text) >
1000.0) {
DrAppToastMsg.showErrorToast( DrAppToastMsg.showErrorToast(
TranslationBase.of(context).thousandIsTheMAXForTheStrength,); TranslationBase.of(context).thousandIsTheMAXForTheStrength,
);
return; return;
} }
if (double.parse( if (double.parse(strengthController.text) < 0.0) {
strengthController
.text) <
0.0) {
DrAppToastMsg.showErrorToast( DrAppToastMsg.showErrorToast(
TranslationBase.of(context).strengthCanNotBeZero,); TranslationBase.of(context).strengthCanNotBeZero,
);
return; return;
} }
if (formKey.currentState if (formKey.currentState!.validate()) {
.validate()) {
Navigator.pop(context); Navigator.pop(context);
{ {
postPrescription( postPrescription(
icdCode: model icdCode: model.patientAssessmentList.isNotEmpty
.patientAssessmentList ? model.patientAssessmentList[0].icdCode10ID!.isEmpty
.isNotEmpty
? model
.patientAssessmentList[
0]
.icdCode10ID
.isEmpty
? "test" ? "test"
: model : model.patientAssessmentList[0].icdCode10ID.toString()
.patientAssessmentList[
0]
.icdCode10ID
.toString()
: "test", : "test",
dose: strengthController dose: strengthController.text,
.text, doseUnit:
doseUnit: model model.itemMedicineListUnit.length == 1 ? model.itemMedicineListUnit[0]['parameterCode'].toString() : units['parameterCode'].toString(),
.itemMedicineListUnit
.length ==
1
? model
.itemMedicineListUnit[
0][
'parameterCode']
.toString()
: units['parameterCode']
.toString(),
patient: widget.patient, patient: widget.patient,
doseTimeIn: doseTimeIn: doseTime['id'].toString(),
doseTime['id']
.toString(),
model: widget.model, model: widget.model,
duration: duration['id'] duration: duration['id'].toString(),
.toString(), frequency: model.itemMedicineList.length == 1 ? model.itemMedicineList[0]['parameterCode'].toString() : frequency['parameterCode'].toString(),
frequency: model route: model.itemMedicineListRoute.length == 1 ? model.itemMedicineListRoute[0]['parameterCode'].toString() : route['parameterCode'].toString(),
.itemMedicineList drugId: (widget.groupProcedures!.aliasN!.replaceAll("item code ;", "")),
.length == strength: strengthController.text,
1 indication: indicationController.text,
? model instruction: instructionController.text,
.itemMedicineList[
0][
'parameterCode']
.toString()
: frequency[
'parameterCode']
.toString(),
route: model.itemMedicineListRoute
.length ==
1
? model
.itemMedicineListRoute[
0][
'parameterCode']
.toString()
: route['parameterCode']
.toString(),
drugId: (widget
.groupProcedures
.aliasN
.replaceAll(
"item code ;",
"")),
strength:
strengthController
.text,
indication:
indicationController
.text,
instruction:
instructionController
.text,
doseTime: selectedDate, doseTime: selectedDate,
); );
} }
@ -752,59 +586,39 @@ class _PrescriptionCheckOutScreenState
} else { } else {
setState(() { setState(() {
if (duration == null) { if (duration == null) {
durationError = durationError = TranslationBase.of(context).fieldRequired;
TranslationBase.of(
context)
.fieldRequired;
} else { } else {
durationError = null; durationError = null;
} }
if (doseTime == null) { if (doseTime == null) {
doseTimeError = doseTimeError = TranslationBase.of(context).fieldRequired;
TranslationBase.of(
context)
.fieldRequired;
} else { } else {
doseTimeError = null; doseTimeError = null;
} }
if (route == null) { if (route == null) {
routeError = routeError = TranslationBase.of(context).fieldRequired;
TranslationBase.of(
context)
.fieldRequired;
} else { } else {
routeError = null; routeError = null;
} }
if (frequency == null) { if (frequency == null) {
frequencyError = frequencyError = TranslationBase.of(context).fieldRequired;
TranslationBase.of(
context)
.fieldRequired;
} else { } else {
frequencyError = null; frequencyError = null;
} }
if (units == null) { if (units == null) {
unitError = unitError = TranslationBase.of(context).fieldRequired;
TranslationBase.of(
context)
.fieldRequired;
} else { } else {
unitError = null; unitError = null;
} }
if (strengthController if (strengthController.text == "") {
.text == strengthError = TranslationBase.of(context).fieldRequired;
"") {
strengthError =
TranslationBase.of(
context)
.fieldRequired;
} else { } else {
strengthError = null; strengthError = null;
} }
}); });
} }
formKey.currentState.save(); formKey.currentState!.save();
}, },
), ),
], ],
@ -833,7 +647,7 @@ class _PrescriptionCheckOutScreenState
Utils.hideKeyboard(context); Utils.hideKeyboard(context);
DateTime selectedDate; DateTime selectedDate;
selectedDate = DateTime.now(); selectedDate = DateTime.now();
final DateTime picked = await showDatePicker( final DateTime? picked = await showDatePicker(
context: context, context: context,
initialDate: selectedDate, initialDate: selectedDate,
firstDate: DateTime.now(), firstDate: DateTime.now(),
@ -849,9 +663,7 @@ class _PrescriptionCheckOutScreenState
/// TODO Elham* Use it from the textfeild utils /// TODO Elham* Use it from the textfeild utils
InputDecoration textFieldSelectorDecoration( InputDecoration textFieldSelectorDecoration(String hintText, String selectedText, bool isDropDown, {Icon? suffixIcon}) {
String hintText, String selectedText, bool isDropDown,
{Icon suffixIcon}) {
return InputDecoration( return InputDecoration(
focusedBorder: OutlineInputBorder( focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),

@ -7,25 +7,15 @@ import 'package:flutter/material.dart';
class PrescriptionTextFiled extends StatefulWidget { class PrescriptionTextFiled extends StatefulWidget {
dynamic element; dynamic element;
final String elementError; final String? elementError;
final List<dynamic> elementList; final List<dynamic>? elementList;
final String keyName; final String? keyName;
final String keyId; final String? keyId;
final String hintText; final String? hintText;
final double width; final double? width;
final Function(dynamic) okFunction; final Function(dynamic)? okFunction;
PrescriptionTextFiled( PrescriptionTextFiled({Key? key, required this.element, required this.elementError, this.width, this.elementList, this.keyName, this.keyId, this.hintText, this.okFunction}) : super(key: key);
{Key key,
@required this.element,
@required this.elementError,
this.width,
this.elementList,
this.keyName,
this.keyId,
this.hintText,
this.okFunction})
: super(key: key);
@override @override
_PrescriptionTextFiledState createState() => _PrescriptionTextFiledState(); _PrescriptionTextFiledState createState() => _PrescriptionTextFiledState();
@ -41,14 +31,11 @@ class _PrescriptionTextFiledState extends State<PrescriptionTextFiled> {
? () { ? () {
Utils.hideKeyboard(context); Utils.hideKeyboard(context);
ListSelectDialog dialog = ListSelectDialog( ListSelectDialog dialog = ListSelectDialog(
list: widget.elementList, list: widget.elementList!,
attributeName: '${widget.keyName}', attributeName: '${widget.keyName}',
attributeValueId: widget.elementList.length == 1 attributeValueId: widget.elementList!.length == 1 ? widget.elementList![0]['${widget.keyId}'].toString() : '${widget.keyId}',
? widget.elementList[0]['${widget.keyId}'].toString()
: '${widget.keyId}',
okText: TranslationBase.of(context).ok, okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) => okFunction: (selectedValue) => widget.okFunction!(selectedValue),
widget.okFunction(selectedValue),
); );
showDialog( showDialog(
barrierDismissible: false, barrierDismissible: false,
@ -60,15 +47,14 @@ class _PrescriptionTextFiledState extends State<PrescriptionTextFiled> {
} }
: null, : null,
child: AppTextFieldCustom( child: AppTextFieldCustom(
hintText: widget.hintText, hintText: widget.hintText!,
dropDownText: widget.elementList.length == 1 dropDownText: widget.elementList!.length == 1
? widget.elementList[0]['${widget.keyName}'] ? widget.elementList![0]['${widget.keyName}']
: widget.element != null : widget.element != null
? widget.element['${widget.keyName}'] ? widget.element['${widget.keyName}']
: null, : null,
isTextFieldHasSuffix: true, isTextFieldHasSuffix: true,
validationError: validationError: widget.elementList!.length != 1 ? widget.elementError! : "",
widget.elementList.length != 1 ? widget.elementError : null,
enabled: false, enabled: false,
), ),
), ),

@ -14,16 +14,16 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
class PrescriptionItemsInPatientPage extends StatelessWidget { class PrescriptionItemsInPatientPage extends StatelessWidget {
final GetMedicationForInPatientModel prescriptions; final GetMedicationForInPatientModel? prescriptions;
final PatiantInformtion patient; final PatiantInformtion? patient;
final String patientType; final String?patientType;
final String arrivalType; final String? arrivalType;
final DateTime startOn; final DateTime? startOn;
final DateTime stopOn; final DateTime? stopOn;
final int prescriptionIndex; final int? prescriptionIndex;
PrescriptionItemsInPatientPage( PrescriptionItemsInPatientPage(
{Key key, {Key? key,
this.prescriptions, this.prescriptions,
this.patient, this.patient,
this.patientType, this.patientType,
@ -38,14 +38,14 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
return BaseView<PrescriptionViewModel>( return BaseView<PrescriptionViewModel>(
onModelReady: (model) async { onModelReady: (model) async {
if (model.medicationForInPatient.length == 0) { if (model.medicationForInPatient.length == 0) {
await model.getMedicationForInPatient(patient); await model.getMedicationForInPatient(patient!);
} }
}, },
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
backgroundColor: Colors.grey[100], backgroundColor: Colors.grey[100]!,
baseViewModel: model, baseViewModel: model,
appBar: PatientProfileAppBar(patient), appBar: PatientProfileAppBar(patient!),
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
child: Column( child: Column(
@ -64,7 +64,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
Container( Container(
margin: EdgeInsets.only(left: 18, right: 18), margin: EdgeInsets.only(left: 18, right: 18),
child: AppText( child: AppText(
prescriptions.pHRItemDescription, prescriptions!.pHRItemDescription ?? "",
bold: true, bold: true,
), ),
), ),
@ -87,7 +87,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
children: [ children: [
CustomRow( CustomRow(
label: TranslationBase.of(context).direction + ' :', label: TranslationBase.of(context).direction + ' :',
value: " " + prescriptions.directionDescription.toString() ?? '', value: " " + prescriptions!.directionDescription! ?? "",
isCopyable: false, isCopyable: false,
isExpanded: false, isExpanded: false,
valueSize: 13, valueSize: 13,
@ -95,7 +95,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
), ),
CustomRow( CustomRow(
label: TranslationBase.of(context).route + ' :', label: TranslationBase.of(context).route + ' :',
value: " " + prescriptions.routeDescription ?? '', value: " " + prescriptions!.routeDescription! ?? '',
isCopyable: false, isCopyable: false,
isExpanded: false, isExpanded: false,
valueSize: 13, valueSize: 13,
@ -103,7 +103,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
), ),
CustomRow( CustomRow(
label: TranslationBase.of(context).refill + ' :', label: TranslationBase.of(context).refill + ' :',
value: " " + prescriptions.refillDescription ?? '', value: " " + prescriptions!.refillDescription! ?? '',
isCopyable: false, isCopyable: false,
isExpanded: false, isExpanded: false,
valueSize: 13, valueSize: 13,
@ -111,7 +111,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
), ),
CustomRow( CustomRow(
label: TranslationBase.of(context).startDate + ' :', label: TranslationBase.of(context).startDate + ' :',
value: " " + AppDateUtils.getDayMonthYearDateFormatted(startOn, isArabic: projectViewModel.isArabic) ?? '', value: " " + AppDateUtils.getDayMonthYearDateFormatted(startOn!, isArabic: projectViewModel.isArabic) ?? '',
isCopyable: false, isCopyable: false,
isExpanded: false, isExpanded: false,
valueSize: 13, valueSize: 13,
@ -119,7 +119,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
), ),
CustomRow( CustomRow(
label: TranslationBase.of(context).stopDate + ' :', label: TranslationBase.of(context).stopDate + ' :',
value: " " + AppDateUtils.getDayMonthYearDateFormatted(stopOn, isArabic: projectViewModel.isArabic) ?? '', value: " " + AppDateUtils.getDayMonthYearDateFormatted(stopOn!, isArabic: projectViewModel.isArabic) ?? '',
isCopyable: false, isCopyable: false,
isExpanded: false, isExpanded: false,
valueSize: 13, valueSize: 13,
@ -127,7 +127,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
), ),
CustomRow( CustomRow(
label: 'UOM' + ' :', label: 'UOM' + ' :',
value: " " + prescriptions.uomDescription.toString() ?? '', value: " " + prescriptions!.uomDescription.toString() ?? '',
isCopyable: false, isCopyable: false,
isExpanded: false, isExpanded: false,
valueSize: 13, valueSize: 13,
@ -135,7 +135,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
), ),
CustomRow( CustomRow(
label: TranslationBase.of(context).dailyDoses, label: TranslationBase.of(context).dailyDoses,
value: " " + prescriptions.dose.toString() ?? '', value: " " + prescriptions!.dose.toString() ?? '',
isCopyable: false, isCopyable: false,
isExpanded: false, isExpanded: false,
valueSize: 13, valueSize: 13,
@ -143,7 +143,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
), ),
CustomRow( CustomRow(
label: TranslationBase.of(context).status, label: TranslationBase.of(context).status,
value: " " + prescriptions.statusDescription.toString() ?? '', value: " " + prescriptions!.statusDescription.toString() ?? '',
isCopyable: false, isCopyable: false,
isExpanded: false, isExpanded: false,
valueSize: 13, valueSize: 13,
@ -151,7 +151,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
), ),
CustomRow( CustomRow(
label: TranslationBase.of(context).processed, label: TranslationBase.of(context).processed,
value: " " + prescriptions.doctorName.toString() ?? '', value: " " + prescriptions!.doctorName.toString() ?? '',
isCopyable: false, isCopyable: false,
isExpanded: false, isExpanded: false,
valueSize: 13, valueSize: 13,
@ -162,7 +162,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
), ),
CustomRow( CustomRow(
label: '', label: '',
value: prescriptions.comments ?? '', value: prescriptions!.comments ?? '',
isCopyable: false, isCopyable: false,
isExpanded: false, isExpanded: false,
valueSize: 13, valueSize: 13,

@ -14,12 +14,12 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class PrescriptionItemsPage extends StatelessWidget { class PrescriptionItemsPage extends StatelessWidget {
final Prescriptions prescriptions; final Prescriptions? prescriptions;
final PatiantInformtion patient; final PatiantInformtion? patient;
final String arrivalType; final String? arrivalType;
PrescriptionItemsPage( PrescriptionItemsPage(
{Key key, {Key? key,
this.prescriptions, this.prescriptions,
this.patient, this.patient,
this.arrivalType}); this.arrivalType});
@ -28,20 +28,20 @@ class PrescriptionItemsPage extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<PrescriptionViewModel>( return BaseView<PrescriptionViewModel>(
onModelReady: (model) => model.getPrescriptionReport( onModelReady: (model) => model.getPrescriptionReport(
prescriptions: prescriptions, patient: patient), prescriptions: prescriptions, patient: patient!),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
backgroundColor: Colors.grey[100], backgroundColor: Colors.grey[100]!,
baseViewModel: model, baseViewModel: model,
appBar: PatientProfileAppBar( appBar: PatientProfileAppBar(
patient, patient!,
clinic: prescriptions.clinicDescription, clinic: prescriptions!.clinicDescription!,
branch: prescriptions.name, branch: prescriptions!.name!,
isPrescriptions: true, isPrescriptions: true,
appointmentDate: AppDateUtils.getDateTimeFromServerFormat( appointmentDate: AppDateUtils.getDateTimeFromServerFormat(
prescriptions.appointmentDate), prescriptions!.appointmentDate!),
doctorName: prescriptions.doctorName, doctorName: prescriptions!.doctorName!,
profileUrl: prescriptions.doctorImageURL, profileUrl: prescriptions!.doctorImageURL!,
isAppointmentHeader: true, isAppointmentHeader: true,
), ),
body: SingleChildScrollView( body: SingleChildScrollView(

@ -16,17 +16,17 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class AddFavouriteProcedure extends StatefulWidget { class AddFavouriteProcedure extends StatefulWidget {
final ProcedureViewModel previousProcedureViewModel; final ProcedureViewModel? previousProcedureViewModel;
final PrescriptionViewModel prescriptionModel; final PrescriptionViewModel? prescriptionModel;
final PatiantInformtion patient; final PatiantInformtion? patient;
final ProcedureType procedureType; final ProcedureType? procedureType;
AddFavouriteProcedure({ AddFavouriteProcedure({
Key key, Key? key,
this.previousProcedureViewModel, this.previousProcedureViewModel,
this.prescriptionModel, this.prescriptionModel,
this.patient, this.patient,
@required this.procedureType, required this.procedureType,
}); });
@override @override
@ -36,54 +36,51 @@ class AddFavouriteProcedure extends StatefulWidget {
class _AddFavouriteProcedureState extends State<AddFavouriteProcedure> { class _AddFavouriteProcedureState extends State<AddFavouriteProcedure> {
_AddFavouriteProcedureState({this.patient, this.model}); _AddFavouriteProcedureState({this.patient, this.model});
ProcedureViewModel model; ProcedureViewModel? model;
PatiantInformtion patient; PatiantInformtion? patient;
List<ProcedureTempleteDetailsModel> entityList = []; List<ProcedureTempleteDetailsModel> entityList = [];
ProcedureTempleteDetailsModel groupProcedures; ProcedureTempleteDetailsModel groupProcedures = ProcedureTempleteDetailsModel();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<ProcedureViewModel>( return BaseView<ProcedureViewModel>(
builder: (BuildContext context, ProcedureViewModel procedureViewModel, builder: (BuildContext context, ProcedureViewModel procedureViewModel, Widget? child) => AppScaffold(
Widget child) => isShowAppBar: false,
AppScaffold( body: Column(children: [
isShowAppBar: false, (widget.previousProcedureViewModel.templateList.length != 0)
body: Column(children: [ ? Expanded(
(widget.previousProcedureViewModel.templateList.length != 0) child: EntityListCheckboxSearchFavProceduresWidget(
? Expanded( isProcedure: !(widget.procedureType == ProcedureType.PRESCRIPTION),
child: EntityListCheckboxSearchFavProceduresWidget( model: widget.previousProcedureViewModel,
isProcedure: !(widget.procedureType == removeFavProcedure: (item) {
ProcedureType.PRESCRIPTION), setState(() {
model: widget.previousProcedureViewModel, entityList.remove(item);
removeFavProcedure: (item) { });
setState(() { },
entityList.remove(item); addFavProcedure: (history) {
}); setState(() {
}, entityList.add(history);
addFavProcedure: (history) { });
setState(() { },
entityList.add(history); isEntityFavListSelected: (master) => procedureViewModel.isProcedureEntityListSelected(master, entityList),
}); groupProcedures: groupProcedures,
}, selectProcedures: (selectedProcedure) {
isEntityFavListSelected: (master) => setState(() {
procedureViewModel.isProcedureEntityListSelected( groupProcedures = selectedProcedure;
master, entityList), });
groupProcedures: groupProcedures, },
selectProcedures: (selectedProcedure) { ),
setState(() { )
groupProcedures = selectedProcedure; : ErrorMessage(
}); error: TranslationBase.of(context).youDoNotHaveFavoriteTemplate,
}, ),
), ]),
) bottomSheet: widget.previousProcedureViewModel.templateList.length == 0
: ErrorMessage( ? Container(
error: TranslationBase.of(context) height: 0,
.youDoNotHaveFavoriteTemplate, )
), : CustomBottomSheetContainer(
]), label: widget.procedureType.getAddButtonTitle(context) ?? TranslationBase.of(context).addSelectedProcedures,
bottomSheet: widget.previousProcedureViewModel.templateList.length == 0?Container(height: 0,):CustomBottomSheetContainer(
label: widget.procedureType.getAddButtonTitle(context) ??
TranslationBase.of(context).addSelectedProcedures,
onTap: () async { onTap: () async {
if (widget.procedureType == ProcedureType.PRESCRIPTION) { if (widget.procedureType == ProcedureType.PRESCRIPTION) {
if (groupProcedures == null) { if (groupProcedures == null) {
@ -101,14 +98,12 @@ class _AddFavouriteProcedureState extends State<AddFavouriteProcedure> {
model: widget.prescriptionModel, model: widget.prescriptionModel,
groupProcedures: groupProcedures, groupProcedures: groupProcedures,
), ),
settings: RouteSettings( settings: RouteSettings(name: 'PrescriptionCheckOutScreen')),
name: 'PrescriptionCheckOutScreen')),
); );
} else { } else {
if (entityList.isEmpty == true) { if (entityList.isEmpty == true) {
DrAppToastMsg.showErrorToast( DrAppToastMsg.showErrorToast(
TranslationBase.of(context) TranslationBase.of(context).fillTheMandatoryProcedureDetails,
.fillTheMandatoryProcedureDetails,
); );
return; return;
} }
@ -117,16 +112,12 @@ class _AddFavouriteProcedureState extends State<AddFavouriteProcedure> {
MaterialPageRoute( MaterialPageRoute(
builder: (context) => ProcedureCheckOutScreen( builder: (context) => ProcedureCheckOutScreen(
items: entityList, items: entityList,
previousProcedureViewModel: previousProcedureViewModel: widget.previousProcedureViewModel,
widget.previousProcedureViewModel,
patient: widget.patient, patient: widget.patient,
addButtonTitle: widget.procedureType addButtonTitle: widget.procedureType.getAddButtonTitle(context),
.getAddButtonTitle(context), toolbarTitle: widget.procedureType.getToolbarLabel(context),
toolbarTitle: widget.procedureType
.getToolbarLabel(context),
), ),
settings: settings: RouteSettings(name: 'ProcedureCheckOutScreen')),
RouteSettings(name: 'ProcedureCheckOutScreen')),
); );
} }
})), })),

Loading…
Cancel
Save