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,7 +28,7 @@ class PatientModel {
String SessionID;
bool IsLoginForDoctorApp;
bool PatientOutSA;
int Searchtype;
int get getProjectID => ProjectID;
@ -56,7 +55,8 @@ class PatientModel {
String get getPatientMobileNumber => PatientMobileNumber;
set setPatientMobileNumber(String PatientMobileNumber) => this.PatientMobileNumber = PatientMobileNumber;
set setPatientMobileNumber(String PatientMobileNumber) =>
this.PatientMobileNumber = PatientMobileNumber;
// String get getPatientIdentificationID => PatientIdentificationID;
@ -104,17 +104,13 @@ class PatientModel {
bool get getIsLoginForDoctorApp => IsLoginForDoctorApp;
set setIsLoginForDoctorApp(bool IsLoginForDoctorApp) => this.IsLoginForDoctorApp = IsLoginForDoctorApp;
set setIsLoginForDoctorApp(bool IsLoginForDoctorApp) =>
this.IsLoginForDoctorApp = IsLoginForDoctorApp;
bool get getPatientOutSA => PatientOutSA;
set setPatientOutSA(bool PatientOutSA) => this.PatientOutSA = PatientOutSA;
PatientModel(
{this.ProjectID,
this.ClinicID,
@ -135,14 +131,12 @@ class PatientModel {
this.TokenID,
this.SessionID,
this.IsLoginForDoctorApp,
this.PatientOutSA});
this.PatientOutSA,
this.Searchtype});
factory PatientModel.fromJson(Map<String, dynamic> json) => PatientModel(
FirstName: json["FirstName"],
LastName: json["LasttName"],
);
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
@ -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,11 +293,16 @@ 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) {
if (b.startTime != null && b.startTime != null) {
DateTime now = DateTime.now();
DateFormat dateFormat = DateFormat("yyyy-MM-dd HH:mm");
String formattedDate =
@ -305,8 +314,13 @@ class _PatientsScreenState extends State<PatientsScreen> {
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