in-patient && out-patient

pull/174/head
hussam al-habibeh 5 years ago
parent d57eeb0a01
commit 911921e0b8

@ -140,7 +140,9 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
Padding( Padding(
padding: const EdgeInsets.only(top: 12.0), padding: const EdgeInsets.only(top: 12.0),
child: AppText( child: AppText(
TranslationBase.of(context).searchPatientImageCaptionTitle.toUpperCase(), TranslationBase.of(context)
.searchPatientImageCaptionTitle
.toUpperCase(),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: SizeConfig.heightMultiplier * 2.5, fontSize: SizeConfig.heightMultiplier * 2.5,
), ),
@ -155,7 +157,6 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
) )
], ],
), ),
Container( Container(
padding: EdgeInsets.all(15), padding: EdgeInsets.all(15),
width: SizeConfig.screenWidth * 1, width: SizeConfig.screenWidth * 1,
@ -180,7 +181,6 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
BorderRadius.all(Radius.circular(6.0)), BorderRadius.all(Radius.circular(6.0)),
), ),
), ),
width: double.infinity, width: double.infinity,
child: Padding( child: Padding(
padding: EdgeInsets.only( padding: EdgeInsets.only(
@ -222,8 +222,7 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
); );
}).toList(); }).toList();
}, },
onChanged: (String newValue) => onChanged: (String newValue) => {
{
setState(() { setState(() {
_selectedType = newValue; _selectedType = newValue;
selectedPatientType = selectedPatientType =
@ -253,19 +252,15 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
), ),
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all( borderRadius:
Radius.circular(6.0)), BorderRadius.all(Radius.circular(6.0)),
border: Border.all( border: Border.all(
width: 1.0, color: Hexcolor("#CCCCCC")) width: 1.0, color: Hexcolor("#CCCCCC"))),
),
padding: EdgeInsets.only(top: 5), padding: EdgeInsets.only(top: 5),
child: AppTextFormField( child: AppTextFormField(
labelText:
labelText: TranslationBase TranslationBase.of(context).firstName,
.of(context)
.firstName,
borderColor: Colors.white, borderColor: Colors.white,
onSaved: (value) { onSaved: (value) {
value == null value == null
? _patientSearchFormValues.setFirstName = ? _patientSearchFormValues.setFirstName =
@ -273,10 +268,7 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
: _patientSearchFormValues.setFirstName = : _patientSearchFormValues.setFirstName =
value; value;
if (value if (value.toString().trim().isEmpty) {
.toString()
.trim()
.isEmpty) {
_patientSearchFormValues.setFirstName = "0"; _patientSearchFormValues.setFirstName = "0";
} }
}, },
@ -290,16 +282,14 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
), ),
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all( borderRadius:
Radius.circular(6.0)), BorderRadius.all(Radius.circular(6.0)),
border: Border.all( border: Border.all(
width: 1.0, color: Hexcolor("#CCCCCC")) width: 1.0, color: Hexcolor("#CCCCCC"))),
),
padding: EdgeInsets.only(top: 5), padding: EdgeInsets.only(top: 5),
child: AppTextFormField( child: AppTextFormField(
labelText: TranslationBase labelText:
.of(context) TranslationBase.of(context).middleName,
.middleName,
borderColor: Colors.white, borderColor: Colors.white,
onSaved: (value) { onSaved: (value) {
value == null value == null
@ -307,10 +297,7 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
"0" "0"
: _patientSearchFormValues.setMiddleName = : _patientSearchFormValues.setMiddleName =
value; value;
if (value if (value.toString().trim().isEmpty) {
.toString()
.trim()
.isEmpty) {
_patientSearchFormValues.setMiddleName = _patientSearchFormValues.setMiddleName =
"0"; "0";
} }
@ -325,27 +312,21 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
), ),
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all( borderRadius:
Radius.circular(6.0)), BorderRadius.all(Radius.circular(6.0)),
border: Border.all( border: Border.all(
width: 1.0, color: Hexcolor("#CCCCCC")) width: 1.0, color: Hexcolor("#CCCCCC"))),
),
padding: EdgeInsets.only(top: 5), padding: EdgeInsets.only(top: 5),
child: AppTextFormField( child: AppTextFormField(
labelText: TranslationBase labelText: TranslationBase.of(context).lastName,
.of(context)
.lastName,
borderColor: Colors.white, borderColor: Colors.white,
onSaved: (value) { onSaved: (value) {
value == null value == null
? ? _patientSearchFormValues.setLastName =
_patientSearchFormValues.setLastName = "0" "0"
: _patientSearchFormValues.setLastName = : _patientSearchFormValues.setLastName =
value; value;
if (value if (value.toString().trim().isEmpty) {
.toString()
.trim()
.isEmpty) {
_patientSearchFormValues.setLastName = "0"; _patientSearchFormValues.setLastName = "0";
} }
}, },
@ -356,16 +337,14 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
), ),
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all( borderRadius:
Radius.circular(6.0)), BorderRadius.all(Radius.circular(6.0)),
border: Border.all( border: Border.all(
width: 1.0, color: Hexcolor("#CCCCCC")) width: 1.0, color: Hexcolor("#CCCCCC"))),
),
padding: EdgeInsets.only(top: 5), padding: EdgeInsets.only(top: 5),
child: AppTextFormField( child: AppTextFormField(
labelText: TranslationBase labelText:
.of(context) TranslationBase.of(context).phoneNumber,
.phoneNumber,
borderColor: Colors.white, borderColor: Colors.white,
textInputType: TextInputType.number, textInputType: TextInputType.number,
inputFormatter: ONLY_NUMBERS, inputFormatter: ONLY_NUMBERS,
@ -376,10 +355,7 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
: _patientSearchFormValues : _patientSearchFormValues
.setPatientMobileNumber = value; .setPatientMobileNumber = value;
if (value if (value.toString().trim().isEmpty) {
.toString()
.trim()
.isEmpty) {
_patientSearchFormValues _patientSearchFormValues
.setPatientMobileNumber = "0"; .setPatientMobileNumber = "0";
} }
@ -391,29 +367,24 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
), ),
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all( borderRadius:
Radius.circular(6.0)), BorderRadius.all(Radius.circular(6.0)),
border: Border.all( border: Border.all(
width: 1.0, color: Hexcolor("#CCCCCC")) width: 1.0, color: Hexcolor("#CCCCCC"))),
),
padding: EdgeInsets.only(top: 5), padding: EdgeInsets.only(top: 5),
child: AppTextFormField( child: AppTextFormField(
labelText: TranslationBase labelText:
.of(context) TranslationBase.of(context).patientID,
.patientID,
borderColor: Colors.white, borderColor: Colors.white,
textInputType: TextInputType.number, textInputType: TextInputType.number,
inputFormatter: ONLY_NUMBERS, inputFormatter: ONLY_NUMBERS,
onSaved: (value) { onSaved: (value) {
value == null value == null
? ? _patientSearchFormValues.setPatientID =
_patientSearchFormValues.setPatientID = 0 0
: _patientSearchFormValues.setPatientID = : _patientSearchFormValues.setPatientID =
int.parse(value); int.parse(value);
if (value if (value.toString().trim().isEmpty) {
.toString()
.trim()
.isEmpty) {
_patientSearchFormValues.setPatientID = 0; _patientSearchFormValues.setPatientID = 0;
} }
}), }),
@ -423,16 +394,14 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
), ),
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all( borderRadius:
Radius.circular(6.0)), BorderRadius.all(Radius.circular(6.0)),
border: Border.all( border: Border.all(
width: 1.0, color: Hexcolor("#CCCCCC")) width: 1.0, color: Hexcolor("#CCCCCC"))),
),
padding: EdgeInsets.only(top: 5), padding: EdgeInsets.only(top: 5),
child: AppTextFormField( child: AppTextFormField(
labelText: TranslationBase labelText:
.of(context) TranslationBase.of(context).patientFile,
.patientFile,
borderColor: Colors.white, borderColor: Colors.white,
textInputType: TextInputType.number, textInputType: TextInputType.number,
inputFormatter: ONLY_NUMBERS, inputFormatter: ONLY_NUMBERS,
@ -536,8 +505,7 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
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"))),
),
height: 25, height: 25,
width: 25, width: 25,
child: Checkbox( child: Checkbox(
@ -546,13 +514,13 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
activeColor: Colors.white, activeColor: Colors.white,
onChanged: (bool newValue) {}), onChanged: (bool newValue) {}),
), ),
SizedBox(width: 12,), SizedBox(
width: 12,
),
AppText( AppText(
TranslationBase TranslationBase.of(context)
.of(context)
.onlyArrivedPatient, .onlyArrivedPatient,
fontSize: SizeConfig.textMultiplier * fontSize: SizeConfig.textMultiplier * 2),
2),
])), ])),
SizedBox( SizedBox(
height: 10, height: 10,

@ -352,6 +352,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
SizedBox(height: 10.0), SizedBox(height: 10.0),
Container( Container(
width: SizeConfig.screenWidth * 0.9, width: SizeConfig.screenWidth * 0.9,
height: SizeConfig.screenHeight * 0.05,
child: TextField( child: TextField(
controller: _controller, controller: _controller,
onChanged: (String str) { onChanged: (String str) {
@ -366,8 +367,11 @@ class _PatientsScreenState extends State<PatientsScreen> {
SizedBox( SizedBox(
height: 10.0, height: 10.0,
), ),
Divider(
thickness: 1,
color: Colors.grey,
),
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0Xffffffff), color: Color(0Xffffffff),
borderRadius: borderRadius:
@ -377,10 +381,11 @@ class _PatientsScreenState extends State<PatientsScreen> {
child: (responseModelList.length > 0) child: (responseModelList.length > 0)
? Column( ? Column(
// mainAxisAlignment: MainAxisAlignment.center, // mainAxisAlignment: MainAxisAlignment.center,
children: responseModelList children: responseModelList.map(
.map((PatiantInformtion item) { (PatiantInformtion item) {
return Container( return Container(
decoration: myBoxDecoration(), decoration:
myBoxDecoration(),
child: InkWell( child: InkWell(
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
@ -393,44 +398,39 @@ class _PatientsScreenState extends State<PatientsScreen> {
decoration: decoration:
BoxDecoration( BoxDecoration(
gradient: LinearGradient( gradient: LinearGradient(
begin: begin: Alignment(
Alignment(
-1, -1,
-1), -1),
end: end: Alignment(
Alignment( 1,
1, 1), 1),
colors: [ colors: [
Colors.grey[ Colors
100], .grey[100],
Colors.grey[ Colors
200], .grey[200],
]), ]),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Color color: Color.fromRGBO(
.fromRGBO(
0, 0,
0, 0,
0, 0,
0.08), 0.08),
offset: offset: Offset(
Offset(
0.0, 0.0,
5.0), 5.0),
blurRadius: blurRadius:
16.0) 16.0)
], ],
borderRadius: BorderRadius borderRadius:
.all(Radius BorderRadius.all(
.circular( Radius.circular(50.0)),
50.0)),
), ),
width: 80, width: 70,
height: 80, height: 70,
child: Icon( child: Icon(
item item.genderDescription ==
.genderDescription ==
"Male" "Male"
? DoctorApp ? DoctorApp
.male .male
@ -440,138 +440,233 @@ class _PatientsScreenState extends State<PatientsScreen> {
)), )),
], ],
), ),
SizedBox( SizedBox(
width: 10, width: 10,
), ),
Expanded( Expanded(
child: Column( child: Column(
crossAxisAlignment: children: [
CrossAxisAlignment Column(
.start, children: [
children: <Widget>[ Padding(
SizedBox( padding: EdgeInsets
height: 15, .only(
), top: 10.5),
child:
AppText( AppText(
item.firstName + item.firstName +
" " + " " +
item.lastName, item.lastName,
fontSize: 2.0 * fontSize:
SizeConfig 2.0 *
.textMultiplier, SizeConfig.textMultiplier,
fontWeight: fontWeight:
FontWeight.bold, FontWeight.bold,
backGroundcolor: backGroundcolor:
Colors.white, Colors.white,
textAlign:
TextAlign.left,
),
),
],
),
Row(
mainAxisAlignment:
MainAxisAlignment
.spaceEvenly,
children: [
Column(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: <
Widget>[
SizedBox(
height:
15,
),
SizedBox(
height:
0,
), ),
SizedBox( SizedBox(
height: 8, height:
3.5,
), ),
Wrap(
children: [
AppText( AppText(
TranslationBase TranslationBase.of(context).fileNo,
.of( fontSize: 1.8 * SizeConfig.textMultiplier,
context) fontWeight: FontWeight.bold,
.fileNo + backGroundcolor: Colors.white,
item.patientId
.toString(),
fontSize: 2.0 *
SizeConfig
.textMultiplier,
fontWeight:
FontWeight.bold,
backGroundcolor:
Colors.white,
), ),
AppText( AppText(
TranslationBase item.patientId.toString(),
.of( fontSize: 1.8 * SizeConfig.textMultiplier,
context) fontWeight: FontWeight.w300,
.age + backGroundcolor: Colors.white,
item.age ),
.toString(), ],
fontSize: 2.0 * ),
SizeConfig SizedBox(
.textMultiplier, height:
2.5,
),
AppText(
'NATIONALITY: ' +
item.nationalityName.toString(),
fontSize:
1.8 * SizeConfig.textMultiplier,
fontWeight: fontWeight:
FontWeight.bold, FontWeight.bold,
backGroundcolor: backGroundcolor:
Colors.white, Colors.white,
), ),
SizedBox( SizedBox(
height: 8, height:
8,
), ),
SERVICES_PATIANT2[ SERVICES_PATIANT2[int.parse(patientType)] ==
int.parse(
patientType)] ==
"List_MyOutPatient" "List_MyOutPatient"
? Row( ? Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.spaceBetween,
MainAxisAlignment children: <Widget>[
.spaceBetween, Container(
height: 15,
width: 60,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(25),
color: Hexcolor("#20A169"),
),
child: AppText(
item.startTime,
color: Colors.white,
fontSize: 1.5 * SizeConfig.textMultiplier,
textAlign: TextAlign.center,
fontWeight: FontWeight.bold,
),
),
SizedBox(
width: 3.5,
),
Container(
child: AppText(
convertDateFormat2(item.appointmentDate.toString()),
fontSize: 1.5 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
),
SizedBox(
height: 25.5,
)
],
)
: SizedBox(
height: 15,
),
],
),
Column(
crossAxisAlignment:
CrossAxisAlignment
.start,
// mainAxisAlignment:
// MainAxisAlignment
// .spaceBetween,
children: < children: <
Widget>[ Widget>[
Container( SizedBox(
height: height:
20, 20.5,
width: 80,
decoration:
BoxDecoration(
borderRadius:
BorderRadius
.circular(
50),
color: Hexcolor(
"#20A169"),
), ),
child: SizedBox(
height:
0,
),
Wrap(
children: [
AppText( AppText(
item TranslationBase.of(context).age,
.startTime, fontSize: 1.8 * SizeConfig.textMultiplier,
color: Colors fontWeight: FontWeight.bold,
.white, backGroundcolor: Colors.white,
fontSize:
2 * SizeConfig
.textMultiplier,
textAlign:
TextAlign
.center,
fontWeight:
FontWeight
.bold,
), ),
AppText(
item.age.toString(),
fontSize: 1.8 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
backGroundcolor: Colors.white,
),
],
), ),
SizedBox( SizedBox(
width: 60, height:
2.5,
), ),
Container( Wrap(
child: children: [
AppText( AppText(
convertDateFormat2( TranslationBase.of(context).gender,
item fontSize: 1.8 * SizeConfig.textMultiplier,
.appointmentDate fontWeight: FontWeight.bold,
.toString()), backGroundcolor: Colors.white,
fontSize: ),
2.0 * AppText(
SizeConfig item.gender.toString() == '1' ? 'Male' : 'Female',
.textMultiplier, fontSize: 1.8 * SizeConfig.textMultiplier,
fontWeight: fontWeight: FontWeight.w300,
FontWeight backGroundcolor: Colors.white,
.bold,
), ),
)
], ],
)
: AppText(
item
.nationalityName ??
item
.nationalityNameN,
fontSize: 2.5 *
SizeConfig
.textMultiplier,
), ),
SizedBox( SizedBox(
height:
8,
),
SERVICES_PATIANT2[int.parse(patientType)] ==
"List_MyOutPatient"
? Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Container(
height: 15, height: 15,
width: 60,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(25),
color: Hexcolor("#20A169"),
),
child: AppText(
item.startTime,
color: Colors.white,
fontSize: 1.5 * SizeConfig.textMultiplier,
textAlign: TextAlign.center,
fontWeight: FontWeight.bold,
),
),
SizedBox(
width: 3.5,
),
Container(
child: AppText(
convertDateFormat2(item.appointmentDate.toString()),
fontSize: 1.5 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
),
SizedBox(
height: 25.5,
),
],
)
: SizedBox(
height: 15,
),
],
),
],
), ),
], ],
), ),
@ -593,8 +688,8 @@ class _PatientsScreenState extends State<PatientsScreen> {
) )
: Center( : Center(
child: DrAppEmbeddedError( child: DrAppEmbeddedError(
error: TranslationBase error: TranslationBase.of(
.of(context) context)
.youDontHaveAnyPatient), .youDontHaveAnyPatient),
), ),
), ),
@ -609,17 +704,17 @@ class _PatientsScreenState extends State<PatientsScreen> {
InputDecoration buildInputDecoration(BuildContext context, hint) { InputDecoration buildInputDecoration(BuildContext context, hint) {
return InputDecoration( return InputDecoration(
prefixIcon: Icon(Icons.search, color: Colors.red), prefixIcon: Icon(Icons.search, color: Colors.grey),
filled: true, filled: true,
fillColor: Colors.white, fillColor: Colors.white,
hintText: hint, hintText: hint,
hintStyle: TextStyle(fontSize: 2 * SizeConfig.textMultiplier), hintStyle: TextStyle(fontSize: 1.66 * SizeConfig.textMultiplier),
enabledBorder: OutlineInputBorder( enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(20)), borderRadius: BorderRadius.all(Radius.circular(10.0)),
borderSide: BorderSide(color: Hexcolor('#CCCCCC')), borderSide: BorderSide(color: Hexcolor('#CCCCCC')),
), ),
focusedBorder: OutlineInputBorder( focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(50.0)), borderRadius: BorderRadius.all(Radius.circular(10.0)),
borderSide: BorderSide(color: Colors.grey), //), borderSide: BorderSide(color: Colors.grey), //),
)); ));
} }
@ -627,10 +722,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
Widget _locationBar(BuildContext _context) { Widget _locationBar(BuildContext _context) {
return Expanded( return Expanded(
child: Container( child: Container(
height: MediaQuery height: MediaQuery.of(context).size.height * 0.065,
.of(context)
.size
.height * 0.065,
width: SizeConfig.screenWidth * 0.95, width: SizeConfig.screenWidth * 0.95,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0Xffffffff), borderRadius: BorderRadius.circular(20)), color: Color(0Xffffffff), borderRadius: BorderRadius.circular(20)),
@ -647,7 +739,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
height: 40, height: 40,
width: 90, width: 90,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(50), borderRadius: BorderRadius.circular(3.0),
color: _isActive ? Hexcolor("#B8382B") : Colors.white, color: _isActive ? Hexcolor("#B8382B") : Colors.white,
), ),
child: Center( child: Center(

@ -405,7 +405,7 @@ packages:
name: js name: js
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.6.1+1" version: "0.6.3-nullsafety.1"
json_annotation: json_annotation:
dependency: transitive dependency: transitive
description: description:
@ -447,7 +447,7 @@ packages:
name: meta name: meta
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.0-nullsafety.3" version: "1.3.0-nullsafety.4"
mime: mime:
dependency: transitive dependency: transitive
description: description:
@ -662,7 +662,7 @@ packages:
name: stack_trace name: stack_trace
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.10.0-nullsafety.1" version: "1.10.0-nullsafety.2"
stream_channel: stream_channel:
dependency: transitive dependency: transitive
description: description:
@ -769,5 +769,5 @@ packages:
source: hosted source: hosted
version: "2.2.1" version: "2.2.1"
sdks: sdks:
dart: ">=2.10.0-110 <2.11.0" dart: ">=2.10.0-110 <=2.11.0-213.1.beta"
flutter: ">=1.12.13+hotfix.5 <2.0.0" flutter: ">=1.12.13+hotfix.5 <2.0.0"

Loading…
Cancel
Save