From e133a014e8ecdafda1d90e445804f8ceaea4f571 Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Wed, 20 Jan 2021 17:28:40 +0200 Subject: [PATCH] Prescription & medical file fix --- lib/core/service/procedure_service.dart | 2 +- .../medical-file/medical_file_details.dart | 26 +- .../prescription/add_prescription_form.dart | 172 +++++-- .../prescription/prescription_screen.dart | 471 +++++++++++++----- lib/screens/procedures/procedure_screen.dart | 3 +- 5 files changed, 493 insertions(+), 181 deletions(-) diff --git a/lib/core/service/procedure_service.dart b/lib/core/service/procedure_service.dart index 5836beec..89fe6be3 100644 --- a/lib/core/service/procedure_service.dart +++ b/lib/core/service/procedure_service.dart @@ -78,7 +78,7 @@ class ProcedureService extends BaseService { patientMRN: 0, pageIndex: 1, clinicId: 0, - pageSize: 100, + pageSize: 300, ); hasError = false; _categoriesList.clear(); diff --git a/lib/screens/medical-file/medical_file_details.dart b/lib/screens/medical-file/medical_file_details.dart index d445f471..7ad1d47e 100644 --- a/lib/screens/medical-file/medical_file_details.dart +++ b/lib/screens/medical-file/medical_file_details.dart @@ -632,17 +632,21 @@ class _MedicalFileDetailsState extends State { fontWeight: FontWeight.w700, ), - // AppText( - // model - // .medicalFileList[0] - // .entityList[0] - // .timelines[0] - // .timeLineEvents[0] - // .consulations[0] - // .lstProcedure[index] - // .orderDate - // .trim(), - // ), + Expanded( + child: AppText( + model + .medicalFileList[ + 0] + .entityList[0] + .timelines[0] + .timeLineEvents[0] + .consulations[0] + .lstProcedure[ + index] + .orderDate + .trim(), + ), + ), ], ), Row( diff --git a/lib/screens/prescription/add_prescription_form.dart b/lib/screens/prescription/add_prescription_form.dart index 3704f47e..f5263724 100644 --- a/lib/screens/prescription/add_prescription_form.dart +++ b/lib/screens/prescription/add_prescription_form.dart @@ -47,6 +47,7 @@ postProcedure( String instruction, PrescriptionViewModel model, DateTime doseTime, + String doseUnit, PatiantInformtion patient}) async { PostPrescriptionReqModel postProcedureReqModel = new PostPrescriptionReqModel(); @@ -59,9 +60,9 @@ postProcedure( sss.add(PrescriptionRequestModel( covered: true, - dose: 1, + dose: int.parse(dose), itemId: drugId.isEmpty ? 1 : int.parse(drugId), - doseUnitId: 1, + doseUnitId: int.parse(doseUnit), route: route.isEmpty ? 1 : int.parse(route), frequency: frequency.isEmpty ? 1 : int.parse(frequency), remarks: instruction, @@ -114,6 +115,7 @@ class _PrescriptionFormWidgetState extends State { dynamic duration; dynamic doseTime; dynamic indication; + dynamic units; List strengthList; List routeList; @@ -121,6 +123,7 @@ class _PrescriptionFormWidgetState extends State { List durationList; List doseTimeList; List indicationList; + List unitsList; String routeInatial = 'By Mouth'; //PatiantInformtion patient; @@ -135,12 +138,22 @@ class _PrescriptionFormWidgetState extends State { durationList = List(); doseTimeList = List(); indicationList = List(); + unitsList = List(); + dynamic unit1 = {"id": 1, "name": "MG"}; + dynamic unit2 = {"id": 2, "name": "MCG"}; + dynamic unit3 = {"id": 3, "name": "GM"}; dynamic regularOrder = {"id": 1, "name": "regular Order"}; dynamic urgentOrder = {"id": 2, "name": "urgent Order"}; dynamic strength1 = {"id": 1, "name": "1"}; dynamic strength2 = {"id": 2, "name": "2"}; dynamic strength3 = {"id": 3, "name": "3"}; + dynamic strength4 = {"id": 4, "name": "4"}; + dynamic strength5 = {"id": 5, "name": "5"}; + dynamic strength6 = {"id": 6, "name": "6"}; + dynamic strength7 = {"id": 7, "name": "7"}; + dynamic strength8 = {"id": 8, "name": "8"}; + dynamic strength9 = {"id": 9, "name": "9"}; dynamic route1 = {"id": 7, "name": "By Mouth"}; dynamic route2 = {"id": 10, "name": "Inhale by Mouth"}; dynamic route3 = {"id": 15, "name": "for INJECTION"}; @@ -169,6 +182,11 @@ class _PrescriptionFormWidgetState extends State { dynamic duration9 = {"id": 9, "name": "For 9 Days"}; dynamic duration10 = {"id": 10, "name": "For 10 Days"}; dynamic duration11 = {"id": 14, "name": "For 14 Days"}; + dynamic duration12 = {"id": 21, "name": "For 21 Days"}; + dynamic duration13 = {"id": 30, "name": "For 30 Days"}; + dynamic duration14 = {"id": 45, "name": "For 45 Days"}; + dynamic duration15 = {"id": 60, "name": "For 60 Days"}; + dynamic duration16 = {"id": 90, "name": "For 90 Days"}; dynamic doseTime1 = {"id": 1, "name": "Before Meals"}; dynamic doseTime2 = {"id": 2, "name": "After Meals"}; dynamic doseTime3 = {"id": 3, "name": "With Meals"}; @@ -195,6 +213,9 @@ class _PrescriptionFormWidgetState extends State { dynamic indication9 = {"id": 554, "name": "Purpuric Dermatitis"}; dynamic indication10 = {"id": 555, "name": "Systemic Lupus Erythematosus"}; + unitsList.add(unit1); + unitsList.add(unit2); + unitsList.add(unit3); indicationList.add(indication1); indicationList.add(indication2); indicationList.add(indication3); @@ -238,6 +259,12 @@ class _PrescriptionFormWidgetState extends State { strengthList.add(strength1); strengthList.add(strength2); strengthList.add(strength3); + strengthList.add(strength4); + strengthList.add(strength5); + strengthList.add(strength6); + strengthList.add(strength7); + strengthList.add(strength8); + strengthList.add(strength9); durationList.add(duration1); durationList.add(duration2); durationList.add(duration3); @@ -249,6 +276,11 @@ class _PrescriptionFormWidgetState extends State { durationList.add(duration9); durationList.add(duration10); durationList.add(duration11); + durationList.add(duration12); + durationList.add(duration13); + durationList.add(duration14); + durationList.add(duration15); + durationList.add(duration16); referToList.add(regularOrder); referToList.add(urgentOrder); } @@ -415,41 +447,103 @@ class _PrescriptionFormWidgetState extends State { SizedBox(height: spaceBetweenTextFileds), Container( height: screenSize.height * 0.070, - child: InkWell( - onTap: strengthList != null - ? () { - ListSelectDialog dialog = - ListSelectDialog( - list: strengthList, - attributeName: 'name', - attributeValueId: 'id', - okText: - TranslationBase.of(context) - .ok, - okFunction: (selectedValue) { - setState(() { - strength = selectedValue; - }); - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: (BuildContext context) { - return dialog; - }, - ); - } - : null, - child: TextField( - decoration: textFieldSelectorDecoration( - TranslationBase.of(context).strength, - strength != null - ? strength['name'] + width: double.infinity, + child: Row( + children: [ + Container( + width: + MediaQuery.of(context).size.width * + 0.5, + child: InkWell( + onTap: strengthList != null + ? () { + ListSelectDialog dialog = + ListSelectDialog( + list: strengthList, + attributeName: 'name', + attributeValueId: 'id', + okText: TranslationBase.of( + context) + .ok, + okFunction: + (selectedValue) { + setState(() { + strength = + selectedValue; + }); + }, + ); + showDialog( + barrierDismissible: false, + context: context, + builder: + (BuildContext context) { + return dialog; + }, + ); + } : null, - true), - enabled: false, - ), + child: TextField( + decoration: + textFieldSelectorDecoration( + TranslationBase.of(context) + .strength, + strength != null + ? strength['name'] + : null, + true), + enabled: false, + ), + ), + ), + SizedBox( + width: 10.0, + ), + Container( + width: + MediaQuery.of(context).size.width * + 0.40, + child: InkWell( + onTap: unitsList != null + ? () { + ListSelectDialog dialog = + ListSelectDialog( + list: unitsList, + attributeName: 'name', + attributeValueId: 'id', + okText: TranslationBase.of( + context) + .ok, + okFunction: + (selectedValue) { + setState(() { + units = selectedValue; + }); + }, + ); + showDialog( + barrierDismissible: false, + context: context, + builder: + (BuildContext context) { + return dialog; + }, + ); + } + : null, + child: TextField( + decoration: + textFieldSelectorDecoration( + 'UNIT Type', + units != null + ? units['name'] + : null, + true), + enabled: false, + ), + ), + ), + ], ), ), SizedBox(height: spaceBetweenTextFileds), @@ -761,11 +855,11 @@ class _PrescriptionFormWidgetState extends State { selectDate(BuildContext context, PrescriptionViewModel model) async { DateTime selectedDate; - selectedDate = DateTime.now().add(Duration(hours: 15)); + selectedDate = DateTime.now(); final DateTime picked = await showDatePicker( context: context, initialDate: selectedDate, - firstDate: DateTime.now().add(Duration(hours: 15)), + firstDate: DateTime.now(), lastDate: DateTime(2040), initialEntryMode: DatePickerEntryMode.calendar, ); @@ -826,6 +920,8 @@ class _PrescriptionFormWidgetState extends State { title: TranslationBase.of(context).addMedication, onPressed: () { postProcedure( + dose: strength['id'].toString(), + doseUnit: units['id'].toString(), patient: widget.patient, doseTimeIn: doseTime['id'].toString(), model: widget.model, diff --git a/lib/screens/prescription/prescription_screen.dart b/lib/screens/prescription/prescription_screen.dart index 5e323f7c..88108a73 100644 --- a/lib/screens/prescription/prescription_screen.dart +++ b/lib/screens/prescription/prescription_screen.dart @@ -18,6 +18,7 @@ import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; @@ -28,10 +29,86 @@ class NewPrescriptionScreen extends StatefulWidget { } class _NewPrescriptionScreenState extends State { + PersistentBottomSheetController _controller; + final _scaffoldKey = GlobalKey(); int testNum = 0; PatiantInformtion patient; + dynamic route; + dynamic doseTime; + dynamic frequencyUpdate; + + List doseTimeList; + List routeList; + List frequencyList; @override + void initState() { + super.initState(); + routeList = List(); + doseTimeList = List(); + frequencyList = List(); + + dynamic frequency1 = {"id": 1, "name": "2 Times a day"}; + dynamic frequency2 = {"id": 2, "name": "3 Times a day"}; + dynamic frequency3 = {"id": 3, "name": "4 Times a day"}; + dynamic frequency4 = {"id": 8, "name": "As Needed"}; + dynamic frequency5 = {"id": 9, "name": "Bed Time"}; + dynamic frequency6 = {"id": 11, "name": "Every Other Day"}; + dynamic frequency7 = {"id": 29, "name": "Every Eight Hours"}; + dynamic frequency8 = {"id": 34, "name": "As Directed"}; + dynamic doseTime1 = {"id": 1, "name": "Before Meals"}; + dynamic doseTime2 = {"id": 2, "name": "After Meals"}; + dynamic doseTime3 = {"id": 3, "name": "With Meals"}; + dynamic doseTime4 = {"id": 4, "name": "In The Morning"}; + dynamic doseTime5 = {"id": 5, "name": "In the Evening"}; + dynamic doseTime6 = {"id": 6, "name": "After Supper"}; + dynamic doseTime7 = {"id": 7, "name": "With Supper"}; + dynamic doseTime8 = {"id": 8, "name": "Before Breakfast"}; + dynamic doseTime9 = {"id": 9, "name": "In the Afternoon"}; + dynamic doseTime10 = {"id": 10, "name": "While wake"}; + dynamic doseTime11 = {"id": 12, "name": "Any Time"}; + dynamic doseTime12 = {"id": 21, "name": "Bed Time"}; + dynamic route1 = {"id": 7, "name": "By Mouth"}; + dynamic route2 = {"id": 10, "name": "Inhale by Mouth"}; + dynamic route3 = {"id": 15, "name": "for INJECTION"}; + dynamic route4 = {"id": 17, "name": "Drops"}; + dynamic route5 = {"id": 18, "name": "Rub On"}; + dynamic route6 = {"id": 20, "name": "Spary"}; + dynamic route7 = {"id": 27, "name": "In Both EYES"}; + dynamic route8 = {"id": 28, "name": "In Both Ears"}; + dynamic route9 = {"id": 32, "name": "Intramuscular"}; + + frequencyList.add(frequency1); + frequencyList.add(frequency2); + frequencyList.add(frequency3); + frequencyList.add(frequency4); + frequencyList.add(frequency5); + frequencyList.add(frequency6); + frequencyList.add(frequency7); + frequencyList.add(frequency8); + doseTimeList.add(doseTime1); + doseTimeList.add(doseTime2); + doseTimeList.add(doseTime3); + doseTimeList.add(doseTime4); + doseTimeList.add(doseTime5); + doseTimeList.add(doseTime6); + doseTimeList.add(doseTime7); + doseTimeList.add(doseTime8); + doseTimeList.add(doseTime9); + doseTimeList.add(doseTime10); + doseTimeList.add(doseTime11); + doseTimeList.add(doseTime12); + routeList.add(route1); + routeList.add(route2); + routeList.add(route3); + routeList.add(route4); + routeList.add(route5); + routeList.add(route6); + routeList.add(route7); + routeList.add(route8); + routeList.add(route9); + } + Widget build(BuildContext context) { final screenSize = MediaQuery.of(context).size; final routeArgs = ModalRoute.of(context).settings.arguments as Map; @@ -453,6 +530,15 @@ class _NewPrescriptionScreenState extends State { .edit), onTap: () { updatePrescriptionForm( + doseUnit: + model.prescriptionList[0].entityList[index].doseDailyUnitID + .toString(), + doseStreangth: + model.prescriptionList[0].entityList[index].doseDailyQuantity + .toString(), + duration: + model.prescriptionList[0].entityList[index].doseDurationDays + .toString(), startDate: model.prescriptionList[0].entityList[index].startDate .toString(), @@ -463,9 +549,13 @@ class _NewPrescriptionScreenState extends State { index] .doseTimingID .toString(), - frequency: - model.prescriptionList[0].entityList[index].frequencyID - .toString(), + frequency: model + .prescriptionList[ + 0] + .entityList[ + index] + .frequencyID + .toString(), rouat: model .prescriptionList[ 0] @@ -476,22 +566,13 @@ class _NewPrescriptionScreenState extends State { patient: patient, drugId: model - .prescriptionList[ - 0] - .entityList[ - index] - .medicineCode, - drugName: model - .prescriptionList[ - 0] - .entityList[ - index] - .doseDetail, - remarks: model .prescriptionList[0] .entityList[index] - .remarks, + .medicineCode, + drugName: model.prescriptionList[0].entityList[index].doseDetail, + remarks: model.prescriptionList[0].entityList[index].remarks, model: model, + enteredRemarks: model.prescriptionList[0].entityList[index].remarks, context: context); //model.postPrescription(); }, @@ -597,6 +678,10 @@ class _NewPrescriptionScreenState extends State { String rouat, String frequency, String dose, + String duration, + String doseStreangth, + String doseUnit, + String enteredRemarks, String startDate}) { TextEditingController remarksController = TextEditingController(); TextEditingController doseController = TextEditingController(); @@ -605,122 +690,213 @@ class _NewPrescriptionScreenState extends State { showModalBottomSheet( context: context, isScrollControlled: true, - builder: (BuildContext bc) { - return Container( - height: MediaQuery.of(context).size.height * 0.73, - child: Form( - child: Padding( - padding: - EdgeInsets.symmetric(horizontal: 20.0, vertical: 12.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - drugName.toUpperCase(), - fontWeight: FontWeight.w900, - ), - SizedBox( - height: 30.0, - ), - Column( - children: [ - Container( - decoration: BoxDecoration( - borderRadius: - BorderRadius.all(Radius.circular(6.0)), - border: Border.all( - width: 1.0, color: HexColor("#CCCCCC"))), - child: TextFields( - hintText: 'route', - controller: routeController, - keyboardType: TextInputType.number, + builder: (BuildContext context) { + return StatefulBuilder(builder: (BuildContext context, + StateSetter setState /*You can rename this!*/) { + return Container( + height: MediaQuery.of(context).size.height * 0.73, + child: Form( + child: Padding( + padding: + EdgeInsets.symmetric(horizontal: 20.0, vertical: 12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + drugName.toUpperCase(), + fontWeight: FontWeight.w900, + ), + SizedBox( + height: 30.0, + ), + Column( + children: [ + Container( + height: + MediaQuery.of(context).size.height * 0.070, + child: InkWell( + onTap: routeList != null + ? () { + ListSelectDialog dialog = + ListSelectDialog( + list: routeList, + attributeName: 'name', + attributeValueId: 'id', + okText: + TranslationBase.of(context).ok, + okFunction: (selectedValue) { + setState(() { + route = selectedValue; + }); + if (route == null) { + helpers + .showErrorToast('plase fill'); + } + }, + ); + showDialog( + barrierDismissible: false, + context: context, + builder: (BuildContext context) { + return dialog; + }, + ); + } + : null, + child: TextField( + decoration: textFieldSelectorDecoration( + TranslationBase.of(context).route, + route != null ? route['name'] : null, + true), + enabled: false, + ), + ), ), - ), - SizedBox( - height: 12.0, - ), - Container( - decoration: BoxDecoration( - borderRadius: - BorderRadius.all(Radius.circular(6.0)), - border: Border.all( - width: 1.0, color: HexColor("#CCCCCC"))), - child: TextFields( - hintText: 'Dose Time', - controller: doseController, - keyboardType: TextInputType.number, + SizedBox( + height: 12.0, ), - ), - SizedBox( - height: 12.0, - ), - Container( - decoration: BoxDecoration( - borderRadius: - BorderRadius.all(Radius.circular(6.0)), - border: Border.all( - width: 1.0, color: HexColor("#CCCCCC"))), - child: TextFields( - hintText: 'Frequency', - controller: frequencyController, - keyboardType: TextInputType.number, + Container( + height: + MediaQuery.of(context).size.height * 0.070, + child: InkWell( + onTap: doseTimeList != null + ? () { + ListSelectDialog dialog = + ListSelectDialog( + list: doseTimeList, + attributeName: 'name', + attributeValueId: 'id', + okText: + TranslationBase.of(context).ok, + okFunction: (selectedValue) { + setState(() { + doseTime = selectedValue; + }); + }, + ); + showDialog( + barrierDismissible: false, + context: context, + builder: (BuildContext context) { + return dialog; + }, + ); + } + : null, + child: TextField( + decoration: textFieldSelectorDecoration( + TranslationBase.of(context).doseTime, + doseTime != null + ? doseTime['name'] + : null, + true), + enabled: false, + ), + ), ), - ), - SizedBox( - height: 12.0, - ), - Container( - decoration: BoxDecoration( - borderRadius: - BorderRadius.all(Radius.circular(6.0)), - border: Border.all( - width: 1.0, color: HexColor("#CCCCCC"))), - child: TextFields( - hintText: remarks, - controller: remarksController, - maxLines: 7, - minLines: 4, + SizedBox( + height: 12.0, ), - ), - SizedBox( - height: 12.0, - ), - SizedBox( - height: MediaQuery.of(context).size.height * 0.12, - ), - Container( - margin: - EdgeInsets.all(SizeConfig.widthMultiplier * 2), - child: Wrap( - alignment: WrapAlignment.center, - children: [ - AppButton( - title: 'update prescription'.toUpperCase(), - onPressed: () { - updatePrescription( - startDate: startDate, - doseId: dose, - frequencyId: frequency, - routeId: rouat, - patient: patient, - model: model, - drugId: drugId, - remarks: remarksController.text, - route: routeController.text, - frequency: frequencyController.text, - dose: doseController.text); - Navigator.pop(context); - }, + Container( + height: + MediaQuery.of(context).size.height * 0.070, + child: InkWell( + onTap: frequencyList != null + ? () { + ListSelectDialog dialog = + ListSelectDialog( + list: frequencyList, + attributeName: 'name', + attributeValueId: 'id', + okText: + TranslationBase.of(context).ok, + okFunction: (selectedValue) { + setState(() { + frequencyUpdate = selectedValue; + }); + }, + ); + showDialog( + barrierDismissible: false, + context: context, + builder: (BuildContext context) { + return dialog; + }, + ); + } + : null, + child: TextField( + decoration: textFieldSelectorDecoration( + TranslationBase.of(context).frequency, + frequencyUpdate != null + ? frequencyUpdate['name'] + : null, + true), + enabled: false, ), - ], + ), ), - ), - ], - ), - ], + SizedBox( + height: 12.0, + ), + Container( + decoration: BoxDecoration( + borderRadius: + BorderRadius.all(Radius.circular(6.0)), + border: Border.all( + width: 1.0, color: HexColor("#CCCCCC"))), + child: TextFields( + hintText: remarks, + controller: remarksController, + maxLines: 7, + minLines: 4, + ), + ), + SizedBox( + height: 12.0, + ), + SizedBox( + height: MediaQuery.of(context).size.height * 0.12, + ), + Container( + margin: EdgeInsets.all( + SizeConfig.widthMultiplier * 2), + child: Wrap( + alignment: WrapAlignment.center, + children: [ + AppButton( + title: 'update prescription'.toUpperCase(), + onPressed: () { + updatePrescription( + doseUnit: doseUnit, + doseStreangth: doseStreangth, + duration: duration, + startDate: startDate, + doseId: dose, + frequencyId: frequency, + routeId: rouat, + patient: patient, + model: model, + drugId: drugId, + remarks: remarksController.text, + route: route['id'].toString(), + frequency: + frequencyUpdate['id'].toString(), + dose: doseTime['id'].toString(), + enteredRemarks: enteredRemarks); + Navigator.pop(context); + }, + ), + ], + ), + ), + ], + ), + ], + ), ), - ), - )); + )); + }); }); } @@ -735,6 +911,10 @@ class _NewPrescriptionScreenState extends State { String route, String routeId, String startDate, + String doseUnit, + String doseStreangth, + String duration, + String enteredRemarks, PatiantInformtion patient}) async { //PrescriptionViewModel model = PrescriptionViewModel(); PostPrescriptionReqModel updatePrescriptionReqModel = @@ -748,18 +928,19 @@ class _NewPrescriptionScreenState extends State { sss.add(PrescriptionRequestModel( covered: true, - dose: 9, //frequency.isNotEmpty ? int.parse(dose) : 1, + dose: int.parse( + doseStreangth), //frequency.isNotEmpty ? int.parse(dose) : 1, itemId: drugId, - doseUnitId: 2, + doseUnitId: int.parse(doseUnit), route: route.isNotEmpty ? int.parse(route) : int.parse(routeId), frequency: frequency.isNotEmpty ? int.parse(frequency) : int.parse(frequencyId), - remarks: remarks.isEmpty ? '' : remarks, + remarks: remarks.isEmpty ? enteredRemarks : remarks, approvalRequired: true, icdcode10Id: "test2", doseTime: dose.isNotEmpty ? int.parse(dose) : int.parse(doseId), - duration: 2, + duration: int.parse(duration), doseStartDate: startDate)); updatePrescriptionReqModel.prescriptionRequestModel = sss; //postProcedureReqModel.procedures = controlsProcedure; @@ -773,4 +954,36 @@ class _NewPrescriptionScreenState extends State { DrAppToastMsg.showSuccesToast('Medication has been updated'); } } + + InputDecoration textFieldSelectorDecoration( + String hintText, String selectedText, bool isDropDown, + {Icon suffixIcon}) { + return InputDecoration( + focusedBorder: OutlineInputBorder( + borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), + borderRadius: BorderRadius.circular(8), + ), + enabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), + borderRadius: BorderRadius.circular(8), + ), + disabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), + borderRadius: BorderRadius.circular(8), + ), + hintText: selectedText != null ? selectedText : hintText, + suffixIcon: isDropDown + ? suffixIcon != null + ? suffixIcon + : Icon( + Icons.arrow_drop_down, + color: Colors.black, + ) + : null, + hintStyle: TextStyle( + fontSize: 14, + color: Colors.grey.shade600, + ), + ); + } } diff --git a/lib/screens/procedures/procedure_screen.dart b/lib/screens/procedures/procedure_screen.dart index 1d6bfb41..667bcc6d 100644 --- a/lib/screens/procedures/procedure_screen.dart +++ b/lib/screens/procedures/procedure_screen.dart @@ -646,8 +646,7 @@ postProcedure( postProcedureReqModel.patientMRN = patient.patientMRN; controls.add( - Controls( - code: remarks.isEmpty ? 'ssss' : remarks, controlValue: 'sssssssss'), + Controls(code: remarks.isEmpty ? '' : remarks, controlValue: 'test'), ); entityList.forEach((element) {