Merge branch 'sultan' into 'development'

Sultan

See merge request Cloud_Solution/doctor_app_flutter!587
merge-requests/589/merge
Mohammad Aljammal 4 years ago
commit d18ca12aac

Binary file not shown.

@ -129,7 +129,7 @@ const GET_SICKLEAVE_STATISTIC =
const ARRIVED_PATIENT_URL =
'Services/DoctorApplication.svc/REST/PatientArrivalList';
const ADD_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/PostSickLeave';
const GET_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/GetAllSickLeaves';
const GET_SICK_LEAVE = 'Services/Patients.svc/REST/GetPatientSickLeave';
const EXTEND_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/ExtendSickLeave';
const GET_OFFTIME = 'Services/DoctorApplication.svc/REST/GetMasterLookUpList';
@ -238,10 +238,13 @@ const GET_BOX_QUANTITY =
///GET ECG
const GET_ECG = "Services/Patients.svc/REST/HIS_GetPatientMuseResults";
const GET_MY_REFERRAL_INPATIENT = "Services/DoctorApplication.svc/REST/GtMyReferralPatient";
const GET_MY_REFERRAL_INPATIENT =
"Services/DoctorApplication.svc/REST/GtMyReferralPatient";
const GET_MY_DISCHARGE_PATIENT = "Services/DoctorApplication.svc/REST/GtMyDischargeReferralPatient";
const GET_DISCHARGE_PATIENT = "Services/DoctorApplication.svc/REST/GtMyDischargePatient";
const GET_MY_DISCHARGE_PATIENT =
"Services/DoctorApplication.svc/REST/GtMyDischargeReferralPatient";
const GET_DISCHARGE_PATIENT =
"Services/DoctorApplication.svc/REST/GtMyDischargePatient";
const GET_PAtIENTS_INSURANCE_APPROVALS =
"Services/Patients.svc/REST/GetApprovalStatus";

