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 = const ARRIVED_PATIENT_URL =
'Services/DoctorApplication.svc/REST/PatientArrivalList'; 'Services/DoctorApplication.svc/REST/PatientArrivalList';
const ADD_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/PostSickLeave'; 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 EXTEND_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/ExtendSickLeave';
const GET_OFFTIME = 'Services/DoctorApplication.svc/REST/GetMasterLookUpList'; const GET_OFFTIME = 'Services/DoctorApplication.svc/REST/GetMasterLookUpList';
@ -238,10 +238,13 @@ const GET_BOX_QUANTITY =
///GET ECG ///GET ECG
const GET_ECG = "Services/Patients.svc/REST/HIS_GetPatientMuseResults"; 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_MY_DISCHARGE_PATIENT =
const GET_DISCHARGE_PATIENT = "Services/DoctorApplication.svc/REST/GtMyDischargePatient"; "Services/DoctorApplication.svc/REST/GtMyDischargeReferralPatient";
const GET_DISCHARGE_PATIENT =
"Services/DoctorApplication.svc/REST/GtMyDischargePatient";
const GET_PAtIENTS_INSURANCE_APPROVALS = const GET_PAtIENTS_INSURANCE_APPROVALS =
"Services/Patients.svc/REST/GetApprovalStatus"; "Services/Patients.svc/REST/GetApprovalStatus";

