|
|
|
|
@ -76,324 +76,294 @@ class _ReferPatientState extends State<ReferPatientScreen> {
|
|
|
|
|
RoundedContainer(
|
|
|
|
|
margin: 10,
|
|
|
|
|
showBorder: true,
|
|
|
|
|
raduis: 10,
|
|
|
|
|
borderColor: Color(0xff707070),
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
|
top: SizeConfig.widthMultiplier * 0.9,
|
|
|
|
|
bottom: SizeConfig.widthMultiplier * 0.9,
|
|
|
|
|
right: SizeConfig.widthMultiplier * 3,
|
|
|
|
|
left: SizeConfig.widthMultiplier * 3),
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
// add Expanded to have your dropdown button fill remaining space
|
|
|
|
|
child: DropdownButton(
|
|
|
|
|
isExpanded: true,
|
|
|
|
|
value: _selectedClinic,
|
|
|
|
|
iconSize: 40,
|
|
|
|
|
elevation: 16,
|
|
|
|
|
selectedItemBuilder:
|
|
|
|
|
(BuildContext context) {
|
|
|
|
|
return model
|
|
|
|
|
.getClinicNameList()
|
|
|
|
|
.map((item) {
|
|
|
|
|
return Row(
|
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
item,
|
|
|
|
|
fontSize:
|
|
|
|
|
SizeConfig.textMultiplier *
|
|
|
|
|
2.1,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}).toList();
|
|
|
|
|
},
|
|
|
|
|
onChanged: (newValue) => {
|
|
|
|
|
setState(() {
|
|
|
|
|
_selectedDoctor = null;
|
|
|
|
|
_selectedClinic = newValue;
|
|
|
|
|
var clinicInfo = model
|
|
|
|
|
.clinicsList
|
|
|
|
|
.where((i) =>
|
|
|
|
|
i['ClinicDescription']
|
|
|
|
|
.toString()
|
|
|
|
|
.contains(
|
|
|
|
|
_selectedClinic))
|
|
|
|
|
.toList();
|
|
|
|
|
raduis: 10,
|
|
|
|
|
borderColor: Color(0xff707070),
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
|
top: SizeConfig.widthMultiplier * 0.9,
|
|
|
|
|
bottom: SizeConfig.widthMultiplier * 0.9,
|
|
|
|
|
right: SizeConfig.widthMultiplier * 3,
|
|
|
|
|
left: SizeConfig.widthMultiplier * 3),
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
// add Expanded to have your dropdown button fill remaining space
|
|
|
|
|
child: DropdownButton(
|
|
|
|
|
isExpanded: true,
|
|
|
|
|
value: _selectedClinic,
|
|
|
|
|
iconSize: 40,
|
|
|
|
|
elevation: 16,
|
|
|
|
|
selectedItemBuilder: (BuildContext context) {
|
|
|
|
|
return model.getClinicNameList().map((item) {
|
|
|
|
|
return Row(
|
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
item,
|
|
|
|
|
fontSize:
|
|
|
|
|
SizeConfig.textMultiplier * 2.1,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}).toList();
|
|
|
|
|
},
|
|
|
|
|
onChanged: (newValue) => {
|
|
|
|
|
setState(() {
|
|
|
|
|
_selectedDoctor = null;
|
|
|
|
|
_selectedClinic = newValue;
|
|
|
|
|
var clinicInfo = model.clinicsList
|
|
|
|
|
.where((i) => i['ClinicDescription']
|
|
|
|
|
.toString()
|
|
|
|
|
.contains(_selectedClinic))
|
|
|
|
|
.toList();
|
|
|
|
|
|
|
|
|
|
clinicId = clinicInfo[0]['ClinicID']
|
|
|
|
|
.toString();
|
|
|
|
|
clinicId =
|
|
|
|
|
clinicInfo[0]['ClinicID'].toString();
|
|
|
|
|
|
|
|
|
|
model.getDoctorsList(clinicId);
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
items: model
|
|
|
|
|
.getClinicNameList()
|
|
|
|
|
.map((item) {
|
|
|
|
|
return DropdownMenuItem(
|
|
|
|
|
value: item.toString(),
|
|
|
|
|
child: Text(
|
|
|
|
|
item,
|
|
|
|
|
textAlign: TextAlign.end,
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}).toList(),
|
|
|
|
|
model.getDoctorsList(clinicId);
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
items: model.getClinicNameList().map((item) {
|
|
|
|
|
return DropdownMenuItem(
|
|
|
|
|
value: item.toString(),
|
|
|
|
|
child: Text(
|
|
|
|
|
item,
|
|
|
|
|
textAlign: TextAlign.end,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}).toList(),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
//--------------------------------------------------------------------//
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).doctor,
|
|
|
|
|
fontSize: 18,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
marginLeft: 15,
|
|
|
|
|
marginTop: 15,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
//--------------------------------------------------------------------//
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).doctor,
|
|
|
|
|
fontSize: 18,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
marginLeft: 15,
|
|
|
|
|
marginTop: 15,
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
RoundedContainer(
|
|
|
|
|
margin: 10,
|
|
|
|
|
showBorder: true,
|
|
|
|
|
raduis: 10,
|
|
|
|
|
borderColor: Color(0xff707070),
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
|
top: SizeConfig.widthMultiplier * 0.9,
|
|
|
|
|
bottom: SizeConfig.widthMultiplier * 0.9,
|
|
|
|
|
right: SizeConfig.widthMultiplier * 3,
|
|
|
|
|
left: SizeConfig.widthMultiplier * 3),
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
// add Expanded to have your dropdown button fill remaining space
|
|
|
|
|
child: DropdownButton(
|
|
|
|
|
isExpanded: true,
|
|
|
|
|
value: _selectedDoctor,
|
|
|
|
|
iconSize: 40,
|
|
|
|
|
elevation: 16,
|
|
|
|
|
selectedItemBuilder:
|
|
|
|
|
(BuildContext context) {
|
|
|
|
|
return model
|
|
|
|
|
.getDoctorNameList()
|
|
|
|
|
.map((item) {
|
|
|
|
|
return Row(
|
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
item,
|
|
|
|
|
fontSize:
|
|
|
|
|
SizeConfig.textMultiplier *
|
|
|
|
|
2.1,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}).toList();
|
|
|
|
|
},
|
|
|
|
|
onChanged: (newValue) => {
|
|
|
|
|
setState(() {
|
|
|
|
|
_selectedDoctor = newValue;
|
|
|
|
|
doctorsList =
|
|
|
|
|
model.doctorsList;
|
|
|
|
|
RoundedContainer(
|
|
|
|
|
margin: 10,
|
|
|
|
|
showBorder: true,
|
|
|
|
|
raduis: 10,
|
|
|
|
|
borderColor: Color(0xff707070),
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
|
top: SizeConfig.widthMultiplier * 0.9,
|
|
|
|
|
bottom: SizeConfig.widthMultiplier * 0.9,
|
|
|
|
|
right: SizeConfig.widthMultiplier * 3,
|
|
|
|
|
left: SizeConfig.widthMultiplier * 3),
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
// add Expanded to have your dropdown button fill remaining space
|
|
|
|
|
child: DropdownButton(
|
|
|
|
|
isExpanded: true,
|
|
|
|
|
value: _selectedDoctor,
|
|
|
|
|
iconSize: 40,
|
|
|
|
|
elevation: 16,
|
|
|
|
|
selectedItemBuilder: (BuildContext context) {
|
|
|
|
|
return model.getDoctorNameList().map((item) {
|
|
|
|
|
return Row(
|
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
item,
|
|
|
|
|
fontSize:
|
|
|
|
|
SizeConfig.textMultiplier * 2.1,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}).toList();
|
|
|
|
|
},
|
|
|
|
|
onChanged: (newValue) => {
|
|
|
|
|
setState(() {
|
|
|
|
|
_selectedDoctor = newValue;
|
|
|
|
|
doctorsList = model.doctorsList;
|
|
|
|
|
|
|
|
|
|
var doctorInfo = doctorsList
|
|
|
|
|
.where((i) => i['DoctorName']
|
|
|
|
|
.toString()
|
|
|
|
|
.contains(_selectedDoctor))
|
|
|
|
|
.toList();
|
|
|
|
|
doctorId = doctorInfo[0]['DoctorID']
|
|
|
|
|
.toString();
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
items: model
|
|
|
|
|
.getDoctorNameList()
|
|
|
|
|
.map((item) {
|
|
|
|
|
return DropdownMenuItem(
|
|
|
|
|
value: item.toString(),
|
|
|
|
|
child: Text(
|
|
|
|
|
item,
|
|
|
|
|
textAlign: TextAlign.end,
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}).toList(),
|
|
|
|
|
var doctorInfo = doctorsList
|
|
|
|
|
.where((i) => i['DoctorName']
|
|
|
|
|
.toString()
|
|
|
|
|
.contains(_selectedDoctor))
|
|
|
|
|
.toList();
|
|
|
|
|
doctorId =
|
|
|
|
|
doctorInfo[0]['DoctorID'].toString();
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
items: model.getDoctorNameList().map((item) {
|
|
|
|
|
return DropdownMenuItem(
|
|
|
|
|
value: item.toString(),
|
|
|
|
|
child: Text(
|
|
|
|
|
item,
|
|
|
|
|
textAlign: TextAlign.end,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}).toList(),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
), //-----------------------------///
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).ext,
|
|
|
|
|
fontSize: 18,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
marginLeft: 15,
|
|
|
|
|
marginTop: 15,
|
|
|
|
|
),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.all(10.0),
|
|
|
|
|
child: AppTextFormField(
|
|
|
|
|
hintText: TranslationBase.of(context).ext,
|
|
|
|
|
controller: _extController,
|
|
|
|
|
inputFormatter: ONLY_NUMBERS,
|
|
|
|
|
textInputType: TextInputType.number,
|
|
|
|
|
onChanged: (value) => {},
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).priority,
|
|
|
|
|
fontSize: 18,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
marginLeft: 15,
|
|
|
|
|
marginTop: 15,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
), //-----------------------------///
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).ext,
|
|
|
|
|
fontSize: 18,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
marginLeft: 15,
|
|
|
|
|
marginTop: 15,
|
|
|
|
|
),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.all(10.0),
|
|
|
|
|
child: AppTextFormField(
|
|
|
|
|
hintText: TranslationBase.of(context).ext,
|
|
|
|
|
controller: _extController,
|
|
|
|
|
inputFormatter: ONLY_NUMBERS,
|
|
|
|
|
textInputType: TextInputType.number,
|
|
|
|
|
onChanged: (value) => {},
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).priority,
|
|
|
|
|
fontSize: 18,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
marginLeft: 15,
|
|
|
|
|
marginTop: 15,
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
priorityBar(context),
|
|
|
|
|
priorityBar(context),
|
|
|
|
|
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).referralFrequency +
|
|
|
|
|
getPriority(),
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
marginLeft: 15,
|
|
|
|
|
marginTop: 15,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).referralFrequency +
|
|
|
|
|
getPriority(),
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
marginLeft: 15,
|
|
|
|
|
marginTop: 15,
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).referralFrequency,
|
|
|
|
|
fontSize: 18,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
marginLeft: 15,
|
|
|
|
|
marginTop: 15,
|
|
|
|
|
),
|
|
|
|
|
RoundedContainer(
|
|
|
|
|
margin: 10,
|
|
|
|
|
showBorder: true,
|
|
|
|
|
raduis: 10,
|
|
|
|
|
borderColor: Color(0xff707070),
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
|
top: SizeConfig.widthMultiplier * 0.9,
|
|
|
|
|
bottom: SizeConfig.widthMultiplier * 0.9,
|
|
|
|
|
right: SizeConfig.widthMultiplier * 3,
|
|
|
|
|
left: SizeConfig.widthMultiplier * 3),
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
// add Expanded to have your dropdown button fill remaining space
|
|
|
|
|
child: DropdownButton(
|
|
|
|
|
isExpanded: true,
|
|
|
|
|
value: _selectedReferralFrequancy,
|
|
|
|
|
iconSize: 40,
|
|
|
|
|
elevation: 16,
|
|
|
|
|
selectedItemBuilder:
|
|
|
|
|
(BuildContext context) {
|
|
|
|
|
return model
|
|
|
|
|
.getReferralNamesList()
|
|
|
|
|
.map((item) {
|
|
|
|
|
return Row(
|
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
item,
|
|
|
|
|
fontSize:
|
|
|
|
|
SizeConfig.textMultiplier *
|
|
|
|
|
2.1,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}).toList();
|
|
|
|
|
},
|
|
|
|
|
onChanged: (newValue) => {
|
|
|
|
|
setState(() {
|
|
|
|
|
_selectedReferralFrequancy = newValue;
|
|
|
|
|
var freqInfo = model
|
|
|
|
|
.referalFrequancyList
|
|
|
|
|
.singleWhere((i) => i[
|
|
|
|
|
'Description']
|
|
|
|
|
.toString()
|
|
|
|
|
.contains(
|
|
|
|
|
_selectedReferralFrequancy));
|
|
|
|
|
freqId = freqInfo['ParameterCode']
|
|
|
|
|
.toString();
|
|
|
|
|
myFocusNode.requestFocus();
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
items: model
|
|
|
|
|
.getReferralNamesList()
|
|
|
|
|
.map((item) {
|
|
|
|
|
return DropdownMenuItem(
|
|
|
|
|
value: item.toString(),
|
|
|
|
|
child: Text(
|
|
|
|
|
item,
|
|
|
|
|
textAlign: TextAlign.end,
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}).toList(),
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).referralFrequency,
|
|
|
|
|
fontSize: 18,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
marginLeft: 15,
|
|
|
|
|
marginTop: 15,
|
|
|
|
|
),
|
|
|
|
|
RoundedContainer(
|
|
|
|
|
margin: 10,
|
|
|
|
|
showBorder: true,
|
|
|
|
|
raduis: 10,
|
|
|
|
|
borderColor: Color(0xff707070),
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
|
top: SizeConfig.widthMultiplier * 0.9,
|
|
|
|
|
bottom: SizeConfig.widthMultiplier * 0.9,
|
|
|
|
|
right: SizeConfig.widthMultiplier * 3,
|
|
|
|
|
left: SizeConfig.widthMultiplier * 3),
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
// add Expanded to have your dropdown button fill remaining space
|
|
|
|
|
child: DropdownButton(
|
|
|
|
|
isExpanded: true,
|
|
|
|
|
value: _selectedReferralFrequancy,
|
|
|
|
|
iconSize: 40,
|
|
|
|
|
elevation: 16,
|
|
|
|
|
selectedItemBuilder: (BuildContext context) {
|
|
|
|
|
return model
|
|
|
|
|
.getReferralNamesList()
|
|
|
|
|
.map((item) {
|
|
|
|
|
return Row(
|
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
item,
|
|
|
|
|
fontSize:
|
|
|
|
|
SizeConfig.textMultiplier * 2.1,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}).toList();
|
|
|
|
|
},
|
|
|
|
|
onChanged: (newValue) => {
|
|
|
|
|
setState(() {
|
|
|
|
|
_selectedReferralFrequancy = newValue;
|
|
|
|
|
var freqInfo = model.referalFrequancyList
|
|
|
|
|
.singleWhere((i) => i['Description']
|
|
|
|
|
.toString()
|
|
|
|
|
.contains(
|
|
|
|
|
_selectedReferralFrequancy));
|
|
|
|
|
freqId =
|
|
|
|
|
freqInfo['ParameterCode'].toString();
|
|
|
|
|
myFocusNode.requestFocus();
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
items: model.getReferralNamesList().map((item) {
|
|
|
|
|
return DropdownMenuItem(
|
|
|
|
|
value: item.toString(),
|
|
|
|
|
child: Text(
|
|
|
|
|
item,
|
|
|
|
|
textAlign: TextAlign.end,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}).toList(),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).clinicDetailsandRemarks,
|
|
|
|
|
fontSize: 18,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
marginLeft: 15,
|
|
|
|
|
marginTop: 15,
|
|
|
|
|
),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.all(10.0),
|
|
|
|
|
child: AppTextFormField(
|
|
|
|
|
hintText: TranslationBase.of(context).remarks,
|
|
|
|
|
focusNode: myFocusNode,
|
|
|
|
|
controller: _remarksController,
|
|
|
|
|
inputFormatter: ONLY_LETTERS,
|
|
|
|
|
textInputType: TextInputType.text,
|
|
|
|
|
onChanged: (value) => {},
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).clinicDetailsandRemarks,
|
|
|
|
|
fontSize: 18,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
marginLeft: 15,
|
|
|
|
|
marginTop: 15,
|
|
|
|
|
),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.all(10.0),
|
|
|
|
|
child: AppTextFormField(
|
|
|
|
|
hintText: TranslationBase.of(context).remarks,
|
|
|
|
|
focusNode: myFocusNode,
|
|
|
|
|
controller: _remarksController,
|
|
|
|
|
inputFormatter: ONLY_LETTERS,
|
|
|
|
|
textInputType: TextInputType.text,
|
|
|
|
|
onChanged: (value) => {},
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.all(20.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).pleaseFill,
|
|
|
|
|
color: Colors.red,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
margin: 10,
|
|
|
|
|
visibility: isValid == null ? false : !isValid,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.all(20.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).pleaseFill,
|
|
|
|
|
color: Colors.red,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
margin: 10,
|
|
|
|
|
visibility:
|
|
|
|
|
isValid == null ? false : !isValid,
|
|
|
|
|
),
|
|
|
|
|
// TODO replace AppButton with secondary button and add loading
|
|
|
|
|
AppButton(
|
|
|
|
|
title: TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.send,
|
|
|
|
|
color: Color(PRIMARY_COLOR),
|
|
|
|
|
onPressed: () =>
|
|
|
|
|
{
|
|
|
|
|
referToDoctor(context, model)
|
|
|
|
|
},
|
|
|
|
|
title: TranslationBase.of(context).send,
|
|
|
|
|
color: (Hexcolor("#B8382B")),
|
|
|
|
|
onPressed: () => {referToDoctor(context)},
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
))
|
|
|
|
|
],
|
|
|
|
|
// TODO replace AppButton with secondary button and add loading
|
|
|
|
|
AppButton(
|
|
|
|
|
title: TranslationBase.of(context).send,
|
|
|
|
|
color: Color(PRIMARY_COLOR),
|
|
|
|
|
onPressed: () => {referToDoctor(context, model)},
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
))
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),);
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Widget priorityBar(BuildContext _context) {
|
|
|
|
|
@ -436,30 +406,29 @@ class _ReferPatientState extends State<ReferPatientScreen> {
|
|
|
|
|
// ? Hexcolor("#B8382B")
|
|
|
|
|
// : Colors.white,//sideColor,
|
|
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
)),
|
|
|
|
|
),
|
|
|
|
|
onTap: () {
|
|
|
|
|
print(_priorities.indexOf(item));
|
|
|
|
|
setState(() {
|
|
|
|
|
_activePriority = _priorities.indexOf(item);
|
|
|
|
|
});
|
|
|
|
|
}),
|
|
|
|
|
_isActive
|
|
|
|
|
? Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
|
|
color: Colors.white),
|
|
|
|
|
alignment: Alignment.center,
|
|
|
|
|
height: 3,
|
|
|
|
|
width: 90,
|
|
|
|
|
)
|
|
|
|
|
: Container()
|
|
|
|
|
]);
|
|
|
|
|
}).toList(),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)),
|
|
|
|
|
),
|
|
|
|
|
onTap: () {
|
|
|
|
|
print(_priorities.indexOf(item));
|
|
|
|
|
setState(() {
|
|
|
|
|
_activePriority = _priorities.indexOf(item);
|
|
|
|
|
});
|
|
|
|
|
}),
|
|
|
|
|
_isActive
|
|
|
|
|
? Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
|
|
color: Colors.white),
|
|
|
|
|
alignment: Alignment.center,
|
|
|
|
|
height: 3,
|
|
|
|
|
width: 90,
|
|
|
|
|
)
|
|
|
|
|
: Container()
|
|
|
|
|
]);
|
|
|
|
|
}).toList(),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
@ -488,10 +457,7 @@ class _ReferPatientState extends State<ReferPatientScreen> {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
final routeArgs = ModalRoute
|
|
|
|
|
.of(context)
|
|
|
|
|
.settings
|
|
|
|
|
.arguments as Map;
|
|
|
|
|
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
|
|
|
|
|
PatiantInformtion patient = routeArgs['patient'];
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
@ -508,8 +474,7 @@ class _ReferPatientState extends State<ReferPatientScreen> {
|
|
|
|
|
selectedDoctorID: doctorId.toString(),
|
|
|
|
|
projectID: patient.projectId);
|
|
|
|
|
// TODO: Add Translation
|
|
|
|
|
DrAppToastMsg.showSuccesToast(
|
|
|
|
|
'Reply Successfully');
|
|
|
|
|
DrAppToastMsg.showSuccesToast('Reply Successfully');
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
} catch (e) {
|
|
|
|
|
DrAppToastMsg.showErrorToast(e);
|
|
|
|
|
|