|
|
|
@ -124,10 +124,12 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
|
|
|
|
|
},
|
|
|
|
|
child: AppScaffold(
|
|
|
|
|
appBarTitle: TranslationBase.of(context).searchPatient,
|
|
|
|
|
isShowAppBar: false,
|
|
|
|
|
body: ListView(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
isShowAppBar: true,
|
|
|
|
|
body: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
RoundedContainer(
|
|
|
|
|
showBorder: false,
|
|
|
|
|
child: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Column(
|
|
|
|
@ -178,7 +180,8 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.all(Radius.circular(6.0)),
|
|
|
|
|
border: Border.all(
|
|
|
|
|
width: 1.0, color: HexColor("#CCCCCC"))),
|
|
|
|
|
width: 1.0,
|
|
|
|
|
color: HexColor("#CCCCCC"))),
|
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
|
child: AppTextFormField(
|
|
|
|
|
labelText: TranslationBase.of(context)
|
|
|
|
@ -191,16 +194,20 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
|
|
|
|
|
onSaved: (value) {
|
|
|
|
|
if (value != null && value != '') {
|
|
|
|
|
if (value.length == 10 &&
|
|
|
|
|
(value[0] == '2' || value[0] == '1')) {
|
|
|
|
|
(value[0] == '2' ||
|
|
|
|
|
value[0] == '1')) {
|
|
|
|
|
_patientSearchFormValues
|
|
|
|
|
.IdentificationNo = value;
|
|
|
|
|
_patientSearchFormValues.Searchtype = 2;
|
|
|
|
|
_patientSearchFormValues.setPatientID = 0;
|
|
|
|
|
_patientSearchFormValues.setPatientID =
|
|
|
|
|
0;
|
|
|
|
|
} else if ((value.length == 10 ||
|
|
|
|
|
value.length == 9) &&
|
|
|
|
|
((value[0] == '0' && value[1] == '5') ||
|
|
|
|
|
((value[0] == '0' &&
|
|
|
|
|
value[1] == '5') ||
|
|
|
|
|
value[0] == '5')) {
|
|
|
|
|
_patientSearchFormValues.MobileNo = value;
|
|
|
|
|
_patientSearchFormValues.MobileNo =
|
|
|
|
|
value;
|
|
|
|
|
_patientSearchFormValues.Searchtype = 0;
|
|
|
|
|
} else {
|
|
|
|
|
_patientSearchFormValues.setPatientID =
|
|
|
|
@ -273,17 +280,21 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
|
|
|
|
|
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),
|
|
|
|
|
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: DropdownButtonHideUnderline(
|
|
|
|
|
child:
|
|
|
|
|
DropdownButtonHideUnderline(
|
|
|
|
|
child: DropdownButton(
|
|
|
|
|
isExpanded: true,
|
|
|
|
|
value: _selectedType,
|
|
|
|
@ -297,7 +308,8 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
|
|
|
|
|
mainAxisSize:
|
|
|
|
|
MainAxisSize.max,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
!projectsProvider.isArabic
|
|
|
|
|
!projectsProvider
|
|
|
|
|
.isArabic
|
|
|
|
|
? AppText(
|
|
|
|
|
item['text'],
|
|
|
|
|
fontSize: SizeConfig
|
|
|
|
@ -314,15 +326,17 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
|
|
|
|
|
);
|
|
|
|
|
}).toList();
|
|
|
|
|
},
|
|
|
|
|
onChanged: (String newValue) => {
|
|
|
|
|
onChanged: (String newValue) =>
|
|
|
|
|
{
|
|
|
|
|
setState(() {
|
|
|
|
|
_selectedType = newValue;
|
|
|
|
|
selectedPatientType =
|
|
|
|
|
int.parse(_selectedType);
|
|
|
|
|
int.parse(
|
|
|
|
|
_selectedType);
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
items:
|
|
|
|
|
PATIENT_TYPE_Des.map((item) {
|
|
|
|
|
items: PATIENT_TYPE_Des.map(
|
|
|
|
|
(item) {
|
|
|
|
|
!projectsProvider.isArabic
|
|
|
|
|
? itemText = item['text']
|
|
|
|
|
: itemText =
|
|
|
|
@ -364,7 +378,10 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
|
|
|
|
|
.setFirstName = value;
|
|
|
|
|
|
|
|
|
|
if (value != null &&
|
|
|
|
|
value.toString().trim().isEmpty) {
|
|
|
|
|
value
|
|
|
|
|
.toString()
|
|
|
|
|
.trim()
|
|
|
|
|
.isEmpty) {
|
|
|
|
|
_patientSearchFormValues
|
|
|
|
|
.setFirstName = "0";
|
|
|
|
|
}
|
|
|
|
@ -397,13 +414,17 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
|
|
|
|
|
onSaved: (value) {
|
|
|
|
|
value == null || value == ''
|
|
|
|
|
? _patientSearchFormValues
|
|
|
|
|
.setPatientMobileNumber = "0"
|
|
|
|
|
.setPatientMobileNumber =
|
|
|
|
|
"0"
|
|
|
|
|
: _patientSearchFormValues
|
|
|
|
|
.setPatientMobileNumber =
|
|
|
|
|
value;
|
|
|
|
|
|
|
|
|
|
if (value != null &&
|
|
|
|
|
value.toString().trim().isEmpty) {
|
|
|
|
|
value
|
|
|
|
|
.toString()
|
|
|
|
|
.trim()
|
|
|
|
|
.isEmpty) {
|
|
|
|
|
_patientSearchFormValues
|
|
|
|
|
.setPatientMobileNumber = "0";
|
|
|
|
|
}
|
|
|
|
@ -432,7 +453,10 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
|
|
|
|
|
: _patientSearchFormValues
|
|
|
|
|
.setMiddleName = value;
|
|
|
|
|
if (value != null &&
|
|
|
|
|
value.toString().trim().isEmpty) {
|
|
|
|
|
value
|
|
|
|
|
.toString()
|
|
|
|
|
.trim()
|
|
|
|
|
.isEmpty) {
|
|
|
|
|
_patientSearchFormValues
|
|
|
|
|
.setMiddleName = "0";
|
|
|
|
|
}
|
|
|
|
@ -464,7 +488,10 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
|
|
|
|
|
: _patientSearchFormValues
|
|
|
|
|
.setLastName = value;
|
|
|
|
|
if (value != null &&
|
|
|
|
|
value.toString().trim().isEmpty) {
|
|
|
|
|
value
|
|
|
|
|
.toString()
|
|
|
|
|
.trim()
|
|
|
|
|
.isEmpty) {
|
|
|
|
|
_patientSearchFormValues
|
|
|
|
|
.setLastName = "0";
|
|
|
|
|
}
|
|
|
|
@ -497,7 +524,10 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
|
|
|
|
|
.setPatientID =
|
|
|
|
|
int.parse(value);
|
|
|
|
|
if (value != null &&
|
|
|
|
|
value.trim().toString().isEmpty) {
|
|
|
|
|
value
|
|
|
|
|
.trim()
|
|
|
|
|
.toString()
|
|
|
|
|
.isEmpty) {
|
|
|
|
|
_patientSearchFormValues
|
|
|
|
|
.setPatientID = 0;
|
|
|
|
|
}
|
|
|
|
@ -546,7 +576,8 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
|
|
|
|
|
Radius.circular(6.0)),
|
|
|
|
|
border: Border.all(
|
|
|
|
|
width: 1.0,
|
|
|
|
|
color: HexColor("#CCCCCC"))),
|
|
|
|
|
color:
|
|
|
|
|
HexColor("#CCCCCC"))),
|
|
|
|
|
height: 25,
|
|
|
|
|
width: 25,
|
|
|
|
|
child: Checkbox(
|
|
|
|
@ -566,14 +597,15 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.onlyArrivedPatient,
|
|
|
|
|
fontSize:
|
|
|
|
|
SizeConfig.textMultiplier * 2),
|
|
|
|
|
SizeConfig.textMultiplier *
|
|
|
|
|
2),
|
|
|
|
|
])),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
])
|
|
|
|
|
: SizedBox(
|
|
|
|
|
height: SizeConfig.screenHeight * .45,
|
|
|
|
|
height: 0,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
@ -602,8 +634,7 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
]),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|