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,7 +28,7 @@ class PatientModel {
String SessionID; String SessionID;
bool IsLoginForDoctorApp; bool IsLoginForDoctorApp;
bool PatientOutSA; bool PatientOutSA;
int Searchtype;
int get getProjectID => ProjectID; int get getProjectID => ProjectID;
@ -56,7 +55,8 @@ class PatientModel {
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;
@ -104,17 +104,13 @@ class PatientModel {
bool get getIsLoginForDoctorApp => IsLoginForDoctorApp; bool get getIsLoginForDoctorApp => IsLoginForDoctorApp;
set setIsLoginForDoctorApp(bool IsLoginForDoctorApp) => this.IsLoginForDoctorApp = IsLoginForDoctorApp; set setIsLoginForDoctorApp(bool IsLoginForDoctorApp) =>
this.IsLoginForDoctorApp = IsLoginForDoctorApp;
bool get getPatientOutSA => PatientOutSA; bool get getPatientOutSA => PatientOutSA;
set setPatientOutSA(bool PatientOutSA) => this.PatientOutSA = PatientOutSA; set setPatientOutSA(bool PatientOutSA) => this.PatientOutSA = PatientOutSA;
PatientModel( PatientModel(
{this.ProjectID, {this.ProjectID,
this.ClinicID, this.ClinicID,
@ -135,14 +131,12 @@ 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>();
@ -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,11 +293,16 @@ 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) {
if (b.startTime != null && b.startTime != null) {
DateTime now = DateTime.now(); DateTime now = DateTime.now();
DateFormat dateFormat = DateFormat("yyyy-MM-dd HH:mm"); DateFormat dateFormat = DateFormat("yyyy-MM-dd HH:mm");
String formattedDate = String formattedDate =
@ -305,8 +314,13 @@ class _PatientsScreenState extends State<PatientsScreen> {
var adate = dateTimeA; //a.startTime; var adate = dateTimeA; //a.startTime;
var bdate = dateTimeB; var bdate = dateTimeB;
return adate.compareTo(bdate); 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