merge-requests/307/head
Sultan Khan 5 years ago
commit fa80d62e7d

@ -18,7 +18,7 @@ PODS:
- Firebase/Messaging (6.33.0):
- Firebase/CoreOnly
- FirebaseMessaging (~> 4.7.0)
- firebase_core (0.5.2):
- firebase_core (0.5.3):
- Firebase/CoreOnly (~> 6.33.0)
- Flutter
- firebase_core_web (0.1.0):
@ -250,7 +250,7 @@ SPEC CHECKSUMS:
connectivity_macos: e2e9731b6b22dda39eb1b128f6969d574460e191
device_info: d7d233b645a32c40dfdc212de5cf646ca482f175
Firebase: 8db6f2d1b2c5e2984efba4949a145875a8f65fe5
firebase_core: 350ba329d1641211bc6183a3236893cafdacfea7
firebase_core: 5d6a02f3d85acd5f8321c2d6d62877626a670659
firebase_core_web: d501d8b946b60c8af265428ce483b0fff5ad52d1
firebase_messaging: 0aea2cd5885b65e19ede58ee3507f485c992cc75
FirebaseCore: d889d9e12535b7f36ac8bfbf1713a0836a3012cd
@ -292,4 +292,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: 649616dc336b3659ac6b2b25159d8e488e042b69
COCOAPODS: 1.10.0.rc.1
COCOAPODS: 1.10.1

