Merge branch 'development' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into development

# Conflicts:
#	lib/screens/home/home_screen.dart
#	lib/widgets/auth/login_form.dart
#	lib/widgets/auth/verfiy_account.dart
merge-requests/616/head
Haroon Amjad 5 years ago
commit 53a610213c

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 348 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 475 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

@ -27,7 +27,10 @@
<key>NSFaceIDUsageDescription</key>
<string>We are using it for authentication</string>
<key>NSAppleMusicUsageDescription</key>
<string>${PRODUCT_NAME} requires access to use voice command</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>

@ -1,11 +1,13 @@
import 'dart:io' show Platform;
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/secondary_button.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:url_launcher/url_launcher.dart';
import 'dart:io' show Platform;
import 'widgets/shared/buttons/secondary_button.dart';
class UpdatePage extends StatelessWidget {
final String message;
@ -32,14 +34,14 @@ class UpdatePage extends StatelessWidget {
),
Image.asset('assets/images/HMG_logo.png'),
SizedBox(height: 8,),
Texts(
AppText(
TranslationBase.of(context).updateTheApp.toUpperCase(),fontSize: 17,
fontWeight: FontWeight.w600,
),
SizedBox(height: 12,),
Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(message??"Update the app",fontSize: 12,),
child: AppText(message??"Update the app",fontSize: 12,),
)
],
),

