Merge branch 'sultan' into 'development'

Sultan

See merge request Cloud_Solution/doctor_app_flutter!371
merge-requests/370/merge
Mohammad Aljammal 4 years ago
commit e039094401

@ -4,8 +4,8 @@ const MAX_SMALL_SCREEN = 660;
const ONLY_NUMBERS = "[0-9]";
const ONLY_LETTERS = "[a-zA-Z &'\"]";
const ONLY_DATE = "[0-9/]";
const BASE_URL = 'https://hmgwebservices.com/';
//const BASE_URL = 'https://uat.hmgwebservices.com/';
//const BASE_URL = 'https://hmgwebservices.com/';
const BASE_URL = 'https://uat.hmgwebservices.com/';
const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh";
const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList";
const PATIENT_PROGRESS_NOTE_URL =

@ -128,7 +128,7 @@ class PatientService extends BaseService {
"TokenID": patient.TokenID,
"SessionID": patient.SessionID,
"IsLoginForDoctorApp": patient.IsLoginForDoctorApp,
"PatientOutSA": patient.PatientOutSA
"PatientOutSA": patient.PatientOutSA,
},
);

@ -1,4 +1,3 @@
/*
*@author:Modified by amjad add getter and setter Amjad Amireh
*@Date:11/5/2020
@ -29,91 +28,88 @@ class PatientModel {
String SessionID;
bool IsLoginForDoctorApp;
bool PatientOutSA;
int Searchtype;
int get getProjectID => ProjectID;
int get getProjectID => ProjectID;
set setProjectID(int ProjectID) => this.ProjectID = ProjectID;
set setProjectID(int ProjectID) => this.ProjectID = ProjectID;
int get getClinicID => ClinicID;
int get getClinicID => ClinicID;
set setClinicID(int ClinicID) => this.ClinicID = ClinicID;
set setClinicID(int ClinicID) => this.ClinicID = ClinicID;
int get getDoctorID => DoctorID;
int get getDoctorID => DoctorID;
set setDoctorID(int DoctorID) => this.DoctorID = DoctorID;
set setDoctorID(int DoctorID) => this.DoctorID = DoctorID;
String get getFirstName => FirstName;
set setFirstName(String FirstName) => this.FirstName = FirstName;
set setFirstName(String FirstName) => this.FirstName = FirstName;
String get getMiddleName => MiddleName;
String get getMiddleName => MiddleName;
set setMiddleName(String MiddleName) => this.MiddleName = MiddleName;
set setMiddleName(String MiddleName) => this.MiddleName = MiddleName;
String get getLastName => LastName;
String get getLastName => LastName;
set setLastName(String LastName) => this.LastName = LastName;
set setLastName(String LastName) => this.LastName = LastName;
String get getPatientMobileNumber => PatientMobileNumber;
String get getPatientMobileNumber => PatientMobileNumber;
set setPatientMobileNumber(String PatientMobileNumber) => this.PatientMobileNumber = 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;
int get getPatientID => PatientID;
set setFrom(String From) => this.From = From;
set setPatientID(int PatientID) => this.PatientID = PatientID;
String get getTo => To;
String get getFrom => From;
set setTo(String To) => this.To = To;
set setFrom(String From) => this.From = From;
int get getLanguageID => LanguageID;
String get getTo => To;
set setLanguageID(int LanguageID) => this.LanguageID = LanguageID;
set setTo(String To) => this.To = To;
String get getStamp => stamp;
int get getLanguageID => LanguageID;
set setStamp(String stamp) => this.stamp = stamp;
set setLanguageID(int LanguageID) => this.LanguageID = LanguageID;
String get getIPAdress => IPAdress;
String get getStamp => stamp;
set setIPAdress(String IPAdress) => this.IPAdress = IPAdress;
set setStamp(String stamp) => this.stamp = stamp;
double get getVersionID => VersionID;
String get getIPAdress => IPAdress;
set setVersionID(double VersionID) => this.VersionID = VersionID;
set setIPAdress(String IPAdress) => this.IPAdress = IPAdress;
int get getChannel => Channel;
double get getVersionID => VersionID;
set setChannel(int Channel) => this.Channel = Channel;
set setVersionID(double VersionID) => this.VersionID = VersionID;
String get getTokenID => TokenID;
int get getChannel => Channel;
set setTokenID(String TokenID) => this.TokenID = TokenID;
set setChannel(int Channel) => this.Channel = Channel;
String get getSessionID => SessionID;
String get getTokenID => TokenID;
set setSessionID(String SessionID) => this.SessionID = SessionID;
set setTokenID(String TokenID) => this.TokenID = TokenID;
bool get getIsLoginForDoctorApp => IsLoginForDoctorApp;
set setIsLoginForDoctorApp(bool IsLoginForDoctorApp) => this.IsLoginForDoctorApp = IsLoginForDoctorApp;
bool get getPatientOutSA => PatientOutSA;
set setPatientOutSA(bool PatientOutSA) => this.PatientOutSA = PatientOutSA;
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;
PatientModel(
{this.ProjectID,
@ -135,15 +131,13 @@ class PatientModel {
this.TokenID,
this.SessionID,
this.IsLoginForDoctorApp,
this.PatientOutSA});
this.PatientOutSA,
this.Searchtype});
factory PatientModel.fromJson(Map<String, dynamic> json) => PatientModel(
factory PatientModel.fromJson(Map<String, dynamic> json) => PatientModel(
FirstName: json["FirstName"],
LastName: json["LasttName"],
);
LastName: json["LasttName"],
);
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ProjectID'] = this.ProjectID;
@ -167,8 +161,8 @@ class PatientModel {
data['SessionID'] = this.SessionID;
data['IsLoginForDoctorApp'] = this.IsLoginForDoctorApp;
data['PatientOutSA'] = this.PatientOutSA;
data['Searchtype'] = this.Searchtype;
return data;
}
}
//***************************

@ -79,7 +79,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
String error = "";
String arrivalType;
ProjectViewModel projectsProvider;
var isView;
final _controller = TextEditingController();
PatientModel patient;
@ -239,6 +239,10 @@ class _PatientsScreenState extends State<PatientsScreen> {
if (routeArgs != null && routeArgs.containsKey("isSearch")) {
isSearch = routeArgs['isSearch'];
}
if (routeArgs != null && routeArgs.containsKey("isSearch")) {
isView = routeArgs['isView'];
patient.Searchtype = 1;
}
if (!projectsProvider.isArabic)
patientTypeTitle = SERVICES_PATIANT_HEADER[int.parse(patientType)];
@ -265,7 +269,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
? getPatientArrivalListRequestModel.toJson()
: patient,
patientType,
isView: widget.isView)
isView: isView)
.then((res) {
setState(() {
if (res != null && res['MessageStatus'] == 1) {
@ -289,24 +293,34 @@ class _PatientsScreenState extends State<PatientsScreen> {
lItems = localList;
}
} else {
if (isView == false && val2 == 1) {
lItems = res['GetPatientFileInformation_PRMList'];
}
lItems = res[SERVICES_PATIANT2[val2]];
}
parsed = lItems;
responseModelList = new ModelResponse.fromJson(parsed).list;
//if (val2 == 7) {
responseModelList.sort((a, b) {
DateTime now = DateTime.now();
DateFormat dateFormat = DateFormat("yyyy-MM-dd HH:mm");
String formattedDate =
DateFormat('yyyy-MM-dd ' + a.startTime).format(now);
DateTime dateTimeA = dateFormat.parse(formattedDate);
String formattedDateB =
DateFormat('yyyy-MM-dd ' + b.startTime).format(now);
DateTime dateTimeB = dateFormat.parse(formattedDateB);
var adate = dateTimeA; //a.startTime;
var bdate = dateTimeB;
return adate.compareTo(bdate);
if (b.startTime != null && b.startTime != null) {
DateTime now = DateTime.now();
DateFormat dateFormat = DateFormat("yyyy-MM-dd HH:mm");
String formattedDate =
DateFormat('yyyy-MM-dd ' + a.startTime).format(now);
DateTime dateTimeA = dateFormat.parse(formattedDate);
String formattedDateB =
DateFormat('yyyy-MM-dd ' + b.startTime).format(now);
DateTime dateTimeB = dateFormat.parse(formattedDateB);
var adate = dateTimeA; //a.startTime;
var bdate = dateTimeB;
return adate.compareTo(bdate);
} else {
var adate = convertDateFormat(a.appointmentDate);
var bdate = convertDateFormat(b.appointmentDate);
return bdate.compareTo(adate);
}
});
//}
responseModelList2 = responseModelList;
_isError = false;
} else {

Loading…
Cancel
Save