@ -4,7 +4,7 @@ class GetProcedureReqModel {
int pageSize;
int pageIndex;
List<String> search;
dynamic categoryId;
dynamic category;
String vidaAuthTokenID;
GetProcedureReqModel(
@ -13,7 +13,7 @@ class GetProcedureReqModel {
this.pageSize,
this.pageIndex,
this.search,
this.categoryId,
this.category,
this.vidaAuthTokenID});
GetProcedureReqModel.fromJson(Map<String, dynamic> json) {
@ -22,7 +22,7 @@ class GetProcedureReqModel {
pageSize = json['PageSize'];
pageIndex = json['PageIndex'];
search = json['Search'].cast<String>();
categoryId = json['CategoryId'];
category = json['Category'];
vidaAuthTokenID = json['VidaAuthTokenID'];
}
@ -33,7 +33,7 @@ class GetProcedureReqModel {
data['PageSize'] = this.pageSize;
data['PageIndex'] = this.pageIndex;
data['Search'] = this.search;
data['CategoryId'] = this.categoryId;
data['Category'] = this.category;
data['VidaAuthTokenID'] = this.vidaAuthTokenID;
return data;
}

@ -198,9 +198,9 @@ class PatientReferralService extends LookupService {
Map<String, dynamic> body = Map();
body['PatientMRN'] = pendingReferral.patientID;
body['AppointmentNo'] = pendingReferral.sourceAppointmentNo;
body['SetupID'] = pendingReferral.sourceSetupID;
body['ProjectID'] = pendingReferral.sourceProjectId;
body['AppointmentNo'] = pendingReferral.targetAppointmentNo;
body['SetupID'] = pendingReferral.targetSetupID;
body['ProjectID'] = pendingReferral.targetProjectId;
body['IsAccepted'] = isAccepted;
body['PatientName'] = pendingReferral.patientName;
body['ReferralResponse'] = pendingReferral.remarksFromSource;

@ -106,8 +106,8 @@ class UcafService extends LookupService {
hasError = false;
Map<String, dynamic> body = Map();
body['PatientMRN'] = patient.patientMRN;
// body['AppointmentNo'] = patient.appointmentNo;
// body['EpisodeID'] = patient.episodeNo;
body['AppointmentNo'] = patient.appointmentNo;
body['EpisodeID'] = patient.episodeNo;
await baseAppClient.post (GET_ORDER_PROCEDURE,
onSuccess: (dynamic response, int statusCode) {

@ -73,13 +73,14 @@ class ProcedureService extends BaseService {
}, body: Map());
}
Future getProcedureCategory({String categoryName}) async {
Future getProcedureCategory({String categoryName, String categoryID}) async {
_getProcedureCategoriseReqModel = GetProcedureReqModel(
search: [categoryName],
search: [""],
patientMRN: 0,
pageIndex: 1,
pageIndex: 0,
clinicId: 0,
pageSize: 300,
pageSize: 0,
category: categoryID,
);
hasError = false;
_categoriesList.clear();

@ -29,11 +29,12 @@ class ProcedureViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
Future getProcedureCategory({String categoryName}) async {
Future getProcedureCategory({String categoryName, String categoryID}) async {
hasError = false;
//_insuranceCardService.clearInsuranceCard();
setState(ViewState.BusyLocal);
await _procedureService.getProcedureCategory(categoryName: categoryName);
setState(ViewState.Busy);
await _procedureService.getProcedureCategory(
categoryName: categoryName, categoryID: categoryID);
if (_procedureService.hasError) {
error = _procedureService.error;
setState(ViewState.ErrorLocal);

@ -54,6 +54,7 @@ class PatiantInformtion {
String genderDescription;
String nursingStationName;
String startTime;
String visitType;
PatiantInformtion({
this.list,
@ -105,7 +106,9 @@ class PatiantInformtion {
this.genderInt,
this.isSigned,
this.medicationOrders,
this.nationality,this.patientMRN
this.nationality,
this.patientMRN,
this.visitType,
});
factory PatiantInformtion.fromJson(Map<String, dynamic> json) =>
@ -159,6 +162,7 @@ class PatiantInformtion {
medicationOrders :json['medicationOrders'],
nationality :json['nationality']??json['NationalityNameN'],
patientMRN :json['patientMRN'] ?? json['PatientMRN'],
visitType :json['visitType'] ?? json['visitType'],
);
}

@ -46,6 +46,10 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
bool isFormSubmitted = false;
FocusNode _nodeText1 = FocusNode();
FocusNode _nodeText2 = FocusNode();
FocusNode _nodeText3 = FocusNode();
var _patientSearchFormValues = PatientModel(
FirstName: "0",
MiddleName: "0",
@ -110,374 +114,383 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
@override
Widget build(BuildContext context) {
projectsProvider = Provider.of(context);
return AppScaffold(
appBarTitle: TranslationBase.of(context).searchPatient,
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,
return GestureDetector(
onTap: (){
FocusScope.of(context).requestFocus(new FocusNode());
},
child: AppScaffold(
appBarTitle: TranslationBase.of(context).searchPatient,
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: 5.0),
child: AppText(
TranslationBase.of(context)
.searchPatientImageCaptionBody,
fontSize: SizeConfig.heightMultiplier * 2,
Padding(
padding: const EdgeInsets.only(top: 12.0),
child: AppText(
TranslationBase.of(context)
.searchPatientImageCaptionTitle
.toUpperCase(),
fontWeight: FontWeight.bold,
fontSize: SizeConfig.heightMultiplier * 2.5,
),
),
)
],
),
Container(
padding: EdgeInsets.all(15),
width: SizeConfig.screenWidth * 1,
child: Form(
key: _formKey,
autovalidate: _autoValidate,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 5,
Padding(
padding: const EdgeInsets.only(top: 5.0),
child: AppText(
TranslationBase.of(context)
.searchPatientImageCaptionBody,
fontSize: SizeConfig.heightMultiplier * 2,
),
Container(
height: 40.0,
decoration: ShapeDecoration(
shape: RoundedRectangleBorder(
side: BorderSide(
width: 1.0,
style: BorderStyle.solid,
color: HexColor("#CCCCCC")),
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
),
)
],
),
Container(
padding: EdgeInsets.all(15),
width: SizeConfig.screenWidth * 1,
child: Form(
key: _formKey,
autovalidate: _autoValidate,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 5,
),
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.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,
),
],
Container(
height: 40.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.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.map((item) {
!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.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.only(top: 5),
child: AppTextFormField(
labelText:
TranslationBase.of(context).firstName,
borderColor: Colors.white,
onSaved: (value) {
value == null || value == ''
? _patientSearchFormValues.setFirstName =
"0"
: _patientSearchFormValues.setFirstName =
value;
SizedBox(
height: 10,
),
Container(
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
padding: EdgeInsets.only(top: 5),
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,
),
Container(
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
padding: EdgeInsets.only(top: 5),
child: AppTextFormField(
if (value != null &&
value.toString().trim().isEmpty) {
_patientSearchFormValues.setFirstName = "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.only(top: 5),
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.only(top: 5),
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.only(top: 5),
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.only(top: 5),
child: AppTextFormField(
labelText: TranslationBase.of(context).lastName,
TranslationBase.of(context).phoneNumber,
borderColor: Colors.white,
textInputType: TextInputType.number,
textInputAction: TextInputAction.done,
inputFormatter: ONLY_NUMBERS,
focusNode: _nodeText1,
onSaved: (value) {
value == null || value == ''
? _patientSearchFormValues.setLastName =
"0"
: _patientSearchFormValues.setLastName =
value;
? _patientSearchFormValues
.setPatientMobileNumber = "0"
: _patientSearchFormValues
.setPatientMobileNumber = value;
if (value != null && value
.toString()
.trim()
.isEmpty) {
_patientSearchFormValues.setLastName = "0";
_patientSearchFormValues
.setPatientMobileNumber = "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.only(top: 5),
child: AppTextFormField(
labelText:
TranslationBase.of(context).phoneNumber,
borderColor: Colors.white,
textInputType: TextInputType.number,
inputFormatter: ONLY_NUMBERS,
onSaved: (value) {
value == null || value == ''
? _patientSearchFormValues
.setPatientMobileNumber = "0"
: _patientSearchFormValues
.setPatientMobileNumber = value;
if (value != null && value
.toString()
.trim()
.isEmpty) {
_patientSearchFormValues
.setPatientMobileNumber = "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.only(top: 5),
child: AppTextFormField(
SizedBox(
height: 10,
),
Container(
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
padding: EdgeInsets.only(top: 5),
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.only(top: 5),
child: AppTextFormField(
labelText:
TranslationBase.of(context).patientID,
TranslationBase.of(context).patientFile,
borderColor: Colors.white,
textInputType: TextInputType.number,
focusNode: _nodeText3,
inputFormatter: ONLY_NUMBERS,
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.only(top: 5),
child: AppTextFormField(
labelText:
TranslationBase.of(context).patientFile,
borderColor: Colors.white,
textInputType: TextInputType.number,
inputFormatter: ONLY_NUMBERS,
onSaved: (value) {},
onSaved: (value) {},
),
),
),
(!(_selectedType == '2' || _selectedType == '4'))
? DynamicElements(_patientSearchFormValues, isFormSubmitted)
: SizedBox(
height: 0,
),
SizedBox(
height: 10,
),
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,
),
],
(!(_selectedType == '2' || _selectedType == '4'))
? DynamicElements(_patientSearchFormValues, isFormSubmitted)
: SizedBox(
height: 0,
),
SizedBox(
height: 10,
),
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,
),
],
),
),
),
)
],
)
],
),
),
),
Container(
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5),
child: Wrap(
alignment: WrapAlignment.center,
children: <Widget>[
AppButton(
title: TranslationBase.of(context).search,
onPressed: () {
_validateInputs();
},
),
],
Container(
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5),
child: Wrap(
alignment: WrapAlignment.center,
children: <Widget>[
AppButton(
title: TranslationBase.of(context).search,
onPressed: () {
_validateInputs();
},
),
],
),
),
),
],
));
],
)),
);
}
}

@ -1,12 +1,3 @@
/*
*@author: Amjad Amireh Merge to Elham rababah
*@Date:27/4/2020
*@param:
*@return:PatientsScreen
*@desc:
*/
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
@ -19,6 +10,7 @@ import 'package:doctor_app_flutter/routes.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/PatientCard.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart';
import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart';
@ -93,14 +85,6 @@ class _PatientsScreenState extends State<PatientsScreen> {
}
}
/*
*@author: Amjad Amireh
*@Date:5/5/2020
*@param:
*@return:Convert time from Milesecond to date with time
*@desc:
*/
convertDate(String str) {
String timeConvert;
const start = "/Date(";
@ -129,14 +113,6 @@ class _PatientsScreenState extends State<PatientsScreen> {
return newDateformat.toString();
}
/*
*@author: Amjad Amireh
*@Date:5/5/2020
*@param:
*@return:Convert time from Milesecond to date
*@desc:
*/
convertDateFormat(String str) {
String timeConvert;
const start = "/Date(";
@ -156,24 +132,6 @@ class _PatientsScreenState extends State<PatientsScreen> {
return newDate.toString();
}
convertDateFormat2(String str) {
String timeConvert;
const start = "/Date(";
const end = "+0300)";
final startIndex = str.indexOf(start);
final endIndex = str.indexOf(end, startIndex + start.length);
var date = new DateTime.fromMillisecondsSinceEpoch(
int.parse(str.substring(startIndex + start.length, endIndex)));
String newDate = date.year.toString() +
"/" +
date.month.toString().padLeft(2, '0') +
"/" +
date.day.toString().padLeft(2, '0');
return newDate.toString();
}
filterBooking(String str) {
this.responseModelList = this.responseModelList2;
@ -228,14 +186,6 @@ class _PatientsScreenState extends State<PatientsScreen> {
return TranslationBase.of(context).all;
}
/*
*@author: Amjad Amireh Modified New design
*@Date:21/5/2020
*@param:
*@return:PatientsScreen
*@desc:
*/
@override
Widget build(BuildContext context) {
_locations = [
@ -401,322 +351,19 @@ class _PatientsScreenState extends State<PatientsScreen> {
children: responseModelList
.map((PatiantInformtion
item) {
return Container(
decoration:
myBoxDecoration(),
child: InkWell(
child: Row(
children: <Widget>[
Column(
mainAxisAlignment:
MainAxisAlignment
.start,
children: <
Widget>[
Padding(
padding: EdgeInsets
.only(
left:
12.0),
child:
Container(
decoration:
BoxDecoration(
boxShadow: [
BoxShadow(
color: Color.fromRGBO(
0,
0,
0,
0.08),
offset: Offset(0.0,
5.0),
blurRadius:
16.0)
],
borderRadius:
BorderRadius.all(
Radius.circular(35.0)),
color: Color(
0xffCCCCCC),
),
width: 70,
height: 70,
child: Icon(
item.genderDescription ==
"Male"
? DoctorApp
.male
: DoctorApp
.female_icon,
size: 70,
color: Colors
.white,
),
),
),
],
),
SizedBox(
width: 10,
),
Expanded(
child: Column(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: [
Column(
children: [
SizedBox(
height:
10.0,
),
AppText(
item.firstName +
" " +
item.lastName,
fontSize:
2.0 * SizeConfig.textMultiplier,
fontWeight:
FontWeight.bold,
backGroundcolor:
Colors.white,
),
SizedBox(
height:
5,
),
],
),
Row(
mainAxisAlignment:
MainAxisAlignment
.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <
Widget>[
Wrap(
children: [
AppText(
TranslationBase.of(context).fileNo,
fontSize: 1.8 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
backGroundcolor: Colors.white,
),
AppText(
item.patientId.toString(),
fontSize: 1.8 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
backGroundcolor: Colors.white,
),
SizedBox(
width: 10,
),
],
),
SizedBox(
height:
2.5,
),
Container(
child:
AppText(
TranslationBase.of(context).nationality + " : " + (item.nationalityName ?? item.nationality),
fontSize: 1.8 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
backGroundcolor: Colors.white,
),
margin:
EdgeInsets.only(right: projectsProvider.isArabic ? 0 : 10, left: projectsProvider.isArabic ? 10 : 0),
),
SizedBox(
width:
10,
),
SizedBox(
height:
15.5,
),
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: 0.5,
)
],
)
: SizedBox(
height: 5,
),
],
),
Expanded(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
// mainAxisAlignment:
// MainAxisAlignment
// .spaceBetween,
children: <
Widget>[
SizedBox(
height:
0.5,
),
SizedBox(
height:
0,
),
Wrap(
children: [
AppText(
TranslationBase
.of(
context)
.age2,
fontSize: 1.8 *
SizeConfig
.textMultiplier,
fontWeight: FontWeight
.bold,
backGroundcolor: Colors
.white,
),
AppText(
" ${DateUtils.getAgeByBirthday(item.dateofBirth, context)}",
fontSize: 1.8 *
SizeConfig
.textMultiplier,
fontWeight: FontWeight
.w300,
backGroundcolor: Colors
.white,
),
SizedBox(
width: 10,
),
],
),
SizedBox(
height:
2.5,
),
Wrap(
children: [
AppText(
TranslationBase.of(context).gender2,
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,
),
],
),
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,
),
],
),
),
],
),
],
),
),
// Divider(color: Colors.grey)
],
),
onTap: () {
Navigator.of(context)
.pushNamed(
PATIENTS_PROFILE,
arguments: {
"patient": item,
"patientType":patientType,
"from" : patient.getFrom,
"to" : patient.getTo,
});
},
),
);
return PatientCard(patientInfo: item,
patientType: patientType,
onTap: () {
Navigator.of(context)
.pushNamed(
PATIENTS_PROFILE,
arguments: {
"patient": item,
"patientType":patientType,
"from" : patient.getFrom,
"to" : patient.getTo,
});
},);
}).toList(),
)
: Center(
@ -754,88 +401,78 @@ class _PatientsScreenState extends State<PatientsScreen> {
}
Widget _locationBar(BuildContext _context) {
return Expanded(
child: Container(
height: MediaQuery.of(context).size.height * 0.0619,
width: SizeConfig.screenWidth * 0.94,
decoration: BoxDecoration(
color: Color(0Xffffffff),
borderRadius: BorderRadius.circular(12.5),
border: Border.all(
width: 0.5,
),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,
children: _locations.map((item) {
bool _isActive = _locations[_activeLocation] == item ? true : false;
return Column(mainAxisSize: MainAxisSize.min, children: <Widget>[
InkWell(
child: Center(
child: Expanded(
child: Container(
height: MediaQuery.of(context).size.height * 0.058,
width: SizeConfig.screenWidth * 0.2334,
decoration: BoxDecoration(
borderRadius: BorderRadius.only(
bottomRight: Radius.circular(12.5),
topRight: Radius.circular(12.5),
topLeft: Radius.circular(9.5),
bottomLeft: Radius.circular(9.5)),
color:
_isActive ? HexColor("#B8382B") : Colors.white,
),
child: Center(
child: Text(
item,
style: TextStyle(
fontSize: 12,
color: _isActive
? Colors.white
: Colors.black, //Colors.black,
fontWeight: FontWeight.normal,
),
),
)),
),
),
onTap: () {
filterBooking(item.toString());
setState(() {
_activeLocation = _locations.indexOf(item);
});
}),
_isActive
? Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.only(
bottomRight: Radius.circular(10),
topRight: Radius.circular(10)),
color: Colors.white),
alignment: Alignment.center,
height: 1,
width: SizeConfig.screenWidth * 0.23,
)
: Container()
]);
}).toList(),
return Container(
height: MediaQuery.of(context).size.height * 0.0619,
width: SizeConfig.screenWidth * 0.94,
decoration: BoxDecoration(
color: Color(0Xffffffff),
borderRadius: BorderRadius.circular(12.5),
border: Border.all(
width: 0.5,
),
),
);
}
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,
children: _locations.map((item) {
bool _isActive = _locations[_activeLocation] == item ? true : false;
return Column(mainAxisSize: MainAxisSize.min, children: <Widget>[
InkWell(
child: Center(
child: Container(
height: MediaQuery.of(context).size.height * 0.058,
width: SizeConfig.screenWidth * 0.2334,
decoration: BoxDecoration(
borderRadius: BorderRadius.only(
bottomRight: Radius.circular(12.5),
topRight: Radius.circular(12.5),
topLeft: Radius.circular(9.5),
bottomLeft: Radius.circular(9.5)),
color:
_isActive ? HexColor("#B8382B") : Colors.white,
),
child: Center(
child: Text(
item,
style: TextStyle(
fontSize: 12,
color: _isActive
? Colors.white
: Colors.black, //Colors.black,
fontWeight: FontWeight.normal,
),
),
)),
),
onTap: () {
filterBooking(item.toString());
myBoxDecoration() {
return BoxDecoration(
border: Border(
bottom: BorderSide(
color: Color(0xffCCCCCC),
width: 0.5,
),
setState(() {
_activeLocation = _locations.indexOf(item);
});
}),
_isActive
? Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.only(
bottomRight: Radius.circular(10),
topRight: Radius.circular(10)),
color: Colors.white),
alignment: Alignment.center,
height: 1,
width: SizeConfig.screenWidth * 0.23,
)
: Container()
]);
}).toList(),
),
);
}
}