@ -32,7 +32,7 @@ const Map<String, Map<String, String>> localizedValues = {
'outPatients': {'en': 'Out Patient', 'ar': 'المريض الخارجي'}, 'outPatients': {'en': 'Out Patient', 'ar': 'المريض الخارجي'},
'myOutPatient': {'en': 'My OutPatients', 'ar': 'المريض الخارجي'}, 'myOutPatient': {'en': 'My OutPatients', 'ar': 'المريض الخارجي'},
'searchPatient': {'en': 'Search Patient', 'ar': 'البحث عن مريض'}, 'searchPatient': {'en': 'Search Patients', 'ar': 'البحث عن مريض'},
'searchAbout': {'en': 'Search', 'ar': 'البحث عن'}, 'searchAbout': {'en': 'Search', 'ar': 'البحث عن'},
'patient': {'en': 'Patient', 'ar': ' مريض'}, 'patient': {'en': 'Patient', 'ar': ' مريض'},
'patients': {'en': "Patient's", 'ar': ' مريض'}, 'patients': {'en': "Patient's", 'ar': ' مريض'},
@ -50,7 +50,7 @@ const Map<String, Map<String, String>> localizedValues = {
'inPatient': {'en': 'My InPatients', 'ar': 'المريض الداخلي'}, 'inPatient': {'en': 'My InPatients', 'ar': 'المريض الداخلي'},
'operations': {'en': 'Operations', 'ar': 'عمليات'}, 'operations': {'en': 'Operations', 'ar': 'عمليات'},
'patientServices': {'en': 'Patient Services', 'ar': 'خدمات المرضى'}, 'patientServices': {'en': 'Patient Services', 'ar': 'خدمات المرضى'},
'searchMedicine': {'en': 'Search Medicine', 'ar': 'بحث عن الدواء'}, 'searchMedicine': {'en': 'Search Medicines', 'ar': 'بحث عن الدواء'},
'myReferralPatient': {'en': 'My Referral Patient', 'ar': 'مرضى الاحالة'}, 'myReferralPatient': {'en': 'My Referral Patient', 'ar': 'مرضى الاحالة'},
'referPatient': {'en': 'Referral Patient', 'ar': 'إحالة مريض'}, 'referPatient': {'en': 'Referral Patient', 'ar': 'إحالة مريض'},
'myReferral': {'en': 'My Referral', '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); IconData(0xe833, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData edit = static const IconData edit =
IconData(0xe834, fontFamily: _kFontFam, fontPackage: _kFontPkg); 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 = static const IconData leaves =
IconData(0xe836, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe836, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData logout = static const IconData logout =
@ -260,8 +261,6 @@ class DoctorApp {
IconData(0xe874, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe874, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData ovrweight_bmi_1 = static const IconData ovrweight_bmi_1 =
IconData(0xe875, fontFamily: _kFontFam, fontPackage: _kFontPkg); 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 = static const IconData qr_code_3 =
IconData(0xe877, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe877, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData reschedule__1 = static const IconData reschedule__1 =
@ -360,8 +359,6 @@ class DoctorApp {
IconData(0xe8a6, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe8a6, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData obese_bmi_r_1 = static const IconData obese_bmi_r_1 =
IconData(0xe8a9, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe8a9, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData menu =
IconData(0xe8ad, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData inpatient = static const IconData inpatient =
IconData(0xe959, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe959, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData discharge = static const IconData discharge =
@ -378,4 +375,10 @@ class DoctorApp {
IconData(0xe95f, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe95f, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData speechtotext = static const IconData speechtotext =
IconData(0xe960, fontFamily: _kFontFam, fontPackage: _kFontPkg); 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/doctor/profile_req_Model.dart';
import 'package:doctor_app_flutter/models/patient/patient_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/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/medicine/search_medicine_patient_screen.dart';
import 'package:doctor_app_flutter/screens/patients/DischargedPatientPage.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/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/screens/patients/profile/referral/patient_referral_screen.dart';
import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
@ -457,7 +459,6 @@ class _HomeScreenState extends State<HomeScreen> {
SizedBox( SizedBox(
height: 10, height: 10,
), ),
new Container( new Container(
height: 130, height: 130,
child: new ListView( child: new ListView(
@ -546,13 +547,13 @@ class _HomeScreenState extends State<HomeScreen> {
}, },
), ),
HomePageCard( HomePageCard(
color: Colors.red[800], color: Colors.black,
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
child: Column( child: Column(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.center, MainAxisAlignment.center,
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Padding( Padding(
padding: EdgeInsets.only( padding: EdgeInsets.only(
@ -586,27 +587,27 @@ class _HomeScreenState extends State<HomeScreen> {
}, },
), ),
HomePageCard( HomePageCard(
color: Colors.grey[300], color: Colors.red[800],
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
child: Column( child: Column(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.center, MainAxisAlignment.center,
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Padding( Padding(
padding: EdgeInsets.only( padding: EdgeInsets.only(
top: 10, left: 10, right: 0), top: 10, left: 10, right: 0),
child: Icon( child: Icon(
DoctorApp.referral_1, DoctorApp.discharge_patients,
size: 35, size: 35,
color: Colors.black, color: Colors.white,
)), )),
Container( Container(
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
child: AppText( child: AppText(
'Discharged Patients', 'Discharged Patients',
color: Colors.black, color: Colors.white,
textAlign: TextAlign.start, textAlign: TextAlign.start,
fontSize: 15, fontSize: 15,
)) ))
@ -625,27 +626,27 @@ class _HomeScreenState extends State<HomeScreen> {
}, },
), ),
HomePageCard( HomePageCard(
color: Colors.red[800], color: Colors.grey[300],
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
child: Column( child: Column(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.center, MainAxisAlignment.center,
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Padding( Padding(
padding: EdgeInsets.only( padding: EdgeInsets.only(
top: 10, left: 10, right: 0), top: 10, left: 10, right: 0),
child: Icon( child: Icon(
DoctorApp.referral_1, DoctorApp.referral_discharge,
size: 35, size: 35,
color: Colors.white, color: Colors.black,
)), )),
Container( Container(
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
child: AppText( child: AppText(
'Referral Discharged', 'Referral Discharged',
color: Colors.white, color: Colors.black,
textAlign: TextAlign.start, textAlign: TextAlign.start,
fontSize: 15, fontSize: 15,
)) ))
@ -684,7 +685,7 @@ class _HomeScreenState extends State<HomeScreen> {
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
child: AppText( child: AppText(
TranslationBase.of(context) TranslationBase.of(context)
.searchmedicinepatient, .searchPatient,
color: Colors.white, color: Colors.white,
textAlign: TextAlign.start, textAlign: TextAlign.start,
fontSize: 13, fontSize: 13,
@ -697,13 +698,49 @@ class _HomeScreenState extends State<HomeScreen> {
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: (context) => 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( Row(
// mainAxisAlignment: MainAxisAlignment.spaceAround, // mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,

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

@ -124,260 +124,240 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
}, },
child: AppScaffold( child: AppScaffold(
appBarTitle: TranslationBase.of(context).searchPatient, appBarTitle: TranslationBase.of(context).searchPatient,
isShowAppBar: false, isShowAppBar: true,
body: ListView( body: Column(
children: <Widget>[ mainAxisAlignment: MainAxisAlignment.spaceBetween,
RoundedContainer( children: [
child: Column( RoundedContainer(
children: <Widget>[ showBorder: false,
Column( child: Column(
children: <Widget>[ children: <Widget>[
// Container( Column(
// child: Icon( children: <Widget>[
// DoctorApp.search_patient_1, // Container(
// size: 100, // child: Icon(
// color: Colors.black, // DoctorApp.search_patient_1,
// ), // size: 100,
// margin: EdgeInsets.only(top: 10), // color: Colors.black,
// ), // ),
// Padding( // margin: EdgeInsets.only(top: 10),
// padding: const EdgeInsets.only(top: 12.0), // ),
// child: AppText( // Padding(
// TranslationBase.of(context) // padding: const EdgeInsets.only(top: 12.0),
// .searchPatientImageCaptionTitle // child: AppText(
// .toUpperCase(), // TranslationBase.of(context)
// fontWeight: FontWeight.bold, // .searchPatientImageCaptionTitle
// fontSize: SizeConfig.heightMultiplier * 2.5, // .toUpperCase(),
// ), // fontWeight: FontWeight.bold,
// ), // fontSize: SizeConfig.heightMultiplier * 2.5,
// Padding( // ),
// padding: const EdgeInsets.only(top: 5.0), // ),
// child: AppText( // Padding(
// TranslationBase.of(context) // padding: const EdgeInsets.only(top: 5.0),
// .searchPatientImageCaptionBody, // child: AppText(
// fontSize: SizeConfig.heightMultiplier * 2, // TranslationBase.of(context)
// ), // .searchPatientImageCaptionBody,
// ) // fontSize: SizeConfig.heightMultiplier * 2,
], // ),
), // )
Container( ],
padding: EdgeInsets.all(15), ),
width: SizeConfig.screenWidth * 1, Container(
child: Form( padding: EdgeInsets.all(15),
key: _formKey, width: SizeConfig.screenWidth * 1,
autovalidate: _autoValidate, child: Form(
child: Column( key: _formKey,
crossAxisAlignment: CrossAxisAlignment.start, autovalidate: _autoValidate,
children: <Widget>[ child: Column(
SizedBox( crossAxisAlignment: CrossAxisAlignment.start,
height: 15, children: <Widget>[
), SizedBox(
if (_selectedType != '7') height: 15,
Container( ),
decoration: BoxDecoration( if (_selectedType != '7')
borderRadius: Container(
BorderRadius.all(Radius.circular(6.0)), decoration: BoxDecoration(
border: Border.all( borderRadius:
width: 1.0, color: HexColor("#CCCCCC"))), BorderRadius.all(Radius.circular(6.0)),
padding: EdgeInsets.all(10), border: Border.all(
child: AppTextFormField( width: 1.0,
labelText: TranslationBase.of(context) color: HexColor("#CCCCCC"))),
.patpatientIDMobilenationalientID, padding: EdgeInsets.all(10),
borderColor: Colors.white, child: AppTextFormField(
textInputType: TextInputType.number, labelText: TranslationBase.of(context)
textInputAction: TextInputAction.done, .patpatientIDMobilenationalientID,
inputFormatter: ONLY_NUMBERS, borderColor: Colors.white,
focusNode: _nodeText1, textInputType: TextInputType.number,
onSaved: (value) { textInputAction: TextInputAction.done,
if (value != null && value != '') { inputFormatter: ONLY_NUMBERS,
if (value.length == 10 && focusNode: _nodeText1,
(value[0] == '2' || value[0] == '1')) { onSaved: (value) {
_patientSearchFormValues if (value != null && value != '') {
.IdentificationNo = value; if (value.length == 10 &&
_patientSearchFormValues.Searchtype = 2; (value[0] == '2' ||
_patientSearchFormValues.setPatientID = 0; value[0] == '1')) {
} else if ((value.length == 10 || _patientSearchFormValues
value.length == 9) && .IdentificationNo = value;
((value[0] == '0' && value[1] == '5') || _patientSearchFormValues.Searchtype = 2;
value[0] == '5')) { _patientSearchFormValues.setPatientID =
_patientSearchFormValues.MobileNo = value; 0;
_patientSearchFormValues.Searchtype = 0; } else if ((value.length == 10 ||
} else { value.length == 9) &&
_patientSearchFormValues.setPatientID = ((value[0] == '0' &&
int.parse(value); value[1] == '5') ||
_patientSearchFormValues.Searchtype = 1; value[0] == '5')) {
_patientSearchFormValues.MobileNo =
value;
_patientSearchFormValues.Searchtype = 0;
} else {
_patientSearchFormValues.setPatientID =
int.parse(value);
_patientSearchFormValues.Searchtype = 1;
}
} }
}
// else{ // else{
// } // }
// value == null || value == '' // value == null || value == ''
// ? _patientSearchFormValues.setPatientID = // ? _patientSearchFormValues.setPatientID =
// 0 // 0
// : _patientSearchFormValues.setPatientID = // : _patientSearchFormValues.setPatientID =
// int.parse(value); // int.parse(value);
// if (value != null && // if (value != null &&
// value.toString().trim().isEmpty) { // value.toString().trim().isEmpty) {
// _patientSearchFormValues.setPatientID = 0; // _patientSearchFormValues.setPatientID = 0;
// } // }
}, },
),
), ),
SizedBox(
height: 10,
), ),
SizedBox( // Row(
height: 10, // mainAxisAlignment: MainAxisAlignment.end,
), // children: [
// Row( // InkWell(
// mainAxisAlignment: MainAxisAlignment.end, // child: this.isView == false
// children: [ // ? AppText(
// InkWell( // TranslationBase.of(context)
// child: this.isView == false // .searchWithOther,
// ? AppText( // color: Colors.red,
// TranslationBase.of(context) // fontWeight: FontWeight.bold,
// .searchWithOther, // )
// color: Colors.red, // : AppText(
// fontWeight: FontWeight.bold, // TranslationBase.of(context)
// ) // .hideOtherCriteria,
// : AppText( // color: Colors.red,
// TranslationBase.of(context) // fontWeight: FontWeight.bold),
// .hideOtherCriteria, // onTap: () {
// color: Colors.red, // setState(() {
// fontWeight: FontWeight.bold), // this.isView = !this.isView;
// onTap: () { // });
// setState(() { // },
// this.isView = !this.isView; // )
// }); // ],
// }, // ),
// ) isView == true
// ], ? Column(children: [
// ), SizedBox(
isView == true height: 10,
? 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)),
),
), ),
width: double.infinity, Container(
child: Padding( height: 65.0,
padding: EdgeInsets.only( decoration: ShapeDecoration(
top: SizeConfig.widthMultiplier * 0.9, shape: RoundedRectangleBorder(
bottom: side: BorderSide(
SizeConfig.widthMultiplier * 0.9, width: 1.0,
right: SizeConfig.widthMultiplier * 3, style: BorderStyle.solid,
left: SizeConfig.widthMultiplier * 3), color: HexColor("#CCCCCC")),
child: Row( borderRadius: BorderRadius.all(
mainAxisSize: MainAxisSize.max, Radius.circular(6.0)),
children: <Widget>[ ),
Expanded( ),
// add Expanded to have your dropdown button fill remaining space width: double.infinity,
child: DropdownButtonHideUnderline( child: Padding(
child: DropdownButton( padding: EdgeInsets.only(
isExpanded: true, top: SizeConfig.widthMultiplier *
value: _selectedType, 0.9,
iconSize: 25, bottom: SizeConfig.widthMultiplier *
elevation: 16, 0.9,
selectedItemBuilder: right:
(BuildContext context) { SizeConfig.widthMultiplier * 3,
return PATIENT_TYPE_Des.map( 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) { (item) {
return Row( !projectsProvider.isArabic
mainAxisSize: ? itemText = item['text']
MainAxisSize.max, : itemText =
children: <Widget>[ item['text_ar'];
!projectsProvider.isArabic return DropdownMenuItem(
? AppText( child: Text(
item['text'], itemText,
fontSize: SizeConfig textAlign: TextAlign.end,
.textMultiplier * ),
2.1, value: item['val'],
)
: AppText(
item['text_ar'],
fontSize: SizeConfig
.textMultiplier *
2.1,
),
],
); );
}).toList(); }).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(),
)),
),
],
), ),
), ),
), SizedBox(
SizedBox( height: 10,
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')
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
@ -387,223 +367,274 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
color: HexColor("#CCCCCC"))), color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
child: AppTextFormField( child: AppTextFormField(
labelText: TranslationBase.of(context) labelText: TranslationBase.of(context)
.phoneNumber, .firstName,
borderColor: Colors.white, borderColor: Colors.white,
textInputType: TextInputType.number, onSaved: (value) {
textInputAction: TextInputAction.done, value == null || value == ''
inputFormatter: ONLY_NUMBERS, ? _patientSearchFormValues
focusNode: _nodeText1, .setFirstName = "0"
onSaved: (value) { : _patientSearchFormValues
value == null || value == '' .setFirstName = value;
? _patientSearchFormValues
.setPatientMobileNumber = "0" if (value != null &&
: _patientSearchFormValues value
.setPatientMobileNumber = .toString()
value; .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 && if (value != null &&
value.toString().trim().isEmpty) { value
_patientSearchFormValues .toString()
.setPatientMobileNumber = "0"; .trim()
} .isEmpty) {
}, _patientSearchFormValues
.setPatientMobileNumber = "0";
}
},
),
), ),
SizedBox(
height: 10,
), ),
SizedBox( Container(
height: 10, decoration: BoxDecoration(
), borderRadius: BorderRadius.all(
Container( Radius.circular(6.0)),
decoration: BoxDecoration( border: Border.all(
borderRadius: BorderRadius.all( width: 1.0,
Radius.circular(6.0)), color: HexColor("#CCCCCC"))),
border: Border.all( padding: EdgeInsets.all(10),
width: 1.0, child: AppTextFormField(
color: HexColor("#CCCCCC"))), labelText: TranslationBase.of(context)
padding: EdgeInsets.all(10), .middleName,
child: AppTextFormField( borderColor: Colors.white,
labelText: TranslationBase.of(context) onSaved: (value) {
.middleName, value == null || value == ''
borderColor: Colors.white, ? _patientSearchFormValues
onSaved: (value) { .setMiddleName = "0"
value == null || value == '' : _patientSearchFormValues
? _patientSearchFormValues .setMiddleName = value;
.setMiddleName = "0" if (value != null &&
: _patientSearchFormValues value
.setMiddleName = value; .toString()
if (value != null && .trim()
value.toString().trim().isEmpty) { .isEmpty) {
_patientSearchFormValues _patientSearchFormValues
.setMiddleName = "0"; .setMiddleName = "0";
} }
}, },
// validator: (value) { // validator: (value) {
// return TextValidator().validateName(value); // return TextValidator().validateName(value);
// }, // },
inputFormatter: ONLY_LETTERS), inputFormatter: ONLY_LETTERS),
), ),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(6.0)), Radius.circular(6.0)),
border: Border.all( border: Border.all(
width: 1.0, width: 1.0,
color: HexColor("#CCCCCC"))), color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
child: AppTextFormField( child: AppTextFormField(
labelText: TranslationBase.of(context) labelText: TranslationBase.of(context)
.lastName, .lastName,
borderColor: Colors.white, borderColor: Colors.white,
onSaved: (value) { onSaved: (value) {
value == null || value == '' value == null || value == ''
? _patientSearchFormValues ? _patientSearchFormValues
.setLastName = "0" .setLastName = "0"
: _patientSearchFormValues : _patientSearchFormValues
.setLastName = value; .setLastName = value;
if (value != null && if (value != null &&
value.toString().trim().isEmpty) { value
_patientSearchFormValues .toString()
.setLastName = "0"; .trim()
} .isEmpty) {
}, _patientSearchFormValues
inputFormatter: ONLY_LETTERS), .setLastName = "0";
), }
SizedBox( },
height: 10, inputFormatter: ONLY_LETTERS),
), ),
Container( SizedBox(
decoration: BoxDecoration( height: 10,
borderRadius: BorderRadius.all( ),
Radius.circular(6.0)), Container(
border: Border.all( decoration: BoxDecoration(
width: 1.0, borderRadius: BorderRadius.all(
color: HexColor("#CCCCCC"))), Radius.circular(6.0)),
padding: EdgeInsets.all(10), border: Border.all(
child: AppTextFormField( 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) labelText: TranslationBase.of(context)
.patientID, .patientFile,
borderColor: Colors.white, borderColor: Colors.white,
textInputType: TextInputType.number, textInputType: TextInputType.number,
focusNode: _nodeText3,
inputFormatter: ONLY_NUMBERS, inputFormatter: ONLY_NUMBERS,
focusNode: _nodeText2, onSaved: (value) {},
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) {},
), ),
(!(_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; final routeArgs = ModalRoute.of(context).settings.arguments as Map;
patient = routeArgs['patient']; patient = routeArgs['patient'];
return BaseView<SickLeaveViewModel>( return BaseView<SickLeaveViewModel>(
onModelReady: (model) => model.getSickLeave(patient.patientMRN??patient.patientId), onModelReady: (model) =>
model.getSickLeave(patient.patientMRN ?? patient.patientId),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: true, isShowAppBar: true,

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

Loading…
Cancel
Save