|
|
|
@ -16,6 +16,7 @@ import '../../../widgets/shared/app_scaffold_widget.dart';
|
|
|
|
|
import '../../../widgets/shared/app_texts_widget.dart';
|
|
|
|
|
import '../../../widgets/shared/dr_app_circular_progress_Indeicator.dart';
|
|
|
|
|
import '../../../util/extenstions.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
|
|
|
|
|
|
|
|
|
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
|
|
|
|
|
|
|
|
|
@ -48,8 +49,7 @@ class _ReferPatientState extends State<ReferPatientScreen> {
|
|
|
|
|
String _selectedDoctor;
|
|
|
|
|
String _selectedReferralFrequancy;
|
|
|
|
|
|
|
|
|
|
List<String> _priorities = ['Very Urgent', 'Urgent', 'Routine'];
|
|
|
|
|
int _activePriority = 2;
|
|
|
|
|
int _activePriority = 1;
|
|
|
|
|
|
|
|
|
|
FocusNode myFocusNode;
|
|
|
|
|
|
|
|
|
@ -69,7 +69,7 @@ class _ReferPatientState extends State<ReferPatientScreen> {
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return AppScaffold(
|
|
|
|
|
appBarTitle: "Refer Patient",
|
|
|
|
|
appBarTitle: TranslationBase.of(context).myReferralPatient,
|
|
|
|
|
body: patientsProv.isLoading
|
|
|
|
|
? DrAppCircularProgressIndeicator()
|
|
|
|
|
: patientsProv.isError
|
|
|
|
@ -82,7 +82,7 @@ class _ReferPatientState extends State<ReferPatientScreen> {
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
"Clinic",
|
|
|
|
|
TranslationBase.of(context).clinic,
|
|
|
|
|
fontSize: 18,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
marginLeft: 15,
|
|
|
|
@ -166,7 +166,7 @@ class _ReferPatientState extends State<ReferPatientScreen> {
|
|
|
|
|
),
|
|
|
|
|
//--------------------------------------------------------------------//
|
|
|
|
|
AppText(
|
|
|
|
|
"Doctor",
|
|
|
|
|
TranslationBase.of(context).doctor,
|
|
|
|
|
fontSize: 18,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
marginLeft: 15,
|
|
|
|
@ -246,7 +246,7 @@ class _ReferPatientState extends State<ReferPatientScreen> {
|
|
|
|
|
),
|
|
|
|
|
), //-----------------------------///
|
|
|
|
|
AppText(
|
|
|
|
|
"Ext#",
|
|
|
|
|
TranslationBase.of(context).ext,
|
|
|
|
|
fontSize: 18,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
marginLeft: 15,
|
|
|
|
@ -255,7 +255,7 @@ class _ReferPatientState extends State<ReferPatientScreen> {
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.all(10.0),
|
|
|
|
|
child: AppTextFormField(
|
|
|
|
|
hintText: "Ext#",
|
|
|
|
|
hintText: TranslationBase.of(context).ext,
|
|
|
|
|
controller: _extController,
|
|
|
|
|
inputFormatter: ONLY_NUMBERS,
|
|
|
|
|
textInputType: TextInputType.number,
|
|
|
|
@ -263,7 +263,7 @@ class _ReferPatientState extends State<ReferPatientScreen> {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
"Priority",
|
|
|
|
|
TranslationBase.of(context).priority,
|
|
|
|
|
fontSize: 18,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
marginLeft: 15,
|
|
|
|
@ -273,14 +273,15 @@ class _ReferPatientState extends State<ReferPatientScreen> {
|
|
|
|
|
priorityBar(context),
|
|
|
|
|
|
|
|
|
|
AppText(
|
|
|
|
|
"Replay Before: " + getPriority(),
|
|
|
|
|
TranslationBase.of(context).referralFrequency +
|
|
|
|
|
getPriority(),
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
marginLeft: 15,
|
|
|
|
|
marginTop: 15,
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
AppText(
|
|
|
|
|
"Referral Frequency",
|
|
|
|
|
TranslationBase.of(context).referralFrequency,
|
|
|
|
|
fontSize: 18,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
marginLeft: 15,
|
|
|
|
@ -338,7 +339,7 @@ class _ReferPatientState extends State<ReferPatientScreen> {
|
|
|
|
|
_selectedReferralFrequancy));
|
|
|
|
|
freqId = freqInfo['ParameterCode']
|
|
|
|
|
.toString();
|
|
|
|
|
myFocusNode.requestFocus();
|
|
|
|
|
myFocusNode.requestFocus();
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
items: patientsProv
|
|
|
|
@ -359,7 +360,7 @@ class _ReferPatientState extends State<ReferPatientScreen> {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
"Clinical Details and Remarks",
|
|
|
|
|
TranslationBase.of(context).clinicDetailsandRemarks,
|
|
|
|
|
fontSize: 18,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
marginLeft: 15,
|
|
|
|
@ -368,7 +369,7 @@ class _ReferPatientState extends State<ReferPatientScreen> {
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.all(10.0),
|
|
|
|
|
child: AppTextFormField(
|
|
|
|
|
hintText: "Remarks",
|
|
|
|
|
hintText: TranslationBase.of(context).remarks,
|
|
|
|
|
focusNode: myFocusNode,
|
|
|
|
|
controller: _remarksController,
|
|
|
|
|
inputFormatter: ONLY_LETTERS,
|
|
|
|
@ -381,7 +382,7 @@ class _ReferPatientState extends State<ReferPatientScreen> {
|
|
|
|
|
child: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
"Please fill all fields..!",
|
|
|
|
|
TranslationBase.of(context).pleaseFill,
|
|
|
|
|
color: Colors.red,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
margin: 10,
|
|
|
|
@ -389,7 +390,7 @@ class _ReferPatientState extends State<ReferPatientScreen> {
|
|
|
|
|
isValid == null ? false : !isValid,
|
|
|
|
|
),
|
|
|
|
|
AppButton(
|
|
|
|
|
title: "Send",
|
|
|
|
|
title: TranslationBase.of(context).send,
|
|
|
|
|
color: Color(PRIMARY_COLOR),
|
|
|
|
|
onPressed: () => {referToDoctor(context)},
|
|
|
|
|
)
|
|
|
|
@ -402,6 +403,11 @@ class _ReferPatientState extends State<ReferPatientScreen> {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Widget priorityBar(BuildContext _context) {
|
|
|
|
|
List<String> _priorities = [
|
|
|
|
|
TranslationBase.of(context).veryUrgent,
|
|
|
|
|
TranslationBase.of(context).urgent,
|
|
|
|
|
TranslationBase.of(context).routine,
|
|
|
|
|
];
|
|
|
|
|
return Container(
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.065,
|
|
|
|
|
width: SizeConfig.screenWidth * 0.9,
|
|
|
|
|