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_NUMBERS = "[0-9]";
const ONLY_LETTERS = "[a-zA-Z &'\"]"; const ONLY_LETTERS = "[a-zA-Z &'\"]";
const ONLY_DATE = "[0-9/]"; const ONLY_DATE = "[0-9/]";
const BASE_URL = 'https://hmgwebservices.com/'; //const BASE_URL = 'https://hmgwebservices.com/';
//const BASE_URL = 'https://uat.hmgwebservices.com/'; const BASE_URL = 'https://uat.hmgwebservices.com/';
const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh"; const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh";
const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList"; const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList";
const PATIENT_PROGRESS_NOTE_URL = const PATIENT_PROGRESS_NOTE_URL =

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

@ -1,4 +1,3 @@
/* /*
*@author:Modified by amjad add getter and setter Amjad Amireh *@author:Modified by amjad add getter and setter Amjad Amireh
*@Date:11/5/2020 *@Date:11/5/2020
@ -29,91 +28,88 @@ class PatientModel {
String SessionID; String SessionID;
bool IsLoginForDoctorApp; bool IsLoginForDoctorApp;
bool PatientOutSA; 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; 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; // String get getPatientIdentificationID => PatientIdentificationID;
// set setPatientIdentificationID(String PatientIdentificationID) => this.PatientIdentificationID = PatientIdentificationID; // set setPatientIdentificationID(String PatientIdentificationID) => this.PatientIdentificationID = PatientIdentificationID;
int get getPatientID => PatientID; int get getPatientID => PatientID;
set setPatientID(int PatientID) => this.PatientID = PatientID;
String get getFrom => From;
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; String get getSessionID => SessionID;
set setIsLoginForDoctorApp(bool IsLoginForDoctorApp) => this.IsLoginForDoctorApp = IsLoginForDoctorApp;
bool get getPatientOutSA => PatientOutSA;
set setPatientOutSA(bool PatientOutSA) => this.PatientOutSA = PatientOutSA;
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( PatientModel(
{this.ProjectID, {this.ProjectID,
@ -135,15 +131,13 @@ class PatientModel {
this.TokenID, this.TokenID,
this.SessionID, this.SessionID,
this.IsLoginForDoctorApp, 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"], FirstName: json["FirstName"],
LastName: json["LasttName"], LastName: json["LasttName"],
);
);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = new Map<String, dynamic>();
data['ProjectID'] = this.ProjectID; data['ProjectID'] = this.ProjectID;
@ -167,8 +161,8 @@ class PatientModel {
data['SessionID'] = this.SessionID; data['SessionID'] = this.SessionID;
data['IsLoginForDoctorApp'] = this.IsLoginForDoctorApp; data['IsLoginForDoctorApp'] = this.IsLoginForDoctorApp;
data['PatientOutSA'] = this.PatientOutSA; data['PatientOutSA'] = this.PatientOutSA;
data['Searchtype'] = this.Searchtype;
return data; return data;
} }
} }
//*************************** //***************************

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

Loading…
Cancel
Save