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

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

@ -405,7 +405,7 @@ packages:
name: js
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.1+1"
version: "0.6.3-nullsafety.1"
json_annotation:
dependency: transitive
description:
@ -447,7 +447,7 @@ packages:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.3"
version: "1.3.0-nullsafety.4"
mime:
dependency: transitive
description:
@ -662,7 +662,7 @@ packages:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0-nullsafety.1"
version: "1.10.0-nullsafety.2"
stream_channel:
dependency: transitive
description:
@ -769,5 +769,5 @@ packages:
source: hosted
version: "2.2.1"
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"

Loading…
Cancel
Save