merge-requests/59/head
Elham Rababah 6 years ago
commit 0748a569ac

@ -1,8 +1,18 @@
/*
*@author:Modified by amjad add getter and setter Amjad Amireh
*@Date:11/5/2020
*@param:
*@return:PatientsScreen Search textbox filter
*@desc:
*/
class PatientModel {
int ProjectID;
int ClinicID;
int DoctorID;
String FirstName;
String MiddleName;
String LastName;
String PatientMobileNumber;
@ -21,13 +31,87 @@ class PatientModel {
bool PatientOutSA;
getFirstName() {
return this.FirstName;
}
int get getProjectID => ProjectID;
set setProjectID(int ProjectID) => this.ProjectID = ProjectID;
int get getClinicID => ClinicID;
set setClinicID(int ClinicID) => this.ClinicID = ClinicID;
int get getDoctorID => DoctorID;
set setDoctorID(int DoctorID) => this.DoctorID = DoctorID;
String get getFirstName => FirstName;
set setFirstName(String FirstName) => this.FirstName = FirstName;
String get getMiddleName => MiddleName;
set setMiddleName(String MiddleName) => this.MiddleName = MiddleName;
String get getLastName => LastName;
set setLastName(String LastName) => this.LastName = LastName;
String get getPatientMobileNumber => PatientMobileNumber;
set setPatientMobileNumber(String PatientMobileNumber) => this.PatientMobileNumber = PatientMobileNumber;
// String get getPatientIdentificationID => PatientIdentificationID;
// set setPatientIdentificationID(String PatientIdentificationID) => this.PatientIdentificationID = PatientIdentificationID;
int get getPatientID => PatientID;
set setPatientID(int PatientID) => this.PatientID = PatientID;
String get getFrom => From;
set setFrom(String From) => this.From = From;
String get getTo => To;
set setTo(String To) => this.To = To;
int get getLanguageID => LanguageID;
set setLanguageID(int LanguageID) => this.LanguageID = LanguageID;
String get getStamp => stamp;
set setStamp(String stamp) => this.stamp = stamp;
String get getIPAdress => IPAdress;
set setIPAdress(String IPAdress) => this.IPAdress = IPAdress;
double get getVersionID => VersionID;
set setVersionID(double VersionID) => this.VersionID = VersionID;
int get getChannel => Channel;
set setChannel(int Channel) => this.Channel = Channel;
String get getTokenID => TokenID;
set setTokenID(String TokenID) => this.TokenID = TokenID;
String get getSessionID => SessionID;
set setSessionID(String SessionID) => this.SessionID = SessionID;
bool get getIsLoginForDoctorApp => IsLoginForDoctorApp;
set setIsLoginForDoctorApp(bool IsLoginForDoctorApp) => this.IsLoginForDoctorApp = IsLoginForDoctorApp;
bool get getPatientOutSA => PatientOutSA;
set setPatientOutSA(bool PatientOutSA) => this.PatientOutSA = PatientOutSA;
setFirstName( FirstName) {
this.FirstName = FirstName;
}

@ -43,14 +43,12 @@ class PatientsProvider with ChangeNotifier {
Future<Map> getPatientList(PatientModel patient, patientType) async {
/* const url =
BASE_URL+'DoctorApplication.svc/REST/GetMyInPatient';*/
// var srvicePatiant = ["GetMyOutPatient", "GetMyInPatient", "GtMyDischargePatient","GtMyReferredPatient","GtMyDischargeReferralPatient","GtMyTomorrowPatient","GtMyReferralPatient"];
// print("a=SERVICES_PATIANT[patientType]========='=======a");
int val = int.parse(patientType);
final url =
BASE_URL + "DoctorApplication.svc/REST/" + SERVICES_PATIANT[val];
///"https://uat.hmgwebservices.com/Services/Doctors.svc/REST/";
//BASE_URL + 'DoctorApplication.svc/REST/' + SERVICES_PATIANT[val];
//**********Modify url by amjad amireh for patiant type*********
final url =BASE_URL+"DoctorApplication.svc/REST/"+ SERVICES_PATIANT[val];
// print("a===========$url=======a");
try {

@ -65,15 +65,26 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(doctorProfiles[0]);
print(doctorProfile.doctorName);
if (_formKey.currentState.validate()) {
// If all data are correct then save data to out variables
// _formKey.currentState.save();
sharedPref.setString(TOKEN,'@dm!n');
sharedPref.setString(SLECTED_PATIENT_TYPE,_selectedType);
//*****If all data are correct then save data to out variables****
_patientSearchFormValues.setFrom = "0";
_patientSearchFormValues.setTo = "0";
print("***************Check validate1*************");
print(_patientSearchFormValues.getFirstName.trim().length);
print("***************Check validate2*************");
_formKey.currentState.save();
_patientSearchFormValues.setFrom = "0";
_patientSearchFormValues.setTo = "0";
//*********************************** */
sharedPref.setString(TOKEN, '@dm!n');
sharedPref.setString(SLECTED_PATIENT_TYPE, _selectedType);
print('_selectedType${_selectedType}');
String token = await sharedPref.getString(TOKEN);
int projectID = await sharedPref.getInt(PROJECT_ID);
_patientSearchFormValues.TokenID = token;
_patientSearchFormValues.ProjectID = 15;//projectID;
_patientSearchFormValues.ProjectID = 15; //projectID;
// print(_patientSearchFormValues.PatientMobileNumber+"dfdfdfddf");
Navigator.of(context).pushNamed(PATIENTS, arguments: {
"patientSearchForm": _patientSearchFormValues,
@ -176,7 +187,19 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
AppTextFormField(
hintText: 'First Name',
onSaved: (value) {
_patientSearchFormValues.FirstName = value;
// _patientSearchFormValues.FirstName = value;
value == null
? _patientSearchFormValues.setFirstName =
"0"
: _patientSearchFormValues.setFirstName =
value;
print("**********Value********");
print(value.toString().trim().isEmpty);
print("**********Value********");
if (value.toString().trim().isEmpty) {
_patientSearchFormValues.setFirstName = "0";
}
},
// validator: (value) {
// return TextValidator().validateName(value);
@ -188,7 +211,19 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
AppTextFormField(
hintText: 'Middle Name',
onSaved: (value) {
_patientSearchFormValues.MiddleName = value;
//_patientSearchFormValues.MiddleName = value;
value == null
? _patientSearchFormValues.setMiddleName =
"0"
: _patientSearchFormValues.setMiddleName =
value;
// value.toString().trim().isEmpty
// ? _patientSearchFormValues.setMiddleName =
// "0"
// : _patientSearchFormValues.setMiddleName =
// value;
},
// validator: (value) {
// return TextValidator().validateName(value);
@ -200,7 +235,16 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
AppTextFormField(
hintText: 'Last Name',
onSaved: (value) {
_patientSearchFormValues.LastName = value;
// _patientSearchFormValues.LastName = value;
value == null
? _patientSearchFormValues.setLastName = "0"
: _patientSearchFormValues.setLastName =
value;
// value.toString().trim().isEmpty
// ? _patientSearchFormValues.setLastName = "0"
// : _patientSearchFormValues.setLastName =
// value;
},
// validator: (value) {
// return TextValidator().validateName(value);
@ -217,8 +261,13 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
// },
inputFormatter: ONLY_NUMBERS,
onSaved: (value) {
_patientSearchFormValues.PatientMobileNumber =
value;
value == null
? _patientSearchFormValues
.setPatientMobileNumber = "0"
: _patientSearchFormValues
.setPatientMobileNumber = value;
// _patientSearchFormValues.PatientMobileNumber =
// value;
},
),
SizedBox(
@ -230,7 +279,12 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
//
inputFormatter: ONLY_NUMBERS,
onSaved: (value) {
_patientSearchFormValues.PatientID = 89000;
// _patientSearchFormValues.PatientID = 89000;
value == null
? _patientSearchFormValues.setPatientID = 0
: _patientSearchFormValues.setPatientID =
int.parse(value);
}),
SizedBox(
height: 10,

@ -236,18 +236,25 @@ class _PatientsScreenState extends State<PatientsScreen> {
String date;
DateTime checkedTime = DateTime.parse(dateString);
DateTime currentTime = DateTime.now();
// print("currentTime.day="+currentTime.day.toString());
// print("checkedTime.day="+checkedTime.day.toString());
// print("currentTime.month="+currentTime.month.toString());
// print("checkedTime.month="+checkedTime.month.toString());
// print("currentTime.year="+currentTime.year.toString());
// print("checkedTime.year="+checkedTime.year.toString());
if ((currentTime.year == checkedTime.year) &&
(currentTime.month == checkedTime.month) &&
(currentTime.day == checkedTime.day)) {
return "TODAY";
return "Today";
} else if ((currentTime.year == checkedTime.year) &&
(currentTime.month == checkedTime.month)) {
if ((currentTime.day - checkedTime.day) == 1) {
return "YESTERDAY";
} else if ((currentTime.day - checkedTime.day) == -1) {
return "TOMORROW";
return "Tomorrow";
}
if ((currentTime.day - checkedTime.day) <= -2) {
return "Next Week";
} else {
@ -285,15 +292,12 @@ class _PatientsScreenState extends State<PatientsScreen> {
Container(
child: Center(
child:
DrAppCircularProgressIndeicator()),
Padding(
padding: const EdgeInsets.fromLTRB(0, 250, 0, 0),
child: DrAppCircularProgressIndeicator(),
)),
),
Container(
child: Text(
"Sorry There is No Data",
style: TextStyle(
color: Theme.of(context).errorColor),
),
)
],
)
: Column(

@ -35,7 +35,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.1"
version: "2.4.0"
bazel_worker:
dependency: transitive
description:
@ -49,7 +49,7 @@ packages:
name: boolean_selector
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
version: "1.0.5"
build:
dependency: transitive
description:
@ -126,7 +126,7 @@ packages:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.3"
version: "1.1.2"
checked_yaml:
dependency: transitive
description:
@ -134,13 +134,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.2"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
code_builder:
dependency: transitive
description:
@ -154,7 +147,7 @@ packages:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.14.12"
version: "1.14.11"
connectivity:
dependency: "direct main"
description:
@ -211,13 +204,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.4"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
fixnum:
dependency: transitive
description:
@ -433,7 +419,7 @@ packages:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.0"
version: "1.6.4"
pedantic:
dependency: transitive
description:
@ -448,6 +434,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1+1"
petitparser:
dependency: transitive
description:
name: petitparser
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.0"
platform:
dependency: transitive
description:
@ -578,7 +571,7 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.0"
version: "1.5.5"
stack_trace:
dependency: transitive
description:
@ -620,7 +613,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.15"
version: "0.2.11"
timing:
dependency: transitive
description:
@ -684,6 +677,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
xml:
dependency: transitive
description:
name: xml
url: "https://pub.dartlang.org"
source: hosted
version: "3.5.0"
yaml:
dependency: transitive
description:

Loading…
Cancel
Save