@ -32,7 +32,7 @@ const Map<String, Map<String, String>> localizedValues = {
'outPatients': {'en': 'Out Patient', 'ar': 'المريض الخارجي'},
'myOutPatient': {'en': 'My OutPatients', 'ar': 'المريض الخارجي'},
'searchPatient': {'en': 'Search Patient', 'ar': 'البحث عن مريض'},
'searchPatient': {'en': 'Search Patients', 'ar': 'البحث عن مريض'},
'searchAbout': {'en': 'Search', 'ar': 'البحث عن'},
'patient': {'en': 'Patient', 'ar': ' مريض'},
'patients': {'en': "Patient's", 'ar': ' مريض'},
@ -50,7 +50,7 @@ const Map<String, Map<String, String>> localizedValues = {
'inPatient': {'en': 'My InPatients', 'ar': 'المريض الداخلي'},
'operations': {'en': 'Operations', 'ar': 'عمليات'},
'patientServices': {'en': 'Patient Services', 'ar': 'خدمات المرضى'},
'searchMedicine': {'en': 'Search Medicine', 'ar': 'بحث عن الدواء'},
'searchMedicine': {'en': 'Search Medicines', 'ar': 'بحث عن الدواء'},
'myReferralPatient': {'en': 'My Referral Patient', 'ar': 'مرضى الاحالة'},
'referPatient': {'en': 'Referral Patient', 'ar': 'إحالة مريض'},
'myReferral': {'en': 'My Referral', 'ar': 'إحالة'},

File diff suppressed because one or more lines are too long

@ -131,7 +131,8 @@ class DoctorApp {
IconData(0xe833, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData edit =
IconData(0xe834, fontFamily: _kFontFam, fontPackage: _kFontPkg);
// static const IconData lab_results = IconData(0xe835, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData lab_results2 =
IconData(0xe835, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData leaves =
IconData(0xe836, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData logout =
@ -260,8 +261,6 @@ class DoctorApp {
IconData(0xe874, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData ovrweight_bmi_1 =
IconData(0xe875, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData powered_by_cs_1 =
IconData(0xe876, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData qr_code_3 =
IconData(0xe877, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData reschedule__1 =
@ -360,8 +359,6 @@ class DoctorApp {
IconData(0xe8a6, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData obese_bmi_r_1 =
IconData(0xe8a9, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData menu =
IconData(0xe8ad, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData inpatient =
IconData(0xe959, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData discharge =
@ -378,4 +375,10 @@ class DoctorApp {
IconData(0xe95f, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData speechtotext =
IconData(0xe960, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData search_medicines =
IconData(0xe964, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData discharge_patients =
IconData(0xe965, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData referral_discharge =
IconData(0xe966, fontFamily: _kFontFam, fontPackage: _kFontPkg);
}

@ -60,6 +60,4 @@ class HomePageCard extends StatelessWidget {
),
);
}
getDashboardWidget() {}
}

@ -12,9 +12,11 @@ import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/models/doctor/profile_req_Model.dart';
import 'package:doctor_app_flutter/models/patient/patient_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/medicine/medicine_search_screen.dart';
import 'package:doctor_app_flutter/screens/medicine/search_medicine_patient_screen.dart';
import 'package:doctor_app_flutter/screens/patients/DischargedPatientPage.dart';
import 'package:doctor_app_flutter/screens/patients/ReferralDischargedPatientPage.dart';
import 'package:doctor_app_flutter/screens/patients/patient_search_screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/referral/patient_referral_screen.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
@ -457,7 +459,6 @@ class _HomeScreenState extends State<HomeScreen> {
SizedBox(
height: 10,
),
new Container(
height: 130,
child: new ListView(
@ -546,13 +547,13 @@ class _HomeScreenState extends State<HomeScreen> {
},
),
HomePageCard(
color: Colors.red[800],
color: Colors.black,
margin: EdgeInsets.all(5),
child: Column(
mainAxisAlignment:
MainAxisAlignment.center,
MainAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.start,
CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding: EdgeInsets.only(
@ -586,27 +587,27 @@ class _HomeScreenState extends State<HomeScreen> {
},
),
HomePageCard(
color: Colors.grey[300],
color: Colors.red[800],
margin: EdgeInsets.all(5),
child: Column(
mainAxisAlignment:
MainAxisAlignment.center,
MainAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.start,
CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding: EdgeInsets.only(
top: 10, left: 10, right: 0),
child: Icon(
DoctorApp.referral_1,
DoctorApp.discharge_patients,
size: 35,
color: Colors.black,
color: Colors.white,
)),
Container(
padding: EdgeInsets.all(10),
child: AppText(
'Discharged Patients',
color: Colors.black,
color: Colors.white,
textAlign: TextAlign.start,
fontSize: 15,
))
@ -625,27 +626,27 @@ class _HomeScreenState extends State<HomeScreen> {
},
),
HomePageCard(
color: Colors.red[800],
color: Colors.grey[300],
margin: EdgeInsets.all(5),
child: Column(
mainAxisAlignment:
MainAxisAlignment.center,
MainAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.start,
CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding: EdgeInsets.only(
top: 10, left: 10, right: 0),
child: Icon(
DoctorApp.referral_1,
DoctorApp.referral_discharge,
size: 35,
color: Colors.white,
color: Colors.black,
)),
Container(
padding: EdgeInsets.all(10),
child: AppText(
'Referral Discharged',
color: Colors.white,
color: Colors.black,
textAlign: TextAlign.start,
fontSize: 15,
))
@ -684,7 +685,7 @@ class _HomeScreenState extends State<HomeScreen> {
padding: EdgeInsets.all(10),
child: AppText(
TranslationBase.of(context)
.searchmedicinepatient,
.searchPatient,
color: Colors.white,
textAlign: TextAlign.start,
fontSize: 13,
@ -697,13 +698,49 @@ class _HomeScreenState extends State<HomeScreen> {
context,
MaterialPageRoute(
builder: (context) =>
SearchMedicinePatientScreen(),
PatientSearchScreen(),
));
},
),
HomePageCard(
color: Colors.red[800],
margin: EdgeInsets.all(5),
child: Column(
mainAxisAlignment:
MainAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding: EdgeInsets.only(
top: 10, left: 10, right: 0),
child: Icon(
DoctorApp.search_medicines,
size: 32,
color: Colors.white,
)),
Container(
padding: EdgeInsets.all(10),
child: AppText(
TranslationBase.of(context)
.searchMedicine,
color: Colors.white,
textAlign: TextAlign.start,
fontSize: 13,
))
],
),
hasBorder: false,
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
MedicineSearchScreen(),
));
},
)
])),
Row(
// mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,

@ -122,7 +122,7 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
myController.text = model.searchText;
return AppScaffold(
// baseViewModel: model,
isShowAppBar: false,
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).searchMedicine,
body: SingleChildScrollView(
child: FractionallySizedBox(
@ -134,7 +134,7 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
SizedBox(
height: SizeConfig.screenHeight * .16,
height: 20,
),
FractionallySizedBox(
widthFactor: 0.9,
@ -157,6 +157,9 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
),
),
),
SizedBox(
height: 20,
),
FractionallySizedBox(
widthFactor: 0.9,
child: Container(
@ -197,7 +200,7 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
),
if (myController.text != '')
Container(
height: MediaQuery.of(context).size.height * 0.5,
height: MediaQuery.of(context).size.height * 0.6,
child: ListView.builder(
padding: const EdgeInsets.only(top: 20),

@ -124,260 +124,240 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
},
child: AppScaffold(
appBarTitle: TranslationBase.of(context).searchPatient,
isShowAppBar: false,
body: ListView(
children: <Widget>[
RoundedContainer(
child: Column(
children: <Widget>[
Column(
children: <Widget>[
// Container(
// child: Icon(
// DoctorApp.search_patient_1,
// size: 100,
// color: Colors.black,
// ),
// margin: EdgeInsets.only(top: 10),
// ),
// Padding(
// padding: const EdgeInsets.only(top: 12.0),
// child: AppText(
// TranslationBase.of(context)
// .searchPatientImageCaptionTitle
// .toUpperCase(),
// fontWeight: FontWeight.bold,
// fontSize: SizeConfig.heightMultiplier * 2.5,
// ),
// ),
// Padding(
// padding: const EdgeInsets.only(top: 5.0),
// child: AppText(
// TranslationBase.of(context)
// .searchPatientImageCaptionBody,
// fontSize: SizeConfig.heightMultiplier * 2,
// ),
// )
],
),
Container(
padding: EdgeInsets.all(15),
width: SizeConfig.screenWidth * 1,
child: Form(
key: _formKey,
autovalidate: _autoValidate,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 15,
),
if (_selectedType != '7')
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)
.patpatientIDMobilenationalientID,
borderColor: Colors.white,
textInputType: TextInputType.number,
textInputAction: TextInputAction.done,
inputFormatter: ONLY_NUMBERS,
focusNode: _nodeText1,
onSaved: (value) {
if (value != null && value != '') {
if (value.length == 10 &&
(value[0] == '2' || value[0] == '1')) {
_patientSearchFormValues
.IdentificationNo = value;
_patientSearchFormValues.Searchtype = 2;
_patientSearchFormValues.setPatientID = 0;
} else if ((value.length == 10 ||
value.length == 9) &&
((value[0] == '0' && value[1] == '5') ||
value[0] == '5')) {
_patientSearchFormValues.MobileNo = value;
_patientSearchFormValues.Searchtype = 0;
} else {
_patientSearchFormValues.setPatientID =
int.parse(value);
_patientSearchFormValues.Searchtype = 1;
isShowAppBar: true,
body: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
RoundedContainer(
showBorder: false,
child: Column(
children: <Widget>[
Column(
children: <Widget>[
// Container(
// child: Icon(
// DoctorApp.search_patient_1,
// size: 100,
// color: Colors.black,
// ),
// margin: EdgeInsets.only(top: 10),
// ),
// Padding(
// padding: const EdgeInsets.only(top: 12.0),
// child: AppText(
// TranslationBase.of(context)
// .searchPatientImageCaptionTitle
// .toUpperCase(),
// fontWeight: FontWeight.bold,
// fontSize: SizeConfig.heightMultiplier * 2.5,
// ),
// ),
// Padding(
// padding: const EdgeInsets.only(top: 5.0),
// child: AppText(
// TranslationBase.of(context)
// .searchPatientImageCaptionBody,
// fontSize: SizeConfig.heightMultiplier * 2,
// ),
// )
],
),
Container(
padding: EdgeInsets.all(15),
width: SizeConfig.screenWidth * 1,
child: Form(
key: _formKey,
autovalidate: _autoValidate,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 15,
),
if (_selectedType != '7')
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)
.patpatientIDMobilenationalientID,
borderColor: Colors.white,
textInputType: TextInputType.number,
textInputAction: TextInputAction.done,
inputFormatter: ONLY_NUMBERS,
focusNode: _nodeText1,
onSaved: (value) {
if (value != null && value != '') {
if (value.length == 10 &&
(value[0] == '2' ||
value[0] == '1')) {
_patientSearchFormValues
.IdentificationNo = value;
_patientSearchFormValues.Searchtype = 2;
_patientSearchFormValues.setPatientID =
0;
} else if ((value.length == 10 ||
value.length == 9) &&
((value[0] == '0' &&
value[1] == '5') ||
value[0] == '5')) {
_patientSearchFormValues.MobileNo =
value;
_patientSearchFormValues.Searchtype = 0;
} else {
_patientSearchFormValues.setPatientID =
int.parse(value);
_patientSearchFormValues.Searchtype = 1;
}
}
}
// else{
// else{
// }
// }
// value == null || value == ''
// ? _patientSearchFormValues.setPatientID =
// 0
// : _patientSearchFormValues.setPatientID =
// int.parse(value);
// value == null || value == ''
// ? _patientSearchFormValues.setPatientID =
// 0
// : _patientSearchFormValues.setPatientID =
// int.parse(value);
// if (value != null &&
// value.toString().trim().isEmpty) {
// _patientSearchFormValues.setPatientID = 0;
// }
},
// if (value != null &&
// value.toString().trim().isEmpty) {
// _patientSearchFormValues.setPatientID = 0;
// }
},
),
),
SizedBox(
height: 10,
),
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;
// });
// },
// )
// ],
// ),
isView == true
? Column(children: [
SizedBox(
height: 10,
),
Container(
height: 65.0,
decoration: ShapeDecoration(
shape: RoundedRectangleBorder(
side: BorderSide(
width: 1.0,
style: BorderStyle.solid,
color: HexColor("#CCCCCC")),
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
),
// 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(
height: 10,
),
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: DropdownButtonHideUnderline(
child: DropdownButton(
isExpanded: true,
value: _selectedType,
iconSize: 25,
elevation: 16,
selectedItemBuilder:
(BuildContext context) {
return PATIENT_TYPE_Des.map(
Container(
height: 65.0,
decoration: ShapeDecoration(
shape: RoundedRectangleBorder(
side: BorderSide(
width: 1.0,
style: BorderStyle.solid,
color: HexColor("#CCCCCC")),
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
),
),
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:
DropdownButtonHideUnderline(
child: DropdownButton(
isExpanded: true,
value: _selectedType,
iconSize: 25,
elevation: 16,
selectedItemBuilder:
(BuildContext context) {
return PATIENT_TYPE_Des.map(
(item) {
return Row(
mainAxisSize:
MainAxisSize.max,
children: <Widget>[
!projectsProvider
.isArabic
? AppText(
item['text'],
fontSize: SizeConfig
.textMultiplier *
2.1,
)
: AppText(
item['text_ar'],
fontSize: SizeConfig
.textMultiplier *
2.1,
),
],
);
}).toList();
},
onChanged: (String newValue) =>
{
setState(() {
_selectedType = newValue;
selectedPatientType =
int.parse(
_selectedType);
})
},
items: PATIENT_TYPE_Des.map(
(item) {
return Row(
mainAxisSize:
MainAxisSize.max,
children: <Widget>[
!projectsProvider.isArabic
? AppText(
item['text'],
fontSize: SizeConfig
.textMultiplier *
2.1,
)
: AppText(
item['text_ar'],
fontSize: SizeConfig
.textMultiplier *
2.1,
),
],
!projectsProvider.isArabic
? itemText = item['text']
: itemText =
item['text_ar'];
return DropdownMenuItem(
child: Text(
itemText,
textAlign: TextAlign.end,
),
value: item['val'],
);
}).toList();
},
onChanged: (String newValue) => {
setState(() {
_selectedType = newValue;
selectedPatientType =
int.parse(_selectedType);
})
},
items:
PATIENT_TYPE_Des.map((item) {
!projectsProvider.isArabic
? itemText = item['text']
: itemText =
item['text_ar'];
return DropdownMenuItem(
child: Text(
itemText,
textAlign: TextAlign.end,
),
value: item['val'],
);
}).toList(),
)),
),
],
}).toList(),
)),
),
],
),
),
),
),
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)
.firstName,
borderColor: Colors.white,
onSaved: (value) {
value == null || value == ''
? _patientSearchFormValues
.setFirstName = "0"
: _patientSearchFormValues
.setFirstName = value;
if (value != null &&
value.toString().trim().isEmpty) {
_patientSearchFormValues
.setFirstName = "0";
}
},
// validator: (value) {
// return TextValidator().validateName(value);
// },
inputFormatter: ONLY_LETTERS),
),
SizedBox(
height: 10,
),
if (_selectedType != '7')
SizedBox(
height: 10,
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
@ -387,223 +367,274 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(10),
child: AppTextFormField(
labelText: TranslationBase.of(context)
.phoneNumber,
borderColor: Colors.white,
textInputType: TextInputType.number,
textInputAction: TextInputAction.done,
inputFormatter: ONLY_NUMBERS,
focusNode: _nodeText1,
onSaved: (value) {
value == null || value == ''
? _patientSearchFormValues
.setPatientMobileNumber = "0"
: _patientSearchFormValues
.setPatientMobileNumber =
value;
labelText: TranslationBase.of(context)
.firstName,
borderColor: Colors.white,
onSaved: (value) {
value == null || value == ''
? _patientSearchFormValues
.setFirstName = "0"
: _patientSearchFormValues
.setFirstName = value;
if (value != null &&
value
.toString()
.trim()
.isEmpty) {
_patientSearchFormValues
.setFirstName = "0";
}
},
// validator: (value) {
// return TextValidator().validateName(value);
// },
inputFormatter: ONLY_LETTERS),
),
SizedBox(
height: 10,
),
if (_selectedType != '7')
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)
.phoneNumber,
borderColor: Colors.white,
textInputType: TextInputType.number,
textInputAction: TextInputAction.done,
inputFormatter: ONLY_NUMBERS,
focusNode: _nodeText1,
onSaved: (value) {
value == null || value == ''
? _patientSearchFormValues
.setPatientMobileNumber =
"0"
: _patientSearchFormValues
.setPatientMobileNumber =
value;
if (value != null &&
value.toString().trim().isEmpty) {
_patientSearchFormValues
.setPatientMobileNumber = "0";
}
},
if (value != null &&
value
.toString()
.trim()
.isEmpty) {
_patientSearchFormValues
.setPatientMobileNumber = "0";
}
},
),
),
SizedBox(
height: 10,
),
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)
.middleName,
borderColor: Colors.white,
onSaved: (value) {
value == null || value == ''
? _patientSearchFormValues
.setMiddleName = "0"
: _patientSearchFormValues
.setMiddleName = value;
if (value != null &&
value.toString().trim().isEmpty) {
_patientSearchFormValues
.setMiddleName = "0";
}
},
// validator: (value) {
// return TextValidator().validateName(value);
// },
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)
.lastName,
borderColor: Colors.white,
onSaved: (value) {
value == null || value == ''
? _patientSearchFormValues
.setLastName = "0"
: _patientSearchFormValues
.setLastName = value;
if (value != null &&
value.toString().trim().isEmpty) {
_patientSearchFormValues
.setLastName = "0";
}
},
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(
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)
.middleName,
borderColor: Colors.white,
onSaved: (value) {
value == null || value == ''
? _patientSearchFormValues
.setMiddleName = "0"
: _patientSearchFormValues
.setMiddleName = value;
if (value != null &&
value
.toString()
.trim()
.isEmpty) {
_patientSearchFormValues
.setMiddleName = "0";
}
},
// validator: (value) {
// return TextValidator().validateName(value);
// },
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)
.lastName,
borderColor: Colors.white,
onSaved: (value) {
value == null || value == ''
? _patientSearchFormValues
.setLastName = "0"
: _patientSearchFormValues
.setLastName = value;
if (value != null &&
value
.toString()
.trim()
.isEmpty) {
_patientSearchFormValues
.setLastName = "0";
}
},
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,
),
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,
.patientFile,
borderColor: Colors.white,
textInputType: TextInputType.number,
focusNode: _nodeText3,
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,
),
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) {},
onSaved: (value) {},
),
),
(!(_selectedType == '2' ||
_selectedType == '4'))
? DynamicElements(
_patientSearchFormValues,
isFormSubmitted)
: SizedBox(
height: 0,
),
SizedBox(
height: 10,
),
Container(
child: Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: <Widget>[
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color:
HexColor("#CCCCCC"))),
height: 25,
width: 25,
child: Checkbox(
value: onlyArrived,
checkColor: HexColor("#2A930A"),
activeColor: Colors.white,
onChanged: (bool newValue) {
setState(() {
onlyArrived = newValue;
});
}),
),
SizedBox(
width: 12,
),
AppText(
TranslationBase.of(context)
.onlyArrivedPatient,
fontSize:
SizeConfig.textMultiplier *
2),
])),
SizedBox(
height: 10,
),
])
: SizedBox(
height: 0,
),
(!(_selectedType == '2' ||
_selectedType == '4'))
? DynamicElements(
_patientSearchFormValues,
isFormSubmitted)
: SizedBox(
height: 0,
),
SizedBox(
height: 10,
),
Container(
child: Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: <Widget>[
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
height: 25,
width: 25,
child: Checkbox(
value: onlyArrived,
checkColor: HexColor("#2A930A"),
activeColor: Colors.white,
onChanged: (bool newValue) {
setState(() {
onlyArrived = newValue;
});
}),
),
SizedBox(
width: 12,
),
AppText(
TranslationBase.of(context)
.onlyArrivedPatient,
fontSize:
SizeConfig.textMultiplier * 2),
])),
SizedBox(
height: 10,
),
])
: SizedBox(
height: SizeConfig.screenHeight * .45,
),
],
],
),
),
),
],
),
),
Column(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Container(
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5),
child: Wrap(
alignment: WrapAlignment.center,
children: <Widget>[
AppButton(
title: TranslationBase.of(context).search,
color: Colors.red[800],
onPressed: () {
_validateInputs();
},
),
],
),
),
],
),
),
Column(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Container(
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5),
child: Wrap(
alignment: WrapAlignment.center,
children: <Widget>[
AppButton(
title: TranslationBase.of(context).search,
color: Colors.red[800],
onPressed: () {
_validateInputs();
},
),
],
),
),
],
),
],
),
]),
),
);
}