@ -157,6 +157,7 @@ class MyReferralDetailScreen extends StatelessWidget {
} else {
DrAppToastMsg.showSuccesToast(TranslationBase.of(context).referralSuccessMsgAccept);
Navigator.pop(context);
Navigator.pop(context);
}
},
),
@ -180,6 +181,7 @@ class MyReferralDetailScreen extends StatelessWidget {
} else {
DrAppToastMsg.showSuccesToast(TranslationBase.of(context).referralSuccessMsgReject);
Navigator.pop(context);
Navigator.pop(context);
}
},
),

File diff suppressed because it is too large Load Diff

@ -375,7 +375,7 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
FontWeight
.w700,
fontSize:
17.0,
15.0,
),
Expanded(
child: AppText(
@ -419,6 +419,14 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
),
Row(
children: [
AppText(
'Doctor Remarks : ',
fontWeight:
FontWeight
.w700,
fontSize:
13.0,
),
Expanded(
child:
Container(

@ -9,6 +9,7 @@ import 'package:doctor_app_flutter/core/viewModel/prescription_view_model.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
@ -103,467 +104,479 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
(BuildContext context, MedicineViewModel model, Widget child) =>
NetworkBaseView(
baseViewModel: model,
child: DraggableScrollableSheet(
initialChildSize: 0.95,
maxChildSize: 0.99,
minChildSize: 0.6,
builder:
(BuildContext context, ScrollController scrollController) {
return Container(
height: MediaQuery.of(context).size.height * 1.3,
child: Form(
child: Padding(
padding: EdgeInsets.symmetric(
horizontal: 20.0, vertical: 12.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
widget.drugName.toUpperCase(),
fontWeight: FontWeight.w900,
),
SizedBox(
height: 10.0,
),
Column(
children: [
// Container(
// height: MediaQuery.of(context).size.height *
// 0.070,
// child: InkWell(
// onTap: model.allMedicationList != null
// ? () {
// setState(() {
// newSelectedMedication = null;
// });
// }
// : null,
// child: newSelectedMedication == null
// ? AutoCompleteTextField<
// GetMedicationResponseModel>(
// decoration:
// textFieldSelectorDecoration(
// widget.drugNameGeneric,
// newSelectedMedication != null
// ? newSelectedMedication
// .genericName
// : null,
// true,
// ),
// itemSubmitted: (item) => setState(
// () => newSelectedMedication =
// item),
// key: key,
// suggestions:
// model.allMedicationList,
// itemBuilder: (context,
// suggestion) =>
// new Padding(
// child: Texts(suggestion
// .description +
// '/' +
// suggestion.genericName),
// padding:
// EdgeInsets.all(8.0)),
// itemSorter: (a, b) => 1,
// itemFilter: (suggestion, input) =>
// suggestion.genericName
// .toLowerCase()
// .startsWith(
// input.toLowerCase()) ||
// suggestion.description
// .toLowerCase()
// .startsWith(
// input.toLowerCase()) ||
// suggestion.keywords
// .toLowerCase()
// .startsWith(
// input.toLowerCase()),
// )
// : TextField(
// decoration:
// textFieldSelectorDecoration(
// TranslationBase.of(context)
// .searchMedicineNameHere,
// newSelectedMedication != null
// ? newSelectedMedication
// .description +
// ('${newSelectedMedication.genericName}')
// : null,
// true,
// ),
// enabled: false,
// ),
// ),
// ),
// SizedBox(
// height: 12,
// ),
Container(
height: MediaQuery.of(context).size.height *
0.060,
width: double.infinity,
child: Row(
children: [
Container(
width:
MediaQuery.of(context).size.width *
0.4900,
height:
MediaQuery.of(context).size.height *
0.55,
child: TextFields(
inputFormatters: [
LengthLimitingTextInputFormatter(4)
],
hintText: widget.doseStreangth,
fontSize: 15.0,
controller: strengthController,
keyboardType: TextInputType.number,
onChanged: (String value) {
setState(() {
strengthChar = value.length;
});
if (strengthChar >= 4) {
DrAppToastMsg.showErrorToast(
"Only 4 Digits allowed for strength");
}
},
// validator: (value) {
// if (value.isEmpty &&
// strengthController.text.length >
// 4)
// return TranslationBase.of(context)
// .emptyMessage;
// else
// return null;
// },
child: GestureDetector(
onTap: (){
FocusScope.of(context).requestFocus(new FocusNode());
},
child: DraggableScrollableSheet(
initialChildSize: 0.95,
maxChildSize: 0.99,
minChildSize: 0.6,
builder:
(BuildContext context, ScrollController scrollController) {
return Container(
height: MediaQuery.of(context).size.height * 1.3,
child: Form(
child: Padding(
padding: EdgeInsets.symmetric(
horizontal: 20.0, vertical: 12.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
widget.drugName.toUpperCase(),
fontWeight: FontWeight.w900,
),
SizedBox(
height: 10.0,
),
Column(
children: [
// Container(
// height: MediaQuery.of(context).size.height *
// 0.070,
// child: InkWell(
// onTap: model.allMedicationList != null
// ? () {
// setState(() {
// newSelectedMedication = null;
// });
// }
// : null,
// child: newSelectedMedication == null
// ? AutoCompleteTextField<
// GetMedicationResponseModel>(
// decoration:
// textFieldSelectorDecoration(
// widget.drugNameGeneric,
// newSelectedMedication != null
// ? newSelectedMedication
// .genericName
// : null,
// true,
// ),
// itemSubmitted: (item) => setState(
// () => newSelectedMedication =
// item),
// key: key,
// suggestions:
// model.allMedicationList,
// itemBuilder: (context,
// suggestion) =>
// new Padding(
// child: Texts(suggestion
// .description +
// '/' +
// suggestion.genericName),
// padding:
// EdgeInsets.all(8.0)),
// itemSorter: (a, b) => 1,
// itemFilter: (suggestion, input) =>
// suggestion.genericName
// .toLowerCase()
// .startsWith(
// input.toLowerCase()) ||
// suggestion.description
// .toLowerCase()
// .startsWith(
// input.toLowerCase()) ||
// suggestion.keywords
// .toLowerCase()
// .startsWith(
// input.toLowerCase()),
// )
// : TextField(
// decoration:
// textFieldSelectorDecoration(
// TranslationBase.of(context)
// .searchMedicineNameHere,
// newSelectedMedication != null
// ? newSelectedMedication
// .description +
// ('${newSelectedMedication.genericName}')
// : null,
// true,
// ),
// enabled: false,
// ),
// ),
// ),
// SizedBox(
// height: 12,
// ),
Container(
height: MediaQuery.of(context).size.height *
0.060,
width: double.infinity,
child: Row(
children: [
Container(
width:
MediaQuery.of(context).size.width *
0.4900,
height:
MediaQuery.of(context).size.height *
0.55,
child: TextFields(
inputFormatters: [
LengthLimitingTextInputFormatter(4),
WhitelistingTextInputFormatter
.digitsOnly
],
hintText: widget.doseStreangth,
fontSize: 15.0,
controller: strengthController,
keyboardType: TextInputType.number,
onChanged: (String value) {
setState(() {
strengthChar = value.length;
});
if (strengthChar >= 4) {
DrAppToastMsg.showErrorToast(
"Only 4 Digits allowed for strength");
}
},
// validator: (value) {
// if (value.isEmpty &&
// strengthController.text.length >
// 4)
// return TranslationBase.of(context)
// .emptyMessage;
// else
// return null;
// },
),
),
),
SizedBox(
width: 10.0,
),
Container(
width:
MediaQuery.of(context).size.width *
0.3700,
child: InkWell(
onTap: model.medicationStrengthList !=
null
? () {
ListSelectDialog dialog =
ListSelectDialog(
list: model
.medicationStrengthList,
attributeName: 'nameEn',
attributeValueId: 'id',
okText: TranslationBase.of(
context)
.ok,
okFunction:
(selectedValue) {
setState(() {
units = selectedValue;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder:
(BuildContext context) {
return dialog;
},
);
}
: null,
child: TextField(
decoration:
textFieldSelectorDecoration(
'UNIT Type',
units != null
? units['nameEn']
: null,
true),
enabled: false,
SizedBox(
width: 10.0,
),
Container(
width:
MediaQuery.of(context).size.width *
0.3700,
child: InkWell(
onTap: model.medicationStrengthList !=
null
? () {
Helpers.hideKeyboard(context);
ListSelectDialog dialog =
ListSelectDialog(
list: model
.medicationStrengthList,
attributeName: 'nameEn',
attributeValueId: 'id',
okText: TranslationBase.of(
context)
.ok,
okFunction:
(selectedValue) {
setState(() {
units = selectedValue;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder:
(BuildContext context) {
return dialog;
},
);
}
: null,
child: TextField(
decoration:
textFieldSelectorDecoration(
'UNIT Type',
units != null
? units['nameEn']
: null,
true),
enabled: false,
),
),
),
],
),
),
SizedBox(
height: 12,
),
Container(
height: MediaQuery.of(context).size.height *
0.070,
child: InkWell(
onTap: model.medicationRouteList != null
? () {
Helpers.hideKeyboard(context);
ListSelectDialog dialog =
ListSelectDialog(
list: model.medicationRouteList,
attributeName: 'nameEn',
attributeValueId: 'id',
okText:
TranslationBase.of(context)
.ok,
okFunction: (selectedValue) {
setState(() {
route = selectedValue;
});
if (route == null) {
route = route['id'];
}
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
: null,
child: TextField(
decoration: textFieldSelectorDecoration(
'Route',
route != null
? route['nameEn']
: null,
true),
enabled: false,
),
],
),
),
SizedBox(
height: 12.0,
),
),
SizedBox(
height: 12,
),
Container(
height: MediaQuery.of(context).size.height *
0.070,
child: InkWell(
onTap: model.medicationRouteList != null
? () {
ListSelectDialog dialog =
ListSelectDialog(
list: model.medicationRouteList,
attributeName: 'nameEn',
attributeValueId: 'id',
okText:
TranslationBase.of(context)
.ok,
okFunction: (selectedValue) {
setState(() {
route = selectedValue;
});
if (route == null) {
route = route['id'];
}
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
: null,
child: TextField(
decoration: textFieldSelectorDecoration(
'Route',
route != null
? route['nameEn']
: null,
true),
enabled: false,
Container(
height: MediaQuery.of(context).size.height *
0.070,
child: InkWell(
onTap: model.medicationDoseTimeList != null
? () {
Helpers.hideKeyboard(context);
ListSelectDialog dialog =
ListSelectDialog(
list:
model.medicationDoseTimeList,
attributeName: 'nameEn',
attributeValueId: 'id',
okText:
TranslationBase.of(context)
.ok,
okFunction: (selectedValue) {
setState(() {
doseTime = selectedValue;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
: null,
child: TextField(
decoration: textFieldSelectorDecoration(
TranslationBase.of(context).doseTime,
doseTime != null
? doseTime['nameEn']
: null,
true),
enabled: false,
),
),
),
),
SizedBox(
height: 12.0,
),
Container(
height: MediaQuery.of(context).size.height *
0.070,
child: InkWell(
onTap: model.medicationDoseTimeList != null
? () {
ListSelectDialog dialog =
ListSelectDialog(
list:
model.medicationDoseTimeList,
attributeName: 'nameEn',
attributeValueId: 'id',
okText:
TranslationBase.of(context)
.ok,
okFunction: (selectedValue) {
setState(() {
doseTime = selectedValue;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
: null,
child: TextField(
decoration: textFieldSelectorDecoration(
TranslationBase.of(context).doseTime,
doseTime != null
? doseTime['nameEn']
: null,
true),
enabled: false,
SizedBox(
height: 12.0,
),
Container(
height: MediaQuery.of(context).size.height *
0.070,
child: InkWell(
onTap: model.medicationFrequencyList != null
? () {
Helpers.hideKeyboard(context);
ListSelectDialog dialog =
ListSelectDialog(
list:
model.medicationFrequencyList,
attributeName: 'nameEn',
attributeValueId: 'id',
okText:
TranslationBase.of(context)
.ok,
okFunction: (selectedValue) {
setState(() {
frequencyUpdate =
selectedValue;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
: null,
child: TextField(
decoration: textFieldSelectorDecoration(
TranslationBase.of(context).frequency,
frequencyUpdate != null
? frequencyUpdate['nameEn']
: null,
true),
enabled: false,
),
),
),
),
SizedBox(
height: 12.0,
),
Container(
height: MediaQuery.of(context).size.height *
0.070,
child: InkWell(
onTap: model.medicationFrequencyList != null
? () {
ListSelectDialog dialog =
ListSelectDialog(
list:
model.medicationFrequencyList,
attributeName: 'nameEn',
attributeValueId: 'id',
okText:
TranslationBase.of(context)
.ok,
okFunction: (selectedValue) {
setState(() {
frequencyUpdate =
selectedValue;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
: null,
child: TextField(
decoration: textFieldSelectorDecoration(
TranslationBase.of(context).frequency,
frequencyUpdate != null
? frequencyUpdate['nameEn']
: null,
true),
enabled: false,
SizedBox(
height: 12.0,
),
Container(
height: MediaQuery.of(context).size.height *
0.070,
child: InkWell(
onTap: model.medicationDurationList != null
? () {
Helpers.hideKeyboard(context);
ListSelectDialog dialog =
ListSelectDialog(
list:
model.medicationDurationList,
attributeName: 'nameEn',
attributeValueId: 'id',
okText:
TranslationBase.of(context)
.ok,
okFunction: (selectedValue) {
setState(() {
updatedDuration =
selectedValue;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
: null,
child: TextField(
decoration: textFieldSelectorDecoration(
TranslationBase.of(context).duration,
updatedDuration != null
? updatedDuration['nameEn']
.toString()
: null,
true),
enabled: false,
),
),
),
),
SizedBox(
height: 12.0,
),
Container(
height: MediaQuery.of(context).size.height *
0.070,
child: InkWell(
onTap: model.medicationDurationList != null
? () {
ListSelectDialog dialog =
ListSelectDialog(
list:
model.medicationDurationList,
attributeName: 'nameEn',
attributeValueId: 'id',
okText:
TranslationBase.of(context)
.ok,
okFunction: (selectedValue) {
setState(() {
updatedDuration =
selectedValue;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
: null,
child: TextField(
decoration: textFieldSelectorDecoration(
TranslationBase.of(context).duration,
updatedDuration != null
? updatedDuration['nameEn']
.toString()
: null,
true),
enabled: false,
SizedBox(
height: 12.0,
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
child: TextFields(
hintText: widget.remarks,
controller: remarksController,
maxLines: 7,
minLines: 4,
),
),
),
SizedBox(
height: 12.0,
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
child: TextFields(
hintText: widget.remarks,
controller: remarksController,
maxLines: 7,
minLines: 4,
SizedBox(
height: 12.0,
),
),
SizedBox(
height: 12.0,
),
SizedBox(
height:
MediaQuery.of(context).size.height * 0.12,
),
Container(
margin: EdgeInsets.all(
SizeConfig.widthMultiplier * 2),
child: Wrap(
alignment: WrapAlignment.center,
children: <Widget>[
AppButton(
title:
'update prescription'.toUpperCase(),
onPressed: () {
updatePrescription(
newDoseStreangth:
strengthController
.text.isNotEmpty
? strengthController.text
: widget.doseStreangth,
newUnit: units !=
null
? units['id'].toString()
: widget.doseUnit,
doseUnit: widget.doseUnit,
doseStreangth: widget
.doseStreangth,
duration: widget.duration,
startDate: widget.startDate,
doseId: widget.dose,
frequencyId: widget.frequency,
routeId: widget.route,
patient: widget.patient,
model: widget.model,
newDuration:
updatedDuration !=
null
? updatedDuration[
'id']
.toString()
: widget.duration,
drugId: widget.drugId,
remarks: remarksController.text,
route: route !=
null
? route['id'].toString()
: widget.route,
frequency:
frequencyUpdate !=
null
? frequencyUpdate['id']
.toString()
: widget.frequency,
dose: doseTime != null
? doseTime['id'].toString()
: widget.dose,
enteredRemarks:
widget.enteredRemarks);
Navigator.pop(context);
},
),
],
SizedBox(
height:
MediaQuery.of(context).size.height * 0.12,
),
Container(
margin: EdgeInsets.all(
SizeConfig.widthMultiplier * 2),
child: Wrap(
alignment: WrapAlignment.center,
children: <Widget>[
AppButton(
title:
'update prescription'.toUpperCase(),
onPressed: () {
updatePrescription(
newDoseStreangth:
strengthController
.text.isNotEmpty
? strengthController.text
: widget.doseStreangth,
newUnit: units !=
null
? units['id'].toString()
: widget.doseUnit,
doseUnit: widget.doseUnit,
doseStreangth: widget
.doseStreangth,
duration: widget.duration,
startDate: widget.startDate,
doseId: widget.dose,
frequencyId: widget.frequency,
routeId: widget.route,
patient: widget.patient,
model: widget.model,
newDuration:
updatedDuration !=
null
? updatedDuration[
'id']
.toString()
: widget.duration,
drugId: widget.drugId,
remarks: remarksController.text,
route: route !=
null
? route['id'].toString()
: widget.route,
frequency:
frequencyUpdate !=
null
? frequencyUpdate['id']
.toString()
: widget.frequency,
dose: doseTime != null
? doseTime['id'].toString()
: widget.dose,
enteredRemarks:
widget.enteredRemarks);
Navigator.pop(context);
},
),
],
),
),
),
],
),
],
],
),
],
),
),
),
));
}),
));
}),
),
),
);
});

@ -147,7 +147,17 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
selectedCategory = selectedValue;
model.getProcedureCategory(
categoryName: selectedCategory[
'categoryName']);
'categoryName'],
categoryID: selectedCategory[
'categoryId'] <=
9
? "0" +
selectedCategory[
'categoryId']
.toString()
: selectedCategory[
'categoryId']
.toString());
});
},
);
@ -221,7 +231,7 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
setSelectedType(value);
},
),
Text(TranslationBase.of(context).regular),
Text('routine'),
Radio(
activeColor: Color(0xFFB9382C),
groupValue: selectedType,

@ -37,6 +37,13 @@ class EntityListCheckboxSearchWidget extends StatefulWidget {
class _EntityListCheckboxSearchWidgetState
extends State<EntityListCheckboxSearchWidget> {
int selectedType;
setSelectedType(int val) {
setState(() {
selectedType = val;
});
}
List<EntityList> items = List();
@override

@ -259,11 +259,11 @@ class _ProcedureScreenState extends State<ProcedureScreen> {
),
Expanded(
child: Container(
height: MediaQuery.of(
context)
.size
.height *
0.21,
// height: MediaQuery.of(
// context)
// .size
// .height *
// 0.21,
width: MediaQuery.of(
context)
.size
@ -281,7 +281,7 @@ class _ProcedureScreenState extends State<ProcedureScreen> {
FontWeight
.w700,
fontSize:
15.0,
13.0,
),
AppText(
model
@ -292,7 +292,7 @@ class _ProcedureScreenState extends State<ProcedureScreen> {
.procedureId
.toString(),
fontSize:
13.0,
12.0,
),
SizedBox(
width: 12.0,
@ -305,17 +305,17 @@ class _ProcedureScreenState extends State<ProcedureScreen> {
FontWeight
.w700,
fontSize:
14.0,
13.0,
),
Expanded(
child:
AppText(
model.procedureList[0].entityList[index].orderType ==
1
? 'Regular'
? 'Routine'
: 'Urgent',
fontSize:
13.0,
11.5,
color: Color(
0xFFB9382C),
),

@ -135,7 +135,17 @@ class _UpdateProcedureWidgetState extends State<UpdateProcedureWidget> {
model.getProcedureCategory(
categoryName:
selectedCategory[
'categoryName']);
'categoryName'],
categoryID: selectedCategory[
'categoryId'] <=
9
? "0" +
selectedCategory[
'categoryId']
.toString()
: selectedCategory[
'categoryId']
.toString());
});
},
);
@ -212,7 +222,7 @@ class _UpdateProcedureWidgetState extends State<UpdateProcedureWidget> {
setSelectedType(value);
},
),
Text(TranslationBase.of(context).regular),
Text('routine'),
],
),
),

File diff suppressed because it is too large Load Diff

@ -83,315 +83,320 @@ class _SickLeaveScreenState extends State<SickLeaveScreen> {
builder: (_, model, w) => BaseView<SickLeaveViewModel>(
onModelReady: (model2) => model2.preSickLeaveStatistics(
widget.appointmentNo, widget.patientMRN),
builder: (_, model2, w) => AppScaffold(
baseViewModel: model2,
isShowAppBar: false,
body: Center(
child: Container(
margin: EdgeInsets.only(top: 10),
child: FractionallySizedBox(
widthFactor: 0.9,
child: ListView(
children: [
Padding(
child: AppText(
widget.isExtended == true
? TranslationBase.of(context)
.extendSickLeave
: TranslationBase.of(context)
.addSickLeave,
fontWeight: FontWeight.bold,
),
padding: EdgeInsets.all(10)),
Container(
margin: EdgeInsets.only(left: 10, right: 10),
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppTextFormField(
borderColor: Colors.white,
onChanged: (value) {
addSickLeave.noOfDays = value;
if (widget.extendedData != null) {
widget.extendedData.noOfDays =
int.parse(value);
}
},
hintText: widget.extendedData != null
? widget.extendedData.noOfDays
.toString()
: TranslationBase.of(context)
.sickLeaveDays,
// validator: (value) {
// return TextValidator().validateName(value);
// },
inputFormatter: ONLY_NUMBERS)
]),
),
SizedBox(
height: 10,
),
Container(
builder: (_, model2, w) => GestureDetector(
onTap: (){
FocusScope.of(context).requestFocus(new FocusNode());
},
child: AppScaffold(
baseViewModel: model2,
isShowAppBar: false,
body: Center(
child: Container(
margin: EdgeInsets.only(top: 10),
child: FractionallySizedBox(
widthFactor: 0.9,
child: ListView(
children: [
Padding(
child: AppText(
widget.isExtended == true
? TranslationBase.of(context)
.extendSickLeave
: TranslationBase.of(context)
.addSickLeave,
fontWeight: FontWeight.bold,
),
padding: EdgeInsets.all(10)),
Container(
margin: EdgeInsets.only(left: 10, right: 10),
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
width: 1.0, color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// AppText(
// TranslationBase.of(context).sickLeaveDate,
// fontSize: 10,
// ),
AppTextFormField(
hintText: widget.extendedData != null
? widget.extendedData.startDate
: TranslationBase.of(context)
.sickLeaveDate,
borderColor: Colors.white,
prefix: IconButton(
icon: Icon(Icons.calendar_today)),
textInputType: TextInputType.number,
controller: _toDateController,
onTap: () {
_presentDatePicker('_selectedToDate');
},
inputFormatter: ONLY_DATE,
onChanged: (value) {
addSickLeave.startDate = value;
if (widget.extendedData != null) {
widget.extendedData.startDate =
value;
}
}),
],
)),
Container(
margin: EdgeInsets.only(
top: 10, left: 10, right: 10),
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
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),
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppTextFormField(
borderColor: Colors.white,
onChanged: (value) {
addSickLeave.noOfDays = value;
if (widget.extendedData != null) {
widget.extendedData.noOfDays =
int.parse(value);
}
},
hintText: widget.extendedData != null
? widget.extendedData.noOfDays
.toString()
: TranslationBase.of(context)
.sickLeaveDays,
// validator: (value) {
// return TextValidator().validateName(value);
// },
inputFormatter: ONLY_NUMBERS)
]),
),
SizedBox(
height: 10,
),
Container(
margin: EdgeInsets.only(left: 10, right: 10),
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// AppText(
// TranslationBase.of(context).clinicName,
// TranslationBase.of(context).sickLeaveDate,
// fontSize: 10,
// ),
Row(
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Expanded(
// add Expanded to have your dropdown button fill remaining space
child: DropdownButtonHideUnderline(
child: new IgnorePointer(
ignoring: true,
child: DropdownButton(
isExpanded: true,
value: getClinicName(
model) ??
"",
iconSize: 0,
elevation: 16,
selectedItemBuilder:
(BuildContext
context) {
return model
AppTextFormField(
hintText: widget.extendedData != null
? widget.extendedData.startDate
: TranslationBase.of(context)
.sickLeaveDate,
borderColor: Colors.white,
prefix: IconButton(
icon: Icon(Icons.calendar_today)),
textInputType: TextInputType.number,
controller: _toDateController,
onTap: () {
_presentDatePicker('_selectedToDate');
},
inputFormatter: ONLY_DATE,
onChanged: (value) {
addSickLeave.startDate = value;
if (widget.extendedData != null) {
widget.extendedData.startDate =
value;
}
}),
],
)),
Container(
margin: EdgeInsets.only(
top: 10, left: 10, right: 10),
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
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: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
// AppText(
// TranslationBase.of(context).clinicName,
// fontSize: 10,
// ),
Row(
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Expanded(
// add Expanded to have your dropdown button fill remaining space
child: DropdownButtonHideUnderline(
child: new IgnorePointer(
ignoring: true,
child: DropdownButton(
isExpanded: true,
value: getClinicName(
model) ??
"",
iconSize: 0,
elevation: 16,
selectedItemBuilder:
(BuildContext
context) {
return model
.getClinicNameList()
.map((item) {
return Row(
mainAxisSize:
MainAxisSize
.max,
children: <Widget>[
AppText(
item,
fontSize: SizeConfig
.textMultiplier *
2.1,
color:
Colors.grey,
),
],
);
}).toList();
},
onChanged: (newValue) =>
{},
items: model
.getClinicNameList()
.map((item) {
return Row(
mainAxisSize:
MainAxisSize
.max,
children: <Widget>[
AppText(
item,
fontSize: SizeConfig
.textMultiplier *
2.1,
color:
Colors.grey,
),
],
return DropdownMenuItem(
value:
item.toString(),
child: Text(
item,
textAlign:
TextAlign.end,
),
);
}).toList();
},
onChanged: (newValue) =>
{},
items: model
.getClinicNameList()
.map((item) {
return DropdownMenuItem(
value:
item.toString(),
child: Text(
item,
textAlign:
TextAlign.end,
),
);
}).toList(),
))),
),
],
)
],
),
)),
model2.sickLeaveStatistics[
'recommendedSickLeaveDays'] !=
null
? Padding(
child: AppText(
model2.sickLeaveStatistics[
'recommendedSickLeaveDays'],
fontWeight: FontWeight.bold,
textAlign: TextAlign.start,
}).toList(),
))),
),
],
)
],
),
padding: EdgeInsets.all(10),
)
: SizedBox(
height: 10,
),
Container(
margin: EdgeInsets.only(left: 10, right: 10),
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// AppText(
// TranslationBase.of(context).doctorName,
// fontSize: 10,
// ),
new IgnorePointer(
ignoring: true,
child: AppTextFormField(
readOnly: true,
hintText: profile['DoctorName'],
borderColor: Colors.white,
onSaved: (value) {},
// validator: (value) {
// return TextValidator().validateName(value);
// },
inputFormatter: ONLY_NUMBERS))
],
)),
model2.sickLeaveStatistics[
'recommendedSickLeaveDays'] !=
null
? Padding(
child: AppText(
model2.sickLeaveStatistics[
'recommendedSickLeaveDays'],
fontWeight: FontWeight.bold,
textAlign: TextAlign.start,
),
padding: EdgeInsets.all(10),
)
: SizedBox(
height: 10,
),
Container(
margin: EdgeInsets.only(left: 10, right: 10),
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// AppText(
// TranslationBase.of(context).doctorName,
// fontSize: 10,
// ),
new IgnorePointer(
ignoring: true,
child: AppTextFormField(
readOnly: true,
hintText: profile['DoctorName'],
borderColor: Colors.white,
onSaved: (value) {},
// validator: (value) {
// return TextValidator().validateName(value);
// },
inputFormatter: ONLY_NUMBERS))
],
),
),
SizedBox(
height: 10,
),
),
SizedBox(
height: 10,
),
Container(
margin: EdgeInsets.only(left: 10, right: 10),
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// AppText(
// TranslationBase.of(context).remarks,
// fontSize: 10,
// ),
TextField(
maxLines: 3,
decoration: InputDecoration(
contentPadding: EdgeInsets.all(20.0),
border: InputBorder.none,
hintText: widget.extendedData != null
? widget.extendedData.remarks
: TranslationBase.of(context)
.remarks),
onChanged: (value) {
addSickLeave.remarks = value;
if (widget.extendedData != null) {
widget.extendedData.remarks = value;
}
},
)
],
Container(
margin: EdgeInsets.only(left: 10, right: 10),
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// AppText(
// TranslationBase.of(context).remarks,
// fontSize: 10,
// ),
TextField(
maxLines: 3,
decoration: InputDecoration(
contentPadding: EdgeInsets.all(20.0),
border: InputBorder.none,
hintText: widget.extendedData != null
? widget.extendedData.remarks
: TranslationBase.of(context)
.remarks),
onChanged: (value) {
addSickLeave.remarks = value;
if (widget.extendedData != null) {
widget.extendedData.remarks = value;
}
},
)
],
),
),
),
Container(
margin: EdgeInsets.all(
SizeConfig.widthMultiplier * 5),
child: Wrap(
alignment: WrapAlignment.center,
children: <Widget>[
AppButton(
title: widget.isExtended == true
? TranslationBase.of(context).extend
: TranslationBase.of(context).add,
onPressed: () async {
if (widget.isExtended) {
await model2.extendSickLeave(
widget.extendedData);
Container(
margin: EdgeInsets.all(
SizeConfig.widthMultiplier * 5),
child: Wrap(
alignment: WrapAlignment.center,
children: <Widget>[
AppButton(
title: widget.isExtended == true
? TranslationBase.of(context).extend
: TranslationBase.of(context).add,
onPressed: () async {
if (widget.isExtended) {
await model2.extendSickLeave(
widget.extendedData);
DrAppToastMsg.showSuccesToast(
model2.sickleaveResponse[
'ListSickLeavesToExtent']
['success']);
Navigator.of(context).popUntil((route) {
return route.settings.name ==
PATIENTS_PROFILE;
});
Navigator.of(context).pushNamed(
ADD_SICKLEAVE,
arguments: {
'patient': widget.patient
});
//print(value);
//});
} else {
_validateInputs(model2);
}
},
),
],
DrAppToastMsg.showSuccesToast(
model2.sickleaveResponse[
'ListSickLeavesToExtent']
['success']);
Navigator.of(context).popUntil((route) {
return route.settings.name ==
PATIENTS_PROFILE;
});
Navigator.of(context).pushNamed(
ADD_SICKLEAVE,
arguments: {
'patient': widget.patient
});
//print(value);
//});
} else {
_validateInputs(model2);
}
},
),
],
),
),
),
// Column(
// children: [
// Texts(TranslationBase.of(context)
// .previousSickLeaveIssue +
// ' ')
// ],
// )
],
// Column(
// children: [
// Texts(TranslationBase.of(context)
// .previousSickLeaveIssue +
// ' ')
// ],
// )
],
),
),
),
),
),
)));
)));
}
void _validateInputs(model2) async {

@ -408,4 +408,9 @@ class Helpers {
)),
);
}
/// hides the keyboard if its already open
static hideKeyboard(BuildContext context) {
FocusScope.of(context).unfocus();
}
}

@ -0,0 +1,244 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
class PatientCard extends StatelessWidget {
final PatiantInformtion patientInfo;
final Function onTap;
final String patientType;
const PatientCard({Key key, this.patientInfo, this.onTap, this.patientType}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
padding: EdgeInsets.all(10),
decoration: myBoxDecoration(),
margin: EdgeInsets.only(bottom: 12),
child: InkWell(
child: Row(
children: <Widget>[
Column(
mainAxisAlignment:
MainAxisAlignment
.start,
children: <
Widget>[
Padding(
padding: EdgeInsets
.only(
left:
12.0),
child:
Container(
decoration:
BoxDecoration(
boxShadow: [
BoxShadow(
color: Color.fromRGBO(
0,
0,
0,
0.08),
offset: Offset(0.0,
5.0),
blurRadius:
16.0)
],
borderRadius:
BorderRadius.all(
Radius.circular(35.0)),
color: Color(
0xffCCCCCC),
),
width: 70,
height: 70,
child: Icon(
patientInfo.genderDescription ==
"Male"
? DoctorApp
.male
: DoctorApp
.female_icon,
size: 70,
color: Colors
.white,
),
),
),
],
),
SizedBox(
width: 10,
),
Expanded(
child: Column(
crossAxisAlignment:CrossAxisAlignment.start,
children: [
AppText(
patientInfo.firstName +
" " +
patientInfo.lastName,
fontSize:
2.0 * SizeConfig.textMultiplier,
fontWeight:
FontWeight.bold,
backGroundcolor:
Colors.white,
),
SizedBox(height: 12,),
Table(
border: TableBorder.symmetric(
// inside: BorderSide(width: 2.0, color: Colors.white),
),
// defaultVerticalAlignment:TableCellVerticalAlignment.middle ,
children: [
TableRow(children: [
Container(
child: RichText(
text: new TextSpan(
style: new TextStyle(
fontSize: 2.0 * SizeConfig.textMultiplier, color: Colors.black),
children: <TextSpan>[
new TextSpan(
text: TranslationBase.of(context).fileNo,
style: TextStyle(fontWeight: FontWeight.w700, fontSize: 2.2 * SizeConfig.textMultiplier)),
new TextSpan(text: patientInfo.patientId.toString()),
],),),
),
Container(
child: RichText(
text: new TextSpan(
style: new TextStyle(
fontSize: 2.0 * SizeConfig.textMultiplier, color: Colors.black),
children: <TextSpan>[
new TextSpan(
text: TranslationBase.of(context).age+ " : ",
style: TextStyle(fontWeight: FontWeight.w700, )),
new TextSpan(text: "${DateUtils.getAgeByBirthday(patientInfo.dateofBirth, context)}"),
],),),
),
]
),
TableRow(children: [
SizedBox(height: 5,),
SizedBox(height: 5,)
]),
TableRow(children: [
Container(
child: RichText(
text: new TextSpan(
style: new TextStyle(
fontSize: 2.0 * SizeConfig.textMultiplier, color: Colors.black),
children: <TextSpan>[
new TextSpan(
text: TranslationBase.of(context).nationality + " : ",
style: TextStyle(fontWeight: FontWeight.w700, fontSize: 2.2 * SizeConfig.textMultiplier)),
new TextSpan(text: (patientInfo.nationalityName ?? patientInfo.nationality)),
],),),
),
Container(
child: RichText(
text: new TextSpan(
style: new TextStyle(
fontSize: 2.0 * SizeConfig.textMultiplier, color: Colors.black),
children: <TextSpan>[
new TextSpan(
text: TranslationBase.of(context).gender + " : ",
style: TextStyle(fontWeight: FontWeight.w700, )),
new TextSpan(text: patientInfo.gender.toString() == '1' ? 'Male' : 'Female'),
],),),
),
]
),
],
),
if(SERVICES_PATIANT2[int.parse(patientType)] == "List_MyOutPatient")
Container(
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Container(
height: 15,
width: 60,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(25),
color: HexColor("#20A169"),
),
child: AppText(
patientInfo.startTime,
color: Colors.white,
fontSize: 1.5 * SizeConfig.textMultiplier,
textAlign: TextAlign.center,
fontWeight: FontWeight.bold,
),
),
SizedBox(
width: 3.5,
),
Container(
child: AppText(
convertDateFormat2(patientInfo.appointmentDate.toString()),
fontSize: 1.5 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
),
SizedBox(
height: 0.5,
)
],
),
margin: EdgeInsets.only(top: 8,),
)
],
),
),
// Divider(color: Colors.grey)
],
),
onTap: onTap,
),
);
}
convertDateFormat2(String str) {
String timeConvert;
const start = "/Date(";
const end = "+0300)";
final startIndex = str.indexOf(start);
final endIndex = str.indexOf(end, startIndex + start.length);
var date = new DateTime.fromMillisecondsSinceEpoch(
int.parse(str.substring(startIndex + start.length, endIndex)));
String newDate = date.year.toString() +
"/" +
date.month.toString().padLeft(2, '0') +
"/" +
date.day.toString().padLeft(2, '0');
return newDate.toString();
}
myBoxDecoration() {
return BoxDecoration(
border: Border(
bottom: BorderSide(
color: Color(0xffCCCCCC),
width: 0.5,
),
),
);
}
}

@ -43,7 +43,7 @@ class PatientHeaderWidgetNoAvatar extends StatelessWidget {
],
),
AppText(
"NEW VISIT",
patient.visitType ?? "",
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.0,
),

@ -54,7 +54,7 @@ class TextFields extends StatefulWidget {
this.focus = false,
this.maxLengthEnforced = true,
this.suffixIconColor,
this.inputAction,
this.inputAction = TextInputAction.done,
this.onSubmit,
this.keepPadding = true,
this.textCapitalization = TextCapitalization.none,

@ -17,7 +17,7 @@ class AppTextFormField extends FormField<String> {
TextInputType textInputType,
String hintText,
FocusNode focusNode,
TextInputAction textInputAction,
TextInputAction textInputAction=TextInputAction.done,
ValueChanged<String> onFieldSubmitted,
IconButton prefix,
String labelText,
@ -38,10 +38,10 @@ class AppTextFormField extends FormField<String> {
focusNode: focusNode,
keyboardType: textInputType,
readOnly: readOnly,
inputFormatters: [
FilteringTextInputFormatter.allow(
RegExp(inputFormatter)),
],
// inputFormatters: [
// FilteringTextInputFormatter.allow(
// RegExp(inputFormatter)),
// ],
onChanged: onChanged ??
(value) {
state.didChange(value);

@ -559,7 +559,7 @@ packages:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.4"
version: "1.3.0-nullsafety.3"
mime:
dependency: transitive
description:
@ -830,7 +830,7 @@ packages:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0-nullsafety.2"
version: "1.10.0-nullsafety.1"
stream_channel:
dependency: transitive
description:
@ -965,5 +965,5 @@ packages:
source: hosted
version: "2.2.1"
sdks:
dart: ">=2.10.0 <=2.11.0-213.1.beta"
dart: ">=2.10.0 <2.11.0"
flutter: ">=1.22.0 <2.0.0"

Loading…
Cancel
Save