@ -1,4 +1,5 @@
import 'dart:convert';
import 'dart:io' show Platform;
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
@ -6,32 +7,12 @@ import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:http/http.dart' as http;
import 'dart:io' show Platform;
import '../UpdatePage.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
Helpers helpers = new Helpers();
//ProjectProvider projectsProvider = new ProjectProvider();
/*
*@author: Mohammad Aljammal
*@Date:28/5/2020
*@param: url, onSuccess callBack, onFailure callBack
*@return:
*@desc:
*/
///Example
/*
await BaseAppClient.post('',
onSuccess: (dynamic response, int statusCode) {},
onFailure: (String error, int statusCode) {},
body: null);
* */
class BaseAppClient {
//TODO change the post fun to nun static when you change all service
post(String endPoint,
@ -86,11 +67,15 @@ class BaseAppClient {
await sharedPref.getString(VIDA_REFRESH_TOKEN_ID);
}
if (body['ProjectID'] != null &&
(body['ProjectID'] == 2 || body['ProjectID'] == 3)) {
body['PatientOutSA'] = true;
}
print("URL : $url");
print("Body : ${json.encode(body)}");
String req = json.encode(body);
var asd="";
var asd = json.encode(body);
var asd2;
if (await Helpers.checkConnection()) {
final response = await http.post(url,
body: json.encode(body),
@ -100,20 +85,21 @@ class BaseAppClient {
});
final int statusCode = response.statusCode;
if (statusCode < 200 || statusCode >= 400) {
onFailure('Error While Fetching data', statusCode);
onFailure(Helpers.generateContactAdminMsg(), statusCode);
} else {
var parsed = json.decode(response.body.toString());
if (parsed['ErrorType'] == 4) {
helpers.navigateToUpdatePage(parsed['ErrorEndUserMessage'],parsed['AndroidLink'],parsed['IOSLink']);
helpers.navigateToUpdatePage(parsed['ErrorEndUserMessage'],
parsed['AndroidLink'], parsed['IOSLink']);
}
if (!parsed['IsAuthenticated']) {
if (body['OTP_SendType'] != null) {
onFailure(getError(parsed), statusCode);
} else if (!isAllowAny) {
await helpers.logout();
helpers.showErrorToast('Your session expired Please login agian');
await Helpers.logout();
Helpers.showErrorToast('Your session expired Please login agian');
}
if (isAllowAny) {
onFailure(getError(parsed), statusCode);
@ -161,11 +147,11 @@ class BaseAppClient {
: SETUP_ID;
}
body['VersionID'] = 6.3;
body['VersionID'] = 8.3;
body['Channel'] = CHANNEL;
body['LanguageID'] = languageID == 'ar' ? 1 : 2;
body['IPAdress'] = IP_ADDRESS;
body['IPAdress'] = "10.20.10.20";
body['generalid'] = GENERAL_ID;
body['PatientOutSA'] = body.containsKey('PatientOutSA')
? body['PatientOutSA'] != null
@ -208,6 +194,11 @@ class BaseAppClient {
body['PatientOutSA'] = 0; //user['OutSA']; //TODO change it
body['SessionID'] = SESSION_ID; //getSe
if (body['ProjectID'] != null &&
(body['ProjectID'] == 2 || body['ProjectID'] == 3)) {
body['PatientOutSA'] = true;
}
print("URL : $url");
print("Body : ${json.encode(body)}");
@ -225,7 +216,8 @@ class BaseAppClient {
onSuccess(parsed, statusCode);
} else {
if (parsed['ErrorType'] == 4) {
helpers.navigateToUpdatePage(parsed['ErrorEndUserMessage'],parsed['AndroidLink'],parsed['IOSLink']);
helpers.navigateToUpdatePage(parsed['ErrorEndUserMessage'],
parsed['AndroidLink'], parsed['IOSLink']);
}
if (parsed['IsAuthenticated'] == null) {
if (parsed['isSMSSent'] == true) {
@ -289,7 +281,6 @@ class BaseAppClient {
}
}
String getError(parsed) {
//TODO change this fun
String error = parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'];
@ -308,7 +299,7 @@ class BaseAppClient {
}
}
if (error == null || error == "null" || error == "null\n") {
return helpers.generateContactAdminMsg();
return Helpers.generateContactAdminMsg();
}
return error;
}

@ -68,6 +68,8 @@ const GET_PRESCRIPTION_REPORT_FOR_IN_PATIENT =
const GET_MY_REFERRAL_PATIENT =
'Services/DoctorApplication.svc/REST/GtMyReferralPatient';
const REFER_TO_DOCTOR = 'Services/DoctorApplication.svc/REST/ReferToDoctor';
const ADD_REFERRED_DOCTOR_REMARKS =
'Services/DoctorApplication.svc/REST/AddReferredDoctorRemarks';
@ -127,7 +129,7 @@ const GET_SICKLEAVE_STATISTIC =
const ARRIVED_PATIENT_URL =
'Services/DoctorApplication.svc/REST/PatientArrivalList';
const ADD_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/PostSickLeave';
const GET_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/GetAllSickLeaves';
const GET_SICK_LEAVE = 'Services/Patients.svc/REST/GetPatientSickLeave';
const EXTEND_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/ExtendSickLeave';
const GET_OFFTIME = 'Services/DoctorApplication.svc/REST/GetMasterLookUpList';
@ -150,6 +152,12 @@ const POST_PROCEDURE_LIST = 'Services/DoctorApplication.svc/REST/PostProcedure';
const GET_PATIENT_ARRIVAL_LIST =
'Services/DoctorApplication.svc/REST/PatientArrivalList';
const GET_PATIENT_IN_PATIENT_LIST =
'Services/DoctorApplication.svc/REST/GetMyInPatient';
const Verify_Referral_Doctor_Remarks =
'Services/DoctorApplication.svc/REST/VerifyReferralDoctorRemarks';
///Lab Order
const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders';
const GET_Patient_LAB_SPECIAL_RESULT =
@ -233,11 +241,21 @@ const GET_BOX_QUANTITY =
///GET ECG
const GET_ECG = "Services/Patients.svc/REST/HIS_GetPatientMuseResults";
const GET_MY_REFERRAL_INPATIENT =
"Services/DoctorApplication.svc/REST/GtMyReferralPatient";
const GET_MY_DISCHARGE_PATIENT =
"Services/DoctorApplication.svc/REST/GtMyDischargeReferralPatient";
const GET_DISCHARGE_PATIENT =
"Services/DoctorApplication.svc/REST/GtMyDischargePatient";
const GET_PAtIENTS_INSURANCE_APPROVALS =
"Services/Patients.svc/REST/GetApprovalStatus";
const GET_RAD_IMAGE_URL = 'Services/Patients.svc/Rest/GetRadImageURL';
const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders';
const GET_IN_PATIENT_ORDERS =
'Services/DoctorApplication.svc/REST/GetPatientRadResult';
///Prescriptions
const PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList';
@ -250,6 +268,19 @@ const SEND_PRESCRIPTION_EMAIL =
const GET_PRESCRIPTION_REPORT_ENH =
'Services/Patients.svc/REST/GetPrescriptionReport_enh';
const GET_PHARMACY_LIST = "Services/Patients.svc/REST/GetPharmcyList";
const UPDATE_PROGRESS_NOTE_FOR_INPATIENT =
"Services/DoctorApplication.svc/REST/UpdateProgressNoteForInPatient";
const CREATE_PROGRESS_NOTE_FOR_INPATIENT =
"Services/DoctorApplication.svc/REST/CreateProgressNoteForInPatient";
const GET_PRESCRIPTION_IN_PATIENT =
'Services/DoctorApplication.svc/REST/GetPrescriptionReportForInPatient';
const GET_INSURANCE_IN_PATIENT =
"Services/DoctorApplication.svc/REST/GetApprovalStatusForInpatient";
const GET_SICK_LEAVE_PATIENT = "Services/Patients.svc/REST/GetPatientSickLeave";
const GET_MY_OUT_PATIENT = "Services/DoctorApplication.svc/REST/GetMyOutPatient";
var selectedPatientType = 1;
@ -275,8 +306,8 @@ var SERVICES_PATIANT2 = [
"patientArrivalList"
];
var SERVICES_PATIANT_HEADER = [
"Search Out-Patient",
"Search In-Patient",
"My OutPatient",
"My InPatient",
"Discharge",
"Referred",
"Referral Discharge",
@ -305,7 +336,7 @@ const TRANSACTION_NO = 0;
const LANGUAGE_ID = 2;
const STAMP = '2020-04-27T12:17:17.721Z';
const IP_ADDRESS = '9.9.9.9';
const VERSION_ID = 5.5;
const VERSION_ID = 5.9;
const CHANNEL = 9;
const SESSION_ID = 'BlUSkYymTt';
const IS_LOGIN_FOR_DOCTOR_APP = true;

@ -30,7 +30,9 @@ const Map<String, Map<String, String>> localizedValues = {
'ar': 'ملاحضات وتفاصيل العيادة'
},
'outPatients': {'en': 'Out Patient', 'ar': 'المريض الخارجي'},
'searchPatient': {'en': 'Search Patient', 'ar': 'البحث عن مريض'},
'myOutPatient': {'en': 'My OutPatients', 'ar': 'المريض الخارجي'},
'searchPatient': {'en': 'Search Patients', 'ar': 'البحث عن مريض'},
'searchAbout': {'en': 'Search', 'ar': 'البحث عن'},
'patient': {'en': 'Patient', 'ar': ' مريض'},
'patients': {'en': "Patient's", 'ar': ' مريض'},
@ -45,10 +47,12 @@ const Map<String, Map<String, String>> localizedValues = {
'radiology': {'en': 'Radiology', 'ar': 'الأشعة'},
'service': {'en': 'Service', 'ar': 'خدمة'},
'referral': {'en': 'Referral', 'ar': 'الإحالة'},
'inPatient': {'en': 'In Patient', 'ar': 'المريض الداخلي'},
'inPatient': {'en': 'My InPatients', 'ar': 'المريض الداخلي'},
'inPatientLabel': {'en': 'InPatients', 'ar': 'المريض الداخلي'},
'inPatientAll': {'en': 'All InPatients', 'ar': 'كل المرضى الداخليين'},
'operations': {'en': 'Operations', 'ar': 'عمليات'},
'patientServices': {'en': 'Patient Services', 'ar': 'خدمات المرضى'},
'searchMedicine': {'en': 'Search Medicine', 'ar': 'بحث عن الدواء'},
'searchMedicine': {'en': 'Search Medicines', 'ar': 'بحث عن الدواء'},
'myReferralPatient': {'en': 'My Referral Patient', 'ar': 'مرضى الاحالة'},
'referPatient': {'en': 'Referral Patient', 'ar': 'إحالة مريض'},
'myReferral': {'en': 'My Referral', 'ar': 'إحالة'},
@ -381,8 +385,8 @@ const Map<String, Map<String, String>> localizedValues = {
'leanBodyWeight': {'en': "Lean Body Weight", 'ar': 'وزن الجسم الهزيل'},
'bodyMassIndex': {'en': "Body Mass Index", 'ar': 'مؤشر كتلة الجسم'},
'yourBodyMassIndex': {
'en': "Your Body Mass Index is",
'ar': 'مؤشر كتلة جسمك هو'
'en': "Body Mass Index is",
'ar': 'مؤشر كتلة الجسم هو'
},
'bmiUnderWeight': {'en': "UnderWeight", 'ar': 'تحت الوزن'},
'bmiHealthy': {'en': "Healthy", 'ar': 'صحي'},
@ -437,6 +441,7 @@ const Map<String, Map<String, String>> localizedValues = {
'en': "Expected Admission Date",
'ar': 'تاريخ القبول المتوقع'
},
'admissionDate': {'en': "Admission Date", 'ar': 'تاريخ القبول'},
// 'emergencyAdmission': {'en': "EMERGENCY ADMISSION", 'ar': 'دخول الطوارئ'},
'isSickLeaveRequired': {
'en': "Is Sick Leave Required",
@ -765,7 +770,7 @@ const Map<String, Map<String, String>> localizedValues = {
'arrived_p': {'en': "Arrived", 'ar': "وصل"},
'details': {'en': 'Details', 'ar': 'التفاصيل'},
"liveCare": {"en": "Live Care", "ar": "لايف كير"},
"out-patient": {"en": "Out Patient", "ar": "عيادات خارجية"},
"out-patient": {"en": "OutPatient", "ar": "عيادات خارجية"},
"BillNo": {"en": "Bill No :", "ar": "رقم الفاتورة"},
"labResults": {"en": "Lab Result", "ar": "نتيجة المختبر"},
"sendSuc": {
@ -779,7 +784,7 @@ const Map<String, Map<String, String>> localizedValues = {
},
"show-more-btn": {"en": "Flow Chart", "ar": "النتائج التراكمية"},
"open-rad": {"en": "Open Image", "ar": "فتح صور الاشعة"},
"open-rad": {"en": "Open Radiology Image", "ar": "فتح صور الاشعة"},
'fileNumber': {'en': "File Number: ", 'ar': " :رقم الملف"},
'searchPatient-name': {
@ -852,4 +857,17 @@ const Map<String, Map<String, String>> localizedValues = {
},
"updateNow": {"en": "Update Now", "ar": "تحديث الان"},
"updateTheApp": {"en": "Update The App", "ar": "تحديث التطبيق"},
"admission-date": {"en": "Admission Date", "ar": "تاريخ القبول"},
"noOfDays": {"en": "No of days", "ar": "عدد الأيام"},
"numOfDays": {"en": "Number of Days", "ar": "عدد الأيام"},
"replayBefore": {"en": "Replay Before", "ar": "رد قبل"},
"try-saying": {"en": "Try saying something", "ar": 'حاول قول شيء ما'},
"refClinic": {"en": "Ref Clinic", "ar": "Ref Clinic"},
"acknowledged": {"en": "Acknowledged", "ar": "إقرار"},
"didntCatch": {
"en": "Didn't catch that. Try Speaking again",
"ar": "لم يتم التقاط ذلك. حاول التحدث مرة أخرى"
},
"showDetail": {"en": "Show Detail", "ar": "أظهر المعلومات"},
"viewProfile": {"en": "View Profile", "ar": "إعرض الملف"},
};

@ -0,0 +1,2 @@
enum PatientType { inPatient, OutPatient }

@ -0,0 +1,64 @@
class InsuranceApprovalInPatientRequestModel {
int patientID;
int patientTypeID;
int eXuldAPPNO;
int projectID;
int languageID;
String stamp;
String iPAdress;
double versionID;
int channel;
String tokenID;
String sessionID;
bool isLoginForDoctorApp;
bool patientOutSA;
InsuranceApprovalInPatientRequestModel(
{this.patientID,
this.patientTypeID,
this.eXuldAPPNO,
this.projectID,
this.languageID,
this.stamp,
this.iPAdress,
this.versionID,
this.channel,
this.tokenID,
this.sessionID,
this.isLoginForDoctorApp,
this.patientOutSA});
InsuranceApprovalInPatientRequestModel.fromJson(Map<String, dynamic> json) {
patientID = json['PatientID'];
patientTypeID = json['PatientTypeID'];
eXuldAPPNO = json['EXuldAPPNO'];
projectID = json['ProjectID'];
languageID = json['LanguageID'];
stamp = json['stamp'];
iPAdress = json['IPAdress'];
versionID = json['VersionID'];
channel = json['Channel'];
tokenID = json['TokenID'];
sessionID = json['SessionID'];
isLoginForDoctorApp = json['IsLoginForDoctorApp'];
patientOutSA = json['PatientOutSA'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['PatientID'] = this.patientID;
data['PatientTypeID'] = this.patientTypeID;
data['EXuldAPPNO'] = this.eXuldAPPNO;
data['ProjectID'] = this.projectID;
data['LanguageID'] = this.languageID;
data['stamp'] = this.stamp;
data['IPAdress'] = this.iPAdress;
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['TokenID'] = this.tokenID;
data['SessionID'] = this.sessionID;
data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp;
data['PatientOutSA'] = this.patientOutSA;
return data;
}
}

@ -0,0 +1,218 @@
import 'package:doctor_app_flutter/util/date-utils.dart';
class DischargeReferralPatient {
dynamic rowID;
int projectID;
int lineItemNo;
int doctorID;
int patientID;
String doctorName;
dynamic doctorNameN;
String firstName;
String middleName;
String lastName;
dynamic firstNameN;
dynamic middleNameN;
dynamic lastNameN;
int gender;
String dateofBirth;
String mobileNumber;
String emailAddress;
String patientIdentificationNo;
int patientType;
String admissionNo;
String admissionDate;
String roomID;
String bedID;
dynamic nursingStationID;
dynamic description;
String nationalityName;
dynamic nationalityNameN;
int referralDoctor;
int referringDoctor;
int referralClinic;
int referringClinic;
int referralStatus;
DateTime referralDate;
String referringDoctorRemarks;
String referredDoctorRemarks;
String referralResponseOn;
int priority;
int frequency;
String mAXResponseTime;
String dischargeDate;
dynamic clinicID;
String age;
String clinicDescription;
String frequencyDescription;
String genderDescription;
bool isDoctorLate;
bool isDoctorResponse;
String nursingStationName;
String priorityDescription;
String referringClinicDescription;
String referringDoctorName;
DischargeReferralPatient(
{this.rowID,
this.projectID,
this.lineItemNo,
this.doctorID,
this.patientID,
this.doctorName,
this.doctorNameN,
this.firstName,
this.middleName,
this.lastName,
this.firstNameN,
this.middleNameN,
this.lastNameN,
this.gender,
this.dateofBirth,
this.mobileNumber,
this.emailAddress,
this.patientIdentificationNo,
this.patientType,
this.admissionNo,
this.admissionDate,
this.roomID,
this.bedID,
this.nursingStationID,
this.description,
this.nationalityName,
this.nationalityNameN,
this.referralDoctor,
this.referringDoctor,
this.referralClinic,
this.referringClinic,
this.referralStatus,
this.referralDate,
this.referringDoctorRemarks,
this.referredDoctorRemarks,
this.referralResponseOn,
this.priority,
this.frequency,
this.mAXResponseTime,
this.dischargeDate,
this.clinicID,
this.age,
this.clinicDescription,
this.frequencyDescription,
this.genderDescription,
this.isDoctorLate,
this.isDoctorResponse,
this.nursingStationName,
this.priorityDescription,
this.referringClinicDescription,
this.referringDoctorName});
DischargeReferralPatient.fromJson(Map<String, dynamic> json) {
rowID = json['RowID'];
projectID = json['ProjectID'];
lineItemNo = json['LineItemNo'];
doctorID = json['DoctorID'];
patientID = json['PatientID'];
doctorName = json['DoctorName'];
doctorNameN = json['DoctorNameN'];
firstName = json['FirstName'];
middleName = json['MiddleName'];
lastName = json['LastName'];
firstNameN = json['FirstNameN'];
middleNameN = json['MiddleNameN'];
lastNameN = json['LastNameN'];
gender = json['Gender'];
dateofBirth = json['DateofBirth'];
mobileNumber = json['MobileNumber'];
emailAddress = json['EmailAddress'];
patientIdentificationNo = json['PatientIdentificationNo'];
patientType = json['PatientType'];
admissionNo = json['AdmissionNo'];
admissionDate = json['AdmissionDate'];
roomID = json['RoomID'];
bedID = json['BedID'];
nursingStationID = json['NursingStationID'];
description = json['Description'];
nationalityName = json['NationalityName'];
nationalityNameN = json['NationalityNameN'];
referralDoctor = json['ReferralDoctor'];
referringDoctor = json['ReferringDoctor'];
referralClinic = json['ReferralClinic'];
referringClinic = json['ReferringClinic'];
referralStatus = json['ReferralStatus'];
referralDate = DateUtils.convertStringToDate(json['ReferralDate']);
referringDoctorRemarks = json['ReferringDoctorRemarks'];
referredDoctorRemarks = json['ReferredDoctorRemarks'];
referralResponseOn = json['ReferralResponseOn'];
priority = json['Priority'];
frequency = json['Frequency'];
mAXResponseTime = json['MAXResponseTime'];
dischargeDate = json['DischargeDate'];
clinicID = json['ClinicID'];
age = json['Age'];
clinicDescription = json['ClinicDescription'];
frequencyDescription = json['FrequencyDescription'];
genderDescription = json['GenderDescription'];
isDoctorLate = json['IsDoctorLate'];
isDoctorResponse = json['IsDoctorResponse'];
nursingStationName = json['NursingStationName'];
priorityDescription = json['PriorityDescription'];
referringClinicDescription = json['ReferringClinicDescription'];
referringDoctorName = json['ReferringDoctorName'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['RowID'] = this.rowID;
data['ProjectID'] = this.projectID;
data['LineItemNo'] = this.lineItemNo;
data['DoctorID'] = this.doctorID;
data['PatientID'] = this.patientID;
data['DoctorName'] = this.doctorName;
data['DoctorNameN'] = this.doctorNameN;
data['FirstName'] = this.firstName;
data['MiddleName'] = this.middleName;
data['LastName'] = this.lastName;
data['FirstNameN'] = this.firstNameN;
data['MiddleNameN'] = this.middleNameN;
data['LastNameN'] = this.lastNameN;
data['Gender'] = this.gender;
data['DateofBirth'] = this.dateofBirth;
data['MobileNumber'] = this.mobileNumber;
data['EmailAddress'] = this.emailAddress;
data['PatientIdentificationNo'] = this.patientIdentificationNo;
data['PatientType'] = this.patientType;
data['AdmissionNo'] = this.admissionNo;
data['AdmissionDate'] = this.admissionDate;
data['RoomID'] = this.roomID;
data['BedID'] = this.bedID;
data['NursingStationID'] = this.nursingStationID;
data['Description'] = this.description;
data['NationalityName'] = this.nationalityName;
data['NationalityNameN'] = this.nationalityNameN;
data['ReferralDoctor'] = this.referralDoctor;
data['ReferringDoctor'] = this.referringDoctor;
data['ReferralClinic'] = this.referralClinic;
data['ReferringClinic'] = this.referringClinic;
data['ReferralStatus'] = this.referralStatus;
data['ReferralDate'] = this.referralDate;
data['ReferringDoctorRemarks'] = this.referringDoctorRemarks;
data['ReferredDoctorRemarks'] = this.referredDoctorRemarks;
data['ReferralResponseOn'] = this.referralResponseOn;
data['Priority'] = this.priority;
data['Frequency'] = this.frequency;
data['MAXResponseTime'] = this.mAXResponseTime;
data['DischargeDate'] = this.dischargeDate;
data['ClinicID'] = this.clinicID;
data['Age'] = this.age;
data['ClinicDescription'] = this.clinicDescription;
data['FrequencyDescription'] = this.frequencyDescription;
data['GenderDescription'] = this.genderDescription;
data['IsDoctorLate'] = this.isDoctorLate;
data['IsDoctorResponse'] = this.isDoctorResponse;
data['NursingStationName'] = this.nursingStationName;
data['PriorityDescription'] = this.priorityDescription;
data['ReferringClinicDescription'] = this.referringClinicDescription;
data['ReferringDoctorName'] = this.referringDoctorName;
return data;
}
}

@ -0,0 +1,258 @@
import 'package:doctor_app_flutter/util/date-utils.dart';
class MyReferralPatientModel {
dynamic rowID;
int projectID;
int lineItemNo;
int doctorID;
int patientID;
String doctorName;
dynamic doctorNameN;
String firstName;
String middleName;
String lastName;
dynamic firstNameN;
dynamic middleNameN;
dynamic lastNameN;
int gender;
String dateofBirth;
String mobileNumber;
String emailAddress;
String patientIdentificationNo;
int patientType;
String admissionNo;
String admissionDate;
String roomID;
String bedID;
dynamic nursingStationID;
dynamic description;
String nationalityName;
dynamic nationalityNameN;
String clinicDescription;
String clinicDescriptionN;
int referralDoctor;
int referringDoctor;
int referralClinic;
int referringClinic;
int referralStatus;
DateTime referralDate;
String referringDoctorRemarks;
String referredDoctorRemarks;
String referralResponseOn;
int priority;
int frequency;
String mAXResponseTime;
int episodeID;
int appointmentNo;
String appointmentDate;
int appointmentType;
int patientMRN;
String createdOn;
int clinicID;
String nationalityID;
String age;
String doctorImageURL;
String frequencyDescription;
String genderDescription;
bool isDoctorLate;
bool isDoctorResponse;
String nationalityFlagURL;
String nursingStationName;
String priorityDescription;
String referringClinicDescription;
String referringDoctorName;
MyReferralPatientModel(
{this.rowID,
this.projectID,
this.lineItemNo,
this.doctorID,
this.patientID,
this.doctorName,
this.doctorNameN,
this.firstName,
this.middleName,
this.lastName,
this.firstNameN,
this.middleNameN,
this.lastNameN,
this.gender,
this.dateofBirth,
this.mobileNumber,
this.emailAddress,
this.patientIdentificationNo,
this.patientType,
this.admissionNo,
this.admissionDate,
this.roomID,
this.bedID,
this.nursingStationID,
this.description,
this.nationalityName,
this.nationalityNameN,
this.clinicDescription,
this.clinicDescriptionN,
this.referralDoctor,
this.referringDoctor,
this.referralClinic,
this.referringClinic,
this.referralStatus,
this.referralDate,
this.referringDoctorRemarks,
this.referredDoctorRemarks,
this.referralResponseOn,
this.priority,
this.frequency,
this.mAXResponseTime,
this.episodeID,
this.appointmentNo,
this.appointmentDate,
this.appointmentType,
this.patientMRN,
this.createdOn,
this.clinicID,
this.nationalityID,
this.age,
this.doctorImageURL,
this.frequencyDescription,
this.genderDescription,
this.isDoctorLate,
this.isDoctorResponse,
this.nationalityFlagURL,
this.nursingStationName,
this.priorityDescription,
this.referringClinicDescription,
this.referringDoctorName});
MyReferralPatientModel.fromJson(Map<String, dynamic> json) {
rowID = json['RowID'];
projectID = json['ProjectID'];
lineItemNo = json['LineItemNo'];
doctorID = json['DoctorID'];
patientID = json['PatientID'];
doctorName = json['DoctorName'];
doctorNameN = json['DoctorNameN'];
firstName = json['FirstName'];
middleName = json['MiddleName'];
lastName = json['LastName'];
firstNameN = json['FirstNameN'];
middleNameN = json['MiddleNameN'];
lastNameN = json['LastNameN'];
gender = json['Gender'];
dateofBirth = json['DateofBirth'];
mobileNumber = json['MobileNumber'];
emailAddress = json['EmailAddress'];
patientIdentificationNo = json['PatientIdentificationNo'];
patientType = json['PatientType'];
admissionNo = json['AdmissionNo'];
admissionDate = json['AdmissionDate'];
roomID = json['RoomID'];
bedID = json['BedID'];
nursingStationID = json['NursingStationID'];
description = json['Description'];
nationalityName = json['NationalityName'];
nationalityNameN = json['NationalityNameN'];
clinicDescription = json['ClinicDescription'];
clinicDescriptionN = json['ClinicDescriptionN'];
referralDoctor = json['ReferralDoctor'];
referringDoctor = json['ReferringDoctor'];
referralClinic = json['ReferralClinic'];
referringClinic = json['ReferringClinic'];
referralStatus = json['ReferralStatus'];
referralDate = DateUtils.convertStringToDate(json['ReferralDate']);
referringDoctorRemarks = json['ReferringDoctorRemarks'];
referredDoctorRemarks = json['ReferredDoctorRemarks'];
referralResponseOn = json['ReferralResponseOn'];
priority = json['Priority'];
frequency = json['Frequency'];
mAXResponseTime = json['MAXResponseTime'];
episodeID = json['EpisodeID'];
appointmentNo = json['AppointmentNo'];
appointmentDate = json['AppointmentDate'];
appointmentType = json['AppointmentType'];
patientMRN = json['PatientMRN'];
createdOn = json['CreatedOn'];
clinicID = json['ClinicID'];
nationalityID = json['NationalityID'];
age = json['Age'];
doctorImageURL = json['DoctorImageURL'];
frequencyDescription = json['FrequencyDescription'];
genderDescription = json['GenderDescription'];
isDoctorLate = json['IsDoctorLate'];
isDoctorResponse = json['IsDoctorResponse'];
nationalityFlagURL = json['NationalityFlagURL'];
nursingStationName = json['NursingStationName'];
priorityDescription = json['PriorityDescription'];
referringClinicDescription = json['ReferringClinicDescription'];
referringDoctorName = json['ReferringDoctorName'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['RowID'] = this.rowID;
data['ProjectID'] = this.projectID;
data['LineItemNo'] = this.lineItemNo;
data['DoctorID'] = this.doctorID;
data['PatientID'] = this.patientID;
data['DoctorName'] = this.doctorName;
data['DoctorNameN'] = this.doctorNameN;
data['FirstName'] = this.firstName;
data['MiddleName'] = this.middleName;
data['LastName'] = this.lastName;
data['FirstNameN'] = this.firstNameN;
data['MiddleNameN'] = this.middleNameN;
data['LastNameN'] = this.lastNameN;
data['Gender'] = this.gender;
data['DateofBirth'] = this.dateofBirth;
data['MobileNumber'] = this.mobileNumber;
data['EmailAddress'] = this.emailAddress;
data['PatientIdentificationNo'] = this.patientIdentificationNo;
data['PatientType'] = this.patientType;
data['AdmissionNo'] = this.admissionNo;
data['AdmissionDate'] = this.admissionDate;
data['RoomID'] = this.roomID;
data['BedID'] = this.bedID;
data['NursingStationID'] = this.nursingStationID;
data['Description'] = this.description;
data['NationalityName'] = this.nationalityName;
data['NationalityNameN'] = this.nationalityNameN;
data['ClinicDescription'] = this.clinicDescription;
data['ClinicDescriptionN'] = this.clinicDescriptionN;
data['ReferralDoctor'] = this.referralDoctor;
data['ReferringDoctor'] = this.referringDoctor;
data['ReferralClinic'] = this.referralClinic;
data['ReferringClinic'] = this.referringClinic;
data['ReferralStatus'] = this.referralStatus;
data['ReferralDate'] = this.referralDate;
data['ReferringDoctorRemarks'] = this.referringDoctorRemarks;
data['ReferredDoctorRemarks'] = this.referredDoctorRemarks;
data['ReferralResponseOn'] = this.referralResponseOn;
data['Priority'] = this.priority;
data['Frequency'] = this.frequency;
data['MAXResponseTime'] = this.mAXResponseTime;
data['EpisodeID'] = this.episodeID;
data['AppointmentNo'] = this.appointmentNo;
data['AppointmentDate'] = this.appointmentDate;
data['AppointmentType'] = this.appointmentType;
data['PatientMRN'] = this.patientMRN;
data['CreatedOn'] = this.createdOn;
data['ClinicID'] = this.clinicID;
data['NationalityID'] = this.nationalityID;
data['Age'] = this.age;
data['DoctorImageURL'] = this.doctorImageURL;
data['FrequencyDescription'] = this.frequencyDescription;
data['GenderDescription'] = this.genderDescription;
data['IsDoctorLate'] = this.isDoctorLate;
data['IsDoctorResponse'] = this.isDoctorResponse;
data['NationalityFlagURL'] = this.nationalityFlagURL;
data['NursingStationName'] = this.nursingStationName;
data['PriorityDescription'] = this.priorityDescription;
data['ReferringClinicDescription'] = this.referringClinicDescription;
data['ReferringDoctorName'] = this.referringDoctorName;
return data;
}
get patientName {
return this.firstName+" "+this.lastName;
}
}

@ -0,0 +1,60 @@
class PatientSearchRequestModel {
int doctorID;
String firstName;
String middleName;
String lastName;
String patientMobileNumber;
String patientIdentificationID;
int patientID;
String from;
String to;
int searchType;
String mobileNo;
String identificationNo;
PatientSearchRequestModel(
{this.doctorID =0,
this.firstName ="0",
this.middleName ="0",
this.lastName ="0",
this.patientMobileNumber ="0",
this.patientIdentificationID ="0",
this.patientID =0,
this.searchType =1,
this.mobileNo="",
this.identificationNo="0",
this.from ="0",
this.to ="0"});
PatientSearchRequestModel.fromJson(Map<String, dynamic> json) {
doctorID = json['DoctorID'];
firstName = json['FirstName'];
middleName = json['MiddleName'];
lastName = json['LastName'];
patientMobileNumber = json['PatientMobileNumber'];
patientIdentificationID = json['PatientIdentificationID'];
patientID = json['PatientID'];
from = json['From'];
to = json['To'];
searchType = json['SearchType'];
mobileNo = json['MobileNo'];
identificationNo = json['IdentificationNo'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['DoctorID'] = this.doctorID;
data['FirstName'] = this.firstName;
data['MiddleName'] = this.middleName;
data['LastName'] = this.lastName;
data['PatientMobileNumber'] = this.patientMobileNumber;
data['PatientIdentificationID'] = this.patientIdentificationID;
data['PatientID'] = this.patientID;
data['From'] = this.from;
data['To'] = this.to;
data['SearchType'] = this.searchType;
data['MobileNo'] = this.mobileNo;
data['IdentificationNo'] = this.identificationNo;
return data;
}
}

@ -0,0 +1,26 @@
class InPatientPrescriptionRequestModel {
String vidaAuthTokenID;
dynamic patientMRN;
dynamic appNo;
dynamic admissionNo;
InPatientPrescriptionRequestModel(
{this.vidaAuthTokenID, this.patientMRN, this.appNo, this.admissionNo});
InPatientPrescriptionRequestModel.fromJson(Map<String, dynamic> json) {
vidaAuthTokenID = json['VidaAuthTokenID'];
patientMRN = json['PatientID'];
appNo = json['AppointmentNo'];
admissionNo = json['AdmissionNo'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['VidaAuthTokenID'] = this.vidaAuthTokenID;
data['PatientID'] = this.patientMRN;
data['AppointmentNo'] = this.appNo;
data['AdmissionNo'] = this.admissionNo;
return data;
}
}

@ -0,0 +1,200 @@
class PrescriotionInPatient {
int admissionNo;
int authorizedBy;
dynamic bedNo;
String comments;
int createdBy;
String createdByName;
dynamic createdByNameN;
String createdOn;
String direction;
int directionID;
dynamic directionN;
String dose;
int editedBy;
dynamic iVDiluentLine;
int iVDiluentType;
dynamic iVDiluentVolume;
dynamic iVRate;
dynamic iVStability;
String itemDescription;
int itemID;
int lineItemNo;
int locationId;
int noOfDoses;
int orderNo;
int patientID;
String pharmacyRemarks;
String prescriptionDatetime;
int prescriptionNo;
String processedBy;
int projectID;
int refillID;
String refillType;
dynamic refillTypeN;
int reviewedPharmacist;
dynamic roomId;
String route;
int routeId;
dynamic routeN;
dynamic setupID;
String startDatetime;
int status;
String statusDescription;
dynamic statusDescriptionN;
String stopDatetime;
int unitofMeasurement;
String unitofMeasurementDescription;
dynamic unitofMeasurementDescriptionN;
PrescriotionInPatient(
{this.admissionNo,
this.authorizedBy,
this.bedNo,
this.comments,
this.createdBy,
this.createdByName,
this.createdByNameN,
this.createdOn,
this.direction,
this.directionID,
this.directionN,
this.dose,
this.editedBy,
this.iVDiluentLine,
this.iVDiluentType,
this.iVDiluentVolume,
this.iVRate,
this.iVStability,
this.itemDescription,
this.itemID,
this.lineItemNo,
this.locationId,
this.noOfDoses,
this.orderNo,
this.patientID,
this.pharmacyRemarks,
this.prescriptionDatetime,
this.prescriptionNo,
this.processedBy,
this.projectID,
this.refillID,
this.refillType,
this.refillTypeN,
this.reviewedPharmacist,
this.roomId,
this.route,
this.routeId,
this.routeN,
this.setupID,
this.startDatetime,
this.status,
this.statusDescription,
this.statusDescriptionN,
this.stopDatetime,
this.unitofMeasurement,
this.unitofMeasurementDescription,
this.unitofMeasurementDescriptionN});
PrescriotionInPatient.fromJson(Map<String, dynamic> json) {
admissionNo = json['AdmissionNo'];
authorizedBy = json['AuthorizedBy'];
bedNo = json['BedNo'];
comments = json['Comments'];
createdBy = json['CreatedBy'];
createdByName = json['CreatedByName'];
createdByNameN = json['CreatedByNameN'];
createdOn = json['CreatedOn'];
direction = json['Direction'];
directionID = json['DirectionID'];
directionN = json['DirectionN'];
dose = json['Dose'];
editedBy = json['EditedBy'];
iVDiluentLine = json['IVDiluentLine'];
iVDiluentType = json['IVDiluentType'];
iVDiluentVolume = json['IVDiluentVolume'];
iVRate = json['IVRate'];
iVStability = json['IVStability'];
itemDescription = json['ItemDescription'];
itemID = json['ItemID'];
lineItemNo = json['LineItemNo'];
locationId = json['LocationId'];
noOfDoses = json['NoOfDoses'];
orderNo = json['OrderNo'];
patientID = json['PatientID'];
pharmacyRemarks = json['PharmacyRemarks'];
prescriptionDatetime = json['PrescriptionDatetime'];
prescriptionNo = json['PrescriptionNo'];
processedBy = json['ProcessedBy'];
projectID = json['ProjectID'];
refillID = json['RefillID'];
refillType = json['RefillType'];
refillTypeN = json['RefillTypeN'];
reviewedPharmacist = json['ReviewedPharmacist'];
roomId = json['RoomId'];
route = json['Route'];
routeId = json['RouteId'];
routeN = json['RouteN'];
setupID = json['SetupID'];
startDatetime = json['StartDatetime'];
status = json['Status'];
statusDescription = json['StatusDescription'];
statusDescriptionN = json['StatusDescriptionN'];
stopDatetime = json['StopDatetime'];
unitofMeasurement = json['UnitofMeasurement'];
unitofMeasurementDescription = json['UnitofMeasurementDescription'];
unitofMeasurementDescriptionN = json['UnitofMeasurementDescriptionN'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['AdmissionNo'] = this.admissionNo;
data['AuthorizedBy'] = this.authorizedBy;
data['BedNo'] = this.bedNo;
data['Comments'] = this.comments;
data['CreatedBy'] = this.createdBy;
data['CreatedByName'] = this.createdByName;
data['CreatedByNameN'] = this.createdByNameN;
data['CreatedOn'] = this.createdOn;
data['Direction'] = this.direction;
data['DirectionID'] = this.directionID;
data['DirectionN'] = this.directionN;
data['Dose'] = this.dose;
data['EditedBy'] = this.editedBy;
data['IVDiluentLine'] = this.iVDiluentLine;
data['IVDiluentType'] = this.iVDiluentType;
data['IVDiluentVolume'] = this.iVDiluentVolume;
data['IVRate'] = this.iVRate;
data['IVStability'] = this.iVStability;
data['ItemDescription'] = this.itemDescription;
data['ItemID'] = this.itemID;
data['LineItemNo'] = this.lineItemNo;
data['LocationId'] = this.locationId;
data['NoOfDoses'] = this.noOfDoses;
data['OrderNo'] = this.orderNo;
data['PatientID'] = this.patientID;
data['PharmacyRemarks'] = this.pharmacyRemarks;
data['PrescriptionDatetime'] = this.prescriptionDatetime;
data['PrescriptionNo'] = this.prescriptionNo;
data['ProcessedBy'] = this.processedBy;
data['ProjectID'] = this.projectID;
data['RefillID'] = this.refillID;
data['RefillType'] = this.refillType;
data['RefillTypeN'] = this.refillTypeN;
data['ReviewedPharmacist'] = this.reviewedPharmacist;
data['RoomId'] = this.roomId;
data['Route'] = this.route;
data['RouteId'] = this.routeId;
data['RouteN'] = this.routeN;
data['SetupID'] = this.setupID;
data['StartDatetime'] = this.startDatetime;
data['Status'] = this.status;
data['StatusDescription'] = this.statusDescription;
data['StatusDescriptionN'] = this.statusDescriptionN;
data['StopDatetime'] = this.stopDatetime;
data['UnitofMeasurement'] = this.unitofMeasurement;
data['UnitofMeasurementDescription'] = this.unitofMeasurementDescription;
data['UnitofMeasurementDescriptionN'] = this.unitofMeasurementDescriptionN;
return data;
}
}

@ -0,0 +1,108 @@
class ReferralRequest {
String roomID;
String referralClinic;
String referralDoctor;
int createdBy;
int editedBy;
int patientID;
int patientTypeID;
int referringClinic;
int referringDoctor;
int projectID;
int admissionNo;
String referringDoctorRemarks;
String priority;
String frequency;
String extension;
int languageID;
String stamp;
String iPAdress;
double versionID;
int channel;
String tokenID;
String sessionID;
bool isLoginForDoctorApp;
bool patientOutSA;
ReferralRequest(
{this.roomID,
this.referralClinic,
this.referralDoctor,
this.createdBy,
this.editedBy,
this.patientID,
this.patientTypeID,
this.referringClinic,
this.referringDoctor,
this.projectID,
this.admissionNo,
this.referringDoctorRemarks,
this.priority,
this.frequency,
this.extension,
this.languageID,
this.stamp,
this.iPAdress,
this.versionID,
this.channel,
this.tokenID,
this.sessionID,
this.isLoginForDoctorApp,
this.patientOutSA});
ReferralRequest.fromJson(Map<String, dynamic> json) {
roomID = json['RoomID'];
referralClinic = json['ReferralClinic'];
referralDoctor = json['ReferralDoctor'];
createdBy = json['CreatedBy'];
editedBy = json['EditedBy'];
patientID = json['PatientID'];
patientTypeID = json['PatientTypeID'];
referringClinic = json['ReferringClinic'];
referringDoctor = json['ReferringDoctor'];
projectID = json['ProjectID'];
admissionNo = json['AdmissionNo'];
referringDoctorRemarks = json['ReferringDoctorRemarks'];
priority = json['Priority'];
frequency = json['Frequency'];
extension = json['Extension'];
languageID = json['LanguageID'];
stamp = json['stamp'];
iPAdress = json['IPAdress'];
versionID = json['VersionID'];
channel = json['Channel'];
tokenID = json['TokenID'];
sessionID = json['SessionID'];
isLoginForDoctorApp = json['IsLoginForDoctorApp'];
patientOutSA = json['PatientOutSA'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['RoomID'] = this.roomID;
data['ReferralClinic'] = this.referralClinic;
data['ReferralDoctor'] = this.referralDoctor;
data['CreatedBy'] = this.createdBy;
data['EditedBy'] = this.editedBy;
data['PatientID'] = this.patientID;
data['PatientTypeID'] = this.patientTypeID;
data['ReferringClinic'] = this.referringClinic;
data['ReferringDoctor'] = this.referringDoctor;
data['ProjectID'] = this.projectID;
data['AdmissionNo'] = this.admissionNo;
data['ReferringDoctorRemarks'] = this.referringDoctorRemarks;
data['Priority'] = this.priority;
data['Frequency'] = this.frequency;
data['Extension'] = this.extension;
data['LanguageID'] = this.languageID;
data['stamp'] = this.stamp;
data['IPAdress'] = this.iPAdress;
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['TokenID'] = this.tokenID;
data['SessionID'] = this.sessionID;
data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp;
data['PatientOutSA'] = this.patientOutSA;
return data;
}
}

@ -0,0 +1,277 @@
class InsuranceApprovalInPatientModel {
String setupID;
int projectID;
int approvalNo;
int status;
String approvalDate;
int patientType;
int patientID;
int companyID;
bool subCategoryID;
int doctorID;
int clinicID;
int approvalType;
int inpatientApprovalSubType;
dynamic isApprovalOnGross;
String companyApprovalNo;
dynamic progNoteOrderNo;
String submitOn;
String receiptOn;
String expiryDate;
int admissionNo;
int admissionRequestNo;
String approvalStatusDescption;
dynamic approvalStatusDescptionN;
dynamic remarks;
List<ApporvalDetails> apporvalDetails;
String clinicName;
dynamic companyName;
String doctorName;
String projectName;
int totaUnUsedCount;
int unUsedCount;
String doctorImage;
InsuranceApprovalInPatientModel(
{this.setupID,
this.projectID,
this.approvalNo,
this.status,
this.approvalDate,
this.patientType,
this.patientID,
this.companyID,
this.subCategoryID,
this.doctorID,
this.clinicID,
this.approvalType,
this.inpatientApprovalSubType,
this.isApprovalOnGross,
this.companyApprovalNo,
this.progNoteOrderNo,
this.submitOn,
this.receiptOn,
this.expiryDate,
this.admissionNo,
this.admissionRequestNo,
this.approvalStatusDescption,
this.approvalStatusDescptionN,
this.remarks,
this.apporvalDetails,
this.clinicName,
this.companyName,
this.doctorName,
this.projectName,
this.totaUnUsedCount,
this.unUsedCount,
this.doctorImage});
InsuranceApprovalInPatientModel.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID'];
doctorImage = json['DoctorImageURL'];
projectID = json['ProjectID'];
approvalNo = json['ApprovalNo'];
status = json['Status'];
approvalDate = json['ApprovalDate'];
patientType = json['PatientType'];
patientID = json['PatientID'];
companyID = json['CompanyID'];
subCategoryID = json['SubCategoryID'];
doctorID = json['DoctorID'];
clinicID = json['ClinicID'];
approvalType = json['ApprovalType'];
inpatientApprovalSubType = json['InpatientApprovalSubType'];
isApprovalOnGross = json['IsApprovalOnGross'];
companyApprovalNo = json['CompanyApprovalNo'];
progNoteOrderNo = json['ProgNoteOrderNo'];
submitOn = json['SubmitOn'];
receiptOn = json['ReceiptOn'];
expiryDate = json['ExpiryDate'];
admissionNo = json['AdmissionNo'];
admissionRequestNo = json['AdmissionRequestNo'];
approvalStatusDescption = json['ApprovalStatusDescption'];
approvalStatusDescptionN = json['ApprovalStatusDescptionN'];
remarks = json['Remarks'];
if (json['ApporvalDetails'] != null) {
apporvalDetails = new List<ApporvalDetails>();
json['ApporvalDetails'].forEach((v) {
apporvalDetails.add(new ApporvalDetails.fromJson(v));
});
}
clinicName = json['ClinicName'];
companyName = json['CompanyName'];
doctorName = json['DoctorName'];
projectName = json['ProjectName'];
totaUnUsedCount = json['TotaUnUsedCount'];
unUsedCount = json['UnUsedCount'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['SetupID'] = this.setupID;
data['DoctorImageURL'] = this.doctorImage;
data['ProjectID'] = this.projectID;
data['ApprovalNo'] = this.approvalNo;
data['Status'] = this.status;
data['ApprovalDate'] = this.approvalDate;
data['PatientType'] = this.patientType;
data['PatientID'] = this.patientID;
data['CompanyID'] = this.companyID;
data['SubCategoryID'] = this.subCategoryID;
data['DoctorID'] = this.doctorID;
data['ClinicID'] = this.clinicID;
data['ApprovalType'] = this.approvalType;
data['InpatientApprovalSubType'] = this.inpatientApprovalSubType;
data['IsApprovalOnGross'] = this.isApprovalOnGross;
data['CompanyApprovalNo'] = this.companyApprovalNo;
data['ProgNoteOrderNo'] = this.progNoteOrderNo;
data['SubmitOn'] = this.submitOn;
data['ReceiptOn'] = this.receiptOn;
data['ExpiryDate'] = this.expiryDate;
data['AdmissionNo'] = this.admissionNo;
data['AdmissionRequestNo'] = this.admissionRequestNo;
data['ApprovalStatusDescption'] = this.approvalStatusDescption;
data['ApprovalStatusDescptionN'] = this.approvalStatusDescptionN;
data['Remarks'] = this.remarks;
if (this.apporvalDetails != null) {
data['ApporvalDetails'] =
this.apporvalDetails.map((v) => v.toJson()).toList();
}
data['ClinicName'] = this.clinicName;
data['CompanyName'] = this.companyName;
data['DoctorName'] = this.doctorName;
data['ProjectName'] = this.projectName;
data['TotaUnUsedCount'] = this.totaUnUsedCount;
data['UnUsedCount'] = this.unUsedCount;
return data;
}
}
class ApporvalDetails {
Null setupID;
Null projectID;
int approvalNo;
Null lineItemNo;
Null orderType;
Null procedureID;
Null toothNo;
Null price;
Null approvedAmount;
Null unapprovedPatientShare;
Null waivedAmount;
Null discountType;
Null discountValue;
Null shareType;
Null patientShareTypeValue;
Null companyShareTypeValue;
Null patientShare;
Null companyShare;
Null deductableAmount;
String disapprovedRemarks;
Null progNoteOrderNo;
Null progNoteLineItemNo;
Null invoiceTransactionType;
Null invoiceNo;
String procedureName;
String procedureNameN;
String status;
Null isInvoiced;
String isInvoicedDesc;
ApporvalDetails(
{this.setupID,
this.projectID,
this.approvalNo,
this.lineItemNo,
this.orderType,
this.procedureID,
this.toothNo,
this.price,
this.approvedAmount,
this.unapprovedPatientShare,
this.waivedAmount,
this.discountType,
this.discountValue,
this.shareType,
this.patientShareTypeValue,
this.companyShareTypeValue,
this.patientShare,
this.companyShare,
this.deductableAmount,
this.disapprovedRemarks,
this.progNoteOrderNo,
this.progNoteLineItemNo,
this.invoiceTransactionType,
this.invoiceNo,
this.procedureName,
this.procedureNameN,
this.status,
this.isInvoiced,
this.isInvoicedDesc});
ApporvalDetails.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID'];
projectID = json['ProjectID'];
approvalNo = json['ApprovalNo'];
lineItemNo = json['LineItemNo'];
orderType = json['OrderType'];
procedureID = json['ProcedureID'];
toothNo = json['ToothNo'];
price = json['Price'];
approvedAmount = json['ApprovedAmount'];
unapprovedPatientShare = json['UnapprovedPatientShare'];
waivedAmount = json['WaivedAmount'];
discountType = json['DiscountType'];
discountValue = json['DiscountValue'];
shareType = json['ShareType'];
patientShareTypeValue = json['PatientShareTypeValue'];
companyShareTypeValue = json['CompanyShareTypeValue'];
patientShare = json['PatientShare'];
companyShare = json['CompanyShare'];
deductableAmount = json['DeductableAmount'];
disapprovedRemarks = json['DisapprovedRemarks'];
progNoteOrderNo = json['ProgNoteOrderNo'];
progNoteLineItemNo = json['ProgNoteLineItemNo'];
invoiceTransactionType = json['InvoiceTransactionType'];
invoiceNo = json['InvoiceNo'];
procedureName = json['ProcedureName'];
procedureNameN = json['ProcedureNameN'];
status = json['Status'];
isInvoiced = json['IsInvoiced'];
isInvoicedDesc = json['IsInvoicedDesc'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['SetupID'] = this.setupID;
data['ProjectID'] = this.projectID;
data['ApprovalNo'] = this.approvalNo;
data['LineItemNo'] = this.lineItemNo;
data['OrderType'] = this.orderType;
data['ProcedureID'] = this.procedureID;
data['ToothNo'] = this.toothNo;
data['Price'] = this.price;
data['ApprovedAmount'] = this.approvedAmount;
data['UnapprovedPatientShare'] = this.unapprovedPatientShare;
data['WaivedAmount'] = this.waivedAmount;
data['DiscountType'] = this.discountType;
data['DiscountValue'] = this.discountValue;
data['ShareType'] = this.shareType;
data['PatientShareTypeValue'] = this.patientShareTypeValue;
data['CompanyShareTypeValue'] = this.companyShareTypeValue;
data['PatientShare'] = this.patientShare;
data['CompanyShare'] = this.companyShare;
data['DeductableAmount'] = this.deductableAmount;
data['DisapprovedRemarks'] = this.disapprovedRemarks;
data['ProgNoteOrderNo'] = this.progNoteOrderNo;
data['ProgNoteLineItemNo'] = this.progNoteLineItemNo;
data['InvoiceTransactionType'] = this.invoiceTransactionType;
data['InvoiceNo'] = this.invoiceNo;
data['ProcedureName'] = this.procedureName;
data['ProcedureNameN'] = this.procedureNameN;
data['Status'] = this.status;
data['IsInvoiced'] = this.isInvoiced;
data['IsInvoicedDesc'] = this.isInvoicedDesc;
return data;
}
}

@ -47,10 +47,10 @@ class LabResult {
lineItemNo = json['LineItemNo'];
maleInterpretativeData = json['MaleInterpretativeData'];
notes = json['Notes'];
packageID = json['PackageID'];
packageID = json['PackageID'].toString();
patientID = json['PatientID'];
projectID = json['ProjectID'];
referanceRange = json['ReferanceRange'];
projectID = json['ProjectID'].toString();
referanceRange = json['ReferenceRange'] ?? json['ReferanceRange'];
resultValue = json['ResultValue'];
sampleCollectedOn = json['SampleCollectedOn'];
sampleReceivedOn = json['SampleReceivedOn'];

@ -72,7 +72,7 @@ class PatientLabOrders {
PatientLabOrders.fromJson(Map<String, dynamic> json) {
actualDoctorRate = json['ActualDoctorRate'];
clinicDescription = json['ClinicDescription'];
clinicDescription = json['ClinicDescription']?? json['ClinicName'];
clinicDescriptionEnglish = json['ClinicDescriptionEnglish'];
clinicDescriptionN = json['ClinicDescriptionN'];
clinicID = json['ClinicID'];
@ -85,7 +85,7 @@ class PatientLabOrders {
doctorTitle = json['DoctorTitle'];
gender = json['Gender'];
genderDescription = json['GenderDescription'];
invoiceNo = json['InvoiceNo'];
invoiceNo = json['InvoiceNo'].toString();
isActiveDoctorProfile = json['IsActiveDoctorProfile'];
isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall'];
isExecludeDoctor = json['IsExecludeDoctor'];
@ -96,9 +96,9 @@ class PatientLabOrders {
nationalityFlagURL = json['NationalityFlagURL'];
noOfPatientsRate = json['NoOfPatientsRate'];
orderDate = DateUtils.convertStringToDate(json['OrderDate']);
orderNo = json['OrderNo'];
patientID = json['PatientID'];
projectID = json['ProjectID'];
orderNo = json['OrderNo'].toString();
patientID = json['PatientID'].toString();
projectID = json['ProjectID'].toString();
projectName = json['ProjectName'];
projectNameN = json['ProjectNameN'];
qR = json['QR'];

@ -65,7 +65,7 @@ class RequestPatientLabSpecialResult {
data['OrderNo'] = this.orderNo;
data['SetupID'] = this.setupID;
data['ProjectID'] = this.projectID;
data['ClinicID'] = this.clinicID;
data['ClinicID'] = this.clinicID ?? 0;
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['LanguageID'] = this.languageID;

@ -0,0 +1,88 @@
class CreateNoteModel {
int visitType;
int admissionNo;
int projectID;
int patientTypeID;
int patientID;
int clinicID;
String notes;
int createdBy;
int editedBy;
String nursingRemarks;
int languageID;
String stamp;
String iPAdress;
double versionID;
int channel;
String tokenID;
String sessionID;
bool isLoginForDoctorApp;
bool patientOutSA;
CreateNoteModel(
{this.visitType,
this.admissionNo,
this.projectID,
this.patientTypeID,
this.patientID,
this.clinicID,
this.notes,
this.createdBy,
this.editedBy,
this.nursingRemarks,
this.languageID,
this.stamp,
this.iPAdress,
this.versionID,
this.channel,
this.tokenID,
this.sessionID,
this.isLoginForDoctorApp,
this.patientOutSA});
CreateNoteModel.fromJson(Map<String, dynamic> json) {
visitType = json['VisitType'];
admissionNo = json['AdmissionNo'];
projectID = json['ProjectID'];
patientTypeID = json['PatientTypeID'];
patientID = json['PatientID'];
clinicID = json['ClinicID'];
notes = json['Notes'];
createdBy = json['CreatedBy'];
editedBy = json['EditedBy'];
nursingRemarks = json['NursingRemarks'];
languageID = json['LanguageID'];
stamp = json['stamp'];
iPAdress = json['IPAdress'];
versionID = json['VersionID'];
channel = json['Channel'];
tokenID = json['TokenID'];
sessionID = json['SessionID'];
isLoginForDoctorApp = json['IsLoginForDoctorApp'];
patientOutSA = json['PatientOutSA'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['VisitType'] = this.visitType;
data['AdmissionNo'] = this.admissionNo;
data['ProjectID'] = this.projectID;
data['PatientTypeID'] = this.patientTypeID;
data['PatientID'] = this.patientID;
data['ClinicID'] = this.clinicID;
data['Notes'] = this.notes;
data['CreatedBy'] = this.createdBy;
data['EditedBy'] = this.editedBy;
data['NursingRemarks'] = this.nursingRemarks;
data['LanguageID'] = this.languageID;
data['stamp'] = this.stamp;
data['IPAdress'] = this.iPAdress;
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['TokenID'] = this.tokenID;
data['SessionID'] = this.sessionID;
data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp;
data['PatientOutSA'] = this.patientOutSA;
return data;
}
}

@ -0,0 +1,92 @@
class NoteModel {
String setupID;
int projectID;
int patientID;
int patientType;
String admissionNo;
int lineItemNo;
int visitType;
String notes;
String assessmentDate;
String visitTime;
int status;
String nursingRemarks;
String createdOn;
String editedOn;
int createdBy;
int admissionClinicID;
String admissionClinicName;
Null doctorClinicName;
String doctorName;
String visitTypeDesc;
NoteModel(
{this.setupID,
this.projectID,
this.patientID,
this.patientType,
this.admissionNo,
this.lineItemNo,
this.visitType,
this.notes,
this.assessmentDate,
this.visitTime,
this.status,
this.nursingRemarks,
this.createdOn,
this.editedOn,
this.createdBy,
this.admissionClinicID,
this.admissionClinicName,
this.doctorClinicName,
this.doctorName,
this.visitTypeDesc});
NoteModel.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID'];
projectID = json['ProjectID'];
patientID = json['PatientID'];
patientType = json['PatientType'];
admissionNo = json['AdmissionNo'];
lineItemNo = json['LineItemNo'];
visitType = json['VisitType'];
notes = json['Notes'];
assessmentDate = json['AssessmentDate'];
visitTime = json['VisitTime'];
status = json['Status'];
nursingRemarks = json['NursingRemarks'];
createdOn = json['CreatedOn'];
editedOn = json['EditedOn'];
createdBy = json['CreatedBy'];
admissionClinicID = json['AdmissionClinicID'];
admissionClinicName = json['AdmissionClinicName'];
doctorClinicName = json['DoctorClinicName'];
doctorName = json['DoctorName'];
visitTypeDesc = json['VisitTypeDesc'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['SetupID'] = this.setupID;
data['ProjectID'] = this.projectID;
data['PatientID'] = this.patientID;
data['PatientType'] = this.patientType;
data['AdmissionNo'] = this.admissionNo;
data['LineItemNo'] = this.lineItemNo;
data['VisitType'] = this.visitType;
data['Notes'] = this.notes;
data['AssessmentDate'] = this.assessmentDate;
data['VisitTime'] = this.visitTime;
data['Status'] = this.status;
data['NursingRemarks'] = this.nursingRemarks;
data['CreatedOn'] = this.createdOn;
data['EditedOn'] = this.editedOn;
data['CreatedBy'] = this.createdBy;
data['AdmissionClinicID'] = this.admissionClinicID;
data['AdmissionClinicName'] = this.admissionClinicName;
data['DoctorClinicName'] = this.doctorClinicName;
data['DoctorName'] = this.doctorName;
data['VisitTypeDesc'] = this.visitTypeDesc;
return data;
}
}

@ -0,0 +1,80 @@
class UpdateNoteReqModel {
int projectID;
int createdBy;
int admissionNo;
int lineItemNo;
String notes;
bool verifiedNote;
bool cancelledNote;
int languageID;
String stamp;
String iPAdress;
double versionID;
int channel;
String tokenID;
String sessionID;
bool isLoginForDoctorApp;
bool patientOutSA;
int patientTypeID;
UpdateNoteReqModel(
{this.projectID,
this.createdBy,
this.admissionNo,
this.lineItemNo,
this.notes,
this.verifiedNote,
this.cancelledNote,
this.languageID,
this.stamp,
this.iPAdress,
this.versionID,
this.channel,
this.tokenID,
this.sessionID,
this.isLoginForDoctorApp,
this.patientOutSA,
this.patientTypeID});
UpdateNoteReqModel.fromJson(Map<String, dynamic> json) {
projectID = json['ProjectID'];
createdBy = json['CreatedBy'];
admissionNo = json['AdmissionNo'];
lineItemNo = json['LineItemNo'];
notes = json['Notes'];
verifiedNote = json['VerifiedNote'];
cancelledNote = json['CancelledNote'];
languageID = json['LanguageID'];
stamp = json['stamp'];
iPAdress = json['IPAdress'];
versionID = json['VersionID'];
channel = json['Channel'];
tokenID = json['TokenID'];
sessionID = json['SessionID'];
isLoginForDoctorApp = json['IsLoginForDoctorApp'];
patientOutSA = json['PatientOutSA'];
patientTypeID = json['PatientTypeID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ProjectID'] = this.projectID;
data['CreatedBy'] = this.createdBy;
data['AdmissionNo'] = this.admissionNo;
data['LineItemNo'] = this.lineItemNo;
data['Notes'] = this.notes;
data['VerifiedNote'] = this.verifiedNote;
data['CancelledNote'] = this.cancelledNote;
data['LanguageID'] = this.languageID;
data['stamp'] = this.stamp;
data['IPAdress'] = this.iPAdress;
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['TokenID'] = this.tokenID;
data['SessionID'] = this.sessionID;
data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp;
data['PatientOutSA'] = this.patientOutSA;
data['PatientTypeID'] = this.patientTypeID;
return data;
}
}

@ -2,13 +2,16 @@ class PrescriptionReqModel {
String vidaAuthTokenID;
dynamic patientMRN;
dynamic appNo;
dynamic admissionNo;
PrescriptionReqModel({this.vidaAuthTokenID, this.patientMRN, this.appNo});
PrescriptionReqModel(
{this.vidaAuthTokenID, this.patientMRN, this.appNo, this.admissionNo});
PrescriptionReqModel.fromJson(Map<String, dynamic> json) {
vidaAuthTokenID = json['VidaAuthTokenID'];
patientMRN = json['PatientMRN'];
appNo = json['AppointmentNo'];
admissionNo = json['AdmissionNo'];
}
Map<String, dynamic> toJson() {
@ -16,6 +19,8 @@ class PrescriptionReqModel {
data['VidaAuthTokenID'] = this.vidaAuthTokenID;
data['PatientMRN'] = this.patientMRN;
data['AppointmentNo'] = this.appNo;
data['AdmissionNo'] = this.admissionNo;
return data;
}
}

@ -1,47 +1,48 @@
import 'package:doctor_app_flutter/util/date-utils.dart';
class FinalRadiology {
String setupID;
int projectID;
Null patientID;
int invoiceLineItemNo;
int invoiceNo;
int doctorID;
int clinicID;
dynamic setupID;
dynamic projectID;
dynamic patientID;
dynamic invoiceLineItemNo;
dynamic invoiceNo;
dynamic doctorID;
dynamic clinicID;
DateTime orderDate;
String reportData;
String imageURL;
String procedureID;
int appointmentNo;
Null dIAPacsURL;
DateTime reportDate;
dynamic reportData;
dynamic imageURL;
dynamic procedureID;
dynamic appodynamicmentNo;
dynamic dIAPacsURL;
bool isRead;
String readOn;
dynamic readOn;
var admissionNo;
bool isInOutPatient;
int actualDoctorRate;
String clinicDescription;
String dIAPACSURL;
String doctorImageURL;
String doctorName;
int doctorRate;
String doctorTitle;
int gender;
String genderDescription;
dynamic actualDoctorRate;
dynamic clinicDescription;
dynamic dIAPACSURL;
dynamic doctorImageURL;
dynamic doctorName;
dynamic doctorRate;
dynamic doctorTitle;
dynamic gender;
dynamic genderDescription;
bool isActiveDoctorProfile;
bool isExecludeDoctor;
String isInOutPatientDescription;
String isInOutPatientDescriptionN;
String nationalityFlagURL;
int noOfPatientsRate;
int orderNo;
String projectName;
String qR;
String reportDataHTML;
String reportDataTextString;
List<String> speciality;
dynamic isInOutPatientDescription;
dynamic isInOutPatientDescriptionN;
dynamic nationalityFlagURL;
dynamic noOfPatientsRate;
dynamic orderNo;
dynamic projectName;
dynamic qR;
dynamic reportDataHTML;
dynamic reportDataTextdynamic;
List<dynamic> speciality;
bool isCVI;
bool isRadMedicalReport;
bool isLiveCareAppointment;
bool isLiveCareAppodynamicment;
FinalRadiology(
{this.setupID,
@ -52,10 +53,11 @@ class FinalRadiology {
this.doctorID,
this.clinicID,
this.orderDate,
this.reportDate,
this.reportData,
this.imageURL,
this.procedureID,
this.appointmentNo,
this.appodynamicmentNo,
this.dIAPacsURL,
this.isRead,
this.readOn,
@ -80,12 +82,12 @@ class FinalRadiology {
this.projectName,
this.qR,
this.reportDataHTML,
this.reportDataTextString,
this.reportDataTextdynamic,
this.speciality,
this.isCVI,
this.isRadMedicalReport,this.isLiveCareAppointment});
this.isRadMedicalReport,this.isLiveCareAppodynamicment});
FinalRadiology.fromJson(Map<String, dynamic> json) {
FinalRadiology.fromJson(Map<dynamic, dynamic> json) {
try {
setupID = json['SetupID'];
projectID = json['ProjectID'];
@ -95,17 +97,18 @@ class FinalRadiology {
doctorID = json['DoctorID'];
clinicID = json['ClinicID'];
orderDate = DateUtils.convertStringToDate(json['OrderDate']);
reportDate = DateUtils.convertStringToDate(json['ReportDate']);
reportData = json['ReportData'];
imageURL = json['ImageURL'];
procedureID = json['ProcedureID'];
appointmentNo = json['AppointmentNo'];
appodynamicmentNo = json['AppodynamicmentNo'];
dIAPacsURL = json['DIAPacsURL'];
isRead = json['IsRead'];
readOn = json['ReadOn'];
admissionNo = json['AdmissionNo'];
isInOutPatient = json['IsInOutPatient'];
actualDoctorRate = json['ActualDoctorRate'];
clinicDescription = json['ClinicDescription'];
clinicDescription = json['ClinicDescription']?? json['ClinicName'];
dIAPACSURL = json['DIA_PACS_URL'];
doctorImageURL = json['DoctorImageURL'];
doctorName = json['DoctorName'];
@ -122,20 +125,21 @@ class FinalRadiology {
orderNo = json['OrderNo'];
projectName = json['ProjectName'];
qR = json['QR'];
isLiveCareAppointment = json['IsLiveCareAppointment'];
isLiveCareAppodynamicment = json['IsLiveCareAppointment'];
reportDataHTML = json['ReportDataHTML'];
reportDataTextString = json['ReportDataTextString'];
// speciality = json['Speciality'].cast<String>();
reportDataTextdynamic = json['ReportDataTextdynamic'];
// speciality = json['Speciality'].cast<dynamic>();
isCVI = json['isCVI'];
isRadMedicalReport = json['isRadMedicalReport'];
} catch (e) {
print(e);
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
Map<dynamic, dynamic> toJson() {
final Map<dynamic, dynamic> data = new Map<dynamic, dynamic>();
data['SetupID'] = this.setupID;
data['ProjectID'] = this.projectID;
data['PatientID'] = this.patientID;
@ -147,7 +151,7 @@ class FinalRadiology {
data['ReportData'] = this.reportData;
data['ImageURL'] = this.imageURL;
data['ProcedureID'] = this.procedureID;
data['AppointmentNo'] = this.appointmentNo;
data['AppodynamicmentNo'] = this.appodynamicmentNo;
data['DIAPacsURL'] = this.dIAPacsURL;
data['IsRead'] = this.isRead;
data['ReadOn'] = this.readOn;
@ -172,7 +176,7 @@ class FinalRadiology {
data['ProjectName'] = this.projectName;
data['QR'] = this.qR;
data['ReportDataHTML'] = this.reportDataHTML;
data['ReportDataTextString'] = this.reportDataTextString;
data['ReportDataTextdynamic'] = this.reportDataTextdynamic;
data['Speciality'] = this.speciality;
data['isCVI'] = this.isCVI;
data['isRadMedicalReport'] = this.isRadMedicalReport;
@ -181,7 +185,7 @@ class FinalRadiology {
}
class FinalRadiologyList {
String filterName = "";
dynamic filterName = "";
List<FinalRadiology> finalRadiologyList = List();
FinalRadiologyList({this.filterName, FinalRadiology finalRadiology}) {

@ -0,0 +1,156 @@
import 'package:doctor_app_flutter/widgets/shared/StarRating.dart';
class SickLeavePatientModel {
String setupID;
int projectID;
int patientID;
int patientType;
int clinicID;
int doctorID;
int requestNo;
String requestDate;
int sickLeaveDays;
int appointmentNo;
int admissionNo;
int actualDoctorRate;
String appointmentDate;
String clinicName;
String doctorImageURL;
String doctorName;
int doctorRate;
String doctorTitle;
int gender;
String genderDescription;
bool isActiveDoctorProfile;
bool isDoctorAllowVedioCall;
bool isExecludeDoctor;
bool isInOutPatient;
String isInOutPatientDescription;
String isInOutPatientDescriptionN;
bool isLiveCareAppointment;
int noOfPatientsRate;
dynamic patientName;
String projectName;
String qR;
// List<String> speciality;
String strRequestDate;
String startDate;
String endDate;
SickLeavePatientModel(
{this.setupID,
this.projectID,
this.patientID,
this.patientType,
this.clinicID,
this.doctorID,
this.requestNo,
this.requestDate,
this.sickLeaveDays,
this.appointmentNo,
this.admissionNo,
this.actualDoctorRate,
this.appointmentDate,
this.clinicName,
this.doctorImageURL,
this.doctorName,
this.doctorRate,
this.doctorTitle,
this.gender,
this.genderDescription,
this.isActiveDoctorProfile,
this.isDoctorAllowVedioCall,
this.isExecludeDoctor,
this.isInOutPatient,
this.isInOutPatientDescription,
this.isInOutPatientDescriptionN,
this.isLiveCareAppointment,
this.noOfPatientsRate,
this.patientName,
this.projectName,
this.qR,
// this.speciality,
this.strRequestDate,
this.startDate,
this.endDate});
SickLeavePatientModel.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID'];
projectID = json['ProjectID'];
patientID = json['PatientID'];
patientType = json['PatientType'];
clinicID = json['ClinicID'];
doctorID = json['DoctorID'];
requestNo = json['RequestNo'];
requestDate = json['RequestDate'];
sickLeaveDays = json['SickLeaveDays'];
appointmentNo = json['AppointmentNo'];
admissionNo = json['AdmissionNo'];
actualDoctorRate = json['ActualDoctorRate'];
appointmentDate = json['AppointmentDate'];
clinicName = json['ClinicName'];
doctorImageURL = json['DoctorImageURL'];
doctorName = json['DoctorName'];
doctorRate = json['DoctorRate'];
doctorTitle = json['DoctorTitle'];
gender = json['Gender'];
genderDescription = json['GenderDescription'];
isActiveDoctorProfile = json['IsActiveDoctorProfile'];
isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall'];
isExecludeDoctor = json['IsExecludeDoctor'];
isInOutPatient = json['IsInOutPatient'];
isInOutPatientDescription = json['IsInOutPatientDescription'];
isInOutPatientDescriptionN = json['IsInOutPatientDescriptionN'];
isLiveCareAppointment = json['IsLiveCareAppointment'];
noOfPatientsRate = json['NoOfPatientsRate'];
patientName = json['PatientName'];
projectName = json['ProjectName'];
qR = json['QR'];
// speciality = json['Speciality'].cast<String>();
strRequestDate = json['StrRequestDate'];
startDate = json['StartDate'];
endDate = json['EndDate'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['SetupID'] = this.setupID;
data['ProjectID'] = this.projectID;
data['PatientID'] = this.patientID;
data['PatientType'] = this.patientType;
data['ClinicID'] = this.clinicID;
data['DoctorID'] = this.doctorID;
data['RequestNo'] = this.requestNo;
data['RequestDate'] = this.requestDate;
data['SickLeaveDays'] = this.sickLeaveDays;
data['AppointmentNo'] = this.appointmentNo;
data['AdmissionNo'] = this.admissionNo;
data['ActualDoctorRate'] = this.actualDoctorRate;
data['AppointmentDate'] = this.appointmentDate;
data['ClinicName'] = this.clinicName;
data['DoctorImageURL'] = this.doctorImageURL;
data['DoctorName'] = this.doctorName;
data['DoctorRate'] = this.doctorRate;
data['DoctorTitle'] = this.doctorTitle;
data['Gender'] = this.gender;
data['GenderDescription'] = this.genderDescription;
data['IsActiveDoctorProfile'] = this.isActiveDoctorProfile;
data['IsDoctorAllowVedioCall'] = this.isDoctorAllowVedioCall;
data['IsExecludeDoctor'] = this.isExecludeDoctor;
data['IsInOutPatient'] = this.isInOutPatient;
data['IsInOutPatientDescription'] = this.isInOutPatientDescription;
data['IsInOutPatientDescriptionN'] = this.isInOutPatientDescriptionN;
data['IsLiveCareAppointment'] = this.isLiveCareAppointment;
data['NoOfPatientsRate'] = this.noOfPatientsRate;
data['PatientName'] = this.patientName;
data['ProjectName'] = this.projectName;
data['QR'] = this.qR;
// data['Speciality'] = this.speciality;
data['StrRequestDate'] = this.strRequestDate;
data['StartDate'] = this.startDate;
data['EndDate'] = this.endDate;
return data;
}
}

@ -0,0 +1,60 @@
class SickLeavePatientRequestModel {
double versionID;
int channel;
int languageID;
String iPAdress;
String generalid;
int patientOutSA;
int deviceTypeID;
int patientType;
int patientTypeID;
String tokenID;
int patientID;
String sessionID;
SickLeavePatientRequestModel(
{this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.deviceTypeID,
this.patientType,
this.patientTypeID,
this.tokenID,
this.patientID,
this.sessionID});
SickLeavePatientRequestModel.fromJson(Map<String, dynamic> json) {
versionID = json['VersionID'];
channel = json['Channel'];
languageID = json['LanguageID'];
iPAdress = json['IPAdress'];
generalid = json['generalid'];
patientOutSA = json['PatientOutSA'];
deviceTypeID = json['DeviceTypeID'];
patientType = json['PatientType'];
patientTypeID = json['PatientTypeID'];
tokenID = json['TokenID'];
patientID = json['PatientID'];
sessionID = json['SessionID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['LanguageID'] = this.languageID;
data['IPAdress'] = this.iPAdress;
data['generalid'] = this.generalid;
data['PatientOutSA'] = this.patientOutSA;
data['DeviceTypeID'] = this.deviceTypeID;
data['PatientType'] = this.patientType;
data['PatientTypeID'] = this.patientTypeID;
data['TokenID'] = this.tokenID;
data['PatientID'] = this.patientID;
data['SessionID'] = this.sessionID;
return data;
}
}

@ -0,0 +1,25 @@
import 'dart:async';
class RobotProvider {
static final RobotProvider _singleton = RobotProvider._internal();
var value;
StreamController<Map> controller = StreamController<Map>.broadcast();
getData() {
// return data;
}
intStream() {
controller.add({});
}
setValue(Map data) {
value = data;
controller.add(value);
}
factory RobotProvider() {
return _singleton;
}
RobotProvider._internal();
}

@ -0,0 +1,76 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/DischargeReferralPatient.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
class DischargedPatientService extends BaseService {
List<PatiantInformtion> myDischargedPatients = List();
List<DischargeReferralPatient> myDischargeReferralPatients = List();
Future getDischargedPatient() async {
hasError = false;
Map<String, dynamic> body = Map();
await getDoctorProfile(isGetProfile: true);
body['DoctorID'] = doctorProfile.doctorID;
body['FirstName'] = "0";
body['MiddleName'] = "0";
body['LastName'] = "0";
body['PatientMobileNumber'] = "0";
body['PatientIdentificationID'] = "0";
body['PatientID'] = 0;
body['From'] = "0";
body['To'] = "0";
body['stamp'] = DateTime.now().toIso8601String();
body['IsLoginForDoctorApp'] = true;
body['IPAdress'] = "11.11.11.11";
body['PatientOutSA'] = false;
body['PatientTypeID'] = 1;
hasError = false;
myDischargedPatients.clear();
await baseAppClient.post(GET_DISCHARGE_PATIENT,
onSuccess: (dynamic response, int statusCode) {
if (response['List_MyDischargePatient'] != null) {
response['List_MyDischargePatient'].forEach((v) {
myDischargedPatients.add(PatiantInformtion.fromJson(v));
});
}
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
Future gtMyDischargeReferralPatient() async {
hasError = false;
Map<String, dynamic> body = Map();
await getDoctorProfile();
body['DoctorID'] = doctorProfile.doctorID;
body['FirstName'] = "0";
body['MiddleName'] = "0";
body['LastName'] = "0";
body['PatientMobileNumber'] = "0";
body['PatientIdentificationID'] = "0";
body['PatientID'] = 0;
body['From'] = "0";
body['To'] = "0";
body['stamp'] = DateTime.now().toIso8601String();
body['IsLoginForDoctorApp'] = true;
body['IPAdress'] = "11.11.11.11";
body['PatientOutSA'] = false;
body['PatientTypeID'] = 1;
hasError = false;
myDischargeReferralPatients.clear();
await baseAppClient.post(GET_MY_DISCHARGE_PATIENT,
onSuccess: (dynamic response, int statusCode) {
if (response['List_MyDischargeReferralPatient'] != null) {
response['List_MyDischargeReferralPatient'].forEach((v) {
myDischargeReferralPatients.add(DischargeReferralPatient.fromJson(v));
});
}
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
}

@ -1,5 +1,7 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/insurance_approval_request_model.dart';
import 'package:doctor_app_flutter/core/model/insurance_approval.dart';
import 'package:doctor_app_flutter/core/model/insurance_approval_in_patient_model.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
@ -10,27 +12,55 @@ class InsuranceCardService extends BaseService {
patientType: 1,
eXuldAPPNO: 0,
projectID: 0);
InsuranceApprovalInPatientRequestModel
_insuranceApprovalInPatientRequestModel =
InsuranceApprovalInPatientRequestModel();
List<InsuranceApprovalModel> _insuranceApproval = List();
List<InsuranceApprovalModel> get insuranceApproval => _insuranceApproval;
Future getInsuranceApproval(PatiantInformtion patient,{int appointmentNo , int projectId}) async {
List<InsuranceApprovalInPatientModel> _insuranceApprovalInPatient = List();
List<InsuranceApprovalInPatientModel> get insuranceApprovalInPatient =>
_insuranceApprovalInPatient;
Future getInsuranceApprovalInPatient({int mrn}) async {
_insuranceApprovalInPatientRequestModel =
InsuranceApprovalInPatientRequestModel(
patientID: mrn,
patientTypeID: 1,
);
hasError = false;
insuranceApprovalInPatient.clear();
await baseAppClient.post(GET_INSURANCE_IN_PATIENT,
onSuccess: (dynamic response, int statusCode) {
//prescriptionsList.clear();
response['List_ApprovalMain_InPatient'].forEach((prescriptions) {
insuranceApprovalInPatient
.add(InsuranceApprovalInPatientModel.fromJson(prescriptions));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _insuranceApprovalInPatientRequestModel.toJson());
}
Future getInsuranceApproval(PatiantInformtion patient,
{int appointmentNo, int projectId}) async {
hasError = false;
// _cardList.clear();
// if (appointmentNo != null) {
// _insuranceApprovalModel.appointmentNo = appointmentNo;
// _insuranceApprovalModel.eXuldAPPNO = null;
// if (appointmentNo != null) {
// _insuranceApprovalModel.appointmentNo = appointmentNo;
// _insuranceApprovalModel.eXuldAPPNO = null;
// _insuranceApprovalModel.projectID = projectId;
// } else {
_insuranceApprovalModel.appointmentNo = null;
_insuranceApprovalModel.eXuldAPPNO = 0;
_insuranceApprovalModel.projectID = 0;
// }
// } else {
_insuranceApprovalModel.appointmentNo = null;
_insuranceApprovalModel.eXuldAPPNO = 0;
_insuranceApprovalModel.projectID = 0;
// }
await baseAppClient.postPatient(GET_PAtIENTS_INSURANCE_APPROVALS,
patient: patient,
onSuccess: (dynamic response, int statusCode) {
patient: patient, onSuccess: (dynamic response, int statusCode) {
print(response['HIS_Approval_List'].length);
_insuranceApproval.clear();
_insuranceApproval.length = 0;

@ -0,0 +1,68 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/MyReferralPatientModel.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/models/doctor/request_add_referred_doctor_remarks.dart';
class MyReferralInPatientService extends BaseService {
List<MyReferralPatientModel> myReferralPatients = List();
Future getMyReferralPatientService() async {
hasError = false;
Map<String, dynamic> body = Map();
await getDoctorProfile();
body['DoctorID'] = doctorProfile.doctorID;
body['FirstName'] = "0";
body['MiddleName'] = "0";
body['LastName'] = "0";
body['PatientMobileNumber'] = "0";
body['PatientIdentificationID'] = "0";
body['PatientID'] = 0;
body['From'] = "0";
body['To'] = "0";
body['stamp'] = DateTime.now().toIso8601String();
body['IsLoginForDoctorApp'] = true;
body['IPAdress'] = "11.11.11.11";
body['PatientOutSA'] = false;
body['PatientTypeID'] = 1;
myReferralPatients.clear();
await baseAppClient.post(
GET_MY_REFERRAL_INPATIENT,
onSuccess: (dynamic response, int statusCode) {
if (response['List_MyReferralPatient'] != null) {
response['List_MyReferralPatient'].forEach((v) {
myReferralPatients.add(MyReferralPatientModel.fromJson(v));
});
}
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
},
body: body,
);
}
Future replay(String referredDoctorRemarks, MyReferralPatientModel referral) async {
hasError = false;
await getDoctorProfile();
RequestAddReferredDoctorRemarks _requestAddReferredDoctorRemarks = RequestAddReferredDoctorRemarks();
_requestAddReferredDoctorRemarks.projectID = referral.projectID;
_requestAddReferredDoctorRemarks.admissionNo = referral.admissionNo.toString();
_requestAddReferredDoctorRemarks.lineItemNo = referral.lineItemNo;
_requestAddReferredDoctorRemarks.referredDoctorRemarks = referredDoctorRemarks;
_requestAddReferredDoctorRemarks.editedBy = doctorProfile.doctorID;
_requestAddReferredDoctorRemarks.patientID = referral.patientID;
_requestAddReferredDoctorRemarks.referringDoctor = referral.referringDoctor;
await baseAppClient.post(
ADD_REFERRED_DOCTOR_REMARKS,
body: _requestAddReferredDoctorRemarks.toJson(),
onSuccess: (dynamic body, int statusCode) {
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
},
);
}
}

@ -0,0 +1,46 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/ReferralRequest.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
class ReferralService extends BaseService {
Future referralPatient(
{int admissionNo,
String roomID,
int referralClinic,
int referralDoctor,
int patientID,
int patientTypeID,
int priority,
int frequency,
String referringDoctorRemarks,
String extension}) async {
await getDoctorProfile();
ReferralRequest referralRequest = ReferralRequest();
referralRequest.admissionNo = admissionNo;
referralRequest.roomID = roomID;
referralRequest.referralClinic = referralClinic.toString();
referralRequest.referralDoctor = referralDoctor.toString();
referralRequest.patientID = patientID;
referralRequest.patientTypeID = patientTypeID;
referralRequest.priority = priority.toString();
referralRequest.frequency = frequency.toString();
referralRequest.referringDoctorRemarks = referringDoctorRemarks;
referralRequest.referringClinic = doctorProfile.clinicID;
referralRequest.referringDoctor = doctorProfile.doctorID;
referralRequest.extension = extension;
referralRequest.editedBy = doctorProfile.doctorID;
referralRequest.createdBy = doctorProfile.doctorID;
referralRequest.patientOutSA = false;
await baseAppClient.post(
REFER_TO_DOCTOR,
onSuccess: (dynamic response, int statusCode) {},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
},
body: referralRequest.toJson(),
);
}
}

@ -1,12 +1,13 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/imei_details.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/models/dashboard/dashboard_model.dart';
import 'package:doctor_app_flutter/models/doctor/user_model.dart';
class AuthService extends BaseService {
List<GetIMEIDetailsModel> _imeiDetails = [];
List<GetIMEIDetailsModel> get dashboardItemsList => _imeiDetails;
Map<String, dynamic> _loginInfo = {};
Map<String, dynamic> get loginInfo => _loginInfo;
Future selectDeviceImei(imei) async {
try {
// dynamic localRes;
@ -26,4 +27,36 @@ class AuthService extends BaseService {
super.error = error;
}
}
Future login(UserModel userInfo) async {
hasError = false;
_loginInfo = {};
try {
await baseAppClient.post(LOGIN_URL,
onSuccess: (dynamic response, int statusCode) {
_loginInfo = response;
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: userInfo.toJson());
} catch (error) {
hasError = true;
super.error = error;
}
// await baseAppClient.post(SELECT_DEVICE_IMEI,
// onSuccess: (dynamic response, int statusCode) {
// _imeiDetails = [];
// response['List_DoctorDeviceDetails'].forEach((v) {
// _imeiDetails.add(GetIMEIDetailsModel.fromJson(v));
// });
// }, onFailure: (String error, int statusCode) {
// hasError = true;
// super.error = error;
// }, body: {});
// } catch (error) {
// hasError = true;
// super.error = error;
// }
}
}

@ -1,10 +1,9 @@
import 'package:doctor_app_flutter/client/base_app_client.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/models/patient/PatientArrivalEntity.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
class BaseService {
String error;
@ -16,7 +15,17 @@ class BaseService {
List<PatiantInformtion> patientArrivalList = [];
//TODO add the user login model when we need it
Future<DoctorProfileModel> getDoctorProfile() async {
Future<DoctorProfileModel> getDoctorProfile({bool isGetProfile = false}) async {
if(isGetProfile)
{
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
if (profile != null) {
doctorProfile = DoctorProfileModel.fromJson(profile);
if (doctorProfile != null) {
return doctorProfile;
}
}
}
if (doctorProfile == null) {
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
if (profile != null) {

@ -2,7 +2,6 @@ import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/models/SOAP/GetAssessmentResModel.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:flutter/cupertino.dart';
import 'base_service.dart';

@ -1,5 +1,4 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/hospitals_model.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/models/doctor/list_gt_my_patients_question_model.dart';
import 'package:doctor_app_flutter/models/doctor/request_add_referred_doctor_remarks.dart';

@ -12,16 +12,34 @@ import 'base/base_service.dart';
class LabsService extends BaseService {
List<PatientLabOrders> patientLabOrdersList = List();
Future getPatientLabOrdersList(PatiantInformtion patient) async {
Future getPatientLabOrdersList(
PatiantInformtion patient, bool isInpatient) async {
hasError = false;
Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false;
await baseAppClient.postPatient(GET_Patient_LAB_ORDERS, patient: patient,
String url = "";
if (isInpatient) {
await getDoctorProfile();
body['ProjectID'] = doctorProfile.projectID;
url = GET_PATIENT_LAB_OREDERS;
} else {
body['isDentalAllowedBackend'] = false;
url = GET_Patient_LAB_ORDERS;
}
patientLabOrdersList=[];
patientLabOrdersList.clear();
await baseAppClient.postPatient(url, patient: patient,
onSuccess: (dynamic response, int statusCode) {
patientLabOrdersList.clear();
response['ListPLO'].forEach((hospital) {
patientLabOrdersList.add(PatientLabOrders.fromJson(hospital));
});
patientLabOrdersList=[];
if (!isInpatient) {
response['ListPLO'].forEach((hospital) {
patientLabOrdersList.add(PatientLabOrders.fromJson(hospital));
});
var asd="";
} else {
response['List_GetLabOreders'].forEach((hospital) {
patientLabOrdersList.add(PatientLabOrders.fromJson(hospital));
});
}
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
@ -40,43 +58,65 @@ class LabsService extends BaseService {
int clinicID,
String invoiceNo,
String orderNo,
PatiantInformtion patient}) async {
PatiantInformtion patient,
bool isInpatient = false}) async {
hasError = false;
Map<String, dynamic> body = Map();
_requestPatientLabSpecialResult.projectID = projectID;
_requestPatientLabSpecialResult.clinicID = clinicID;
_requestPatientLabSpecialResult.invoiceNo = invoiceNo;
_requestPatientLabSpecialResult.orderNo = orderNo;
body = _requestPatientLabSpecialResult.toJson();
await baseAppClient.postPatient(GET_Patient_LAB_SPECIAL_RESULT,
patient: patient,
await baseAppClient.postPatient(GET_Patient_LAB_SPECIAL_RESULT, patient: patient,
onSuccess: (dynamic response, int statusCode) {
patientLabSpecialResult.clear();
response['ListPLSR'].forEach((hospital) {
patientLabSpecialResult.add(PatientLabSpecialResult.fromJson(hospital));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _requestPatientLabSpecialResult.toJson());
}, body: body);
}
Future getPatientLabResult({PatientLabOrders patientLabOrder,PatiantInformtion patient}) async {
Future getPatientLabResult(
{PatientLabOrders patientLabOrder, PatiantInformtion patient, bool isInpatient}) async {
hasError = false;
String url = "";
if (isInpatient) {
url = GET_PATIENT_LAB_RESULTS;
} else {
url = GET_Patient_LAB_RESULT;
}
Map<String, dynamic> body = Map();
body['InvoiceNo'] = patientLabOrder.invoiceNo;
body['OrderNo'] = patientLabOrder.orderNo;
body['isDentalAllowedBackend'] = false;
body['SetupID'] = patientLabOrder.setupID;
body['ProjectID'] = patientLabOrder.projectID;
body['ClinicID'] = patientLabOrder.clinicID;
await baseAppClient.postPatient(GET_Patient_LAB_RESULT,
patient: patient,
body['ClinicID'] = patientLabOrder.clinicID ?? 0;
await baseAppClient.postPatient(url, patient: patient,
onSuccess: (dynamic response, int statusCode) {
patientLabSpecialResult.clear();
labResultList.clear();
response['ListPLR'].forEach((lab) {
labResultList.add(LabResult.fromJson(lab));
});
if(isInpatient){
response['List_GetLabNormal'].forEach((hospital) {
labResultList.add(LabResult.fromJson(hospital));
});
}else {
response['ListPLR'].forEach((lab) {
labResultList.add(LabResult.fromJson(lab));
});
}
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
@ -84,19 +124,22 @@ class LabsService extends BaseService {
}
Future getPatientLabOrdersResults(
{PatientLabOrders patientLabOrder, String procedure,PatiantInformtion patient}) async {
{PatientLabOrders patientLabOrder,
String procedure,
PatiantInformtion patient}) async {
hasError = false;
Map<String, dynamic> body = Map();
body['InvoiceNo'] = patientLabOrder.invoiceNo;
body['OrderNo'] = patientLabOrder.orderNo;
if (patientLabOrder != null) {
body['InvoiceNo'] = patientLabOrder.invoiceNo;
body['OrderNo'] = patientLabOrder.orderNo;
body['SetupID'] = patientLabOrder.setupID;
body['ProjectID'] = patientLabOrder.projectID;
body['ClinicID'] = patientLabOrder.clinicID ?? 0;
}
body['isDentalAllowedBackend'] = false;
body['SetupID'] = patientLabOrder.setupID;
body['ProjectID'] = patientLabOrder.projectID;
body['ClinicID'] = patientLabOrder.clinicID;
body['Procedure'] = procedure;
await baseAppClient.postPatient(GET_Patient_LAB_ORDERS_RESULT,
patient: patient,
onSuccess: (dynamic response, int statusCode) {
patient: patient, onSuccess: (dynamic response, int statusCode) {
labOrdersResultsList.clear();
response['ListPLR'].forEach((lab) {
labOrdersResultsList.add(LabOrderResult.fromJson(lab));

@ -1,7 +1,6 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/medical_file_model.dart';
import 'package:doctor_app_flutter/core/model/medical_file_request_model.dart';
import 'package:doctor_app_flutter/core/model/prescription_req_model.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
class MedicalFileService extends BaseService {

@ -1,8 +1,6 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/models/SOAP/GetAssessmentReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/GetAssessmentResModel.dart';
import 'package:doctor_app_flutter/models/doctor/request_schedule.dart';
import 'package:doctor_app_flutter/models/pharmacies/pharmacies_List_request_model.dart';
import 'package:doctor_app_flutter/models/pharmacies/pharmacies_items_request_model.dart';

@ -1,8 +1,6 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/admissionRequest/admission-request.dart';
import 'package:doctor_app_flutter/core/model/admissionRequest/ward-model.dart';
import 'package:doctor_app_flutter/core/service/base/lookup-service.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
class AdmissionRequestService extends LookupService {
List<dynamic> clinicList = [];

@ -1,8 +1,6 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/lookups/hospital_lookup.dart';
import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/models/patient/PatientArrivalEntity.dart';
import 'package:doctor_app_flutter/models/patient/get_clinic_by_project_id_request.dart';
import 'package:doctor_app_flutter/models/patient/get_doctor_by_clinic_id_request.dart';
import 'package:doctor_app_flutter/models/patient/my_referral/PendingReferral.dart';
@ -22,6 +20,8 @@ class PatientReferralService extends LookupService {
List<PendingReferral> patientReferralList = [];
String setupID = "0";
var frequencyList = [];
Future getProjectsList() async {
hasError = false;
const url = GET_PROJECTS;
@ -191,7 +191,7 @@ class PatientReferralService extends LookupService {
Future getPatientReferral(PatiantInformtion patient) async {
hasError = false;
Map<String, dynamic> body = Map();
body['PatientMRN'] = patient.patientMRN;
body['PatientMRN'] = patient.patientMRN ?? patient.patientId;
body['AppointmentNo'] = patient.appointmentNo;
await baseAppClient.post(
@ -258,7 +258,7 @@ class PatientReferralService extends LookupService {
.add({"goalId": element.id, "remarks": element.remarks});
});
body['PatientMRN'] = patient.patientMRN;
body['PatientMRN'] = patient.patientMRN ?? patient.patientId;
body['AppointmentNo'] = patient.appointmentNo;
body['SetupID'] = setupID;
body['appointmentDate'] = isoStringDate;
@ -284,4 +284,45 @@ class PatientReferralService extends LookupService {
body: body,
);
}
Future getReferralFrequencyList() async {
hasError = false;
Map<String, dynamic> body = Map();
await baseAppClient.post(
PATIENT_GET_LIST_REFERAL_URL,
onSuccess: (dynamic response, int statusCode) {
frequencyList = [];
frequencyList = response['list_STPReferralFrequency'];
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
},
body: body,
);
}
Future verifyReferralDoctorRemarks(MyReferredPatientModel referredPatient) async {
hasError = false;
Map<String, dynamic> body = Map();
body['ProjectID'] = referredPatient.projectID;
body['AdmissionNo'] = referredPatient.admissionNo;
body['LineItemNo'] = referredPatient.lineItemNo;
await baseAppClient.post(
Verify_Referral_Doctor_Remarks,
onSuccess: (dynamic response, int statusCode) {
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
},
body: body,
);
}
}

@ -1,18 +1,16 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/prescription_model.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/core/service/base/lookup-service.dart';
import 'package:doctor_app_flutter/models/SOAP/ChiefComplaint/GetChiefComplaintReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/ChiefComplaint/GetChiefComplaintResModel.dart';
import 'package:doctor_app_flutter/models/SOAP/GetAssessmentResModel.dart';
import 'package:doctor_app_flutter/models/SOAP/order-procedure.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart';
class UcafService extends LookupService {
List<GetChiefComplaintResModel> patientChiefComplaintList = [];
VitalSignData patientVitalSigns;
List<VitalSignHistory> patientVitalSignsHistory = [];
List<GetAssessmentResModel> patientAssessmentList = [];
List<OrderProcedure> orderProcedureList = [];
PrescriptionModel prescriptionList;
@ -38,21 +36,57 @@ class UcafService extends LookupService {
}, body: body);
}
Future getPatientVitalSign(PatiantInformtion patient) async {
patientVitalSigns = null;
Future getInPatientVitalSignHistory(PatiantInformtion patient, bool isInPatient) async {
hasError = false;
Map<String, dynamic> body = Map();
body['PatientMRN'] = patient.patientMRN;
body['AppointmentNo'] = patient.appointmentNo;
body['PatientID'] = patient.patientId;
body['PatientTypeID'] = 1;
if(isInPatient){
body['InOutPatientType'] = 1;
}else {
body['InOutPatientType'] = 2;
}
await baseAppClient.post(
GET_PATIENT_VITAL_SIGN,
onSuccess: (dynamic response, int statusCode) {
patientVitalSignsHistory.clear();
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();
},
body: body,
);
}
Future getPatientVitalSignsHistory(
PatiantInformtion patient, String fromDate, String toDate) async {
hasError = false;
Map<String, dynamic> body = Map();
body['PatientMRN'] = patient.patientId; // patient.patientMRN
// body['AppointmentNo'] = patient.appointmentNo;
// body['EpisodeID'] = patient.episodeNo;
body['PatientTypeID'] = 1;
body['PatientType'] = 1;
body['DeviceTypeID'] = 1;
body['isDentalAllowedBackend'] = false;
body['From'] = fromDate;
body['To'] = toDate;
await baseAppClient.post(
GET_PATIENT_VITAL_SIGN_DATA,
onSuccess: (dynamic response, int statusCode) {
if(response['VitalSignsList'] != null){
if(response['VitalSignsList']['entityList'] != null && (response['VitalSignsList']['entityList'] as List).length > 0){
patientVitalSigns = VitalSignData.fromJson(response['VitalSignsList']['entityList'][0]);
}
patientVitalSignsHistory.clear();
if (response['VitalSignsHistory'] != null) {
response['VitalSignsHistory'].forEach((v) {
patientVitalSignsHistory.add(new VitalSignHistory.fromJson(v));
});
}
},
onFailure: (String error, int statusCode) {

@ -1,10 +1,8 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/models/patient/PatientArrivalEntity.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/vital_sign_res_model.dart';
class VitalSignsService extends BaseService {
VitalSignData patientVitalSigns;
@ -41,31 +39,67 @@ class VitalSignsService extends BaseService {
patientVitalSigns = null;
hasError = false;
Map<String, dynamic> body = Map();
body['PatientMRN'] = patient.patientId; // patient.patientMRN
// body['AppointmentNo'] = patient.appointmentNo;
// body['EpisodeID'] = patient.episodeNo;
body['PatientID'] = patient.patientId; // patient.patientMRN
body['InOutPatientType'] = 1;
body['PatientTypeID'] = 1;
body['PatientType'] = 1;
body['DeviceTypeID'] = 1;
body['isDentalAllowedBackend'] = false;
body['From'] = fromDate;
body['To'] = toDate;
body['ProjectID'] = patient.projectId;
// body['From'] = fromDate;
// body['To'] = toDate;
if (patient.appointmentNo != null && patient.projectId != null) {
body['TransNo'] = patient.appointmentNo;
body['ProjectID'] = patient.projectId;
}
await baseAppClient.post(
GET_PATIENT_VITAL_SIGN_DATA,
GET_PATIENT_VITAL_SIGN,
onSuccess: (dynamic response, int statusCode) {
patientVitalSignsHistory.clear();
if (response['VitalSignsHistory'] != null) {
response['VitalSignsHistory'].forEach((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();
},
body: body,
);
}
Future getOutPatientVitalSignHistory(PatiantInformtion patient, String fromDate, String toDate) async {
hasError = false;
Map<String, dynamic> body = Map();
body['PatientID'] = patient.patientId;
body['PatientTypeID'] = patient.patientType;
// if(isInPatient){
body['InOutPatientType'] = 0;
body['isDentalAllowedBackend'] = false;
body['IPAdress'] = "10.20.10.20";
// }else {
// body['InOutPatientType'] = 2;
// }
await baseAppClient.postPatient(
GET_PATIENT_VITAL_SIGN,
onSuccess: (dynamic response, int statusCode) {
patientVitalSignsHistory.clear();
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();
},
body: body,
patient: patient
);
}
}

@ -0,0 +1,45 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
class OutPatientService extends BaseService {
List<PatiantInformtion> _patientList = [];
List<PatiantInformtion> get patientList => _patientList;
Future getOutPatient(PatientSearchRequestModel patientSearchRequestModel) async {
hasError = false;
await baseAppClient.post(
GET_MY_OUT_PATIENT,
onSuccess: (dynamic response, int statusCode) {
_patientList.clear();
response['List_MyOutPatient'].forEach((v) {
_patientList.add(PatiantInformtion.fromJson(v));
});
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
},
body: patientSearchRequestModel.toJson(),
);
}
Future getPatientFileInformation(PatientSearchRequestModel patientSearchRequestModel) async {
hasError = false;
await baseAppClient.post(
PRM_SEARCH_PATIENT,
onSuccess: (dynamic response, int statusCode) {
_patientList.clear();
response['GetPatientFileInformation_PRMList'].forEach((v) {
_patientList.add(PatiantInformtion.fromJson(v));
});
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
},
body: patientSearchRequestModel.toJson(),
);
}
}

@ -0,0 +1,36 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
class PatientInPatientService extends BaseService {
List<PatiantInformtion> inPatientList = List();
Future getInPatientList(
PatientSearchRequestModel requestModel, bool isMyInpatient) async {
hasError = false;
await getDoctorProfile();
if (isMyInpatient) {
requestModel.doctorID = doctorProfile.doctorID;
}else {
requestModel.doctorID = 0;
}
await baseAppClient.post(
GET_PATIENT_IN_PATIENT_LIST,
onSuccess: (dynamic response, int statusCode) {
inPatientList.clear();
response['List_MyInPatient'].forEach((v) {
inPatientList.add(PatiantInformtion.fromJson(v));
});
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
},
body: requestModel.toJson(),
);
}
}

@ -1,17 +1,17 @@
import 'package:doctor_app_flutter/client/base_app_client.dart';
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/core/model/note/CreateNoteModel.dart';
import 'package:doctor_app_flutter/core/model/note/note_model.dart';
import 'package:doctor_app_flutter/core/model/note/update_note_model.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/models/doctor/request_schedule.dart';
import 'package:doctor_app_flutter/models/patient/PatientArrivalEntity.dart';
import 'package:doctor_app_flutter/models/patient/get_clinic_by_project_id_request.dart';
import 'package:doctor_app_flutter/models/patient/get_doctor_by_clinic_id_request.dart';
import 'package:doctor_app_flutter/models/patient/get_list_stp_referral_frequency_request.dart';
import 'package:doctor_app_flutter/models/patient/lab_orders/lab_orders_res_model.dart';
import 'package:doctor_app_flutter/models/patient/lab_result/lab_result.dart';
import 'package:doctor_app_flutter/models/patient/lab_result/lab_result_req_model.dart';
import 'package:doctor_app_flutter/models/patient/patient_model.dart';
import 'package:doctor_app_flutter/models/patient/prescription/prescription_report.dart';
import 'package:doctor_app_flutter/models/patient/prescription/prescription_report_for_in_patient.dart';
import 'package:doctor_app_flutter/models/patient/prescription/prescription_res_model.dart';
@ -51,9 +51,9 @@ class PatientService extends BaseService {
List<LabResult> get labResultList => _labResultList;
// TODO: replace var with model
var _patientProgressNoteList = [];
List<NoteModel> _patientProgressNoteList = [];
get patientProgressNoteList => _patientProgressNoteList;
List<NoteModel> get patientProgressNoteList => _patientProgressNoteList;
// TODO: replace var with model
var _insuranceApporvalsList = [];
@ -138,42 +138,6 @@ class PatientService extends BaseService {
return Future.value(localRes);
}
Future getPatientVitalSign(patient) async {
hasError = false;
await baseAppClient.post(
GET_PATIENT_VITAL_SIGN,
onSuccess: (dynamic response, int statusCode) {
_patientVitalSignList = [];
response['List_DoctorPatientVitalSign'].forEach((v) {
_patientVitalSignList.add(new VitalSignResModel.fromJson(v));
});
if (_patientVitalSignList.length > 0) {
List<VitalSignResModel> patientVitalSignOrderdSubListTemp = [];
patientVitalSignOrderdSubListTemp = _patientVitalSignList;
patientVitalSignOrderdSubListTemp
.sort((VitalSignResModel a, VitalSignResModel b) {
return b.vitalSignDate.microsecondsSinceEpoch -
a.vitalSignDate.microsecondsSinceEpoch;
});
patientVitalSignOrderdSubList.clear();
int length = patientVitalSignOrderdSubListTemp.length >= 20
? 20
: patientVitalSignOrderdSubListTemp.length;
for (int x = 0; x < length; x++) {
patientVitalSignOrderdSubList
.add(patientVitalSignOrderdSubListTemp[x]);
}
}
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
},
body: patient,
);
}
Future getLabResultOrders(patient) async {
hasError = false;
await baseAppClient.post(
@ -313,7 +277,10 @@ class PatientService extends BaseService {
PATIENT_PROGRESS_NOTE_URL,
onSuccess: (dynamic response, int statusCode) {
_patientProgressNoteList = [];
_patientProgressNoteList = response['List_GetPregressNoteForInPatient'];
// _patientProgressNoteList =
response['List_GetPregressNoteForInPatient'].forEach((v) {
_patientProgressNoteList.add(new NoteModel.fromJson(v));
});
},
onFailure: (String error, int statusCode) {
hasError = true;
@ -323,6 +290,38 @@ class PatientService extends BaseService {
);
}
Future updatePatientProgressNote(UpdateNoteReqModel req) async {
hasError = false;
await baseAppClient.post(
UPDATE_PROGRESS_NOTE_FOR_INPATIENT,
onSuccess: (dynamic response, int statusCode) {
print("ok");
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
},
body: req.toJson(),
);
}
Future createPatientProgressNote(CreateNoteModel req) async {
hasError = false;
await baseAppClient.post(
CREATE_PROGRESS_NOTE_FOR_INPATIENT,
onSuccess: (dynamic response, int statusCode) {
print("ok");
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
},
body: req.toJson(),
);
}
Future getClinicsList() async {
hasError = false;

@ -3,17 +3,14 @@ import 'package:doctor_app_flutter/core/model/Prescription_model.dart';
import 'package:doctor_app_flutter/core/model/calculate_box_request_model.dart';
import 'package:doctor_app_flutter/core/model/get_medication_response_model.dart';
import 'package:doctor_app_flutter/core/model/item_by_medicine_request_model.dart';
import 'package:doctor_app_flutter/core/model/medical_file_model.dart';
import 'package:doctor_app_flutter/core/model/prescription_req_model.dart';
import 'package:doctor_app_flutter/core/model/post_prescrition_req_model.dart';
import 'package:doctor_app_flutter/core/model/prescription_req_model.dart';
import 'package:doctor_app_flutter/core/model/search_drug_model.dart';
import 'package:doctor_app_flutter/core/model/search_drug_request_model.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/core/service/base/lookup-service.dart';
import 'package:doctor_app_flutter/models/SOAP/GetAllergiesResModel.dart';
import 'package:doctor_app_flutter/models/SOAP/GetAssessmentReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/GetAssessmentResModel.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
@ -112,7 +109,7 @@ class PrescriptionService extends LookupService {
}, body: _drugRequestModel.toJson());
}
Future getMedicationList({String drug}) async {
Future getMedicationList({String drug =''}) async {
hasError = false;
_drugRequestModel.search = ["$drug"];
await baseAppClient.post(SEARCH_DRUG,

@ -1,6 +1,8 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/Prescriptions.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/in_patient_prescription_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/perscription_pharmacy.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_in_patient.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report_enh.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescriptions_order.dart';
@ -15,12 +17,37 @@ import 'base/base_service.dart';
class PrescriptionsService extends BaseService {
List<Prescriptions> prescriptionsList = List();
List<PrescriptionsOrder> prescriptionsOrderList = List();
List<PrescriotionInPatient> prescriptionInPatientList = List();
InPatientPrescriptionRequestModel _inPatientPrescriptionRequestModel =
InPatientPrescriptionRequestModel();
Future getPrescriptionInPatient({int mrn, String adn}) async {
_inPatientPrescriptionRequestModel = InPatientPrescriptionRequestModel(
patientMRN: mrn,
admissionNo: adn,
);
hasError = false;
prescriptionInPatientList.clear();
await baseAppClient.post(GET_PRESCRIPTION_IN_PATIENT,
onSuccess: (dynamic response, int statusCode) {
prescriptionsList.clear();
response['List_PrescriptionReportForInPatient'].forEach((prescriptions) {
prescriptionInPatientList
.add(PrescriotionInPatient.fromJson(prescriptions));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _inPatientPrescriptionRequestModel.toJson());
}
Future getPrescriptions(PatiantInformtion patient) async {
hasError = false;
Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false;
await baseAppClient.postPatient(PRESCRIPTIONS,patient: patient,
await baseAppClient.postPatient(PRESCRIPTIONS, patient: patient,
onSuccess: (dynamic response, int statusCode) {
prescriptionsList.clear();
response['PatientPrescriptionList'].forEach((prescriptions) {
@ -37,7 +64,9 @@ class PrescriptionsService extends BaseService {
appointmentNo: 0, isDentalAllowedBackend: false);
List<PrescriptionReport> prescriptionReportList = List();
Future getPrescriptionReport({Prescriptions prescriptions,@required PatiantInformtion patient}) async {
Future getPrescriptionReport(
{Prescriptions prescriptions,
@required PatiantInformtion patient}) async {
hasError = false;
_requestPrescriptionReport.dischargeNo = prescriptions.dischargeNo;
_requestPrescriptionReport.projectID = prescriptions.projectID;
@ -50,8 +79,7 @@ class PrescriptionsService extends BaseService {
prescriptions.isInOutPatient
? GET_PRESCRIPTION_REPORT_ENH
: GET_PRESCRIPTION_REPORT_NEW,
patient: patient,
onSuccess: (dynamic response, int statusCode) {
patient: patient, onSuccess: (dynamic response, int statusCode) {
prescriptionReportList.clear();
prescriptionReportEnhList.clear();
if (prescriptions.isInOutPatient) {
@ -82,11 +110,11 @@ class PrescriptionsService extends BaseService {
);
List<PharmacyPrescriptions> pharmacyPrescriptionsList = List();
Future getListPharmacyForPrescriptions({int itemId,@required PatiantInformtion patient}) async {
Future getListPharmacyForPrescriptions(
{int itemId, @required PatiantInformtion patient}) async {
hasError = false;
requestGetListPharmacyForPrescriptions.itemID = itemId;
await baseAppClient.postPatient(GET_PHARMACY_LIST,
patient: patient,
await baseAppClient.postPatient(GET_PHARMACY_LIST, patient: patient,
onSuccess: (dynamic response, int statusCode) {
pharmacyPrescriptionsList.clear();
response['PharmList'].forEach((prescriptions) {
@ -107,7 +135,8 @@ class PrescriptionsService extends BaseService {
List<PrescriptionReportEnh> prescriptionReportEnhList = List();
Future getPrescriptionReportEnh(
{PrescriptionsOrder prescriptionsOrder, @required PatiantInformtion patient}) async {
{PrescriptionsOrder prescriptionsOrder,
@required PatiantInformtion patient}) async {
///This logic copy from the old app from class [order-history.component.ts] in line 45
bool isInPatient = false;
prescriptionsList.forEach((element) {
@ -141,8 +170,7 @@ class PrescriptionsService extends BaseService {
await baseAppClient.postPatient(
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();
if (isInPatient) {
@ -163,20 +191,21 @@ class PrescriptionsService extends BaseService {
super.error = error;
}, body: _requestPrescriptionReportEnh.toJson());
}
Future getPrescriptionsOrders() async {
Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false;
await baseAppClient.post(GET_PRESCRIPTIONS_ALL_ORDERS,
onSuccess: (dynamic response, int statusCode) {
prescriptionsOrderList.clear();
response['PatientER_GetPatientAllPresOrdersList']
.forEach((prescriptionsOrder) {
prescriptionsOrderList
.add(PrescriptionsOrder.fromJson(prescriptionsOrder));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
prescriptionsOrderList.clear();
response['PatientER_GetPatientAllPresOrdersList']
.forEach((prescriptionsOrder) {
prescriptionsOrderList
.add(PrescriptionsOrder.fromJson(prescriptionsOrder));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
}

@ -2,7 +2,6 @@ import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/procedure/categories_procedure.dart';
import 'package:doctor_app_flutter/core/model/procedure/get_ordered_procedure_model.dart';
import 'package:doctor_app_flutter/core/model/procedure/get_ordered_procedure_request_model.dart';
import 'package:doctor_app_flutter/core/model/procedure/get_procedure_model.dart';
import 'package:doctor_app_flutter/core/model/procedure/get_procedure_req_model.dart';
import 'package:doctor_app_flutter/core/model/procedure/post_procedure_req_model.dart';
import 'package:doctor_app_flutter/core/model/procedure/procedure_valadate_model.dart';
@ -10,8 +9,6 @@ import 'package:doctor_app_flutter/core/model/procedure/procedure_valadate_reque
import 'package:doctor_app_flutter/core/model/procedure/update_procedure_request_model.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:flutter/foundation.dart';
class ProcedureService extends BaseService {
List<GetOrderedProcedureModel> _procedureList = List();
List<GetOrderedProcedureModel> get procedureList => _procedureList;
@ -79,12 +76,12 @@ class ProcedureService extends BaseService {
Future getProcedureCategory({String categoryName, String categoryID}) async {
_getProcedureCategoriseReqModel = GetProcedureReqModel(
search: [categoryName],
search: ["$categoryName"],
patientMRN: 0,
pageIndex: 0,
clinicId: 0,
pageSize: 0,
category: categoryID ?? "01",
category: categoryID ?? null,
);
hasError = false;
_categoriesList.clear();

@ -1,6 +1,5 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/radiology/final_radiology.dart';
import 'package:doctor_app_flutter/core/model/radiology/request_send_rad_report_email.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:flutter/cupertino.dart';
@ -27,19 +26,31 @@ class RadiologyService extends BaseService {
}, body: body);
}
Future getPatientRadOrders(PatiantInformtion patient) async {
Future getPatientRadOrders(PatiantInformtion patient , {isInPatient = false}) async {
String url = GET_PATIENT_ORDERS;
final Map<String, dynamic> body = new Map<String, dynamic>();
if(isInPatient) {
url = GET_IN_PATIENT_ORDERS;
body['ProjectID'] = patient.projectId;
}
hasError = false;
await baseAppClient.postPatient(GET_PATIENT_ORDERS,
await baseAppClient.postPatient(url,
patient: patient,
onSuccess: (dynamic response, int statusCode) {
finalRadiologyList.clear();
response['ListRAD'].forEach((radiology) {
finalRadiologyList = [];
String label = "ListRAD";
if(isInPatient) {
label ="List_GetRadOreders";
}
response[label].forEach((radiology) {
finalRadiologyList.add(FinalRadiology.fromJson(radiology));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: Map());
}, body:body);
}

@ -3,7 +3,6 @@ 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/patient/my_referral/my_referral_patient_model.dart';
import 'package:doctor_app_flutter/models/patient/request_my_referral_patient_model.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
class ReferralPatientService extends BaseService {
@ -11,9 +10,6 @@ class ReferralPatientService extends BaseService {
List<MyReferralPatientModel> get listMyReferralPatientModel => _listMyReferralPatientModel;
Helpers helpers = Helpers();
RequestMyReferralPatientModel _requestMyReferralPatient = RequestMyReferralPatientModel();
RequestAddReferredDoctorRemarks _requestAddReferredDoctorRemarks = RequestAddReferredDoctorRemarks();

@ -3,7 +3,6 @@ import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/models/doctor/verify_referral_doctor_remarks.dart';
import 'package:doctor_app_flutter/models/patient/my_referral/my_referred_patient_model.dart';
import 'package:doctor_app_flutter/models/patient/request_my_referral_patient_model.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
class ReferredPatientService extends BaseService {
List<MyReferredPatientModel> _listMyReferredPatientModel = [];

@ -1,4 +1,6 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/sick_leave_patient_model.dart';
import 'package:doctor_app_flutter/core/model/sick_leave_patient_request_model.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/core/viewModel/leave_rechdule_response.dart';
import 'package:doctor_app_flutter/models/sickleave/add_sickleave_request.dart';
@ -15,7 +17,8 @@ class SickLeaveService extends BaseService {
List get getReasons => reasonse;
List reasonse = [];
List<GetAllSickLeaveResponse> get getAllSickLeave => _getAllsickLeave;
List<GetAllSickLeaveResponse> _getAllsickLeave = [];
List<GetAllSickLeaveResponse> _getAllsickLeave = List();
List get coveringDoctorsList => _coveringDoctors;
List _coveringDoctors = [];
@ -27,6 +30,13 @@ class SickLeaveService extends BaseService {
dynamic get sickLeaveResponse => _sickLeaveResponse;
dynamic _sickLeaveResponse;
List<SickLeavePatientModel> getAllSickLeavePatient = List();
SickLeavePatientRequestModel _sickLeavePatientRequestModel =
SickLeavePatientRequestModel();
Future getStatistics(appoNo, patientMRN) async {
hasError = false;
await baseAppClient.post(
@ -87,13 +97,14 @@ class SickLeaveService extends BaseService {
Future getSickLeave(patientMRN) async {
hasError = false;
await baseAppClient.post(
getAllSickLeavePatient = [];
await baseAppClient.postPatient(
GET_SICK_LEAVE,
onSuccess: (dynamic response, int statusCode) {
Future.value(response);
_getAllsickLeave.clear();
response['SickLeavesList']['entityList'].forEach((v) {
_getAllsickLeave.add(GetAllSickLeaveResponse.fromJson(v));
// Future.value(response);
getAllSickLeavePatient=[];
response['List_SickLeave'].forEach((v) {
getAllSickLeavePatient.add(SickLeavePatientModel.fromJson(v));
});
},
onFailure: (String error, int statusCode) {
@ -104,6 +115,29 @@ class SickLeaveService extends BaseService {
);
}
Future getSickLeavePatient(patientMRN) async {
_sickLeavePatientRequestModel = SickLeavePatientRequestModel(
patientID: patientMRN, patientTypeID: 2, patientType: 1);
hasError = false;
getAllSickLeavePatient =[];
getAllSickLeavePatient.clear();
await baseAppClient.postPatient(
GET_SICK_LEAVE_PATIENT,
onSuccess: (dynamic response, int statusCode) {
Future.value(response);
getAllSickLeavePatient.clear();
response['List_SickLeave'].forEach((v) {
getAllSickLeavePatient.add(SickLeavePatientModel.fromJson(v));
});
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
},
body: _sickLeavePatientRequestModel.toJson(),
);
}
Future getRescheduleLeave() async {
hasError = false;
await baseAppClient.post(

@ -0,0 +1,63 @@
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/service/DischargedPatientService.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import '../../locator.dart';
import 'base_view_model.dart';
class DischargedPatientViewModel extends BaseViewModel {
DischargedPatientService _dischargedPatientService =
locator<DischargedPatientService>();
List<PatiantInformtion> get myDischargedPatient =>
_dischargedPatientService.myDischargedPatients;
List<PatiantInformtion> filterData = [];
searchData(String str) {
var strExist = str.length > 0 ? true : false;
if (strExist) {
filterData = [];
for (var i = 0; i < myDischargedPatient.length; i++) {
String firstName = myDischargedPatient[i].firstName.toUpperCase();
String lastName = myDischargedPatient[i].lastName.toUpperCase();
String mobile = myDischargedPatient[i].mobileNumber.toUpperCase();
String patientID = myDischargedPatient[i].patientId.toString();
if (firstName.contains(str.toUpperCase()) ||
lastName.contains(str.toUpperCase()) ||
mobile.contains(str) ||
patientID.contains(str)) {
filterData.add(myDischargedPatient[i]);
}
}
notifyListeners();
} else {
filterData = myDischargedPatient;
notifyListeners();
}
}
Future getDischargedPatient() async {
setState(ViewState.Busy);
await _dischargedPatientService.getDischargedPatient();
if (_dischargedPatientService.hasError) {
error = _dischargedPatientService.error;
setState(ViewState.Error);
} else{
filterData = myDischargedPatient;
setState(ViewState.Idle);}
}
Future gtMyDischargeReferralPatient() async {
setState(ViewState.Busy);
await _dischargedPatientService.gtMyDischargeReferralPatient();
if (_dischargedPatientService.hasError) {
error = _dischargedPatientService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
}

@ -1,31 +1,45 @@
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/insurance_approval.dart';
import 'package:doctor_app_flutter/core/model/insurance_approval_in_patient_model.dart';
import 'package:doctor_app_flutter/core/service/InsuranceCardService.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import '../../locator.dart';
class InsuranceViewModel extends BaseViewModel{
class InsuranceViewModel extends BaseViewModel {
InsuranceCardService _insuranceCardService = locator<InsuranceCardService>();
List<InsuranceApprovalModel> get insuranceApproval =>
_insuranceCardService.insuranceApproval;
List<InsuranceApprovalInPatientModel> get insuranceApprovalInPatient =>
_insuranceCardService.insuranceApprovalInPatient;
Future getInsuranceApproval(PatiantInformtion patient,{int appointmentNo, int projectId}) async {
Future getInsuranceApproval(PatiantInformtion patient,
{int appointmentNo, int projectId}) async {
error = "";
setState(ViewState.Busy);
if (appointmentNo != null)
await _insuranceCardService.getInsuranceApproval(patient,
appointmentNo: appointmentNo,projectId: projectId);
appointmentNo: appointmentNo, projectId: projectId);
else
await _insuranceCardService.getInsuranceApproval(patient);
if (_insuranceCardService.hasError) {
error = "No Insurance Approval Found";
setState(ViewState.Error);
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
Future getInsuranceInPatient({int mrn}) async {
//hasError = false;
//_insuranceCardService.clearInsuranceCard();
setState(ViewState.Busy);
await _insuranceCardService.getInsuranceApprovalInPatient(mrn: mrn);
if (_insuranceCardService.hasError) {
error = _insuranceCardService.error;
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
}
}

@ -0,0 +1,195 @@
import 'package:doctor_app_flutter/core/enum/patient_type.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/service/patient/out_patient_service.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import '../../locator.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/service/patientInPatientService.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import '../../locator.dart';
import 'base_view_model.dart';
class PatientSearchViewModel extends BaseViewModel{
OutPatientService _outPatientService = locator<OutPatientService>();
List<PatiantInformtion> get patientList => _outPatientService.patientList;
List<PatiantInformtion> filterData = [];
searchData(String str) {
var strExist = str.length > 0 ? true : false;
if (strExist) {
filterData = [];
for (var i = 0; i < _outPatientService.patientList.length; i++) {
String firstName = _outPatientService.patientList[i].firstName.toUpperCase();
String lastName = _outPatientService.patientList[i].lastName.toUpperCase();
String mobile = _outPatientService.patientList[i].mobileNumber.toUpperCase();
String patientID = _outPatientService.patientList[i].patientId.toString();
if (firstName.contains(str.toUpperCase()) ||
lastName.contains(str.toUpperCase()) ||
mobile.contains(str) ||
patientID.contains(str)) {
filterData.add(_outPatientService.patientList[i]);
}
}
notifyListeners();
} else {
filterData = _outPatientService.patientList;
notifyListeners();
}
}
getOutPatient(PatientSearchRequestModel patientSearchRequestModel , {bool isLocalBusy = false}) async {
if(isLocalBusy) {
setState(ViewState.BusyLocal);
} else {
setState(ViewState.Busy);
}
await _outPatientService.getOutPatient(
patientSearchRequestModel);
if (_outPatientService.hasError) {
error = _outPatientService.error;
if(isLocalBusy) {
setState(ViewState.ErrorLocal);
} else {
setState(ViewState.Error);
}
setState(ViewState.Error);
} else {
filterData = _outPatientService.patientList;
setState(ViewState.Idle);
}
}
getPatientFileInformation(PatientSearchRequestModel patientSearchRequestModel, {bool isLocalBusy = false}) async {
setState(ViewState.Busy);
await _outPatientService.getPatientFileInformation(
patientSearchRequestModel);
if (_outPatientService.hasError) {
error = _outPatientService.error;
setState(ViewState.Error);
} else {
filterData = _outPatientService.patientList;
setState(ViewState.Idle);
}
}
getPatientBasedOnDate (
{item, PatientSearchRequestModel patientSearchRequestModel, PatientType selectedPatientType,
bool isSearchWithKeyInfo })async {
String dateTo;
String dateFrom;
if (item == 'Tomorrow') {
dateTo = DateUtils.convertDateToFormat(
DateTime(DateTime.now().year, DateTime.now().month,
DateTime.now().day + 1),
'yyyy-MM-dd');
dateFrom = DateUtils.convertDateToFormat(
DateTime(DateTime.now().year, DateTime.now().month,
DateTime.now().day + 1),
'yyyy-MM-dd');
} else if (item == 'Next Week') {
dateTo = DateUtils.convertDateToFormat(
DateTime(DateTime.now().year, DateTime.now().month,
DateTime.now().day + 6),
'yyyy-MM-dd');
dateFrom = DateUtils.convertDateToFormat(
DateTime(DateTime.now().year, DateTime.now().month,
DateTime.now().day + 1),
'yyyy-MM-dd');
} else {
dateFrom = DateUtils.convertDateToFormat(
DateTime(
DateTime.now().year, DateTime.now().month, DateTime.now().day),
'yyyy-MM-dd');
dateTo= DateUtils.convertDateToFormat(
DateTime(
DateTime.now().year, DateTime.now().month, DateTime.now().day),
'yyyy-MM-dd');
}
PatientSearchRequestModel currentModel = PatientSearchRequestModel();
currentModel.patientID = patientSearchRequestModel.patientID;
currentModel.firstName = patientSearchRequestModel.firstName;
currentModel.lastName = patientSearchRequestModel.lastName;
currentModel.middleName = patientSearchRequestModel.middleName;
currentModel.doctorID = patientSearchRequestModel.doctorID;
currentModel.from = dateFrom;
currentModel.to = dateTo;
if(isSearchWithKeyInfo) {
await getPatientFileInformation(currentModel);
} else {
await getOutPatient(currentModel, isLocalBusy: true);
}
filterData = _outPatientService.patientList;
}
PatientInPatientService _inPatientService =
locator<PatientInPatientService>();
List<PatiantInformtion> get _inPatientList => _inPatientService.inPatientList;
List<PatiantInformtion> filteredInPatientItems = List();
Future getInPatientList(PatientSearchRequestModel requestModel,
{bool isMyInpatient = false, bool isFirstTime = true}) async {
await getDoctorProfile();
if (isFirstTime)
setState(ViewState.Busy);
else
setState(ViewState.BusyLocal);
await _inPatientService.getInPatientList(requestModel, false);
if (_inPatientService.hasError) {
error = _inPatientService.error;
setState(ViewState.Error);
} else {
filteredInPatientItems.clear();
if (_inPatientList.length > 0)
filteredInPatientItems.addAll(_inPatientList);
setState(ViewState.Idle);
}
}
void filterSearchResults(String query) {
var strExist = query.length > 0 ? true : false;
if (strExist) {
filteredInPatientItems = [];
for (var i = 0; i < _inPatientList.length; i++) {
String firstName = _inPatientList[i].firstName.toUpperCase();
String lastName = _inPatientList[i].lastName.toUpperCase();
String mobile = _inPatientList[i].mobileNumber.toUpperCase();
String patientID = _inPatientList[i].patientId.toString();
if (firstName.contains(query.toUpperCase()) ||
lastName.contains(query.toUpperCase()) ||
mobile.contains(query) ||
patientID.contains(query)) {
filteredInPatientItems.add(_inPatientList[i]);
}
}
notifyListeners();
} else {
if (_inPatientList.length > 0)
filteredInPatientItems.clear();
filteredInPatientItems.addAll(_inPatientList);
notifyListeners();
}
}
}

@ -1,22 +1,17 @@
import 'package:doctor_app_flutter/client/base_app_client.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/core/model/imei_details.dart';
import 'package:doctor_app_flutter/core/model/insert_imei_model.dart';
import 'package:doctor_app_flutter/core/service/auth_service.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import 'package:doctor_app_flutter/locator.dart';
import 'package:doctor_app_flutter/models/auth/activation_Code_req_model.dart';
import 'package:doctor_app_flutter/models/auth/check_activation_code_request_model.dart';
import 'package:doctor_app_flutter/models/auth/send_activation_code_model2.dart';
import 'package:doctor_app_flutter/models/doctor/clinic_model.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
import 'package:flutter/cupertino.dart';
import 'package:doctor_app_flutter/config/config.dart';
import '../../models/doctor/user_model.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
enum APP_STATUS { LOADING, UNAUTHENTICATED, AUTHENTICATED }
class AuthViewModel extends BaseViewModel {
@ -195,26 +190,19 @@ class AuthViewModel extends BaseViewModel {
}
}
/*
*@author: Elham Rababah
*@Date:17/5/2020
*@param: docInfo
*@return:Future<Map>
*@desc: getDocProfiles
*/
Future<dynamic> getDocProfiles(docInfo, {bool allowChangeProfile = true}) async {
Future<dynamic> getDocProfiles(docInfo,
{bool allowChangeProfile = true}) async {
try {
dynamic localRes;
await baseAppClient.post(GET_DOC_PROFILES,
onSuccess: (dynamic response, int statusCode) {
localRes = response;
if(allowChangeProfile) {
if (allowChangeProfile) {
doctorProfile =
DoctorProfileModel.fromJson(response['DoctorProfileList'][0]);
selectedClinicName =
response['DoctorProfileList'][0]['ClinicDescription'];
response['DoctorProfileList'][0]['ClinicDescription'];
}
}, onFailure: (String error, int statusCode) {
throw error;
}, body: docInfo);

@ -1,6 +1,5 @@
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/service/dasboard_service.dart';
import 'package:doctor_app_flutter/core/service/medicine_service.dart';
import '../../locator.dart';
import 'base_view_model.dart';

@ -1,7 +1,6 @@
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/service/doctor_reply_service.dart';
import 'package:doctor_app_flutter/models/doctor/list_gt_my_patients_question_model.dart';
import 'package:doctor_app_flutter/models/patient/my_referral/my_referral_patient_model.dart';
import '../../locator.dart';
import 'base_view_model.dart';

@ -1,14 +1,15 @@
import 'package:doctor_app_flutter/client/base_app_client.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/imei_details.dart';
import 'package:doctor_app_flutter/core/service/auth_service.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import 'package:doctor_app_flutter/locator.dart';
import 'package:doctor_app_flutter/models/doctor/user_model.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
class IMEIViewModel extends BaseViewModel {
AuthService _authService = locator<AuthService>();
List<GetIMEIDetailsModel> get imeiDetails => _authService.dashboardItemsList;
get loginInfo => _authService.loginInfo;
Future selectDeviceImei(imei) async {
setState(ViewState.Busy);
await _authService.selectDeviceImei(imei);
@ -18,4 +19,15 @@ class IMEIViewModel extends BaseViewModel {
} else
setState(ViewState.Idle);
}
Future login(UserModel userInfo) async {
setState(ViewState.Busy);
await _authService.login(userInfo);
if (_authService.hasError) {
error = _authService.error;
Helpers.showErrorToast(error);
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
}

@ -28,7 +28,7 @@ class LabsViewModel extends BaseViewModel {
void getLabs(PatiantInformtion patient) async {
setState(ViewState.Busy);
await _labsService.getPatientLabOrdersList(patient);
await _labsService.getPatientLabOrdersList(patient, true);
if (_labsService.hasError) {
error = _labsService.error;
setState(ViewState.Error);
@ -89,7 +89,6 @@ class LabsViewModel extends BaseViewModel {
List<LabResultList> labResultLists = List();
List<LabResultList> get labResultListsCoustom {
return labResultLists;
}
@ -98,14 +97,16 @@ class LabsViewModel extends BaseViewModel {
int clinicID,
String invoiceNo,
String orderNo,
PatiantInformtion patient}) async {
PatiantInformtion patient,
bool isInpatient}) async {
setState(ViewState.Busy);
await _labsService.getLaboratoryResult(
invoiceNo: invoiceNo,
orderNo: orderNo,
projectID: projectID,
clinicID: clinicID,
patient: patient);
patient: patient,
isInpatient: isInpatient);
if (_labsService.hasError) {
error = _labsService.error;
setState(ViewState.Error);
@ -114,9 +115,11 @@ class LabsViewModel extends BaseViewModel {
}
}
getPatientLabResult({PatientLabOrders patientLabOrder,PatiantInformtion patient}) async {
getPatientLabResult(
{PatientLabOrders patientLabOrder, PatiantInformtion patient, bool isInpatient}) async {
setState(ViewState.Busy);
await _labsService.getPatientLabResult(patientLabOrder: patientLabOrder,patient: patient);
await _labsService.getPatientLabResult(
patientLabOrder: patientLabOrder, patient: patient, isInpatient: isInpatient);
if (_labsService.hasError) {
error = _labsService.error;
setState(ViewState.Error);
@ -149,10 +152,14 @@ class LabsViewModel extends BaseViewModel {
}
getPatientLabOrdersResults(
{PatientLabOrders patientLabOrder, String procedure,PatiantInformtion patient}) async {
{PatientLabOrders patientLabOrder,
String procedure,
PatiantInformtion patient}) async {
setState(ViewState.Busy);
await _labsService.getPatientLabOrdersResults(
patientLabOrder: patientLabOrder, procedure: procedure,patient: patient);
patientLabOrder: patientLabOrder,
procedure: procedure,
patient: patient);
if (_labsService.hasError) {
error = _labsService.error;
setState(ViewState.Error);

@ -1,7 +1,6 @@
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/medical_file_model.dart';
import 'package:doctor_app_flutter/core/service/medical_file_service.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import 'package:doctor_app_flutter/locator.dart';

@ -1,7 +1,6 @@
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/get_medication_response_model.dart';
import 'package:doctor_app_flutter/core/service/SOAP_service.dart';
import 'package:doctor_app_flutter/core/service/medicine_service.dart';
import 'package:doctor_app_flutter/core/service/prescription_service.dart';
import 'package:doctor_app_flutter/models/SOAP/GetAssessmentReqModel.dart';

@ -1,11 +1,8 @@
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/admissionRequest/admission-request.dart';
import 'package:doctor_app_flutter/core/model/admissionRequest/ward-model.dart';
import 'package:doctor_app_flutter/core/service/patient-admission-request-service.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import '../../locator.dart';

@ -1,10 +1,13 @@
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/DischargeReferralPatient.dart';
import 'package:doctor_app_flutter/core/model/MyReferralPatientModel.dart';
import 'package:doctor_app_flutter/core/service/DischargedPatientService.dart';
import 'package:doctor_app_flutter/core/service/MyReferralPatientService.dart';
import 'package:doctor_app_flutter/core/service/ReferralService.dart';
import 'package:doctor_app_flutter/core/service/patient-doctor-referral-service.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/models/patient/PatientArrivalEntity.dart';
import 'package:doctor_app_flutter/models/patient/my_referral/PendingReferral.dart';
import 'package:doctor_app_flutter/models/patient/my_referral/clinic-doctor.dart';
import 'package:doctor_app_flutter/models/patient/my_referral/my_referred_patient_model.dart';
@ -18,13 +21,29 @@ class PatientReferralViewModel extends BaseViewModel {
PatientReferralService _referralPatientService =
locator<PatientReferralService>();
ReferralService _referralService = locator<ReferralService>();
MyReferralInPatientService _myReferralService =
locator<MyReferralInPatientService>();
DischargedPatientService _dischargedPatientService = locator<DischargedPatientService>();
List<DischargeReferralPatient> get myDischargeReferralPatient =>
_dischargedPatientService.myDischargeReferralPatients;
List<dynamic> get branchesList => _referralPatientService.projectsList;
List<dynamic> get clinicsList => _referralPatientService.clinicsList;
List<dynamic> get referralFrequencyList =>
_referralPatientService.frequencyList;
List<dynamic> doctorsList = [];
List<ClinicDoctor> get clinicDoctorsList => _referralPatientService.doctorsList;
List<ClinicDoctor> get clinicDoctorsList =>
_referralPatientService.doctorsList;
List<MyReferralPatientModel> get myReferralPatients =>
_myReferralService.myReferralPatients;
List<MyReferredPatientModel> get listMyReferredPatientModel =>
_referralPatientService.listMyReferredPatientModel;
@ -85,20 +104,20 @@ class PatientReferralViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
Future getClinicDoctors(PatiantInformtion patient ,int clinicId, int branchId) async {
Future getClinicDoctors(
PatiantInformtion patient, int clinicId, int branchId) async {
setState(ViewState.BusyLocal);
await _referralPatientService.getDoctorsList(patient, clinicId, branchId);
if (_referralPatientService.hasError) {
error = _referralPatientService.error;
setState(ViewState.ErrorLocal);
} else{
} else {
doctorsList.clear();
clinicDoctorsList.forEach((element) {
doctorsList.add(element.toJson());
});
setState(ViewState.Idle);
}
}
Future<dynamic> getDoctorBranch() async {
@ -137,6 +156,25 @@ class PatientReferralViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
Future getMyReferralPatientService() async {
setState(ViewState.Busy);
await _myReferralService.getMyReferralPatientService();
if (_myReferralService.hasError) {
error = _myReferralService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
Future replay(String referredDoctorRemarks, MyReferralPatientModel referral) async{
setState(ViewState.Busy);
await _myReferralService.replay(referredDoctorRemarks,referral);
if (_myReferralService.hasError) {
error = _myReferralService.error;
setState(ViewState.ErrorLocal);
} else
getMyReferralPatientService();
}
Future responseReferral(
PendingReferral pendingReferral, bool isAccepted) async {
setState(ViewState.Busy);
@ -161,13 +199,43 @@ class PatientReferralViewModel extends BaseViewModel {
}
}
Future makeInPatientReferral(
{PatiantInformtion patient,
int projectID,
int clinicID,
int doctorID,
int frequencyCode,
int priority,
String referralDate,
String remarks,
String ext}) async {
setState(ViewState.Busy);
await _referralService.referralPatient(
patientID: patient.patientId,
roomID: patient.roomId,
referralClinic: clinicID,
admissionNo: patient.appointmentNo,
referralDoctor: doctorID,
patientTypeID: patient.patientType,
referringDoctorRemarks: remarks,
priority: priority,
frequency: frequencyCode,
extension: ext,
);
if (_referralService.hasError) {
error = _referralService.error;
setState(ViewState.ErrorLocal);
} else {
setState(ViewState.Idle);
}
}
Future getPatientDetails(
String fromDate, String toDate, int patientMrn, int appointmentNo) async {
setState(ViewState.Busy);
await _referralPatientService.getPatientArrivalList(toDate,
fromDate: fromDate,
patientMrn: patientMrn);
fromDate: fromDate, patientMrn: patientMrn);
if (_referralPatientService.hasError) {
error = _referralPatientService.error;
setState(ViewState.Error);
@ -176,20 +244,131 @@ class PatientReferralViewModel extends BaseViewModel {
}
}
Future getReferralFrequencyList() async {
setState(ViewState.Busy);
await _referralPatientService.getReferralFrequencyList();
if (_referralPatientService.hasError) {
error = _referralPatientService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
Future verifyReferralDoctorRemarks(
MyReferredPatientModel referredPatient) async {
setState(ViewState.Busy);
await _referralPatientService.verifyReferralDoctorRemarks(referredPatient);
if (_referralPatientService.hasError) {
error = _referralPatientService.error;
setState(ViewState.ErrorLocal);
} else {
getMyReferredPatient();
setState(ViewState.Idle);
}
}
Future gtMyDischargeReferralPatient() async {
setState(ViewState.Busy);
await _dischargedPatientService.gtMyDischargeReferralPatient();
if (_dischargedPatientService.hasError) {
error = _dischargedPatientService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
String getReferralStatusNameByCode(int statusCode, BuildContext context) {
switch (statusCode) {
case 1:
return TranslationBase.of(context).pending/*referralStatusHold*/;
return TranslationBase.of(context).pending /*referralStatusHold*/;
case 2:
return TranslationBase.of(context).accepted/*referralStatusActive*/;
return TranslationBase.of(context).accepted /*referralStatusActive*/;
case 4:
return TranslationBase.of(context).rejected/*referralStatusCancelled*/;
return TranslationBase.of(context).rejected /*referralStatusCancelled*/;
case 46:
return TranslationBase.of(context).accepted/*referralStatusCompleted*/;
return TranslationBase.of(context).accepted /*referralStatusCompleted*/;
case 63:
return TranslationBase.of(context).rejected/*referralStatusNotSeen*/;
return TranslationBase.of(context).rejected /*referralStatusNotSeen*/;
default:
return "-";
}
}
PatiantInformtion getPatientFromReferral(
MyReferredPatientModel referredPatient) {
PatiantInformtion patient = PatiantInformtion();
patient.doctorId = referredPatient.doctorID;
patient.doctorName = referredPatient.doctorName;
patient.patientId = referredPatient.patientID;
patient.firstName = referredPatient.firstName;
patient.middleName = referredPatient.middleName;
patient.lastName = referredPatient.lastName;
patient.gender = referredPatient.gender;
patient.dateofBirth = referredPatient.dateofBirth;
patient.mobileNumber = referredPatient.mobileNumber;
patient.emailAddress = referredPatient.emailAddress;
patient.patientIdentificationNo = referredPatient.patientIdentificationNo;
patient.patientType = referredPatient.patientType;
patient.admissionNo = referredPatient.admissionNo;
patient.admissionDate = referredPatient.admissionDate;
patient.roomId = referredPatient.roomID;
patient.bedId = referredPatient.bedID;
patient.nationalityName = referredPatient.nationalityName;
patient.nationalityFlagURL = referredPatient.nationalityFlagURL;
patient.age = referredPatient.age;
patient.clinicDescription = referredPatient.clinicDescription;
return patient;
}
PatiantInformtion getPatientFromReferralO(
MyReferralPatientModel referredPatient) {
PatiantInformtion patient = PatiantInformtion();
patient.doctorId = referredPatient.doctorID;
patient.doctorName = referredPatient.doctorName;
patient.patientId = referredPatient.patientID;
patient.firstName = referredPatient.firstName;
patient.middleName = referredPatient.middleName;
patient.lastName = referredPatient.lastName;
patient.gender = referredPatient.gender;
patient.dateofBirth = referredPatient.dateofBirth;
patient.mobileNumber = referredPatient.mobileNumber;
patient.emailAddress = referredPatient.emailAddress;
patient.patientIdentificationNo = referredPatient.patientIdentificationNo;
patient.patientType = referredPatient.patientType;
patient.admissionNo = referredPatient.admissionNo;
patient.admissionDate = referredPatient.admissionDate;
patient.roomId = referredPatient.roomID;
patient.bedId = referredPatient.bedID;
patient.nationalityName = referredPatient.nationalityName;
patient.nationalityFlagURL = referredPatient.nationalityFlagURL;
patient.age = referredPatient.age;
patient.clinicDescription = referredPatient.clinicDescription;
return patient;
}
PatiantInformtion getPatientFromDischargeReferralPatient(
DischargeReferralPatient referredPatient) {
PatiantInformtion patient = PatiantInformtion();
patient.doctorId = referredPatient.doctorID;
patient.doctorName = referredPatient.doctorName;
patient.patientId = referredPatient.patientID;
patient.firstName = referredPatient.firstName;
patient.middleName = referredPatient.middleName;
patient.lastName = referredPatient.lastName;
patient.gender = referredPatient.gender;
patient.dateofBirth = referredPatient.dateofBirth;
patient.mobileNumber = referredPatient.mobileNumber;
patient.emailAddress = referredPatient.emailAddress;
patient.patientIdentificationNo = referredPatient.patientIdentificationNo;
patient.patientType = referredPatient.patientType;
patient.admissionNo = referredPatient.admissionNo;
patient.admissionDate = referredPatient.admissionDate;
patient.roomId = referredPatient.roomID;
patient.bedId = referredPatient.bedID;
patient.nationalityName = referredPatient.nationalityName;
patient.nationalityFlagURL = '';// TODO from backend referredPatient.nationalityFlagURL;
patient.age = referredPatient.age;
patient.clinicDescription = referredPatient.clinicDescription;
return patient;
}
}

@ -9,7 +9,8 @@ import 'package:doctor_app_flutter/models/SOAP/GetAssessmentResModel.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/SOAP/order-procedure.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:flutter/material.dart';
import '../../locator.dart';
@ -20,7 +21,8 @@ class UcafViewModel extends BaseViewModel {
List<GetChiefComplaintResModel> get patientChiefComplaintList =>
_ucafService.patientChiefComplaintList;
VitalSignData get patientVitalSigns => _ucafService.patientVitalSigns;
List<VitalSignHistory> get patientVitalSignsHistory =>
_ucafService.patientVitalSignsHistory;
List<GetAssessmentResModel> get patientAssessmentList =>
_ucafService.patientAssessmentList;
@ -35,6 +37,13 @@ class UcafViewModel extends BaseViewModel {
List<OrderProcedure> get orderProcedures => _ucafService.orderProcedureList;
String selectedLanguage;
String heightCm = "0";
String weightKg = "0";
String bodyMax = "0";
String temperatureCelcius = "0";
String hartRat = "0";
String respirationBeatPerMinute = "0";
String bloodPressure = "0 / 0";
resetDataInFirst(){
_ucafService.patientAssessmentList = [];
@ -48,13 +57,55 @@ class UcafViewModel extends BaseViewModel {
Future getUCAFData(PatiantInformtion patient) async {
setState(ViewState.Busy);
await _ucafService.getPatientVitalSign(patient);
String from;
String to;
if (from == null || from == "0") {
from = DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd');
}
if (to == null || to == "0") {
to = DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd');
}
// await _ucafService.getPatientVitalSignsHistory(patient, from, to);
await _ucafService.getInPatientVitalSignHistory(patient, false);
await _ucafService.getPatientChiefComplaint(patient);
if (_ucafService.hasError) {
error = _ucafService.error;
setState(ViewState.Error);
} else {
patientVitalSignsHistory.forEach((element) {
if (heightCm == "0" || heightCm == null || heightCm == 'null') {
heightCm = element.heightCm.toString();
}
if (weightKg == "0" || weightKg == null || weightKg == 'null') {
weightKg = element.weightKg.toString();
}
if (bodyMax == "0" || bodyMax == null || bodyMax == 'null') {
bodyMax = element.bodyMassIndex.toString();
}
if (temperatureCelcius == "0" ||
temperatureCelcius == null ||
temperatureCelcius == 'null') {
temperatureCelcius = element.temperatureCelcius.toString();
}
if (hartRat == "0" || hartRat == null || hartRat == 'null') {
hartRat = element.pulseBeatPerMinute.toString();
}
if (respirationBeatPerMinute == "0" ||
respirationBeatPerMinute == null ||
respirationBeatPerMinute == 'null') {
respirationBeatPerMinute =
element.respirationBeatPerMinute.toString();
}
if (bloodPressure == "0 / 0" ||
bloodPressure == null ||
bloodPressure == 'null') {
bloodPressure = element.bloodPressure.toString();
}
});
setState(ViewState.Idle);
}
}

@ -1,11 +1,9 @@
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/service/patient-vital-signs-service.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import 'package:doctor_app_flutter/models/patient/PatientArrivalEntity.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/vital_sign_res_model.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import '../../locator.dart';
@ -25,6 +23,13 @@ class VitalSignsViewModel extends BaseViewModel {
String hartRat = "0";
String respirationBeatPerMinute = "0";
String bloodPressure = "0 / 0";
String oxygenation = "0 - 0";
String painScore = "-";
String painLocation = "-";
String painCharacter = "-";
String painDuration = "-";
String isPainDone = "-";
String painFrequency = "-";
Future getPatientVitalSign(PatiantInformtion patient) async {
setState(ViewState.Busy);
@ -37,8 +42,8 @@ class VitalSignsViewModel extends BaseViewModel {
}
}
Future getPatientVitalSignHistory(
PatiantInformtion patient, String from, String to) async {
Future getPatientVitalSignHistory(PatiantInformtion patient, String from,
String to, bool isInPatient) async {
setState(ViewState.Busy);
if (from == null || from == "0") {
from = DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd');
@ -47,7 +52,14 @@ class VitalSignsViewModel extends BaseViewModel {
to = DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd');
}
await _vitalSignService.getPatientVitalSignsHistory(patient, from, to);
if (isInPatient) {
await _vitalSignService.getPatientVitalSignsHistory(patient, from, to);
} else {
await _vitalSignService.getOutPatientVitalSignHistory(patient, from, to);
}
if (_vitalSignService.hasError) {
error = _vitalSignService.error;
setState(ViewState.Error);
@ -81,6 +93,32 @@ class VitalSignsViewModel extends BaseViewModel {
bloodPressure == 'null') {
bloodPressure = element.bloodPressure.toString();
}
if (oxygenation == "0 - 0" ||
oxygenation == null ||
oxygenation == 'null') {
oxygenation =
"${element.sAO2.toString()} - ${element.fIO2.toString()}";
}
if (painScore == null || painScore == "-") {
painScore = element.painScore.toString() != 'null'
? element.painScore.toString()
: "-";
painLocation = element.painLocation.toString() != 'null'
? element.painLocation.toString()
: "-";
painCharacter = element.painCharacter.toString() != 'null'
? element.painCharacter.toString()
: "-";
painDuration = element.painDuration.toString() != 'null'
? element.painDuration.toString()
: "-";
isPainDone = element.isPainManagementDone.toString() != 'null'
? element.isPainManagementDone.toString()
: "-";
painFrequency = element.painFrequency.toString() != 'null'
? element.painFrequency.toString()
: "-";
}
});
setState(ViewState.Idle);
}

@ -1,4 +1,7 @@
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/note/CreateNoteModel.dart';
import 'package:doctor_app_flutter/core/model/note/note_model.dart';
import 'package:doctor_app_flutter/core/model/note/update_note_model.dart';
import 'package:doctor_app_flutter/core/service/patient_service.dart';
import 'package:doctor_app_flutter/models/patient/lab_orders/lab_orders_res_model.dart';
import 'package:doctor_app_flutter/models/patient/lab_result/lab_result.dart';
@ -39,7 +42,7 @@ class PatientViewModel extends BaseViewModel {
get insuranceApporvalsList => _patientService.insuranceApporvalsList;
get patientProgressNoteList => _patientService.patientProgressNoteList;
List<NoteModel> get patientProgressNoteList => _patientService.patientProgressNoteList;
List<dynamic> get clinicsList => _patientService.clinicsList;
@ -62,20 +65,12 @@ class PatientViewModel extends BaseViewModel {
if (_patientService.hasError) {
error = _patientService.error;
setState(ViewState.Error);
} else{
setState(ViewState.Idle);
}
return localRes;
}
Future getPatientVitalSign(patient) async {
setState(ViewState.Busy);
await _patientService.getPatientVitalSign(patient);
if (_patientService.hasError) {
error = _patientService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
Future getLabResultOrders(patient) async {
setState(ViewState.Busy);
await _patientService.getLabResultOrders(patient);
@ -146,12 +141,41 @@ class PatientViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
Future getPatientProgressNote(patient) async {
setState(ViewState.Busy);
Future getPatientProgressNote(patient, {bool isLocalBusy = false}) async {
if(isLocalBusy) {
setState(ViewState.BusyLocal);
}else{
setState(ViewState.Busy);
}
await _patientService.getPatientProgressNote(patient);
if (_patientService.hasError) {
error = _patientService.error;
setState(ViewState.Error);
if(isLocalBusy) {
setState(ViewState.ErrorLocal);
}else{
setState(ViewState.Error);
}
} else
setState(ViewState.Idle);
}
Future updatePatientProgressNote(UpdateNoteReqModel req) async {
setState(ViewState.BusyLocal);
await _patientService.updatePatientProgressNote(req);
if (_patientService.hasError) {
error = _patientService.error;
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
Future createPatientProgressNote(CreateNoteModel req) async {
setState(ViewState.BusyLocal);
await _patientService.createPatientProgressNote(req);
if (_patientService.hasError) {
error = _patientService.error;
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}

@ -3,20 +3,18 @@ import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/Prescription_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/Prescriptions.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/perscription_pharmacy.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_in_patient.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report_enh.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescriptions_order.dart';
import 'package:doctor_app_flutter/core/model/get_medication_response_model.dart';
import 'package:doctor_app_flutter/core/model/medical_file_model.dart';
import 'package:doctor_app_flutter/core/model/post_prescrition_req_model.dart';
import 'package:doctor_app_flutter/core/model/search_drug_model.dart';
import 'package:doctor_app_flutter/core/service/prescription_service.dart';
import 'package:doctor_app_flutter/core/service/prescriptions_service.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import 'package:doctor_app_flutter/locator.dart';
import 'package:doctor_app_flutter/models/SOAP/GetAllergiesResModel.dart';
import 'package:doctor_app_flutter/models/SOAP/GetAssessmentResModel.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart';
import 'package:flutter/cupertino.dart';
@ -56,6 +54,25 @@ class PrescriptionViewModel extends BaseViewModel {
? _prescriptionsOrderListClinic
: _prescriptionsOrderListHospital;
List<PrescriotionInPatient> get inPatientPrescription =>
_prescriptionsService.prescriptionInPatientList;
getPrescriptionsInPatient(PatiantInformtion patient) async {
setState(ViewState.Busy);
error="";
await _prescriptionsService.getPrescriptionInPatient(
mrn: patient.patientId, adn: patient.admissionNo);
if (_prescriptionsService.hasError) {
error = "No Prescription Found";
setState(ViewState.Error);
} else {
_filterList();
await _getPrescriptionsOrders();
setState(ViewState.Idle);
}
}
Future getItem({int itemID}) async {
hasError = false;
//_insuranceCardService.clearInsuranceCard();
@ -252,7 +269,7 @@ class PrescriptionViewModel extends BaseViewModel {
if (patientType == "7")
setState(ViewState.ErrorLocal);
else
setState(ViewState.Error);
setState(ViewState.ErrorLocal);
} else {
_filterList();
await _getPrescriptionsOrders();

@ -6,7 +6,6 @@ import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart';
import 'package:doctor_app_flutter/core/model/labs/patient_lab_special_result.dart';
import 'package:doctor_app_flutter/core/model/procedure/categories_procedure.dart';
import 'package:doctor_app_flutter/core/model/procedure/get_ordered_procedure_model.dart';
import 'package:doctor_app_flutter/core/model/procedure/get_procedure_model.dart';
import 'package:doctor_app_flutter/core/model/procedure/post_procedure_req_model.dart';
import 'package:doctor_app_flutter/core/model/procedure/procedure_valadate_model.dart';
import 'package:doctor_app_flutter/core/model/procedure/procedure_valadate_request_model.dart';
@ -44,16 +43,15 @@ class ProcedureViewModel extends BaseViewModel {
List<FinalRadiology> get radiologyList =>
_radiologyService.finalRadiologyList;
List<PatientLabOrders> get patientLabOrdersList => _labsService.patientLabOrdersList;
List<LabOrderResult> get labOrdersResultsList =>
_labsService.labOrdersResultsList;
List<PatientLabOrdersList> _patientLabOrdersListClinic = List();
List<PatientLabOrdersList> _patientLabOrdersListHospital = List();
List<PatientLabOrdersList> get patientLabOrdersList =>
filterType == FilterType.Clinic
? _patientLabOrdersListClinic
: _patientLabOrdersListHospital;
Future getProcedure({int mrn,String patientType}) async {
hasError = false;
@ -137,17 +135,18 @@ class ProcedureViewModel extends BaseViewModel {
} else
setState(ViewState.Idle);
//await getProcedure(mrn: mrn);
}
void getPatientRadOrders(PatiantInformtion patient,{String patientType}) async {
void getPatientRadOrders(PatiantInformtion patient,{String patientType, bool isInPatient = false}) async {
setState(ViewState.Busy);
await _radiologyService.getPatientRadOrders(patient);
await _radiologyService.getPatientRadOrders(patient, isInPatient:isInPatient);
if (_radiologyService.hasError) {
error = _radiologyService.error;
if(patientType=="7")
setState(ViewState.ErrorLocal);
else
setState(ViewState.Error);
setState(ViewState.ErrorLocal);
} else {
_radiologyService.finalRadiologyList.forEach((element) {
List<FinalRadiologyList> finalRadiologyListClinic =
@ -222,59 +221,19 @@ class ProcedureViewModel extends BaseViewModel {
List<LabResultList> labResultLists = List();
List<LabResultList> get labResultListsCoustom {
return labResultLists;
}
void getLabs(PatiantInformtion patient,{bool isArrived}) async {
void getLabs(PatiantInformtion patient, {bool isInpatient = false}) async {
setState(ViewState.Busy);
await _labsService.getPatientLabOrdersList(patient);
await _labsService.getPatientLabOrdersList(patient, isInpatient);
if (_labsService.hasError) {
error = _labsService.error;
if(isArrived)
setState(ViewState.ErrorLocal);
else
setState(ViewState.Error);
} else {
_labsService.patientLabOrdersList.forEach((element) {
List<PatientLabOrdersList> patientLabOrdersClinic =
_patientLabOrdersListClinic
.where((elementClinic) =>
elementClinic.filterName == element.clinicDescription)
.toList();
if (patientLabOrdersClinic.length != 0) {
_patientLabOrdersListClinic[_patientLabOrdersListClinic
.indexOf(patientLabOrdersClinic[0])]
.patientLabOrdersList
.add(element);
} else {
_patientLabOrdersListClinic.add(PatientLabOrdersList(
filterName: element.clinicDescription,
patientDoctorAppointment: element));
}
// doctor list sort via project
List<PatientLabOrdersList> patientLabOrdersHospital =
_patientLabOrdersListHospital
.where(
(elementClinic) =>
elementClinic.filterName == element.projectName,
)
.toList();
if (patientLabOrdersHospital.length != 0) {
_patientLabOrdersListHospital[_patientLabOrdersListHospital
.indexOf(patientLabOrdersHospital[0])]
.patientLabOrdersList
.add(element);
} else {
_patientLabOrdersListHospital.add(PatientLabOrdersList(
filterName: element.projectName,
patientDoctorAppointment: element));
}
});
setState(ViewState.Idle);
}
}

@ -4,10 +4,10 @@ import 'package:connectivity/connectivity.dart';
import 'package:doctor_app_flutter/client/base_app_client.dart';
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart';
import 'package:doctor_app_flutter/models/doctor/clinic_model.dart';
import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/models/doctor/profile_req_Model.dart';
import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart';
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:flutter/cupertino.dart';

@ -20,9 +20,9 @@ class RadiologyViewModel extends BaseViewModel {
? _finalRadiologyListClinic
: _finalRadiologyListHospital;
void getPatientRadOrders(PatiantInformtion patient) async {
void getPatientRadOrders(PatiantInformtion patient, {isInPatient = false}) async {
setState(ViewState.Busy);
await _radiologyService.getPatientRadOrders(patient);
await _radiologyService.getPatientRadOrders(patient, isInPatient:isInPatient);
if (_radiologyService.hasError) {
error = _radiologyService.error;
setState(ViewState.Error);

@ -1,8 +1,6 @@
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/service/sickleave_service.dart';
import 'package:doctor_app_flutter/core/service/medicine_service.dart';
import 'package:doctor_app_flutter/models/sickleave/add_sickleave_request.dart';
import 'package:doctor_app_flutter/models/sickleave/extend_sick_leave_request.dart';
import 'package:doctor_app_flutter/models/sickleave/get_all_sickleave_response.dart';
import '../../locator.dart';
@ -12,6 +10,7 @@ class SickLeaveViewModel extends BaseViewModel {
SickLeaveService _sickLeaveService = locator<SickLeaveService>();
get sickLeaveStatistics => _sickLeaveService.sickLeavestatisitics;
get getAllSIckLeave => _sickLeaveService.getAllSickLeave;
get getAllSIckLeavePatient => _sickLeaveService.getAllSickLeavePatient;
List get allOffTime => _sickLeaveService.getOffTimeList;
List get allReasons => _sickLeaveService.getReasons;
List get coveringDoctors => _sickLeaveService.coveringDoctorsList;
@ -58,6 +57,16 @@ class SickLeaveViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
Future getSickLeavePatient(patientMRN) async {
setState(ViewState.Busy);
await _sickLeaveService.getSickLeavePatient(patientMRN);
if (_sickLeaveService.hasError) {
error = _sickLeaveService.error;
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
Future getRescheduleLeave() async {
setState(ViewState.Busy);
await _sickLeaveService.getRescheduleLeave();

File diff suppressed because one or more lines are too long

@ -261,8 +261,6 @@ class DoctorApp {
IconData(0xe874, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData ovrweight_bmi_1 =
IconData(0xe875, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData powered_by_cs_1 =
IconData(0xe876, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData qr_code_3 =
IconData(0xe877, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData reschedule__1 =
@ -359,8 +357,28 @@ class DoctorApp {
IconData(0xe8a5, 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 123 = IconData(0xe8a8, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData menu =
IconData(0xe8ad, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData obese_bmi_r_1 =
IconData(0xe8a9, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData inpatient =
IconData(0xe959, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData discharge =
IconData(0xe95a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData order_sheets =
IconData(0xe95b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData call =
IconData(0xe95c, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData medical_report =
IconData(0xe95d, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData painscale =
IconData(0xe95e, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData oxygenation =
IconData(0xe95f, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData speechtotext =
IconData(0xe960, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData search_medicines =
IconData(0xe964, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData discharge_patients =
IconData(0xe965, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData referral_discharge =
IconData(0xe966, fontFamily: _kFontFam, fontPackage: _kFontPkg);
}

@ -1,19 +1,13 @@
import 'package:doctor_app_flutter/screens/QR_reader_screen.dart';
import 'package:doctor_app_flutter/screens/home/home_screen.dart';
import 'package:doctor_app_flutter/screens/doctor/doctor_reply_screen.dart';
import 'package:doctor_app_flutter/screens/doctor/message_screen.dart';
import 'package:doctor_app_flutter/screens/doctor/my_schedule_screen.dart';
import 'package:doctor_app_flutter/screens/doctor/services_screen.dart';
import 'package:doctor_app_flutter/screens/prescription/prescription_screen.dart';
import 'package:doctor_app_flutter/screens/home/home_screen.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_drawer_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/bottom_nav_bar.dart';
import 'package:doctor_app_flutter/widgets/shared/user-guid/app_showcase_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'icons_app/doctor_app_icons.dart';
class LandingPage extends StatefulWidget {
@override
@ -51,7 +45,8 @@ class _LandingPageState extends State<LandingPage> {
leading: Builder(
builder: (BuildContext context) {
return IconButton(
icon: Icon(DoctorApp.drawer_icon),
icon: Image.asset('assets/images/menu.png',
height: 50, width: 50),
iconSize: 15,
color: Colors.black,
onPressed: () => Scaffold.of(context).openDrawer(),

@ -5,7 +5,6 @@ import 'package:doctor_app_flutter/core/service/patient_service.dart';
import 'package:doctor_app_flutter/core/service/prescription_service.dart';
import 'package:doctor_app_flutter/core/service/procedure_service.dart';
import 'package:doctor_app_flutter/core/service/sickleave_service.dart';
import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/dashboard_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/imei_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/medical_file_view_model.dart';
@ -15,31 +14,38 @@ import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart';
import 'package:doctor_app_flutter/core/viewModel/sick_leave_view_model.dart';
import 'package:get_it/get_it.dart';
import 'core/service/DischargedPatientService.dart';
import 'core/service/InsuranceCardService.dart';
import 'core/service/MyReferralPatientService.dart';
import 'core/service/PatientMuseService.dart';
import 'core/service/ReferralService.dart';
import 'core/service/SOAP_service.dart';
import 'core/service/labs_service.dart';
import 'core/service/patient-admission-request-service.dart';
import 'core/service/doctor_reply_service.dart';
import 'core/service/labs_service.dart';
import 'core/service/medicine_service.dart';
import 'core/service/patient-admission-request-service.dart';
import 'core/service/patient-doctor-referral-service.dart';
import 'core/service/patient-ucaf-service.dart';
import 'core/service/patient-vital-signs-service.dart';
import 'core/service/patient-doctor-referral-service.dart';
import 'core/service/patient/out_patient_service.dart';
import 'core/service/patientInPatientService.dart';
import 'core/service/prescriptions_service.dart';
import 'core/service/radiology_service.dart';
import 'core/service/referral_patient_service.dart';
import 'core/service/referred_patient_service.dart';
import 'core/service/schedule_service.dart';
import 'core/viewModel/DischargedPatientViewModel.dart';
import 'core/viewModel/InsuranceViewModel.dart';
import 'core/viewModel/PatientMuseViewModel.dart';
import 'core/viewModel/PatientSearchViewModel.dart';
import 'core/viewModel/SOAP_view_model.dart';
import 'core/viewModel/doctor_replay_view_model.dart';
import 'core/viewModel/labs_view_model.dart';
import 'core/viewModel/medicine_view_model.dart';
import 'core/viewModel/patient-admission-request-viewmodel.dart';
import 'core/viewModel/patient-referral-viewmodel.dart';
import 'core/viewModel/patient-ucaf-viewmodel.dart';
import 'core/viewModel/patient-vital-sign-viewmodel.dart';
import 'core/viewModel/patient-referral-viewmodel.dart';
import 'core/viewModel/prescriptions_view_model.dart';
import 'core/viewModel/radiology_view_model.dart';
import 'core/viewModel/referral_view_model.dart';
@ -73,6 +79,11 @@ void setupLocator() {
locator.registerLazySingleton(() => InsuranceCardService());
locator.registerLazySingleton(() => RadiologyService());
locator.registerLazySingleton(() => PrescriptionsService());
locator.registerLazySingleton(() => ReferralService());
locator.registerLazySingleton(() => MyReferralInPatientService());
locator.registerLazySingleton(() => DischargedPatientService());
locator.registerLazySingleton(() => PatientInPatientService());
locator.registerLazySingleton(() => OutPatientService());
/// View Model
locator.registerFactory(() => DoctorReplayViewModel());
@ -97,4 +108,6 @@ void setupLocator() {
locator.registerFactory(() => InsuranceViewModel());
locator.registerFactory(() => RadiologyViewModel());
locator.registerFactory(() => PrescriptionsViewModel());
locator.registerFactory(() => DischargedPatientViewModel());
locator.registerFactory(() => PatientSearchViewModel());
}

@ -36,5 +36,6 @@ enum vitalSignDetails {
heart,
PainScale,
Weight,
Height
Height,
Oxygenation,
}

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/core/provider/robot_provider.dart';
import 'package:doctor_app_flutter/core/viewModel/livecare_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
@ -8,10 +9,10 @@ import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import './config/size_config.dart';
import 'core/viewModel/auth_view_model.dart';
import 'core/viewModel/hospital_view_model.dart';
import './routes.dart';
import 'config/config.dart';
import 'core/viewModel/auth_view_model.dart';
import 'core/viewModel/hospital_view_model.dart';
import 'locator.dart';
void main() async {
@ -42,6 +43,10 @@ class MyApp extends StatelessWidget {
ChangeNotifierProvider<LiveCareViewModel>(
create: (context) => LiveCareViewModel(),
),
StreamProvider.value(
value: RobotProvider().intStream(),
initialData: RobotProvider().setValue({}),
)
],
child: Consumer<ProjectViewModel>(
builder: (context, projectProvider, child) => MaterialApp(

@ -1,4 +1,4 @@
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
class ListDoctorWorkingHoursTable {
DateTime date;
@ -15,7 +15,7 @@ class ListDoctorWorkingHoursTable {
});
ListDoctorWorkingHoursTable.fromJson(Map<String, dynamic> json) {
date = Helpers.convertStringToDate(json['Date']);
date = DateUtils.convertStringToDate(json['Date']);
dayName = json['DayName'];
workingHours = json['WorkingHours'];
projectName = json['ProjectName'];

@ -1,4 +1,4 @@
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
@ -70,7 +70,7 @@ class ListGtMyPatientsQuestions {
patientID = json['PatientID'];
doctorID = json['DoctorID'];
requestType = json['RequestType'];
requestDate = Helpers.convertStringToDate(json['RequestDate']) ;
requestDate = DateUtils.convertStringToDate(json['RequestDate']) ;
requestTime = json['RequestTime'];
remarks = json['Remarks'];
status = json['Status'];

@ -1,4 +1,4 @@
import 'package:doctor_app_flutter/config/config.dart';
class RequestSchedule {
int projectID;

@ -1,11 +1,6 @@
/*
*@author: Elham Rababah
*@Date:6/5/2020
*@param:
*@return:LabOrdersResModel
*@desc: LabOrdersResModel class
*/
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
class LabOrdersResModel {
String setupID;
@ -67,7 +62,7 @@ class LabOrdersResModel {
status = json['Status'];
createdBy = json['CreatedBy'];
createdByN = json['CreatedByN'];
createdOn = Helpers.convertStringToDate(json['CreatedOn']);
createdOn = DateUtils.convertStringToDate(json['CreatedOn']);
editedBy = json['EditedBy'];
editedByN = json['EditedByN'];
editedOn = json['EditedOn'];

@ -1,4 +1,4 @@
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
class MyReferralPatientModel {
int projectID;
@ -142,7 +142,7 @@ class MyReferralPatientModel {
referralResponseOn = json['ReferralResponseOn'];
priority = json['Priority'];
frequency = json['Frequency'];
mAXResponseTime = Helpers.convertStringToDate(json['MAXResponseTime']);
mAXResponseTime = DateUtils.convertStringToDate(json['MAXResponseTime']);
age = json['Age'];
frequencyDescription = json['FrequencyDescription'];
genderDescription = json['GenderDescription'];

@ -1,6 +1,4 @@
import 'dart:convert';
import 'package:doctor_app_flutter/util/helpers.dart';
class MyReferredPatientModel {
String rowID;
@ -62,8 +60,11 @@ class MyReferredPatientModel {
String nursingStationName;
String priorityDescription;
String referringClinicDescription;
String referralDoctorName;
String referralClinicDescription;
String referringDoctorName;
bool isReferralDoctorSameBranch;
String referralStatusDesc;
MyReferredPatientModel({
this.rowID,
@ -127,6 +128,8 @@ class MyReferredPatientModel {
this.referringClinicDescription,
this.referringDoctorName,
this.isReferralDoctorSameBranch,
this.referralDoctorName,
this.referralClinicDescription,this.referralStatusDesc
});
MyReferredPatientModel.fromJson(Map<String, dynamic> json) {
@ -190,6 +193,9 @@ class MyReferredPatientModel {
priorityDescription = json['PriorityDescription'];
referringClinicDescription = json['ReferringClinicDescription'];
referringDoctorName = json['ReferringDoctorName'];
referralDoctorName = json['ReferralDoctorName'];
referralClinicDescription = json['ReferralClinicDescription'];
referralStatusDesc = json['ReferralStatusDesc'];
}
Map<String, dynamic> toJson() {
@ -254,6 +260,8 @@ class MyReferredPatientModel {
data['PriorityDescription'] = this.priorityDescription;
data['ReferringClinicDescription'] = this.referringClinicDescription;
data['ReferringDoctorName'] = this.referringDoctorName;
data['ReferralDoctorName'] = this.referralDoctorName;
data['ReferralClinicDescription'] = this.referralClinicDescription;
return data;
}
}

@ -11,8 +11,8 @@ class PatiantInformtion {
String arrivedOn;
int clinicGroupId;
String companyName;
Null dischargeStatus;
Null doctorDetails;
dynamic dischargeStatus;
dynamic doctorDetails;
int doctorId;
String endTime;
int episodeNo;
@ -60,6 +60,8 @@ class PatiantInformtion {
int patientStatusType;
int visitTypeId;
String startTimes;
String dischargeDate;
int status;
PatiantInformtion(
{this.patientDetails,
this.projectId,
@ -119,7 +121,7 @@ class PatiantInformtion {
this.nationalityFlagURL,
this.patientStatusType,
this.visitTypeId,
this.startTimes});
this.startTimes,this.dischargeDate,this.status});
factory PatiantInformtion.fromJson(Map<String, dynamic> json) =>
PatiantInformtion(
@ -172,28 +174,30 @@ class PatiantInformtion {
genderDescription: json["GenderDescription"],
nursingStationName: json["NursingStationName"],
appointmentDate: json["AppointmentDate"] ?? '',
startTime: json["startTime"],
startTime: json["startTime"]??json['StartTime'],
appointmentNo: json['appointmentNo'] ?? json['AppointmentNo'],
appointmentType: json['appointmentType'],
appointmentTypeId: json['appointmentTypeId'],
arrivedOn: json['arrivedOn'],
appointmentTypeId: json['appointmentTypeId']?? json['appointmentTypeid'],
arrivedOn: json['ArrivedOn'] ?? json['arrivedOn'] ?? json['ArrivedOn'],
clinicGroupId: json['clinicGroupId'],
companyName: json['companyName'],
dischargeStatus: json['dischargeStatus'],
doctorDetails: json['doctorDetails'],
endTime: json['endTime'],
episodeNo: json['episodeNo'] ?? json['EpisodeID'],
episodeNo: json['episodeNo'] ?? json['EpisodeID'] ?? json['EpisodeNo'],
fallRiskScore: json['fallRiskScore'],
isSigned: json['isSigned'],
medicationOrders: json['medicationOrders'],
nationality: json['nationality'] ?? json['NationalityNameN'],
patientMRN: json['patientMRN'] ?? json['PatientMRN'],
visitType: json['visitType'] ?? json['visitType'],
visitType: json['visitType'] ?? json['visitType']?? json['visitType'],
nationalityFlagURL:
json['NationalityFlagURL'] ?? json['NationalityFlagURL'],
patientStatusType:
json['patientStatusType'] ?? json['patientStatusType'],
visitTypeId: json['visitTypeId'] ?? json['visitTypeId'],
json['patientStatusType'] ?? json['PatientStatusType'],
visitTypeId: json['visitTypeId'] ?? json['visitTypeId'] ?? json['visitTypeid'],
startTimes: json['StartTime'] ?? json['StartTime'],
dischargeDate: json['DischargeDate'] ,
status: json['Status'] ,
);
}

@ -1,4 +1,4 @@
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
class PrescriptionReportForInPatient {
int admissionNo;
@ -125,7 +125,7 @@ class PrescriptionReportForInPatient {
orderNo = json['OrderNo'];
patientID = json['PatientID'];
pharmacyRemarks = json['PharmacyRemarks'];
prescriptionDatetime = Helpers.convertStringToDate(json['PrescriptionDatetime']);
prescriptionDatetime = DateUtils.convertStringToDate(json['PrescriptionDatetime']);
prescriptionNo = json['PrescriptionNo'];
processedBy = json['ProcessedBy'];
projectID = json['ProjectID'];
@ -138,11 +138,11 @@ class PrescriptionReportForInPatient {
routeId = json['RouteId'];
routeN = json['RouteN'];
setupID = json['SetupID'];
startDatetime = Helpers.convertStringToDate(json['StartDatetime']) ;
startDatetime = DateUtils.convertStringToDate(json['StartDatetime']) ;
status = json['Status'];
statusDescription = json['StatusDescription'];
statusDescriptionN = json['StatusDescriptionN'];
stopDatetime = Helpers.convertStringToDate(json['StopDatetime']);
stopDatetime = DateUtils.convertStringToDate(json['StopDatetime']);
unitofMeasurement = json['UnitofMeasurement'];
unitofMeasurementDescription = json['UnitofMeasurementDescription'];
unitofMeasurementDescriptionN = json['UnitofMeasurementDescriptionN'];

@ -1,4 +1,4 @@
import 'package:doctor_app_flutter/config/config.dart';
class RequestMyReferralPatientModel {
int projectID;

@ -35,7 +35,7 @@ class VitalSignHistory {
var triageCategory;
var gCScore;
var lineItemNo;
DateTime vitalSignDate;
var vitalSignDate;
var actualTimeTaken;
var sugarLevel;
var fBS;

@ -5,7 +5,7 @@
*@return:VitalSignResModel
*@desc: VitalSignResModel class
*/
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
class VitalSignResModel {
var transNo;
@ -170,7 +170,7 @@ class VitalSignResModel {
triageCategory = json['TriageCategory'];
gCScore = json['GCScore'];
lineItemNo = json['LineItemNo'];
vitalSignDate = json['VitalSignDate'] !=null? Helpers.convertStringToDate(json['VitalSignDate']): new DateTime.now();
vitalSignDate = json['VitalSignDate'] !=null? DateUtils.convertStringToDate(json['VitalSignDate']): new DateTime.now();
actualTimeTaken = json['ActualTimeTaken'];
sugarLevel = json['SugarLevel'];
fBS = json['FBS'];

@ -5,7 +5,6 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'config/config.dart';
import 'landing_page.dart';
class RootPage extends StatelessWidget {

@ -4,94 +4,49 @@ import 'package:doctor_app_flutter/screens/patients/ECGPage.dart';
import 'package:doctor_app_flutter/screens/patients/insurance_approval_screen_patient.dart';
import 'package:doctor_app_flutter/screens/patients/profile/UCAF/UCAF-detail-screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/UCAF/UCAF-input-screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/insurance_approvals_screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/lab_result/labs_home_page.dart';
import 'package:doctor_app_flutter/screens/patients/profile/patient_orders_screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/progress_note_screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/radiology/radiology_home_page.dart';
import 'package:doctor_app_flutter/screens/patients/profile/refer_patient_screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/note/progress_note_screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/prescriptions/in_patient_prescription_details_screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/radiology/radiology_home_page.dart';
import 'package:doctor_app_flutter/screens/patients/profile/referral/refer-patient-screen-in-patient.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/update_soap_index.dart';
import 'package:doctor_app_flutter/screens/prescription/prescription_screen_history.dart';
import 'package:doctor_app_flutter/screens/prescription/prescriptions_page.dart';
import 'package:doctor_app_flutter/screens/procedures/procedure_screen.dart';
import 'package:doctor_app_flutter/screens/sick-leave/add-sickleave.dart';
import 'package:doctor_app_flutter/screens/sick-leave/show-sickleave.dart';
import 'package:doctor_app_flutter/screens/sick-leave/sick_leave.dart';
import 'package:doctor_app_flutter/screens/procedures/procedure_screen.dart';
import './screens/QR_reader_screen.dart';
import './screens/auth/change_password_screen.dart';
import './screens/auth/login_screen.dart';
import './screens/auth/verification_methods_screen.dart';
import './screens/auth/verify_account_screen.dart';
import './screens/blood_bank_screen.dart';
import './screens/doctor/message_screen.dart';
import './screens/doctor/my_schedule_screen.dart';
import './screens/doctor/services_screen.dart';
import './screens/medicine/medicine_search_screen.dart';
import './screens/medicine/pharmacies_list_screen.dart';
import './screens/patients/patient_search_screen.dart';
import './screens/patients/patients_referred_screen.dart';
import './screens/patients/patients_screen.dart';
import './screens/patients/profile/insurance_approvals_screen.dart';
import './screens/patients/profile/lab_result/lab_orders_screen.dart';
import './screens/patients/profile/patient_orders_screen.dart';
import './screens/patients/profile/patient_profile_screen.dart';
import './screens/patients/profile/prescriptions/prescriptions_screen.dart';
import './screens/patients/profile/progress_note_screen.dart';
import './screens/patients/profile/radiology/radiology_screen.dart';
import './screens/patients/profile/vital_sign/vital_sign_details_screen.dart';
import './screens/patients/profile/vital_sign/vital_sign_item_details_screen.dart';
import './screens/profile_screen.dart';
import './screens/settings/settings_screen.dart';
import 'landing_page.dart';
import 'screens/doctor/doctor_reply_screen.dart';
import 'screens/live_care/panding_list.dart';
import 'screens/patients/profile/admission-request/admission-request-detail-screen.dart';
import 'screens/patients/profile/admission-request/admission-request-first-screen.dart';
import 'screens/patients/profile/admission-request/admission-request-third-screen.dart';
import 'screens/patients/profile/admission-request/admission-request_second-screen.dart';
import 'screens/patients/profile/note/progress_note_screen.dart';
import 'screens/patients/profile/referral/my-referral-detail-screen.dart';
import 'screens/patients/profile/referral/refer-patient-screen.dart';
import 'screens/prescription/prescription_screen.dart';
import 'screens/patients/profile/vital_sign/vital-signs-screen.dart';
const String INIT_ROUTE = ROOT;
const String ROOT = 'root';
const String HOME = '/';
const String LOGIN = 'login';
const String PROFILE = 'profile';
const String CHANGE_PASSWORD = 'change-password';
const String VERIFY_ACCOUNT = 'verify-account';
const String VERIFICATION_METHODS = 'verification-methods';
const String MY_SCHEDULE = 'my-schedule';
const String QR_READER = 'qr-reader';
const String PATIENT_SEARCH = 'patients/patient-search';
const String PATIENTS = 'patients/patients';
const String PATIENTS_PROFILE = 'patients/patients-profile';
const String PATIENTS_REFERRED = 'patients/patients-referred';
const String BLOOD_BANK = 'blood-bank';
const String DOCTOR_REPLY = 'doctor-reply';
const String MEDICINE_SEARCH = 'medicine/medicine-search';
const String PHARMACIES_LIST = 'medicine/pharmacies-list';
const String MESSAGES = 'messages';
const String SERVICES = 'services';
const String SETTINGS = 'settings';
const String VITAL_SIGN = 'patients/vital-sign';
const String LAB_ORDERS = 'patients/lab_orders';
const String IN_PATIENTS_PROFILE = 'inpatients/patients-profile';
const String LAB_RESULT = 'patients/lab_result';
const String PRESCRIPTIONS = 'patients/prescription';
const String MEDICAL_FILE = 'patients/radiology';
const String PROGRESS_NOTE = 'patients/progress-note';
const String REFER_PATIENT = 'patients/refer-patient';
const String ORDER_NOTE = 'patients/order-note';
const String MY_REFERRAL_DETAIL = 'my_referral_detail';
const String REFER_PATIENT_TO_DOCTOR = 'patients/refer-to-doctor';
const String PATIENT_ORDERS = 'patients/patient_orders';
const String PATIENT_INSURANCE_APPROVALS = 'patients/patient_insurance_approvals';
const String PATIENT_INSURANCE_APPROVALS_NEW = 'patients/patient_insurance_approvals_new';
const String REFER_IN_PATIENT_TO_DOCTOR = 'patients/refer-in-patient-to-doctor';
const String PATIENT_INSURANCE_APPROVALS_NEW =
'patients/patient_insurance_approvals_new';
const String VITAL_SIGN_DETAILS = 'patients/vital-sign-details';
const String PATIENT_VITAL_SIGN = 'patients/vital-sign-data';
const String CREATE_EPISODE = 'patients/create-episode';
const String UPDATE_EPISODE = 'patients/update-episode';
const String PATIENT_ADMISSION_REQUEST = 'patients/admission-request';
@ -100,83 +55,43 @@ const String PATIENT_ADMISSION_REQUEST_3 = 'patients/admission-request-third';
const String PATIENT_UCAF_REQUEST = 'patients/ucaf';
const String PATIENT_UCAF_DETAIL = 'patients/ucaf/detail';
const String PATIENT_ECG = 'patients/ecg';
const String BODY_MEASUREMENTS = 'patients/body-measurements';
const String IN_PATIENT_PRESCRIPTIONS_DETAILS = 'patients/prescription-details';
// const String VIDEO_CALL = 'video-call';
const String LIVECARE_PENDING_LIST = 'livecare-pendinglist';
const String ORDER_PRESCRIPTION = 'prescription/prescriptionsss';
const String ORDER_PRESCRIPTION_NEW = 'prescription/prescription_new';
const String ORDER_PRESCRIPTION_HISTORY = 'prescription/prescriptionsssH';
const String ORDER_PROCEDURE = 'procedure/procedure';
// const String LIVECARE_END_DIALOG = 'video-call/EndCallDialogBox';
const String PATIENT_SICKLEAVE = 'patients/patient_sickleave';
const String ADD_SICKLEAVE = 'add-sickleave';
const String SHOW_SICKLEAVE = 'show-sickleave';
const String RADIOLOGY = 'radiology';
const String RADIOLOGY_PATIENT = 'radiology-patient';
//todo: change the routing way.
var routes = {
ROOT: (_) => RootPage(),
HOME: (_) => LandingPage(),
LOGIN: (_) => Loginsreen(),
PROFILE: (_) => ProfileScreen(),
MY_SCHEDULE: (_) => MyScheduleScreen(),
PATIENT_SEARCH: (_) => PatientSearchScreen(),
PATIENTS_REFERRED: (_) => PatientReferredScreen(),
PATIENTS: (_) => PatientsScreen(),
QR_READER: (_) => QrReaderScreen(),
BLOOD_BANK: (_) => BloodBankScreen(),
DOCTOR_REPLY: (_) => DoctorReplyScreen(),
MEDICINE_SEARCH: (_) => MedicineSearchScreen(),
SETTINGS: (_) => SettingsScreen(),
CHANGE_PASSWORD: (_) => ChangePasswordScreen(),
VERIFY_ACCOUNT: (_) => VerifyAccountScreen(),
VERIFICATION_METHODS: (_) => VerificationMethodsScreen(),
PATIENTS_PROFILE: (_) => PatientProfileScreen(),
PHARMACIES_LIST: (_) => PharmaciesListScreen(
itemID: null,
),
MESSAGES: (_) => MessagesScreen(),
SERVICES: (_) => ServicesScreen(),
LAB_ORDERS: (_) => LabOrdersScreen(),
LAB_RESULT: (_) => LabsHomePage(),
PRESCRIPTIONS: (_) => PrescriptionScreen(),
MEDICAL_FILE: (_) => MedicalFilePage(),
PROGRESS_NOTE: (_) => ProgressNoteScreen(),
REFER_PATIENT: (_) => ReferPatientScreen(),
PROGRESS_NOTE: (_) => ProgressNoteScreen(visitType: 5,),
ORDER_NOTE: (_) => ProgressNoteScreen(visitType: 3,),
REFER_PATIENT_TO_DOCTOR: (_) => PatientMakeReferralScreen(),
PATIENT_ORDERS: (_) => PatientsOrdersScreen(),
PATIENT_INSURANCE_APPROVALS: (_) => InsuranceApprovalsScreen(),
REFER_IN_PATIENT_TO_DOCTOR: (_) => PatientMakeInPatientReferralScreen(),
PATIENT_INSURANCE_APPROVALS_NEW: (_) => InsuranceApprovalScreenNew(),
VITAL_SIGN_DETAILS: (_) => VitalSignDetailsScreen(),
PATIENT_VITAL_SIGN: (_) => PatientVitalSignScreen(),
RADIOLOGY: (_) => RadiologyScreen(),
RADIOLOGY_PATIENT: (_) => RadiologyHomePage(),
PATIENT_ADMISSION_REQUEST: (_) => AdmissionRequestFirstScreen(),
PATIENT_ADMISSION_REQUEST_2: (_) => AdmissionRequestSecondScreen(),
PATIENT_ADMISSION_REQUEST_3: (_) => AdmissionRequestThirdScreen(),
// PATIENT_ADMISSION_REQUEST: (_) => AdmissionRequestDetailScreen(),
CREATE_EPISODE: (_) => UpdateSoapIndex(
isUpdate: true,
),
UPDATE_EPISODE: (_) => UpdateSoapIndex(
isUpdate: true,
),
BODY_MEASUREMENTS: (_) => VitalSignItemDetailsScreen(),
IN_PATIENT_PRESCRIPTIONS_DETAILS: (_) => InpatientPrescriptionDetailsScreen(),
// VIDEO_CALL: (_) => VideoCallPage(patientData: null),
LIVECARE_PENDING_LIST: (_) => LiveCarePandingListScreen(),
// LIVECARE_END_DIALOG: (_) => EndCallDialogBox(),
PATIENT_SICKLEAVE: (_) => SickLeaveScreen(),
ADD_SICKLEAVE: (_) => AddSickLeavScreen(),
SHOW_SICKLEAVE: (_) => ShowSickLeaveScreen(),
ORDER_PRESCRIPTION: (_) => NewPrescriptionScreen(),
ORDER_PRESCRIPTION_NEW: (_) => PrescriptionsPage(),
ORDER_PRESCRIPTION_HISTORY: (_) => NewPrescriptionHistoryScreen(),
ORDER_PROCEDURE: (_) => ProcedureScreen(),
// LIVECARE_END_DIALOG: (_) => EndCallDialogBox()
MY_REFERRAL_DETAIL: (_) => MyReferralDetailScreen(),
PATIENT_UCAF_REQUEST: (_) => UCAFInputScreen(),
PATIENT_UCAF_DETAIL: (_) => UcafDetailScreen(),

@ -9,9 +9,9 @@ import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_button.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -93,11 +93,11 @@ class _QrReaderScreenState extends State<QrReaderScreen> {
SizedBox(
height: 35,
),
Button(
onTap: () {
AppButton(
title : TranslationBase.of(context).scanQr,
onPressed: () {
_scanQrAndGetPatient(context, model);
},
title: TranslationBase.of(context).scanQr,
loading: isLoading,
icon: Image.asset('assets/images/qr_code_white.png'),
),
@ -210,7 +210,7 @@ class _QrReaderScreenState extends State<QrReaderScreen> {
setState(() {
isLoading = false;
});
helpers.showErrorToast(error.message);
Helpers.showErrorToast(error.message);
//DrAppToastMsg.showErrorToast(error);
});
}

@ -2,6 +2,7 @@ import 'package:doctor_app_flutter/lookups/auth_lookup.dart';
import 'package:doctor_app_flutter/widgets/auth/auth_header.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import '../../widgets/auth/change_password.dart';
class ChangePasswordScreen extends StatelessWidget {

@ -4,7 +4,6 @@ import 'dart:io';
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/core/service/auth_service.dart';
import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/imei_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/screens/auth/verification_methods_screen.dart';
@ -19,10 +18,8 @@ import 'package:shared_preferences/shared_preferences.dart';
import '../../lookups/auth_lookup.dart';
import '../../util/dr_app_shared_pref.dart';
import '../../widgets/auth/auth_header.dart';
import '../../widgets/auth/known_user_login.dart';
import '../../widgets/auth/login_form.dart';
import '../../widgets/shared/app_scaffold_widget.dart';
import '../../widgets/shared/dr_app_circular_progress_Indeicator.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
@ -122,7 +119,7 @@ class _LoginsreenState extends State<Loginsreen> {
height: 40,
),
LoginForm(
changeLoadingStata: changeLoadingStata,
model: model,
),
],
)

@ -2,8 +2,6 @@ import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import '../../lookups/auth_lookup.dart';
import '../../widgets/auth/auth_header.dart';
import '../../widgets/auth/verification_methods.dart';
/*

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

Loading…
Cancel
Save