diff --git a/lib/core/service/patient_service.dart b/lib/core/service/patient_service.dart index 4f190ff8..477d9d80 100644 --- a/lib/core/service/patient_service.dart +++ b/lib/core/service/patient_service.dart @@ -129,6 +129,8 @@ class PatientService extends BaseService { "SessionID": patient.SessionID, "IsLoginForDoctorApp": patient.IsLoginForDoctorApp, "PatientOutSA": patient.PatientOutSA, + "SearchType": patient.Searchtype, + "MobileNo": '' }, ); diff --git a/lib/models/patient/patiant_info_model.dart b/lib/models/patient/patiant_info_model.dart index 205cfb0a..8c279f7c 100644 --- a/lib/models/patient/patiant_info_model.dart +++ b/lib/models/patient/patiant_info_model.dart @@ -3,7 +3,7 @@ class PatiantInformtion { final List list; int genderInt; - String age; + dynamic age; String appointmentDate; int appointmentNo; String appointmentType; diff --git a/lib/screens/patients/patient_search_screen.dart b/lib/screens/patients/patient_search_screen.dart index d1a8cd22..3fc538ff 100644 --- a/lib/screens/patients/patient_search_screen.dart +++ b/lib/screens/patients/patient_search_screen.dart @@ -443,38 +443,6 @@ class _PatientSearchScreenState extends State { }, inputFormatter: ONLY_LETTERS), ), - // SizedBox( - // height: 10, - // ), - // Container( - // decoration: BoxDecoration( - // borderRadius: BorderRadius.all( - // Radius.circular(6.0)), - // border: Border.all( - // width: 1.0, - // color: HexColor("#CCCCCC"))), - // padding: EdgeInsets.all(10), - // child: AppTextFormField( - // labelText: TranslationBase.of(context) - // .patientID, - // borderColor: Colors.white, - // textInputType: TextInputType.number, - // inputFormatter: ONLY_NUMBERS, - // focusNode: _nodeText2, - // onSaved: (value) { - // value == null || value == '' - // ? _patientSearchFormValues - // .setPatientID = 0 - // : _patientSearchFormValues - // .setPatientID = - // int.parse(value); - // if (value != null && - // value.trim().toString().isEmpty) { - // _patientSearchFormValues - // .setPatientID = 0; - // } - // }), - // ), SizedBox( height: 10, ), @@ -487,23 +455,55 @@ class _PatientSearchScreenState extends State { color: HexColor("#CCCCCC"))), padding: EdgeInsets.all(10), child: AppTextFormField( - labelText: TranslationBase.of(context) - .patientFile, - borderColor: Colors.white, - textInputType: TextInputType.number, - focusNode: _nodeText3, - inputFormatter: ONLY_NUMBERS, - onSaved: (value) {}, - ), + labelText: TranslationBase.of(context) + .patientID, + borderColor: Colors.white, + textInputType: TextInputType.number, + inputFormatter: ONLY_NUMBERS, + focusNode: _nodeText2, + onSaved: (value) { + value == null || value == '' + ? _patientSearchFormValues + .setPatientID = 0 + : _patientSearchFormValues + .setPatientID = + int.parse(value); + if (value != null && + value.trim().toString().isEmpty) { + _patientSearchFormValues + .setPatientID = 0; + } + }), ), - (!(_selectedType == '2' || - _selectedType == '4')) - ? DynamicElements( - _patientSearchFormValues, - isFormSubmitted) - : SizedBox( - height: 0, - ), + SizedBox( + height: 10, + ), + // Container( + // decoration: BoxDecoration( + // borderRadius: BorderRadius.all( + // Radius.circular(6.0)), + // border: Border.all( + // width: 1.0, + // color: HexColor("#CCCCCC"))), + // padding: EdgeInsets.all(10), + // child: AppTextFormField( + // labelText: TranslationBase.of(context) + // .patientFile, + // borderColor: Colors.white, + // textInputType: TextInputType.number, + // focusNode: _nodeText3, + // inputFormatter: ONLY_NUMBERS, + // onSaved: (value) {}, + // ), + // ), + // (!(_selectedType == '2' || + // _selectedType == '4')) + // ? DynamicElements( + // _patientSearchFormValues, + // isFormSubmitted) + // : SizedBox( + // height: 0, + // ), SizedBox( height: 10, ), diff --git a/lib/screens/patients/patients_screen.dart b/lib/screens/patients/patients_screen.dart index 56935a8e..4803c039 100644 --- a/lib/screens/patients/patients_screen.dart +++ b/lib/screens/patients/patients_screen.dart @@ -295,8 +295,9 @@ class _PatientsScreenState extends State { } else { if (isView == false && val2 == 1) { lItems = res['GetPatientFileInformation_PRMList']; + } else { + lItems = res[SERVICES_PATIANT2[val2]]; } - lItems = res[SERVICES_PATIANT2[val2]]; } parsed = lItems; responseModelList = new ModelResponse.fromJson(parsed).list;