|
|
|
@ -180,54 +180,73 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
|
|
|
|
|
width: 1.0, color: HexColor("#CCCCCC"))),
|
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
|
child: AppTextFormField(
|
|
|
|
|
labelText:
|
|
|
|
|
TranslationBase.of(context).patientID,
|
|
|
|
|
labelText: TranslationBase.of(context)
|
|
|
|
|
.patpatientIDMobilenationalientID,
|
|
|
|
|
borderColor: Colors.white,
|
|
|
|
|
textInputType: TextInputType.number,
|
|
|
|
|
textInputAction: TextInputAction.done,
|
|
|
|
|
inputFormatter: ONLY_NUMBERS,
|
|
|
|
|
focusNode: _nodeText1,
|
|
|
|
|
onSaved: (value) {
|
|
|
|
|
value == null || value == ''
|
|
|
|
|
? _patientSearchFormValues.setPatientID =
|
|
|
|
|
0
|
|
|
|
|
: _patientSearchFormValues.setPatientID =
|
|
|
|
|
if (value != null && value != '') {
|
|
|
|
|
if (value.length == 10 &&
|
|
|
|
|
(value[0] == '2' || value[0] == '1')) {
|
|
|
|
|
_patientSearchFormValues
|
|
|
|
|
.PatientIdentificationID = value;
|
|
|
|
|
} else if (value.length == 10 &&
|
|
|
|
|
(value[0] == '05' || value[0] == '5')) {
|
|
|
|
|
_patientSearchFormValues
|
|
|
|
|
.setPatientMobileNumber = value;
|
|
|
|
|
} else {
|
|
|
|
|
_patientSearchFormValues.setPatientID =
|
|
|
|
|
int.parse(value);
|
|
|
|
|
|
|
|
|
|
if (value != null &&
|
|
|
|
|
value.toString().trim().isEmpty) {
|
|
|
|
|
_patientSearchFormValues.setPatientID = 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// else{
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// value == null || value == ''
|
|
|
|
|
// ? _patientSearchFormValues.setPatientID =
|
|
|
|
|
// 0
|
|
|
|
|
// : _patientSearchFormValues.setPatientID =
|
|
|
|
|
// int.parse(value);
|
|
|
|
|
|
|
|
|
|
// if (value != null &&
|
|
|
|
|
// value.toString().trim().isEmpty) {
|
|
|
|
|
// _patientSearchFormValues.setPatientID = 0;
|
|
|
|
|
// }
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
|
|
|
children: [
|
|
|
|
|
InkWell(
|
|
|
|
|
child: this.isView == false
|
|
|
|
|
? AppText(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.searchWithOther,
|
|
|
|
|
color: Colors.red,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
)
|
|
|
|
|
: AppText(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.hideOtherCriteria,
|
|
|
|
|
color: Colors.red,
|
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
|
onTap: () {
|
|
|
|
|
setState(() {
|
|
|
|
|
this.isView = !this.isView;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
// Row(
|
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.end,
|
|
|
|
|
// children: [
|
|
|
|
|
// InkWell(
|
|
|
|
|
// child: this.isView == false
|
|
|
|
|
// ? AppText(
|
|
|
|
|
// TranslationBase.of(context)
|
|
|
|
|
// .searchWithOther,
|
|
|
|
|
// color: Colors.red,
|
|
|
|
|
// fontWeight: FontWeight.bold,
|
|
|
|
|
// )
|
|
|
|
|
// : AppText(
|
|
|
|
|
// TranslationBase.of(context)
|
|
|
|
|
// .hideOtherCriteria,
|
|
|
|
|
// color: Colors.red,
|
|
|
|
|
// fontWeight: FontWeight.bold),
|
|
|
|
|
// onTap: () {
|
|
|
|
|
// setState(() {
|
|
|
|
|
// this.isView = !this.isView;
|
|
|
|
|
// });
|
|
|
|
|
// },
|
|
|
|
|
// )
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
isView == true
|
|
|
|
|
? Column(children: [
|
|
|
|
|
SizedBox(
|
|
|
|
|