@ -21,7 +21,8 @@ class AddSickLeavScreen extends StatelessWidget {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
patient = routeArgs['patient'];
return BaseView<SickLeaveViewModel>(
onModelReady: (model) => model.getSickLeave(patient.patientMRN??patient.patientId),
onModelReady: (model) =>
model.getSickLeave(patient.patientMRN ?? patient.patientId),
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
isShowAppBar: true,

@ -55,6 +55,7 @@ class SMSOTP {
displayDialog(BuildContext context) async {
return showDialog(
context: context,
barrierColor: Colors.black.withOpacity(0.7),
builder: (context) {
projectProvider = Provider.of(context);
return AlertDialog(
@ -84,14 +85,14 @@ class SMSOTP {
? Padding(
child: Icon(
DoctorApp.verify_sms_1,
size: 40,
size: 50,
),
padding: EdgeInsets.only(bottom: 20),
)
: Padding(
child: Icon(
DoctorApp.verify_whtsapp,
size: 40,
size: 50,
),
padding: EdgeInsets.only(bottom: 20),
),
@ -114,7 +115,7 @@ class SMSOTP {
)
])),
Padding(
padding: EdgeInsets.only(top: 5),
padding: EdgeInsets.only(top: 5, right: 5),
child: AppText(
TranslationBase.of(context).verificationMessage +
' XXXXXX' +
@ -122,7 +123,9 @@ class SMSOTP {
.toString()
.substring(mobileNo.toString().length - 3),
textAlign: TextAlign.start,
fontWeight: FontWeight.w600,
fontWeight: FontWeight.bold,
fontSize: 14,
maxLines: 2,
)),
Form(
key: verifyAccountForm,
@ -131,10 +134,11 @@ class SMSOTP {
child: Directionality(
textDirection: TextDirection.ltr,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Container(
width: SizeConfig.realScreenWidth * 0.15,
width: SizeConfig.realScreenWidth * 0.16,
margin: EdgeInsets.all(5),
child: TextFormField(
textInputAction: TextInputAction.next,
style: buildTextStyle(),
@ -162,7 +166,8 @@ class SMSOTP {
),
),
Container(
width: SizeConfig.realScreenWidth * 0.15,
width: SizeConfig.realScreenWidth * 0.16,
margin: EdgeInsets.all(5),
child: TextFormField(
focusNode: focusD2,
textInputAction: TextInputAction.next,
@ -189,7 +194,8 @@ class SMSOTP {
validator: validateCodeDigit),
),
Container(
width: SizeConfig.realScreenWidth * 0.15,
margin: EdgeInsets.all(5),
width: SizeConfig.realScreenWidth * 0.16,
child: TextFormField(
focusNode: focusD3,
textInputAction: TextInputAction.next,
@ -216,7 +222,8 @@ class SMSOTP {
},
validator: validateCodeDigit)),
Container(
width: SizeConfig.realScreenWidth * 0.15,
margin: EdgeInsets.all(5),
width: SizeConfig.realScreenWidth * 0.16,
child: TextFormField(
focusNode: focusD4,
maxLength: 1,
@ -280,15 +287,15 @@ class SMSOTP {
// contentPadding: EdgeInsets.only(top: 20, bottom: 20),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(10)),
borderSide: BorderSide(color: Colors.grey[100]),
borderSide: BorderSide(color: Colors.grey[300]),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(10.0)),
borderSide: BorderSide(color: Colors.grey[100]),
borderSide: BorderSide(color: Colors.grey[300]),
),
errorBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(10.0)),
borderSide: BorderSide(color: Colors.grey[100]),
borderSide: BorderSide(color: Colors.grey[300]),
),
focusedErrorBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(10.0)),

Loading…
Cancel
Save