migration Services to flutter 2

ipd-changes-for-vida-plus
hussam al-habibeh 5 years ago
parent 931e21ed5e
commit 6e6a7deba5

@ -21,36 +21,34 @@ class BaseAppClient {
{required Map<String, dynamic> body, {required Map<String, dynamic> body,
required Function(dynamic response, int statusCode) onSuccess, required Function(dynamic response, int statusCode) onSuccess,
required Function(String error, int statusCode) onFailure, required Function(String error, int statusCode) onFailure,
bool isAllowAny = false,bool isLiveCare = false}) async { bool isAllowAny = false,
bool isLiveCare = false}) async {
String url; String url;
if(isLiveCare) if (isLiveCare)
url = BASE_URL_LIVE_CARE + endPoint; url = BASE_URL_LIVE_CARE + endPoint;
else else
url = BASE_URL + endPoint; url = BASE_URL + endPoint;
bool callLog = true; bool callLog = true;
try { try {
Map<String, dynamic> profile = await sharedPref.getObj(DOCTOR_PROFILE); Map<String, dynamic> profile = await sharedPref.getObj(DOCTOR_PROFILE);
String token = await sharedPref.getString(TOKEN); String token = await sharedPref.getString(TOKEN);
DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile); DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
if (body['DoctorID'] == null) if (body['DoctorID'] == null) body['DoctorID'] = doctorProfile?.doctorID;
body['DoctorID'] = doctorProfile?.doctorID;
if (body['DoctorID'] == "") body['DoctorID'] = null; if (body['DoctorID'] == "") body['DoctorID'] = null;
if (body['EditedBy'] == null) if (body['EditedBy'] == null) body['EditedBy'] = doctorProfile?.doctorID;
body['EditedBy'] = doctorProfile?.doctorID;
if (body['ProjectID'] == null) { if (body['ProjectID'] == null) {
body['ProjectID'] = doctorProfile?.projectID; body['ProjectID'] = doctorProfile?.projectID;
} }
if (body['ClinicID'] == null) if (body['ClinicID'] == null) body['ClinicID'] = doctorProfile?.clinicID;
body['ClinicID'] = doctorProfile?.clinicID;
if (body['DoctorID'] == '') { if (body['DoctorID'] == '') {
body['DoctorID'] = null; body['DoctorID'] = null;
} }
if (body['EditedBy'] == '') { if (body['EditedBy'] == '') {
body.remove("EditedBy"); body.remove("EditedBy");
} }
if(body['TokenID'] == null){ if (body['TokenID'] == null) {
body['TokenID'] = token ?? ''; body['TokenID'] = token ?? '';
} }
// body['TokenID'] = "@dm!n" ?? ''; // body['TokenID'] = "@dm!n" ?? '';
@ -69,18 +67,16 @@ class BaseAppClient {
body['IsLoginForDoctorApp'] = IS_LOGIN_FOR_DOCTOR_APP; body['IsLoginForDoctorApp'] = IS_LOGIN_FOR_DOCTOR_APP;
body['PatientOutSA'] = body['PatientOutSA'] ?? 0; // PATIENT_OUT_SA; body['PatientOutSA'] = body['PatientOutSA'] ?? 0; // PATIENT_OUT_SA;
if (body['VidaAuthTokenID'] == null) { if (body['VidaAuthTokenID'] == null) {
body['VidaAuthTokenID'] = body['VidaAuthTokenID'] = await sharedPref.getString(VIDA_AUTH_TOKEN_ID);
await sharedPref.getString(VIDA_AUTH_TOKEN_ID);
} }
if (body['VidaRefreshTokenID'] == null) { if (body['VidaRefreshTokenID'] == null) {
body['VidaRefreshTokenID'] = body['VidaRefreshTokenID'] = await sharedPref.getString(VIDA_REFRESH_TOKEN_ID);
await sharedPref.getString(VIDA_REFRESH_TOKEN_ID);
} }
int projectID = await sharedPref.getInt(PROJECT_ID); int projectID = await sharedPref.getInt(PROJECT_ID);
if (projectID == 2 || projectID == 3) if (projectID == 2 || projectID == 3)
body['PatientOutSA'] = true; body['PatientOutSA'] = true;
else if(body.containsKey('facilityId') && body['facilityId']==2 || body['facilityId']==3) else if (body.containsKey('facilityId') && body['facilityId'] == 2 || body['facilityId'] == 3)
body['PatientOutSA'] = true; body['PatientOutSA'] = true;
else else
body['PatientOutSA'] = false; body['PatientOutSA'] = false;
@ -92,28 +88,21 @@ class BaseAppClient {
var asd2; var asd2;
if (await Helpers.checkConnection()) { if (await Helpers.checkConnection()) {
final response = await http.post(Uri.parse(url), final response = await http.post(Uri.parse(url),
body: json.encode(body), body: json.encode(body), headers: {'Content-Type': 'application/json', 'Accept': 'application/json'});
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json'
});
final int statusCode = response.statusCode; final int statusCode = response.statusCode;
if (statusCode < 200 || statusCode >= 400) { if (statusCode < 200 || statusCode >= 400) {
onFailure(Helpers.generateContactAdminMsg(), statusCode); onFailure(Helpers.generateContactAdminMsg(), statusCode);
} else { } else {
var parsed = json.decode(response.body.toString()); var parsed = json.decode(response.body.toString());
if (parsed['ErrorType'] == 4) { if (parsed['ErrorType'] == 4) {
helpers.navigateToUpdatePage(parsed['ErrorEndUserMessage'], helpers.navigateToUpdatePage(parsed['ErrorEndUserMessage'], parsed['AndroidLink'], parsed['IOSLink']);
parsed['AndroidLink'], parsed['IOSLink']);
} }
if (!parsed['IsAuthenticated']) { if (!parsed['IsAuthenticated']) {
if (body['OTP_SendType'] != null) { if (body['OTP_SendType'] != null) {
onFailure(getError(parsed), statusCode); onFailure(getError(parsed), statusCode);
} else if (!isAllowAny) { } else if (!isAllowAny) {
await Provider.of<AuthenticationViewModel>(AppGlobal.CONTEX, await Provider.of<AuthenticationViewModel>(AppGlobal.CONTEX, listen: false).logout();
listen: false)
.logout();
Helpers.showErrorToast('Your session expired Please login again'); Helpers.showErrorToast('Your session expired Please login again');
} }
if (isAllowAny) { if (isAllowAny) {
@ -141,19 +130,15 @@ class BaseAppClient {
{required Map<String, dynamic> body, {required Map<String, dynamic> body,
required Function(dynamic response, int statusCode) onSuccess, required Function(dynamic response, int statusCode) onSuccess,
required Function(String error, int statusCode) onFailure, required Function(String error, int statusCode) onFailure,
required PatiantInformtion patient, PatiantInformtion? patient,
bool isExternal = false}) async { bool isExternal = false}) async {
String url = BASE_URL + endPoint; String url = BASE_URL + endPoint;
try { try {
Map<String, String> headers = { Map<String, String> headers = {'Content-Type': 'application/json', 'Accept': 'application/json'};
'Content-Type': 'application/json',
'Accept': 'application/json'
};
String token = await sharedPref.getString(TOKEN); String token = await sharedPref.getString(TOKEN);
var languageID = var languageID = await sharedPref.getStringWithDefaultValue(APP_Language, 'en');
await sharedPref.getStringWithDefaultValue(APP_Language, 'en');
body['SetupID'] = body.containsKey('SetupID') body['SetupID'] = body.containsKey('SetupID')
? body['SetupID'] != null ? body['SetupID'] != null
? body['SetupID'] ? body['SetupID']
@ -173,12 +158,11 @@ class BaseAppClient {
: PATIENT_OUT_SA_PATIENT_REQ; : PATIENT_OUT_SA_PATIENT_REQ;
if (body.containsKey('isDentalAllowedBackend')) { if (body.containsKey('isDentalAllowedBackend')) {
body['isDentalAllowedBackend'] = body['isDentalAllowedBackend'] = body.containsKey('isDentalAllowedBackend')
body.containsKey('isDentalAllowedBackend') ? body['isDentalAllowedBackend'] != null
? body['isDentalAllowedBackend'] != null ? body['isDentalAllowedBackend']
? body['isDentalAllowedBackend'] : IS_DENTAL_ALLOWED_BACKEND
: IS_DENTAL_ALLOWED_BACKEND : IS_DENTAL_ALLOWED_BACKEND;
: IS_DENTAL_ALLOWED_BACKEND;
} }
body['DeviceTypeID'] = Platform.isAndroid ? 1 : 2; body['DeviceTypeID'] = Platform.isAndroid ? 1 : 2;
@ -186,7 +170,7 @@ class BaseAppClient {
body['PatientType'] = body.containsKey('PatientType') body['PatientType'] = body.containsKey('PatientType')
? body['PatientType'] != null ? body['PatientType'] != null
? body['PatientType'] ? body['PatientType']
: patient.patientType != null : patient!.patientType != null
? patient.patientType ? patient.patientType
: PATIENT_TYPE : PATIENT_TYPE
: PATIENT_TYPE; : PATIENT_TYPE;
@ -194,15 +178,13 @@ class BaseAppClient {
body['PatientTypeID'] = body.containsKey('PatientTypeID') body['PatientTypeID'] = body.containsKey('PatientTypeID')
? body['PatientTypeID'] != null ? body['PatientTypeID'] != null
? body['PatientTypeID'] ? body['PatientTypeID']
: patient.patientType != null : patient!.patientType != null
? patient.patientType ? patient.patientType
: PATIENT_TYPE_ID : PATIENT_TYPE_ID
: PATIENT_TYPE_ID; : PATIENT_TYPE_ID;
body['TokenID'] = body.containsKey('TokenID') ? body['TokenID'] : token; body['TokenID'] = body.containsKey('TokenID') ? body['TokenID'] : token;
body['PatientID'] = body['PatientID'] != null body['PatientID'] = body['PatientID'] != null ? body['PatientID'] : patient!.patientId ?? patient.patientMRN;
? body['PatientID']
: patient.patientId ?? patient.patientMRN;
body['PatientOutSA'] = 0; //user['OutSA']; //TODO change it body['PatientOutSA'] = 0; //user['OutSA']; //TODO change it
body['SessionID'] = SESSION_ID; //getSe body['SessionID'] = SESSION_ID; //getSe
@ -217,8 +199,7 @@ class BaseAppClient {
print("Body : ${json.encode(body)}"); print("Body : ${json.encode(body)}");
if (await Helpers.checkConnection()) { if (await Helpers.checkConnection()) {
final response = await http.post(Uri.parse(url.trim()), final response = await http.post(Uri.parse(url.trim()), body: json.encode(body), headers: headers);
body: json.encode(body), headers: headers);
final int statusCode = response.statusCode; final int statusCode = response.statusCode;
print("statusCode :$statusCode"); print("statusCode :$statusCode");
if (statusCode < 200 || statusCode >= 400 || json == null) { if (statusCode < 200 || statusCode >= 400 || json == null) {
@ -230,8 +211,7 @@ class BaseAppClient {
onSuccess(parsed, statusCode); onSuccess(parsed, statusCode);
} else { } else {
if (parsed['ErrorType'] == 4) { if (parsed['ErrorType'] == 4) {
helpers.navigateToUpdatePage(parsed['ErrorEndUserMessage'], helpers.navigateToUpdatePage(parsed['ErrorEndUserMessage'], parsed['AndroidLink'], parsed['IOSLink']);
parsed['AndroidLink'], parsed['IOSLink']);
} }
if (parsed['IsAuthenticated'] == null) { if (parsed['IsAuthenticated'] == null) {
if (parsed['isSMSSent'] == true) { if (parsed['isSMSSent'] == true) {
@ -247,28 +227,20 @@ class BaseAppClient {
onFailure(getError(parsed), statusCode); onFailure(getError(parsed), statusCode);
} }
} }
} else if (parsed['MessageStatus'] == 1 || } else if (parsed['MessageStatus'] == 1 || parsed['SMSLoginRequired'] == true) {
parsed['SMSLoginRequired'] == true) {
onSuccess(parsed, statusCode); onSuccess(parsed, statusCode);
} else if (parsed['MessageStatus'] == 2 && } else if (parsed['MessageStatus'] == 2 && parsed['IsAuthenticated']) {
parsed['IsAuthenticated']) {
if (parsed['SameClinicApptList'] != null) { if (parsed['SameClinicApptList'] != null) {
onSuccess(parsed, statusCode); onSuccess(parsed, statusCode);
} else { } else {
if (parsed['message'] == null && if (parsed['message'] == null && parsed['ErrorEndUserMessage'] == null) {
parsed['ErrorEndUserMessage'] == null) {
if (parsed['ErrorSearchMsg'] == null) { if (parsed['ErrorSearchMsg'] == null) {
onFailure("Server Error found with no available message", onFailure("Server Error found with no available message", statusCode);
statusCode);
} else { } else {
onFailure(parsed['ErrorSearchMsg'], statusCode); onFailure(parsed['ErrorSearchMsg'], statusCode);
} }
} else { } else {
onFailure( onFailure(parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
parsed['message'] ??
parsed['ErrorEndUserMessage'] ??
parsed['ErrorMessage'],
statusCode);
} }
} }
} else { } else {
@ -278,9 +250,7 @@ class BaseAppClient {
if (parsed['message'] != null) { if (parsed['message'] != null) {
onFailure(parsed['message'] ?? parsed['message'], statusCode); onFailure(parsed['message'] ?? parsed['message'], statusCode);
} else { } else {
onFailure( onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
statusCode);
} }
} }
} }
@ -303,12 +273,8 @@ class BaseAppClient {
if (parsed["ValidationErrors"]["ValidationErrors"] != null && if (parsed["ValidationErrors"]["ValidationErrors"] != null &&
parsed["ValidationErrors"]["ValidationErrors"].length != 0) { parsed["ValidationErrors"]["ValidationErrors"].length != 0) {
for (var i = 0; for (var i = 0; i < parsed["ValidationErrors"]["ValidationErrors"].length; i++) {
i < parsed["ValidationErrors"]["ValidationErrors"].length; error = error + parsed["ValidationErrors"]["ValidationErrors"][i]["Messages"][0] + "\n";
i++) {
error = error +
parsed["ValidationErrors"]["ValidationErrors"][i]["Messages"][0] +
"\n";
} }
} }
} }

@ -1,17 +1,17 @@
class InsuranceApprovalInPatientRequestModel { class InsuranceApprovalInPatientRequestModel {
int patientID; int? patientID;
int patientTypeID; int? patientTypeID;
int eXuldAPPNO; int? eXuldAPPNO;
int projectID; int? projectID;
int languageID; int? languageID;
String stamp; String? stamp;
String iPAdress; String? iPAdress;
double versionID; double? versionID;
int channel; int? channel;
String tokenID; String? tokenID;
String sessionID; String? sessionID;
bool isLoginForDoctorApp; bool? isLoginForDoctorApp;
bool patientOutSA; bool? patientOutSA;
InsuranceApprovalInPatientRequestModel( InsuranceApprovalInPatientRequestModel(
{this.patientID, {this.patientID,

@ -1,32 +1,32 @@
class RequestGetListPharmacyForPrescriptions { class RequestGetListPharmacyForPrescriptions {
int ? latitude; int? latitude;
int ? longitude; int? longitude;
double ?versionID; double? versionID;
int ? channel; int? channel;
int ? languageID; int? languageID;
String ? iPAdress; String? iPAdress;
String ? generalid; String? generalid;
int ? patientOutSA; int? patientOutSA;
String ? sessionID; String? sessionID;
bool ?isDentalAllowedBackend; bool? isDentalAllowedBackend;
int ? deviceTypeID; int? deviceTypeID;
int ? itemID; int? itemID;
RequestGetListPharmacyForPrescriptions( RequestGetListPharmacyForPrescriptions(
{this.latitude, {this.latitude,
this.longitude, this.longitude,
this.versionID, this.versionID,
this.channel, this.channel,
this.languageID, this.languageID,
this.iPAdress, this.iPAdress,
this.generalid, this.generalid,
this.patientOutSA, this.patientOutSA,
this.sessionID, this.sessionID,
this.isDentalAllowedBackend, this.isDentalAllowedBackend,
this.deviceTypeID, this.deviceTypeID,
this.itemID}); this.itemID});
RequestGetListPharmacyForPrescriptions.fromJson(Map<String ?, dynamic> json) { RequestGetListPharmacyForPrescriptions.fromJson(Map<String?, dynamic> json) {
latitude = json['Latitude']; latitude = json['Latitude'];
longitude = json['Longitude']; longitude = json['Longitude'];
versionID = json['VersionID']; versionID = json['VersionID'];
@ -41,8 +41,8 @@ class RequestGetListPharmacyForPrescriptions {
itemID = json['ItemID']; itemID = json['ItemID'];
} }
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['Latitude'] = this.latitude; data['Latitude'] = this.latitude;
data['Longitude'] = this.longitude; data['Longitude'] = this.longitude;
data['VersionID'] = this.versionID; data['VersionID'] = this.versionID;

@ -1,46 +1,46 @@
class RequestPrescriptionReport { class RequestPrescriptionReport {
double ?versionID; double? versionID;
int ? channel; int? channel;
int ? languageID; int? languageID;
String ? iPAdress; String? iPAdress;
String ? generalid; String? generalid;
int ? patientOutSA; int? patientOutSA;
String ? sessionID; String? sessionID;
bool ?isDentalAllowedBackend; bool? isDentalAllowedBackend;
int ? deviceTypeID; int? deviceTypeID;
int ? patientID; int? patientID;
String ? tokenID; String? tokenID;
int ? patientTypeID; int? patientTypeID;
int ? patientType; int? patientType;
int ? appointmentNo; int? appointmentNo;
String ? setupID; String? setupID;
int ? episodeID; int? episodeID;
int ? clinicID; int? clinicID;
int ? projectID; int? projectID;
int ? dischargeNo; int? dischargeNo;
RequestPrescriptionReport( RequestPrescriptionReport(
{this.versionID, {this.versionID,
this.channel, this.channel,
this.languageID, this.languageID,
this.iPAdress, this.iPAdress,
this.generalid, this.generalid,
this.patientOutSA, this.patientOutSA,
this.sessionID, this.sessionID,
this.isDentalAllowedBackend, this.isDentalAllowedBackend,
this.deviceTypeID, this.deviceTypeID,
this.patientID, this.patientID,
this.tokenID, this.tokenID,
this.patientTypeID, this.patientTypeID,
this.patientType, this.patientType,
this.appointmentNo, this.appointmentNo,
this.setupID, this.setupID,
this.episodeID, this.episodeID,
this.clinicID, this.clinicID,
this.projectID, this.projectID,
this.dischargeNo}); this.dischargeNo});
RequestPrescriptionReport.fromJson(Map<String ?, dynamic> json) { RequestPrescriptionReport.fromJson(Map<String?, dynamic> json) {
versionID = json['VersionID']; versionID = json['VersionID'];
channel = json['Channel']; channel = json['Channel'];
languageID = json['LanguageID']; languageID = json['LanguageID'];
@ -62,8 +62,8 @@ class RequestPrescriptionReport {
dischargeNo = json['DischargeNo']; dischargeNo = json['DischargeNo'];
} }
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['VersionID'] = this.versionID; data['VersionID'] = this.versionID;
data['Channel'] = this.channel; data['Channel'] = this.channel;
data['LanguageID'] = this.languageID; data['LanguageID'] = this.languageID;

@ -1,45 +1,46 @@
class RequestPrescriptionReportEnh { class RequestPrescriptionReportEnh {
double ?versionID; double? versionID;
int ? channel; int? channel;
int ? languageID; int? languageID;
String ? iPAdress; String? iPAdress;
String ? generalid; String? generalid;
int ? patientOutSA; int? patientOutSA;
String ? sessionID; String? sessionID;
bool? isDentalAllowedBackend; bool? isDentalAllowedBackend;
int ? deviceTypeID; int? deviceTypeID;
int ? patientID; int? patientID;
String ? tokenID; String? tokenID;
int ? patientTypeID; int? patientTypeID;
int ? patientType; int? patientType;
int ? appointmentNo; int? appointmentNo;
String ? setupID; String? setupID;
int ? dischargeNo; int? dischargeNo;
int ? episodeID; int? episodeID;
int ? clinicID; int? clinicID;
int ? projectID; int? projectID;
RequestPrescriptionReportEnh( RequestPrescriptionReportEnh(
{this.versionID, {this.versionID,
this.channel, this.channel,
this.languageID, this.languageID,
this.iPAdress, this.iPAdress,
this.generalid, this.generalid,
this.patientOutSA, this.patientOutSA,
this.sessionID, this.sessionID,
this.isDentalAllowedBackend, this.isDentalAllowedBackend,
this.deviceTypeID, this.deviceTypeID,
this.patientID, this.patientID,
this.tokenID, this.tokenID,
this.patientTypeID, this.patientTypeID,
this.patientType, this.patientType,
this.appointmentNo, this.appointmentNo,
this.setupID, this.setupID,
this.episodeID, this.episodeID,
this.clinicID, this.clinicID,
this.projectID,this.dischargeNo}); this.projectID,
this.dischargeNo});
RequestPrescriptionReportEnh.fromJson(Map<String ?, dynamic> json) { RequestPrescriptionReportEnh.fromJson(Map<String?, dynamic> json) {
versionID = json['VersionID']; versionID = json['VersionID'];
channel = json['Channel']; channel = json['Channel'];
languageID = json['LanguageID']; languageID = json['LanguageID'];
@ -60,8 +61,8 @@ class RequestPrescriptionReportEnh {
projectID = json['ProjectID']; projectID = json['ProjectID'];
} }
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['VersionID'] = this.versionID; data['VersionID'] = this.versionID;
data['Channel'] = this.channel; data['Channel'] = this.channel;
data['LanguageID'] = this.languageID; data['LanguageID'] = this.languageID;

@ -86,8 +86,8 @@ class ProcedureTempleteRequestModel {
deviceTypeID = json['DeviceTypeID']; deviceTypeID = json['DeviceTypeID'];
} }
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['DoctorID'] = this.doctorID; data['DoctorID'] = this.doctorID;
data['FirstName'] = this.firstName; data['FirstName'] = this.firstName;
data['MiddleName'] = this.middleName; data['MiddleName'] = this.middleName;

@ -89,8 +89,8 @@ class ProcedureTempleteDetailsRequestModel {
deviceTypeID = json['DeviceTypeID']; deviceTypeID = json['DeviceTypeID'];
} }
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['DoctorID'] = this.doctorID; data['DoctorID'] = this.doctorID;
data['FirstName'] = this.firstName; data['FirstName'] = this.firstName;
data['TemplateID'] = this.templateID; data['TemplateID'] = this.templateID;

@ -17,38 +17,38 @@ class ReferralRequest {
int? languageID; int? languageID;
String? stamp; String? stamp;
String? iPAdress; String? iPAdress;
double ?versionID; double? versionID;
int? channel; int? channel;
String? tokenID; String? tokenID;
String? sessionID; String? sessionID;
bool ?isLoginForDoctorApp; bool? isLoginForDoctorApp;
bool ?patientOutSA; bool? patientOutSA;
ReferralRequest( ReferralRequest(
{this.roomID, {this.roomID,
this.referralClinic, this.referralClinic,
this.referralDoctor, this.referralDoctor,
this.createdBy, this.createdBy,
this.editedBy, this.editedBy,
this.patientID, this.patientID,
this.patientTypeID, this.patientTypeID,
this.referringClinic, this.referringClinic,
this.referringDoctor, this.referringDoctor,
this.projectID, this.projectID,
this.admissionNo, this.admissionNo,
this.referringDoctorRemarks, this.referringDoctorRemarks,
this.priority, this.priority,
this.frequency, this.frequency,
this.extension, this.extension,
this.languageID, this.languageID,
this.stamp, this.stamp,
this.iPAdress, this.iPAdress,
this.versionID, this.versionID,
this.channel, this.channel,
this.tokenID, this.tokenID,
this.sessionID, this.sessionID,
this.isLoginForDoctorApp, this.isLoginForDoctorApp,
this.patientOutSA}); this.patientOutSA});
ReferralRequest.fromJson(Map<String?, dynamic> json) { ReferralRequest.fromJson(Map<String?, dynamic> json) {
roomID = json['RoomID']; roomID = json['RoomID'];
@ -77,8 +77,8 @@ class ReferralRequest {
patientOutSA = json['PatientOutSA']; patientOutSA = json['PatientOutSA'];
} }
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['RoomID'] = this.roomID; data['RoomID'] = this.roomID;
data['ReferralClinic'] = this.referralClinic; data['ReferralClinic'] = this.referralClinic;
data['ReferralDoctor'] = this.referralDoctor; data['ReferralDoctor'] = this.referralDoctor;

@ -41,8 +41,8 @@ class SickLeavePatientRequestModel {
sessionID = json['SessionID']; sessionID = json['SessionID'];
} }
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['VersionID'] = this.versionID; data['VersionID'] = this.versionID;
data['Channel'] = this.channel; data['Channel'] = this.channel;
data['LanguageID'] = this.languageID; data['LanguageID'] = this.languageID;

@ -17,28 +17,29 @@ class AuthenticationService extends BaseService {
List<GetIMEIDetailsModel> get dashboardItemsList => _imeiDetails; List<GetIMEIDetailsModel> get dashboardItemsList => _imeiDetails;
NewLoginInformationModel _loginInfo = NewLoginInformationModel(); NewLoginInformationModel _loginInfo = NewLoginInformationModel();
NewLoginInformationModel get loginInfo => _loginInfo; NewLoginInformationModel get loginInfo => _loginInfo;
SendActivationCodeForDoctorAppResponseModel _activationCodeVerificationScreenRes = SendActivationCodeForDoctorAppResponseModel(); SendActivationCodeForDoctorAppResponseModel _activationCodeVerificationScreenRes =
SendActivationCodeForDoctorAppResponseModel();
SendActivationCodeForDoctorAppResponseModel get activationCodeVerificationScreenRes => _activationCodeVerificationScreenRes; SendActivationCodeForDoctorAppResponseModel get activationCodeVerificationScreenRes =>
_activationCodeVerificationScreenRes;
SendActivationCodeForDoctorAppResponseModel _activationCodeForDoctorAppRes = SendActivationCodeForDoctorAppResponseModel(); SendActivationCodeForDoctorAppResponseModel _activationCodeForDoctorAppRes =
SendActivationCodeForDoctorAppResponseModel();
SendActivationCodeForDoctorAppResponseModel get activationCodeForDoctorAppRes => _activationCodeForDoctorAppRes; SendActivationCodeForDoctorAppResponseModel get activationCodeForDoctorAppRes => _activationCodeForDoctorAppRes;
CheckActivationCodeForDoctorAppResponseModel _checkActivationCodeForDoctorAppRes = CheckActivationCodeForDoctorAppResponseModel(); CheckActivationCodeForDoctorAppResponseModel _checkActivationCodeForDoctorAppRes =
CheckActivationCodeForDoctorAppResponseModel();
CheckActivationCodeForDoctorAppResponseModel get checkActivationCodeForDoctorAppRes => _checkActivationCodeForDoctorAppRes; CheckActivationCodeForDoctorAppResponseModel get checkActivationCodeForDoctorAppRes =>
_checkActivationCodeForDoctorAppRes;
Map<String, dynamic> _insertDeviceImeiRes = {}; Map<String, dynamic> _insertDeviceImeiRes = {};
List<DoctorProfileModel> _doctorProfilesList = []; List<DoctorProfileModel> _doctorProfilesList = [];
List<DoctorProfileModel> get doctorProfilesList => _doctorProfilesList; List<DoctorProfileModel> get doctorProfilesList => _doctorProfilesList;
Future selectDeviceImei(imei) async { Future selectDeviceImei(imei) async {
try { try {
await baseAppClient.post(SELECT_DEVICE_IMEI, await baseAppClient.post(SELECT_DEVICE_IMEI, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
_imeiDetails = []; _imeiDetails = [];
response['List_DoctorDeviceDetails'].forEach((v) { response['List_DoctorDeviceDetails'].forEach((v) {
_imeiDetails.add(GetIMEIDetailsModel.fromJson(v)); _imeiDetails.add(GetIMEIDetailsModel.fromJson(v));
@ -49,7 +50,7 @@ class AuthenticationService extends BaseService {
}, body: {"IMEI": imei, "TokenID": "@dm!n"}); }, body: {"IMEI": imei, "TokenID": "@dm!n"});
} catch (error) { } catch (error) {
hasError = true; hasError = true;
super.error = error; super.error = error as String?;
} }
} }
@ -57,8 +58,7 @@ class AuthenticationService extends BaseService {
hasError = false; hasError = false;
_loginInfo = NewLoginInformationModel(); _loginInfo = NewLoginInformationModel();
try { try {
await baseAppClient.post(LOGIN_URL, await baseAppClient.post(LOGIN_URL, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
_loginInfo = NewLoginInformationModel.fromJson(response); _loginInfo = NewLoginInformationModel.fromJson(response);
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
@ -66,9 +66,8 @@ class AuthenticationService extends BaseService {
}, body: userInfo.toJson()); }, body: userInfo.toJson());
} catch (error) { } catch (error) {
hasError = true; hasError = true;
super.error = error; super.error = error as String?;
} }
} }
Future sendActivationCodeVerificationScreen(ActivationCodeForVerificationScreenModel activationCodeModel) async { Future sendActivationCodeVerificationScreen(ActivationCodeForVerificationScreenModel activationCodeModel) async {
@ -77,88 +76,81 @@ class AuthenticationService extends BaseService {
try { try {
await baseAppClient.post(SEND_ACTIVATION_CODE_FOR_VERIFICATION_SCREEN, await baseAppClient.post(SEND_ACTIVATION_CODE_FOR_VERIFICATION_SCREEN,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
_activationCodeVerificationScreenRes = SendActivationCodeForDoctorAppResponseModel.fromJson(response); _activationCodeVerificationScreenRes = SendActivationCodeForDoctorAppResponseModel.fromJson(response);
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: activationCodeModel.toJson()); }, body: activationCodeModel.toJson());
} catch (error) { } catch (error) {
hasError = true; hasError = true;
super.error = error; super.error = error as String?;
} }
} }
Future sendActivationCodeForDoctorApp(ActivationCodeModel activationCodeModel)async { Future sendActivationCodeForDoctorApp(ActivationCodeModel activationCodeModel) async {
hasError = false; hasError = false;
_activationCodeForDoctorAppRes = SendActivationCodeForDoctorAppResponseModel(); _activationCodeForDoctorAppRes = SendActivationCodeForDoctorAppResponseModel();
try { try {
await baseAppClient.post(SEND_ACTIVATION_CODE_FOR_DOCTOR_APP, await baseAppClient.post(SEND_ACTIVATION_CODE_FOR_DOCTOR_APP, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) { _activationCodeForDoctorAppRes = SendActivationCodeForDoctorAppResponseModel.fromJson(response);
_activationCodeForDoctorAppRes = SendActivationCodeForDoctorAppResponseModel.fromJson(response); }, onFailure: (String error, int statusCode) {
}, onFailure: (String error, int statusCode) { hasError = true;
hasError = true; super.error = error;
super.error = error; }, body: activationCodeModel.toJson());
}, body: activationCodeModel.toJson());
} catch (error) { } catch (error) {
hasError = true; hasError = true;
super.error = error; super.error = error as String?;
} }
} }
Future checkActivationCodeForDoctorApp(CheckActivationCodeRequestModel checkActivationCodeRequestModel)async { Future checkActivationCodeForDoctorApp(CheckActivationCodeRequestModel checkActivationCodeRequestModel) async {
hasError = false; hasError = false;
_checkActivationCodeForDoctorAppRes = CheckActivationCodeForDoctorAppResponseModel(); _checkActivationCodeForDoctorAppRes = CheckActivationCodeForDoctorAppResponseModel();
try { try {
await baseAppClient.post(CHECK_ACTIVATION_CODE_FOR_DOCTOR_APP, await baseAppClient.post(CHECK_ACTIVATION_CODE_FOR_DOCTOR_APP, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) { _checkActivationCodeForDoctorAppRes = CheckActivationCodeForDoctorAppResponseModel.fromJson(response);
_checkActivationCodeForDoctorAppRes = CheckActivationCodeForDoctorAppResponseModel.fromJson(response); }, onFailure: (String error, int statusCode) {
}, onFailure: (String error, int statusCode) { hasError = true;
hasError = true; super.error = error;
super.error = error; }, body: checkActivationCodeRequestModel.toJson());
}, body: checkActivationCodeRequestModel.toJson());
} catch (error) { } catch (error) {
hasError = true; hasError = true;
super.error = error; super.error = error as String?;
} }
} }
Future insertDeviceImei(InsertIMEIDetailsModel insertIMEIDetailsModel) async {
Future insertDeviceImei(InsertIMEIDetailsModel insertIMEIDetailsModel)async {
hasError = false; hasError = false;
// insertIMEIDetailsModel.tokenID = "@dm!n"; // insertIMEIDetailsModel.tokenID = "@dm!n";
_insertDeviceImeiRes = {}; _insertDeviceImeiRes = {};
try { try {
await baseAppClient.post(INSERT_DEVICE_IMEI, await baseAppClient.post(INSERT_DEVICE_IMEI, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) { _insertDeviceImeiRes = response;
_insertDeviceImeiRes = response; }, onFailure: (String error, int statusCode) {
}, onFailure: (String error, int statusCode) { hasError = true;
hasError = true; super.error = error;
super.error = error; }, body: insertIMEIDetailsModel.toJson());
}, body: insertIMEIDetailsModel.toJson());
} catch (error) { } catch (error) {
hasError = true; hasError = true;
super.error = error; super.error = error as String?;
} }
} }
Future getDoctorProfileBasedOnClinic(ProfileReqModel profileReqModel)async { Future getDoctorProfileBasedOnClinic(ProfileReqModel profileReqModel) async {
hasError = false; hasError = false;
try { try {
await baseAppClient.post(GET_DOC_PROFILES, await baseAppClient.post(GET_DOC_PROFILES, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) { _doctorProfilesList.clear();
_doctorProfilesList.clear(); response['DoctorProfileList'].forEach((v) {
response['DoctorProfileList'].forEach((v) { _doctorProfilesList.add(DoctorProfileModel.fromJson(v));
_doctorProfilesList.add(DoctorProfileModel.fromJson(v)); });
}); }, onFailure: (String error, int statusCode) {
}, onFailure: (String error, int statusCode) { hasError = true;
hasError = true; super.error = error;
super.error = error; }, body: profileReqModel.toJson());
}, body: profileReqModel.toJson());
} catch (error) { } catch (error) {
hasError = true; hasError = true;
super.error = error; super.error = error as String?;
} }
} }
} }

@ -4,8 +4,7 @@ import 'package:doctor_app_flutter/core/model/hospitals/get_hospitals_response_m
import 'package:doctor_app_flutter/core/service/base/base_service.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart';
class HospitalsService extends BaseService { class HospitalsService extends BaseService {
List<GetHospitalsResponseModel> hospitals = [];
List<GetHospitalsResponseModel> hospitals =List();
Future getHospitals(GetHospitalsRequestModel getHospitalsRequestModel) async { Future getHospitals(GetHospitalsRequestModel getHospitalsRequestModel) async {
hasError = false; hasError = false;

@ -4,15 +4,15 @@ import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
class DischargedPatientService extends BaseService { class DischargedPatientService extends BaseService {
List<PatiantInformtion> myDischargedPatients = List(); List<PatiantInformtion> myDischargedPatients = [];
List<DischargeReferralPatient> myDischargeReferralPatients = List(); List<DischargeReferralPatient> myDischargeReferralPatients = [];
Future getDischargedPatient() async { Future getDischargedPatient() async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
await getDoctorProfile(isGetProfile: true); await getDoctorProfile(isGetProfile: true);
body['DoctorID'] = doctorProfile.doctorID; body['DoctorID'] = doctorProfile!.doctorID;
body['FirstName'] = "0"; body['FirstName'] = "0";
body['MiddleName'] = "0"; body['MiddleName'] = "0";
body['LastName'] = "0"; body['LastName'] = "0";
@ -28,8 +28,7 @@ class DischargedPatientService extends BaseService {
body['PatientTypeID'] = 1; body['PatientTypeID'] = 1;
hasError = false; hasError = false;
myDischargedPatients.clear(); myDischargedPatients.clear();
await baseAppClient.post(GET_DISCHARGE_PATIENT, await baseAppClient.post(GET_DISCHARGE_PATIENT, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
if (response['List_MyDischargePatient'] != null) { if (response['List_MyDischargePatient'] != null) {
response['List_MyDischargePatient'].forEach((v) { response['List_MyDischargePatient'].forEach((v) {
myDischargedPatients.add(PatiantInformtion.fromJson(v)); myDischargedPatients.add(PatiantInformtion.fromJson(v));
@ -45,7 +44,7 @@ class DischargedPatientService extends BaseService {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
await getDoctorProfile(isGetProfile: true); await getDoctorProfile(isGetProfile: true);
body['DoctorID'] = doctorProfile.doctorID; body['DoctorID'] = doctorProfile!.doctorID;
body['FirstName'] = "0"; body['FirstName'] = "0";
body['MiddleName'] = "0"; body['MiddleName'] = "0";
body['LastName'] = "0"; body['LastName'] = "0";
@ -61,8 +60,7 @@ class DischargedPatientService extends BaseService {
body['PatientTypeID'] = 1; body['PatientTypeID'] = 1;
hasError = false; hasError = false;
myDischargeReferralPatients.clear(); myDischargeReferralPatients.clear();
await baseAppClient.post(GET_MY_DISCHARGE_PATIENT, await baseAppClient.post(GET_MY_DISCHARGE_PATIENT, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
if (response['List_MyDischargeReferralPatient'] != null) { if (response['List_MyDischargeReferralPatient'] != null) {
response['List_MyDischargeReferralPatient'].forEach((v) { response['List_MyDischargeReferralPatient'].forEach((v) {
myDischargeReferralPatients.add(DischargeReferralPatient.fromJson(v)); myDischargeReferralPatients.add(DischargeReferralPatient.fromJson(v));

@ -15,18 +15,18 @@ class LiveCarePatientServices extends BaseService {
bool get isFinished => _isFinished; bool get isFinished => _isFinished;
setFinished(bool isFinished){ setFinished(bool isFinished) {
_isFinished = isFinished; _isFinished = isFinished;
} }
var endCallResponse = {}; var endCallResponse = {};
var transferToAdminResponse = {}; var transferToAdminResponse = {};
StartCallRes _startCallRes; late StartCallRes _startCallRes;
StartCallRes get startCallRes => _startCallRes; StartCallRes get startCallRes => _startCallRes;
Future getPendingPatientERForDoctorApp(PendingPatientERForDoctorAppRequestModel pendingPatientERForDoctorAppRequestModel) async{ Future getPendingPatientERForDoctorApp(
PendingPatientERForDoctorAppRequestModel pendingPatientERForDoctorAppRequestModel) async {
hasError = false; hasError = false;
await baseAppClient.post( await baseAppClient.post(
GET_PENDING_PATIENT_ER_FOR_DOCTOR_APP, GET_PENDING_PATIENT_ER_FOR_DOCTOR_APP,
@ -47,58 +47,47 @@ class LiveCarePatientServices extends BaseService {
Future endCall(EndCallReq endCallReq) async { Future endCall(EndCallReq endCallReq) async {
hasError = false; hasError = false;
await baseAppClient.post(END_CALL, onSuccess: (response, statusCode) async { await baseAppClient.post(END_CALL, onSuccess: (response, statusCode) async {
endCallResponse = response; endCallResponse = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: endCallReq.toJson(),isLiveCare: true); }, body: endCallReq.toJson(), isLiveCare: true);
} }
Future startCall(StartCallReq startCallReq) async { Future startCall(StartCallReq startCallReq) async {
hasError = false; hasError = false;
await baseAppClient.post(START_LIVE_CARE_CALL, await baseAppClient.post(START_LIVE_CARE_CALL, onSuccess: (response, statusCode) async {
onSuccess: (response, statusCode) async { _startCallRes = StartCallRes.fromJson(response);
_startCallRes = StartCallRes.fromJson(response);
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: startCallReq.toJson(),isLiveCare: true); }, body: startCallReq.toJson(), isLiveCare: true);
} }
Future endCallWithCharge(int vcID) async{
Future endCallWithCharge(int vcID) async {
hasError = false; hasError = false;
await baseAppClient.post( await baseAppClient.post(END_CALL_WITH_CHARGE, onSuccess: (dynamic response, int statusCode) {
END_CALL_WITH_CHARGE, endCallResponse = response;
onSuccess: (dynamic response, int statusCode) { }, onFailure: (String error, int statusCode) {
endCallResponse = response; hasError = true;
}, super.error = error;
onFailure: (String error, int statusCode) { }, body: {
hasError = true; "VC_ID": vcID,
super.error = error; "generalid": "Cs2020@2016\$2958",
}, }, isLiveCare: true);
body: {
"VC_ID": vcID,"generalid":"Cs2020@2016\$2958",
},isLiveCare: true
);
} }
Future transferToAdmin(int vcID, String notes) async{ Future transferToAdmin(int vcID, String notes) async {
hasError = false; hasError = false;
await baseAppClient.post( await baseAppClient.post(TRANSFERT_TO_ADMIN, onSuccess: (dynamic response, int statusCode) {
TRANSFERT_TO_ADMIN, transferToAdminResponse = response;
onSuccess: (dynamic response, int statusCode) { }, onFailure: (String error, int statusCode) {
transferToAdminResponse = response; hasError = true;
}, super.error = error;
onFailure: (String error, int statusCode) { }, body: {
hasError = true; "VC_ID": vcID,
super.error = error; "IsOutKsa": false,
}, "Notes": notes,
body: { }, isLiveCare: true);
"VC_ID": vcID,
"IsOutKsa": false,
"Notes": notes,
},isLiveCare: true
);
} }
} }

@ -4,13 +4,13 @@ import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/models/doctor/request_add_referred_doctor_remarks.dart'; import 'package:doctor_app_flutter/models/doctor/request_add_referred_doctor_remarks.dart';
class MyReferralInPatientService extends BaseService { class MyReferralInPatientService extends BaseService {
List<MyReferralPatientModel> myReferralPatients = List(); List<MyReferralPatientModel> myReferralPatients = [];
Future getMyReferralPatientService() async { Future getMyReferralPatientService() async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
await getDoctorProfile(); await getDoctorProfile();
body['DoctorID'] = doctorProfile.doctorID; body['DoctorID'] = doctorProfile!.doctorID;
body['FirstName'] = "0"; body['FirstName'] = "0";
body['MiddleName'] = "0"; body['MiddleName'] = "0";
body['LastName'] = "0"; body['LastName'] = "0";
@ -42,21 +42,17 @@ class MyReferralInPatientService extends BaseService {
); );
} }
Future replay( Future replay(String referredDoctorRemarks, MyReferralPatientModel referral) async {
String referredDoctorRemarks, MyReferralPatientModel referral) async {
hasError = false; hasError = false;
await getDoctorProfile(); await getDoctorProfile();
RequestAddReferredDoctorRemarks _requestAddReferredDoctorRemarks = RequestAddReferredDoctorRemarks _requestAddReferredDoctorRemarks = RequestAddReferredDoctorRemarks();
RequestAddReferredDoctorRemarks(); _requestAddReferredDoctorRemarks.projectID = referral.projectID!;
_requestAddReferredDoctorRemarks.projectID = referral.projectID; _requestAddReferredDoctorRemarks.admissionNo = referral.admissionNo.toString();
_requestAddReferredDoctorRemarks.admissionNo = _requestAddReferredDoctorRemarks.lineItemNo = referral.lineItemNo!;
referral.admissionNo.toString(); _requestAddReferredDoctorRemarks.referredDoctorRemarks = referredDoctorRemarks;
_requestAddReferredDoctorRemarks.lineItemNo = referral.lineItemNo; _requestAddReferredDoctorRemarks.editedBy = doctorProfile!.doctorID!;
_requestAddReferredDoctorRemarks.referredDoctorRemarks = _requestAddReferredDoctorRemarks.patientID = referral.patientID!;
referredDoctorRemarks; _requestAddReferredDoctorRemarks.referringDoctor = referral.referringDoctor!;
_requestAddReferredDoctorRemarks.editedBy = doctorProfile.doctorID;
_requestAddReferredDoctorRemarks.patientID = referral.patientID;
_requestAddReferredDoctorRemarks.referringDoctor = referral.referringDoctor;
await baseAppClient.post( await baseAppClient.post(
ADD_REFERRED_DOCTOR_REMARKS, ADD_REFERRED_DOCTOR_REMARKS,
body: _requestAddReferredDoctorRemarks.toJson(), body: _requestAddReferredDoctorRemarks.toJson(),

@ -3,16 +3,15 @@ import 'package:doctor_app_flutter/core/model/patient_muse/PatientMuseResultsMod
import 'package:doctor_app_flutter/core/service/base/base_service.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart';
class PatientMuseService extends BaseService { class PatientMuseService extends BaseService {
List<PatientMuseResultsModel> patientMuseResultsModelList = List(); List<PatientMuseResultsModel> patientMuseResultsModelList = [];
getECGPatient({int patientType, int patientOutSA, int patientID}) async { getECGPatient({int? patientType, int? patientOutSA, int? patientID}) async {
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['PatientType'] = patientType == 7 ? 1 : patientType; body['PatientType'] = patientType == 7 ? 1 : patientType;
body['PatientOutSA'] = patientOutSA; body['PatientOutSA'] = patientOutSA;
body['PatientID'] = patientID; body['PatientID'] = patientID;
hasError = false; hasError = false;
await baseAppClient.post(GET_ECG, await baseAppClient.post(GET_ECG, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
patientMuseResultsModelList.clear(); patientMuseResultsModelList.clear();
response['HIS_GetPatientMuseResultsList'].forEach((v) { response['HIS_GetPatientMuseResultsList'].forEach((v) {
patientMuseResultsModelList.add(PatientMuseResultsModel.fromJson(v)); patientMuseResultsModelList.add(PatientMuseResultsModel.fromJson(v));

@ -4,16 +4,16 @@ import 'package:doctor_app_flutter/core/service/base/base_service.dart';
class ReferralService extends BaseService { class ReferralService extends BaseService {
Future referralPatient( Future referralPatient(
{int admissionNo, {int? admissionNo,
String roomID, String? roomID,
int referralClinic, int? referralClinic,
int referralDoctor, int? referralDoctor,
int patientID, int? patientID,
int patientTypeID, int? patientTypeID,
int priority, int? priority,
int frequency, int? frequency,
String referringDoctorRemarks, String? referringDoctorRemarks,
String extension}) async { String? extension}) async {
await getDoctorProfile(); await getDoctorProfile();
ReferralRequest referralRequest = ReferralRequest(); ReferralRequest referralRequest = ReferralRequest();
referralRequest.admissionNo = admissionNo; referralRequest.admissionNo = admissionNo;
@ -25,11 +25,11 @@ class ReferralService extends BaseService {
referralRequest.priority = priority.toString(); referralRequest.priority = priority.toString();
referralRequest.frequency = frequency.toString(); referralRequest.frequency = frequency.toString();
referralRequest.referringDoctorRemarks = referringDoctorRemarks; referralRequest.referringDoctorRemarks = referringDoctorRemarks;
referralRequest.referringClinic = doctorProfile.clinicID; referralRequest.referringClinic = doctorProfile!.clinicID;
referralRequest.referringDoctor = doctorProfile.doctorID; referralRequest.referringDoctor = doctorProfile!.doctorID;
referralRequest.extension = extension; referralRequest.extension = extension;
referralRequest.editedBy = doctorProfile.doctorID; referralRequest.editedBy = doctorProfile!.doctorID;
referralRequest.createdBy = doctorProfile.doctorID; referralRequest.createdBy = doctorProfile!.doctorID;
referralRequest.patientOutSA = false; referralRequest.patientOutSA = false;
await baseAppClient.post( await baseAppClient.post(

@ -14,7 +14,7 @@ import '../base/lookup-service.dart';
class PatientReferralService extends LookupService { class PatientReferralService extends LookupService {
List<dynamic> projectsList = []; List<dynamic> projectsList = [];
List<dynamic> clinicsList = []; List<dynamic> clinicsList = [];
List<ClinicDoctor> doctorsList = List(); List<ClinicDoctor> doctorsList = [];
List<MyReferredPatientModel> listMyReferredPatientModel = []; List<MyReferredPatientModel> listMyReferredPatientModel = [];
List<PendingReferral> pendingReferralList = []; List<PendingReferral> pendingReferralList = [];
List<PendingReferral> patientReferralList = []; List<PendingReferral> patientReferralList = [];
@ -56,8 +56,7 @@ class PatientReferralService extends LookupService {
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['isSameBranch'] = false; body['isSameBranch'] = false;
await baseAppClient.post(GET_REFERRAL_FACILITIES, await baseAppClient.post(GET_REFERRAL_FACILITIES, onSuccess: (response, statusCode) async {
onSuccess: (response, statusCode) async {
projectsList = response['ProjectInfo']; projectsList = response['ProjectInfo'];
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
@ -84,8 +83,7 @@ class PatientReferralService extends LookupService {
Future getClinicsList(int projectId) async { Future getClinicsList(int projectId) async {
hasError = false; hasError = false;
ClinicByProjectIdRequest _clinicByProjectIdRequest = ClinicByProjectIdRequest _clinicByProjectIdRequest = ClinicByProjectIdRequest();
ClinicByProjectIdRequest();
_clinicByProjectIdRequest.projectID = projectId; _clinicByProjectIdRequest.projectID = projectId;
await baseAppClient.post( await baseAppClient.post(
@ -103,11 +101,9 @@ class PatientReferralService extends LookupService {
); );
} }
Future getDoctorsList( Future getDoctorsList(PatiantInformtion patient, int clinicId, int branchId) async {
PatiantInformtion patient, int clinicId, int branchId) async {
hasError = false; hasError = false;
DoctorsByClinicIdRequest _doctorsByClinicIdRequest = DoctorsByClinicIdRequest _doctorsByClinicIdRequest = DoctorsByClinicIdRequest();
DoctorsByClinicIdRequest();
_doctorsByClinicIdRequest.projectID = branchId; _doctorsByClinicIdRequest.projectID = branchId;
_doctorsByClinicIdRequest.clinicID = clinicId; _doctorsByClinicIdRequest.clinicID = clinicId;
@ -128,9 +124,8 @@ class PatientReferralService extends LookupService {
Future getMyReferredPatient() async { Future getMyReferredPatient() async {
hasError = false; hasError = false;
RequestMyReferralPatientModel _requestMyReferralPatient = RequestMyReferralPatientModel _requestMyReferralPatient = RequestMyReferralPatientModel();
RequestMyReferralPatientModel(); DoctorProfileModel? doctorProfile = await getDoctorProfile();
DoctorProfileModel doctorProfile = await getDoctorProfile();
await baseAppClient.post( await baseAppClient.post(
GET_MY_REFERRED_PATIENT, GET_MY_REFERRED_PATIENT,
@ -140,8 +135,7 @@ class PatientReferralService extends LookupService {
response['List_MyReferredPatient'].forEach((v) { response['List_MyReferredPatient'].forEach((v) {
MyReferredPatientModel item = MyReferredPatientModel.fromJson(v); MyReferredPatientModel item = MyReferredPatientModel.fromJson(v);
if (doctorProfile != null) { if (doctorProfile != null) {
item.isReferralDoctorSameBranch = item.isReferralDoctorSameBranch = doctorProfile.projectID == item.projectID;
doctorProfile.projectID == item.projectID;
} else { } else {
item.isReferralDoctorSameBranch = false; item.isReferralDoctorSameBranch = false;
} }
@ -159,10 +153,10 @@ class PatientReferralService extends LookupService {
Future getPendingReferralList() async { Future getPendingReferralList() async {
hasError = false; hasError = false;
DoctorProfileModel doctorProfile = await getDoctorProfile(); DoctorProfileModel? doctorProfile = await getDoctorProfile();
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
// body['ClinicID'] = 0; // body['ClinicID'] = 0;
body['DoctorID'] = doctorProfile.doctorID; body['DoctorID'] = doctorProfile!.doctorID;
await baseAppClient.post( await baseAppClient.post(
GET_PENDING_REFERRAL_PATIENT, GET_PENDING_REFERRAL_PATIENT,
@ -171,8 +165,7 @@ class PatientReferralService extends LookupService {
response['PendingReferralList'].forEach((v) { response['PendingReferralList'].forEach((v) {
PendingReferral item = PendingReferral.fromJson(v); PendingReferral item = PendingReferral.fromJson(v);
item.isReferralDoctorSameBranch = item.isReferralDoctorSameBranch = item.targetProjectId == item.sourceProjectId;
item.targetProjectId == item.sourceProjectId;
pendingReferralList.add(item); pendingReferralList.add(item);
}); });
}, },
@ -197,8 +190,7 @@ class PatientReferralService extends LookupService {
response['ReferralList']['entityList'].forEach((v) { response['ReferralList']['entityList'].forEach((v) {
PendingReferral item = PendingReferral.fromJson(v); PendingReferral item = PendingReferral.fromJson(v);
item.isReferralDoctorSameBranch = item.isReferralDoctorSameBranch = item.targetProjectId == item.sourceProjectId;
item.targetProjectId == item.sourceProjectId;
patientReferralList.add(item); patientReferralList.add(item);
}); });
}, },
@ -211,10 +203,9 @@ class PatientReferralService extends LookupService {
); );
} }
Future responseReferral( Future responseReferral(PendingReferral pendingReferral, bool isAccepted) async {
PendingReferral pendingReferral, bool isAccepted) async {
hasError = false; hasError = false;
DoctorProfileModel doctorProfile = await getDoctorProfile(); DoctorProfileModel? doctorProfile = await getDoctorProfile();
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['PatientMRN'] = pendingReferral.patientID; body['PatientMRN'] = pendingReferral.patientID;
@ -224,7 +215,7 @@ class PatientReferralService extends LookupService {
body['IsAccepted'] = isAccepted; body['IsAccepted'] = isAccepted;
body['PatientName'] = pendingReferral.patientName; body['PatientName'] = pendingReferral.patientName;
body['ReferralResponse'] = pendingReferral.remarksFromSource; body['ReferralResponse'] = pendingReferral.remarksFromSource;
body['DoctorName'] = doctorProfile.doctorName; body['DoctorName'] = doctorProfile!.doctorName;
await baseAppClient.post( await baseAppClient.post(
RESPONSE_PENDING_REFERRAL_PATIENT, RESPONSE_PENDING_REFERRAL_PATIENT,
@ -239,15 +230,14 @@ class PatientReferralService extends LookupService {
); );
} }
Future makeReferral(PatiantInformtion patient, String isoStringDate, Future makeReferral(PatiantInformtion patient, String isoStringDate, int projectID, int clinicID, int doctorID,
int projectID, int clinicID, int doctorID, String remarks) async { String remarks) async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
List<dynamic> physiotheraphyGoalsList = []; List<dynamic> physiotheraphyGoalsList = [];
listOfPhysiotherapyGoals.forEach((element) { listOfPhysiotherapyGoals.forEach((element) {
physiotheraphyGoalsList physiotheraphyGoalsList.add({"goalId": element.id, "remarks": element.remarks});
.add({"goalId": element.id, "remarks": element.remarks});
}); });
body['PatientMRN'] = patient.patientMRN ?? patient.patientId; body['PatientMRN'] = patient.patientMRN ?? patient.patientId;
@ -296,8 +286,7 @@ class PatientReferralService extends LookupService {
); );
} }
Future verifyReferralDoctorRemarks( Future verifyReferralDoctorRemarks(MyReferredPatientModel referredPatient) async {
MyReferredPatientModel referredPatient) async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();

@ -4,16 +4,15 @@ import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
class PatientInPatientService extends BaseService { class PatientInPatientService extends BaseService {
List<PatiantInformtion> inPatientList = List(); List<PatiantInformtion> inPatientList = [];
List<PatiantInformtion> myInPatientList = List(); List<PatiantInformtion> myInPatientList = [];
Future getInPatientList( Future getInPatientList(PatientSearchRequestModel requestModel, bool isMyInpatient) async {
PatientSearchRequestModel requestModel, bool isMyInpatient) async {
hasError = false; hasError = false;
await getDoctorProfile(); await getDoctorProfile();
if (isMyInpatient) { if (isMyInpatient) {
requestModel.doctorID = doctorProfile.doctorID; requestModel.doctorID = doctorProfile!.doctorID;
} else { } else {
requestModel.doctorID = 0; requestModel.doctorID = 0;
} }
@ -27,7 +26,7 @@ class PatientInPatientService extends BaseService {
response['List_MyInPatient'].forEach((v) { response['List_MyInPatient'].forEach((v) {
PatiantInformtion patient = PatiantInformtion.fromJson(v); PatiantInformtion patient = PatiantInformtion.fromJson(v);
inPatientList.add(patient); inPatientList.add(patient);
if(patient.doctorId == doctorProfile.doctorID){ if (patient.doctorId == doctorProfile!.doctorID) {
myInPatientList.add(patient); myInPatientList.add(patient);
} }
}); });

@ -27,15 +27,12 @@ class PatientService extends BaseService {
List<LabOrdersResModel> _patientLabResultOrdersList = []; List<LabOrdersResModel> _patientLabResultOrdersList = [];
List<LabOrdersResModel> get patientLabResultOrdersList => List<LabOrdersResModel> get patientLabResultOrdersList => _patientLabResultOrdersList;
_patientLabResultOrdersList;
List<PrescriptionResModel> get patientPrescriptionsList => List<PrescriptionResModel> get patientPrescriptionsList => _patientPrescriptionsList;
_patientPrescriptionsList;
List<PrescriptionResModel> _patientPrescriptionsList = []; List<PrescriptionResModel> _patientPrescriptionsList = [];
List<PrescriptionReportForInPatient> get prescriptionReportForInPatientList => List<PrescriptionReportForInPatient> get prescriptionReportForInPatientList => _prescriptionReportForInPatientList;
_prescriptionReportForInPatientList;
List<PrescriptionReportForInPatient> _prescriptionReportForInPatientList = []; List<PrescriptionReportForInPatient> _prescriptionReportForInPatientList = [];
List<RadiologyResModel> _patientRadiologyList = []; List<RadiologyResModel> _patientRadiologyList = [];
@ -79,13 +76,10 @@ class PatientService extends BaseService {
get referalFrequancyList => _referalFrequancyList; get referalFrequancyList => _referalFrequancyList;
DoctorsByClinicIdRequest _doctorsByClinicIdRequest = DoctorsByClinicIdRequest _doctorsByClinicIdRequest = DoctorsByClinicIdRequest();
DoctorsByClinicIdRequest(); STPReferralFrequencyRequest _referralFrequencyRequest = STPReferralFrequencyRequest();
STPReferralFrequencyRequest _referralFrequencyRequest = ClinicByProjectIdRequest _clinicByProjectIdRequest = ClinicByProjectIdRequest();
STPReferralFrequencyRequest(); ReferToDoctorRequest? _referToDoctorRequest;
ClinicByProjectIdRequest _clinicByProjectIdRequest =
ClinicByProjectIdRequest();
ReferToDoctorRequest _referToDoctorRequest;
Future<dynamic> getPatientList(patient, patientType, {isView}) async { Future<dynamic> getPatientList(patient, patientType, {isView}) async {
hasError = false; hasError = false;
@ -181,8 +175,7 @@ class PatientService extends BaseService {
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
_prescriptionReportForInPatientList = []; _prescriptionReportForInPatientList = [];
response['List_PrescriptionReportForInPatient'].forEach((v) { response['List_PrescriptionReportForInPatient'].forEach((v) {
prescriptionReportForInPatientList prescriptionReportForInPatientList.add(PrescriptionReportForInPatient.fromJson(v));
.add(PrescriptionReportForInPatient.fromJson(v));
}); });
}, },
onFailure: (String error, int statusCode) { onFailure: (String error, int statusCode) {
@ -375,39 +368,39 @@ class PatientService extends BaseService {
// TODO send the total model insted of each parameter // TODO send the total model insted of each parameter
Future referToDoctor( Future referToDoctor(
{String selectedDoctorID, {String? selectedDoctorID,
String selectedClinicID, String? selectedClinicID,
int admissionNo, int? admissionNo,
String extension, String? extension,
String priority, String? priority,
String frequency, String? frequency,
String referringDoctorRemarks, String? referringDoctorRemarks,
int patientID, int? patientID,
int patientTypeID, int? patientTypeID,
String roomID, String? roomID,
int projectID}) async { int? projectID}) async {
hasError = false; hasError = false;
// TODO Change it to use it when we implement authentication user // TODO Change it to use it when we implement authentication user
Map profile = await sharedPref.getObj(DOCTOR_PROFILE); Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
DoctorProfileModel doctorProfile = new DoctorProfileModel.fromJson(profile); DoctorProfileModel? doctorProfile = new DoctorProfileModel.fromJson(profile);
int doctorID = doctorProfile.doctorID; int? doctorID = doctorProfile.doctorID;
int clinicId = doctorProfile.clinicID; int? clinicId = doctorProfile.clinicID;
_referToDoctorRequest = ReferToDoctorRequest( _referToDoctorRequest = ReferToDoctorRequest(
projectID: projectID, projectID: projectID!,
admissionNo: admissionNo, admissionNo: admissionNo!,
roomID: roomID, roomID: roomID!,
referralClinic: selectedClinicID.toString(), referralClinic: selectedClinicID.toString(),
referralDoctor: selectedDoctorID.toString(), referralDoctor: selectedDoctorID.toString(),
createdBy: doctorID, createdBy: doctorID!,
editedBy: doctorID, editedBy: doctorID!,
patientID: patientID, patientID: patientID!,
patientTypeID: patientTypeID, patientTypeID: patientTypeID!,
referringClinic: clinicId, referringClinic: clinicId!,
referringDoctor: doctorID, referringDoctor: doctorID,
referringDoctorRemarks: referringDoctorRemarks, referringDoctorRemarks: referringDoctorRemarks!,
priority: priority, priority: priority!,
frequency: frequency, frequency: frequency!,
extension: extension, extension: extension!,
); );
await baseAppClient.post( await baseAppClient.post(
PATIENT_PROGRESS_NOTE_URL, PATIENT_PROGRESS_NOTE_URL,
@ -416,7 +409,7 @@ class PatientService extends BaseService {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, },
body: _referToDoctorRequest.toJson(), body: _referToDoctorRequest!.toJson(),
); );
} }

@ -7,37 +7,28 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
class InsuranceCardService extends BaseService { class InsuranceCardService extends BaseService {
InsuranceApprovalModel _insuranceApprovalModel = InsuranceApprovalModel( InsuranceApprovalModel _insuranceApprovalModel = InsuranceApprovalModel(
isDentalAllowedBackend: false, isDentalAllowedBackend: false, patientTypeID: 1, patientType: 1, eXuldAPPNO: 0, projectID: 0);
patientTypeID: 1, InsuranceApprovalInPatientRequestModel _insuranceApprovalInPatientRequestModel =
patientType: 1,
eXuldAPPNO: 0,
projectID: 0);
InsuranceApprovalInPatientRequestModel
_insuranceApprovalInPatientRequestModel =
InsuranceApprovalInPatientRequestModel(); InsuranceApprovalInPatientRequestModel();
List<InsuranceApprovalModel> _insuranceApproval = List(); List<InsuranceApprovalModel> _insuranceApproval = [];
List<InsuranceApprovalModel> get insuranceApproval => _insuranceApproval; List<InsuranceApprovalModel> get insuranceApproval => _insuranceApproval;
List<InsuranceApprovalInPatientModel> _insuranceApprovalInPatient = List(); List<InsuranceApprovalInPatientModel> _insuranceApprovalInPatient = [];
List<InsuranceApprovalInPatientModel> get insuranceApprovalInPatient => List<InsuranceApprovalInPatientModel> get insuranceApprovalInPatient => _insuranceApprovalInPatient;
_insuranceApprovalInPatient;
Future getInsuranceApprovalInPatient({int mrn}) async { Future getInsuranceApprovalInPatient({int? mrn}) async {
_insuranceApprovalInPatientRequestModel = _insuranceApprovalInPatientRequestModel = InsuranceApprovalInPatientRequestModel(
InsuranceApprovalInPatientRequestModel( patientID: mrn!,
patientID: mrn,
patientTypeID: 1, patientTypeID: 1,
); );
hasError = false; hasError = false;
insuranceApprovalInPatient.clear(); insuranceApprovalInPatient.clear();
await baseAppClient.post(GET_INSURANCE_IN_PATIENT, await baseAppClient.post(GET_INSURANCE_IN_PATIENT, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
//prescriptionsList.clear(); //prescriptionsList.clear();
response['List_ApprovalMain_InPatient'].forEach((prescriptions) { response['List_ApprovalMain_InPatient'].forEach((prescriptions) {
insuranceApprovalInPatient insuranceApprovalInPatient.add(InsuranceApprovalInPatientModel.fromJson(prescriptions));
.add(InsuranceApprovalInPatientModel.fromJson(prescriptions));
}); });
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
@ -45,8 +36,7 @@ class InsuranceCardService extends BaseService {
}, body: _insuranceApprovalInPatientRequestModel.toJson()); }, body: _insuranceApprovalInPatientRequestModel.toJson());
} }
Future getInsuranceApproval(PatiantInformtion patient, Future getInsuranceApproval(PatiantInformtion patient, {int? appointmentNo, int? projectId}) async {
{int appointmentNo, int projectId}) async {
hasError = false; hasError = false;
// _cardList.clear(); // _cardList.clear();
// if (appointmentNo != null) { // if (appointmentNo != null) {
@ -59,8 +49,8 @@ class InsuranceCardService extends BaseService {
_insuranceApprovalModel.projectID = 0; _insuranceApprovalModel.projectID = 0;
// } // }
await baseAppClient.postPatient(GET_PAtIENTS_INSURANCE_APPROVALS, await baseAppClient.postPatient(GET_PAtIENTS_INSURANCE_APPROVALS, patient: patient,
patient: patient, onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
print(response['HIS_Approval_List'].length); print(response['HIS_Approval_List'].length);
_insuranceApproval.clear(); _insuranceApproval.clear();
_insuranceApproval.length = 0; _insuranceApproval.length = 0;

@ -10,16 +10,15 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import '../../base/base_service.dart'; import '../../base/base_service.dart';
class LabsService extends BaseService { class LabsService extends BaseService {
List<PatientLabOrders> patientLabOrdersList = List(); List<PatientLabOrders> patientLabOrdersList = [];
Future getPatientLabOrdersList( Future getPatientLabOrdersList(PatiantInformtion patient, bool isInpatient) async {
PatiantInformtion patient, bool isInpatient) async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
String url = ""; String url = "";
if (isInpatient) { if (isInpatient) {
await getDoctorProfile(); await getDoctorProfile();
body['ProjectID'] = doctorProfile.projectID; body['ProjectID'] = doctorProfile!.projectID;
url = GET_PATIENT_LAB_OREDERS; url = GET_PATIENT_LAB_OREDERS;
} else { } else {
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
@ -27,8 +26,7 @@ class LabsService extends BaseService {
} }
patientLabOrdersList = []; patientLabOrdersList = [];
patientLabOrdersList.clear(); patientLabOrdersList.clear();
await baseAppClient.postPatient(url, patient: patient, await baseAppClient.postPatient(url, patient: patient, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
patientLabOrdersList = []; patientLabOrdersList = [];
if (!isInpatient) { if (!isInpatient) {
response['ListPLO'].forEach((hospital) { response['ListPLO'].forEach((hospital) {
@ -46,19 +44,18 @@ class LabsService extends BaseService {
}, body: body); }, body: body);
} }
RequestPatientLabSpecialResult _requestPatientLabSpecialResult = RequestPatientLabSpecialResult _requestPatientLabSpecialResult = RequestPatientLabSpecialResult();
RequestPatientLabSpecialResult();
List<PatientLabSpecialResult> patientLabSpecialResult = List(); List<PatientLabSpecialResult> patientLabSpecialResult = [];
List<LabResult> labResultList = List(); List<LabResult> labResultList = [];
List<LabOrderResult> labOrdersResultsList = List(); List<LabOrderResult> labOrdersResultsList = [];
Future getLaboratoryResult( Future getLaboratoryResult(
{String projectID, {String? projectID,
int clinicID, int? clinicID,
String invoiceNo, String? invoiceNo,
String orderNo, String? orderNo,
PatiantInformtion patient, PatiantInformtion? patient,
bool isInpatient = false}) async { bool isInpatient = false}) async {
hasError = false; hasError = false;
@ -69,8 +66,8 @@ class LabsService extends BaseService {
_requestPatientLabSpecialResult.orderNo = orderNo; _requestPatientLabSpecialResult.orderNo = orderNo;
body = _requestPatientLabSpecialResult.toJson(); body = _requestPatientLabSpecialResult.toJson();
await baseAppClient.postPatient(GET_Patient_LAB_SPECIAL_RESULT, await baseAppClient.postPatient(GET_Patient_LAB_SPECIAL_RESULT, patient: patient!,
patient: patient, onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
patientLabSpecialResult.clear(); patientLabSpecialResult.clear();
response['ListPLSR'].forEach((hospital) { response['ListPLSR'].forEach((hospital) {
@ -82,29 +79,25 @@ class LabsService extends BaseService {
}, body: body); }, body: body);
} }
Future getPatientLabResult( Future getPatientLabResult({PatientLabOrders? patientLabOrder, PatiantInformtion? patient, bool? isInpatient}) async {
{PatientLabOrders patientLabOrder,
PatiantInformtion patient,
bool isInpatient}) async {
hasError = false; hasError = false;
String url = ""; String url = "";
if (isInpatient) { if (isInpatient!) {
url = GET_PATIENT_LAB_RESULTS; url = GET_PATIENT_LAB_RESULTS;
} else { } else {
url = GET_Patient_LAB_RESULT; url = GET_Patient_LAB_RESULT;
} }
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['InvoiceNo'] = patientLabOrder.invoiceNo; body['InvoiceNo'] = patientLabOrder!.invoiceNo;
body['OrderNo'] = patientLabOrder.orderNo; body['OrderNo'] = patientLabOrder.orderNo;
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
body['SetupID'] = patientLabOrder.setupID; body['SetupID'] = patientLabOrder.setupID;
body['ProjectID'] = patientLabOrder.projectID; body['ProjectID'] = patientLabOrder.projectID;
body['ClinicID'] = patientLabOrder.clinicID ?? 0; body['ClinicID'] = patientLabOrder.clinicID ?? 0;
await baseAppClient.postPatient(url, patient: patient, await baseAppClient.postPatient(url, patient: patient!, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
patientLabSpecialResult = []; patientLabSpecialResult = [];
labResultList = []; labResultList = [];
@ -127,9 +120,7 @@ class LabsService extends BaseService {
} }
Future getPatientLabOrdersResults( Future getPatientLabOrdersResults(
{PatientLabOrders patientLabOrder, {PatientLabOrders? patientLabOrder, String? procedure, PatiantInformtion? patient}) async {
String procedure,
PatiantInformtion patient}) async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
if (patientLabOrder != null) { if (patientLabOrder != null) {
@ -141,8 +132,8 @@ class LabsService extends BaseService {
} }
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
body['Procedure'] = procedure; body['Procedure'] = procedure;
await baseAppClient.postPatient(GET_Patient_LAB_ORDERS_RESULT, await baseAppClient.postPatient(GET_Patient_LAB_ORDERS_RESULT, patient: patient!,
patient: patient, onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
labOrdersResultsList.clear(); labOrdersResultsList.clear();
response['ListPLR'].forEach((lab) { response['ListPLR'].forEach((lab) {
labOrdersResultsList.add(LabOrderResult.fromJson(lab)); labOrdersResultsList.add(LabOrderResult.fromJson(lab));
@ -153,10 +144,9 @@ class LabsService extends BaseService {
}, body: body); }, body: body);
} }
RequestSendLabReportEmail _requestSendLabReportEmail = RequestSendLabReportEmail _requestSendLabReportEmail = RequestSendLabReportEmail();
RequestSendLabReportEmail();
Future sendLabReportEmail({PatientLabOrders patientLabOrder}) async { Future sendLabReportEmail({PatientLabOrders? patientLabOrder}) async {
// _requestSendLabReportEmail.projectID = patientLabOrder.projectID; // _requestSendLabReportEmail.projectID = patientLabOrder.projectID;
// _requestSendLabReportEmail.invoiceNo = patientLabOrder.invoiceNo; // _requestSendLabReportEmail.invoiceNo = patientLabOrder.invoiceNo;
// _requestSendLabReportEmail.doctorName = patientLabOrder.doctorName; // _requestSendLabReportEmail.doctorName = patientLabOrder.doctorName;

@ -13,12 +13,10 @@ class PatientMedicalReportService extends BaseService {
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
await getDoctorProfile(); await getDoctorProfile();
body['AdmissionNo'] = patient.admissionNo; body['AdmissionNo'] = patient.admissionNo;
body['SetupID'] = doctorProfile.setupID; body['SetupID'] = doctorProfile!.setupID;
body['ProjectID'] = doctorProfile.projectID; body['ProjectID'] = doctorProfile!.projectID;
await baseAppClient.postPatient(PATIENT_MEDICAL_REPORT_GET_LIST,
onSuccess: (dynamic response, int statusCode) {
await baseAppClient.postPatient(PATIENT_MEDICAL_REPORT_GET_LIST, onSuccess: (dynamic response, int statusCode) {
medicalReportList.clear(); medicalReportList.clear();
if (response['DAPP_ListMedicalReportList'] != null) { if (response['DAPP_ListMedicalReportList'] != null) {
response['DAPP_ListMedicalReportList'].forEach((v) { response['DAPP_ListMedicalReportList'].forEach((v) {
@ -38,19 +36,17 @@ class PatientMedicalReportService extends BaseService {
body['SetupID'] = "91877"; body['SetupID'] = "91877";
body['TemplateID'] = 43; body['TemplateID'] = 43;
await baseAppClient.post(PATIENT_MEDICAL_REPORT_GET_TEMPLATE, await baseAppClient.post(PATIENT_MEDICAL_REPORT_GET_TEMPLATE, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) { medicalReportTemplate.clear();
if (response['DAPP_GetTemplateByIDList'] != null) {
medicalReportTemplate.clear(); response['DAPP_GetTemplateByIDList'].forEach((v) {
if (response['DAPP_GetTemplateByIDList'] != null) { medicalReportTemplate.add(MedicalReportTemplate.fromJson(v));
response['DAPP_GetTemplateByIDList'].forEach((v) { });
medicalReportTemplate.add(MedicalReportTemplate.fromJson(v)); }
}); }, onFailure: (String error, int statusCode) {
} hasError = true;
}, onFailure: (String error, int statusCode) { super.error = error.toString();
hasError = true; }, body: body);
super.error = error.toString();
}, body: body);
} }
Future insertMedicalReport(PatiantInformtion patient, String htmlText) async { Future insertMedicalReport(PatiantInformtion patient, String htmlText) async {
@ -61,13 +57,11 @@ class PatientMedicalReportService extends BaseService {
body['AdmissionNo'] = patient.admissionNo; body['AdmissionNo'] = patient.admissionNo;
body['MedicalReportHTML'] = htmlText; body['MedicalReportHTML'] = htmlText;
await baseAppClient.postPatient(PATIENT_MEDICAL_REPORT_INSERT, await baseAppClient.postPatient(PATIENT_MEDICAL_REPORT_INSERT, onSuccess: (dynamic response, int statusCode) {},
onSuccess: (dynamic response, int statusCode) { onFailure: (String error, int statusCode) {
hasError = true;
}, onFailure: (String error, int statusCode) { super.error = error.toString();
hasError = true; }, body: body, patient: patient);
super.error = error.toString();
}, body: body, patient: patient);
} }
Future verifyMedicalReport(PatiantInformtion patient, MedicalReportModel medicalReport) async { Future verifyMedicalReport(PatiantInformtion patient, MedicalReportModel medicalReport) async {
@ -79,12 +73,10 @@ class PatientMedicalReportService extends BaseService {
body['InvoiceNo'] = medicalReport.invoiceNo; body['InvoiceNo'] = medicalReport.invoiceNo;
body['LineItemNo'] = medicalReport.lineItemNo; body['LineItemNo'] = medicalReport.lineItemNo;
await baseAppClient.postPatient(PATIENT_MEDICAL_REPORT_VERIFIED, await baseAppClient.postPatient(PATIENT_MEDICAL_REPORT_VERIFIED, onSuccess: (dynamic response, int statusCode) {},
onSuccess: (dynamic response, int statusCode) { onFailure: (String error, int statusCode) {
hasError = true;
}, onFailure: (String error, int statusCode) { super.error = error.toString();
hasError = true; }, body: body, patient: patient);
super.error = error.toString();
}, body: body, patient: patient);
} }
} }

@ -4,7 +4,7 @@ import 'package:doctor_app_flutter/core/model/medical_report/medical_file_reques
import 'package:doctor_app_flutter/core/service/base/base_service.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart';
class MedicalFileService extends BaseService { class MedicalFileService extends BaseService {
List<MedicalFileModel> _medicalFileList = List(); List<MedicalFileModel> _medicalFileList = [];
List<MedicalFileModel> get medicalFileList => _medicalFileList; List<MedicalFileModel> get medicalFileList => _medicalFileList;
MedicalFileRequestModel _fileRequestModel = MedicalFileRequestModel( MedicalFileRequestModel _fileRequestModel = MedicalFileRequestModel(
@ -13,15 +13,13 @@ class MedicalFileService extends BaseService {
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMDAyIiwianRpIjoiNDM1MGNjZTYtYzc3MS00YjBiLThiNDItMGZhY2IzYzgxMjQ4IiwiZW1haWwiOiIiLCJpZCI6IjEwMDIiLCJOYW1lIjoiVEVNUCAtIERPQ1RPUiIsIkVtcGxveWVlSWQiOiI0NzA5IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiI0NzA5IiwiU0VTU0lPTklEIjoiMjE1OTYwNTQiLCJDbGluaWNJZCI6IjEiLCJyb2xlIjpbIkRPQ1RPUlMiLCJIRUFEIERPQ1RPUlMiLCJBRE1JTklTVFJBVE9SUyIsIlJFQ0VQVElPTklTVCIsIkVSIE5VUlNFIiwiRVIgUkVDRVBUSU9OSVNUIiwiUEhBUk1BQ1kgQUNDT1VOVCBTVEFGRiIsIlBIQVJNQUNZIE5VUlNFIiwiSU5QQVRJRU5UIFBIQVJNQUNJU1QiLCJBRE1JU1NJT04gU1RBRkYiLCJBUFBST1ZBTCBTVEFGRiIsIkNPTlNFTlQgIiwiTUVESUNBTCBSRVBPUlQgLSBTSUNLIExFQVZFIE1BTkFHRVIiXSwibmJmIjoxNjA5MjI1MjMwLCJleHAiOjE2MTAwODkyMzAsImlhdCI6MTYwOTIyNTIzMH0.rs7lTBQ1ON4PbR11PBkOyjf818DdeMKuqz2IrCJMYQU", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMDAyIiwianRpIjoiNDM1MGNjZTYtYzc3MS00YjBiLThiNDItMGZhY2IzYzgxMjQ4IiwiZW1haWwiOiIiLCJpZCI6IjEwMDIiLCJOYW1lIjoiVEVNUCAtIERPQ1RPUiIsIkVtcGxveWVlSWQiOiI0NzA5IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiI0NzA5IiwiU0VTU0lPTklEIjoiMjE1OTYwNTQiLCJDbGluaWNJZCI6IjEiLCJyb2xlIjpbIkRPQ1RPUlMiLCJIRUFEIERPQ1RPUlMiLCJBRE1JTklTVFJBVE9SUyIsIlJFQ0VQVElPTklTVCIsIkVSIE5VUlNFIiwiRVIgUkVDRVBUSU9OSVNUIiwiUEhBUk1BQ1kgQUNDT1VOVCBTVEFGRiIsIlBIQVJNQUNZIE5VUlNFIiwiSU5QQVRJRU5UIFBIQVJNQUNJU1QiLCJBRE1JU1NJT04gU1RBRkYiLCJBUFBST1ZBTCBTVEFGRiIsIkNPTlNFTlQgIiwiTUVESUNBTCBSRVBPUlQgLSBTSUNLIExFQVZFIE1BTkFHRVIiXSwibmJmIjoxNjA5MjI1MjMwLCJleHAiOjE2MTAwODkyMzAsImlhdCI6MTYwOTIyNTIzMH0.rs7lTBQ1ON4PbR11PBkOyjf818DdeMKuqz2IrCJMYQU",
); );
Future getMedicalFile({int mrn}) async { Future getMedicalFile({int? mrn}) async {
_fileRequestModel = MedicalFileRequestModel(patientMRN: mrn); _fileRequestModel = MedicalFileRequestModel(patientMRN: mrn);
_fileRequestModel.iPAdress = "9.9.9.9"; _fileRequestModel.iPAdress = "9.9.9.9";
hasError = false; hasError = false;
_medicalFileList.clear(); _medicalFileList.clear();
await baseAppClient.post(GET_MEDICAL_FILE, await baseAppClient.post(GET_MEDICAL_FILE, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) { _medicalFileList.add(MedicalFileModel.fromJson(response['PatientFileList']));
_medicalFileList
.add(MedicalFileModel.fromJson(response['PatientFileList']));
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;

@ -16,9 +16,9 @@ import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-
import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
class PrescriptionService extends LookupService { class PrescriptionService extends LookupService {
List<PrescriptionModel> _prescriptionList = List(); List<PrescriptionModel> _prescriptionList = [];
List<PrescriptionModel> get prescriptionList => _prescriptionList; List<PrescriptionModel> get prescriptionList => _prescriptionList;
List<SearchDrugModel> _drugsList = List(); List<SearchDrugModel> _drugsList = [];
List<SearchDrugModel> get drugsList => _drugsList; List<SearchDrugModel> get drugsList => _drugsList;
List<dynamic> doctorsList = []; List<dynamic> doctorsList = [];
List<GetMedicationResponseModel> allMedicationList = []; List<GetMedicationResponseModel> allMedicationList = [];
@ -31,27 +31,22 @@ class PrescriptionService extends LookupService {
dynamic boxQuantity; dynamic boxQuantity;
PrescriptionReqModel _prescriptionReqModel = PrescriptionReqModel(); PrescriptionReqModel _prescriptionReqModel = PrescriptionReqModel();
ItemByMedicineRequestModel _itemByMedicineRequestModel = ItemByMedicineRequestModel _itemByMedicineRequestModel = ItemByMedicineRequestModel();
ItemByMedicineRequestModel();
SearchDrugRequestModel _drugRequestModel = SearchDrugRequestModel( SearchDrugRequestModel _drugRequestModel = SearchDrugRequestModel(
//search: ["Acetaminophen"], //search: ["Acetaminophen"],
search: ["Amoxicillin"], search: ["Amoxicillin"],
); );
CalculateBoxQuantityRequestModel _boxQuantityRequestModel = CalculateBoxQuantityRequestModel _boxQuantityRequestModel = CalculateBoxQuantityRequestModel();
CalculateBoxQuantityRequestModel();
PostPrescriptionReqModel _postPrescriptionReqModel = PostPrescriptionReqModel _postPrescriptionReqModel = PostPrescriptionReqModel();
PostPrescriptionReqModel();
Future getItem({int itemID}) async { Future getItem({int? itemID}) async {
_itemByMedicineRequestModel = _itemByMedicineRequestModel = ItemByMedicineRequestModel(medicineCode: itemID);
ItemByMedicineRequestModel(medicineCode: itemID);
hasError = false; hasError = false;
await baseAppClient.post(GET_ITEM_BY_MEDICINE, await baseAppClient.post(GET_ITEM_BY_MEDICINE, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
itemMedicineList = []; itemMedicineList = [];
itemMedicineList = response['listItemByMedicineCode']['frequencies']; itemMedicineList = response['listItemByMedicineCode']['frequencies'];
itemMedicineListRoute = response['listItemByMedicineCode']['routes']; itemMedicineListRoute = response['listItemByMedicineCode']['routes'];
@ -62,11 +57,9 @@ class PrescriptionService extends LookupService {
}, body: _itemByMedicineRequestModel.toJson()); }, body: _itemByMedicineRequestModel.toJson());
} }
Future getPatientAssessment( Future getPatientAssessment(GetAssessmentReqModel getAssessmentReqModel) async {
GetAssessmentReqModel getAssessmentReqModel) async {
hasError = false; hasError = false;
await baseAppClient.post(GET_ASSESSMENT, await baseAppClient.post(GET_ASSESSMENT, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
print("Success"); print("Success");
patientAssessmentList.clear(); patientAssessmentList.clear();
response['AssessmentList']['entityList'].forEach((v) { response['AssessmentList']['entityList'].forEach((v) {
@ -78,29 +71,26 @@ class PrescriptionService extends LookupService {
}, body: getAssessmentReqModel.toJson()); }, body: getAssessmentReqModel.toJson());
} }
Future getPrescription({int mrn}) async { Future getPrescription({int? mrn}) async {
_prescriptionReqModel = PrescriptionReqModel( _prescriptionReqModel = PrescriptionReqModel(
patientMRN: mrn, patientMRN: mrn,
); );
hasError = false; hasError = false;
_prescriptionList.clear(); _prescriptionList.clear();
await baseAppClient.post(GET_PRESCRIPTION_LIST, await baseAppClient.post(GET_PRESCRIPTION_LIST, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) { _prescriptionList.add(PrescriptionModel.fromJson(response['PrescriptionList']));
_prescriptionList
.add(PrescriptionModel.fromJson(response['PrescriptionList']));
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: _prescriptionReqModel.toJson()); }, body: _prescriptionReqModel.toJson());
} }
Future getDrugs({String drugName}) async { Future getDrugs({String? drugName}) async {
_drugRequestModel = SearchDrugRequestModel(search: [drugName]); _drugRequestModel = SearchDrugRequestModel(search: [drugName!]);
hasError = false; hasError = false;
await baseAppClient.post(SEARCH_DRUG, await baseAppClient.post(SEARCH_DRUG, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
doctorsList = []; doctorsList = [];
doctorsList = response['MedicationList']['entityList']; doctorsList = response['MedicationList']['entityList'];
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
@ -112,8 +102,7 @@ class PrescriptionService extends LookupService {
Future getMedicationList({String drug = ''}) async { Future getMedicationList({String drug = ''}) async {
hasError = false; hasError = false;
_drugRequestModel.search = ["$drug"]; _drugRequestModel.search = ["$drug"];
await baseAppClient.post(SEARCH_DRUG, await baseAppClient.post(SEARCH_DRUG, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
allMedicationList = []; allMedicationList = [];
response['MedicationList']['entityList'].forEach((v) { response['MedicationList']['entityList'].forEach((v) {
allMedicationList.add(GetMedicationResponseModel.fromJson(v)); allMedicationList.add(GetMedicationResponseModel.fromJson(v));
@ -124,8 +113,7 @@ class PrescriptionService extends LookupService {
}, body: _drugRequestModel.toJson()); }, body: _drugRequestModel.toJson());
} }
Future postPrescription( Future postPrescription(PostPrescriptionReqModel postProcedureReqModel) async {
PostPrescriptionReqModel postProcedureReqModel) async {
hasError = false; hasError = false;
//_prescriptionList.clear(); //_prescriptionList.clear();
await baseAppClient.post( await baseAppClient.post(
@ -141,8 +129,7 @@ class PrescriptionService extends LookupService {
); );
} }
Future updatePrescription( Future updatePrescription(PostPrescriptionReqModel updatePrescriptionReqModel) async {
PostPrescriptionReqModel updatePrescriptionReqModel) async {
hasError = false; hasError = false;
//_prescriptionList.clear(); //_prescriptionList.clear();
await baseAppClient.post( await baseAppClient.post(
@ -158,12 +145,8 @@ class PrescriptionService extends LookupService {
); );
} }
Future getDrugToDrug( Future getDrugToDrug(VitalSignData vital, List<GetAssessmentResModel> lstAssessments,
VitalSignData vital, List<GetAllergiesResModel> allergy, PatiantInformtion patient, List<dynamic> prescription) async {
List<GetAssessmentResModel> lstAssessments,
List<GetAllergiesResModel> allergy,
PatiantInformtion patient,
List<dynamic> prescription) async {
// Map<String, dynamic> request = { // Map<String, dynamic> request = {
// "Prescription": { // "Prescription": {
// "objPatientInfo": {"Gender": "Male", "Age": "21/06/1967"}, // "objPatientInfo": {"Gender": "Male", "Age": "21/06/1967"},
@ -218,8 +201,7 @@ class PrescriptionService extends LookupService {
"Prescription": { "Prescription": {
"objPatientInfo": { "objPatientInfo": {
"Gender": patient.gender == 1 ? 'Male' : 'Female', "Gender": patient.gender == 1 ? 'Male' : 'Female',
"Age": AppDateUtils.convertDateFromServerFormat( "Age": AppDateUtils.convertDateFromServerFormat(patient.dateofBirth!, 'dd/MM/yyyy')
patient.dateofBirth, 'dd/MM/yyyy')
}, },
"objVitalSign": {"Height": vital?.heightCm, "Weight": vital?.weightKg}, "objVitalSign": {"Height": vital?.heightCm, "Weight": vital?.weightKg},
"objPrescriptionItems": prescription, "objPrescriptionItems": prescription,
@ -231,29 +213,22 @@ class PrescriptionService extends LookupService {
}; };
hasError = false; hasError = false;
await baseAppClient.post(DRUG_TO_DRUG, await baseAppClient.post(DRUG_TO_DRUG, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
drugToDrug = []; drugToDrug = [];
drugToDrug = drugToDrug = response['DrugToDrugResponse']['objPrescriptionCheckerResult'];
response['DrugToDrugResponse']['objPrescriptionCheckerResult'];
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: request); }, body: request);
} }
Future calculateBoxQuantity( Future calculateBoxQuantity({int? freq, int? duration, int? itemCode, double? strength}) async {
{int freq, int duration, int itemCode, double strength}) async { _boxQuantityRequestModel =
_boxQuantityRequestModel = CalculateBoxQuantityRequestModel( CalculateBoxQuantityRequestModel(frequency: freq, duration: duration, itemCode: itemCode, strength: strength);
frequency: freq,
duration: duration,
itemCode: itemCode,
strength: strength);
hasError = false; hasError = false;
await baseAppClient.post(GET_BOX_QUANTITY, await baseAppClient.post(GET_BOX_QUANTITY, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
boxQuantity = response['BoxQuantity']; boxQuantity = response['BoxQuantity'];
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
@ -265,10 +240,7 @@ class PrescriptionService extends LookupService {
var allergiesObj = []; var allergiesObj = [];
allergies.forEach((element) { allergies.forEach((element) {
allergiesObj.add({ allergiesObj.add({
"objProperties": { "objProperties": {'Id': element.allergyDiseaseId, 'Name': element.allergyDiseaseName}
'Id': element.allergyDiseaseId,
'Name': element.allergyDiseaseName
}
}); });
}); });
return allergiesObj; return allergiesObj;

@ -15,14 +15,13 @@ import 'package:flutter/cupertino.dart';
import '../../base/base_service.dart'; import '../../base/base_service.dart';
class PrescriptionsService extends BaseService { class PrescriptionsService extends BaseService {
List<Prescriptions> prescriptionsList = List(); List<Prescriptions> prescriptionsList = [];
List<PrescriptionsOrder> prescriptionsOrderList = List(); List<PrescriptionsOrder> prescriptionsOrderList = [];
List<PrescriotionInPatient> prescriptionInPatientList = List(); List<PrescriotionInPatient> prescriptionInPatientList = [];
InPatientPrescriptionRequestModel _inPatientPrescriptionRequestModel = InPatientPrescriptionRequestModel _inPatientPrescriptionRequestModel = InPatientPrescriptionRequestModel();
InPatientPrescriptionRequestModel();
Future getPrescriptionInPatient({int mrn, String adn}) async { Future getPrescriptionInPatient({int? mrn, String? adn}) async {
_inPatientPrescriptionRequestModel = InPatientPrescriptionRequestModel( _inPatientPrescriptionRequestModel = InPatientPrescriptionRequestModel(
patientMRN: mrn, patientMRN: mrn,
admissionNo: adn, admissionNo: adn,
@ -30,12 +29,10 @@ class PrescriptionsService extends BaseService {
hasError = false; hasError = false;
prescriptionInPatientList.clear(); prescriptionInPatientList.clear();
await baseAppClient.post(GET_PRESCRIPTION_IN_PATIENT, await baseAppClient.post(GET_PRESCRIPTION_IN_PATIENT, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
prescriptionsList.clear(); prescriptionsList.clear();
response['List_PrescriptionReportForInPatient'].forEach((prescriptions) { response['List_PrescriptionReportForInPatient'].forEach((prescriptions) {
prescriptionInPatientList prescriptionInPatientList.add(PrescriotionInPatient.fromJson(prescriptions));
.add(PrescriotionInPatient.fromJson(prescriptions));
}); });
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
@ -47,8 +44,7 @@ class PrescriptionsService extends BaseService {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
await baseAppClient.postPatient(PRESCRIPTIONS, patient: patient, await baseAppClient.postPatient(PRESCRIPTIONS, patient: patient, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
prescriptionsList.clear(); prescriptionsList.clear();
response['PatientPrescriptionList'].forEach((prescriptions) { response['PatientPrescriptionList'].forEach((prescriptions) {
prescriptionsList.add(Prescriptions.fromJson(prescriptions)); prescriptionsList.add(Prescriptions.fromJson(prescriptions));
@ -60,15 +56,12 @@ class PrescriptionsService extends BaseService {
} }
RequestPrescriptionReport _requestPrescriptionReport = RequestPrescriptionReport _requestPrescriptionReport =
RequestPrescriptionReport( RequestPrescriptionReport(appointmentNo: 0, isDentalAllowedBackend: false);
appointmentNo: 0, isDentalAllowedBackend: false); List<PrescriptionReport> prescriptionReportList = [];
List<PrescriptionReport> prescriptionReportList = List();
Future getPrescriptionReport( Future getPrescriptionReport({Prescriptions? prescriptions, @required PatiantInformtion? patient}) async {
{Prescriptions prescriptions,
@required PatiantInformtion patient}) async {
hasError = false; hasError = false;
_requestPrescriptionReport.dischargeNo = prescriptions.dischargeNo; _requestPrescriptionReport.dischargeNo = prescriptions!.dischargeNo;
_requestPrescriptionReport.projectID = prescriptions.projectID; _requestPrescriptionReport.projectID = prescriptions.projectID;
_requestPrescriptionReport.clinicID = prescriptions.clinicID; _requestPrescriptionReport.clinicID = prescriptions.clinicID;
_requestPrescriptionReport.setupID = prescriptions.setupID; _requestPrescriptionReport.setupID = prescriptions.setupID;
@ -76,23 +69,18 @@ class PrescriptionsService extends BaseService {
_requestPrescriptionReport.appointmentNo = prescriptions.appointmentNo; _requestPrescriptionReport.appointmentNo = prescriptions.appointmentNo;
await baseAppClient.postPatient( await baseAppClient.postPatient(
prescriptions.isInOutPatient prescriptions.isInOutPatient! ? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT_NEW,
? GET_PRESCRIPTION_REPORT_ENH patient: patient!, onSuccess: (dynamic response, int statusCode) {
: GET_PRESCRIPTION_REPORT_NEW,
patient: patient, onSuccess: (dynamic response, int statusCode) {
prescriptionReportList.clear(); prescriptionReportList.clear();
prescriptionReportEnhList.clear(); prescriptionReportEnhList.clear();
if (prescriptions.isInOutPatient) { if (prescriptions.isInOutPatient!) {
response['ListPRM'].forEach((prescriptions) { response['ListPRM'].forEach((prescriptions) {
prescriptionReportList prescriptionReportList.add(PrescriptionReport.fromJson(prescriptions));
.add(PrescriptionReport.fromJson(prescriptions)); prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(prescriptions));
prescriptionReportEnhList
.add(PrescriptionReportEnh.fromJson(prescriptions));
}); });
} else { } else {
response['INP_GetPrescriptionReport_List'].forEach((prescriptions) { response['INP_GetPrescriptionReport_List'].forEach((prescriptions) {
prescriptionReportList prescriptionReportList.add(PrescriptionReport.fromJson(prescriptions));
.add(PrescriptionReport.fromJson(prescriptions));
}); });
} }
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
@ -101,25 +89,22 @@ class PrescriptionsService extends BaseService {
}, body: _requestPrescriptionReport.toJson()); }, body: _requestPrescriptionReport.toJson());
} }
RequestGetListPharmacyForPrescriptions RequestGetListPharmacyForPrescriptions requestGetListPharmacyForPrescriptions =
requestGetListPharmacyForPrescriptions =
RequestGetListPharmacyForPrescriptions( RequestGetListPharmacyForPrescriptions(
latitude: 0, latitude: 0,
longitude: 0, longitude: 0,
isDentalAllowedBackend: false, isDentalAllowedBackend: false,
); );
List<PharmacyPrescriptions> pharmacyPrescriptionsList = List(); List<PharmacyPrescriptions> pharmacyPrescriptionsList = [];
Future getListPharmacyForPrescriptions( Future getListPharmacyForPrescriptions({int? itemId, @required PatiantInformtion? patient}) async {
{int itemId, @required PatiantInformtion patient}) async {
hasError = false; hasError = false;
requestGetListPharmacyForPrescriptions.itemID = itemId; requestGetListPharmacyForPrescriptions.itemID = itemId;
await baseAppClient.postPatient(GET_PHARMACY_LIST, patient: patient, await baseAppClient.postPatient(GET_PHARMACY_LIST, patient: patient!,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
pharmacyPrescriptionsList.clear(); pharmacyPrescriptionsList.clear();
response['PharmList'].forEach((prescriptions) { response['PharmList'].forEach((prescriptions) {
pharmacyPrescriptionsList pharmacyPrescriptionsList.add(PharmacyPrescriptions.fromJson(prescriptions));
.add(PharmacyPrescriptions.fromJson(prescriptions));
}); });
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
@ -127,39 +112,36 @@ class PrescriptionsService extends BaseService {
}, body: requestGetListPharmacyForPrescriptions.toJson()); }, body: requestGetListPharmacyForPrescriptions.toJson());
} }
RequestPrescriptionReportEnh _requestPrescriptionReportEnh = RequestPrescriptionReportEnh _requestPrescriptionReportEnh = RequestPrescriptionReportEnh(
RequestPrescriptionReportEnh(
isDentalAllowedBackend: false, isDentalAllowedBackend: false,
); );
List<PrescriptionReportEnh> prescriptionReportEnhList = List(); List<PrescriptionReportEnh> prescriptionReportEnhList = [];
Future getPrescriptionReportEnh( Future getPrescriptionReportEnh(
{PrescriptionsOrder prescriptionsOrder, {PrescriptionsOrder? prescriptionsOrder, @required PatiantInformtion? patient}) async {
@required PatiantInformtion patient}) async {
///This logic copy from the old app from class [order-history.component.ts] in line 45 ///This logic copy from the old app from class [order-history.component.ts] in line 45
bool isInPatient = false; bool isInPatient = false;
prescriptionsList.forEach((element) { prescriptionsList.forEach((element) {
if (prescriptionsOrder.appointmentNo == "0") { if (prescriptionsOrder!.appointmentNo == "0") {
if (element.dischargeNo == int.parse(prescriptionsOrder.dischargeID)) { if (element.dischargeNo == int.parse(prescriptionsOrder!.dischargeID)) {
_requestPrescriptionReportEnh.appointmentNo = element.appointmentNo; _requestPrescriptionReportEnh.appointmentNo = element.appointmentNo;
_requestPrescriptionReportEnh.clinicID = element.clinicID; _requestPrescriptionReportEnh.clinicID = element.clinicID;
_requestPrescriptionReportEnh.projectID = element.projectID; _requestPrescriptionReportEnh.projectID = element.projectID;
_requestPrescriptionReportEnh.episodeID = element.episodeID; _requestPrescriptionReportEnh.episodeID = element.episodeID;
_requestPrescriptionReportEnh.setupID = element.setupID; _requestPrescriptionReportEnh.setupID = element.setupID;
_requestPrescriptionReportEnh.dischargeNo = element.dischargeNo; _requestPrescriptionReportEnh.dischargeNo = element.dischargeNo;
isInPatient = element.isInOutPatient; isInPatient = element.isInOutPatient!;
} }
} else { } else {
if (int.parse(prescriptionsOrder.appointmentNo) == if (int.parse(prescriptionsOrder.appointmentNo) == element.appointmentNo) {
element.appointmentNo) {
_requestPrescriptionReportEnh.appointmentNo = element.appointmentNo; _requestPrescriptionReportEnh.appointmentNo = element.appointmentNo;
_requestPrescriptionReportEnh.clinicID = element.clinicID; _requestPrescriptionReportEnh.clinicID = element.clinicID;
_requestPrescriptionReportEnh.projectID = element.projectID; _requestPrescriptionReportEnh.projectID = element.projectID;
_requestPrescriptionReportEnh.episodeID = element.episodeID; _requestPrescriptionReportEnh.episodeID = element.episodeID;
_requestPrescriptionReportEnh.setupID = element.setupID; _requestPrescriptionReportEnh.setupID = element.setupID;
_requestPrescriptionReportEnh.dischargeNo = element.dischargeNo; _requestPrescriptionReportEnh.dischargeNo = element.dischargeNo;
isInPatient = element.isInOutPatient; isInPatient = element.isInOutPatient!;
///call inpGetPrescriptionReport ///call inpGetPrescriptionReport
} }
@ -168,20 +150,17 @@ class PrescriptionsService extends BaseService {
hasError = false; hasError = false;
await baseAppClient.postPatient( await baseAppClient.postPatient(isInPatient ? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT_NEW,
isInPatient ? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT_NEW, patient: patient!, onSuccess: (dynamic response, int statusCode) {
patient: patient, onSuccess: (dynamic response, int statusCode) {
prescriptionReportEnhList.clear(); prescriptionReportEnhList.clear();
if (isInPatient) { if (isInPatient) {
response['ListPRM'].forEach((prescriptions) { response['ListPRM'].forEach((prescriptions) {
prescriptionReportEnhList prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(prescriptions));
.add(PrescriptionReportEnh.fromJson(prescriptions));
}); });
} else { } else {
response['INP_GetPrescriptionReport_List'].forEach((prescriptions) { response['INP_GetPrescriptionReport_List'].forEach((prescriptions) {
PrescriptionReportEnh reportEnh = PrescriptionReportEnh reportEnh = PrescriptionReportEnh.fromJson(prescriptions);
PrescriptionReportEnh.fromJson(prescriptions);
reportEnh.itemDescription = prescriptions['ItemDescriptionN']; reportEnh.itemDescription = prescriptions['ItemDescriptionN'];
prescriptionReportEnhList.add(reportEnh); prescriptionReportEnhList.add(reportEnh);
}); });
@ -195,13 +174,10 @@ class PrescriptionsService extends BaseService {
Future getPrescriptionsOrders() async { Future getPrescriptionsOrders() async {
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
await baseAppClient.post(GET_PRESCRIPTIONS_ALL_ORDERS, await baseAppClient.post(GET_PRESCRIPTIONS_ALL_ORDERS, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
prescriptionsOrderList.clear(); prescriptionsOrderList.clear();
response['PatientER_GetPatientAllPresOrdersList'] response['PatientER_GetPatientAllPresOrdersList'].forEach((prescriptionsOrder) {
.forEach((prescriptionsOrder) { prescriptionsOrderList.add(PrescriptionsOrder.fromJson(prescriptionsOrder));
prescriptionsOrderList
.add(PrescriptionsOrder.fromJson(prescriptionsOrder));
}); });
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;

@ -14,30 +14,26 @@ import 'package:doctor_app_flutter/core/model/procedure/update_procedure_request
import 'package:doctor_app_flutter/core/service/base/base_service.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart';
class ProcedureService extends BaseService { class ProcedureService extends BaseService {
List<GetOrderedProcedureModel> _procedureList = List(); List<GetOrderedProcedureModel> _procedureList = [];
List<GetOrderedProcedureModel> get procedureList => _procedureList; List<GetOrderedProcedureModel> get procedureList => _procedureList;
List<ProcedureValadteModel> _valadteProcedureList = List(); List<ProcedureValadteModel> _valadteProcedureList = [];
List<ProcedureValadteModel> get valadteProcedureList => _valadteProcedureList; List<ProcedureValadteModel> get valadteProcedureList => _valadteProcedureList;
List<CategoriseProcedureModel> _categoriesList = List(); List<CategoriseProcedureModel> _categoriesList = [];
List<CategoriseProcedureModel> get categoriesList => _categoriesList; List<CategoriseProcedureModel> get categoriesList => _categoriesList;
List<Procedures> procedureslist = List(); List<Procedures> procedureslist = [];
List<dynamic> categoryList = []; List<dynamic> categoryList = [];
// List<ProcedureTempleteModel> _templateList = List(); // List<ProcedureTempleteModel> _templateList = List();
// List<ProcedureTempleteModel> get templateList => _templateList; // List<ProcedureTempleteModel> get templateList => _templateList;
List<ProcedureTempleteDetailsModel> templateList = List(); List<ProcedureTempleteDetailsModel> templateList = [];
List<ProcedureTempleteDetailsModel> _templateDetailsList = List(); List<ProcedureTempleteDetailsModel> _templateDetailsList = [];
List<ProcedureTempleteDetailsModel> get templateDetailsList => List<ProcedureTempleteDetailsModel> get templateDetailsList => _templateDetailsList;
_templateDetailsList;
GetOrderedProcedureRequestModel _getOrderedProcedureRequestModel = GetOrderedProcedureRequestModel _getOrderedProcedureRequestModel = GetOrderedProcedureRequestModel();
GetOrderedProcedureRequestModel();
ProcedureTempleteRequestModel _procedureTempleteRequestModel = ProcedureTempleteRequestModel _procedureTempleteRequestModel = ProcedureTempleteRequestModel();
ProcedureTempleteRequestModel(); ProcedureTempleteDetailsRequestModel _procedureTempleteDetailsRequestModel = ProcedureTempleteDetailsRequestModel();
ProcedureTempleteDetailsRequestModel _procedureTempleteDetailsRequestModel =
ProcedureTempleteDetailsRequestModel();
GetProcedureReqModel _getProcedureReqModel = GetProcedureReqModel( GetProcedureReqModel _getProcedureReqModel = GetProcedureReqModel(
// clinicId: 17, // clinicId: 17,
@ -63,8 +59,7 @@ class ProcedureService extends BaseService {
//search: ["DENTAL"], //search: ["DENTAL"],
); );
Future getProcedureTemplate( Future getProcedureTemplate({int? doctorId, int? projectId, int? clinicId, String? categoryID}) async {
{int doctorId, int projectId, int clinicId, String categoryID}) async {
_procedureTempleteRequestModel = ProcedureTempleteRequestModel( _procedureTempleteRequestModel = ProcedureTempleteRequestModel(
tokenID: "@dm!n", tokenID: "@dm!n",
patientID: 0, patientID: 0,
@ -72,19 +67,18 @@ class ProcedureService extends BaseService {
); );
hasError = false; hasError = false;
await baseAppClient.post(GET_TEMPLETE_LIST/*GET_PROCEDURE_TEMPLETE*/, await baseAppClient.post(GET_TEMPLETE_LIST /*GET_PROCEDURE_TEMPLETE*/,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
templateList.clear(); templateList.clear();
response['DAPP_TemplateGetList'].forEach((template) { response['DAPP_TemplateGetList'].forEach((template) {
ProcedureTempleteDetailsModel templateElement = ProcedureTempleteDetailsModel.fromJson(template); ProcedureTempleteDetailsModel templateElement = ProcedureTempleteDetailsModel.fromJson(template);
if(categoryID != null){ if (categoryID != null) {
if(categoryID == templateElement.categoryID){ if (categoryID == templateElement.categoryID) {
templateList.add(templateElement); templateList.add(templateElement);
} }
} else { } else {
templateList.add(templateElement); templateList.add(templateElement);
} }
}); });
// response['HIS_ProcedureTemplateList'].forEach((template) { // response['HIS_ProcedureTemplateList'].forEach((template) {
// _templateList.add(ProcedureTempleteModel.fromJson(template)); // _templateList.add(ProcedureTempleteModel.fromJson(template));
@ -95,21 +89,17 @@ class ProcedureService extends BaseService {
}, body: _procedureTempleteRequestModel.toJson()); }, body: _procedureTempleteRequestModel.toJson());
} }
Future getProcedureTemplateDetails( Future getProcedureTemplateDetails({int? doctorId, int? projectId, int? clinicId, int? templateId}) async {
{int doctorId, int projectId, int clinicId, int templateId}) async {
_procedureTempleteDetailsRequestModel = _procedureTempleteDetailsRequestModel =
ProcedureTempleteDetailsRequestModel( ProcedureTempleteDetailsRequestModel(templateID: templateId, searchType: 1, patientID: 0);
templateID: templateId, searchType: 1, patientID: 0);
hasError = false; hasError = false;
//insuranceApprovalInPatient.clear(); //insuranceApprovalInPatient.clear();
_templateDetailsList.clear(); _templateDetailsList.clear();
await baseAppClient.post(GET_PROCEDURE_TEMPLETE_DETAILS, await baseAppClient.post(GET_PROCEDURE_TEMPLETE_DETAILS, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
//prescriptionsList.clear(); //prescriptionsList.clear();
response['HIS_ProcedureTemplateDetailsList'].forEach((template) { response['HIS_ProcedureTemplateDetailsList'].forEach((template) {
_templateDetailsList _templateDetailsList.add(ProcedureTempleteDetailsModel.fromJson(template));
.add(ProcedureTempleteDetailsModel.fromJson(template));
}); });
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
@ -117,15 +107,12 @@ class ProcedureService extends BaseService {
}, body: _procedureTempleteDetailsRequestModel.toJson()); }, body: _procedureTempleteDetailsRequestModel.toJson());
} }
Future getProcedure({int mrn}) async { Future getProcedure({int? mrn}) async {
_getOrderedProcedureRequestModel = _getOrderedProcedureRequestModel = GetOrderedProcedureRequestModel(patientMRN: mrn);
GetOrderedProcedureRequestModel(patientMRN: mrn);
hasError = false; hasError = false;
_procedureList.clear(); _procedureList.clear();
await baseAppClient.post(GET_PROCEDURE_LIST, await baseAppClient.post(GET_PROCEDURE_LIST, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) { _procedureList.add(GetOrderedProcedureModel.fromJson(response['OrderedProcedureList']));
_procedureList.add(
GetOrderedProcedureModel.fromJson(response['OrderedProcedureList']));
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
@ -135,8 +122,7 @@ class ProcedureService extends BaseService {
Future getCategory() async { Future getCategory() async {
hasError = false; hasError = false;
await baseAppClient.post(GET_LIST_CATEGORISE, await baseAppClient.post(GET_LIST_CATEGORISE, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
categoryList = []; categoryList = [];
categoryList = response['listProcedureCategories']['entityList']; categoryList = response['listProcedureCategories']['entityList'];
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
@ -145,7 +131,7 @@ class ProcedureService extends BaseService {
}, body: Map()); }, body: Map());
} }
Future getProcedureCategory({String categoryName, String categoryID,patientId}) async { Future getProcedureCategory({String? categoryName, String? categoryID, patientId}) async {
_getProcedureCategoriseReqModel = GetProcedureReqModel( _getProcedureCategoriseReqModel = GetProcedureReqModel(
search: ["$categoryName"], search: ["$categoryName"],
patientMRN: patientId, patientMRN: patientId,
@ -156,10 +142,8 @@ class ProcedureService extends BaseService {
); );
hasError = false; hasError = false;
_categoriesList.clear(); _categoriesList.clear();
await baseAppClient.post(GET_CATEGORISE_PROCEDURE, await baseAppClient.post(GET_CATEGORISE_PROCEDURE, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) { _categoriesList.add(CategoriseProcedureModel.fromJson(response['ProcedureList']));
_categoriesList
.add(CategoriseProcedureModel.fromJson(response['ProcedureList']));
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
@ -169,8 +153,7 @@ class ProcedureService extends BaseService {
Future postProcedure(PostProcedureReqModel postProcedureReqModel) async { Future postProcedure(PostProcedureReqModel postProcedureReqModel) async {
hasError = false; hasError = false;
_procedureList.clear(); _procedureList.clear();
await baseAppClient.post(POST_PROCEDURE_LIST, await baseAppClient.post(POST_PROCEDURE_LIST, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
print("Success"); print("Success");
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
@ -178,12 +161,10 @@ class ProcedureService extends BaseService {
}, body: postProcedureReqModel.toJson()); }, body: postProcedureReqModel.toJson());
} }
Future updateProcedure( Future updateProcedure(UpdateProcedureRequestModel updateProcedureRequestModel) async {
UpdateProcedureRequestModel updateProcedureRequestModel) async {
hasError = false; hasError = false;
_procedureList.clear(); _procedureList.clear();
await baseAppClient.post(UPDATE_PROCEDURE, await baseAppClient.post(UPDATE_PROCEDURE, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
print("ACCEPTED"); print("ACCEPTED");
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
@ -191,14 +172,11 @@ class ProcedureService extends BaseService {
}, body: updateProcedureRequestModel.toJson()); }, body: updateProcedureRequestModel.toJson());
} }
Future valadteProcedure( Future valadteProcedure(ProcedureValadteRequestModel procedureValadteRequestModel) async {
ProcedureValadteRequestModel procedureValadteRequestModel) async {
hasError = false; hasError = false;
_valadteProcedureList.clear(); _valadteProcedureList.clear();
await baseAppClient.post(GET_PROCEDURE_VALIDATION, await baseAppClient.post(GET_PROCEDURE_VALIDATION, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) { _valadteProcedureList.add(ProcedureValadteModel.fromJson(response['ValidateProcedureList']));
_valadteProcedureList.add(
ProcedureValadteModel.fromJson(response['ValidateProcedureList']));
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;

@ -6,21 +6,17 @@ import 'package:flutter/cupertino.dart';
import '../../base/base_service.dart'; import '../../base/base_service.dart';
class RadiologyService extends BaseService { class RadiologyService extends BaseService {
List<FinalRadiology> finalRadiologyList = List(); List<FinalRadiology> finalRadiologyList = [];
String url = ''; String url = '';
Future getRadImageURL( Future getRadImageURL({int? invoiceNo, int? lineItem, int? projectId, @required PatiantInformtion? patient}) async {
{int invoiceNo,
int lineItem,
int projectId,
@required PatiantInformtion patient}) async {
hasError = false; hasError = false;
final Map<String, dynamic> body = new Map<String, dynamic>(); final Map<String, dynamic> body = new Map<String, dynamic>();
body['InvoiceNo'] = invoiceNo; body['InvoiceNo'] = invoiceNo;
body['LineItemNo'] = lineItem; body['LineItemNo'] = lineItem;
body['ProjectID'] = projectId; body['ProjectID'] = projectId;
await baseAppClient.postPatient(GET_RAD_IMAGE_URL, patient: patient, await baseAppClient.postPatient(GET_RAD_IMAGE_URL, patient: patient!,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
url = response['Data']; url = response['Data'];
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
@ -29,8 +25,7 @@ class RadiologyService extends BaseService {
}, body: body); }, body: body);
} }
Future getPatientRadOrders(PatiantInformtion patient, Future getPatientRadOrders(PatiantInformtion patient, {isInPatient = false}) async {
{isInPatient = false}) async {
String url = GET_PATIENT_ORDERS; String url = GET_PATIENT_ORDERS;
final Map<String, dynamic> body = new Map<String, dynamic>(); final Map<String, dynamic> body = new Map<String, dynamic>();
if (isInPatient) { if (isInPatient) {
@ -39,8 +34,7 @@ class RadiologyService extends BaseService {
} }
hasError = false; hasError = false;
await baseAppClient.postPatient(url, patient: patient, await baseAppClient.postPatient(url, patient: patient, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
finalRadiologyList = []; finalRadiologyList = [];
String label = "ListRAD"; String label = "ListRAD";
if (isInPatient) { if (isInPatient) {

@ -16,13 +16,12 @@ class SickLeaveService extends BaseService {
List get getReasons => reasonse; List get getReasons => reasonse;
List reasonse = []; List reasonse = [];
List<GetAllSickLeaveResponse> get getAllSickLeave => _getAllsickLeave; List<GetAllSickLeaveResponse> get getAllSickLeave => _getAllsickLeave;
List<GetAllSickLeaveResponse> _getAllsickLeave = List(); List<GetAllSickLeaveResponse> _getAllsickLeave = [];
List get coveringDoctorsList => _coveringDoctors; List get coveringDoctorsList => _coveringDoctors;
List _coveringDoctors = []; List _coveringDoctors = [];
List<GetRescheduleLeavesResponse> get getAllRescheduleLeave => List<GetRescheduleLeavesResponse> get getAllRescheduleLeave => _getReScheduleLeave;
_getReScheduleLeave;
List<GetRescheduleLeavesResponse> _getReScheduleLeave = []; List<GetRescheduleLeavesResponse> _getReScheduleLeave = [];
dynamic get postReschedule => _postReschedule; dynamic get postReschedule => _postReschedule;
dynamic _postReschedule; dynamic _postReschedule;
@ -30,10 +29,9 @@ class SickLeaveService extends BaseService {
dynamic get sickLeaveResponse => _sickLeaveResponse; dynamic get sickLeaveResponse => _sickLeaveResponse;
dynamic _sickLeaveResponse; dynamic _sickLeaveResponse;
List<SickLeavePatientModel> getAllSickLeavePatient = List(); List<SickLeavePatientModel> getAllSickLeavePatient = [];
SickLeavePatientRequestModel _sickLeavePatientRequestModel = SickLeavePatientRequestModel _sickLeavePatientRequestModel = SickLeavePatientRequestModel();
SickLeavePatientRequestModel();
Future getStatistics(appoNo, patientMRN) async { Future getStatistics(appoNo, patientMRN) async {
hasError = false; hasError = false;
@ -73,8 +71,7 @@ class SickLeaveService extends BaseService {
Future extendSickLeave(GetAllSickLeaveResponse request) async { Future extendSickLeave(GetAllSickLeaveResponse request) async {
var extendSickLeaveRequest = ExtendSickLeaveRequest(); var extendSickLeaveRequest = ExtendSickLeaveRequest();
extendSickLeaveRequest.patientMRN = extendSickLeaveRequest.patientMRN = request.patientMRN.toString(); //'3120746';
request.patientMRN.toString(); //'3120746';
extendSickLeaveRequest.previousRequestNo = request.requestNo.toString(); extendSickLeaveRequest.previousRequestNo = request.requestNo.toString();
extendSickLeaveRequest.noOfDays = request.noOfDays.toString(); extendSickLeaveRequest.noOfDays = request.noOfDays.toString();
extendSickLeaveRequest.remarks = request.remarks; extendSickLeaveRequest.remarks = request.remarks;
@ -114,8 +111,8 @@ class SickLeaveService extends BaseService {
} }
Future getSickLeavePatient(patientMRN) async { Future getSickLeavePatient(patientMRN) async {
_sickLeavePatientRequestModel = SickLeavePatientRequestModel( _sickLeavePatientRequestModel =
patientID: patientMRN, patientTypeID: 2, patientType: 1); SickLeavePatientRequestModel(patientID: patientMRN, patientTypeID: 2, patientType: 1);
hasError = false; hasError = false;
getAllSickLeavePatient = []; getAllSickLeavePatient = [];
getAllSickLeavePatient.clear(); getAllSickLeavePatient.clear();

@ -32,7 +32,7 @@ class SOAPService extends LookupService {
List<GetPatientProgressNoteResModel> patientProgressNoteList = []; List<GetPatientProgressNoteResModel> patientProgressNoteList = [];
List<GetAssessmentResModel> patientAssessmentList = []; List<GetAssessmentResModel> patientAssessmentList = [];
int episodeID; int? episodeID;
Future getAllergies(GetAllergiesRequestModel getAllergiesRequestModel) async { Future getAllergies(GetAllergiesRequestModel getAllergiesRequestModel) async {
await baseAppClient.post( await baseAppClient.post(
GET_ALLERGIES, GET_ALLERGIES,
@ -53,8 +53,7 @@ class SOAPService extends LookupService {
Future postEpisode(PostEpisodeReqModel postEpisodeReqModel) async { Future postEpisode(PostEpisodeReqModel postEpisodeReqModel) async {
hasError = false; hasError = false;
await baseAppClient.post(POST_EPISODE, await baseAppClient.post(POST_EPISODE, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
print("Success"); print("Success");
episodeID = response['EpisodeID']; episodeID = response['EpisodeID'];
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
@ -66,8 +65,7 @@ class SOAPService extends LookupService {
Future postAllergy(PostAllergyRequestModel postAllergyRequestModel) async { Future postAllergy(PostAllergyRequestModel postAllergyRequestModel) async {
hasError = false; hasError = false;
await baseAppClient.post(POST_ALLERGY, await baseAppClient.post(POST_ALLERGY, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
print("Success"); print("Success");
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
@ -75,11 +73,9 @@ class SOAPService extends LookupService {
}, body: postAllergyRequestModel.toJson()); }, body: postAllergyRequestModel.toJson());
} }
Future postHistories( Future postHistories(PostHistoriesRequestModel postHistoriesRequestModel) async {
PostHistoriesRequestModel postHistoriesRequestModel) async {
hasError = false; hasError = false;
await baseAppClient.post(POST_HISTORY, await baseAppClient.post(POST_HISTORY, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
print("Success"); print("Success");
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
@ -87,11 +83,9 @@ class SOAPService extends LookupService {
}, body: postHistoriesRequestModel.toJson()); }, body: postHistoriesRequestModel.toJson());
} }
Future postChiefComplaint( Future postChiefComplaint(PostChiefComplaintRequestModel postChiefComplaintRequestModel) async {
PostChiefComplaintRequestModel postChiefComplaintRequestModel) async {
hasError = false; hasError = false;
await baseAppClient.post(POST_CHIEF_COMPLAINT, await baseAppClient.post(POST_CHIEF_COMPLAINT, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
print("Success"); print("Success");
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
@ -99,11 +93,9 @@ class SOAPService extends LookupService {
}, body: postChiefComplaintRequestModel.toJson()); }, body: postChiefComplaintRequestModel.toJson());
} }
Future postPhysicalExam( Future postPhysicalExam(PostPhysicalExamRequestModel postPhysicalExamRequestModel) async {
PostPhysicalExamRequestModel postPhysicalExamRequestModel) async {
hasError = false; hasError = false;
await baseAppClient.post(POST_PHYSICAL_EXAM, await baseAppClient.post(POST_PHYSICAL_EXAM, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
print("Success"); print("Success");
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
@ -111,11 +103,9 @@ class SOAPService extends LookupService {
}, body: postPhysicalExamRequestModel.toJson()); }, body: postPhysicalExamRequestModel.toJson());
} }
Future postProgressNote( Future postProgressNote(PostProgressNoteRequestModel postProgressNoteRequestModel) async {
PostProgressNoteRequestModel postProgressNoteRequestModel) async {
hasError = false; hasError = false;
await baseAppClient.post(POST_PROGRESS_NOTE, await baseAppClient.post(POST_PROGRESS_NOTE, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
print("Success"); print("Success");
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
@ -123,11 +113,9 @@ class SOAPService extends LookupService {
}, body: postProgressNoteRequestModel.toJson()); }, body: postProgressNoteRequestModel.toJson());
} }
Future postAssessment( Future postAssessment(PostAssessmentRequestModel postAssessmentRequestModel) async {
PostAssessmentRequestModel postAssessmentRequestModel) async {
hasError = false; hasError = false;
await baseAppClient.post(POST_ASSESSMENT, await baseAppClient.post(POST_ASSESSMENT, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
print("Success"); print("Success");
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
@ -138,8 +126,7 @@ class SOAPService extends LookupService {
Future patchAllergy(PostAllergyRequestModel patchAllergyRequestModel) async { Future patchAllergy(PostAllergyRequestModel patchAllergyRequestModel) async {
hasError = false; hasError = false;
await baseAppClient.post(PATCH_ALLERGY, await baseAppClient.post(PATCH_ALLERGY, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
print("Success"); print("Success");
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
@ -147,11 +134,9 @@ class SOAPService extends LookupService {
}, body: patchAllergyRequestModel.toJson()); }, body: patchAllergyRequestModel.toJson());
} }
Future patchHistories( Future patchHistories(PostHistoriesRequestModel patchHistoriesRequestModel) async {
PostHistoriesRequestModel patchHistoriesRequestModel) async {
hasError = false; hasError = false;
await baseAppClient.post(PATCH_HISTORY, await baseAppClient.post(PATCH_HISTORY, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
print("Success"); print("Success");
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
@ -159,11 +144,9 @@ class SOAPService extends LookupService {
}, body: patchHistoriesRequestModel.toJson()); }, body: patchHistoriesRequestModel.toJson());
} }
Future patchChiefComplaint( Future patchChiefComplaint(PostChiefComplaintRequestModel patchChiefComplaintRequestModel) async {
PostChiefComplaintRequestModel patchChiefComplaintRequestModel) async {
hasError = false; hasError = false;
await baseAppClient.post(PATCH_CHIEF_COMPLAINT, await baseAppClient.post(PATCH_CHIEF_COMPLAINT, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
print("Success"); print("Success");
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
@ -171,11 +154,9 @@ class SOAPService extends LookupService {
}, body: patchChiefComplaintRequestModel.toJson()); }, body: patchChiefComplaintRequestModel.toJson());
} }
Future patchPhysicalExam( Future patchPhysicalExam(PostPhysicalExamRequestModel patchPhysicalExamRequestModel) async {
PostPhysicalExamRequestModel patchPhysicalExamRequestModel) async {
hasError = false; hasError = false;
await baseAppClient.post(PATCH_PHYSICAL_EXAM, await baseAppClient.post(PATCH_PHYSICAL_EXAM, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
print("Success"); print("Success");
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
@ -183,11 +164,9 @@ class SOAPService extends LookupService {
}, body: patchPhysicalExamRequestModel.toJson()); }, body: patchPhysicalExamRequestModel.toJson());
} }
Future patchProgressNote( Future patchProgressNote(PostProgressNoteRequestModel patchProgressNoteRequestModel) async {
PostProgressNoteRequestModel patchProgressNoteRequestModel) async {
hasError = false; hasError = false;
await baseAppClient.post(PATCH_PROGRESS_NOTE, await baseAppClient.post(PATCH_PROGRESS_NOTE, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
print("Success"); print("Success");
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
@ -195,11 +174,9 @@ class SOAPService extends LookupService {
}, body: patchProgressNoteRequestModel.toJson()); }, body: patchProgressNoteRequestModel.toJson());
} }
Future patchAssessment( Future patchAssessment(PatchAssessmentReqModel patchAssessmentRequestModel) async {
PatchAssessmentReqModel patchAssessmentRequestModel) async {
hasError = false; hasError = false;
await baseAppClient.post(PATCH_ASSESSMENT, await baseAppClient.post(PATCH_ASSESSMENT, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
print("Success"); print("Success");
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
@ -210,8 +187,7 @@ class SOAPService extends LookupService {
Future getPatientAllergy(GeneralGetReqForSOAP generalGetReqForSOAP) async { Future getPatientAllergy(GeneralGetReqForSOAP generalGetReqForSOAP) async {
hasError = false; hasError = false;
await baseAppClient.post(GET_ALLERGY, await baseAppClient.post(GET_ALLERGY, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
print("Success"); print("Success");
patientAllergiesList.clear(); patientAllergiesList.clear();
@ -224,11 +200,9 @@ class SOAPService extends LookupService {
}, body: generalGetReqForSOAP.toJson()); }, body: generalGetReqForSOAP.toJson());
} }
Future getPatientHistories(GetHistoryReqModel getHistoryReqModel, Future getPatientHistories(GetHistoryReqModel getHistoryReqModel, {bool isFirst = false}) async {
{bool isFirst = false}) async {
hasError = false; hasError = false;
await baseAppClient.post(GET_HISTORY, await baseAppClient.post(GET_HISTORY, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
print("Success"); print("Success");
if (isFirst) patientHistoryList.clear(); if (isFirst) patientHistoryList.clear();
response['List_History']['entityList'].forEach((v) { response['List_History']['entityList'].forEach((v) {
@ -240,11 +214,9 @@ class SOAPService extends LookupService {
}, body: getHistoryReqModel.toJson()); }, body: getHistoryReqModel.toJson());
} }
Future getPatientChiefComplaint( Future getPatientChiefComplaint(GetChiefComplaintReqModel getChiefComplaintReqModel) async {
GetChiefComplaintReqModel getChiefComplaintReqModel) async {
hasError = false; hasError = false;
await baseAppClient.post(GET_CHIEF_COMPLAINT, await baseAppClient.post(GET_CHIEF_COMPLAINT, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
print("Success"); print("Success");
patientChiefComplaintList.clear(); patientChiefComplaintList.clear();
response['List_ChiefComplaint']['entityList'].forEach((v) { response['List_ChiefComplaint']['entityList'].forEach((v) {
@ -256,11 +228,9 @@ class SOAPService extends LookupService {
}, body: getChiefComplaintReqModel.toJson()); }, body: getChiefComplaintReqModel.toJson());
} }
Future getPatientPhysicalExam( Future getPatientPhysicalExam(GetPhysicalExamReqModel getPhysicalExamReqModel) async {
GetPhysicalExamReqModel getPhysicalExamReqModel) async {
hasError = false; hasError = false;
await baseAppClient.post(GET_PHYSICAL_EXAM, await baseAppClient.post(GET_PHYSICAL_EXAM, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
patientPhysicalExamList.clear(); patientPhysicalExamList.clear();
response['PhysicalExamList']['entityList'].forEach((v) { response['PhysicalExamList']['entityList'].forEach((v) {
patientPhysicalExamList.add(GetPhysicalExamResModel.fromJson(v)); patientPhysicalExamList.add(GetPhysicalExamResModel.fromJson(v));
@ -271,11 +241,9 @@ class SOAPService extends LookupService {
}, body: getPhysicalExamReqModel.toJson()); }, body: getPhysicalExamReqModel.toJson());
} }
Future getPatientProgressNote( Future getPatientProgressNote(GetGetProgressNoteReqModel getGetProgressNoteReqModel) async {
GetGetProgressNoteReqModel getGetProgressNoteReqModel) async {
hasError = false; hasError = false;
await baseAppClient.post(GET_PROGRESS_NOTE, await baseAppClient.post(GET_PROGRESS_NOTE, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
print("Success"); print("Success");
patientProgressNoteList.clear(); patientProgressNoteList.clear();
response['ProgressNoteList']['entityList'].forEach((v) { response['ProgressNoteList']['entityList'].forEach((v) {
@ -287,11 +255,9 @@ class SOAPService extends LookupService {
}, body: getGetProgressNoteReqModel.toJson()); }, body: getGetProgressNoteReqModel.toJson());
} }
Future getPatientAssessment( Future getPatientAssessment(GetAssessmentReqModel getAssessmentReqModel) async {
GetAssessmentReqModel getAssessmentReqModel) async {
hasError = false; hasError = false;
await baseAppClient.post(GET_ASSESSMENT, await baseAppClient.post(GET_ASSESSMENT, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
print("Success"); print("Success");
patientAssessmentList.clear(); patientAssessmentList.clear();
response['AssessmentList']['entityList'].forEach((v) { response['AssessmentList']['entityList'].forEach((v) {

@ -12,18 +12,17 @@ class UcafService extends LookupService {
List<VitalSignHistory> patientVitalSignsHistory = []; List<VitalSignHistory> patientVitalSignsHistory = [];
List<GetAssessmentResModel> patientAssessmentList = []; List<GetAssessmentResModel> patientAssessmentList = [];
List<OrderProcedure> orderProcedureList = []; List<OrderProcedure> orderProcedureList = [];
PrescriptionModel prescriptionList; PrescriptionModel? prescriptionList;
Future getPatientChiefComplaint(PatiantInformtion patient) async { Future getPatientChiefComplaint(PatiantInformtion patient) async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['PatientMRN'] = patient.patientMRN ; body['PatientMRN'] = patient.patientMRN;
body['AppointmentNo'] = patient.appointmentNo; body['AppointmentNo'] = patient.appointmentNo;
body['EpisodeID'] = patient.episodeNo ; body['EpisodeID'] = patient.episodeNo;
body['DoctorID'] = ""; body['DoctorID'] = "";
await baseAppClient.post(GET_CHIEF_COMPLAINT, await baseAppClient.post(GET_CHIEF_COMPLAINT, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
print("Success"); print("Success");
patientChiefComplaintList.clear(); patientChiefComplaintList.clear();
response['List_ChiefComplaint']['entityList'].forEach((v) { response['List_ChiefComplaint']['entityList'].forEach((v) {
@ -35,8 +34,7 @@ class UcafService extends LookupService {
}, body: body); }, body: body);
} }
Future getInPatientVitalSignHistory( Future getInPatientVitalSignHistory(PatiantInformtion patient, bool isInPatient) async {
PatiantInformtion patient, bool isInPatient) async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['PatientID'] = patient.patientId; body['PatientID'] = patient.patientId;
@ -65,8 +63,7 @@ class UcafService extends LookupService {
); );
} }
Future getPatientVitalSignsHistory( Future getPatientVitalSignsHistory(PatiantInformtion patient, String fromDate, String toDate) async {
PatiantInformtion patient, String fromDate, String toDate) async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['PatientMRN'] = patient.patientId; // patient.patientMRN body['PatientMRN'] = patient.patientId; // patient.patientMRN
@ -104,8 +101,7 @@ class UcafService extends LookupService {
body['AppointmentNo'] = patient.appointmentNo; body['AppointmentNo'] = patient.appointmentNo;
body['EpisodeID'] = patient.episodeNo; body['EpisodeID'] = patient.episodeNo;
await baseAppClient.post(GET_ASSESSMENT, await baseAppClient.post(GET_ASSESSMENT, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
print("Success"); print("Success");
patientAssessmentList.clear(); patientAssessmentList.clear();
response['AssessmentList']['entityList'].forEach((v) { response['AssessmentList']['entityList'].forEach((v) {
@ -127,10 +123,8 @@ class UcafService extends LookupService {
hasError = false; hasError = false;
prescriptionList = null; prescriptionList = null;
await baseAppClient.post(GET_PRESCRIPTION_LIST, await baseAppClient.post(GET_PRESCRIPTION_LIST, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) { prescriptionList = PrescriptionModel.fromJson(response['PrescriptionList']);
prescriptionList =
PrescriptionModel.fromJson(response['PrescriptionList']);
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
@ -144,8 +138,7 @@ class UcafService extends LookupService {
body['AppointmentNo'] = patient.appointmentNo; body['AppointmentNo'] = patient.appointmentNo;
body['EpisodeID'] = patient.episodeNo; body['EpisodeID'] = patient.episodeNo;
await baseAppClient.post(GET_ORDER_PROCEDURE, await baseAppClient.post(GET_ORDER_PROCEDURE, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
print("Success"); print("Success");
orderProcedureList.clear(); orderProcedureList.clear();
response['OrderedProcedureList']['entityList'].forEach((v) { response['OrderedProcedureList']['entityList'].forEach((v) {
@ -163,8 +156,7 @@ class UcafService extends LookupService {
body['PatientMRN'] = patient.patientMRN; body['PatientMRN'] = patient.patientMRN;
body['AppointmentNo'] = patient.appointmentNo; body['AppointmentNo'] = patient.appointmentNo;
await baseAppClient.post(POST_UCAF, await baseAppClient.post(POST_UCAF, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
print("Success"); print("Success");
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;

@ -5,7 +5,7 @@ import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart'; import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart';
class VitalSignsService extends BaseService { class VitalSignsService extends BaseService {
VitalSignData patientVitalSigns; VitalSignData? patientVitalSigns;
List<VitalSignHistory> patientVitalSignsHistory = []; List<VitalSignHistory> patientVitalSignsHistory = [];
Future getPatientVitalSign(PatiantInformtion patient) async { Future getPatientVitalSign(PatiantInformtion patient) async {
@ -21,8 +21,7 @@ class VitalSignsService extends BaseService {
if (response['VitalSignsList'] != null) { if (response['VitalSignsList'] != null) {
if (response['VitalSignsList']['entityList'] != null && if (response['VitalSignsList']['entityList'] != null &&
(response['VitalSignsList']['entityList'] as List).length > 0) { (response['VitalSignsList']['entityList'] as List).length > 0) {
patientVitalSigns = VitalSignData.fromJson( patientVitalSigns = VitalSignData.fromJson(response['VitalSignsList']['entityList'][0]);
response['VitalSignsList']['entityList'][0]);
} }
} }
}, },
@ -34,8 +33,7 @@ class VitalSignsService extends BaseService {
); );
} }
Future getPatientVitalSignsHistory( Future getPatientVitalSignsHistory(PatiantInformtion patient, String fromDate, String toDate) async {
PatiantInformtion patient, String fromDate, String toDate) async {
patientVitalSigns = null; patientVitalSigns = null;
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
@ -54,14 +52,14 @@ class VitalSignsService extends BaseService {
body['ProjectID'] = patient.projectId; body['ProjectID'] = patient.projectId;
} }
await baseAppClient.post( await baseAppClient.post(
GET_PATIENT_VITAL_SIGN, GET_PATIENT_VITAL_SIGN,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
patientVitalSignsHistory.clear(); patientVitalSignsHistory.clear();
if (response['List_DoctorPatientVitalSign'] != null) { if (response['List_DoctorPatientVitalSign'] != null) {
response['List_DoctorPatientVitalSign'].forEach((v) { response['List_DoctorPatientVitalSign'].forEach((v) {
patientVitalSignsHistory.add(new VitalSignHistory.fromJson(v)); patientVitalSignsHistory.add(new VitalSignHistory.fromJson(v));
}); });
} }
}, },
onFailure: (String error, int statusCode) { onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
@ -84,22 +82,16 @@ class VitalSignsService extends BaseService {
// body['InOutPatientType'] = 2; // body['InOutPatientType'] = 2;
// } // }
await baseAppClient.postPatient(GET_PATIENT_VITAL_SIGN, onSuccess: (dynamic response, int statusCode) {
await baseAppClient.postPatient( patientVitalSignsHistory.clear();
GET_PATIENT_VITAL_SIGN, if (response['List_DoctorPatientVitalSign'] != null) {
onSuccess: (dynamic response, int statusCode) { response['List_DoctorPatientVitalSign'].forEach((v) {
patientVitalSignsHistory.clear(); patientVitalSignsHistory.add(new VitalSignHistory.fromJson(v));
if (response['List_DoctorPatientVitalSign'] != null) { });
response['List_DoctorPatientVitalSign'].forEach((v) { }
patientVitalSignsHistory.add(new VitalSignHistory.fromJson(v)); }, onFailure: (String error, int statusCode) {
});} hasError = true;
}, super.error = error.toString();
onFailure: (String error, int statusCode) { }, body: body, patient: patient);
hasError = true;
super.error = error.toString();
},
body: body,
patient: patient
);
} }
} }

@ -11,7 +11,7 @@
/// fonts: /// fonts:
/// - asset: fonts/DoctorApp.ttf /// - asset: fonts/DoctorApp.ttf
/// ///
/// ///
/// * MFG Labs, Copyright (C) 2012 by Daniel Bruce /// * MFG Labs, Copyright (C) 2012 by Daniel Bruce
/// Author: MFG Labs /// Author: MFG Labs
/// License: SIL (http://scripts.sil.org/OFL) /// License: SIL (http://scripts.sil.org/OFL)
@ -23,8 +23,8 @@ import 'package:flutter/widgets.dart';
class DoctorApp { class DoctorApp {
DoctorApp._(); DoctorApp._();
static const _kFontFam = 'DoctorApp'; static const _kFontFam = 'DoctorApp';
static const String _kFontPkg = null; static const String? _kFontPkg = null;
static const IconData female_icon = IconData(0xe800, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData female_icon = IconData(0xe800, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData male = IconData(0xe801, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData male = IconData(0xe801, fontFamily: _kFontFam, fontPackage: _kFontPkg);
@ -192,6 +192,7 @@ class DoctorApp {
static const IconData verify_finger = IconData(0xe8a4, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData verify_finger = IconData(0xe8a4, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData verify_whtsapp = IconData(0xe8a5, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData verify_whtsapp = IconData(0xe8a5, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData verify_sms = IconData(0xe8a6, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData verify_sms = IconData(0xe8a6, fontFamily: _kFontFam, fontPackage: _kFontPkg);
/// static const IconData 124 = IconData(0xe8a7, fontFamily: _kFontFam, fontPackage: _kFontPkg); /// static const IconData 124 = IconData(0xe8a7, fontFamily: _kFontFam, fontPackage: _kFontPkg);
///static const IconData 123 = IconData(0xe8a8, fontFamily: _kFontFam, fontPackage: _kFontPkg); ///static const IconData 123 = IconData(0xe8a8, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData obese_bmi_r_1 = IconData(0xe8a9, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData obese_bmi_r_1 = IconData(0xe8a9, fontFamily: _kFontFam, fontPackage: _kFontPkg);

@ -1,32 +1,32 @@
class AllergyModel { class AllergyModel {
int allergyDiseaseId; int? allergyDiseaseId;
String allergyDiseaseName; String? allergyDiseaseName;
int allergyDiseaseType; int? allergyDiseaseType;
int appointmentNo; int? appointmentNo;
int createdBy; int? createdBy;
String createdByName; String? createdByName;
String createdOn; String? createdOn;
int episodeID; int? episodeID;
bool isChecked; bool? isChecked;
bool isUpdatedByNurse; bool? isUpdatedByNurse;
int severity; int? severity;
String severityName; String? severityName;
AllergyModel( AllergyModel(
{this.allergyDiseaseId, {this.allergyDiseaseId,
this.allergyDiseaseName, this.allergyDiseaseName,
this.allergyDiseaseType, this.allergyDiseaseType,
this.appointmentNo, this.appointmentNo,
this.createdBy, this.createdBy,
this.createdByName, this.createdByName,
this.createdOn, this.createdOn,
this.episodeID, this.episodeID,
this.isChecked, this.isChecked,
this.isUpdatedByNurse, this.isUpdatedByNurse,
this.severity, this.severity,
this.severityName}); this.severityName});
AllergyModel.fromJson(Map<String, dynamic> json) { AllergyModel.fromJson(Map<String?, dynamic> json) {
allergyDiseaseId = json['allergyDiseaseId']; allergyDiseaseId = json['allergyDiseaseId'];
allergyDiseaseName = json['allergyDiseaseName']; allergyDiseaseName = json['allergyDiseaseName'];
allergyDiseaseType = json['allergyDiseaseType']; allergyDiseaseType = json['allergyDiseaseType'];
@ -41,8 +41,8 @@ class AllergyModel {
severityName = json['severityName']; severityName = json['severityName'];
} }
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['allergyDiseaseId'] = this.allergyDiseaseId; data['allergyDiseaseId'] = this.allergyDiseaseId;
data['allergyDiseaseName'] = this.allergyDiseaseName; data['allergyDiseaseName'] = this.allergyDiseaseName;
data['allergyDiseaseType'] = this.allergyDiseaseType; data['allergyDiseaseType'] = this.allergyDiseaseType;

@ -1,12 +1,11 @@
class GetChiefComplaintReqModel { class GetChiefComplaintReqModel {
int patientMRN; int? patientMRN;
int appointmentNo; int? appointmentNo;
int episodeId; int? episodeId;
int episodeID; int? episodeID;
dynamic doctorID; dynamic doctorID;
GetChiefComplaintReqModel( GetChiefComplaintReqModel({this.patientMRN, this.appointmentNo, this.episodeId, this.episodeID, this.doctorID});
{this.patientMRN, this.appointmentNo, this.episodeId, this.episodeID, this.doctorID});
GetChiefComplaintReqModel.fromJson(Map<String, dynamic> json) { GetChiefComplaintReqModel.fromJson(Map<String, dynamic> json) {
patientMRN = json['PatientMRN']; patientMRN = json['PatientMRN'];
@ -14,8 +13,7 @@ class GetChiefComplaintReqModel {
episodeId = json['EpisodeId']; episodeId = json['EpisodeId'];
episodeID = json['EpisodeID']; episodeID = json['EpisodeID'];
doctorID = json['DoctorID']; doctorID = json['DoctorID'];
}
}
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>();

@ -1,32 +1,32 @@
class GetChiefComplaintResModel { class GetChiefComplaintResModel {
int appointmentNo; int? appointmentNo;
String ccdate; String? ccdate;
String chiefComplaint; String? chiefComplaint;
String clinicDescription; String? clinicDescription;
int clinicID; int? clinicID;
String currentMedication; String? currentMedication;
int doctorID; int? doctorID;
String doctorName; String? doctorName;
int episodeId; int? episodeId;
String hopi; String? hopi;
int patientMRN; int? patientMRN;
int status; int? status;
GetChiefComplaintResModel( GetChiefComplaintResModel(
{this.appointmentNo, {this.appointmentNo,
this.ccdate, this.ccdate,
this.chiefComplaint, this.chiefComplaint,
this.clinicDescription, this.clinicDescription,
this.clinicID, this.clinicID,
this.currentMedication, this.currentMedication,
this.doctorID, this.doctorID,
this.doctorName, this.doctorName,
this.episodeId, this.episodeId,
this.hopi, this.hopi,
this.patientMRN, this.patientMRN,
this.status}); this.status});
GetChiefComplaintResModel.fromJson(Map<String, dynamic> json) { GetChiefComplaintResModel.fromJson(Map<String?, dynamic> json) {
appointmentNo = json['appointmentNo']; appointmentNo = json['appointmentNo'];
ccdate = json['ccdate']; ccdate = json['ccdate'];
chiefComplaint = json['chiefComplaint']; chiefComplaint = json['chiefComplaint'];
@ -41,8 +41,8 @@ class GetChiefComplaintResModel {
status = json['status']; status = json['status'];
} }
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['appointmentNo'] = this.appointmentNo; data['appointmentNo'] = this.appointmentNo;
data['ccdate'] = this.ccdate; data['ccdate'] = this.ccdate;
data['chiefComplaint'] = this.chiefComplaint; data['chiefComplaint'] = this.chiefComplaint;

@ -1,7 +1,7 @@
class GeneralGetReqForSOAP { class GeneralGetReqForSOAP {
int patientMRN; int? patientMRN;
int appointmentNo; int? appointmentNo;
int episodeId; int? episodeId;
dynamic editedBy; dynamic editedBy;
dynamic doctorID; dynamic doctorID;

@ -1,31 +1,32 @@
class GetAllergiesResModel { class GetAllergiesResModel {
int allergyDiseaseId; int? allergyDiseaseId;
String allergyDiseaseName; String? allergyDiseaseName;
int allergyDiseaseType; int? allergyDiseaseType;
int appointmentNo; int? appointmentNo;
int createdBy; int? createdBy;
String createdByName; String? createdByName;
String createdOn; String? createdOn;
int episodeID; int? episodeID;
bool isChecked; bool? isChecked;
bool isUpdatedByNurse; bool? isUpdatedByNurse;
int severity; int? severity;
String severityName; String? severityName;
String remarks; String? remarks;
GetAllergiesResModel( GetAllergiesResModel(
{this.allergyDiseaseId, {this.allergyDiseaseId,
this.allergyDiseaseName, this.allergyDiseaseName,
this.allergyDiseaseType, this.allergyDiseaseType,
this.appointmentNo, this.appointmentNo,
this.createdBy, this.createdBy,
this.createdByName, this.createdByName,
this.createdOn, this.createdOn,
this.episodeID, this.episodeID,
this.isChecked, this.isChecked,
this.isUpdatedByNurse, this.isUpdatedByNurse,
this.severity, this.severity,
this.severityName, this.remarks=''}); this.severityName,
this.remarks = ''});
GetAllergiesResModel.fromJson(Map<String, dynamic> json) { GetAllergiesResModel.fromJson(Map<String, dynamic> json) {
allergyDiseaseId = json['allergyDiseaseId']; allergyDiseaseId = json['allergyDiseaseId'];

@ -1,22 +1,22 @@
class GetAssessmentReqModel { class GetAssessmentReqModel {
int patientMRN; int? patientMRN;
int appointmentNo; int? appointmentNo;
String episodeID; String? episodeID;
String from; String? from;
String to; String? to;
int clinicID; int? clinicID;
dynamic doctorID; dynamic doctorID;
dynamic editedBy; dynamic editedBy;
GetAssessmentReqModel( GetAssessmentReqModel(
{this.patientMRN, {this.patientMRN,
this.appointmentNo, this.appointmentNo,
this.episodeID, this.episodeID,
this.from, this.from,
this.to, this.to,
this.clinicID, this.clinicID,
this.editedBy, this.editedBy,
this.doctorID}); this.doctorID});
GetAssessmentReqModel.fromJson(Map<String, dynamic> json) { GetAssessmentReqModel.fromJson(Map<String, dynamic> json) {
patientMRN = json['PatientMRN']; patientMRN = json['PatientMRN'];

@ -1,36 +1,36 @@
class GetAssessmentResModel { class GetAssessmentResModel {
int appointmentNo; int? appointmentNo;
String asciiDesc; String? asciiDesc;
String clinicDescription; String? clinicDescription;
int clinicID; int? clinicID;
bool complexDiagnosis; bool? complexDiagnosis;
int conditionID; int? conditionID;
int createdBy; int? createdBy;
String createdOn; String? createdOn;
int diagnosisTypeID; int? diagnosisTypeID;
int doctorID; int? doctorID;
String doctorName; String? doctorName;
int episodeId; int? episodeId;
String icdCode10ID; String? icdCode10ID;
int patientMRN; int? patientMRN;
String remarks; String? remarks;
GetAssessmentResModel( GetAssessmentResModel(
{this.appointmentNo, {this.appointmentNo,
this.asciiDesc, this.asciiDesc,
this.clinicDescription, this.clinicDescription,
this.clinicID, this.clinicID,
this.complexDiagnosis, this.complexDiagnosis,
this.conditionID, this.conditionID,
this.createdBy, this.createdBy,
this.createdOn, this.createdOn,
this.diagnosisTypeID, this.diagnosisTypeID,
this.doctorID, this.doctorID,
this.doctorName, this.doctorName,
this.episodeId, this.episodeId,
this.icdCode10ID, this.icdCode10ID,
this.patientMRN, this.patientMRN,
this.remarks}); this.remarks});
GetAssessmentResModel.fromJson(Map<String, dynamic> json) { GetAssessmentResModel.fromJson(Map<String, dynamic> json) {
appointmentNo = json['appointmentNo']; appointmentNo = json['appointmentNo'];

@ -1,22 +1,22 @@
class GetGetProgressNoteReqModel { class GetGetProgressNoteReqModel {
int patientMRN; int? patientMRN;
int appointmentNo; int? appointmentNo;
String episodeID; String? episodeID;
String from; String? from;
String to; String? to;
int clinicID; int? clinicID;
dynamic doctorID; dynamic doctorID;
dynamic editedBy; dynamic editedBy;
GetGetProgressNoteReqModel( GetGetProgressNoteReqModel(
{this.patientMRN, {this.patientMRN,
this.appointmentNo, this.appointmentNo,
this.episodeID, this.episodeID,
this.from, this.from,
this.to, this.to,
this.clinicID, this.clinicID,
this.editedBy, this.editedBy,
this.doctorID}); this.doctorID});
GetGetProgressNoteReqModel.fromJson(Map<String, dynamic> json) { GetGetProgressNoteReqModel.fromJson(Map<String, dynamic> json) {
patientMRN = json['PatientMRN']; patientMRN = json['PatientMRN'];
@ -27,7 +27,6 @@ class GetGetProgressNoteReqModel {
clinicID = json['ClinicID']; clinicID = json['ClinicID'];
doctorID = json['DoctorID']; doctorID = json['DoctorID'];
editedBy = json['EditedBy']; editedBy = json['EditedBy'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {

@ -1,28 +1,28 @@
class GetPatientProgressNoteResModel { class GetPatientProgressNoteResModel {
int appointmentNo; int? appointmentNo;
int createdBy; int? createdBy;
String createdByName; String? createdByName;
String createdOn; String? createdOn;
String dName; String? dName;
String editedByName; String? editedByName;
String editedOn; String? editedOn;
int episodeId; int? episodeId;
String mName; String? mName;
int patientMRN; int? patientMRN;
String planNote; String? planNote;
GetPatientProgressNoteResModel( GetPatientProgressNoteResModel(
{this.appointmentNo, {this.appointmentNo,
this.createdBy, this.createdBy,
this.createdByName, this.createdByName,
this.createdOn, this.createdOn,
this.dName, this.dName,
this.editedByName, this.editedByName,
this.editedOn, this.editedOn,
this.episodeId, this.episodeId,
this.mName, this.mName,
this.patientMRN, this.patientMRN,
this.planNote}); this.planNote});
GetPatientProgressNoteResModel.fromJson(Map<String, dynamic> json) { GetPatientProgressNoteResModel.fromJson(Map<String, dynamic> json) {
appointmentNo = json['appointmentNo']; appointmentNo = json['appointmentNo'];

@ -1,11 +1,11 @@
class GetHistoryReqModel { class GetHistoryReqModel {
int patientMRN; int? patientMRN;
int historyType; int? historyType;
String episodeID; String? episodeID;
String from; String? from;
String to; String? to;
int clinicID; int? clinicID;
int appointmentNo; int? appointmentNo;
dynamic editedBy; dynamic editedBy;
dynamic doctorID; dynamic doctorID;
@ -30,7 +30,6 @@ class GetHistoryReqModel {
doctorID = json['DoctorID']; doctorID = json['DoctorID'];
appointmentNo = json['AppointmentNo']; appointmentNo = json['AppointmentNo'];
editedBy = json['EditedBy']; editedBy = json['EditedBy'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {

@ -1,20 +1,20 @@
class GetHistoryResModel { class GetHistoryResModel {
int appointmentNo; int? appointmentNo;
int episodeId; int? episodeId;
int historyId; int? historyId;
int historyType; int? historyType;
bool isChecked; bool? isChecked;
int patientMRN; int? patientMRN;
String remarks; String? remarks;
GetHistoryResModel( GetHistoryResModel(
{this.appointmentNo, {this.appointmentNo,
this.episodeId, this.episodeId,
this.historyId, this.historyId,
this.historyType, this.historyType,
this.isChecked, this.isChecked,
this.patientMRN, this.patientMRN,
this.remarks}); this.remarks});
GetHistoryResModel.fromJson(Map<String, dynamic> json) { GetHistoryResModel.fromJson(Map<String, dynamic> json) {
appointmentNo = json['appointmentNo']; appointmentNo = json['appointmentNo'];

@ -1,44 +1,44 @@
class GetPhysicalExamResModel { class GetPhysicalExamResModel {
int appointmentNo; int? appointmentNo;
int createdBy; int? createdBy;
String createdByName; String? createdByName;
String createdOn; String? createdOn;
Null editedBy; dynamic editedBy;
String editedByName; String? editedByName;
String editedOn; String? editedOn;
int episodeId; int? episodeId;
int examId; int? examId;
String examName; String? examName;
int examType; int? examType;
int examinationType; int? examinationType;
String examinationTypeName; String? examinationTypeName;
bool isAbnormal; bool? isAbnormal;
bool isNew; bool? isNew;
bool isNormal; bool? isNormal;
bool notExamined; bool? notExamined;
int patientMRN; int? patientMRN;
String remarks; String? remarks;
GetPhysicalExamResModel( GetPhysicalExamResModel(
{this.appointmentNo, {this.appointmentNo,
this.createdBy, this.createdBy,
this.createdByName, this.createdByName,
this.createdOn, this.createdOn,
this.editedBy, this.editedBy,
this.editedByName, this.editedByName,
this.editedOn, this.editedOn,
this.episodeId, this.episodeId,
this.examId, this.examId,
this.examName, this.examName,
this.examType, this.examType,
this.examinationType, this.examinationType,
this.examinationTypeName, this.examinationTypeName,
this.isAbnormal, this.isAbnormal,
this.isNew, this.isNew,
this.isNormal, this.isNormal,
this.notExamined, this.notExamined,
this.patientMRN, this.patientMRN,
this.remarks}); this.remarks});
GetPhysicalExamResModel.fromJson(Map<String, dynamic> json) { GetPhysicalExamResModel.fromJson(Map<String, dynamic> json) {
appointmentNo = json['appointmentNo']; appointmentNo = json['appointmentNo'];

@ -1,9 +1,9 @@
class GetPhysicalExamReqModel { class GetPhysicalExamReqModel {
int patientMRN; int? patientMRN;
int appointmentNo; int? appointmentNo;
String episodeID; String? episodeID;
String from; String? from;
String to; String? to;
dynamic editedBy; dynamic editedBy;
dynamic doctorID; dynamic doctorID;

@ -1,24 +1,24 @@
class PatchAssessmentReqModel { class PatchAssessmentReqModel {
int patientMRN; int? patientMRN;
int appointmentNo; int? appointmentNo;
int episodeID; int? episodeID;
String icdcode10Id; String? icdcode10Id;
String prevIcdCode10ID; String? prevIcdCode10ID;
int conditionId; int? conditionId;
int diagnosisTypeId; int? diagnosisTypeId;
bool complexDiagnosis; bool? complexDiagnosis;
String remarks; String? remarks;
PatchAssessmentReqModel( PatchAssessmentReqModel(
{this.patientMRN, {this.patientMRN,
this.appointmentNo, this.appointmentNo,
this.episodeID, this.episodeID,
this.icdcode10Id, this.icdcode10Id,
this.prevIcdCode10ID, this.prevIcdCode10ID,
this.conditionId, this.conditionId,
this.diagnosisTypeId, this.diagnosisTypeId,
this.complexDiagnosis, this.complexDiagnosis,
this.remarks}); this.remarks});
PatchAssessmentReqModel.fromJson(Map<String, dynamic> json) { PatchAssessmentReqModel.fromJson(Map<String, dynamic> json) {
patientMRN = json['PatientMRN']; patientMRN = json['PatientMRN'];

@ -1,14 +1,10 @@
class PostEpisodeReqModel { class PostEpisodeReqModel {
int appointmentNo; int? appointmentNo;
int patientMRN; int? patientMRN;
int doctorID; int? doctorID;
String vidaAuthTokenID; String? vidaAuthTokenID;
PostEpisodeReqModel( PostEpisodeReqModel({this.appointmentNo, this.patientMRN, this.doctorID, this.vidaAuthTokenID});
{this.appointmentNo,
this.patientMRN,
this.doctorID,
this.vidaAuthTokenID});
PostEpisodeReqModel.fromJson(Map<String, dynamic> json) { PostEpisodeReqModel.fromJson(Map<String, dynamic> json) {
appointmentNo = json['AppointmentNo']; appointmentNo = json['AppointmentNo'];

@ -1,16 +1,11 @@
class GetAllergiesRequestModel { class GetAllergiesRequestModel {
String vidaAuthTokenID; String? vidaAuthTokenID;
int patientMRN; int? patientMRN;
int appointmentNo; int? appointmentNo;
int episodeId; int? episodeId;
String doctorID; String? doctorID;
GetAllergiesRequestModel( GetAllergiesRequestModel({this.vidaAuthTokenID, this.patientMRN, this.appointmentNo, this.episodeId, this.doctorID});
{this.vidaAuthTokenID,
this.patientMRN,
this.appointmentNo,
this.episodeId,
this.doctorID});
GetAllergiesRequestModel.fromJson(Map<String, dynamic> json) { GetAllergiesRequestModel.fromJson(Map<String, dynamic> json) {
vidaAuthTokenID = json['VidaAuthTokenID']; vidaAuthTokenID = json['VidaAuthTokenID'];

@ -1,6 +1,6 @@
class MasterKeyModel { class MasterKeyModel {
String alias; String? alias;
String aliasN; String? aliasN;
dynamic code; dynamic code;
dynamic description; dynamic description;
dynamic detail1; dynamic detail1;
@ -8,31 +8,31 @@ class MasterKeyModel {
dynamic detail3; dynamic detail3;
dynamic detail4; dynamic detail4;
dynamic detail5; dynamic detail5;
int groupID; int? groupID;
int id; int? id;
String nameAr; String? nameAr;
String nameEn; String? nameEn;
dynamic remarks; dynamic remarks;
int typeId; int? typeId;
String valueList; String? valueList;
MasterKeyModel( MasterKeyModel(
{this.alias, {this.alias,
this.aliasN, this.aliasN,
this.code, this.code,
this.description, this.description,
this.detail1, this.detail1,
this.detail2, this.detail2,
this.detail3, this.detail3,
this.detail4, this.detail4,
this.detail5, this.detail5,
this.groupID, this.groupID,
this.id, this.id,
this.nameAr, this.nameAr,
this.nameEn, this.nameEn,
this.remarks, this.remarks,
this.typeId, this.typeId,
this.valueList}); this.valueList});
MasterKeyModel.fromJson(Map<String, dynamic> json) { MasterKeyModel.fromJson(Map<String, dynamic> json) {
alias = json['alias']; alias = json['alias'];

@ -1,28 +1,25 @@
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
class MySelectedAllergy { class MySelectedAllergy {
MasterKeyModel selectedAllergySeverity; MasterKeyModel? selectedAllergySeverity;
MasterKeyModel selectedAllergy; MasterKeyModel? selectedAllergy;
String remark; String? remark;
bool isChecked; bool? isChecked;
bool isExpanded; bool? isExpanded;
int createdBy; int? createdBy;
MySelectedAllergy( MySelectedAllergy(
{this.selectedAllergySeverity, {this.selectedAllergySeverity,
this.selectedAllergy, this.selectedAllergy,
this.remark, this.remark,
this.isChecked, this.isChecked,
this.isExpanded = true, this.isExpanded = true,
this.createdBy}); this.createdBy});
MySelectedAllergy.fromJson(Map<String, dynamic> json) { MySelectedAllergy.fromJson(Map<String, dynamic> json) {
selectedAllergySeverity = json['selectedAllergySeverity'] != null selectedAllergySeverity =
? new MasterKeyModel.fromJson(json['selectedAllergySeverity']) json['selectedAllergySeverity'] != null ? new MasterKeyModel.fromJson(json['selectedAllergySeverity']) : null;
: null; selectedAllergy = json['selectedAllergy'] != null ? new MasterKeyModel.fromJson(json['selectedAllergy']) : null;
selectedAllergy = json['selectedAllergy'] != null
? new MasterKeyModel.fromJson(json['selectedAllergy'])
: null;
remark = json['remark']; remark = json['remark'];
isChecked = json['isChecked']; isChecked = json['isChecked'];
isExpanded = json['isExpanded']; isExpanded = json['isExpanded'];
@ -32,10 +29,10 @@ class MySelectedAllergy {
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>();
if (this.selectedAllergySeverity != null) { if (this.selectedAllergySeverity != null) {
data['selectedAllergySeverity'] = this.selectedAllergySeverity.toJson(); data['selectedAllergySeverity'] = this.selectedAllergySeverity!.toJson();
} }
if (this.selectedAllergy != null) { if (this.selectedAllergy != null) {
data['selectedAllergy'] = this.selectedAllergy.toJson(); data['selectedAllergy'] = this.selectedAllergy!.toJson();
} }
data['remark'] = this.remark; data['remark'] = this.remark;
data['isChecked'] = this.isChecked; data['isChecked'] = this.isChecked;

@ -1,37 +1,36 @@
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
class MySelectedAssessment { class MySelectedAssessment {
MasterKeyModel selectedICD; MasterKeyModel? selectedICD;
MasterKeyModel selectedDiagnosisCondition; MasterKeyModel? selectedDiagnosisCondition;
MasterKeyModel selectedDiagnosisType; MasterKeyModel? selectedDiagnosisType;
String remark; String? remark;
int appointmentId; int? appointmentId;
int createdBy; int? createdBy;
String createdOn; String? createdOn;
int doctorID; int? doctorID;
String doctorName; String? doctorName;
String icdCode10ID; String? icdCode10ID;
MySelectedAssessment( MySelectedAssessment(
{this.selectedICD, {this.selectedICD,
this.selectedDiagnosisCondition, this.selectedDiagnosisCondition,
this.selectedDiagnosisType, this.selectedDiagnosisType,
this.remark, this.appointmentId, this.createdBy, this.remark,
this.createdOn, this.appointmentId,
this.doctorID, this.createdBy,
this.doctorName, this.createdOn,
this.icdCode10ID}); this.doctorID,
this.doctorName,
this.icdCode10ID});
MySelectedAssessment.fromJson(Map<String, dynamic> json) { MySelectedAssessment.fromJson(Map<String, dynamic> json) {
selectedICD = json['selectedICD'] != null selectedICD = json['selectedICD'] != null ? new MasterKeyModel.fromJson(json['selectedICD']) : null;
? new MasterKeyModel.fromJson(json['selectedICD'])
: null;
selectedDiagnosisCondition = json['selectedDiagnosisCondition'] != null selectedDiagnosisCondition = json['selectedDiagnosisCondition'] != null
? new MasterKeyModel.fromJson(json['selectedDiagnosisCondition']) ? new MasterKeyModel.fromJson(json['selectedDiagnosisCondition'])
: null; : null;
selectedDiagnosisType = json['selectedDiagnosisType'] != null selectedDiagnosisType =
? new MasterKeyModel.fromJson(json['selectedDiagnosisType']) json['selectedDiagnosisType'] != null ? new MasterKeyModel.fromJson(json['selectedDiagnosisType']) : null;
: null;
remark = json['remark']; remark = json['remark'];
appointmentId = json['appointmentId']; appointmentId = json['appointmentId'];
createdBy = json['createdBy']; createdBy = json['createdBy'];
@ -45,13 +44,13 @@ class MySelectedAssessment {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.selectedICD != null) { if (this.selectedICD != null) {
data['selectedICD'] = this.selectedICD.toJson(); data['selectedICD'] = this.selectedICD!.toJson();
} }
if (this.selectedDiagnosisCondition != null) { if (this.selectedDiagnosisCondition != null) {
data['selectedICD'] = this.selectedDiagnosisCondition.toJson(); data['selectedICD'] = this.selectedDiagnosisCondition!.toJson();
} }
if (this.selectedDiagnosisType != null) { if (this.selectedDiagnosisType != null) {
data['selectedICD'] = this.selectedDiagnosisType.toJson(); data['selectedICD'] = this.selectedDiagnosisType!.toJson();
} }
data['remark'] = this.remark; data['remark'] = this.remark;
data['appointmentId'] = this.appointmentId; data['appointmentId'] = this.appointmentId;

@ -1,13 +1,13 @@
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
class MySelectedExamination { class MySelectedExamination {
MasterKeyModel selectedExamination; MasterKeyModel? selectedExamination;
String remark; String? remark;
bool isNormal; bool? isNormal;
bool isAbnormal; bool? isAbnormal;
bool notExamined; bool? notExamined;
bool isNew; bool? isNew;
int createdBy; int? createdBy;
MySelectedExamination( MySelectedExamination(
{this.selectedExamination, {this.selectedExamination,
@ -19,9 +19,8 @@ class MySelectedExamination {
this.createdBy}); this.createdBy});
MySelectedExamination.fromJson(Map<String, dynamic> json) { MySelectedExamination.fromJson(Map<String, dynamic> json) {
selectedExamination = json['selectedExamination'] != null selectedExamination =
? new MasterKeyModel.fromJson(json['selectedExamination']) json['selectedExamination'] != null ? new MasterKeyModel.fromJson(json['selectedExamination']) : null;
: null;
remark = json['remark']; remark = json['remark'];
isNormal = json['isNormal']; isNormal = json['isNormal'];
isAbnormal = json['isAbnormal']; isAbnormal = json['isAbnormal'];
@ -34,7 +33,7 @@ class MySelectedExamination {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.selectedExamination != null) { if (this.selectedExamination != null) {
data['selectedExamination'] = this.selectedExamination.toJson(); data['selectedExamination'] = this.selectedExamination!.toJson();
} }
data['remark'] = this.remark; data['remark'] = this.remark;
data['isNormal'] = this.isNormal; data['isNormal'] = this.isNormal;

@ -1,18 +1,14 @@
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
class MySelectedHistory { class MySelectedHistory {
MasterKeyModel selectedHistory; MasterKeyModel? selectedHistory;
String remark; String? remark;
bool isChecked; bool? isChecked;
MySelectedHistory( MySelectedHistory({this.selectedHistory, this.remark, this.isChecked});
{ this.selectedHistory, this.remark, this.isChecked});
MySelectedHistory.fromJson(Map<String, dynamic> json) { MySelectedHistory.fromJson(Map<String, dynamic> json) {
selectedHistory = json['selectedHistory'] != null ? new MasterKeyModel.fromJson(json['selectedHistory']) : null;
selectedHistory = json['selectedHistory'] != null
? new MasterKeyModel.fromJson(json['selectedHistory'])
: null;
remark = json['remark']; remark = json['remark'];
remark = json['isChecked']; remark = json['isChecked'];
} }
@ -21,7 +17,7 @@ class MySelectedHistory {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.selectedHistory != null) { if (this.selectedHistory != null) {
data['selectedHistory'] = this.selectedHistory.toJson(); data['selectedHistory'] = this.selectedHistory!.toJson();
} }
data['remark'] = this.remark; data['remark'] = this.remark;
data['isChecked'] = this.remark; data['isChecked'] = this.remark;

@ -1,55 +1,54 @@
class OrderProcedure { class OrderProcedure {
String? achiCode;
String achiCode; String? appointmentDate;
String appointmentDate; int? appointmentNo;
int appointmentNo; int? categoryID;
int categoryID; String? clinicDescription;
String clinicDescription; String? cptCode;
String cptCode; int? createdBy;
int createdBy; String? createdOn;
String createdOn; String? doctorName;
String doctorName; bool? isApprovalCreated;
bool isApprovalCreated; bool? isApprovalRequired;
bool isApprovalRequired; bool? isCovered;
bool isCovered; bool? isInvoiced;
bool isInvoiced; bool? isReferralInvoiced;
bool isReferralInvoiced; bool? isUncoveredByDoctor;
bool isUncoveredByDoctor; int? lineItemNo;
int lineItemNo; String? orderDate;
String orderDate; int? orderNo;
int orderNo; int? orderType;
int orderType; String? procedureId;
String procedureId; String? procedureName;
String procedureName; String? remarks;
String remarks; String? status;
String status; String? template;
String template;
OrderProcedure( OrderProcedure(
{this.achiCode, {this.achiCode,
this.appointmentDate, this.appointmentDate,
this.appointmentNo, this.appointmentNo,
this.categoryID, this.categoryID,
this.clinicDescription, this.clinicDescription,
this.cptCode, this.cptCode,
this.createdBy, this.createdBy,
this.createdOn, this.createdOn,
this.doctorName, this.doctorName,
this.isApprovalCreated, this.isApprovalCreated,
this.isApprovalRequired, this.isApprovalRequired,
this.isCovered, this.isCovered,
this.isInvoiced, this.isInvoiced,
this.isReferralInvoiced, this.isReferralInvoiced,
this.isUncoveredByDoctor, this.isUncoveredByDoctor,
this.lineItemNo, this.lineItemNo,
this.orderDate, this.orderDate,
this.orderNo, this.orderNo,
this.orderType, this.orderType,
this.procedureId, this.procedureId,
this.procedureName, this.procedureName,
this.remarks, this.remarks,
this.status, this.status,
this.template}); this.template});
OrderProcedure.fromJson(Map<String, dynamic> json) { OrderProcedure.fromJson(Map<String, dynamic> json) {
achiCode = json['achiCode']; achiCode = json['achiCode'];
@ -106,5 +105,4 @@ class OrderProcedure {
data['template'] = this.template; data['template'] = this.template;
return data; return data;
} }
}
}

@ -1,16 +1,13 @@
class PostAllergyRequestModel { class PostAllergyRequestModel {
List<ListHisProgNotePatientAllergyDiseaseVM> List<ListHisProgNotePatientAllergyDiseaseVM>? listHisProgNotePatientAllergyDiseaseVM;
listHisProgNotePatientAllergyDiseaseVM;
PostAllergyRequestModel({this.listHisProgNotePatientAllergyDiseaseVM}); PostAllergyRequestModel({this.listHisProgNotePatientAllergyDiseaseVM});
PostAllergyRequestModel.fromJson(Map<String, dynamic> json) { PostAllergyRequestModel.fromJson(Map<String, dynamic> json) {
if (json['listHisProgNotePatientAllergyDiseaseVM'] != null) { if (json['listHisProgNotePatientAllergyDiseaseVM'] != null) {
listHisProgNotePatientAllergyDiseaseVM = listHisProgNotePatientAllergyDiseaseVM = [];
new List<ListHisProgNotePatientAllergyDiseaseVM>();
json['listHisProgNotePatientAllergyDiseaseVM'].forEach((v) { json['listHisProgNotePatientAllergyDiseaseVM'].forEach((v) {
listHisProgNotePatientAllergyDiseaseVM listHisProgNotePatientAllergyDiseaseVM!.add(new ListHisProgNotePatientAllergyDiseaseVM.fromJson(v));
.add(new ListHisProgNotePatientAllergyDiseaseVM.fromJson(v));
}); });
} }
} }
@ -18,44 +15,42 @@ class PostAllergyRequestModel {
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>();
if (this.listHisProgNotePatientAllergyDiseaseVM != null) { if (this.listHisProgNotePatientAllergyDiseaseVM != null) {
data['listHisProgNotePatientAllergyDiseaseVM'] = this data['listHisProgNotePatientAllergyDiseaseVM'] =
.listHisProgNotePatientAllergyDiseaseVM this.listHisProgNotePatientAllergyDiseaseVM!.map((v) => v.toJson()).toList();
.map((v) => v.toJson())
.toList();
} }
return data; return data;
} }
} }
class ListHisProgNotePatientAllergyDiseaseVM { class ListHisProgNotePatientAllergyDiseaseVM {
int patientMRN; int? patientMRN;
int allergyDiseaseType; int? allergyDiseaseType;
int allergyDiseaseId; int? allergyDiseaseId;
int episodeId; int? episodeId;
int appointmentNo; int? appointmentNo;
int severity; int? severity;
bool isChecked; bool? isChecked;
bool isUpdatedByNurse; bool? isUpdatedByNurse;
String remarks; String? remarks;
int createdBy; int? createdBy;
String createdOn; String? createdOn;
int editedBy; int? editedBy;
String editedOn; String? editedOn;
ListHisProgNotePatientAllergyDiseaseVM( ListHisProgNotePatientAllergyDiseaseVM(
{this.patientMRN, {this.patientMRN,
this.allergyDiseaseType, this.allergyDiseaseType,
this.allergyDiseaseId, this.allergyDiseaseId,
this.episodeId, this.episodeId,
this.appointmentNo, this.appointmentNo,
this.severity, this.severity,
this.isChecked, this.isChecked,
this.isUpdatedByNurse, this.isUpdatedByNurse,
this.remarks, this.remarks,
this.createdBy, this.createdBy,
this.createdOn, this.createdOn,
this.editedBy, this.editedBy,
this.editedOn}); this.editedOn});
ListHisProgNotePatientAllergyDiseaseVM.fromJson(Map<String, dynamic> json) { ListHisProgNotePatientAllergyDiseaseVM.fromJson(Map<String, dynamic> json) {
patientMRN = json['patientMRN']; patientMRN = json['patientMRN'];

@ -1,23 +1,19 @@
class PostAssessmentRequestModel { class PostAssessmentRequestModel {
int patientMRN; int? patientMRN;
int appointmentNo; int? appointmentNo;
int episodeId; int? episodeId;
List<IcdCodeDetails> icdCodeDetails; List<IcdCodeDetails>? icdCodeDetails;
PostAssessmentRequestModel( PostAssessmentRequestModel({this.patientMRN, this.appointmentNo, this.episodeId, this.icdCodeDetails});
{this.patientMRN,
this.appointmentNo,
this.episodeId,
this.icdCodeDetails});
PostAssessmentRequestModel.fromJson(Map<String, dynamic> json) { PostAssessmentRequestModel.fromJson(Map<String, dynamic> json) {
patientMRN = json['PatientMRN']; patientMRN = json['PatientMRN'];
appointmentNo = json['AppointmentNo']; appointmentNo = json['AppointmentNo'];
episodeId = json['EpisodeID']; episodeId = json['EpisodeID'];
if (json['icdCodeDetails'] != null) { if (json['icdCodeDetails'] != null) {
icdCodeDetails = new List<IcdCodeDetails>(); icdCodeDetails = [];
json['icdCodeDetails'].forEach((v) { json['icdCodeDetails'].forEach((v) {
icdCodeDetails.add(new IcdCodeDetails.fromJson(v)); icdCodeDetails!.add(new IcdCodeDetails.fromJson(v));
}); });
} }
} }
@ -28,26 +24,20 @@ class PostAssessmentRequestModel {
data['AppointmentNo'] = this.appointmentNo; data['AppointmentNo'] = this.appointmentNo;
data['EpisodeID'] = this.episodeId; data['EpisodeID'] = this.episodeId;
if (this.icdCodeDetails != null) { if (this.icdCodeDetails != null) {
data['icdCodeDetails'] = data['icdCodeDetails'] = this.icdCodeDetails!.map((v) => v.toJson()).toList();
this.icdCodeDetails.map((v) => v.toJson()).toList();
} }
return data; return data;
} }
} }
class IcdCodeDetails { class IcdCodeDetails {
String icdcode10Id; String? icdcode10Id;
int conditionId; int? conditionId;
int diagnosisTypeId; int? diagnosisTypeId;
bool complexDiagnosis; bool? complexDiagnosis;
String remarks; String? remarks;
IcdCodeDetails( IcdCodeDetails({this.icdcode10Id, this.conditionId, this.diagnosisTypeId, this.complexDiagnosis, this.remarks});
{this.icdcode10Id,
this.conditionId,
this.diagnosisTypeId,
this.complexDiagnosis,
this.remarks});
IcdCodeDetails.fromJson(Map<String, dynamic> json) { IcdCodeDetails.fromJson(Map<String, dynamic> json) {
icdcode10Id = json['icdcode10Id']; icdcode10Id = json['icdcode10Id'];

@ -1,17 +1,16 @@
class PostChiefComplaintRequestModel { class PostChiefComplaintRequestModel {
int appointmentNo; int? appointmentNo;
int episodeID; int? episodeID;
int patientMRN; int? patientMRN;
String chiefComplaint; String? chiefComplaint;
String hopi; String? hopi;
String currentMedication; String? currentMedication;
bool ispregnant; bool? ispregnant;
bool isLactation; bool? isLactation;
int numberOfWeeks; int? numberOfWeeks;
dynamic doctorID; dynamic doctorID;
dynamic editedBy; dynamic editedBy;
PostChiefComplaintRequestModel( PostChiefComplaintRequestModel(
{this.appointmentNo, {this.appointmentNo,
this.episodeID, this.episodeID,

@ -1,14 +1,14 @@
class PostHistoriesRequestModel { class PostHistoriesRequestModel {
List<ListMedicalHistoryVM> listMedicalHistoryVM; List<ListMedicalHistoryVM>? listMedicalHistoryVM;
dynamic doctorID; dynamic doctorID;
PostHistoriesRequestModel({this.listMedicalHistoryVM, this.doctorID}); PostHistoriesRequestModel({this.listMedicalHistoryVM, this.doctorID});
PostHistoriesRequestModel.fromJson(Map<String, dynamic> json) { PostHistoriesRequestModel.fromJson(Map<String, dynamic> json) {
if (json['listMedicalHistoryVM'] != null) { if (json['listMedicalHistoryVM'] != null) {
listMedicalHistoryVM = new List<ListMedicalHistoryVM>(); listMedicalHistoryVM = [];
json['listMedicalHistoryVM'].forEach((v) { json['listMedicalHistoryVM'].forEach((v) {
listMedicalHistoryVM.add(new ListMedicalHistoryVM.fromJson(v)); listMedicalHistoryVM!.add(new ListMedicalHistoryVM.fromJson(v));
}); });
} }
doctorID = json['DoctorID']; doctorID = json['DoctorID'];
@ -17,8 +17,7 @@ class PostHistoriesRequestModel {
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>();
if (this.listMedicalHistoryVM != null) { if (this.listMedicalHistoryVM != null) {
data['listMedicalHistoryVM'] = data['listMedicalHistoryVM'] = this.listMedicalHistoryVM!.map((v) => v.toJson()).toList();
this.listMedicalHistoryVM.map((v) => v.toJson()).toList();
} }
data['DoctorID'] = this.doctorID; data['DoctorID'] = this.doctorID;
return data; return data;
@ -26,22 +25,22 @@ class PostHistoriesRequestModel {
} }
class ListMedicalHistoryVM { class ListMedicalHistoryVM {
int patientMRN; int? patientMRN;
int historyType; int? historyType;
int historyId; int? historyId;
int episodeId; int? episodeId;
int appointmentNo; int? appointmentNo;
bool isChecked; bool? isChecked;
String remarks; String? remarks;
ListMedicalHistoryVM( ListMedicalHistoryVM(
{this.patientMRN, {this.patientMRN,
this.historyType, this.historyType,
this.historyId, this.historyId,
this.episodeId, this.episodeId,
this.appointmentNo, this.appointmentNo,
this.isChecked, this.isChecked,
this.remarks}); this.remarks});
ListMedicalHistoryVM.fromJson(Map<String, dynamic> json) { ListMedicalHistoryVM.fromJson(Map<String, dynamic> json) {
patientMRN = json['patientMRN']; patientMRN = json['patientMRN'];

@ -1,15 +1,13 @@
class PostPhysicalExamRequestModel { class PostPhysicalExamRequestModel {
List<ListHisProgNotePhysicalExaminationVM> listHisProgNotePhysicalExaminationVM; List<ListHisProgNotePhysicalExaminationVM>? listHisProgNotePhysicalExaminationVM;
PostPhysicalExamRequestModel({this.listHisProgNotePhysicalExaminationVM}); PostPhysicalExamRequestModel({this.listHisProgNotePhysicalExaminationVM});
PostPhysicalExamRequestModel.fromJson(Map<String, dynamic> json) { PostPhysicalExamRequestModel.fromJson(Map<String, dynamic> json) {
if (json['listHisProgNotePhysicalExaminationVM'] != null) { if (json['listHisProgNotePhysicalExaminationVM'] != null) {
listHisProgNotePhysicalExaminationVM = new List<ListHisProgNotePhysicalExaminationVM>(); listHisProgNotePhysicalExaminationVM = [];
json['listHisProgNotePhysicalExaminationVM'].forEach((v) { json['listHisProgNotePhysicalExaminationVM'].forEach((v) {
listHisProgNotePhysicalExaminationVM listHisProgNotePhysicalExaminationVM!.add(new ListHisProgNotePhysicalExaminationVM.fromJson(v));
.add(new ListHisProgNotePhysicalExaminationVM.fromJson(v));
}); });
} }
} }
@ -18,97 +16,97 @@ class PostPhysicalExamRequestModel {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.listHisProgNotePhysicalExaminationVM != null) { if (this.listHisProgNotePhysicalExaminationVM != null) {
data['listHisProgNotePhysicalExaminationVM'] = data['listHisProgNotePhysicalExaminationVM'] =
this.listHisProgNotePhysicalExaminationVM.map((v) => v.toJson()).toList(); this.listHisProgNotePhysicalExaminationVM!.map((v) => v.toJson()).toList();
} }
return data; return data;
} }
} }
class ListHisProgNotePhysicalExaminationVM { class ListHisProgNotePhysicalExaminationVM {
int episodeId; int? episodeId;
int appointmentNo; int? appointmentNo;
int examType; int? examType;
int examId; int? examId;
int patientMRN; int? patientMRN;
bool isNormal; bool? isNormal;
bool isAbnormal; bool? isAbnormal;
bool notExamined; bool? notExamined;
String examName; String? examName;
String examinationTypeName; String? examinationTypeName;
int examinationType; int? examinationType;
String remarks; String? remarks;
bool isNew; bool? isNew;
int createdBy; int? createdBy;
String createdOn; String? createdOn;
String createdByName; String? createdByName;
int editedBy; int? editedBy;
String editedOn; String? editedOn;
String editedByName; String? editedByName;
ListHisProgNotePhysicalExaminationVM( ListHisProgNotePhysicalExaminationVM(
{this.episodeId, {this.episodeId,
this.appointmentNo, this.appointmentNo,
this.examType, this.examType,
this.examId, this.examId,
this.patientMRN, this.patientMRN,
this.isNormal, this.isNormal,
this.isAbnormal, this.isAbnormal,
this.notExamined, this.notExamined,
this.examName, this.examName,
this.examinationTypeName, this.examinationTypeName,
this.examinationType, this.examinationType,
this.remarks, this.remarks,
this.isNew, this.isNew,
this.createdBy, this.createdBy,
this.createdOn, this.createdOn,
this.createdByName, this.createdByName,
this.editedBy, this.editedBy,
this.editedOn, this.editedOn,
this.editedByName}); this.editedByName});
ListHisProgNotePhysicalExaminationVM.fromJson(Map<String, dynamic> json) { ListHisProgNotePhysicalExaminationVM.fromJson(Map<String, dynamic> json) {
episodeId = json['episodeId']; episodeId = json['episodeId'];
appointmentNo = json['appointmentNo']; appointmentNo = json['appointmentNo'];
examType = json['examType']; examType = json['examType'];
examId = json['examId']; examId = json['examId'];
patientMRN = json['patientMRN']; patientMRN = json['patientMRN'];
isNormal = json['isNormal']; isNormal = json['isNormal'];
isAbnormal = json['isAbnormal']; isAbnormal = json['isAbnormal'];
notExamined = json['notExamined']; notExamined = json['notExamined'];
examName = json['examName']; examName = json['examName'];
examinationTypeName = json['examinationTypeName']; examinationTypeName = json['examinationTypeName'];
examinationType = json['examinationType']; examinationType = json['examinationType'];
remarks = json['remarks']; remarks = json['remarks'];
isNew = json['isNew']; isNew = json['isNew'];
createdBy = json['createdBy']; createdBy = json['createdBy'];
createdOn = json['createdOn']; createdOn = json['createdOn'];
createdByName = json['createdByName']; createdByName = json['createdByName'];
editedBy = json['editedBy']; editedBy = json['editedBy'];
editedOn = json['editedOn']; editedOn = json['editedOn'];
editedByName = json['editedByName']; editedByName = json['editedByName'];
} }
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['episodeId'] = this.episodeId; data['episodeId'] = this.episodeId;
data['appointmentNo'] = this.appointmentNo; data['appointmentNo'] = this.appointmentNo;
data['examType'] = this.examType; data['examType'] = this.examType;
data['examId'] = this.examId; data['examId'] = this.examId;
data['patientMRN'] = this.patientMRN; data['patientMRN'] = this.patientMRN;
data['isNormal'] = this.isNormal; data['isNormal'] = this.isNormal;
data['isAbnormal'] = this.isAbnormal; data['isAbnormal'] = this.isAbnormal;
data['notExamined'] = this.notExamined; data['notExamined'] = this.notExamined;
data['examName'] = this.examName; data['examName'] = this.examName;
data['examinationTypeName'] = this.examinationTypeName; data['examinationTypeName'] = this.examinationTypeName;
data['examinationType'] = this.examinationType; data['examinationType'] = this.examinationType;
data['remarks'] = this.remarks; data['remarks'] = this.remarks;
data['isNew'] = this.isNew; data['isNew'] = this.isNew;
data['createdBy'] = this.createdBy; data['createdBy'] = this.createdBy;
data['createdOn'] = this.createdOn; data['createdOn'] = this.createdOn;
data['createdByName'] = this.createdByName; data['createdByName'] = this.createdByName;
data['editedBy'] = this.editedBy; data['editedBy'] = this.editedBy;
data['editedOn'] = this.editedOn; data['editedOn'] = this.editedOn;
data['editedByName'] = this.editedByName; data['editedByName'] = this.editedByName;
return data; return data;
}
} }
}

@ -1,18 +1,13 @@
class PostProgressNoteRequestModel { class PostProgressNoteRequestModel {
int appointmentNo; int? appointmentNo;
int episodeId; int? episodeId;
int patientMRN; int? patientMRN;
String planNote; String? planNote;
dynamic doctorID; dynamic doctorID;
dynamic editedBy; dynamic editedBy;
PostProgressNoteRequestModel( PostProgressNoteRequestModel(
{this.appointmentNo, {this.appointmentNo, this.episodeId, this.patientMRN, this.planNote, this.doctorID, this.editedBy});
this.episodeId,
this.patientMRN,
this.planNote,
this.doctorID,
this.editedBy});
PostProgressNoteRequestModel.fromJson(Map<String, dynamic> json) { PostProgressNoteRequestModel.fromJson(Map<String, dynamic> json) {
appointmentNo = json['AppointmentNo']; appointmentNo = json['AppointmentNo'];

@ -1,7 +1,7 @@
class DashboardModel { class DashboardModel {
String kPIName; String? kPIName;
int displaySequence; int? displaySequence;
List<Summaryoptions> summaryoptions; List<Summaryoptions>? summaryoptions;
DashboardModel({this.kPIName, this.displaySequence, this.summaryoptions}); DashboardModel({this.kPIName, this.displaySequence, this.summaryoptions});
@ -9,9 +9,9 @@ class DashboardModel {
kPIName = json['KPIName']; kPIName = json['KPIName'];
displaySequence = json['displaySequence']; displaySequence = json['displaySequence'];
if (json['summaryoptions'] != null) { if (json['summaryoptions'] != null) {
summaryoptions = new List<Summaryoptions>(); summaryoptions = <Summaryoptions>[];
json['summaryoptions'].forEach((v) { json['summaryoptions'].forEach((v) {
summaryoptions.add(new Summaryoptions.fromJson(v)); summaryoptions!.add(new Summaryoptions.fromJson(v));
}); });
} }
} }
@ -21,21 +21,20 @@ class DashboardModel {
data['KPIName'] = this.kPIName; data['KPIName'] = this.kPIName;
data['displaySequence'] = this.displaySequence; data['displaySequence'] = this.displaySequence;
if (this.summaryoptions != null) { if (this.summaryoptions != null) {
data['summaryoptions'] = data['summaryoptions'] = this.summaryoptions!.map((v) => v.toJson()).toList();
this.summaryoptions.map((v) => v.toJson()).toList();
} }
return data; return data;
} }
} }
class Summaryoptions { class Summaryoptions {
String kPIParameter; String? kPIParameter;
String captionColor; String? captionColor;
bool isCaptionBold; bool? isCaptionBold;
bool isValueBold; bool? isValueBold;
int order; int? order;
int value; int? value;
String valueColor; String? valueColor;
Summaryoptions( Summaryoptions(
{this.kPIParameter, {this.kPIParameter,

@ -6,20 +6,14 @@
*@desc: Clinic Model *@desc: Clinic Model
*/ */
class ClinicModel { class ClinicModel {
Null setupID; dynamic setupID;
int projectID; int? projectID;
int doctorID; int? doctorID;
int clinicID; int? clinicID;
bool isActive; bool? isActive;
String clinicName; String? clinicName;
ClinicModel( ClinicModel({this.setupID, this.projectID, this.doctorID, this.clinicID, this.isActive, this.clinicName});
{this.setupID,
this.projectID,
this.doctorID,
this.clinicID,
this.isActive,
this.clinicName});
ClinicModel.fromJson(Map<String, dynamic> json) { ClinicModel.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID']; setupID = json['SetupID'];

@ -1,45 +1,45 @@
class DoctorProfileModel { class DoctorProfileModel {
int doctorID; int? doctorID;
String doctorName; String? doctorName;
Null doctorNameN; dynamic doctorNameN;
int clinicID; int? clinicID;
String clinicDescription; String? clinicDescription;
Null clinicDescriptionN; dynamic clinicDescriptionN;
Null licenseExpiry; dynamic licenseExpiry;
int employmentType; int? employmentType;
dynamic setupID; dynamic setupID;
int projectID; int? projectID;
String projectName; String? projectName;
String nationalityID; String? nationalityID;
String nationalityName; String? nationalityName;
Null nationalityNameN; dynamic nationalityNameN;
int gender; int? gender;
String genderDescription; String? genderDescription;
Null genderDescriptionN; dynamic genderDescriptionN;
Null doctorTitle; dynamic doctorTitle;
Null projectNameN; dynamic projectNameN;
bool isAllowWaitList; bool? isAllowWaitList;
String titleDescription; String? titleDescription;
Null titleDescriptionN; dynamic titleDescriptionN;
Null isRegistered; dynamic isRegistered;
Null isDoctorDummy; dynamic isDoctorDummy;
bool isActive; bool? isActive;
Null isDoctorAppointmentDisplayed; dynamic isDoctorAppointmentDisplayed;
bool doctorClinicActive; bool? doctorClinicActive;
Null isbookingAllowed; dynamic isbookingAllowed;
String doctorCases; String? doctorCases;
Null doctorPicture; dynamic doctorPicture;
String doctorProfileInfo; String? doctorProfileInfo;
List<String> specialty; List<String>? specialty;
int actualDoctorRate; int? actualDoctorRate;
String doctorImageURL; String? doctorImageURL;
int doctorRate; int? doctorRate;
String doctorTitleForProfile; String? doctorTitleForProfile;
bool isAppointmentAllowed; bool? isAppointmentAllowed;
String nationalityFlagURL; String? nationalityFlagURL;
int noOfPatientsRate; int? noOfPatientsRate;
String qR; String? qR;
int serviceID; int? serviceID;
DoctorProfileModel( DoctorProfileModel(
{this.doctorID, {this.doctorID,
@ -84,7 +84,7 @@ class DoctorProfileModel {
this.qR, this.qR,
this.serviceID}); this.serviceID});
DoctorProfileModel.fromJson(Map<String, dynamic> json) { DoctorProfileModel.fromJson(Map<dynamic, dynamic> json) {
doctorID = json['DoctorID']; doctorID = json['DoctorID'];
doctorName = json['DoctorName']; doctorName = json['DoctorName'];
doctorNameN = json['DoctorNameN']; doctorNameN = json['DoctorNameN'];
@ -110,26 +110,26 @@ class DoctorProfileModel {
isRegistered = json['IsRegistered']; isRegistered = json['IsRegistered'];
isDoctorDummy = json['IsDoctorDummy']; isDoctorDummy = json['IsDoctorDummy'];
isActive = json['IsActive']; isActive = json['IsActive'];
isDoctorAppointmentDisplayed = json['IsDoctorAppointmentDisplayed']; isDoctorAppointmentDisplayed = json['IsDoctorAppoint?mentDisplayed'];
doctorClinicActive = json['DoctorClinicActive']; doctorClinicActive = json['DoctorClinicActive'];
isbookingAllowed = json['IsbookingAllowed']; isbookingAllowed = json['IsbookingAllowed'];
doctorCases = json['DoctorCases']; doctorCases = json['DoctorCases'];
doctorPicture = json['DoctorPicture']; doctorPicture = json['DoctorPicture'];
doctorProfileInfo = json['DoctorProfileInfo']; doctorProfileInfo = json['DoctorProfileInfo'];
specialty = json['Specialty'].cast<String>(); specialty = json['Specialty'].cast<String?>();
actualDoctorRate = json['ActualDoctorRate']; actualDoctorRate = json['ActualDoctorRate'];
doctorImageURL = json['DoctorImageURL']; doctorImageURL = json['DoctorImageURL'];
doctorRate = json['DoctorRate']; doctorRate = json['DoctorRate'];
doctorTitleForProfile = json['DoctorTitleForProfile']; doctorTitleForProfile = json['DoctorTitleForProfile'];
isAppointmentAllowed = json['IsAppointmentAllowed']; isAppointmentAllowed = json['IsAppoint?mentAllowed'];
nationalityFlagURL = json['NationalityFlagURL']; nationalityFlagURL = json['NationalityFlagURL'];
noOfPatientsRate = json['NoOfPatientsRate']; noOfPatientsRate = json['NoOfPatientsRate'];
qR = json['QR']; qR = json['QR'];
serviceID = json['ServiceID']; serviceID = json['ServiceID'];
} }
Map<String, dynamic> toJson() { Map<dynamic?, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<dynamic, dynamic> data = new Map<dynamic, dynamic>();
data['DoctorID'] = this.doctorID; data['DoctorID'] = this.doctorID;
data['DoctorName'] = this.doctorName; data['DoctorName'] = this.doctorName;
data['DoctorNameN'] = this.doctorNameN; data['DoctorNameN'] = this.doctorNameN;
@ -155,7 +155,7 @@ class DoctorProfileModel {
data['IsRegistered'] = this.isRegistered; data['IsRegistered'] = this.isRegistered;
data['IsDoctorDummy'] = this.isDoctorDummy; data['IsDoctorDummy'] = this.isDoctorDummy;
data['IsActive'] = this.isActive; data['IsActive'] = this.isActive;
data['IsDoctorAppointmentDisplayed'] = this.isDoctorAppointmentDisplayed; data['IsDoctorAppoint?mentDisplayed'] = this.isDoctorAppointmentDisplayed;
data['DoctorClinicActive'] = this.doctorClinicActive; data['DoctorClinicActive'] = this.doctorClinicActive;
data['IsbookingAllowed'] = this.isbookingAllowed; data['IsbookingAllowed'] = this.isbookingAllowed;
data['DoctorCases'] = this.doctorCases; data['DoctorCases'] = this.doctorCases;
@ -166,7 +166,7 @@ class DoctorProfileModel {
data['DoctorImageURL'] = this.doctorImageURL; data['DoctorImageURL'] = this.doctorImageURL;
data['DoctorRate'] = this.doctorRate; data['DoctorRate'] = this.doctorRate;
data['DoctorTitleForProfile'] = this.doctorTitleForProfile; data['DoctorTitleForProfile'] = this.doctorTitleForProfile;
data['IsAppointmentAllowed'] = this.isAppointmentAllowed; data['IsAppoint?mentAllowed'] = this.isAppointmentAllowed;
data['NationalityFlagURL'] = this.nationalityFlagURL; data['NationalityFlagURL'] = this.nationalityFlagURL;
data['NoOfPatientsRate'] = this.noOfPatientsRate; data['NoOfPatientsRate'] = this.noOfPatientsRate;
data['QR'] = this.qR; data['QR'] = this.qR;

@ -1,12 +1,11 @@
import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
class ListDoctorWorkingHoursTable { class ListDoctorWorkingHoursTable {
DateTime date; DateTime? date;
String dayName; String? dayName;
String workingHours; String? workingHours;
String projectName; String? projectName;
String clinicName; String? clinicName;
ListDoctorWorkingHoursTable({ ListDoctorWorkingHoursTable({
this.date, this.date,
@ -37,5 +36,5 @@ class ListDoctorWorkingHoursTable {
class WorkingHours { class WorkingHours {
String from; String from;
String to; String to;
WorkingHours({this.from, this.to}); WorkingHours({required this.from, required this.to});
} }

@ -1,68 +1,64 @@
import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
class ListGtMyPatientsQuestions { class ListGtMyPatientsQuestions {
String setupID; String? setupID;
int projectID; int? projectID;
int transactionNo; int? transactionNo;
int patientType; int? patientType;
int patientID; int? patientID;
int doctorID; int? doctorID;
int requestType; int? requestType;
DateTime requestDate; DateTime? requestDate;
String requestTime; String? requestTime;
String remarks; String? remarks;
int status; int? status;
int createdBy; int? createdBy;
String createdOn; String? createdOn;
int editedBy; int? editedBy;
String editedOn; String? editedOn;
String patientName; String? patientName;
Null patientNameN; dynamic patientNameN;
int gender; int? gender;
String dateofBirth; String? dateofBirth;
String mobileNumber; String? mobileNumber;
String emailAddress; String? emailAddress;
int admissionNo; int? admissionNo;
int referringDoctor; int? referringDoctor;
int lineItemNo; int? lineItemNo;
String age; String? age;
String genderDescription; String? genderDescription;
bool isVidaCall; bool? isVidaCall;
ListGtMyPatientsQuestions( ListGtMyPatientsQuestions(
{this.setupID, {this.setupID,
this.projectID, this.projectID,
this.transactionNo, this.transactionNo,
this.patientType, this.patientType,
this.patientID, this.patientID,
this.doctorID, this.doctorID,
this.requestType, this.requestType,
this.requestDate, this.requestDate,
this.requestTime, this.requestTime,
this.remarks, this.remarks,
this.status, this.status,
this.createdBy, this.createdBy,
this.createdOn, this.createdOn,
this.editedBy, this.editedBy,
this.editedOn, this.editedOn,
this.patientName, this.patientName,
this.patientNameN, this.patientNameN,
this.gender, this.gender,
this.dateofBirth, this.dateofBirth,
this.mobileNumber, this.mobileNumber,
this.emailAddress, this.emailAddress,
this.admissionNo, this.admissionNo,
this.referringDoctor, this.referringDoctor,
this.lineItemNo, this.lineItemNo,
this.age, this.age,
this.genderDescription, this.genderDescription,
this.isVidaCall}); this.isVidaCall});
ListGtMyPatientsQuestions.fromJson(Map<String, dynamic> json) { ListGtMyPatientsQuestions.fromJson(Map<String?, dynamic> json) {
setupID = json['SetupID']; setupID = json['SetupID'];
projectID = json['ProjectID']; projectID = json['ProjectID'];
transactionNo = json['TransactionNo']; transactionNo = json['TransactionNo'];
@ -70,7 +66,7 @@ class ListGtMyPatientsQuestions {
patientID = json['PatientID']; patientID = json['PatientID'];
doctorID = json['DoctorID']; doctorID = json['DoctorID'];
requestType = json['RequestType']; requestType = json['RequestType'];
requestDate = AppDateUtils.convertStringToDate(json['RequestDate']) ; requestDate = AppDateUtils.convertStringToDate(json['RequestDate']);
requestTime = json['RequestTime']; requestTime = json['RequestTime'];
remarks = json['Remarks']; remarks = json['Remarks'];
status = json['Status']; status = json['Status'];
@ -92,8 +88,8 @@ class ListGtMyPatientsQuestions {
isVidaCall = json['IsVidaCall']; isVidaCall = json['IsVidaCall'];
} }
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['SetupID'] = this.setupID; data['SetupID'] = this.setupID;
data['ProjectID'] = this.projectID; data['ProjectID'] = this.projectID;
data['TransactionNo'] = this.transactionNo; data['TransactionNo'] = this.transactionNo;
@ -124,4 +120,3 @@ class ListGtMyPatientsQuestions {
return data; return data;
} }
} }

@ -6,32 +6,32 @@
*@desc: ProfileReqModel *@desc: ProfileReqModel
*/ */
class ProfileReqModel { class ProfileReqModel {
int projectID; int? projectID;
int clinicID; int? clinicID;
int doctorID; int? doctorID;
bool isRegistered; bool? isRegistered;
bool license; bool? license;
int languageID; int? languageID;
String stamp; String? stamp;
String iPAdress; String? iPAdress;
double versionID; double? versionID;
int channel; int? channel;
String tokenID; String? tokenID;
String sessionID; String? sessionID;
bool isLoginForDoctorApp; bool? isLoginForDoctorApp;
ProfileReqModel( ProfileReqModel(
{this.projectID, {this.projectID,
this.clinicID, this.clinicID,
this.doctorID, this.doctorID,
this.isRegistered =true, this.isRegistered = true,
this.license, this.license,
this.languageID, this.languageID,
this.stamp = '2020-04-26T09:32:18.317Z', this.stamp = '2020-04-26T09:32:18.317Z',
this.iPAdress='11.11.11.11', this.iPAdress = '11.11.11.11',
this.versionID=5.5, this.versionID = 5.5,
this.channel=9, this.channel = 9,
this.sessionID='E2bsEeYEJo', this.sessionID = 'E2bsEeYEJo',
this.tokenID, this.tokenID,
this.isLoginForDoctorApp = true}); this.isLoginForDoctorApp = true});

@ -1,41 +1,40 @@
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
class RequestAddReferredDoctorRemarks { class RequestAddReferredDoctorRemarks {
int projectID; int? projectID;
String admissionNo; String? admissionNo;
int lineItemNo; int? lineItemNo;
String referredDoctorRemarks; String? referredDoctorRemarks;
int editedBy; int? editedBy;
int patientID; int? patientID;
int referringDoctor; int? referringDoctor;
int languageID; int? languageID;
String stamp; String? stamp;
String iPAdress; String? iPAdress;
double versionID; double? versionID;
int channel; int? channel;
String tokenID; String? tokenID;
String sessionID; String? sessionID;
bool isLoginForDoctorApp; bool? isLoginForDoctorApp;
bool patientOutSA; bool? patientOutSA;
RequestAddReferredDoctorRemarks( RequestAddReferredDoctorRemarks(
{this.projectID, {this.projectID,
this.admissionNo, this.admissionNo,
this.lineItemNo, this.lineItemNo,
this.referredDoctorRemarks, this.referredDoctorRemarks,
this.editedBy, this.editedBy,
this.patientID, this.patientID,
this.referringDoctor, this.referringDoctor,
this.languageID = LANGUAGE_ID, this.languageID = LANGUAGE_ID,
this.stamp = STAMP, this.stamp = STAMP,
this.iPAdress = IP_ADDRESS, this.iPAdress = IP_ADDRESS,
this.versionID = VERSION_ID, this.versionID = VERSION_ID,
this.channel= CHANNEL, this.channel = CHANNEL,
this.tokenID, this.tokenID,
this.sessionID = SESSION_ID, this.sessionID = SESSION_ID,
this.isLoginForDoctorApp = IS_LOGIN_FOR_DOCTOR_APP, this.isLoginForDoctorApp = IS_LOGIN_FOR_DOCTOR_APP,
this.patientOutSA = PATIENT_OUT_SA}); this.patientOutSA = PATIENT_OUT_SA});
RequestAddReferredDoctorRemarks.fromJson(Map<String, dynamic> json) { RequestAddReferredDoctorRemarks.fromJson(Map<String, dynamic> json) {
projectID = json['ProjectID']; projectID = json['ProjectID'];

@ -1,34 +1,34 @@
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
class RequestDoctorReply { class RequestDoctorReply {
int projectID; int? projectID;
int doctorID; int? doctorID;
int transactionNo; int? transactionNo;
int languageID; int? languageID;
String stamp; String? stamp;
String iPAdress; String? iPAdress;
double versionID; double? versionID;
int channel; int? channel;
String tokenID; String? tokenID;
String sessionID; String? sessionID;
bool isLoginForDoctorApp; bool? isLoginForDoctorApp;
bool patientOutSA; bool? patientOutSA;
RequestDoctorReply( RequestDoctorReply(
{this.projectID , {this.projectID,
this.doctorID , this.doctorID,
this.transactionNo = TRANSACTION_NO , this.transactionNo = TRANSACTION_NO,
this.languageID , this.languageID,
this.stamp , this.stamp,
this.iPAdress, this.iPAdress,
this.versionID , this.versionID,
this.channel, this.channel,
this.tokenID , this.tokenID,
this.sessionID, this.sessionID,
this.isLoginForDoctorApp , this.isLoginForDoctorApp,
this.patientOutSA }); this.patientOutSA});
RequestDoctorReply.fromJson(Map<String, dynamic> json) { RequestDoctorReply.fromJson(Map<String?, dynamic> json) {
projectID = json['ProjectID']; projectID = json['ProjectID'];
doctorID = json['DoctorID']; doctorID = json['DoctorID'];
transactionNo = json['TransactionNo']; transactionNo = json['TransactionNo'];

@ -1,20 +1,18 @@
class RequestSchedule { class RequestSchedule {
int projectID; int? projectID;
int clinicID; int? clinicID;
int doctorID; int? doctorID;
int doctorWorkingHoursDays; int? doctorWorkingHoursDays;
int languageID; int? languageID;
String stamp; String? stamp;
String iPAdress; String? iPAdress;
double versionID; double? versionID;
int channel; int? channel;
String tokenID; String? tokenID;
String sessionID; String? sessionID;
bool isLoginForDoctorApp; bool? isLoginForDoctorApp;
bool patientOutSA; bool? patientOutSA;
int patientTypeID; int? patientTypeID;
RequestSchedule( RequestSchedule(
{this.projectID, {this.projectID,

@ -1,18 +1,13 @@
class StatsticsForCertainDoctorRequest { class StatsticsForCertainDoctorRequest {
bool outSA; bool? outSA;
int doctorID; int? doctorID;
String tokenID; String? tokenID;
int channel; int? channel;
int projectID; int? projectID;
String generalid; String? generalid;
StatsticsForCertainDoctorRequest( StatsticsForCertainDoctorRequest(
{this.outSA, {this.outSA, this.doctorID, this.tokenID, this.channel, this.projectID, this.generalid});
this.doctorID,
this.tokenID,
this.channel,
this.projectID,
this.generalid});
StatsticsForCertainDoctorRequest.fromJson(Map<String, dynamic> json) { StatsticsForCertainDoctorRequest.fromJson(Map<String, dynamic> json) {
outSA = json['OutSA']; outSA = json['OutSA'];

@ -1,16 +1,16 @@
class UserModel { class UserModel {
String userID; String? userID;
String password; String? password;
int projectID; int? projectID;
int languageID; int? languageID;
String iPAdress; String? iPAdress;
double versionID; double? versionID;
int channel; int? channel;
String sessionID; String? sessionID;
String tokenID; String? tokenID;
String stamp; String? stamp;
bool isLoginForDoctorApp; bool? isLoginForDoctorApp;
int patientOutSA; int? patientOutSA;
UserModel( UserModel(
{this.userID, {this.userID,
@ -26,7 +26,7 @@ class UserModel {
this.isLoginForDoctorApp, this.isLoginForDoctorApp,
this.patientOutSA}); this.patientOutSA});
UserModel.fromJson(Map<String, dynamic> json) { UserModel.fromJson(Map<String?, dynamic> json) {
userID = json['UserID']; userID = json['UserID'];
password = json['Password']; password = json['Password'];
projectID = json['ProjectID']; projectID = json['ProjectID'];

@ -1,54 +1,54 @@
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
class VerifyReferralDoctorRemarks { class VerifyReferralDoctorRemarks {
int projectID; int? projectID;
String admissionNo; String? admissionNo;
int lineItemNo; int? lineItemNo;
String referredDoctorRemarks; String? referredDoctorRemarks;
int editedBy; int? editedBy;
int patientID; int? patientID;
int referringDoctor; int? referringDoctor;
int languageID; int? languageID;
String stamp; String? stamp;
String iPAdress; String? iPAdress;
double versionID; double? versionID;
int channel; int? channel;
String tokenID; String? tokenID;
String sessionID; String? sessionID;
bool isLoginForDoctorApp; bool? isLoginForDoctorApp;
bool patientOutSA; bool? patientOutSA;
String firstName; String? firstName;
String middleName; String? middleName;
String lastName; String? lastName;
String patientMobileNumber; String? patientMobileNumber;
String patientIdentificationID; String? patientIdentificationID;
VerifyReferralDoctorRemarks( VerifyReferralDoctorRemarks({
{this.projectID, this.projectID,
this.admissionNo, this.admissionNo,
this.lineItemNo, this.lineItemNo,
this.referredDoctorRemarks, this.referredDoctorRemarks,
this.editedBy, this.editedBy,
this.patientID, this.patientID,
this.referringDoctor, this.referringDoctor,
this.languageID = LANGUAGE_ID, this.languageID = LANGUAGE_ID,
this.stamp = STAMP, this.stamp = STAMP,
this.iPAdress = IP_ADDRESS, this.iPAdress = IP_ADDRESS,
this.versionID = VERSION_ID, this.versionID = VERSION_ID,
this.channel= CHANNEL, this.channel = CHANNEL,
this.tokenID, this.tokenID,
this.sessionID = SESSION_ID, this.sessionID = SESSION_ID,
this.isLoginForDoctorApp = IS_LOGIN_FOR_DOCTOR_APP, this.isLoginForDoctorApp = IS_LOGIN_FOR_DOCTOR_APP,
this.patientOutSA = PATIENT_OUT_SA, this.patientOutSA = PATIENT_OUT_SA,
this.firstName, this.firstName,
this.middleName, this.middleName,
this.lastName, this.lastName,
this.patientMobileNumber, this.patientMobileNumber,
this.patientIdentificationID, this.patientIdentificationID,
}); });
VerifyReferralDoctorRemarks.fromJson(Map<String, dynamic> json) { VerifyReferralDoctorRemarks.fromJson(Map<String?, dynamic> json) {
projectID = json['ProjectID']; projectID = json['ProjectID'];
admissionNo = json['AdmissionNo']; admissionNo = json['AdmissionNo'];
lineItemNo = json['LineItemNo']; lineItemNo = json['LineItemNo'];
@ -65,18 +65,15 @@ class VerifyReferralDoctorRemarks {
sessionID = json['SessionID']; sessionID = json['SessionID'];
isLoginForDoctorApp = json['IsLoginForDoctorApp']; isLoginForDoctorApp = json['IsLoginForDoctorApp'];
patientOutSA = json['PatientOutSA']; patientOutSA = json['PatientOutSA'];
firstName= json["FirstName"]; firstName = json["FirstName"];
middleName= json["MiddleName"]; middleName = json["MiddleName"];
lastName= json["LastName"]; lastName = json["LastName"];
patientMobileNumber= json["PatientMobileNumber"]; patientMobileNumber = json["PatientMobileNumber"];
patientIdentificationID = json["PatientIdentificationID"]; patientIdentificationID = json["PatientIdentificationID"];
} }
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;
data['AdmissionNo'] = this.admissionNo; data['AdmissionNo'] = this.admissionNo;
data['LineItemNo'] = this.lineItemNo; data['LineItemNo'] = this.lineItemNo;

@ -1,12 +1,11 @@
class EndCallReq { class EndCallReq {
int vCID; int? vCID;
String tokenID; String? tokenID;
String generalid; String? generalid;
int doctorId; int? doctorId;
bool isDestroy; bool? isDestroy;
EndCallReq( EndCallReq({this.vCID, this.tokenID, this.generalid, this.doctorId, this.isDestroy});
{this.vCID, this.tokenID, this.generalid, this.doctorId, this.isDestroy});
EndCallReq.fromJson(Map<String, dynamic> json) { EndCallReq.fromJson(Map<String, dynamic> json) {
vCID = json['VC_ID']; vCID = json['VC_ID'];

@ -1,16 +1,11 @@
class LiveCarePendingListRequest { class LiveCarePendingListRequest {
PatientData patientData; PatientData? patientData;
int doctorID; int? doctorID;
String sErServiceID; String? sErServiceID;
int projectID; int? projectID;
int sourceID; int? sourceID;
LiveCarePendingListRequest( LiveCarePendingListRequest({this.patientData, this.doctorID, this.sErServiceID, this.projectID, this.sourceID});
{this.patientData,
this.doctorID,
this.sErServiceID,
this.projectID,
this.sourceID});
LiveCarePendingListRequest.fromJson(Map<String, dynamic> json) { LiveCarePendingListRequest.fromJson(Map<String, dynamic> json) {
patientData = new PatientData.fromJson(json['PatientData']); patientData = new PatientData.fromJson(json['PatientData']);
@ -23,7 +18,7 @@ class LiveCarePendingListRequest {
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['PatientData'] = this.patientData.toJson(); data['PatientData'] = this.patientData!.toJson();
data['DoctorID'] = this.doctorID; data['DoctorID'] = this.doctorID;
data['SErServiceID'] = this.sErServiceID; data['SErServiceID'] = this.sErServiceID;
data['ProjectID'] = this.projectID; data['ProjectID'] = this.projectID;
@ -33,9 +28,9 @@ class LiveCarePendingListRequest {
} }
class PatientData { class PatientData {
bool isOutKSA; bool? isOutKSA;
PatientData({this.isOutKSA}); PatientData({required this.isOutKSA});
PatientData.fromJson(Map<String, dynamic> json) { PatientData.fromJson(Map<String, dynamic> json) {
isOutKSA = json['IsOutKSA']; isOutKSA = json['IsOutKSA'];

@ -1,43 +1,43 @@
class LiveCarePendingListResponse { class LiveCarePendingListResponse {
dynamic acceptedBy; dynamic acceptedBy;
dynamic acceptedOn; dynamic acceptedOn;
int age; int? age;
dynamic appointmentNo; dynamic appointmentNo;
String arrivalTime; String? arrivalTime;
String arrivalTimeD; String? arrivalTimeD;
int callStatus; int? callStatus;
String clientRequestID; String? clientRequestID;
String clinicName; String? clinicName;
dynamic consoltationEnd; dynamic consoltationEnd;
dynamic consultationNotes; dynamic consultationNotes;
dynamic createdOn; dynamic createdOn;
String dateOfBirth; String? dateOfBirth;
String deviceToken; String? deviceToken;
String deviceType; String? deviceType;
dynamic doctorName; dynamic doctorName;
String editOn; String? editOn;
String gender; String? gender;
bool isFollowUP; bool? isFollowUP;
dynamic isFromVida; dynamic isFromVida;
int isLoginB; int? isLoginB;
bool isOutKSA; bool? isOutKSA;
int isRejected; int? isRejected;
String language; String? language;
double latitude; double? latitude;
double longitude; double? longitude;
String mobileNumber; String? mobileNumber;
dynamic openSession; dynamic openSession;
dynamic openTokenID; dynamic openTokenID;
String patientID; String? patientID;
String patientName; String? patientName;
int patientStatus; int? patientStatus;
String preferredLanguage; String? preferredLanguage;
int projectID; int? projectID;
double scoring; double? scoring;
int serviceID; int? serviceID;
dynamic tokenID; dynamic tokenID;
int vCID; int? vCID;
String voipToken; String? voipToken;
LiveCarePendingListResponse( LiveCarePendingListResponse(
{this.acceptedBy, {this.acceptedBy,
@ -80,11 +80,11 @@ class LiveCarePendingListResponse {
this.vCID, this.vCID,
this.voipToken}); this.voipToken});
LiveCarePendingListResponse.fromJson(Map<String, dynamic> json) { LiveCarePendingListResponse.fromJson(Map<String?, dynamic> json) {
acceptedBy = json['AcceptedBy']; acceptedBy = json['AcceptedBy'];
acceptedOn = json['AcceptedOn']; acceptedOn = json['AcceptedOn'];
age = json['Age']; age = json['Age'];
appointmentNo = json['AppointmentNo']; appointmentNo = json['Appoint?mentNo'];
arrivalTime = json['ArrivalTime']; arrivalTime = json['ArrivalTime'];
arrivalTimeD = json['ArrivalTimeD']; arrivalTimeD = json['ArrivalTimeD'];
callStatus = json['CallStatus']; callStatus = json['CallStatus'];
@ -122,12 +122,12 @@ class LiveCarePendingListResponse {
voipToken = json['VoipToken']; voipToken = json['VoipToken'];
} }
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['AcceptedBy'] = this.acceptedBy; data['AcceptedBy'] = this.acceptedBy;
data['AcceptedOn'] = this.acceptedOn; data['AcceptedOn'] = this.acceptedOn;
data['Age'] = this.age; data['Age'] = this.age;
data['AppointmentNo'] = this.appointmentNo; data['Appoint?mentNo'] = this.appointmentNo;
data['ArrivalTime'] = this.arrivalTime; data['ArrivalTime'] = this.arrivalTime;
data['ArrivalTimeD'] = this.arrivalTimeD; data['ArrivalTimeD'] = this.arrivalTimeD;
data['CallStatus'] = this.callStatus; data['CallStatus'] = this.callStatus;

@ -1,14 +1,10 @@
class SessionStatusModel { class SessionStatusModel {
bool isAuthenticated; bool? isAuthenticated;
int messageStatus; int? messageStatus;
String result; String? result;
int sessionStatus; int? sessionStatus;
SessionStatusModel( SessionStatusModel({this.isAuthenticated, this.messageStatus, this.result, this.sessionStatus});
{this.isAuthenticated,
this.messageStatus,
this.result,
this.sessionStatus});
SessionStatusModel.fromJson(Map<dynamic, dynamic> json) { SessionStatusModel.fromJson(Map<dynamic, dynamic> json) {
isAuthenticated = json['IsAuthenticated']; isAuthenticated = json['IsAuthenticated'];

@ -1,15 +1,15 @@
class StartCallReq { class StartCallReq {
int vCID; int? vCID;
bool isrecall; bool? isrecall;
String tokenID; String? tokenID;
String generalid; String? generalid;
int doctorId; int? doctorId;
bool isOutKsa; bool? isOutKsa;
String projectName; String? projectName;
String docotrName; String? docotrName;
String clincName; String? clincName;
String docSpec; String? docSpec;
int clinicId; int? clinicId;
StartCallReq( StartCallReq(
{this.vCID, {this.vCID,

@ -1,10 +1,10 @@
class StartCallRes { class StartCallRes {
String result; String? result;
String openSessionID; String? openSessionID;
String openTokenID; String? openTokenID;
bool isAuthenticated; bool? isAuthenticated;
int messageStatus; int? messageStatus;
String appointmentNo; String? appointmentNo;
StartCallRes( StartCallRes(
{this.result, {this.result,

@ -1,18 +1,12 @@
class TransferToAdminReq { class TransferToAdminReq {
int vCID; int? vCID;
String tokenID; String? tokenID;
String generalid; String? generalid;
int doctorId; int? doctorId;
bool isOutKsa; bool? isOutKsa;
String notes; String? notes;
TransferToAdminReq( TransferToAdminReq({this.vCID, this.tokenID, this.generalid, this.doctorId, this.isOutKsa, this.notes});
{this.vCID,
this.tokenID,
this.generalid,
this.doctorId,
this.isOutKsa,
this.notes});
TransferToAdminReq.fromJson(Map<String, dynamic> json) { TransferToAdminReq.fromJson(Map<String, dynamic> json) {
vCID = json['VC_ID']; vCID = json['VC_ID'];

@ -1,32 +1,32 @@
class MedicalReportTemplate { class MedicalReportTemplate {
String setupID; String? setupID;
int projectID; int? projectID;
int templateID; int? templateID;
String procedureID; String? procedureID;
int reportType; int? reportType;
String templateName; String? templateName;
String templateNameN; String? templateNameN;
String templateText; String? templateText;
String templateTextN; String? templateTextN;
bool isActive; bool? isActive;
String templateTextHtml; String? templateTextHtml;
String templateTextNHtml; String? templateTextNHtml;
MedicalReportTemplate( MedicalReportTemplate(
{this.setupID, {this.setupID,
this.projectID, this.projectID,
this.templateID, this.templateID,
this.procedureID, this.procedureID,
this.reportType, this.reportType,
this.templateName, this.templateName,
this.templateNameN, this.templateNameN,
this.templateText, this.templateText,
this.templateTextN, this.templateTextN,
this.isActive, this.isActive,
this.templateTextHtml, this.templateTextHtml,
this.templateTextNHtml}); this.templateTextNHtml});
MedicalReportTemplate.fromJson(Map<String, dynamic> json) { MedicalReportTemplate.fromJson(Map<String?, dynamic> json) {
setupID = json['SetupID']; setupID = json['SetupID'];
projectID = json['ProjectID']; projectID = json['ProjectID'];
templateID = json['TemplateID']; templateID = json['TemplateID'];
@ -41,8 +41,8 @@ class MedicalReportTemplate {
templateTextNHtml = json['TemplateTextNHtml']; templateTextNHtml = json['TemplateTextNHtml'];
} }
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['SetupID'] = this.setupID; data['SetupID'] = this.setupID;
data['ProjectID'] = this.projectID; data['ProjectID'] = this.projectID;
data['TemplateID'] = this.templateID; data['TemplateID'] = this.templateID;

@ -1,60 +1,60 @@
class MedicalReportModel { class MedicalReportModel {
String reportData; String? reportData;
String setupID; String? setupID;
int projectID; int? projectID;
String projectName; String? projectName;
String projectNameN; String? projectNameN;
int patientID; int? patientID;
String invoiceNo; String? invoiceNo;
int status; int? status;
String verifiedOn; String? verifiedOn;
dynamic verifiedBy; dynamic verifiedBy;
String editedOn; String? editedOn;
int editedBy; int? editedBy;
int lineItemNo; int? lineItemNo;
String createdOn; String? createdOn;
int templateID; int? templateID;
int doctorID; int? doctorID;
int doctorGender; int? doctorGender;
String doctorGenderDescription; String? doctorGenderDescription;
String doctorGenderDescriptionN; String? doctorGenderDescriptionN;
String doctorImageURL; String? doctorImageURL;
String doctorName; String? doctorName;
String doctorNameN; String? doctorNameN;
int clinicID; int? clinicID;
String clinicName; String? clinicName;
String clinicNameN; String? clinicNameN;
String reportDataHtml; String? reportDataHtml;
MedicalReportModel( MedicalReportModel(
{this.reportData, {this.reportData,
this.setupID, this.setupID,
this.projectID, this.projectID,
this.projectName, this.projectName,
this.projectNameN, this.projectNameN,
this.patientID, this.patientID,
this.invoiceNo, this.invoiceNo,
this.status, this.status,
this.verifiedOn, this.verifiedOn,
this.verifiedBy, this.verifiedBy,
this.editedOn, this.editedOn,
this.editedBy, this.editedBy,
this.lineItemNo, this.lineItemNo,
this.createdOn, this.createdOn,
this.templateID, this.templateID,
this.doctorID, this.doctorID,
this.doctorGender, this.doctorGender,
this.doctorGenderDescription, this.doctorGenderDescription,
this.doctorGenderDescriptionN, this.doctorGenderDescriptionN,
this.doctorImageURL, this.doctorImageURL,
this.doctorName, this.doctorName,
this.doctorNameN, this.doctorNameN,
this.clinicID, this.clinicID,
this.clinicName, this.clinicName,
this.clinicNameN, this.clinicNameN,
this.reportDataHtml}); this.reportDataHtml});
MedicalReportModel.fromJson(Map<String, dynamic> json) { MedicalReportModel.fromJson(Map<String?, dynamic> json) {
reportData = json['ReportData']; reportData = json['ReportData'];
setupID = json['SetupID']; setupID = json['SetupID'];
projectID = json['ProjectID']; projectID = json['ProjectID'];
@ -83,8 +83,8 @@ class MedicalReportModel {
reportDataHtml = json['ReportDataHtml']; reportDataHtml = json['ReportDataHtml'];
} }
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['ReportData'] = this.reportData; data['ReportData'] = this.reportData;
data['SetupID'] = this.setupID; data['SetupID'] = this.setupID;
data['ProjectID'] = this.projectID; data['ProjectID'] = this.projectID;

@ -1,44 +1,44 @@
class PatientArrivalEntity { class PatientArrivalEntity {
String age; String? age;
String appointmentDate; String? appointmentDate;
int appointmentNo; int? appointmentNo;
String appointmentType; String? appointmentType;
String arrivedOn; String? arrivedOn;
String companyName; String? companyName;
String endTime; String? endTime;
int episodeNo; int? episodeNo;
int fallRiskScore; int? fallRiskScore;
String gender; String? gender;
int medicationOrders; int? medicationOrders;
String mobileNumber; String? mobileNumber;
String nationality; String? nationality;
int patientMRN; int? patientMRN;
String patientName; String? patientName;
int rowCount; int? rowCount;
String startTime; String? startTime;
String visitType; String? visitType;
PatientArrivalEntity( PatientArrivalEntity(
{this.age, {this.age,
this.appointmentDate, this.appointmentDate,
this.appointmentNo, this.appointmentNo,
this.appointmentType, this.appointmentType,
this.arrivedOn, this.arrivedOn,
this.companyName, this.companyName,
this.endTime, this.endTime,
this.episodeNo, this.episodeNo,
this.fallRiskScore, this.fallRiskScore,
this.gender, this.gender,
this.medicationOrders, this.medicationOrders,
this.mobileNumber, this.mobileNumber,
this.nationality, this.nationality,
this.patientMRN, this.patientMRN,
this.patientName, this.patientName,
this.rowCount, this.rowCount,
this.startTime, this.startTime,
this.visitType}); this.visitType});
PatientArrivalEntity.fromJson(Map<String, dynamic> json) { PatientArrivalEntity.fromJson(Map<String?, dynamic> json) {
age = json['age']; age = json['age'];
appointmentDate = json['appointmentDate']; appointmentDate = json['appointmentDate'];
appointmentNo = json['appointmentNo']; appointmentNo = json['appointmentNo'];
@ -59,8 +59,8 @@ class PatientArrivalEntity {
visitType = json['visitType']; visitType = json['visitType'];
} }
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['age'] = this.age; data['age'] = this.age;
data['appointmentDate'] = this.appointmentDate; data['appointmentDate'] = this.appointmentDate;
data['appointmentNo'] = this.appointmentNo; data['appointmentNo'] = this.appointmentNo;
@ -81,4 +81,4 @@ class PatientArrivalEntity {
data['visitType'] = this.visitType; data['visitType'] = this.visitType;
return data; return data;
} }
} }

@ -1,6 +1,5 @@
class ClinicByProjectIdRequest { class ClinicByProjectIdRequest {
/*
/*
*@author: Ibrahim Albitar *@author: Ibrahim Albitar
*@Date:03/06/2020 *@Date:03/06/2020
*@param: *@param:
@ -8,17 +7,17 @@ class ClinicByProjectIdRequest {
*@desc: ClinicByProjectIdRequest *@desc: ClinicByProjectIdRequest
*/ */
int projectID; int? projectID;
int languageID; int? languageID;
String stamp; String? stamp;
String iPAdress; String? iPAdress;
double versionID; double? versionID;
int channel; int? channel;
String tokenID; String? tokenID;
String sessionID; String? sessionID;
bool isLoginForDoctorApp; bool? isLoginForDoctorApp;
bool patientOutSA; bool? patientOutSA;
int patientTypeID; int? patientTypeID;
/* /*
{ {
"ProjectID": 21, "ProjectID": 21,
@ -48,7 +47,7 @@ class ClinicByProjectIdRequest {
this.patientOutSA = false, this.patientOutSA = false,
this.patientTypeID = 1}); this.patientTypeID = 1});
ClinicByProjectIdRequest.fromJson(Map<String, dynamic> json) { ClinicByProjectIdRequest.fromJson(Map<String?, dynamic> json) {
projectID = json['ProjectID']; projectID = json['ProjectID'];
languageID = json['LanguageID']; languageID = json['LanguageID'];
stamp = json['stamp']; stamp = json['stamp'];

@ -1,35 +1,31 @@
class DoctorsByClinicIdRequest { class DoctorsByClinicIdRequest {
int? clinicID;
int? projectID;
bool? continueDentalPlan;
bool? isSearchAppointmnetByClinicID;
int? patientID;
int? gender;
bool? isGetNearAppointment;
bool? isVoiceCommand;
int? latitude;
int? longitude;
bool? license;
bool? isDentalAllowedBackend;
int clinicID; DoctorsByClinicIdRequest({
int projectID; this.clinicID,
bool continueDentalPlan; this.projectID,
bool isSearchAppointmnetByClinicID; this.continueDentalPlan = false,
int patientID; this.isSearchAppointmnetByClinicID = true,
int gender; this.patientID,
bool isGetNearAppointment; this.gender,
bool isVoiceCommand; this.isGetNearAppointment = false,
int latitude; this.isVoiceCommand = true,
int longitude; this.latitude = 0,
bool license; this.longitude = 0,
bool isDentalAllowedBackend; this.license = true,
this.isDentalAllowedBackend = false,
});
DoctorsByClinicIdRequest(
{
this.clinicID,
this.projectID,
this.continueDentalPlan = false,
this.isSearchAppointmnetByClinicID = true,
this.patientID,
this.gender,
this.isGetNearAppointment = false,
this.isVoiceCommand = true,
this.latitude = 0,
this.longitude = 0,
this.license = true,
this.isDentalAllowedBackend = false,
});
DoctorsByClinicIdRequest.fromJson(Map<String, dynamic> json) { DoctorsByClinicIdRequest.fromJson(Map<String, dynamic> json) {
clinicID = json['ClinicID']; clinicID = json['ClinicID'];
@ -61,6 +57,5 @@ class DoctorsByClinicIdRequest {
data['License'] = this.license; data['License'] = this.license;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend; data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
return data; return data;
} }
} }

@ -1,6 +1,5 @@
class STPReferralFrequencyRequest { class STPReferralFrequencyRequest {
/*
/*
*@author: Ibrahim Albitar *@author: Ibrahim Albitar
*@Date:03/06/2020 *@Date:03/06/2020
*@param: *@param:
@ -8,16 +7,16 @@ class STPReferralFrequencyRequest {
*@desc: *@desc:
*/ */
int languageID; int? languageID;
String stamp; String? stamp;
String iPAdress; String? iPAdress;
double versionID; double? versionID;
int channel; int? channel;
String tokenID; String? tokenID;
String sessionID; String? sessionID;
bool isLoginForDoctorApp; bool? isLoginForDoctorApp;
bool patientOutSA; bool? patientOutSA;
int patientTypeID; int? patientTypeID;
/* /*
{ {
"LanguageID": 2, "LanguageID": 2,
@ -45,7 +44,7 @@ class STPReferralFrequencyRequest {
this.patientOutSA = false, this.patientOutSA = false,
this.patientTypeID = 1}); this.patientTypeID = 1});
STPReferralFrequencyRequest.fromJson(Map<String, dynamic> json) { STPReferralFrequencyRequest.fromJson(Map<String?, dynamic> json) {
languageID = json['LanguageID']; languageID = json['LanguageID'];
stamp = json['stamp']; stamp = json['stamp'];
iPAdress = json['IPAdress']; iPAdress = json['IPAdress'];

@ -7,9 +7,10 @@
*/ */
import 'dart:convert'; import 'dart:convert';
ListPendingPatientListModel listPendingPatientListModelFromJson(String str) => ListPendingPatientListModel.fromJson(json.decode(str)); ListPendingPatientListModel listPendingPatientListModelFromJson(String? str) =>
ListPendingPatientListModel.fromJson(json.decode(str!));
String listPendingPatientListModelToJson(ListPendingPatientListModel data) => json.encode(data.toJson()); String? listPendingPatientListModelToJson(ListPendingPatientListModel data) => json.encode(data.toJson());
class ListPendingPatientListModel { class ListPendingPatientListModel {
ListPendingPatientListModel({ ListPendingPatientListModel({
@ -56,127 +57,128 @@ class ListPendingPatientListModel {
dynamic acceptedBy; dynamic acceptedBy;
dynamic acceptedOn; dynamic acceptedOn;
int age; int? age;
dynamic appointmentNo; dynamic appointmentNo;
String arrivalTime; String? arrivalTime;
String arrivalTimeD; String? arrivalTimeD;
int callStatus; int? callStatus;
String clientRequestId; String? clientRequestId;
String clinicName; String? clinicName;
dynamic consoltationEnd; dynamic consoltationEnd;
dynamic consultationNotes; dynamic consultationNotes;
dynamic createdOn; dynamic createdOn;
DateTime dateOfBirth; DateTime? dateOfBirth;
String deviceToken; String? deviceToken;
String deviceType; String? deviceType;
dynamic doctorName; dynamic doctorName;
String editOn; String? editOn;
String gender; String? gender;
bool isFollowUp; bool? isFollowUp;
dynamic isFromVida; dynamic isFromVida;
int isLoginB; int? isLoginB;
bool isOutKsa; bool? isOutKsa;
int isRejected; int? isRejected;
String language; String? language;
double latitude; double? latitude;
double longitude; double? longitude;
String mobileNumber; String? mobileNumber;
dynamic openSession; dynamic openSession;
dynamic openTokenId; dynamic openTokenId;
String patientId; String? patientId;
String patientName; String? patientName;
int patientStatus; int? patientStatus;
String preferredLanguage; String? preferredLanguage;
int projectId; int? projectId;
int scoring; int? scoring;
int serviceId; int? serviceId;
dynamic tokenId; dynamic tokenId;
int vcId; int? vcId;
String voipToken; String? voipToken;
factory ListPendingPatientListModel.fromJson(Map<String, dynamic> json) => ListPendingPatientListModel( factory ListPendingPatientListModel.fromJson(Map<String?, dynamic> json) => ListPendingPatientListModel(
acceptedBy: json["AcceptedBy"], acceptedBy: json["AcceptedBy"],
acceptedOn: json["AcceptedOn"], acceptedOn: json["AcceptedOn"],
age: json["Age"], age: json["Age"],
appointmentNo: json["AppointmentNo"], appointmentNo: json["AppointmentNo"],
arrivalTime: json["ArrivalTime"], arrivalTime: json["ArrivalTime"],
arrivalTimeD: json["ArrivalTimeD"], arrivalTimeD: json["ArrivalTimeD"],
callStatus: json["CallStatus"], callStatus: json["CallStatus"],
clientRequestId: json["ClientRequestID"], clientRequestId: json["ClientRequestID"],
clinicName: json["ClinicName"], clinicName: json["ClinicName"],
consoltationEnd: json["ConsoltationEnd"], consoltationEnd: json["ConsoltationEnd"],
consultationNotes: json["ConsultationNotes"], consultationNotes: json["ConsultationNotes"],
createdOn: json["CreatedOn"], createdOn: json["CreatedOn"],
dateOfBirth: DateTime.parse(json["DateOfBirth"]), dateOfBirth: DateTime.parse(json["DateOfBirth"]),
deviceToken: json["DeviceToken"], deviceToken: json["DeviceToken"],
deviceType: json["DeviceType"], deviceType: json["DeviceType"],
doctorName: json["DoctorName"], doctorName: json["DoctorName"],
editOn: json["EditOn"], editOn: json["EditOn"],
gender: json["Gender"], gender: json["Gender"],
isFollowUp: json["IsFollowUP"], isFollowUp: json["IsFollowUP"],
isFromVida: json["IsFromVida"], isFromVida: json["IsFromVida"],
isLoginB: json["IsLoginB"], isLoginB: json["IsLoginB"],
isOutKsa: json["IsOutKSA"], isOutKsa: json["IsOutKSA"],
isRejected: json["IsRejected"], isRejected: json["IsRejected"],
language: json["Language"], language: json["Language"],
latitude: json["Latitude"].toDouble(), latitude: json["Latitude"].toDouble(),
longitude: json["Longitude"].toDouble(), longitude: json["Longitude"].toDouble(),
mobileNumber: json["MobileNumber"], mobileNumber: json["MobileNumber"],
openSession: json["OpenSession"], openSession: json["OpenSession"],
openTokenId: json["OpenTokenID"], openTokenId: json["OpenTokenID"],
patientId: json["PatientID"], patientId: json["PatientID"],
patientName: json["PatientName"], patientName: json["PatientName"],
patientStatus: json["PatientStatus"], patientStatus: json["PatientStatus"],
preferredLanguage: json["PreferredLanguage"], preferredLanguage: json["PreferredLanguage"],
projectId: json["ProjectID"], projectId: json["ProjectID"],
scoring: json["Scoring"], scoring: json["Scoring"],
serviceId: json["ServiceID"], serviceId: json["ServiceID"],
tokenId: json["TokenID"], tokenId: json["TokenID"],
vcId: json["VC_ID"], vcId: json["VC_ID"],
voipToken: json["VoipToken"], voipToken: json["VoipToken"],
); );
Map<String, dynamic> toJson() => { Map<String?, dynamic> toJson() => {
"AcceptedBy": acceptedBy, "AcceptedBy": acceptedBy,
"AcceptedOn": acceptedOn, "AcceptedOn": acceptedOn,
"Age": age, "Age": age,
"AppointmentNo": appointmentNo, "AppointmentNo": appointmentNo,
"ArrivalTime": arrivalTime, "ArrivalTime": arrivalTime,
"ArrivalTimeD": arrivalTimeD, "ArrivalTimeD": arrivalTimeD,
"CallStatus": callStatus, "CallStatus": callStatus,
"ClientRequestID": clientRequestId, "ClientRequestID": clientRequestId,
"ClinicName": clinicName, "ClinicName": clinicName,
"ConsoltationEnd": consoltationEnd, "ConsoltationEnd": consoltationEnd,
"ConsultationNotes": consultationNotes, "ConsultationNotes": consultationNotes,
"CreatedOn": createdOn, "CreatedOn": createdOn,
"DateOfBirth": "${dateOfBirth.year.toString().padLeft(4, '0')}-${dateOfBirth.month.toString().padLeft(2, '0')}-${dateOfBirth.day.toString().padLeft(2, '0')}", "DateOfBirth":
"DeviceToken": deviceToken, "${dateOfBirth!.year.toString().padLeft(4, '0')}-${dateOfBirth!.month.toString().padLeft(2, '0')}-${dateOfBirth!.day.toString().padLeft(2, '0')}",
"DeviceType": deviceType, "DeviceToken": deviceToken,
"DoctorName": doctorName, "DeviceType": deviceType,
"EditOn": editOn, "DoctorName": doctorName,
"Gender": gender, "EditOn": editOn,
"IsFollowUP": isFollowUp, "Gender": gender,
"IsFromVida": isFromVida, "IsFollowUP": isFollowUp,
"IsLoginB": isLoginB, "IsFromVida": isFromVida,
"IsOutKSA": isOutKsa, "IsLoginB": isLoginB,
"IsRejected": isRejected, "IsOutKSA": isOutKsa,
"Language": language, "IsRejected": isRejected,
"Latitude": latitude, "Language": language,
"Longitude": longitude, "Latitude": latitude,
"MobileNumber": mobileNumber, "Longitude": longitude,
"OpenSession": openSession, "MobileNumber": mobileNumber,
"OpenTokenID": openTokenId, "OpenSession": openSession,
"PatientID": patientId, "OpenTokenID": openTokenId,
"PatientName": patientName, "PatientID": patientId,
"PatientStatus": patientStatus, "PatientName": patientName,
"PreferredLanguage": preferredLanguage, "PatientStatus": patientStatus,
"ProjectID": projectId, "PreferredLanguage": preferredLanguage,
"Scoring": scoring, "ProjectID": projectId,
"ServiceID": serviceId, "Scoring": scoring,
"TokenID": tokenId, "ServiceID": serviceId,
"VC_ID": vcId, "TokenID": tokenId,
"VoipToken": voipToken, "VC_ID": vcId,
}; "VoipToken": voipToken,
};
} }
// To parse this JSON data, do // To parse this JSON data, do
// //

@ -21,23 +21,22 @@
*@desc: *@desc:
*/ */
class InsuranceAprovalsRequest { class InsuranceAprovalsRequest {
int exuldAppNO; int? exuldAppNO;
int patientID; int? patientID;
int channel; int? channel;
int projectID; int? projectID;
int languageID; int? languageID;
String stamp; String? stamp;
String ipAdress; String? ipAdress;
double versionID; double? versionID;
String tokenID; String? tokenID;
String sessionID; String? sessionID;
bool isLoginForDoctorApp; bool? isLoginForDoctorApp;
bool patientOutSA; bool? patientOutSA;
int patientTypeID; int? patientTypeID;
InsuranceAprovalsRequest( InsuranceAprovalsRequest(
{ {this.exuldAppNO,
this.exuldAppNO,
this.patientID, this.patientID,
this.channel = 9, this.channel = 9,
this.projectID = 12, this.projectID = 12,
@ -46,12 +45,12 @@ class InsuranceAprovalsRequest {
this.stamp = '2020-04-23T21:01:21.492Z', this.stamp = '2020-04-23T21:01:21.492Z',
this.ipAdress = '11.11.11.11', this.ipAdress = '11.11.11.11',
this.versionID = 5.8, this.versionID = 5.8,
this.tokenID , this.tokenID,
this.sessionID = 'e29zoooEJ4', this.sessionID = 'e29zoooEJ4',
this.isLoginForDoctorApp = true, this.isLoginForDoctorApp = true,
this.patientOutSA = false}); this.patientOutSA = false});
InsuranceAprovalsRequest.fromJson(Map<String, dynamic> json) { InsuranceAprovalsRequest.fromJson(Map<String?, dynamic> json) {
exuldAppNO = json['EXuldAPPNO']; exuldAppNO = json['EXuldAPPNO'];
patientID = json['PatientID']; patientID = json['PatientID'];
channel = json['Channel']; channel = json['Channel'];
@ -67,8 +66,8 @@ class InsuranceAprovalsRequest {
patientOutSA = json['PatientOutSA']; patientOutSA = json['PatientOutSA'];
} }
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['EXuldAPPNO'] = this.exuldAppNO; data['EXuldAPPNO'] = this.exuldAppNO;
data['PatientID'] = this.patientID; data['PatientID'] = this.patientID;
data['Channel'] = this.channel; data['Channel'] = this.channel;

@ -1,24 +1,23 @@
/*
/* *@author: Elham Rababah
*@author: Elham Rababah *@Date:6/5/2020
*@Date:6/5/2020 *@param:
*@param:
*@return:LabOrdersReqModel *@return:LabOrdersReqModel
*@desc: LabOrdersReqModel class *@desc: LabOrdersReqModel class
*/ */
class LabOrdersReqModel { class LabOrdersReqModel {
int patientID; int? patientID;
int patientTypeID; int? patientTypeID;
int projectID; int? projectID;
int languageID; int? languageID;
String stamp; String? stamp;
String iPAdress; String? iPAdress;
double versionID; double? versionID;
int channel; int? channel;
String tokenID; String? tokenID;
String sessionID; String? sessionID;
bool isLoginForDoctorApp; bool? isLoginForDoctorApp;
bool patientOutSA; bool? patientOutSA;
LabOrdersReqModel( LabOrdersReqModel(
{this.patientID, {this.patientID,
@ -27,12 +26,12 @@ class LabOrdersReqModel {
this.languageID, this.languageID,
this.tokenID, this.tokenID,
this.stamp = '2020-04-26T09:32:18.317Z', this.stamp = '2020-04-26T09:32:18.317Z',
this.iPAdress='11.11.11.11', this.iPAdress = '11.11.11.11',
this.versionID=5.5, this.versionID = 5.5,
this.channel=9, this.channel = 9,
this.sessionID='E2bsEeYEJo', this.sessionID = 'E2bsEeYEJo',
this.isLoginForDoctorApp =true, this.isLoginForDoctorApp = true,
this.patientOutSA=false}); this.patientOutSA = false});
LabOrdersReqModel.fromJson(Map<String, dynamic> json) { LabOrdersReqModel.fromJson(Map<String, dynamic> json) {
patientID = json['PatientID']; patientID = json['PatientID'];

@ -1,29 +1,27 @@
import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
class LabOrdersResModel { class LabOrdersResModel {
String setupID; String? setupID;
int projectID; int? projectID;
int patientID; int? patientID;
int patientType; int? patientType;
int orderNo; int? orderNo;
String orderDate; String? orderDate;
int invoiceTransactionType; int? invoiceTransactionType;
int invoiceNo; int? invoiceNo;
int clinicId; int? clinicId;
int doctorId; int? doctorId;
int status; int? status;
String createdBy; String? createdBy;
Null createdByN; dynamic createdByN;
DateTime createdOn; DateTime? createdOn;
String editedBy; String? editedBy;
Null editedByN; dynamic editedByN;
String editedOn; String? editedOn;
String clinicName; String? clinicName;
String doctorImageURL; String? doctorImageURL;
String doctorName; String? doctorName;
String projectName; String? projectName;
LabOrdersResModel( LabOrdersResModel(
{this.setupID, {this.setupID,
@ -48,7 +46,7 @@ class LabOrdersResModel {
this.doctorName, this.doctorName,
this.projectName}); this.projectName});
LabOrdersResModel.fromJson(Map<String, dynamic> json) { LabOrdersResModel.fromJson(Map<String?, dynamic> json) {
setupID = json['SetupID']; setupID = json['SetupID'];
projectID = json['ProjectID']; projectID = json['ProjectID'];
patientID = json['PatientID']; patientID = json['PatientID'];
@ -72,8 +70,8 @@ class LabOrdersResModel {
projectName = json['ProjectName']; projectName = json['ProjectName'];
} }
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['SetupID'] = this.setupID; data['SetupID'] = this.setupID;
data['ProjectID'] = this.projectID; data['ProjectID'] = this.projectID;
data['PatientID'] = this.patientID; data['PatientID'] = this.patientID;

@ -1,64 +1,64 @@
class LabResult { class LabResult {
String setupID; String? setupID;
int projectID; int? projectID;
int orderNo; int? orderNo;
int lineItemNo; int? lineItemNo;
int packageID; int? packageID;
int testID; int? testID;
String description; String? description;
String resultValue; String? resultValue;
String referenceRange; String? referenceRange;
Null convertedResultValue; dynamic convertedResultValue;
Null convertedReferenceRange; dynamic convertedReferenceRange;
Null resultValueFlag; dynamic resultValueFlag;
int status; int? status;
String createdBy; String? createdBy;
Null createdByN; dynamic createdByN;
String createdOn; String? createdOn;
String editedBy; String? editedBy;
Null editedByN; dynamic editedByN;
String editedOn; String? editedOn;
String verifiedBy; String? verifiedBy;
Null verifiedByN; dynamic verifiedByN;
String verifiedOn; String? verifiedOn;
Null patientID; Null patientID;
int gender; int? gender;
Null maleInterpretativeData; dynamic maleinterpretativeData;
Null femaleInterpretativeData; dynamic femaleinterpretativeData;
String testCode; String? testCode;
String statusDescription; String? statusDescription;
LabResult( LabResult(
{this.setupID, {this.setupID,
this.projectID, this.projectID,
this.orderNo, this.orderNo,
this.lineItemNo, this.lineItemNo,
this.packageID, this.packageID,
this.testID, this.testID,
this.description, this.description,
this.resultValue, this.resultValue,
this.referenceRange, this.referenceRange,
this.convertedResultValue, this.convertedResultValue,
this.convertedReferenceRange, this.convertedReferenceRange,
this.resultValueFlag, this.resultValueFlag,
this.status, this.status,
this.createdBy, this.createdBy,
this.createdByN, this.createdByN,
this.createdOn, this.createdOn,
this.editedBy, this.editedBy,
this.editedByN, this.editedByN,
this.editedOn, this.editedOn,
this.verifiedBy, this.verifiedBy,
this.verifiedByN, this.verifiedByN,
this.verifiedOn, this.verifiedOn,
this.patientID, this.patientID,
this.gender, this.gender,
this.maleInterpretativeData, this.maleinterpretativeData,
this.femaleInterpretativeData, this.femaleinterpretativeData,
this.testCode, this.testCode,
this.statusDescription}); this.statusDescription});
LabResult.fromJson(Map<String, dynamic> json) { LabResult.fromJson(Map<String?, dynamic> json) {
setupID = json['SetupID']; setupID = json['SetupID'];
projectID = json['ProjectID']; projectID = json['ProjectID'];
orderNo = json['OrderNo']; orderNo = json['OrderNo'];
@ -83,14 +83,14 @@ class LabResult {
verifiedOn = json['VerifiedOn']; verifiedOn = json['VerifiedOn'];
patientID = json['PatientID']; patientID = json['PatientID'];
gender = json['Gender']; gender = json['Gender'];
maleInterpretativeData = json['MaleInterpretativeData']; maleinterpretativeData = json['Maleint?erpretativeData'];
femaleInterpretativeData = json['FemaleInterpretativeData']; femaleinterpretativeData = json['Femaleint?erpretativeData'];
testCode = json['TestCode']; testCode = json['TestCode'];
statusDescription = json['StatusDescription']; statusDescription = json['StatusDescription'];
} }
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['SetupID'] = this.setupID; data['SetupID'] = this.setupID;
data['ProjectID'] = this.projectID; data['ProjectID'] = this.projectID;
data['OrderNo'] = this.orderNo; data['OrderNo'] = this.orderNo;
@ -115,8 +115,8 @@ class LabResult {
data['VerifiedOn'] = this.verifiedOn; data['VerifiedOn'] = this.verifiedOn;
data['PatientID'] = this.patientID; data['PatientID'] = this.patientID;
data['Gender'] = this.gender; data['Gender'] = this.gender;
data['MaleInterpretativeData'] = this.maleInterpretativeData; data['Maleint?erpretativeData'] = this.maleinterpretativeData;
data['FemaleInterpretativeData'] = this.femaleInterpretativeData; data['Femaleint?erpretativeData'] = this.femaleinterpretativeData;
data['TestCode'] = this.testCode; data['TestCode'] = this.testCode;
data['StatusDescription'] = this.statusDescription; data['StatusDescription'] = this.statusDescription;
return data; return data;

@ -1,36 +1,36 @@
class RequestLabResult { class RequestLabResult {
int projectID; int? projectID;
String setupID; String? setupID;
int orderNo; int? orderNo;
int invoiceNo; int? invoiceNo;
int patientTypeID; int? patientTypeID;
int languageID; int? languageID;
String stamp; String? stamp;
String iPAdress; String? iPAdress;
double versionID; double? versionID;
int channel; int? channel;
String tokenID; String? tokenID;
String sessionID; String? sessionID;
bool isLoginForDoctorApp; bool? isLoginForDoctorApp;
bool patientOutSA; bool? patientOutSA;
RequestLabResult( RequestLabResult(
{this.projectID, {this.projectID,
this.setupID, this.setupID,
this.orderNo, this.orderNo,
this.invoiceNo, this.invoiceNo,
this.patientTypeID, this.patientTypeID,
this.languageID, this.languageID,
this.stamp, this.stamp,
this.iPAdress, this.iPAdress,
this.versionID, this.versionID,
this.channel, this.channel,
this.tokenID, this.tokenID,
this.sessionID, this.sessionID,
this.isLoginForDoctorApp, this.isLoginForDoctorApp,
this.patientOutSA}); this.patientOutSA});
RequestLabResult.fromJson(Map<String, dynamic> json) { RequestLabResult.fromJson(Map<String?, dynamic> json) {
projectID = json['ProjectID']; projectID = json['ProjectID'];
setupID = json['SetupID']; setupID = json['SetupID'];
orderNo = json['OrderNo']; orderNo = json['OrderNo'];

@ -1,37 +1,37 @@
import '../patiant_info_model.dart'; import '../patiant_info_model.dart';
class PendingReferral { class PendingReferral {
PatiantInformtion patientDetails; PatiantInformtion? patientDetails;
String doctorImageUrl; String? doctorImageUrl;
String nationalityFlagUrl; String? nationalityFlagUrl;
String responded; String? responded;
String answerFromTarget; String? answerFromTarget;
String createdOn; String? createdOn;
int data; int? data;
int isSameBranch; int? isSameBranch;
String editedOn; String? editedOn;
int interBranchReferral; int? interBranchReferral;
int patientID; int? patientID;
String patientName; String? patientName;
int patientType; int? patientType;
int referralNo; int? referralNo;
String referralStatus; String? referralStatus;
String referredByDoctorInfo; String? referredByDoctorInfo;
String referredFromBranchName; String? referredFromBranchName;
String referredOn; String? referredOn;
String referredType; String? referredType;
String remarksFromSource; String? remarksFromSource;
String respondedOn; String? respondedOn;
int sourceAppointmentNo; int? sourceAppointmentNo;
int sourceProjectId; int? sourceProjectId;
String sourceSetupID; String? sourceSetupID;
String startDate; String? startDate;
int targetAppointmentNo; int? targetAppointmentNo;
String targetClinicID; String? targetClinicID;
String targetDoctorID; String? targetDoctorID;
int targetProjectId; int? targetProjectId;
String targetSetupID; String? targetSetupID;
bool isReferralDoctorSameBranch; bool? isReferralDoctorSameBranch;
PendingReferral({ PendingReferral({
this.patientDetails, this.patientDetails,
@ -68,9 +68,7 @@ class PendingReferral {
}); });
PendingReferral.fromJson(Map<String, dynamic> json) { PendingReferral.fromJson(Map<String, dynamic> json) {
patientDetails = json['patientDetails'] != null patientDetails = json['patientDetails'] != null ? PatiantInformtion.fromJson(json['patientDetails']) : null;
? PatiantInformtion.fromJson(json['patientDetails'])
: null;
doctorImageUrl = json['DoctorImageURL']; doctorImageUrl = json['DoctorImageURL'];
nationalityFlagUrl = json['NationalityFlagURL']; nationalityFlagUrl = json['NationalityFlagURL'];
responded = json['Responded']; responded = json['Responded'];
@ -79,7 +77,7 @@ class PendingReferral {
data = json['data']; data = json['data'];
isSameBranch = json['isSameBranch']; isSameBranch = json['isSameBranch'];
editedOn = json['editedOn']; editedOn = json['editedOn'];
interBranchReferral = json['interBranchReferral']; int? erBranchReferral = json['int?erBranchReferral'];
patientID = json['patientID']; patientID = json['patientID'];
patientName = json['patientName']; patientName = json['patientName'];
patientType = json['patientType']; patientType = json['patientType'];
@ -91,19 +89,19 @@ class PendingReferral {
referredType = json['referredType']; referredType = json['referredType'];
remarksFromSource = json['remarksFromSource']; remarksFromSource = json['remarksFromSource'];
respondedOn = json['respondedOn']; respondedOn = json['respondedOn'];
sourceAppointmentNo = json['sourceAppointmentNo']; sourceAppointmentNo = json['sourceAppoint?mentNo'];
sourceProjectId = json['sourceProjectId']; sourceProjectId = json['sourceProjectId'];
sourceSetupID = json['sourceSetupID']; sourceSetupID = json['sourceSetupID'];
startDate = json['startDate']; startDate = json['startDate'];
targetAppointmentNo = json['targetAppointmentNo']; targetAppointmentNo = json['targetAppoint?mentNo'];
targetClinicID = json['targetClinicID']; targetClinicID = json['targetClinicID'];
targetDoctorID = json['targetDoctorID']; targetDoctorID = json['targetDoctorID'];
targetProjectId = json['targetProjectId']; targetProjectId = json['targetProjectId'];
targetSetupID = json['targetSetupID']; targetSetupID = json['targetSetupID'];
} }
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['DoctorImageURL'] = this.doctorImageUrl; data['DoctorImageURL'] = this.doctorImageUrl;
data['NationalityFlagURL'] = this.nationalityFlagUrl; data['NationalityFlagURL'] = this.nationalityFlagUrl;
data['Responded'] = this.responded; data['Responded'] = this.responded;
@ -112,7 +110,7 @@ class PendingReferral {
data['data'] = this.data; data['data'] = this.data;
data['isSameBranch'] = this.isSameBranch; data['isSameBranch'] = this.isSameBranch;
data['editedOn'] = this.editedOn; data['editedOn'] = this.editedOn;
data['interBranchReferral'] = this.interBranchReferral; data['int?erBranchReferral'] = this.interBranchReferral;
data['patientID'] = this.patientID; data['patientID'] = this.patientID;
data['patientName'] = this.patientName; data['patientName'] = this.patientName;
data['patientType'] = this.patientType; data['patientType'] = this.patientType;
@ -124,11 +122,11 @@ class PendingReferral {
data['referredType'] = this.referredType; data['referredType'] = this.referredType;
data['remarksFromSource'] = this.remarksFromSource; data['remarksFromSource'] = this.remarksFromSource;
data['respondedOn'] = this.respondedOn; data['respondedOn'] = this.respondedOn;
data['sourceAppointmentNo'] = this.sourceAppointmentNo; data['sourceAppoint?mentNo'] = this.sourceAppointmentNo;
data['sourceProjectId'] = this.sourceProjectId; data['sourceProjectId'] = this.sourceProjectId;
data['sourceSetupID'] = this.sourceSetupID; data['sourceSetupID'] = this.sourceSetupID;
data['startDate'] = this.startDate; data['startDate'] = this.startDate;
data['targetAppointmentNo'] = this.targetAppointmentNo; data['targetAppoint?mentNo'] = this.targetAppointmentNo;
data['targetClinicID'] = this.targetClinicID; data['targetClinicID'] = this.targetClinicID;
data['targetDoctorID'] = this.targetDoctorID; data['targetDoctorID'] = this.targetDoctorID;
data['targetProjectId'] = this.targetProjectId; data['targetProjectId'] = this.targetProjectId;

@ -1,86 +1,86 @@
class ClinicDoctor { class ClinicDoctor {
int clinicID; int? clinicID;
String clinicName; String? clinicName;
String doctorTitle; String? doctorTitle;
int iD; int? iD;
String name; String? name;
int projectID; int? projectID;
String projectName; String? projectName;
int actualDoctorRate; int? actualDoctorRate;
int clinicRoomNo; int? clinicRoomNo;
String date; String? date;
String dayName; String? dayName;
int doctorID; int? doctorID;
String doctorImageURL; String? doctorImageURL;
String doctorProfile; String? doctorProfile;
String doctorProfileInfo; String? doctorProfileInfo;
int doctorRate; int? doctorRate;
int gender; int? gender;
String genderDescription; String? genderDescription;
bool isAppointmentAllowed; bool? isAppointmentAllowed;
bool isDoctorAllowVedioCall; bool? isDoctorAllowVedioCall;
bool isDoctorDummy; bool? isDoctorDummy;
bool isLiveCare; bool? isLiveCare;
String latitude; String? latitude;
String longitude; String? longitude;
String nationalityFlagURL; String? nationalityFlagURL;
String nationalityID; String? nationalityID;
String nationalityName; String? nationalityName;
String nearestFreeSlot; String? nearestFreeSlot;
int noOfPatientsRate; int? noOfPatientsRate;
String originalClinicID; String? originalClinicID;
int personRate; int? personRate;
int projectDistanceInKiloMeters; int? projectDistanceInKiloMeters;
String qR; String? qR;
String qRString; String? qRString;
int rateNumber; int? rateNumber;
String serviceID; String? serviceID;
String setupID; String? setupID;
List<String> speciality; List<String>? speciality;
String workingHours; String? workingHours;
ClinicDoctor( ClinicDoctor(
{this.clinicID, {this.clinicID,
this.clinicName, this.clinicName,
this.doctorTitle, this.doctorTitle,
this.iD, this.iD,
this.name, this.name,
this.projectID, this.projectID,
this.projectName, this.projectName,
this.actualDoctorRate, this.actualDoctorRate,
this.clinicRoomNo, this.clinicRoomNo,
this.date, this.date,
this.dayName, this.dayName,
this.doctorID, this.doctorID,
this.doctorImageURL, this.doctorImageURL,
this.doctorProfile, this.doctorProfile,
this.doctorProfileInfo, this.doctorProfileInfo,
this.doctorRate, this.doctorRate,
this.gender, this.gender,
this.genderDescription, this.genderDescription,
this.isAppointmentAllowed, this.isAppointmentAllowed,
this.isDoctorAllowVedioCall, this.isDoctorAllowVedioCall,
this.isDoctorDummy, this.isDoctorDummy,
this.isLiveCare, this.isLiveCare,
this.latitude, this.latitude,
this.longitude, this.longitude,
this.nationalityFlagURL, this.nationalityFlagURL,
this.nationalityID, this.nationalityID,
this.nationalityName, this.nationalityName,
this.nearestFreeSlot, this.nearestFreeSlot,
this.noOfPatientsRate, this.noOfPatientsRate,
this.originalClinicID, this.originalClinicID,
this.personRate, this.personRate,
this.projectDistanceInKiloMeters, this.projectDistanceInKiloMeters,
this.qR, this.qR,
this.qRString, this.qRString,
this.rateNumber, this.rateNumber,
this.serviceID, this.serviceID,
this.setupID, this.setupID,
this.speciality, this.speciality,
this.workingHours}); this.workingHours});
ClinicDoctor.fromJson(Map<String, dynamic> json) { ClinicDoctor.fromJson(Map<String?, dynamic> json) {
clinicID = json['ClinicID']; clinicID = json['ClinicID'];
clinicName = json['ClinicName']; clinicName = json['ClinicName'];
doctorTitle = json['DoctorTitle']; doctorTitle = json['DoctorTitle'];
@ -99,7 +99,7 @@ class ClinicDoctor {
doctorRate = json['DoctorRate']; doctorRate = json['DoctorRate'];
gender = json['Gender']; gender = json['Gender'];
genderDescription = json['GenderDescription']; genderDescription = json['GenderDescription'];
isAppointmentAllowed = json['IsAppointmentAllowed']; isAppointmentAllowed = json['IsAppoint?mentAllowed'];
isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall']; isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall'];
isDoctorDummy = json['IsDoctorDummy']; isDoctorDummy = json['IsDoctorDummy'];
isLiveCare = json['IsLiveCare']; isLiveCare = json['IsLiveCare'];
@ -114,16 +114,16 @@ class ClinicDoctor {
personRate = json['PersonRate']; personRate = json['PersonRate'];
projectDistanceInKiloMeters = json['ProjectDistanceInKiloMeters']; projectDistanceInKiloMeters = json['ProjectDistanceInKiloMeters'];
qR = json['QR']; qR = json['QR'];
qRString = json['QRString']; qRString = json['QRString?'];
rateNumber = json['RateNumber']; rateNumber = json['RateNumber'];
serviceID = json['ServiceID']; serviceID = json['ServiceID'];
setupID = json['SetupID']; setupID = json['SetupID'];
speciality = json['Speciality'].cast<String>(); speciality = json['Speciality'].cast<String?>();
workingHours = json['WorkingHours']; workingHours = json['WorkingHours'];
} }
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['ClinicID'] = this.clinicID; data['ClinicID'] = this.clinicID;
data['ClinicName'] = this.clinicName; data['ClinicName'] = this.clinicName;
data['DoctorTitle'] = this.doctorTitle; data['DoctorTitle'] = this.doctorTitle;
@ -142,7 +142,7 @@ class ClinicDoctor {
data['DoctorRate'] = this.doctorRate; data['DoctorRate'] = this.doctorRate;
data['Gender'] = this.gender; data['Gender'] = this.gender;
data['GenderDescription'] = this.genderDescription; data['GenderDescription'] = this.genderDescription;
data['IsAppointmentAllowed'] = this.isAppointmentAllowed; data['IsAppoint?mentAllowed'] = this.isAppointmentAllowed;
data['IsDoctorAllowVedioCall'] = this.isDoctorAllowVedioCall; data['IsDoctorAllowVedioCall'] = this.isDoctorAllowVedioCall;
data['IsDoctorDummy'] = this.isDoctorDummy; data['IsDoctorDummy'] = this.isDoctorDummy;
data['IsLiveCare'] = this.isLiveCare; data['IsLiveCare'] = this.isLiveCare;
@ -157,7 +157,7 @@ class ClinicDoctor {
data['PersonRate'] = this.personRate; data['PersonRate'] = this.personRate;
data['ProjectDistanceInKiloMeters'] = this.projectDistanceInKiloMeters; data['ProjectDistanceInKiloMeters'] = this.projectDistanceInKiloMeters;
data['QR'] = this.qR; data['QR'] = this.qR;
data['QRString'] = this.qRString; data['QRString?'] = this.qRString;
data['RateNumber'] = this.rateNumber; data['RateNumber'] = this.rateNumber;
data['ServiceID'] = this.serviceID; data['ServiceID'] = this.serviceID;
data['SetupID'] = this.setupID; data['SetupID'] = this.setupID;
@ -165,5 +165,4 @@ class ClinicDoctor {
data['WorkingHours'] = this.workingHours; data['WorkingHours'] = this.workingHours;
return data; return data;
} }
}
}

@ -1,108 +1,108 @@
import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
class MyReferralPatientModel { class MyReferralPatientModel {
int projectID; int? projectID;
int lineItemNo; int? lineItemNo;
int doctorID; int? doctorID;
int patientID; int? patientID;
String doctorName; String? doctorName;
String doctorNameN; String? doctorNameN;
String firstName; String? firstName;
String middleName; String? middleName;
String lastName; String? lastName;
String firstNameN; String? firstNameN;
String middleNameN; String? middleNameN;
String lastNameN; String? lastNameN;
int gender; int? gender;
String dateofBirth; String? dateofBirth;
String mobileNumber; String? mobileNumber;
String emailAddress; String? emailAddress;
String patientIdentificationNo; String? patientIdentificationNo;
int patientType; int? patientType;
String admissionNo; String? admissionNo;
String admissionDate; String? admissionDate;
String roomID; String? roomID;
String bedID; String? bedID;
String nursingStationID; String? nursingStationID;
String description; String? description;
String nationalityName; String? nationalityName;
String nationalityNameN; String? nationalityNameN;
String clinicDescription; String? clinicDescription;
String clinicDescriptionN; String? clinicDescriptionN;
int referralDoctor; int? referralDoctor;
int referringDoctor; int? referringDoctor;
int referralClinic; int? referralClinic;
int referringClinic; int? referringClinic;
int referralStatus; int? referralStatus;
String referralDate; String? referralDate;
String referringDoctorRemarks; String? referringDoctorRemarks;
String referredDoctorRemarks; String? referredDoctorRemarks;
String referralResponseOn; String? referralResponseOn;
int priority; int? priority;
int frequency; int? frequency;
DateTime mAXResponseTime; DateTime? mAXResponseTime;
String age; String? age;
String frequencyDescription; String? frequencyDescription;
String genderDescription; String? genderDescription;
bool isDoctorLate; bool? isDoctorLate;
bool isDoctorResponse; bool? isDoctorResponse;
String nursingStationName; String? nursingStationName;
String priorityDescription; String? priorityDescription;
String referringClinicDescription; String? referringClinicDescription;
String referringDoctorName; String? referringDoctorName;
MyReferralPatientModel( MyReferralPatientModel(
{this.projectID, {this.projectID,
this.lineItemNo, this.lineItemNo,
this.doctorID, this.doctorID,
this.patientID, this.patientID,
this.doctorName, this.doctorName,
this.doctorNameN, this.doctorNameN,
this.firstName, this.firstName,
this.middleName, this.middleName,
this.lastName, this.lastName,
this.firstNameN, this.firstNameN,
this.middleNameN, this.middleNameN,
this.lastNameN, this.lastNameN,
this.gender, this.gender,
this.dateofBirth, this.dateofBirth,
this.mobileNumber, this.mobileNumber,
this.emailAddress, this.emailAddress,
this.patientIdentificationNo, this.patientIdentificationNo,
this.patientType, this.patientType,
this.admissionNo, this.admissionNo,
this.admissionDate, this.admissionDate,
this.roomID, this.roomID,
this.bedID, this.bedID,
this.nursingStationID, this.nursingStationID,
this.description, this.description,
this.nationalityName, this.nationalityName,
this.nationalityNameN, this.nationalityNameN,
this.clinicDescription, this.clinicDescription,
this.clinicDescriptionN, this.clinicDescriptionN,
this.referralDoctor, this.referralDoctor,
this.referringDoctor, this.referringDoctor,
this.referralClinic, this.referralClinic,
this.referringClinic, this.referringClinic,
this.referralStatus, this.referralStatus,
this.referralDate, this.referralDate,
this.referringDoctorRemarks, this.referringDoctorRemarks,
this.referredDoctorRemarks, this.referredDoctorRemarks,
this.referralResponseOn, this.referralResponseOn,
this.priority, this.priority,
this.frequency, this.frequency,
this.mAXResponseTime, this.mAXResponseTime,
this.age, this.age,
this.frequencyDescription, this.frequencyDescription,
this.genderDescription, this.genderDescription,
this.isDoctorLate, this.isDoctorLate,
this.isDoctorResponse, this.isDoctorResponse,
this.nursingStationName, this.nursingStationName,
this.priorityDescription, this.priorityDescription,
this.referringClinicDescription, this.referringClinicDescription,
this.referringDoctorName}); this.referringDoctorName});
MyReferralPatientModel.fromJson(Map<String, dynamic> json) { MyReferralPatientModel.fromJson(Map<String?, dynamic> json) {
projectID = json['ProjectID']; projectID = json['ProjectID'];
lineItemNo = json['LineItemNo']; lineItemNo = json['LineItemNo'];
doctorID = json['DoctorID']; doctorID = json['DoctorID'];
@ -154,8 +154,8 @@ class MyReferralPatientModel {
referringDoctorName = json['ReferringDoctorName']; referringDoctorName = json['ReferringDoctorName'];
} }
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;
data['LineItemNo'] = this.lineItemNo; data['LineItemNo'] = this.lineItemNo;
data['DoctorID'] = this.doctorID; data['DoctorID'] = this.doctorID;

@ -1,136 +1,134 @@
class MyReferredPatientModel { class MyReferredPatientModel {
String rowID; String? rowID;
int projectID; int? projectID;
int lineItemNo; int? lineItemNo;
int doctorID; int? doctorID;
int patientID; int? patientID;
String doctorName; String? doctorName;
String doctorNameN; String? doctorNameN;
String firstName; String? firstName;
String middleName; String? middleName;
String lastName; String? lastName;
String firstNameN; String? firstNameN;
String middleNameN; String? middleNameN;
String lastNameN; String? lastNameN;
int gender; int? gender;
String dateofBirth; String? dateofBirth;
String mobileNumber; String? mobileNumber;
String emailAddress; String? emailAddress;
String patientIdentificationNo; String? patientIdentificationNo;
int patientType; int? patientType;
String admissionNo; String? admissionNo;
String admissionDate; String? admissionDate;
String roomID; String? roomID;
String bedID; String? bedID;
String nursingStationID; String? nursingStationID;
String description; String? description;
String nationalityName; String? nationalityName;
String nationalityNameN; String? nationalityNameN;
String clinicDescription; String? clinicDescription;
String clinicDescriptionN; String? clinicDescriptionN;
int referralDoctor; int? referralDoctor;
int referringDoctor; int? referringDoctor;
int referralClinic; int? referralClinic;
int referringClinic; int? referringClinic;
int referralStatus; int? referralStatus;
String referralDate; String? referralDate;
String referringDoctorRemarks; String? referringDoctorRemarks;
String referredDoctorRemarks; String? referredDoctorRemarks;
String referralResponseOn; String? referralResponseOn;
int priority; int? priority;
int frequency; int? frequency;
String mAXResponseTime; String? mAXResponseTime;
int episodeID; int? episodeID;
int appointmentNo; int? appointmentNo;
String appointmentDate; String? appointmentDate;
int appointmentType; int? appointmentType;
int patientMRN; int? patientMRN;
String createdOn; String? createdOn;
int clinicID; int? clinicID;
String nationalityID; String? nationalityID;
String age; String? age;
String doctorImageURL; String? doctorImageURL;
String frequencyDescription; String? frequencyDescription;
String genderDescription; String? genderDescription;
bool isDoctorLate; bool? isDoctorLate;
bool isDoctorResponse; bool? isDoctorResponse;
String nationalityFlagURL; String? nationalityFlagURL;
String nursingStationName; String? nursingStationName;
String priorityDescription; String? priorityDescription;
String referringClinicDescription; String? referringClinicDescription;
String referralDoctorName; String? referralDoctorName;
String referralClinicDescription; String? referralClinicDescription;
String referringDoctorName; String? referringDoctorName;
bool isReferralDoctorSameBranch; bool? isReferralDoctorSameBranch;
String referralStatusDesc; String? referralStatusDesc;
MyReferredPatientModel({ MyReferredPatientModel(
this.rowID, {this.rowID,
this.projectID, this.projectID,
this.lineItemNo, this.lineItemNo,
this.doctorID, this.doctorID,
this.patientID, this.patientID,
this.doctorName, this.doctorName,
this.doctorNameN, this.doctorNameN,
this.firstName, this.firstName,
this.middleName, this.middleName,
this.lastName, this.lastName,
this.firstNameN, this.firstNameN,
this.middleNameN, this.middleNameN,
this.lastNameN, this.lastNameN,
this.gender, this.gender,
this.dateofBirth, this.dateofBirth,
this.mobileNumber, this.mobileNumber,
this.emailAddress, this.emailAddress,
this.patientIdentificationNo, this.patientIdentificationNo,
this.patientType, this.patientType,
this.admissionNo, this.admissionNo,
this.admissionDate, this.admissionDate,
this.roomID, this.roomID,
this.bedID, this.bedID,
this.nursingStationID, this.nursingStationID,
this.description, this.description,
this.nationalityName, this.nationalityName,
this.nationalityNameN, this.nationalityNameN,
this.clinicDescription, this.clinicDescription,
this.clinicDescriptionN, this.clinicDescriptionN,
this.referralDoctor, this.referralDoctor,
this.referringDoctor, this.referringDoctor,
this.referralClinic, this.referralClinic,
this.referringClinic, this.referringClinic,
this.referralStatus, this.referralStatus,
this.referralDate, this.referralDate,
this.referringDoctorRemarks, this.referringDoctorRemarks,
this.referredDoctorRemarks, this.referredDoctorRemarks,
this.referralResponseOn, this.referralResponseOn,
this.priority, this.priority,
this.frequency, this.frequency,
this.mAXResponseTime, this.mAXResponseTime,
this.episodeID, this.episodeID,
this.appointmentNo, this.appointmentNo,
this.appointmentDate, this.appointmentDate,
this.appointmentType, this.appointmentType,
this.patientMRN, this.patientMRN,
this.createdOn, this.createdOn,
this.clinicID, this.clinicID,
this.nationalityID, this.nationalityID,
this.age, this.age,
this.doctorImageURL, this.doctorImageURL,
this.frequencyDescription, this.frequencyDescription,
this.genderDescription, this.genderDescription,
this.isDoctorLate, this.isDoctorLate,
this.isDoctorResponse, this.isDoctorResponse,
this.nationalityFlagURL, this.nationalityFlagURL,
this.nursingStationName, this.nursingStationName,
this.priorityDescription, this.priorityDescription,
this.referringClinicDescription, this.referringClinicDescription,
this.referringDoctorName, this.referringDoctorName,
this.isReferralDoctorSameBranch, this.isReferralDoctorSameBranch,
this.referralDoctorName, this.referralDoctorName,
this.referralClinicDescription,this.referralStatusDesc this.referralClinicDescription,
}); this.referralStatusDesc});
MyReferredPatientModel.fromJson(Map<String, dynamic> json) { MyReferredPatientModel.fromJson(Map<String, dynamic> json) {
rowID = json['RowID']; rowID = json['RowID'];

@ -1,4 +1,3 @@
/* /*
*@author: Ibrahim Albitar *@author: Ibrahim Albitar
*@Date:15/5/2020 *@Date:15/5/2020
@ -23,36 +22,36 @@
*/ */
class OrdersRequest { class OrdersRequest {
int visitType; int? visitType;
int admissionNo; int? admissionNo;
int projectID; int? projectID;
int languageID; int? languageID;
String stamp; String? stamp;
String iPAdress; String? iPAdress;
int channel; int? channel;
String tokenID; String? tokenID;
String sessionID; String? sessionID;
bool isLoginForDoctorApp; bool? isLoginForDoctorApp;
bool patientOutSA; bool? patientOutSA;
int patientTypeID; int? patientTypeID;
double versionID; double? versionID;
OrdersRequest( OrdersRequest(
{this.visitType , {this.visitType,
this.admissionNo, this.admissionNo,
this.projectID = 12, this.projectID = 12,
this.stamp = '2020-04-23T21:01:21.492Z', this.stamp = '2020-04-23T21:01:21.492Z',
this.languageID = 2, this.languageID = 2,
this.iPAdress = '11.11.11.11', this.iPAdress = '11.11.11.11',
this.channel = 9, this.channel = 9,
this.tokenID , this.tokenID,
this.sessionID = "LlBk8lUEJY", this.sessionID = "LlBk8lUEJY",
this.isLoginForDoctorApp = true, this.isLoginForDoctorApp = true,
this.patientTypeID = 1, this.patientTypeID = 1,
this.versionID = 5.5, this.versionID = 5.5,
this.patientOutSA = false}); this.patientOutSA = false});
OrdersRequest.fromJson(Map<String, dynamic> json) { OrdersRequest.fromJson(Map<String?, dynamic> json) {
visitType = json['VisitType']; visitType = json['VisitType'];
admissionNo = json['AdmissionNo']; admissionNo = json['AdmissionNo'];
projectID = json['ProjectID']; projectID = json['ProjectID'];
@ -68,8 +67,8 @@ class OrdersRequest {
versionID = json['VersionID']; versionID = json['VersionID'];
} }
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['VisitType'] = this.visitType; data['VisitType'] = this.visitType;
data['AdmissionNo'] = this.admissionNo; data['AdmissionNo'] = this.admissionNo;
data['ProjectID'] = this.projectID; data['ProjectID'] = this.projectID;
@ -85,4 +84,4 @@ class OrdersRequest {
data['VersionID'] = this.versionID; data['VersionID'] = this.versionID;
return data; return data;
} }
} }

@ -1,79 +1,79 @@
// TODO : it have to be changed. // TODO : it have to be changed.
class PatiantInformtion { class PatiantInformtion {
final PatiantInformtion patientDetails; final PatiantInformtion? patientDetails;
int genderInt; int? genderInt;
dynamic age; dynamic age;
String appointmentDate; String? appointmentDate;
dynamic appointmentNo; dynamic appointmentNo;
dynamic appointmentType; dynamic appointmentType;
String arrivalTime; String? arrivalTime;
String arrivalTimeD; String? arrivalTimeD;
int callStatus; int? callStatus;
dynamic callStatusDisc; dynamic callStatusDisc;
int callTypeID; int? callTypeID;
String clientRequestID; String? clientRequestID;
String clinicName; String? clinicName;
String consoltationEnd; String? consoltationEnd;
String consultationNotes; String? consultationNotes;
int appointmentTypeId; int? appointmentTypeId;
String arrivedOn; String? arrivedOn;
int clinicGroupId; int? clinicGroupId;
String companyName; String? companyName;
dynamic dischargeStatus; dynamic dischargeStatus;
dynamic doctorDetails; dynamic doctorDetails;
int doctorId; int? doctorId;
String endTime; String? endTime;
int episodeNo; int? episodeNo;
int fallRiskScore; int? fallRiskScore;
bool isSigned; bool? isSigned;
int medicationOrders; int? medicationOrders;
String mobileNumber; String? mobileNumber;
String nationality; String? nationality;
int projectId; int? projectId;
int clinicId; int? clinicId;
dynamic patientId; dynamic patientId;
String doctorName; String? doctorName;
String doctorNameN; String? doctorNameN;
String firstName; String? firstName;
String middleName; String? middleName;
String lastName; String? lastName;
String firstNameN; String? firstNameN;
String middleNameN; String? middleNameN;
String lastNameN; String? lastNameN;
String fullName; String? fullName;
String fullNameN; String? fullNameN;
int gender; int? gender;
String dateofBirth; String? dateofBirth;
String nationalityId; String? nationalityId;
String emailAddress; String? emailAddress;
String patientIdentificationNo; String? patientIdentificationNo;
int patientType; int? patientType;
int patientMRN; int? patientMRN;
String admissionNo; String? admissionNo;
String admissionDate; String? admissionDate;
String createdOn; String? createdOn;
String roomId; String? roomId;
String bedId; String? bedId;
String nursingStationId; String? nursingStationId;
String description; String? description;
String clinicDescription; String? clinicDescription;
String clinicDescriptionN; String? clinicDescriptionN;
String nationalityName; String? nationalityName;
String nationalityNameN; String? nationalityNameN;
String genderDescription; String? genderDescription;
String nursingStationName; String? nursingStationName;
String startTime; String? startTime;
String visitType; String? visitType;
String nationalityFlagURL; String? nationalityFlagURL;
int patientStatus; int? patientStatus;
int patientStatusType; int? patientStatusType;
int visitTypeId; int? visitTypeId;
String startTimes; String? startTimes;
String dischargeDate; String? dischargeDate;
int status; int? status;
int vcId; int? vcId;
String voipToken; String? voipToken;
PatiantInformtion( PatiantInformtion(
{this.patientDetails, {this.patientDetails,
@ -150,17 +150,14 @@ class PatiantInformtion {
this.vcId, this.vcId,
this.voipToken}); this.voipToken});
factory PatiantInformtion.fromJson(Map<String, dynamic> json) => factory PatiantInformtion.fromJson(Map<String, dynamic> json) => PatiantInformtion(
PatiantInformtion( patientDetails: json['patientDetails'] != null ? new PatiantInformtion.fromJson(json['patientDetails']) : null,
patientDetails: json['patientDetails'] != null
? new PatiantInformtion.fromJson(json['patientDetails'])
: null,
projectId: json["ProjectID"] ?? json["projectID"], projectId: json["ProjectID"] ?? json["projectID"],
clinicId: json["ClinicID"] ?? json["clinicID"], clinicId: json["ClinicID"] ?? json["clinicID"],
doctorId: json["DoctorID"] ?? json["doctorID"], doctorId: json["DoctorID"] ?? json["doctorID"],
patientId: json["PatientID"] != null patientId: json["PatientID"] != null
? json["PatientID"] is String ? json["PatientID"] is String
? int.parse(json["PatientID"]) ? int?.parse(json["PatientID"])
: json["PatientID"] : json["PatientID"]
: json["patientID"] ?? json['patientMRN'] ?? json['PatientMRN'], : json["patientID"] ?? json['patientMRN'] ?? json['PatientMRN'],
doctorName: json["DoctorName"] ?? json["doctorName"], doctorName: json["DoctorName"] ?? json["doctorName"],
@ -173,18 +170,16 @@ class PatiantInformtion {
lastNameN: json["LastNameN"] ?? json["lastNameN"], lastNameN: json["LastNameN"] ?? json["lastNameN"],
gender: json["Gender"] != null gender: json["Gender"] != null
? json["Gender"] is String ? json["Gender"] is String
? int.parse(json["Gender"]) ? int?.parse(json["Gender"])
: json["Gender"] : json["Gender"]
: json["gender"], : json["gender"],
fullName: json["fullName"] ?? json["fullName"] ?? json["PatientName"], fullName: json["fullName"] ?? json["fullName"] ?? json["PatientName"],
fullNameN: fullNameN: json["fullNameN"] ?? json["fullNameN"] ?? json["PatientName"],
json["fullNameN"] ?? json["fullNameN"] ?? json["PatientName"],
dateofBirth: json["DateofBirth"] ?? json["dob"] ?? json['DateOfBirth'], dateofBirth: json["DateofBirth"] ?? json["dob"] ?? json['DateOfBirth'],
nationalityId: json["NationalityID"] ?? json["nationalityID"], nationalityId: json["NationalityID"] ?? json["nationalityID"],
mobileNumber: json["MobileNumber"] ?? json["mobileNumber"], mobileNumber: json["MobileNumber"] ?? json["mobileNumber"],
emailAddress: json["EmailAddress"] ?? json["emailAddress"], emailAddress: json["EmailAddress"] ?? json["emailAddress"],
patientIdentificationNo: patientIdentificationNo: json["PatientIdentificationNo"] ?? json["patientIdentificationNo"],
json["PatientIdentificationNo"] ?? json["patientIdentificationNo"],
//TODO make 7 dynamic when the backend retrun it in patient arrival //TODO make 7 dynamic when the backend retrun it in patient arrival
patientType: json["PatientType"] ?? json["patientType"] ?? 1, patientType: json["PatientType"] ?? json["patientType"] ?? 1,
admissionNo: json["AdmissionNo"] ?? json["admissionNo"], admissionNo: json["AdmissionNo"] ?? json["admissionNo"],
@ -194,16 +189,10 @@ class PatiantInformtion {
bedId: json["BedID"] ?? json["bedID"], bedId: json["BedID"] ?? json["bedID"],
nursingStationId: json["NursingStationID"] ?? json["nursingStationID"], nursingStationId: json["NursingStationID"] ?? json["nursingStationID"],
description: json["Description"] ?? json["description"], description: json["Description"] ?? json["description"],
clinicDescription: clinicDescription: json["ClinicDescription"] ?? json["clinicDescription"],
json["ClinicDescription"] ?? json["clinicDescription"], clinicDescriptionN: json["ClinicDescriptionN"] ?? json["clinicDescriptionN"],
clinicDescriptionN: nationalityName: json["NationalityName"] ?? json["nationalityName"] ?? json['NationalityName'],
json["ClinicDescriptionN"] ?? json["clinicDescriptionN"], nationalityNameN: json["NationalityNameN"] ?? json["nationalityNameN"] ?? json['NationalityNameN'],
nationalityName: json["NationalityName"] ??
json["nationalityName"] ??
json['NationalityName'],
nationalityNameN: json["NationalityNameN"] ??
json["nationalityNameN"] ??
json['NationalityNameN'],
age: json["Age"] ?? json["age"], age: json["Age"] ?? json["age"],
genderDescription: json["GenderDescription"], genderDescription: json["GenderDescription"],
nursingStationName: json["NursingStationName"], nursingStationName: json["NursingStationName"],
@ -211,8 +200,7 @@ class PatiantInformtion {
startTime: json["startTime"] ?? json['StartTime'], startTime: json["startTime"] ?? json['StartTime'],
appointmentNo: json['appointmentNo'] ?? json['AppointmentNo'], appointmentNo: json['appointmentNo'] ?? json['AppointmentNo'],
appointmentType: json['appointmentType'], appointmentType: json['appointmentType'],
appointmentTypeId: appointmentTypeId: json['appointmentTypeId'] ?? json['appointmentTypeid'],
json['appointmentTypeId'] ?? json['appointmentTypeid'],
arrivedOn: json['ArrivedOn'] ?? json['arrivedOn'] ?? json['ArrivedOn'], arrivedOn: json['ArrivedOn'] ?? json['arrivedOn'] ?? json['ArrivedOn'],
clinicGroupId: json['clinicGroupId'], clinicGroupId: json['clinicGroupId'],
companyName: json['companyName'], companyName: json['companyName'],
@ -224,17 +212,15 @@ class PatiantInformtion {
isSigned: json['isSigned'], isSigned: json['isSigned'],
medicationOrders: json['medicationOrders'], medicationOrders: json['medicationOrders'],
nationality: json['nationality'] ?? json['NationalityNameN'], nationality: json['nationality'] ?? json['NationalityNameN'],
patientMRN: json['patientMRN'] ?? json['PatientMRN']?? ( patientMRN: json['patientMRN'] ??
json["PatientID"] != null ? json['PatientMRN'] ??
int.parse(json["PatientID"].toString()) (json["PatientID"] != null
: int.parse(json["patientID"].toString())), ? int?.parse(json["PatientID"].toString())
: int?.parse(json["patientID"].toString())),
visitType: json['visitType'] ?? json['visitType'] ?? json['visitType'], visitType: json['visitType'] ?? json['visitType'] ?? json['visitType'],
nationalityFlagURL: nationalityFlagURL: json['NationalityFlagURL'] ?? json['NationalityFlagURL'],
json['NationalityFlagURL'] ?? json['NationalityFlagURL'], patientStatusType: json['patientStatusType'] ?? json['PatientStatusType'],
patientStatusType: visitTypeId: json['visitTypeId'] ?? json['visitTypeId'] ?? json['visitTypeid'],
json['patientStatusType'] ?? json['PatientStatusType'],
visitTypeId:
json['visitTypeId'] ?? json['visitTypeId'] ?? json['visitTypeid'],
startTimes: json['StartTime'] ?? json['StartTime'], startTimes: json['StartTime'] ?? json['StartTime'],
dischargeDate: json['DischargeDate'], dischargeDate: json['DischargeDate'],
status: json['Status'], status: json['Status'],

@ -1,12 +1,12 @@
class GetPatientArrivalListRequestModel { class GetPatientArrivalListRequestModel {
String vidaAuthTokenID; String? vidaAuthTokenID;
String from; String? from;
String to; String? to;
String doctorID; String? doctorID;
int pageIndex; int? pageIndex;
int pageSize; int? pageSize;
int clinicID; int? clinicID;
int patientMRN; int? patientMRN;
GetPatientArrivalListRequestModel( GetPatientArrivalListRequestModel(
{this.vidaAuthTokenID, {this.vidaAuthTokenID,
@ -40,7 +40,6 @@ class GetPatientArrivalListRequestModel {
data['VidaAuthTokenID'] = this.vidaAuthTokenID; data['VidaAuthTokenID'] = this.vidaAuthTokenID;
data['PatientMRN'] = this.patientMRN; data['PatientMRN'] = this.patientMRN;
return data; return data;
} }
} }

@ -7,110 +7,108 @@
*@desc: *@desc:
*/ */
class PatientModel { class PatientModel {
int ProjectID; int? ProjectID;
int ClinicID; int? ClinicID;
int DoctorID; int? DoctorID;
String FirstName; String? FirstName;
String MiddleName; String? MiddleName;
String LastName; String? LastName;
String PatientMobileNumber; String? PatientMobileNumber;
String PatientIdentificationID; String? PatientIdentificationID;
int PatientID; int? PatientID;
String From; String? From;
String To; String? To;
int LanguageID; int? LanguageID;
String stamp; String? stamp;
String IPAdress; String? IPAdress;
double VersionID; double? VersionID;
int Channel; int? Channel;
String TokenID; String? TokenID;
String SessionID; String? SessionID;
bool IsLoginForDoctorApp; bool? IsLoginForDoctorApp;
bool PatientOutSA; bool? PatientOutSA;
int Searchtype; int? Searchtype;
String IdentificationNo; String? IdentificationNo;
String MobileNo; String? MobileNo;
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) => set setPatientMobileNumber(String? PatientMobileNumber) => this.PatientMobileNumber = 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; set setPatientID(int? PatientID) => this.PatientID = PatientID;
String get getFrom => From; String? get getFrom => From;
set setFrom(String From) => this.From = From; set setFrom(String? From) => this.From = From;
String get getTo => To; String? get getTo => To;
set setTo(String To) => this.To = To; set setTo(String? To) => this.To = To;
int get getLanguageID => LanguageID; int? get getLanguageID => LanguageID;
set setLanguageID(int LanguageID) => this.LanguageID = LanguageID; set setLanguageID(int? LanguageID) => this.LanguageID = LanguageID;
String get getStamp => stamp; String? get getStamp => stamp;
set setStamp(String stamp) => this.stamp = stamp; set setStamp(String? stamp) => this.stamp = stamp;
String get getIPAdress => IPAdress; String? get getIPAdress => IPAdress;
set setIPAdress(String IPAdress) => this.IPAdress = IPAdress; set setIPAdress(String? IPAdress) => this.IPAdress = IPAdress;
double get getVersionID => VersionID; double? get getVersionID => VersionID;
set setVersionID(double VersionID) => this.VersionID = VersionID; set setVersionID(double? VersionID) => this.VersionID = VersionID;
int get getChannel => Channel; int? get getChannel => Channel;
set setChannel(int Channel) => this.Channel = Channel; set setChannel(int? Channel) => this.Channel = Channel;
String get getTokenID => TokenID; String? get getTokenID => TokenID;
set setTokenID(String TokenID) => this.TokenID = TokenID; set setTokenID(String? TokenID) => this.TokenID = TokenID;
String get getSessionID => SessionID; String? get getSessionID => SessionID;
set setSessionID(String SessionID) => this.SessionID = SessionID; set setSessionID(String? SessionID) => this.SessionID = SessionID;
bool get getIsLoginForDoctorApp => IsLoginForDoctorApp; bool? get getIsLoginForDoctorApp => IsLoginForDoctorApp;
set setIsLoginForDoctorApp(bool IsLoginForDoctorApp) => set setIsLoginForDoctorApp(bool? IsLoginForDoctorApp) => this.IsLoginForDoctorApp = 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,
@ -137,12 +135,12 @@ class PatientModel {
this.IdentificationNo, this.IdentificationNo,
this.MobileNo}); this.MobileNo});
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;
data['ClinicID'] = this.ClinicID; data['ClinicID'] = this.ClinicID;
data['DoctorID'] = this.DoctorID; data['DoctorID'] = this.DoctorID;

@ -1,70 +1,70 @@
class PrescriptionReport { class PrescriptionReport {
String address; String? address;
int appointmentNo; int? appointmentNo;
String clinic; String? clinic;
String companyName; String? companyName;
int days; int? days;
String doctorName; String? doctorName;
int doseDailyQuantity; int? doseDailyQuantity;
String frequency; String? frequency;
int frequencyNumber; int? frequencyNumber;
Null imageExtension; Null imageExtension;
Null imageSRCUrl; Null imageSRCUrl;
Null imageString; Null imageString;
Null imageThumbUrl; Null imageThumbUrl;
String isCovered; String? isCovered;
String itemDescription; String? itemDescription;
int itemID; int? itemID;
String orderDate; String? orderDate;
int patientID; int? patientID;
String patientName; String? patientName;
String phoneOffice1; String? phoneOffice1;
Null prescriptionQR; Null prescriptionQR;
int prescriptionTimes; int? prescriptionTimes;
Null productImage; Null productImage;
String productImageBase64; String? productImageBase64;
String productImageString; String? productImageString;
int projectID; int? projectID;
String projectName; String? projectName;
String remarks; String? remarks;
String route; String? route;
String sKU; String? sKU;
int scaleOffset; int? scaleOffset;
String startDate; String? startDate;
PrescriptionReport( PrescriptionReport(
{this.address, {this.address,
this.appointmentNo, this.appointmentNo,
this.clinic, this.clinic,
this.companyName, this.companyName,
this.days, this.days,
this.doctorName, this.doctorName,
this.doseDailyQuantity, this.doseDailyQuantity,
this.frequency, this.frequency,
this.frequencyNumber, this.frequencyNumber,
this.imageExtension, this.imageExtension,
this.imageSRCUrl, this.imageSRCUrl,
this.imageString, this.imageString,
this.imageThumbUrl, this.imageThumbUrl,
this.isCovered, this.isCovered,
this.itemDescription, this.itemDescription,
this.itemID, this.itemID,
this.orderDate, this.orderDate,
this.patientID, this.patientID,
this.patientName, this.patientName,
this.phoneOffice1, this.phoneOffice1,
this.prescriptionQR, this.prescriptionQR,
this.prescriptionTimes, this.prescriptionTimes,
this.productImage, this.productImage,
this.productImageBase64, this.productImageBase64,
this.productImageString, this.productImageString,
this.projectID, this.projectID,
this.projectName, this.projectName,
this.remarks, this.remarks,
this.route, this.route,
this.sKU, this.sKU,
this.scaleOffset, this.scaleOffset,
this.startDate}); this.startDate});
PrescriptionReport.fromJson(Map<String, dynamic> json) { PrescriptionReport.fromJson(Map<String, dynamic> json) {
address = json['Address']; address = json['Address'];

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save