|
|
|
|
@ -8,6 +8,7 @@ import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_dialog_button.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/utils/date-utils.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/utils/tab_utils.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
|
|
|
|
|
@ -44,6 +45,7 @@ class _PatientMakeInPatientReferralScreenState extends State<PatientMakeInPatien
|
|
|
|
|
dynamic _selectedClinic;
|
|
|
|
|
dynamic _selectedDoctor;
|
|
|
|
|
dynamic _selectedFrequency;
|
|
|
|
|
dynamic _selectedPriority;
|
|
|
|
|
final _remarksController = TextEditingController();
|
|
|
|
|
final _extController = TextEditingController();
|
|
|
|
|
int _activePriority = 1;
|
|
|
|
|
@ -143,6 +145,29 @@ class _PatientMakeInPatientReferralScreenState extends State<PatientMakeInPatien
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
|
|
|
|
|
dynamic priority1 = {
|
|
|
|
|
"ParameterCode": 1,
|
|
|
|
|
"Description": TranslationBase.of(context).veryUrgent.toUpperCase(),
|
|
|
|
|
};
|
|
|
|
|
dynamic priority2 = {
|
|
|
|
|
"ParameterCode": 1,
|
|
|
|
|
'Description': TranslationBase.of(context).urgent.toUpperCase(),
|
|
|
|
|
};
|
|
|
|
|
dynamic priority3 = {
|
|
|
|
|
"ParameterCode": 1,
|
|
|
|
|
'Description': TranslationBase.of(context).routine.toUpperCase(),
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
List<Object> _priorityList = List();
|
|
|
|
|
_priorityList.add(
|
|
|
|
|
priority1,);
|
|
|
|
|
_priorityList.add(
|
|
|
|
|
priority2,);
|
|
|
|
|
_priorityList.add(
|
|
|
|
|
priority3,);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
|
|
|
|
|
patient = routeArgs['patient'];
|
|
|
|
|
bool isInpatient = routeArgs['isInpatient'];
|
|
|
|
|
@ -408,22 +433,39 @@ class _PatientMakeInPatientReferralScreenState extends State<PatientMakeInPatien
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.all(4.0),
|
|
|
|
|
child: AppText(
|
|
|
|
|
"${TranslationBase.of(context).priority}",
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 4,
|
|
|
|
|
),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.all(3.0),
|
|
|
|
|
child: priorityBar(context, screenSize),
|
|
|
|
|
AppTextFieldCustom(
|
|
|
|
|
height: screenSize.height * 0.075,
|
|
|
|
|
hintText:
|
|
|
|
|
TranslationBase.of(context).priority,
|
|
|
|
|
dropDownText: _selectedPriority != null
|
|
|
|
|
? _selectedPriority['Description']
|
|
|
|
|
: null,
|
|
|
|
|
enabled: false,
|
|
|
|
|
isTextFieldHasSuffix: true,
|
|
|
|
|
validationError: frequencyError,
|
|
|
|
|
onClick: () {
|
|
|
|
|
ListSelectDialog dialog = ListSelectDialog(
|
|
|
|
|
list: _priorityList,
|
|
|
|
|
attributeName: 'Description',
|
|
|
|
|
attributeValueId: 'Description',
|
|
|
|
|
usingSearch: false,
|
|
|
|
|
okText: TranslationBase.of(context).ok,
|
|
|
|
|
okFunction: (selectedValue) {
|
|
|
|
|
setState(() {
|
|
|
|
|
_selectedPriority = selectedValue;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
showDialog(
|
|
|
|
|
barrierDismissible: false,
|
|
|
|
|
context: context,
|
|
|
|
|
builder: (BuildContext context) {
|
|
|
|
|
return dialog;
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
@ -668,52 +710,6 @@ class _PatientMakeInPatientReferralScreenState extends State<PatientMakeInPatien
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
// List<String> _priorities = [
|
|
|
|
|
// TranslationBase.of(context).veryUrgent.toUpperCase(),
|
|
|
|
|
// TranslationBase.of(context).urgent.toUpperCase(),
|
|
|
|
|
// TranslationBase.of(context).routine.toUpperCase(),
|
|
|
|
|
// ];
|
|
|
|
|
// return Container(
|
|
|
|
|
// height: screenSize.height * 0.070,
|
|
|
|
|
// width: screenSize.width * 0.95,
|
|
|
|
|
// decoration:
|
|
|
|
|
// containerBorderDecoration(Color(0Xffffffff), Color(0xFFCCCCCC)),
|
|
|
|
|
// child: Row(
|
|
|
|
|
// mainAxisSize: MainAxisSize.max,
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
// children: _priorities.map((item) {
|
|
|
|
|
// bool _isActive = _priorities[_activePriority] == item ? true : false;
|
|
|
|
|
// return Expanded(
|
|
|
|
|
// child: InkWell(
|
|
|
|
|
// child: Center(
|
|
|
|
|
// child: Container(
|
|
|
|
|
// height: screenSize.height * 0.070,
|
|
|
|
|
// decoration: containerBorderDecoration(
|
|
|
|
|
// _isActive ? Color(0XFFB8382B) : Colors.white,
|
|
|
|
|
// _isActive ? Color(0XFFB8382B) : Colors.white),
|
|
|
|
|
// child: Center(
|
|
|
|
|
// child: Text(
|
|
|
|
|
// item,
|
|
|
|
|
// style: TextStyle(
|
|
|
|
|
// fontSize: 12,
|
|
|
|
|
// color: _isActive ? Colors.white : Colors.black,
|
|
|
|
|
// //Colors.black,
|
|
|
|
|
// fontWeight: FontWeight.bold,
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// )),
|
|
|
|
|
// ),
|
|
|
|
|
// onTap: () {
|
|
|
|
|
// print(_priorities.indexOf(item));
|
|
|
|
|
// setState(() {
|
|
|
|
|
// _activePriority = _priorities.indexOf(item);
|
|
|
|
|
// });
|
|
|
|
|
// },
|
|
|
|
|
// ),
|
|
|
|
|
// );
|
|
|
|
|
// }).toList(),
|
|
|
|
|
// ),
|
|
|
|
|
// );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String getPriority() {
|
|
|
|
|
@ -729,11 +725,11 @@ class _PatientMakeInPatientReferralScreenState extends State<PatientMakeInPatien
|
|
|
|
|
date = date.add(new Duration(days: 1));
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
var format = DateFormat('yyyy/mm/dd HH:mm a');
|
|
|
|
|
var time = format.format(date);
|
|
|
|
|
print(time);
|
|
|
|
|
var format = DateFormat('yyyy/MM/dd HH:mm a');
|
|
|
|
|
var localAppointmentDate = format.format(date);
|
|
|
|
|
appointmentDate = localAppointmentDate;
|
|
|
|
|
String time = AppDateUtils.getDayMonthYearDateFormatted(date) + ' ' + AppDateUtils.getHour(date);
|
|
|
|
|
|
|
|
|
|
appointmentDate = time;
|
|
|
|
|
return time;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|