From 4e37a1621179499516c0ca561422a6662a3427f3 Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Sun, 25 Apr 2021 18:09:45 +0300 Subject: [PATCH] add PatientSearchRequestModel --- lib/client/base_app_client.dart | 16 ------- lib/core/model/PatientSearchRequestModel.dart | 48 +++++++++++++++++++ 2 files changed, 48 insertions(+), 16 deletions(-) create mode 100644 lib/core/model/PatientSearchRequestModel.dart diff --git a/lib/client/base_app_client.dart b/lib/client/base_app_client.dart index 7ae40b0a..e6e6f9fc 100644 --- a/lib/client/base_app_client.dart +++ b/lib/client/base_app_client.dart @@ -15,23 +15,7 @@ import '../UpdatePage.dart'; DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); Helpers helpers = new Helpers(); -//ProjectProvider projectsProvider = new ProjectProvider(); -/* - *@author: Mohammad Aljammal - *@Date:28/5/2020 - *@param: url, onSuccess callBack, onFailure callBack - *@return: - *@desc: - */ - -///Example -/* - await BaseAppClient.post('', - onSuccess: (dynamic response, int statusCode) {}, - onFailure: (String error, int statusCode) {}, - body: null); -* */ class BaseAppClient { //TODO change the post fun to nun static when you change all service post(String endPoint, diff --git a/lib/core/model/PatientSearchRequestModel.dart b/lib/core/model/PatientSearchRequestModel.dart new file mode 100644 index 00000000..72b1aa9e --- /dev/null +++ b/lib/core/model/PatientSearchRequestModel.dart @@ -0,0 +1,48 @@ +class PatientSearchRequestModel { + int doctorID; + String firstName; + String middleName; + String lastName; + String patientMobileNumber; + String patientIdentificationID; + int patientID; + String from; + String to; + + PatientSearchRequestModel( + {this.doctorID, + this.firstName, + this.middleName, + this.lastName, + this.patientMobileNumber, + this.patientIdentificationID, + this.patientID, + this.from, + this.to}); + + PatientSearchRequestModel.fromJson(Map json) { + doctorID = json['DoctorID']; + firstName = json['FirstName']; + middleName = json['MiddleName']; + lastName = json['LastName']; + patientMobileNumber = json['PatientMobileNumber']; + patientIdentificationID = json['PatientIdentificationID']; + patientID = json['PatientID']; + from = json['From']; + to = json['To']; + } + + Map toJson() { + final Map data = new Map(); + data['DoctorID'] = this.doctorID; + data['FirstName'] = this.firstName; + data['MiddleName'] = this.middleName; + data['LastName'] = this.lastName; + data['PatientMobileNumber'] = this.patientMobileNumber; + data['PatientIdentificationID'] = this.patientIdentificationID; + data['PatientID'] = this.patientID; + data['From'] = this.from; + data['To'] = this.to; + return data; + } +}