Compare commits

..

No commits in common. 'development' and 'pharmacy_redesign' have entirely different histories.

@ -28,14 +28,14 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android { android {
compileSdkVersion 30 compileSdkVersion 30
signingConfigs { // signingConfigs {
release { // release {
storeFile file('/Users/nextwo/Desktop/Elham/keys/doctor app key') // storeFile file('C:\\Users\\admin\\Downloads\\DQKey.jks')
storePassword 'Hmgdoctor1234' // storePassword 'HmGsa123'
keyAlias 'hmgdoctor' // keyAlias 'key'
keyPassword 'Hmgdoctor1234' // keyPassword 'HmGsa123'
} // }
} // }
sourceSets { sourceSets {
main.java.srcDirs += 'src/main/kotlin' main.java.srcDirs += 'src/main/kotlin'
@ -59,8 +59,7 @@ android {
buildTypes { buildTypes {
release { release {
// TODO: Add your own signing config for the release build. // TODO: Add your own signing config for the release build.
signingConfig signingConfigs.release signingConfig signingConfigs.debug
} }
debug { debug {
// Signing with the debug keys for now, so `flutter run --release` works. // Signing with the debug keys for now, so `flutter run --release` works.

@ -310,7 +310,7 @@
"${BUILT_PRODUCTS_DIR}/speech_to_text/speech_to_text.framework", "${BUILT_PRODUCTS_DIR}/speech_to_text/speech_to_text.framework",
"${BUILT_PRODUCTS_DIR}/sqflite/sqflite.framework", "${BUILT_PRODUCTS_DIR}/sqflite/sqflite.framework",
"${BUILT_PRODUCTS_DIR}/url_launcher_ios/url_launcher_ios.framework", "${BUILT_PRODUCTS_DIR}/url_launcher_ios/url_launcher_ios.framework",
"${BUILT_PRODUCTS_DIR}/video_player_avfoundation/video_player_avfoundation.framework", "${BUILT_PRODUCTS_DIR}/video_player/video_player.framework",
"${BUILT_PRODUCTS_DIR}/wakelock/wakelock.framework", "${BUILT_PRODUCTS_DIR}/wakelock/wakelock.framework",
"${BUILT_PRODUCTS_DIR}/webview_flutter_wkwebview/webview_flutter_wkwebview.framework", "${BUILT_PRODUCTS_DIR}/webview_flutter_wkwebview/webview_flutter_wkwebview.framework",
); );
@ -352,7 +352,7 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/speech_to_text.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/speech_to_text.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/sqflite.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/sqflite.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/url_launcher_ios.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/url_launcher_ios.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/video_player_avfoundation.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/video_player.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/wakelock.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/wakelock.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/webview_flutter_wkwebview.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/webview_flutter_wkwebview.framework",
); );

@ -2,7 +2,7 @@
import 'dart:io' show Platform; import 'dart:io' show Platform;
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.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/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';

@ -9,8 +9,8 @@ import 'package:doctor_app_flutter/core/service/NavigationService.dart';
import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart';
import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart'; import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/utils/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:http/http.dart' as http; import 'package:http/http.dart' as http;
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -19,7 +19,7 @@ import '../locator.dart';
import '../routes.dart'; import '../routes.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
Utils helpers = new Utils(); Helpers helpers = new Helpers();
class BaseAppClient { class BaseAppClient {
//TODO change the post fun to nun static when you change all service //TODO change the post fun to nun static when you change all service
@ -40,12 +40,10 @@ class BaseAppClient {
try { try {
Map profile = await sharedPref.getObj(DOCTOR_PROFILE); Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
String token = await sharedPref.getString(TOKEN); String token = await sharedPref.getString(TOKEN);
if (profile != null) { if (profile != null) {
DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile); DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
if (body['DoctorID'] == null) { if (body['DoctorID'] == null)
body['DoctorID'] = doctorProfile?.doctorID; body['DoctorID'] = doctorProfile?.doctorID;
}
if (body['DoctorID'] == "") body['DoctorID'] = null; if (body['DoctorID'] == "") body['DoctorID'] = null;
if (body['EditedBy'] == null) if (body['EditedBy'] == null)
body['EditedBy'] = doctorProfile?.doctorID; body['EditedBy'] = doctorProfile?.doctorID;
@ -55,19 +53,17 @@ class BaseAppClient {
if (body['ClinicID'] == null) if (body['ClinicID'] == null)
body['ClinicID'] = doctorProfile?.clinicID; body['ClinicID'] = doctorProfile?.clinicID;
} else { }
String doctorID = await sharedPref.getString(DOCTOR_ID);
if (body['DoctorID'] == '') { if (body['DoctorID'] == '') {
body['DoctorID'] = null; body['DoctorID'] = null;
} else if (doctorID != null) body['DoctorID'] = int.parse(doctorID);
} }
if (body['EditedBy'] == '') { if (body['EditedBy'] == '') {
body.remove("EditedBy"); body.remove("EditedBy");
} }
if (body['TokenID'] == null) { if (body['TokenID'] == null) {
body['TokenID'] = token ?? ''; body['TokenID'] = token ?? '';
} }
// body['TokenID'] = "@dm!n" ?? '';
if (!isFallLanguage) { if (!isFallLanguage) {
String lang = await sharedPref.getString(APP_Language); String lang = await sharedPref.getString(APP_Language);
@ -77,6 +73,7 @@ class BaseAppClient {
body['LanguageID'] = 2; body['LanguageID'] = 2;
} }
body['stamp'] = DateTime.now().toIso8601String(); body['stamp'] = DateTime.now().toIso8601String();
// if(!body.containsKey("IPAdress"))
body['IPAdress'] = IP_ADDRESS; body['IPAdress'] = IP_ADDRESS;
if (body['VersionID'] == null) { if (body['VersionID'] == null) {
body['VersionID'] = VERSION_ID; body['VersionID'] = VERSION_ID;
@ -112,7 +109,7 @@ class BaseAppClient {
print("Body : ${json.encode(body)}"); print("Body : ${json.encode(body)}");
var asd = json.encode(body); var asd = json.encode(body);
var asd2; var asd2;
if (await Utils.checkConnection()) { if (await Helpers.checkConnection()) {
final response = await http.post(Uri.parse(url), final response = await http.post(Uri.parse(url),
body: json.encode(body), body: json.encode(body),
headers: { headers: {
@ -121,7 +118,7 @@ class BaseAppClient {
}); });
final int statusCode = response.statusCode; final int statusCode = response.statusCode;
if (statusCode < 200 || statusCode >= 400) { if (statusCode < 200 || statusCode >= 400) {
onFailure(Utils.generateContactAdminMsg(), statusCode); onFailure(Helpers.generateContactAdminMsg(), statusCode);
} else { } else {
var parsed = json.decode(response.body.toString()); var parsed = json.decode(response.body.toString());
if (parsed['ErrorType'] == 4) { if (parsed['ErrorType'] == 4) {
@ -137,7 +134,7 @@ class BaseAppClient {
listen: false) listen: false)
.logout(); .logout();
Utils.showErrorToast('Your session expired Please login again'); Helpers.showErrorToast('Your session expired Please login again');
locator<NavigationService>().pushNamedAndRemoveUntil(ROOT); locator<NavigationService>().pushNamedAndRemoveUntil(ROOT);
} }
if (isAllowAny) { if (isAllowAny) {
@ -176,14 +173,6 @@ class BaseAppClient {
}; };
String token = await sharedPref.getString(TOKEN); String token = await sharedPref.getString(TOKEN);
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
if (profile != null) {
DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
if (body['DoctorID'] == null) {
body['DoctorID'] = doctorProfile?.doctorID;
}
}
var languageID = var languageID =
await sharedPref.getStringWithDefaultValue(APP_Language, 'en'); await sharedPref.getStringWithDefaultValue(APP_Language, 'en');
body['SetupID'] = body.containsKey('SetupID') body['SetupID'] = body.containsKey('SetupID')
@ -231,7 +220,7 @@ class BaseAppClient {
: PATIENT_TYPE_ID : PATIENT_TYPE_ID
: PATIENT_TYPE_ID; : PATIENT_TYPE_ID;
body['TokenID'] = body.containsKey('TokenID') ? body['TokenID']??token : token; body['TokenID'] = body.containsKey('TokenID') ? body['TokenID'] : token;
body['PatientID'] = body['PatientID'] != null body['PatientID'] = body['PatientID'] != null
? body['PatientID'] ? body['PatientID']
: patient.patientId ?? patient.patientMRN; : patient.patientId ?? patient.patientMRN;
@ -249,7 +238,7 @@ class BaseAppClient {
print("Body : ${json.encode(body)}"); print("Body : ${json.encode(body)}");
var asd = json.encode(body); var asd = json.encode(body);
var asd2; var asd2;
if (await Utils.checkConnection()) { if (await Helpers.checkConnection()) {
final response = await http.post(Uri.parse(url.trim()), final response = await http.post(Uri.parse(url.trim()),
body: json.encode(body), headers: headers); body: json.encode(body), headers: headers);
final int statusCode = response.statusCode; final int statusCode = response.statusCode;
@ -346,7 +335,7 @@ class BaseAppClient {
} }
} }
if (error == null || error == "null" || error == "null\n") { if (error == null || error == "null" || error == "null\n") {
return Utils.generateContactAdminMsg(); return Helpers.generateContactAdminMsg();
} }
return error; return error;
} }

@ -13,6 +13,8 @@ const PATIENT_PROGRESS_NOTE_URL =
"Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient"; "Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient";
const PATIENT_INSURANCE_APPROVALS_URL = const PATIENT_INSURANCE_APPROVALS_URL =
"Services/DoctorApplication.svc/REST/GetApprovalStatusForInpatient"; "Services/DoctorApplication.svc/REST/GetApprovalStatusForInpatient";
const PATIENT_ORDERS_URL =
"Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient";
const PATIENT_REFER_TO_DOCTOR_URL = const PATIENT_REFER_TO_DOCTOR_URL =
"Services/DoctorApplication.svc/REST/ReferToDoctor"; "Services/DoctorApplication.svc/REST/ReferToDoctor";
const PATIENT_GET_DOCTOR_BY_CLINIC_URL = const PATIENT_GET_DOCTOR_BY_CLINIC_URL =
@ -42,6 +44,7 @@ const GET_PATIENT_VITAL_SIGN_DATA =
const GET_PATIENT_LAB_OREDERS = const GET_PATIENT_LAB_OREDERS =
'Services/DoctorApplication.svc/REST/GetPatientLabOreders'; 'Services/DoctorApplication.svc/REST/GetPatientLabOreders';
const GET_PRESCRIPTION = 'Services/Patients.svc/REST/GetPrescriptionApptList'; const GET_PRESCRIPTION = 'Services/Patients.svc/REST/GetPrescriptionApptList';
const GET_RADIOLOGY = 'Services/DoctorApplication.svc/REST/GetPatientRadResult';
const GET_LIVECARE_PENDINGLIST = const GET_LIVECARE_PENDINGLIST =
'Services/DoctorApplication.svc/REST/GetPendingPatientER'; 'Services/DoctorApplication.svc/REST/GetPendingPatientER';
@ -135,7 +138,7 @@ const ADD_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/PostSickLeave';
const GET_SICK_LEAVE = 'Services/Patients.svc/REST/GetPatientSickLeave'; const GET_SICK_LEAVE = 'Services/Patients.svc/REST/GetPatientSickLeave';
const EXTEND_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/ExtendSickLeave'; const EXTEND_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/ExtendSickLeave';
const GET_MASTER_LOOKUP_LIST = 'Services/DoctorApplication.svc/REST/GetMasterLookUpList'; const GET_OFFTIME = 'Services/DoctorApplication.svc/REST/GetMasterLookUpList';
const GET_COVERING_DOCTORS = const GET_COVERING_DOCTORS =
'Services/DoctorApplication.svc/REST/GetCoveringDoctor'; 'Services/DoctorApplication.svc/REST/GetCoveringDoctor';
const ADD_RESCHDEULE = 'Services/DoctorApplication.svc/REST/PostRequisition'; const ADD_RESCHDEULE = 'Services/DoctorApplication.svc/REST/PostRequisition';
@ -152,6 +155,8 @@ const GET_PROCEDURE_LIST =
'Services/DoctorApplication.svc/REST/GetOrderedProcedure'; 'Services/DoctorApplication.svc/REST/GetOrderedProcedure';
const POST_PROCEDURE_LIST = 'Services/DoctorApplication.svc/REST/PostProcedure'; 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 = const GET_PATIENT_IN_PATIENT_LIST =
'Services/DoctorApplication.svc/REST/GetMyInPatient'; 'Services/DoctorApplication.svc/REST/GetMyInPatient';
@ -175,6 +180,8 @@ const GET_PATIENT_LAB_ORDERS_RESULT_HISTORY_BY_DESCRIPTION =
// SOAP // SOAP
const GET_ALLERGIES = 'Services/DoctorApplication.svc/REST/GetAllergies'; const GET_ALLERGIES = 'Services/DoctorApplication.svc/REST/GetAllergies';
const GET_MASTER_LOOKUP_LIST =
'Services/DoctorApplication.svc/REST/GetMasterLookUpList';
const POST_EPISODE = 'Services/DoctorApplication.svc/REST/PostEpisode'; const POST_EPISODE = 'Services/DoctorApplication.svc/REST/PostEpisode';
const POST_EPISODE_FOR_IN_PATIENT = const POST_EPISODE_FOR_IN_PATIENT =
@ -201,13 +208,15 @@ const PATCH_PROGRESS_NOTE =
'Services/DoctorApplication.svc/REST/PatchProgressNote'; 'Services/DoctorApplication.svc/REST/PatchProgressNote';
const PATCH_ASSESSMENT = 'Services/DoctorApplication.svc/REST/PatchAssessment'; const PATCH_ASSESSMENT = 'Services/DoctorApplication.svc/REST/PatchAssessment';
const GET_ALLERGY = 'Services/DoctorApplication.svc/REST/GetAllergies';
const GET_HISTORY = 'Services/DoctorApplication.svc/REST/GetHistory'; const GET_HISTORY = 'Services/DoctorApplication.svc/REST/GetHistory';
const GET_CHIEF_COMPLAINT = const GET_CHIEF_COMPLAINT =
'Services/DoctorApplication.svc/REST/GetChiefcomplaint'; 'Services/DoctorApplication.svc/REST/GetChiefcomplaint';
const GET_PHYSICAL_EXAM = 'Services/DoctorApplication.svc/REST/GetPhysicalExam'; const GET_PHYSICAL_EXAM = 'Services/DoctorApplication.svc/REST/GetPhysicalExam';
const GET_PROGRESS_NOTE = 'Services/DoctorApplication.svc/REST/GetProgressNote'; const GET_PROGRESS_NOTE = 'Services/DoctorApplication.svc/REST/GetProgressNote';
const GET_ASSESSMENT = 'Services/DoctorApplication.svc/REST/GetAssessment'; const GET_ASSESSMENT = 'Services/DoctorApplication.svc/REST/GetAssessment';
const GET_ORDER_PROCEDURE =
'Services/DoctorApplication.svc/REST/GetOrderedProcedure';
const GET_LIST_CATEGORISE = const GET_LIST_CATEGORISE =
'Services/DoctorApplication.svc/REST/GetProcedureCategories'; 'Services/DoctorApplication.svc/REST/GetProcedureCategories';
@ -262,6 +271,7 @@ const GET_IN_PATIENT_ORDERS =
'Services/DoctorApplication.svc/REST/GetPatientRadResult'; 'Services/DoctorApplication.svc/REST/GetPatientRadResult';
///Prescriptions ///Prescriptions
const PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList';
const GET_PRESCRIPTIONS_ALL_ORDERS = const GET_PRESCRIPTIONS_ALL_ORDERS =
'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
const GET_PRESCRIPTION_REPORT_NEW = const GET_PRESCRIPTION_REPORT_NEW =
@ -270,11 +280,18 @@ const SEND_PRESCRIPTION_EMAIL =
'Services/Notifications.svc/REST/SendPrescriptionEmail'; 'Services/Notifications.svc/REST/SendPrescriptionEmail';
const GET_PRESCRIPTION_REPORT_ENH = const GET_PRESCRIPTION_REPORT_ENH =
'Services/Patients.svc/REST/GetPrescriptionReport_enh'; 'Services/Patients.svc/REST/GetPrescriptionReport_enh';
const GET_PHARMACY_LIST = "Services/Patients.svc/REST/GetPharmcyList";
const UPDATE_PROGRESS_NOTE_FOR_INPATIENT = const UPDATE_PROGRESS_NOTE_FOR_INPATIENT =
"Services/DoctorApplication.svc/REST/UpdateProgressNoteForInPatient"; "Services/DoctorApplication.svc/REST/UpdateProgressNoteForInPatient";
const CREATE_PROGRESS_NOTE_FOR_INPATIENT = const CREATE_PROGRESS_NOTE_FOR_INPATIENT =
"Services/DoctorApplication.svc/REST/CreateProgressNoteForInPatient"; "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_SICK_LEAVE_PATIENT = "Services/Patients.svc/REST/GetPatientSickLeave";
const GET_MY_OUT_PATIENT = const GET_MY_OUT_PATIENT =
"Services/DoctorApplication.svc/REST/GetMyOutPatient"; "Services/DoctorApplication.svc/REST/GetMyOutPatient";
@ -381,13 +398,6 @@ const GET_INTERVENTION_MEDICATION_HISTORY =
const SET_ACCEPTED_OR_REJECTED = const SET_ACCEPTED_OR_REJECTED =
"Services/DoctorApplication.svc/REST/DoctorApp_AcceptOrRejectIntervention"; "Services/DoctorApplication.svc/REST/DoctorApp_AcceptOrRejectIntervention";
const GET_STP_MASTER_LIST =
"Services/DoctorApplication.svc/REST/DoctorApp_GetSTPMasterList";
const DOCTOR_ER_SIGN_ASSESSMENT =
"Services/DoctorApplication.svc/REST/DoctorApp_DoctorERSignAssessment";
var selectedPatientType = 1; var selectedPatientType = 1;
//*********change value to decode json from Dropdown ************ //*********change value to decode json from Dropdown ************
@ -438,7 +448,7 @@ const TRANSACTION_NO = 0;
const LANGUAGE_ID = 2; const LANGUAGE_ID = 2;
const STAMP = '2020-04-27T12:17:17.721Z'; const STAMP = '2020-04-27T12:17:17.721Z';
const IP_ADDRESS = '9.9.9.9'; const IP_ADDRESS = '9.9.9.9';
const VERSION_ID = 8.3; const VERSION_ID = 6.5;
const CHANNEL = 9; const CHANNEL = 9;
const SESSION_ID = 'BlUSkYymTt'; const SESSION_ID = 'BlUSkYymTt';
const IS_LOGIN_FOR_DOCTOR_APP = true; const IS_LOGIN_FOR_DOCTOR_APP = true;

@ -93,10 +93,6 @@ const Map<String, Map<String, String>> localizedValues = {
"en": "scan Qr code to retrieve patient profile", "en": "scan Qr code to retrieve patient profile",
"ar": "مسح رمزاال QR لاسترداد ملف تعريف المريض" "ar": "مسح رمزاال QR لاسترداد ملف تعريف المريض"
}, },
"scanERQrCode": {
"en": "Scan Qr code to handle ER Sign In",
"ar": "امسح رمز ال ER للتعامل مع تسجيل الدخول"
},
"scanQr": {"en": "Scan Qr", "ar": "اقراء ال QR"}, "scanQr": {"en": "Scan Qr", "ar": "اقراء ال QR"},
"profile": {"en": "Profile", "ar": "ملفي الشخصي"}, "profile": {"en": "Profile", "ar": "ملفي الشخصي"},
"gender": {"en": "Gender", "ar": "الجنس"}, "gender": {"en": "Gender", "ar": "الجنس"},
@ -676,8 +672,8 @@ const Map<String, Map<String, String>> localizedValues = {
"editedBy": {"en": "Edited By :", "ar": "عدلت من : "}, "editedBy": {"en": "Edited By :", "ar": "عدلت من : "},
"currentMedications": {"en": "Current Medications", "ar": "الأدوية الحالية"}, "currentMedications": {"en": "Current Medications", "ar": "الأدوية الحالية"},
"noItem": { "noItem": {
"en": "sorry, there is no items exists in this list", "en": "No items exists in this list",
"ar": "آسف ، لا توجد عناصر موجودة في هذه القائمة" "ar": "لا توجد عناصر في هذه القائمة"
}, },
"postUcafSuccessMsg": { "postUcafSuccessMsg": {
"en": "UCAF request send successfully", "en": "UCAF request send successfully",
@ -793,7 +789,7 @@ const Map<String, Map<String, String>> localizedValues = {
}, },
"SpecialResult": {"en": "Special Result", "ar": "نتيجة خاصة"}, "SpecialResult": {"en": "Special Result", "ar": "نتيجة خاصة"},
"noDataAvailable": { "noDataAvailable": {
"en": "Sorry, no data is available", "en": "No data available",
"ar": " لا يوجد بيانات متاحة " "ar": " لا يوجد بيانات متاحة "
}, },
"show-more-btn": {"en": "Flowchart", "ar": "النتائج التراكمية"}, "show-more-btn": {"en": "Flowchart", "ar": "النتائج التراكمية"},
@ -1133,17 +1129,4 @@ const Map<String, Map<String, String>> localizedValues = {
"VTE_Type": {"en": "VTE Type", "ar": "VTE Type"}, "VTE_Type": {"en": "VTE Type", "ar": "VTE Type"},
"pharmacology": {"en": "Pharmacology", "ar": "علم العقاقير"}, "pharmacology": {"en": "Pharmacology", "ar": "علم العقاقير"},
"reasonsThrombo": {"en": "Reasons Thrombo", "ar": "أسباب ثرومبو"}, "reasonsThrombo": {"en": "Reasons Thrombo", "ar": "أسباب ثرومبو"},
"youDoNotHaveFavoriteTemplate": {"en": "You Don't Have Favorite Template", "ar": "ليس لديك وصفة طبية مفضلة"},
"pleaseSelectItem": {"en": "please Select Item", "ar": "الرجاء اختيار عنصر"},
"searchFavoriteTemplate": {"en": "search Favorites Template", "ar": "البحث في قالب المفضلة"},
"sorryNoMatch": {"en": "Sorry No Match", "ar": "عذرا لا يوجد تطابق"},
"thousandIsTheMAXForTheStrength": {"en": "1000 Is The MAX For The Strength", "ar": "ألف هو القيمة الأعلى"},
"strengthCanNotBeZero": {"en": "Strength Can't Be Zero", "ar": "القوة لا يمكن أن تكون صفر "},
"old": {"en": "Old", "ar":"القديمه"},
"orderTypeDescription": {"en": "Order Type Description", "ar":"وصف نوع الطلب"},
"doseDetails": {"en": "Dose Details", "ar":"تفاصيل الجرعة"},
"selectCondition": {"en": "Select Condition", "ar":"قم بتحديد الشرط"},
"yourOrderAddedSuccessfully": {"en": "Your Order Added Successfully", "ar":"تم إضافة طلبك بنجاح"},
"youCannotAddOnlySpaces": {"en": "You Can't Add Only Spaces", "ar":""},
"conditionDescription": {"en": "Condition Description", "ar":"لا يمكنك إضافة مسافات فقط"},
}; };

@ -2,5 +2,3 @@ enum PatientType {
IN_PATIENT, IN_PATIENT,
OUT_PATIENT, OUT_PATIENT,
} }
///TODO Elham* Merge the patient type.

@ -1,25 +0,0 @@
class DoctorErSignAssessmentReqModel {
String setupID;
int signInType;
int loginDoctorID;
int patientID;
DoctorErSignAssessmentReqModel(
{this.setupID, this.signInType, this.loginDoctorID, this.patientID});
DoctorErSignAssessmentReqModel.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID'];
signInType = json['SignInType'];
loginDoctorID = json['LoginDoctorID'];
patientID = json['PatientID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['SetupID'] = this.setupID;
data['SignInType'] = this.signInType;
data['LoginDoctorID'] = this.loginDoctorID;
data['PatientID'] = this.patientID;
return data;
}
}

@ -1,4 +1,4 @@
import 'package:doctor_app_flutter/utils/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
class Prescriptions { class Prescriptions {
String setupID; String setupID;

@ -1,145 +0,0 @@
class PrescriptionEntityModel {
dynamic appointmentNo;
dynamic clinicName;
dynamic createdBy;
dynamic createdOn;
dynamic doctorName;
dynamic doseDailyQuantity;
dynamic doseDailyUnitID;
dynamic doseDetail;
dynamic doseDurationDays;
dynamic doseTimingID;
dynamic episodeID;
dynamic frequencyID;
dynamic icdCode10ID;
dynamic indication;
dynamic isDispensed;
dynamic isMedicineCovered;
dynamic isSIG;
dynamic medicationName;
dynamic medicationPrice;
dynamic medicineCode;
dynamic orderTypeDescription;
dynamic qty;
dynamic quantity;
dynamic remarks;
dynamic routeID;
dynamic startDate;
dynamic status;
dynamic stopDate;
dynamic uom;
dynamic pharmacistRemarks;
dynamic pharmacyInervention;
dynamic refill;
dynamic mediSpanGPICode;
PrescriptionEntityModel(
{this.appointmentNo,
this.clinicName,
this.createdBy,
this.createdOn,
this.doctorName,
this.doseDailyQuantity,
this.doseDailyUnitID,
this.doseDetail,
this.doseDurationDays,
this.doseTimingID,
this.episodeID,
this.frequencyID,
this.icdCode10ID,
this.indication,
this.isDispensed,
this.isMedicineCovered,
this.isSIG,
this.medicationName,
this.medicationPrice,
this.medicineCode,
this.orderTypeDescription,
this.qty,
this.quantity,
this.remarks,
this.routeID,
this.startDate,
this.status,
this.stopDate,
this.uom,
this.pharmacistRemarks,
this.mediSpanGPICode,
this.pharmacyInervention,
this.refill});
PrescriptionEntityModel.fromJson(Map<String, dynamic> json) {
appointmentNo = json['appointmentNo'];
clinicName = json['clinicName'];
createdBy = json['createdBy'];
createdOn = json['createdOn'];
doctorName = json['doctorName'];
doseDailyQuantity = json['doseDailyQuantity'];
doseDailyUnitID = json['doseDailyUnitID'];
doseDetail = json['doseDetail'];
doseDurationDays = json['doseDurationDays'];
doseTimingID = json['doseTimingID'];
episodeID = json['episodeID'];
frequencyID = json['frequencyID'];
icdCode10ID = json['icdCode10ID'];
indication = json['indication'];
isDispensed = json['isDispensed'];
isMedicineCovered = json['isMedicineCovered'];
isSIG = json['isSIG'];
medicationName = json['medicationName'];
medicationPrice = json['medicationPrice'];
medicineCode = json['medicineCode'];
orderTypeDescription = json['orderTypeDescription'];
qty = json['qty'];
quantity = json['quantity'];
remarks = json['remarks'];
routeID = json['routeID'];
startDate = json['startDate'];
status = json['status'];
stopDate = json['stopDate'];
uom = json['uom'];
pharmacistRemarks = json['pharmacistRemarks'];
mediSpanGPICode = json['mediSpanGPICode'];
refill = json['refill'];
pharmacyInervention = json['interventionID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['appointmentNo'] = this.appointmentNo;
data['clinicName'] = this.clinicName;
data['createdBy'] = this.createdBy;
data['createdOn'] = this.createdOn;
data['doctorName'] = this.doctorName;
data['doseDailyQuantity'] = this.doseDailyQuantity;
data['doseDailyUnitID'] = this.doseDailyUnitID;
data['doseDetail'] = this.doseDetail;
data['doseDurationDays'] = this.doseDurationDays;
data['doseTimingID'] = this.doseTimingID;
data['episodeID'] = this.episodeID;
data['frequencyID'] = this.frequencyID;
data['icdCode10ID'] = this.icdCode10ID;
data['indication'] = this.indication;
data['isDispensed'] = this.isDispensed;
data['isMedicineCovered'] = this.isMedicineCovered;
data['isSIG'] = this.isSIG;
data['medicationName'] = this.medicationName;
data['medicationPrice'] = this.medicationPrice;
data['medicineCode'] = this.medicineCode;
data['orderTypeDescription'] = this.orderTypeDescription;
data['qty'] = this.qty;
data['quantity'] = this.quantity;
data['remarks'] = this.remarks;
data['routeID'] = this.routeID;
data['startDate'] = this.startDate;
data['status'] = this.status;
data['stopDate'] = this.stopDate;
data['uom'] = this.uom;
data['pharmacistRemarks'] = this.pharmacistRemarks;
data['mediSpanGPICode'] = this.mediSpanGPICode;
data['refill'] = this.refill;
data['interventionID'] = this.pharmacyInervention;
return data;
}
}

@ -1,7 +1,5 @@
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_entity_model.dart';
class PrescriptionModel { class PrescriptionModel {
List<PrescriptionEntityModel> entityList; List<EntityList> entityList;
dynamic rowcount; dynamic rowcount;
dynamic statusMessage; dynamic statusMessage;
@ -9,9 +7,9 @@ class PrescriptionModel {
PrescriptionModel.fromJson(Map<String, dynamic> json) { PrescriptionModel.fromJson(Map<String, dynamic> json) {
if (json['entityList'] != null) { if (json['entityList'] != null) {
entityList = new List<PrescriptionEntityModel>(); entityList = new List<EntityList>();
json['entityList'].forEach((v) { json['entityList'].forEach((v) {
entityList.add(new PrescriptionEntityModel.fromJson(v)); entityList.add(new EntityList.fromJson(v));
}); });
} }
rowcount = json['rowcount']; rowcount = json['rowcount'];
@ -28,3 +26,149 @@ class PrescriptionModel {
return data; return data;
} }
} }
class EntityList {
dynamic appointmentNo;
dynamic clinicName;
dynamic createdBy;
dynamic createdOn;
dynamic doctorName;
dynamic doseDailyQuantity;
dynamic doseDailyUnitID;
dynamic doseDetail;
dynamic doseDurationDays;
dynamic doseTimingID;
dynamic episodeID;
dynamic frequencyID;
dynamic icdCode10ID;
dynamic indication;
dynamic isDispensed;
dynamic isMedicineCovered;
dynamic isSIG;
dynamic medicationName;
dynamic medicationPrice;
dynamic medicineCode;
dynamic orderTypeDescription;
dynamic qty;
dynamic quantity;
dynamic remarks;
dynamic routeID;
dynamic startDate;
dynamic status;
dynamic stopDate;
dynamic uom;
dynamic pharmacistRemarks;
dynamic pharmacyInervention;
dynamic refill;
dynamic mediSpanGPICode;
EntityList(
{this.appointmentNo,
this.clinicName,
this.createdBy,
this.createdOn,
this.doctorName,
this.doseDailyQuantity,
this.doseDailyUnitID,
this.doseDetail,
this.doseDurationDays,
this.doseTimingID,
this.episodeID,
this.frequencyID,
this.icdCode10ID,
this.indication,
this.isDispensed,
this.isMedicineCovered,
this.isSIG,
this.medicationName,
this.medicationPrice,
this.medicineCode,
this.orderTypeDescription,
this.qty,
this.quantity,
this.remarks,
this.routeID,
this.startDate,
this.status,
this.stopDate,
this.uom,
this.pharmacistRemarks,
this.mediSpanGPICode,
this.pharmacyInervention,
this.refill});
EntityList.fromJson(Map<String, dynamic> json) {
appointmentNo = json['appointmentNo'];
clinicName = json['clinicName'];
createdBy = json['createdBy'];
createdOn = json['createdOn'];
doctorName = json['doctorName'];
doseDailyQuantity = json['doseDailyQuantity'];
doseDailyUnitID = json['doseDailyUnitID'];
doseDetail = json['doseDetail'];
doseDurationDays = json['doseDurationDays'];
doseTimingID = json['doseTimingID'];
episodeID = json['episodeID'];
frequencyID = json['frequencyID'];
icdCode10ID = json['icdCode10ID'];
indication = json['indication'];
isDispensed = json['isDispensed'];
isMedicineCovered = json['isMedicineCovered'];
isSIG = json['isSIG'];
medicationName = json['medicationName'];
medicationPrice = json['medicationPrice'];
medicineCode = json['medicineCode'];
orderTypeDescription = json['orderTypeDescription'];
qty = json['qty'];
quantity = json['quantity'];
remarks = json['remarks'];
routeID = json['routeID'];
startDate = json['startDate'];
status = json['status'];
stopDate = json['stopDate'];
uom = json['uom'];
pharmacistRemarks = json['pharmacistRemarks'];
mediSpanGPICode = json['mediSpanGPICode'];
refill = json['refill'];
pharmacyInervention = json['interventionID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['appointmentNo'] = this.appointmentNo;
data['clinicName'] = this.clinicName;
data['createdBy'] = this.createdBy;
data['createdOn'] = this.createdOn;
data['doctorName'] = this.doctorName;
data['doseDailyQuantity'] = this.doseDailyQuantity;
data['doseDailyUnitID'] = this.doseDailyUnitID;
data['doseDetail'] = this.doseDetail;
data['doseDurationDays'] = this.doseDurationDays;
data['doseTimingID'] = this.doseTimingID;
data['episodeID'] = this.episodeID;
data['frequencyID'] = this.frequencyID;
data['icdCode10ID'] = this.icdCode10ID;
data['indication'] = this.indication;
data['isDispensed'] = this.isDispensed;
data['isMedicineCovered'] = this.isMedicineCovered;
data['isSIG'] = this.isSIG;
data['medicationName'] = this.medicationName;
data['medicationPrice'] = this.medicationPrice;
data['medicineCode'] = this.medicineCode;
data['orderTypeDescription'] = this.orderTypeDescription;
data['qty'] = this.qty;
data['quantity'] = this.quantity;
data['remarks'] = this.remarks;
data['routeID'] = this.routeID;
data['startDate'] = this.startDate;
data['status'] = this.status;
data['stopDate'] = this.stopDate;
data['uom'] = this.uom;
data['pharmacistRemarks'] = this.pharmacistRemarks;
data['mediSpanGPICode'] = this.mediSpanGPICode;
data['refill'] = this.refill;
data['interventionID'] = this.pharmacyInervention;
return data;
}
}

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

@ -1,4 +1,4 @@
import 'package:doctor_app_flutter/utils/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
class PrescriptionsOrder { class PrescriptionsOrder {
int iD; int iD;

@ -0,0 +1,60 @@
class AllergyModel {
int allergyDiseaseId;
String allergyDiseaseName;
int allergyDiseaseType;
int appointmentNo;
int createdBy;
String createdByName;
String createdOn;
int episodeID;
bool isChecked;
bool isUpdatedByNurse;
int severity;
String severityName;
AllergyModel(
{this.allergyDiseaseId,
this.allergyDiseaseName,
this.allergyDiseaseType,
this.appointmentNo,
this.createdBy,
this.createdByName,
this.createdOn,
this.episodeID,
this.isChecked,
this.isUpdatedByNurse,
this.severity,
this.severityName});
AllergyModel.fromJson(Map<String, dynamic> json) {
allergyDiseaseId = json['allergyDiseaseId'];
allergyDiseaseName = json['allergyDiseaseName'];
allergyDiseaseType = json['allergyDiseaseType'];
appointmentNo = json['appointmentNo'];
createdBy = json['createdBy'];
createdByName = json['createdByName'];
createdOn = json['createdOn'];
episodeID = json['episodeID'];
isChecked = json['isChecked'];
isUpdatedByNurse = json['isUpdatedByNurse'];
severity = json['severity'];
severityName = json['severityName'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['allergyDiseaseId'] = this.allergyDiseaseId;
data['allergyDiseaseName'] = this.allergyDiseaseName;
data['allergyDiseaseType'] = this.allergyDiseaseType;
data['appointmentNo'] = this.appointmentNo;
data['createdBy'] = this.createdBy;
data['createdByName'] = this.createdByName;
data['createdOn'] = this.createdOn;
data['episodeID'] = this.episodeID;
data['isChecked'] = this.isChecked;
data['isUpdatedByNurse'] = this.isUpdatedByNurse;
data['severity'] = this.severity;
data['severityName'] = this.severityName;
return data;
}
}

@ -1,4 +1,4 @@
class GetProgressNoteReqModel { class GetGetProgressNoteReqModel {
int patientMRN; int patientMRN;
int appointmentNo; int appointmentNo;
String episodeID; String episodeID;
@ -8,7 +8,7 @@ class GetProgressNoteReqModel {
dynamic doctorID; dynamic doctorID;
dynamic editedBy; dynamic editedBy;
GetProgressNoteReqModel( GetGetProgressNoteReqModel(
{this.patientMRN, {this.patientMRN,
this.appointmentNo, this.appointmentNo,
this.episodeID, this.episodeID,
@ -18,7 +18,7 @@ class GetProgressNoteReqModel {
this.editedBy, this.editedBy,
this.doctorID}); this.doctorID});
GetProgressNoteReqModel.fromJson(Map<String, dynamic> json) { GetGetProgressNoteReqModel.fromJson(Map<String, dynamic> json) {
patientMRN = json['PatientMRN']; patientMRN = json['PatientMRN'];
appointmentNo = json['AppointmentNo']; appointmentNo = json['AppointmentNo'];
episodeID = json['EpisodeID']; episodeID = json['EpisodeID'];

@ -32,8 +32,6 @@ class InsertIMEIDetailsModel {
String vidaAuthTokenID; String vidaAuthTokenID;
String vidaRefreshTokenID; String vidaRefreshTokenID;
dynamic password; dynamic password;
int loginDoctorID;
InsertIMEIDetailsModel( InsertIMEIDetailsModel(
{this.iMEI, {this.iMEI,
@ -68,7 +66,7 @@ class InsertIMEIDetailsModel {
this.patientOutSA, this.patientOutSA,
this.vidaAuthTokenID, this.vidaAuthTokenID,
this.vidaRefreshTokenID, this.vidaRefreshTokenID,
this.password, this.loginDoctorID}); this.password});
InsertIMEIDetailsModel.fromJson(Map<String, dynamic> json) { InsertIMEIDetailsModel.fromJson(Map<String, dynamic> json) {
iMEI = json['IMEI']; iMEI = json['IMEI'];
@ -104,7 +102,7 @@ class InsertIMEIDetailsModel {
vidaAuthTokenID = json['VidaAuthTokenID']; vidaAuthTokenID = json['VidaAuthTokenID'];
vidaRefreshTokenID = json['VidaRefreshTokenID']; vidaRefreshTokenID = json['VidaRefreshTokenID'];
password = json['Password']; password = json['Password'];
loginDoctorID = json['LoginDoctorID']; } }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = new Map<String, dynamic>();
@ -141,8 +139,6 @@ class InsertIMEIDetailsModel {
data['VidaAuthTokenID'] = this.vidaAuthTokenID; data['VidaAuthTokenID'] = this.vidaAuthTokenID;
data['VidaRefreshTokenID'] = this.vidaRefreshTokenID; data['VidaRefreshTokenID'] = this.vidaRefreshTokenID;
data['Password'] = this.password; data['Password'] = this.password;
data['LoginDoctorID'] = this.loginDoctorID;
return data; return data;
} }
} }

@ -1,19 +0,0 @@
import 'package:charts_flutter/flutter.dart' as charts;
import 'package:charts_flutter/flutter.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/widgets/data_display/list/flexible_container.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
class TimeSeriesSales {
final DateTime time;
final int sales;
TimeSeriesSales(this.time, this.sales);
}
class TimeSeriesSales2 {
final DateTime time;
final double sales;
TimeSeriesSales2(this.time, this.sales);
}

@ -1,3 +1,20 @@
// final List<Countries> countries = [
// new Countries(
// name: "Saudi Arabia", name_ar: "المملكة العربية السعودية", code: '966'),
// new Countries(
// name: "United Arab Emirates",
// name_ar: "الإمارات العربية المتحدة",
// code: '971'),
// ];
// class Countries {
// final String name;
// final String name_ar;
// final String code;
// Countries({this.name, this.name_ar, this.code});
// }
class Countries { class Countries {
String name; String name;
String nameAr; String nameAr;

@ -1,4 +1,4 @@
import 'package:doctor_app_flutter/utils/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
class ListDoctorWorkingHoursTable { class ListDoctorWorkingHoursTable {
DateTime date; DateTime date;

@ -1,4 +1,4 @@
import 'package:doctor_app_flutter/utils/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
class PatientLabOrders { class PatientLabOrders {
int actualDoctorRate; int actualDoctorRate;

@ -0,0 +1,64 @@
class RequestPatientLabOrders {
double versionID;
int channel;
int languageID;
String iPAdress;
String generalid;
int patientOutSA;
String sessionID;
bool isDentalAllowedBackend;
int deviceTypeID;
int patientID;
String tokenID;
int patientTypeID;
int patientType;
RequestPatientLabOrders(
{this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID,
this.patientID,
this.tokenID,
this.patientTypeID,
this.patientType});
RequestPatientLabOrders.fromJson(Map<String, dynamic> json) {
versionID = json['VersionID'];
channel = json['Channel'];
languageID = json['LanguageID'];
iPAdress = json['IPAdress'];
generalid = json['generalid'];
patientOutSA = json['PatientOutSA'];
sessionID = json['SessionID'];
isDentalAllowedBackend = json['isDentalAllowedBackend'];
deviceTypeID = json['DeviceTypeID'];
patientID = json['PatientID'];
tokenID = json['TokenID'];
patientTypeID = json['PatientTypeID'];
patientType = json['PatientType'];
}
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['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID;
data['PatientID'] = this.patientID;
data['TokenID'] = this.tokenID;
data['PatientTypeID'] = this.patientTypeID;
data['PatientType'] = this.patientType;
return data;
}
}

@ -18,7 +18,6 @@ class CreateNoteModel {
String sessionID; String sessionID;
bool isLoginForDoctorApp; bool isLoginForDoctorApp;
bool patientOutSA; bool patientOutSA;
int conditionId;
CreateNoteModel( CreateNoteModel(
{this.visitType, {this.visitType,
@ -39,8 +38,7 @@ class CreateNoteModel {
this.tokenID, this.tokenID,
this.sessionID, this.sessionID,
this.isLoginForDoctorApp, this.isLoginForDoctorApp,
this.patientOutSA, this.patientOutSA});
this.conditionId});
CreateNoteModel.fromJson(Map<String, dynamic> json) { CreateNoteModel.fromJson(Map<String, dynamic> json) {
visitType = json['VisitType']; visitType = json['VisitType'];
@ -62,7 +60,6 @@ class CreateNoteModel {
sessionID = json['SessionID']; sessionID = json['SessionID'];
isLoginForDoctorApp = json['IsLoginForDoctorApp']; isLoginForDoctorApp = json['IsLoginForDoctorApp'];
patientOutSA = json['PatientOutSA']; patientOutSA = json['PatientOutSA'];
conditionId = json['ConditionId'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -86,7 +83,6 @@ class CreateNoteModel {
data['SessionID'] = this.sessionID; data['SessionID'] = this.sessionID;
data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp; data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp;
data['PatientOutSA'] = this.patientOutSA; data['PatientOutSA'] = this.patientOutSA;
data['ConditionId'] = this.conditionId;
return data; return data;
} }
} }

@ -19,8 +19,6 @@ class NoteModel {
Null doctorClinicName; Null doctorClinicName;
String doctorName; String doctorName;
String visitTypeDesc; String visitTypeDesc;
int condition;
String conditionDescription;
NoteModel( NoteModel(
{this.setupID, {this.setupID,
@ -42,10 +40,7 @@ class NoteModel {
this.admissionClinicName, this.admissionClinicName,
this.doctorClinicName, this.doctorClinicName,
this.doctorName, this.doctorName,
this.visitTypeDesc, this.visitTypeDesc});
this.condition,
this.conditionDescription,
});
NoteModel.fromJson(Map<String, dynamic> json) { NoteModel.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID']; setupID = json['SetupID'];
@ -68,8 +63,6 @@ class NoteModel {
doctorClinicName = json['DoctorClinicName']; doctorClinicName = json['DoctorClinicName'];
doctorName = json['DoctorName']; doctorName = json['DoctorName'];
visitTypeDesc = json['VisitTypeDesc']; visitTypeDesc = json['VisitTypeDesc'];
condition = json['Condition'];
conditionDescription = json['ConditionDescription'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -94,8 +87,6 @@ class NoteModel {
data['DoctorClinicName'] = this.doctorClinicName; data['DoctorClinicName'] = this.doctorClinicName;
data['DoctorName'] = this.doctorName; data['DoctorName'] = this.doctorName;
data['VisitTypeDesc'] = this.visitTypeDesc; data['VisitTypeDesc'] = this.visitTypeDesc;
data['Condition'] = this.condition;
data['ConditionDescription'] = this.conditionDescription;
return data; return data;
} }
} }

@ -1,32 +0,0 @@
class StpMasterListRequestModel {
bool isDentalAllowedBackend;
int languageID;
int projectID;
int parameterGroup;
int parameterType;
StpMasterListRequestModel(
{this.isDentalAllowedBackend,
this.languageID,
this.projectID,
this.parameterGroup,
this.parameterType});
StpMasterListRequestModel.fromJson(Map<String, dynamic> json) {
isDentalAllowedBackend = json['isDentalAllowedBackend'];
languageID = json['LanguageID'];
projectID = json['ProjectID'];
parameterGroup = json['parameterGroup'];
parameterType = json['parameterType'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['LanguageID'] = this.languageID;
data['ProjectID'] = this.projectID;
data['parameterGroup'] = this.parameterGroup;
data['parameterType'] = this.parameterType;
return data;
}
}

@ -1,22 +0,0 @@
class StpMasterListResponseModel {
int parameterCode;
String description;
Null descriptionN;
StpMasterListResponseModel(
{this.parameterCode, this.description, this.descriptionN});
StpMasterListResponseModel.fromJson(Map<String, dynamic> json) {
parameterCode = json['ParameterCode'];
description = json['Description'];
descriptionN = json['DescriptionN'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ParameterCode'] = this.parameterCode;
data['Description'] = this.description;
data['DescriptionN'] = this.descriptionN;
return data;
}
}

@ -16,7 +16,6 @@ class UpdateNoteReqModel {
bool isLoginForDoctorApp; bool isLoginForDoctorApp;
bool patientOutSA; bool patientOutSA;
int patientTypeID; int patientTypeID;
int conditionId;
UpdateNoteReqModel( UpdateNoteReqModel(
{this.projectID, {this.projectID,
@ -35,8 +34,7 @@ class UpdateNoteReqModel {
this.sessionID, this.sessionID,
this.isLoginForDoctorApp, this.isLoginForDoctorApp,
this.patientOutSA, this.patientOutSA,
this.patientTypeID, this.patientTypeID});
this.conditionId});
UpdateNoteReqModel.fromJson(Map<String, dynamic> json) { UpdateNoteReqModel.fromJson(Map<String, dynamic> json) {
projectID = json['ProjectID']; projectID = json['ProjectID'];
@ -56,7 +54,6 @@ class UpdateNoteReqModel {
isLoginForDoctorApp = json['IsLoginForDoctorApp']; isLoginForDoctorApp = json['IsLoginForDoctorApp'];
patientOutSA = json['PatientOutSA']; patientOutSA = json['PatientOutSA'];
patientTypeID = json['PatientTypeID']; patientTypeID = json['PatientTypeID'];
conditionId = json['ConditionId'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -78,7 +75,6 @@ class UpdateNoteReqModel {
data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp; data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp;
data['PatientOutSA'] = this.patientOutSA; data['PatientOutSA'] = this.patientOutSA;
data['PatientTypeID'] = this.patientTypeID; data['PatientTypeID'] = this.patientTypeID;
data['ConditionId'] = this.conditionId;
return data; return data;
} }
} }

@ -1,4 +1,4 @@
import 'package:doctor_app_flutter/utils/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
class LabOrdersResModel { class LabOrdersResModel {
String setupID; String setupID;

@ -1,4 +1,4 @@
import 'package:doctor_app_flutter/utils/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
class MyReferralPatientModel { class MyReferralPatientModel {
int projectID; int projectID;

@ -1,7 +1,7 @@
// TODO = it have to be changed. // TODO = it have to be changed.
import 'package:doctor_app_flutter/utils/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/util/helpers.dart';
class PatiantInformtion { class PatiantInformtion {
PatiantInformtion patientDetails; PatiantInformtion patientDetails;
@ -200,7 +200,7 @@ class PatiantInformtion {
bedId = json["BedID"] ?? json["bedID"]; bedId = json["BedID"] ?? json["bedID"];
nursingStationId = json["NursingStationID"] ?? json["nursingStationID"]; nursingStationId = json["NursingStationID"] ?? json["nursingStationID"];
description = json["Description"] ?? json["description"]; description = json["Description"] ?? json["description"];
clinicDescription = Utils.convertToTitleCase( clinicDescription = Helpers.convertToTitleCase(
json["ClinicDescription"] ?? json["clinicDescription"]??''); json["ClinicDescription"] ?? json["clinicDescription"]??'');
clinicDescriptionN = clinicDescriptionN =
json["ClinicDescriptionN"] ?? json["clinicDescriptionN"]; json["ClinicDescriptionN"] ?? json["clinicDescriptionN"];

@ -1,4 +1,4 @@
import 'package:doctor_app_flutter/utils/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
class PrescriptionReportForInPatient { class PrescriptionReportForInPatient {
int admissionNo; int admissionNo;

@ -16,6 +16,7 @@ class PrescriptionResModel {
String name; String name;
int episodeID; int episodeID;
int actualDoctorRate; int actualDoctorRate;
int admission;
int clinicID; int clinicID;
String companyName; String companyName;
String despensedStatus; String despensedStatus;
@ -50,6 +51,7 @@ class PrescriptionResModel {
this.name, this.name,
this.episodeID, this.episodeID,
this.actualDoctorRate, this.actualDoctorRate,
this.admission,
this.clinicID, this.clinicID,
this.companyName, this.companyName,
this.despensedStatus, this.despensedStatus,
@ -84,6 +86,7 @@ class PrescriptionResModel {
name = json['Name']; name = json['Name'];
episodeID = json['EpisodeID']; episodeID = json['EpisodeID'];
actualDoctorRate = json['ActualDoctorRate']; actualDoctorRate = json['ActualDoctorRate'];
admission = json['Admission'];
clinicID = json['ClinicID']; clinicID = json['ClinicID'];
companyName = json['CompanyName']; companyName = json['CompanyName'];
despensedStatus = json['Despensed_Status']; despensedStatus = json['Despensed_Status'];
@ -120,6 +123,7 @@ class PrescriptionResModel {
data['Name'] = this.name; data['Name'] = this.name;
data['EpisodeID'] = this.episodeID; data['EpisodeID'] = this.episodeID;
data['ActualDoctorRate'] = this.actualDoctorRate; data['ActualDoctorRate'] = this.actualDoctorRate;
data['Admission'] = this.admission;
data['ClinicID'] = this.clinicID; data['ClinicID'] = this.clinicID;
data['CompanyName'] = this.companyName; data['CompanyName'] = this.companyName;
data['Despensed_Status'] = this.despensedStatus; data['Despensed_Status'] = this.despensedStatus;

@ -5,7 +5,7 @@
*@return:VitalSignResModel *@return:VitalSignResModel
*@desc: VitalSignResModel class *@desc: VitalSignResModel class
*/ */
import 'package:doctor_app_flutter/utils/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
class VitalSignResModel { class VitalSignResModel {
var transNo; var transNo;

@ -1,4 +1,4 @@
import 'package:doctor_app_flutter/utils/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
class PatientMuseResultsModel { class PatientMuseResultsModel {
int rowID; int rowID;

@ -14,8 +14,6 @@ class PatientSearchRequestModel {
String identificationNo; String identificationNo;
int nursingStationID; int nursingStationID;
int clinicID = 0; int clinicID = 0;
int loginDoctorID;
PatientSearchRequestModel( PatientSearchRequestModel(
{this.doctorID, {this.doctorID,
@ -32,7 +30,7 @@ class PatientSearchRequestModel {
this.to = "0", this.to = "0",
this.clinicID, this.clinicID,
this.nursingStationID = 0, this.nursingStationID = 0,
this.projectID, this.loginDoctorID}); this.projectID});
PatientSearchRequestModel.fromJson(Map<String, dynamic> json) { PatientSearchRequestModel.fromJson(Map<String, dynamic> json) {
doctorID = json['DoctorID']; doctorID = json['DoctorID'];
@ -50,7 +48,6 @@ class PatientSearchRequestModel {
nursingStationID = json['NursingStationID']; nursingStationID = json['NursingStationID'];
clinicID = json['ClinicID']; clinicID = json['ClinicID'];
projectID = json['ProjectID']; projectID = json['ProjectID'];
loginDoctorID = json['LoginDoctorID'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -70,7 +67,6 @@ class PatientSearchRequestModel {
data['NursingStationID'] = this.nursingStationID; data['NursingStationID'] = this.nursingStationID;
data['ClinicID'] = this.clinicID; data['ClinicID'] = this.clinicID;
data['ProjectID'] = this.projectID; data['ProjectID'] = this.projectID;
data['LoginDoctorID'] = this.loginDoctorID;
return data; return data;
} }
} }

@ -1,18 +1,18 @@
class ProcedureValidationRequestModel { class ProcedureValadteRequestModel {
String vidaAuthTokenID; String vidaAuthTokenID;
int patientMRN; int patientMRN;
int appointmentNo; int appointmentNo;
int episodeID; int episodeID;
List<String> procedure; List<String> procedure;
ProcedureValidationRequestModel( ProcedureValadteRequestModel(
{this.vidaAuthTokenID, {this.vidaAuthTokenID,
this.patientMRN, this.patientMRN,
this.appointmentNo, this.appointmentNo,
this.episodeID, this.episodeID,
this.procedure}); this.procedure});
ProcedureValidationRequestModel.fromJson(Map<String, dynamic> json) { ProcedureValadteRequestModel.fromJson(Map<String, dynamic> json) {
vidaAuthTokenID = json['VidaAuthTokenID']; vidaAuthTokenID = json['VidaAuthTokenID'];
patientMRN = json['PatientMRN']; patientMRN = json['PatientMRN'];
appointmentNo = json['AppointmentNo']; appointmentNo = json['AppointmentNo'];

@ -1,4 +1,4 @@
import 'package:doctor_app_flutter/utils/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
class FinalRadiology { class FinalRadiology {
dynamic setupID; dynamic setupID;

@ -1,4 +1,4 @@
import 'package:doctor_app_flutter/utils/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
class DischargeReferralPatient { class DischargeReferralPatient {
dynamic rowID; dynamic rowID;

@ -1,4 +1,4 @@
import 'package:doctor_app_flutter/utils/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
class MyReferralPatientModel { class MyReferralPatientModel {
dynamic rowID; dynamic rowID;

@ -7,8 +7,8 @@ import 'package:doctor_app_flutter/core/model/livecare/end_call_req.dart';
import 'package:doctor_app_flutter/core/model/livecare/session_status_model.dart'; import 'package:doctor_app_flutter/core/model/livecare/session_status_model.dart';
import 'package:doctor_app_flutter/core/model/livecare/start_call_res.dart'; import 'package:doctor_app_flutter/core/model/livecare/start_call_res.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/VideoChannel.dart';
import 'package:doctor_app_flutter/utils/video_channel_utils.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';

@ -142,6 +142,7 @@ class AuthenticationService extends BaseService {
Future insertDeviceImei(InsertIMEIDetailsModel insertIMEIDetailsModel) async { Future insertDeviceImei(InsertIMEIDetailsModel insertIMEIDetailsModel) async {
hasError = false; hasError = false;
// insertIMEIDetailsModel.tokenID = "@dm!n";
_insertDeviceImeiRes = {}; _insertDeviceImeiRes = {};
try { try {
await baseAppClient.post(INSERT_DEVICE_IMEI, await baseAppClient.post(INSERT_DEVICE_IMEI,

@ -2,7 +2,7 @@ import 'package:doctor_app_flutter/client/base_app_client.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart'; import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/utils/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
class BaseService { class BaseService {
String error; String error;

@ -1,6 +1,6 @@
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart'; import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/model/SOAP/Assessment/get_assessment_res_model.dart'; import 'package:doctor_app_flutter/core/model/SOAP/GetAssessmentResModel.dart';
import 'package:doctor_app_flutter/core/model/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/core/model/SOAP/master_key_model.dart';
import 'base_service.dart'; import 'base_service.dart';

@ -11,8 +11,13 @@ class ScanQrService extends BaseService {
PatientSearchRequestModel requestModel, bool isMyInpatient) async { PatientSearchRequestModel requestModel, bool isMyInpatient) async {
hasError = false; hasError = false;
await getDoctorProfile(); await getDoctorProfile();
requestModel.loginDoctorID = doctorProfile.doctorID;
// if (isMyInpatient) {
// requestModel.doctorID = doctorProfile.doctorID;
// } else {
requestModel.doctorID = 0; requestModel.doctorID = 0;
//}
await baseAppClient.post( await baseAppClient.post(
GET_PATIENT_IN_PATIENT_LIST, GET_PATIENT_IN_PATIENT_LIST,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {

@ -11,7 +11,7 @@ class PatientInPatientService extends BaseService {
PatientSearchRequestModel requestModel, bool isMyInpatient) async { PatientSearchRequestModel requestModel, bool isMyInpatient) async {
hasError = false; hasError = false;
await getDoctorProfile(isGetProfile: true); await getDoctorProfile(isGetProfile: true);
requestModel.loginDoctorID = doctorProfile.doctorID;
if (isMyInpatient) { if (isMyInpatient) {
requestModel.doctorID = doctorProfile.doctorID; requestModel.doctorID = doctorProfile.doctorID;
} else { } else {

@ -5,14 +5,14 @@ import 'package:doctor_app_flutter/core/model/diabetic_chart/GetDiabeticChartVal
import 'package:doctor_app_flutter/core/model/diabetic_chart/GetDiabeticChartValuesResponseModel.dart'; import 'package:doctor_app_flutter/core/model/diabetic_chart/GetDiabeticChartValuesResponseModel.dart';
import 'package:doctor_app_flutter/core/model/diagnosis/GetDiagnosisForInPatientRequestModel.dart'; import 'package:doctor_app_flutter/core/model/diagnosis/GetDiagnosisForInPatientRequestModel.dart';
import 'package:doctor_app_flutter/core/model/diagnosis/GetDiagnosisForInPatientResponseModel.dart'; import 'package:doctor_app_flutter/core/model/diagnosis/GetDiagnosisForInPatientResponseModel.dart';
import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/core/model/note/CreateNoteModel.dart'; import 'package:doctor_app_flutter/core/model/note/CreateNoteModel.dart';
import 'package:doctor_app_flutter/core/model/note/GetNursingProgressNoteRequestModel.dart'; import 'package:doctor_app_flutter/core/model/note/GetNursingProgressNoteRequestModel.dart';
import 'package:doctor_app_flutter/core/model/note/GetNursingProgressNoteResposeModel.dart'; import 'package:doctor_app_flutter/core/model/note/GetNursingProgressNoteResposeModel.dart';
import 'package:doctor_app_flutter/core/model/note/note_model.dart'; import 'package:doctor_app_flutter/core/model/note/note_model.dart';
import 'package:doctor_app_flutter/core/model/note/stp_master_list_req_model.dart';
import 'package:doctor_app_flutter/core/model/note/stp_master_list_res_model.dart';
import 'package:doctor_app_flutter/core/model/note/update_note_model.dart'; import 'package:doctor_app_flutter/core/model/note/update_note_model.dart';
import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/core/model/patient/get_clinic_by_project_id_request.dart'; import 'package:doctor_app_flutter/core/model/patient/get_clinic_by_project_id_request.dart';
import 'package:doctor_app_flutter/core/model/patient/get_doctor_by_clinic_id_request.dart'; import 'package:doctor_app_flutter/core/model/patient/get_doctor_by_clinic_id_request.dart';
import 'package:doctor_app_flutter/core/model/patient/get_list_stp_referral_frequency_request.dart'; import 'package:doctor_app_flutter/core/model/patient/get_list_stp_referral_frequency_request.dart';
@ -26,8 +26,6 @@ import 'package:doctor_app_flutter/core/model/patient/prescription/prescription_
import 'package:doctor_app_flutter/core/model/patient/radiology/radiology_res_model.dart'; import 'package:doctor_app_flutter/core/model/patient/radiology/radiology_res_model.dart';
import 'package:doctor_app_flutter/core/model/patient/refer_to_doctor_request.dart'; import 'package:doctor_app_flutter/core/model/patient/refer_to_doctor_request.dart';
import 'package:doctor_app_flutter/core/model/patient/vital_sign/vital_sign_res_model.dart'; import 'package:doctor_app_flutter/core/model/patient/vital_sign/vital_sign_res_model.dart';
import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
class PatientService extends BaseService { class PatientService extends BaseService {
List<VitalSignResModel> _patientVitalSignList = []; List<VitalSignResModel> _patientVitalSignList = [];
@ -80,8 +78,6 @@ class PatientService extends BaseService {
List<GetDiabeticChartValuesResponseModel> get diabeticChartValuesList => List<GetDiabeticChartValuesResponseModel> get diabeticChartValuesList =>
_diabeticChartValuesList; _diabeticChartValuesList;
List<dynamic> stpMasterList = [];
// TODO: replace var with model // TODO: replace var with model
var _insuranceApporvalsList = []; var _insuranceApporvalsList = [];
@ -168,9 +164,8 @@ class PatientService extends BaseService {
Future getInPatient( Future getInPatient(
PatientSearchRequestModel requestModel, bool isMyInpatient) async { PatientSearchRequestModel requestModel, bool isMyInpatient) async {
hasError = false; hasError = false;
await getDoctorProfile(); await getDoctorProfile();
requestModel.loginDoctorID = doctorProfile.doctorID;
if (isMyInpatient) { if (isMyInpatient) {
requestModel.doctorID = doctorProfile.doctorID; requestModel.doctorID = doctorProfile.doctorID;
} else { } else {
@ -275,7 +270,7 @@ class PatientService extends BaseService {
Future getPatientRadiology(patient) async { Future getPatientRadiology(patient) async {
hasError = false; hasError = false;
await baseAppClient.post( await baseAppClient.post(
GET_IN_PATIENT_ORDERS, GET_RADIOLOGY,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
_patientRadiologyList = []; _patientRadiologyList = [];
response['List_GetRadOreders'].forEach((v) { response['List_GetRadOreders'].forEach((v) {
@ -563,22 +558,4 @@ class PatientService extends BaseService {
body: getDiabeticChartValuesRequestModel.toJson(), body: getDiabeticChartValuesRequestModel.toJson(),
); );
} }
Future getStpMasterList(
StpMasterListRequestModel stpMasterListRequestModel) async {
hasError = false;
await baseAppClient.post(
GET_STP_MASTER_LIST,
onSuccess: (dynamic response, int statusCode) {
stpMasterList = [];
stpMasterList = response['List_STPMasterList'];
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
},
body: stpMasterListRequestModel.toJson(),
);
}
} }

@ -20,7 +20,7 @@ class OperationReportService extends BaseService {
{GetReservationsRequestModel getReservationsRequestModel, {GetReservationsRequestModel getReservationsRequestModel,
int patientId}) async { int patientId}) async {
getReservationsRequestModel = getReservationsRequestModel =
GetReservationsRequestModel(patientID: patientId); GetReservationsRequestModel(patientID: patientId, doctorID: "");
hasError = false; hasError = false;
await baseAppClient.post(GET_RESERVATIONS, await baseAppClient.post(GET_RESERVATIONS,

@ -1,49 +0,0 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/ER_sign_in/doctor_ER_sign_assessment_req_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/Prescriptions.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/get_medication_for_inpatient_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/get_medication_for_inpatient_request_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/perscription_pharmacy.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/post_prescrition_req_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_entity_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_in_patient.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_model.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/prescription_req_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescriptions_order.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/request_get_list_pharmacy_for_prescriptions.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/request_prescription_report.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/request_prescription_report_enh.dart';
import 'package:doctor_app_flutter/core/model/SOAP/Allergy/get_allergies_res_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/Assessment/get_assessment_res_model.dart';
import 'package:doctor_app_flutter/core/model/calculate_box_request_model.dart';
import 'package:doctor_app_flutter/core/model/search_drug/get_medication_response_model.dart';
import 'package:doctor_app_flutter/core/model/search_drug/item_by_medicine_request_model.dart';
import 'package:doctor_app_flutter/core/model/search_drug/search_drug_model.dart';
import 'package:doctor_app_flutter/core/model/search_drug/search_drug_request_model.dart';
import 'package:doctor_app_flutter/core/service/base/lookup-service.dart';
import 'package:doctor_app_flutter/core/model/SOAP/Assessment/get_assessment_req_model.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/core/model/patient/vital_sign/patient-vital-sign-data.dart';
import 'package:doctor_app_flutter/utils/date-utils.dart';
import 'package:flutter/cupertino.dart';
class ERSignInService extends LookupService {
Future signInERPatient({DoctorErSignAssessmentReqModel doctorErSignAssessmentReqModel}) async {
hasError = false;
await baseAppClient.post(DOCTOR_ER_SIGN_ASSESSMENT,
onSuccess: (dynamic response, int statusCode) {
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: doctorErSignAssessmentReqModel.toJson());
}
}

@ -1,5 +1,5 @@
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/insurance_approval_request_model.dart'; import 'package:doctor_app_flutter/core/insurance_approval_request_model.dart';
import 'package:doctor_app_flutter/core/model/insurance/insurance_approval.dart'; import 'package:doctor_app_flutter/core/model/insurance/insurance_approval.dart';
import 'package:doctor_app_flutter/core/model/insurance/insurance_approval_in_patient_model.dart'; import 'package:doctor_app_flutter/core/model/insurance/insurance_approval_in_patient_model.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart';
@ -34,7 +34,7 @@ class InsuranceCardService extends BaseService {
hasError = false; hasError = false;
insuranceApprovalInPatient.clear(); insuranceApprovalInPatient.clear();
await baseAppClient.post(PATIENT_INSURANCE_APPROVALS_URL, await baseAppClient.post(GET_INSURANCE_IN_PATIENT,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
//prescriptionsList.clear(); //prescriptionsList.clear();
response['List_ApprovalMain_InPatient'].forEach((prescriptions) { response['List_ApprovalMain_InPatient'].forEach((prescriptions) {

@ -1,6 +1,6 @@
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/labs/lab_order_result.dart'; import 'package:doctor_app_flutter/core/model/labs/LabOrderResult.dart';
import 'package:doctor_app_flutter/core/model/labs/lab_result_history.dart'; import 'package:doctor_app_flutter/core/model/labs/LabResultHistory.dart';
import 'package:doctor_app_flutter/core/model/labs/all_special_lab_result_model.dart'; import 'package:doctor_app_flutter/core/model/labs/all_special_lab_result_model.dart';
import 'package:doctor_app_flutter/core/model/labs/all_special_lab_result_request.dart'; import 'package:doctor_app_flutter/core/model/labs/all_special_lab_result_request.dart';
import 'package:doctor_app_flutter/core/model/labs/lab_result.dart'; import 'package:doctor_app_flutter/core/model/labs/lab_result.dart';

@ -33,6 +33,7 @@ class PatientMedicalReportService extends BaseService {
Future getMedicalReportTemplate() async { Future getMedicalReportTemplate() async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['TokenID'] = "@dm!n";
body['SetupID'] = "91877"; body['SetupID'] = "91877";
body['TemplateID'] = 43; body['TemplateID'] = 43;
@ -53,6 +54,7 @@ class PatientMedicalReportService extends BaseService {
Future insertMedicalReport(PatiantInformtion patient, String htmlText) async { Future insertMedicalReport(PatiantInformtion patient, String htmlText) async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
// body['TokenID'] = "@dm!n";
body['SetupID'] = "91877"; body['SetupID'] = "91877";
body['AdmissionNo'] = patient.admissionNo; body['AdmissionNo'] = patient.admissionNo;
body['MedicalReportHTML'] = htmlText; body['MedicalReportHTML'] = htmlText;
@ -69,6 +71,7 @@ class PatientMedicalReportService extends BaseService {
PatiantInformtion patient, MedicalReportModel medicalReport) async { PatiantInformtion patient, MedicalReportModel medicalReport) async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['TokenID'] = "@dm!n";
body['SetupID'] = "91877"; body['SetupID'] = "91877";
body['AdmissionNo'] = patient.admissionNo; body['AdmissionNo'] = patient.admissionNo;
body['InvoiceNo'] = medicalReport.invoiceNo; body['InvoiceNo'] = medicalReport.invoiceNo;
@ -89,6 +92,7 @@ class PatientMedicalReportService extends BaseService {
Future addMedicalReport(PatiantInformtion patient, String htmlText) async { Future addMedicalReport(PatiantInformtion patient, String htmlText) async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
// body['TokenID'] = "@dm!n";
body['SetupID'] = body.containsKey('SetupID') body['SetupID'] = body.containsKey('SetupID')
? body['SetupID'] != null ? body['SetupID'] != null
? body['SetupID'] ? body['SetupID']
@ -113,6 +117,7 @@ class PatientMedicalReportService extends BaseService {
int limitNumber, String invoiceNumber) async { int limitNumber, String invoiceNumber) async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
// body['TokenID'] = "@dm!n";
body['LineItemNo'] = limitNumber; body['LineItemNo'] = limitNumber;
body['InvoiceNo'] = invoiceNumber; body['InvoiceNo'] = invoiceNumber;

@ -9,6 +9,9 @@ class MedicalFileService extends BaseService {
List<MedicalFileModel> get medicalFileList => _medicalFileList; List<MedicalFileModel> get medicalFileList => _medicalFileList;
MedicalFileRequestModel _fileRequestModel = MedicalFileRequestModel( MedicalFileRequestModel _fileRequestModel = MedicalFileRequestModel(
//patientMRN: 1231755,
vidaAuthTokenID:
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMDAyIiwianRpIjoiNDM1MGNjZTYtYzc3MS00YjBiLThiNDItMGZhY2IzYzgxMjQ4IiwiZW1haWwiOiIiLCJpZCI6IjEwMDIiLCJOYW1lIjoiVEVNUCAtIERPQ1RPUiIsIkVtcGxveWVlSWQiOiI0NzA5IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiI0NzA5IiwiU0VTU0lPTklEIjoiMjE1OTYwNTQiLCJDbGluaWNJZCI6IjEiLCJyb2xlIjpbIkRPQ1RPUlMiLCJIRUFEIERPQ1RPUlMiLCJBRE1JTklTVFJBVE9SUyIsIlJFQ0VQVElPTklTVCIsIkVSIE5VUlNFIiwiRVIgUkVDRVBUSU9OSVNUIiwiUEhBUk1BQ1kgQUNDT1VOVCBTVEFGRiIsIlBIQVJNQUNZIE5VUlNFIiwiSU5QQVRJRU5UIFBIQVJNQUNJU1QiLCJBRE1JU1NJT04gU1RBRkYiLCJBUFBST1ZBTCBTVEFGRiIsIkNPTlNFTlQgIiwiTUVESUNBTCBSRVBPUlQgLSBTSUNLIExFQVZFIE1BTkFHRVIiXSwibmJmIjoxNjA5MjI1MjMwLCJleHAiOjE2MTAwODkyMzAsImlhdCI6MTYwOTIyNTIzMH0.rs7lTBQ1ON4PbR11PBkOyjf818DdeMKuqz2IrCJMYQU",
); );
Future getMedicalFile({int mrn}) async { Future getMedicalFile({int mrn}) async {

@ -1,6 +1,6 @@
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/SOAP/Assessment/get_assessment_res_model.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/core/model/SOAP/GetAssessmentResModel.dart';
import 'package:doctor_app_flutter/core/model/pharmacies/pharmacies_List_request_model.dart'; import 'package:doctor_app_flutter/core/model/pharmacies/pharmacies_List_request_model.dart';
import 'package:doctor_app_flutter/core/model/pharmacies/pharmacies_items_request_model.dart'; import 'package:doctor_app_flutter/core/model/pharmacies/pharmacies_items_request_model.dart';

@ -1,42 +1,24 @@
import 'package:doctor_app_flutter/config/config.dart'; 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/get_medication_for_inpatient_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/get_medication_for_inpatient_request_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/perscription_pharmacy.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/post_prescrition_req_model.dart'; import 'package:doctor_app_flutter/core/model/Prescriptions/post_prescrition_req_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_entity_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_in_patient.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_model.dart'; import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_model.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/prescription_req_model.dart'; import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_req_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescriptions_order.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/request_get_list_pharmacy_for_prescriptions.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/request_prescription_report.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/request_prescription_report_enh.dart';
import 'package:doctor_app_flutter/core/model/SOAP/Allergy/get_allergies_res_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/Assessment/get_assessment_res_model.dart';
import 'package:doctor_app_flutter/core/model/calculate_box_request_model.dart'; import 'package:doctor_app_flutter/core/model/calculate_box_request_model.dart';
import 'package:doctor_app_flutter/core/model/search_drug/get_medication_response_model.dart'; import 'package:doctor_app_flutter/core/model/search_drug/get_medication_response_model.dart';
import 'package:doctor_app_flutter/core/model/search_drug/item_by_medicine_request_model.dart'; import 'package:doctor_app_flutter/core/model/search_drug/item_by_medicine_request_model.dart';
import 'package:doctor_app_flutter/core/model/search_drug/search_drug_model.dart'; import 'package:doctor_app_flutter/core/model/search_drug/search_drug_model.dart';
import 'package:doctor_app_flutter/core/model/search_drug/search_drug_request_model.dart'; import 'package:doctor_app_flutter/core/model/search_drug/search_drug_request_model.dart';
import 'package:doctor_app_flutter/core/service/base/lookup-service.dart'; import 'package:doctor_app_flutter/core/service/base/lookup-service.dart';
import 'package:doctor_app_flutter/core/model/SOAP/Assessment/get_assessment_req_model.dart'; import 'package:doctor_app_flutter/core/model/SOAP/GetAllergiesResModel.dart';
import 'package:doctor_app_flutter/core/model/SOAP/GetAssessmentReqModel.dart';
import 'package:doctor_app_flutter/core/model/SOAP/GetAssessmentResModel.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/core/model/patient/vital_sign/patient-vital-sign-data.dart'; import 'package:doctor_app_flutter/core/model/patient/vital_sign/patient-vital-sign-data.dart';
import 'package:doctor_app_flutter/utils/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:flutter/cupertino.dart';
class PrescriptionService extends LookupService { class PrescriptionService extends LookupService {
List<PrescriptionModel> _prescriptionList = List(); List<PrescriptionModel> _prescriptionList = List();
List<PrescriptionModel> get prescriptionList => _prescriptionList; List<PrescriptionModel> get prescriptionList => _prescriptionList;
List<PrescriptionEntityModel> _prescriptionListNew = List();
List<PrescriptionEntityModel> get prescriptionListNew => _prescriptionListNew;
List<SearchDrugModel> _drugsList = List(); List<SearchDrugModel> _drugsList = List();
List<SearchDrugModel> get drugsList => _drugsList; List<SearchDrugModel> get drugsList => _drugsList;
@ -55,6 +37,7 @@ class PrescriptionService extends LookupService {
ItemByMedicineRequestModel _itemByMedicineRequestModel = ItemByMedicineRequestModel _itemByMedicineRequestModel =
ItemByMedicineRequestModel(); ItemByMedicineRequestModel();
SearchDrugRequestModel _drugRequestModel = SearchDrugRequestModel( SearchDrugRequestModel _drugRequestModel = SearchDrugRequestModel(
//search: ["Acetaminophen"],
search: ["Amoxicillin"], search: ["Amoxicillin"],
); );
@ -98,23 +81,16 @@ class PrescriptionService extends LookupService {
}, body: getAssessmentReqModel.toJson()); }, body: getAssessmentReqModel.toJson());
} }
Future getPrescriptionListNew({int mrn, int appNo }) async { Future getPrescription({int mrn}) async {
_prescriptionReqModel = PrescriptionReqModel( _prescriptionReqModel = PrescriptionReqModel(
patientMRN: mrn, patientMRN: mrn,
appNo:appNo
); );
hasError = false; hasError = false;
_prescriptionList.clear(); _prescriptionList.clear();
_prescriptionListNew.clear();
await baseAppClient.post(GET_PRESCRIPTION_LIST, await baseAppClient.post(GET_PRESCRIPTION_LIST,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
_prescriptionList _prescriptionList
.add(PrescriptionModel.fromJson(response['PrescriptionList'])); .add(PrescriptionModel.fromJson(response['PrescriptionList']));
if(response['PrescriptionList']!=null){
response['PrescriptionList']["entityList"].forEach((prescriptions) {
_prescriptionListNew.add(PrescriptionEntityModel.fromJson(prescriptions));
});
}
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
@ -191,6 +167,56 @@ class PrescriptionService extends LookupService {
List<GetAllergiesResModel> allergy, List<GetAllergiesResModel> allergy,
PatiantInformtion patient, PatiantInformtion patient,
List<dynamic> prescription) async { List<dynamic> prescription) async {
// Map<String, dynamic> request = {
// "Prescription": {
// "objPatientInfo": {"Gender": "Male", "Age": "21/06/1967"},
// "objVitalSign": {"Height": "180", "Weight": "37"},
// "objPrescriptionItems": [
// {
// "DrugId": "83-20-00-30-20-03-03",
// "DrugName": "WARFARIN 1 MG TAB 28'S (N)",
// "Dose": "1",
// "DoseType": "04",
// "Unit": "actuation(s)",
// "FrequencyType": "1/3/Day",
// "Duration": "3/Day",
// "IsScreen": "true"
// },
// {
// "DrugId": "64-20-00-10-00-03-15",
// "DrugName": "PANADOL 500 MG TAB 24'S(DIS)",
// "Dose": "1",
// "DoseType": "04",
// "Unit": "MG",
// "FrequencyType": "3/1/Day",
// "Duration": "4/Day",
// "RouteID": "24",
// "IsScreen": "true"
// }
// ],
// "objAllergies": {
// "Allergy": {
// "objProperties": {"Id": "26", "Name": "phenoxymethylpenicillin"}
// }
// },
// "objDiagnosis": {
// "Diagnosis": {
// "objProperties": {"Id": "A01.1", "Name": "Paratyphoid fever A"}
// }
// },
// "IsDoctor": "false",
// "IsPharmacist": "false"
// },
// "IPAdress": "10.10.10.10",
// "Channel": 9,
// "LanguageID": 2,
// "VersionID": 5.3,
// "SessionID": "BlUSkYymTt",
// "IsLoginForDoctorApp": true,
// "PatientOutSA": 0,
// "TokenID": "@dm!n",
// "OutSA": true
// };
Map<String, dynamic> request = { Map<String, dynamic> request = {
"Prescription": { "Prescription": {
"objPatientInfo": { "objPatientInfo": {
@ -260,185 +286,4 @@ class PrescriptionService extends LookupService {
}); });
return lstAssessmentsObj; return lstAssessmentsObj;
} }
List<Prescriptions> prescriptionsList = List();
List<GetMedicationForInPatientModel> medicationForInPatient = List();
List<PrescriptionsOrder> prescriptionsOrderList = List();
List<PrescriotionInPatient> prescriptionInPatientList = List();
GetMedicationForInPatientRequestModel _getMedicationForInPatientRequestModel =
GetMedicationForInPatientRequestModel();
Future getPrescriptions(PatiantInformtion patient) async {
hasError = false;
Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false;
await baseAppClient.postPatient(GET_PRESCRIPTION, patient: patient,
onSuccess: (dynamic response, int statusCode) {
prescriptionsList.clear();
response['PatientPrescriptionList'].forEach((prescriptions) {
prescriptionsList.add(Prescriptions.fromJson(prescriptions));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
RequestPrescriptionReport _requestPrescriptionReport =
RequestPrescriptionReport(
appointmentNo: 0, isDentalAllowedBackend: false);
List<PrescriptionReport> prescriptionReportList = List();
Future getPrescriptionReport(
{Prescriptions prescriptions,
@required PatiantInformtion patient}) async {
hasError = false;
_requestPrescriptionReport.dischargeNo = prescriptions.dischargeNo;
_requestPrescriptionReport.projectID = prescriptions.projectID;
_requestPrescriptionReport.clinicID = prescriptions.clinicID;
_requestPrescriptionReport.setupID = prescriptions.setupID;
_requestPrescriptionReport.episodeID = prescriptions.episodeID;
_requestPrescriptionReport.appointmentNo = prescriptions.appointmentNo;
await baseAppClient.postPatient(
prescriptions.isInOutPatient
? GET_PRESCRIPTION_REPORT_ENH
: GET_PRESCRIPTION_REPORT_NEW,
patient: patient, onSuccess: (dynamic response, int statusCode) {
prescriptionReportList.clear();
prescriptionReportEnhList.clear();
if (prescriptions.isInOutPatient) {
response['ListPRM'].forEach((prescriptions) {
prescriptionReportList
.add(PrescriptionReport.fromJson(prescriptions));
prescriptionReportEnhList
.add(PrescriptionReportEnh.fromJson(prescriptions));
});
} else {
response['INP_GetPrescriptionReport_List'].forEach((prescriptions) {
prescriptionReportList
.add(PrescriptionReport.fromJson(prescriptions));
});
}
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _requestPrescriptionReport.toJson());
}
RequestGetListPharmacyForPrescriptions
requestGetListPharmacyForPrescriptions =
RequestGetListPharmacyForPrescriptions(
latitude: 0,
longitude: 0,
isDentalAllowedBackend: false,
);
List<PharmacyPrescriptions> pharmacyPrescriptionsList = List();
RequestPrescriptionReportEnh _requestPrescriptionReportEnh =
RequestPrescriptionReportEnh(
isDentalAllowedBackend: false,
);
List<PrescriptionReportEnh> prescriptionReportEnhList = List();
Future getPrescriptionReportEnh(
{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) {
if (prescriptionsOrder.appointmentNo == "0") {
if (element.dischargeNo == int.parse(prescriptionsOrder.dischargeID)) {
_requestPrescriptionReportEnh.appointmentNo = element.appointmentNo;
_requestPrescriptionReportEnh.clinicID = element.clinicID;
_requestPrescriptionReportEnh.projectID = element.projectID;
_requestPrescriptionReportEnh.episodeID = element.episodeID;
_requestPrescriptionReportEnh.setupID = element.setupID;
_requestPrescriptionReportEnh.dischargeNo = element.dischargeNo;
isInPatient = element.isInOutPatient;
}
} else {
if (int.parse(prescriptionsOrder.appointmentNo) ==
element.appointmentNo) {
_requestPrescriptionReportEnh.appointmentNo = element.appointmentNo;
_requestPrescriptionReportEnh.clinicID = element.clinicID;
_requestPrescriptionReportEnh.projectID = element.projectID;
_requestPrescriptionReportEnh.episodeID = element.episodeID;
_requestPrescriptionReportEnh.setupID = element.setupID;
_requestPrescriptionReportEnh.dischargeNo = element.dischargeNo;
isInPatient = element.isInOutPatient;
///call inpGetPrescriptionReport
}
}
});
hasError = false;
await baseAppClient.postPatient(
isInPatient ? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT_NEW,
patient: patient, onSuccess: (dynamic response, int statusCode) {
prescriptionReportEnhList.clear();
if (isInPatient) {
response['ListPRM'].forEach((prescriptions) {
prescriptionReportEnhList
.add(PrescriptionReportEnh.fromJson(prescriptions));
});
} else {
response['INP_GetPrescriptionReport_List'].forEach((prescriptions) {
PrescriptionReportEnh reportEnh =
PrescriptionReportEnh.fromJson(prescriptions);
reportEnh.itemDescription = prescriptions['ItemDescriptionN'];
prescriptionReportEnhList.add(reportEnh);
});
}
}, onFailure: (String error, int statusCode) {
hasError = true;
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);
}
Future getMedicationForInPatient(PatiantInformtion patient) async {
hasError = false;
_getMedicationForInPatientRequestModel =
GetMedicationForInPatientRequestModel(
isDentalAllowedBackend: false,
admissionNo: int.parse(patient.admissionNo),
projectID: patient.projectId,
);
await baseAppClient.postPatient(GET_MEDICATION_FOR_IN_PATIENT,
patient: patient, onSuccess: (dynamic response, int statusCode) {
medicationForInPatient.clear();
response['List_GetMedicationForInpatient'].forEach((prescriptions) {
medicationForInPatient
.add(GetMedicationForInPatientModel.fromJson(prescriptions));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _getMedicationForInPatientRequestModel.toJson());
}
} }

@ -0,0 +1,238 @@
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/get_medication_for_inpatient_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/get_medication_for_inpatient_request_model.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';
import 'package:doctor_app_flutter/core/model/Prescriptions/request_get_list_pharmacy_for_prescriptions.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/request_prescription_report.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/request_prescription_report_enh.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:flutter/cupertino.dart';
import '../../base/base_service.dart';
class PrescriptionsService extends BaseService {
List<Prescriptions> prescriptionsList = List();
List<GetMedicationForInPatientModel> medicationForInPatient = List();
List<PrescriptionsOrder> prescriptionsOrderList = List();
List<PrescriotionInPatient> prescriptionInPatientList = List();
InPatientPrescriptionRequestModel _inPatientPrescriptionRequestModel =
InPatientPrescriptionRequestModel();
GetMedicationForInPatientRequestModel _getMedicationForInPatientRequestModel =
GetMedicationForInPatientRequestModel();
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,
onSuccess: (dynamic response, int statusCode) {
prescriptionsList.clear();
response['PatientPrescriptionList'].forEach((prescriptions) {
prescriptionsList.add(Prescriptions.fromJson(prescriptions));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
RequestPrescriptionReport _requestPrescriptionReport =
RequestPrescriptionReport(
appointmentNo: 0, isDentalAllowedBackend: false);
List<PrescriptionReport> prescriptionReportList = List();
Future getPrescriptionReport(
{Prescriptions prescriptions,
@required PatiantInformtion patient}) async {
hasError = false;
_requestPrescriptionReport.dischargeNo = prescriptions.dischargeNo;
_requestPrescriptionReport.projectID = prescriptions.projectID;
_requestPrescriptionReport.clinicID = prescriptions.clinicID;
_requestPrescriptionReport.setupID = prescriptions.setupID;
_requestPrescriptionReport.episodeID = prescriptions.episodeID;
_requestPrescriptionReport.appointmentNo = prescriptions.appointmentNo;
await baseAppClient.postPatient(
prescriptions.isInOutPatient
? GET_PRESCRIPTION_REPORT_ENH
: GET_PRESCRIPTION_REPORT_NEW,
patient: patient, onSuccess: (dynamic response, int statusCode) {
prescriptionReportList.clear();
prescriptionReportEnhList.clear();
if (prescriptions.isInOutPatient) {
response['ListPRM'].forEach((prescriptions) {
prescriptionReportList
.add(PrescriptionReport.fromJson(prescriptions));
prescriptionReportEnhList
.add(PrescriptionReportEnh.fromJson(prescriptions));
});
} else {
response['INP_GetPrescriptionReport_List'].forEach((prescriptions) {
prescriptionReportList
.add(PrescriptionReport.fromJson(prescriptions));
});
}
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _requestPrescriptionReport.toJson());
}
RequestGetListPharmacyForPrescriptions
requestGetListPharmacyForPrescriptions =
RequestGetListPharmacyForPrescriptions(
latitude: 0,
longitude: 0,
isDentalAllowedBackend: false,
);
List<PharmacyPrescriptions> pharmacyPrescriptionsList = List();
Future getListPharmacyForPrescriptions(
{int itemId, @required PatiantInformtion patient}) async {
hasError = false;
requestGetListPharmacyForPrescriptions.itemID = itemId;
await baseAppClient.postPatient(GET_PHARMACY_LIST, patient: patient,
onSuccess: (dynamic response, int statusCode) {
pharmacyPrescriptionsList.clear();
response['PharmList'].forEach((prescriptions) {
pharmacyPrescriptionsList
.add(PharmacyPrescriptions.fromJson(prescriptions));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: requestGetListPharmacyForPrescriptions.toJson());
}
RequestPrescriptionReportEnh _requestPrescriptionReportEnh =
RequestPrescriptionReportEnh(
isDentalAllowedBackend: false,
);
List<PrescriptionReportEnh> prescriptionReportEnhList = List();
Future getPrescriptionReportEnh(
{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) {
if (prescriptionsOrder.appointmentNo == "0") {
if (element.dischargeNo == int.parse(prescriptionsOrder.dischargeID)) {
_requestPrescriptionReportEnh.appointmentNo = element.appointmentNo;
_requestPrescriptionReportEnh.clinicID = element.clinicID;
_requestPrescriptionReportEnh.projectID = element.projectID;
_requestPrescriptionReportEnh.episodeID = element.episodeID;
_requestPrescriptionReportEnh.setupID = element.setupID;
_requestPrescriptionReportEnh.dischargeNo = element.dischargeNo;
isInPatient = element.isInOutPatient;
}
} else {
if (int.parse(prescriptionsOrder.appointmentNo) ==
element.appointmentNo) {
_requestPrescriptionReportEnh.appointmentNo = element.appointmentNo;
_requestPrescriptionReportEnh.clinicID = element.clinicID;
_requestPrescriptionReportEnh.projectID = element.projectID;
_requestPrescriptionReportEnh.episodeID = element.episodeID;
_requestPrescriptionReportEnh.setupID = element.setupID;
_requestPrescriptionReportEnh.dischargeNo = element.dischargeNo;
isInPatient = element.isInOutPatient;
///call inpGetPrescriptionReport
}
}
});
hasError = false;
await baseAppClient.postPatient(
isInPatient ? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT_NEW,
patient: patient, onSuccess: (dynamic response, int statusCode) {
prescriptionReportEnhList.clear();
if (isInPatient) {
response['ListPRM'].forEach((prescriptions) {
prescriptionReportEnhList
.add(PrescriptionReportEnh.fromJson(prescriptions));
});
} else {
response['INP_GetPrescriptionReport_List'].forEach((prescriptions) {
PrescriptionReportEnh reportEnh =
PrescriptionReportEnh.fromJson(prescriptions);
reportEnh.itemDescription = prescriptions['ItemDescriptionN'];
prescriptionReportEnhList.add(reportEnh);
});
}
}, onFailure: (String error, int statusCode) {
hasError = true;
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);
}
Future getMedicationForInPatient(PatiantInformtion patient) async {
hasError = false;
_getMedicationForInPatientRequestModel =
GetMedicationForInPatientRequestModel(
isDentalAllowedBackend: false,
admissionNo: int.parse(patient.admissionNo),
tokenID: "@dm!n",
projectID: patient.projectId,
);
await baseAppClient.postPatient(GET_MEDICATION_FOR_IN_PATIENT,
patient: patient, onSuccess: (dynamic response, int statusCode) {
medicationForInPatient.clear();
response['List_GetMedicationForInpatient'].forEach((prescriptions) {
medicationForInPatient
.add(GetMedicationForInPatientModel.fromJson(prescriptions));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _getMedicationForInPatientRequestModel.toJson());
}
}

@ -43,6 +43,15 @@ class ProcedureService extends BaseService {
ProcedureTempleteDetailsRequestModel(); ProcedureTempleteDetailsRequestModel();
GetProcedureReqModel _getProcedureReqModel = GetProcedureReqModel( GetProcedureReqModel _getProcedureReqModel = GetProcedureReqModel(
// clinicId: 17,
// pageSize: 10,
// pageIndex: 1,
// //patientMRN: 3120725,
// //categoryId: null,
// vidaAuthTokenID:
// "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxNDg1IiwianRpIjoiZjQ4YTk0OTQtYTczZS00MDI3LWI2MjgtNzc4MjAwMzUyYWEzIiwiZW1haWwiOiJNb2hhbWVkLlJlc3dhbkBjbG91ZHNvbHV0aW9uLXNhLmNvbSIsImlkIjoiMTQ4NSIsIk5hbWUiOiJTSEFLRVJBIFBBUlZFRU4gKFVTRUQgQlkgRVNFUlZJQ0VTKSIsIkVtcGxveWVlSWQiOiIxNDg1IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiIxNDg1IiwiU0VTU0lPTklEIjoiMjE1ODUyMTAiLCJDbGluaWNJZCI6IjMiLCJyb2xlIjoiRE9DVE9SUyIsIm5iZiI6MTYwODM2NDU2OCwiZXhwIjoxNjA5MjI4NTY4LCJpYXQiOjE2MDgzNjQ1Njh9.YLbvq5nxPn8o9ZYkcbc5YAX7Jy23Mm0s33oRmE8GHDI",
//
// search: ["lab"],
); );
GetProcedureReqModel _getProcedureCategoriseReqModel = GetProcedureReqModel( GetProcedureReqModel _getProcedureCategoriseReqModel = GetProcedureReqModel(
@ -50,16 +59,20 @@ class ProcedureService extends BaseService {
pageSize: 100, pageSize: 100,
pageIndex: 1, pageIndex: 1,
patientMRN: 0, patientMRN: 0,
//categoryId: null,
vidaAuthTokenID:
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxNDg1IiwianRpIjoiZjQ4YTk0OTQtYTczZS00MDI3LWI2MjgtNzc4MjAwMzUyYWEzIiwiZW1haWwiOiJNb2hhbWVkLlJlc3dhbkBjbG91ZHNvbHV0aW9uLXNhLmNvbSIsImlkIjoiMTQ4NSIsIk5hbWUiOiJTSEFLRVJBIFBBUlZFRU4gKFVTRUQgQlkgRVNFUlZJQ0VTKSIsIkVtcGxveWVlSWQiOiIxNDg1IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiIxNDg1IiwiU0VTU0lPTklEIjoiMjE1ODUyMTAiLCJDbGluaWNJZCI6IjMiLCJyb2xlIjoiRE9DVE9SUyIsIm5iZiI6MTYwODM2NDU2OCwiZXhwIjoxNjA5MjI4NTY4LCJpYXQiOjE2MDgzNjQ1Njh9.YLbvq5nxPn8o9ZYkcbc5YAX7Jy23Mm0s33oRmE8GHDI",
//search: ["DENTAL"],
); );
Future getProcedureTemplate( Future getProcedureTemplate(
{int doctorId, int projectId, int clinicId, String categoryID, bool isLocalBusy}) async { {int doctorId, int projectId, int clinicId, String categoryID}) async {
_procedureTempleteRequestModel = ProcedureTempleteRequestModel( _procedureTempleteRequestModel = ProcedureTempleteRequestModel(
// tokenID: "@dm!n", // tokenID: "@dm!n",
patientID: 0, patientID: 0,
searchType: 1, searchType: 1,
); );
hasError = false; hasError = false;
await baseAppClient.post(GET_TEMPLETE_LIST /*GET_PROCEDURE_TEMPLETE*/, await baseAppClient.post(GET_TEMPLETE_LIST /*GET_PROCEDURE_TEMPLETE*/,
@ -183,8 +196,8 @@ class ProcedureService extends BaseService {
}, body: updateProcedureRequestModel.toJson()); }, body: updateProcedureRequestModel.toJson());
} }
Future validationProcedure( Future valadteProcedure(
ProcedureValidationRequestModel validationProcedureRequestModel) async { ProcedureValadteRequestModel procedureValadteRequestModel) async {
hasError = false; hasError = false;
_valadteProcedureList.clear(); _valadteProcedureList.clear();
await baseAppClient.post(GET_PROCEDURE_VALIDATION, await baseAppClient.post(GET_PROCEDURE_VALIDATION,
@ -194,6 +207,6 @@ class ProcedureService extends BaseService {
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: validationProcedureRequestModel.toJson()); }, body: procedureValadteRequestModel.toJson());
} }
} }

@ -186,7 +186,7 @@ class SickLeaveService extends BaseService {
hasError = false; hasError = false;
await baseAppClient.post( await baseAppClient.post(
GET_MASTER_LOOKUP_LIST, GET_OFFTIME,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
offTime = []; offTime = [];
response['MasterLookUpList']['entityList'].forEach((item) => { response['MasterLookUpList']['entityList'].forEach((item) => {
@ -208,7 +208,7 @@ class SickLeaveService extends BaseService {
hasError = false; hasError = false;
await baseAppClient.post( await baseAppClient.post(
GET_MASTER_LOOKUP_LIST, GET_OFFTIME,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
reasonse = []; reasonse = [];
reasonse = response['MasterLookUpList']['entityList']; reasonse = response['MasterLookUpList']['entityList'];

@ -1,26 +1,28 @@
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/SOAP/Allergy/get_allergies_res_model.dart'; import 'package:doctor_app_flutter/core/model/SOAP/ChiefComplaint/GetChiefComplaintReqModel.dart';
import 'package:doctor_app_flutter/core/model/SOAP/Assessment/get_assessment_res_model.dart'; import 'package:doctor_app_flutter/core/model/SOAP/ChiefComplaint/GetChiefComplaintResModel.dart';
import 'package:doctor_app_flutter/core/model/SOAP/general_get_req_for_SOAP.dart'; import 'package:doctor_app_flutter/core/model/SOAP/GeneralGetReqForSOAP.dart';
import 'package:doctor_app_flutter/core/model/SOAP/Assessment/get_assessment_req_model.dart'; import 'package:doctor_app_flutter/core/model/SOAP/GetAllergiesResModel.dart';
import 'package:doctor_app_flutter/core/model/SOAP/Assessment/patch_assessment_req_model.dart'; import 'package:doctor_app_flutter/core/model/SOAP/GetAssessmentReqModel.dart';
import 'package:doctor_app_flutter/core/model/SOAP/post_episode_req_model.dart'; import 'package:doctor_app_flutter/core/model/SOAP/GetAssessmentResModel.dart';
import 'package:doctor_app_flutter/core/model/SOAP/chief_complaint/get_chief_complaint_req_model.dart'; import 'package:doctor_app_flutter/core/model/SOAP/GetGetProgressNoteReqModel.dart';
import 'package:doctor_app_flutter/core/model/SOAP/chief_complaint/get_chief_complaint_res_model.dart'; import 'package:doctor_app_flutter/core/model/SOAP/GetGetProgressNoteResModel.dart';
import 'package:doctor_app_flutter/core/model/SOAP/chief_complaint/post_chief_complaint_request_model.dart'; import 'package:doctor_app_flutter/core/model/SOAP/GetHistoryReqModel.dart';
import 'package:doctor_app_flutter/core/model/SOAP/history/get_history_req_model.dart'; import 'package:doctor_app_flutter/core/model/SOAP/GetHistoryResModel.dart';
import 'package:doctor_app_flutter/core/model/SOAP/history/get_history_res_model.dart'; import 'package:doctor_app_flutter/core/model/SOAP/GetPhysicalExamListResModel.dart';
import 'package:doctor_app_flutter/core/model/SOAP/in_patient/get_episode_for_inpatient_req_model.dart'; import 'package:doctor_app_flutter/core/model/SOAP/GetPhysicalExamReqModel.dart';
import 'package:doctor_app_flutter/core/model/SOAP/in_patient/post_episode_for_Inpatient_request_model.dart'; import 'package:doctor_app_flutter/core/model/SOAP/PatchAssessmentReqModel.dart';
import 'package:doctor_app_flutter/core/model/SOAP/Allergy/post_allergy_request_model.dart'; import 'package:doctor_app_flutter/core/model/SOAP/PostEpisodeReqModel.dart';
import 'package:doctor_app_flutter/core/model/SOAP/Assessment/post_assessment_request_model.dart'; import 'package:doctor_app_flutter/core/model/SOAP/get_Allergies_request_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/history/post_histories_request_model.dart'; import 'package:doctor_app_flutter/core/model/SOAP/in_patient/GetEpisodeForInpatientReqModel.dart';
import 'package:doctor_app_flutter/core/model/SOAP/physical_exam/get_physical_exam_list_res_model.dart'; import 'package:doctor_app_flutter/core/model/SOAP/in_patient/PostEpisodeForInpatientRequestModel.dart';
import 'package:doctor_app_flutter/core/model/SOAP/physical_exam/get_physical_exam_req_model.dart'; import 'package:doctor_app_flutter/core/model/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/physical_exam/post_physical_exam_request_model.dart'; import 'package:doctor_app_flutter/core/model/SOAP/post_allergy_request_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/progress_note/GetGetProgressNoteResModel.dart'; import 'package:doctor_app_flutter/core/model/SOAP/post_assessment_request_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/progress_note/get_progress_note_req_model.dart'; import 'package:doctor_app_flutter/core/model/SOAP/post_chief_complaint_request_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/progress_note/post_progress_note_request_model.dart'; import 'package:doctor_app_flutter/core/model/SOAP/post_histories_request_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/post_physical_exam_request_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/post_progress_note_request_model.dart';
import '../../base/lookup-service.dart'; import '../../base/lookup-service.dart';
@ -34,6 +36,23 @@ class SOAPService extends LookupService {
int episodeID; int episodeID;
Future getAllergies(GetAllergiesRequestModel getAllergiesRequestModel) async {
await baseAppClient.post(
GET_ALLERGIES,
onSuccess: (dynamic response, int statusCode) {
allergiesList.clear();
response['List_Allergies']['entityList'].forEach((v) {
allergiesList.add(MasterKeyModel.fromJson(v));
});
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
},
body: getAllergiesRequestModel.toJson(),
);
}
Future postEpisode(PostEpisodeReqModel postEpisodeReqModel) async { Future postEpisode(PostEpisodeReqModel postEpisodeReqModel) async {
hasError = false; hasError = false;
@ -210,8 +229,7 @@ class SOAPService extends LookupService {
Future getPatientAllergy(GeneralGetReqForSOAP generalGetReqForSOAP) async { Future getPatientAllergy(GeneralGetReqForSOAP generalGetReqForSOAP) async {
hasError = false; hasError = false;
///TODO Elham* change the url constant to get getPatientAllergy await baseAppClient.post(GET_ALLERGY,
await baseAppClient.post(GET_ALLERGIES,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
print("Success"); print("Success");
patientAllergiesList.clear(); patientAllergiesList.clear();
@ -273,7 +291,7 @@ class SOAPService extends LookupService {
} }
Future getPatientProgressNote( Future getPatientProgressNote(
GetProgressNoteReqModel getGetProgressNoteReqModel) async { GetGetProgressNoteReqModel getGetProgressNoteReqModel) async {
hasError = false; hasError = false;
await baseAppClient.post(GET_PROGRESS_NOTE, await baseAppClient.post(GET_PROGRESS_NOTE,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {

@ -1,9 +1,9 @@
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_model.dart'; import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/Assessment/get_assessment_res_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/chief_complaint/get_chief_complaint_res_model.dart';
import 'package:doctor_app_flutter/core/service/base/lookup-service.dart'; import 'package:doctor_app_flutter/core/service/base/lookup-service.dart';
import 'package:doctor_app_flutter/core/model/procedure/order-procedure.dart'; import 'package:doctor_app_flutter/core/model/SOAP/ChiefComplaint/GetChiefComplaintResModel.dart';
import 'package:doctor_app_flutter/core/model/SOAP/GetAssessmentResModel.dart';
import 'package:doctor_app_flutter/core/model/SOAP/order-procedure.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/core/model/patient/vital_sign/patient-vital-sign-history.dart'; import 'package:doctor_app_flutter/core/model/patient/vital_sign/patient-vital-sign-history.dart';
@ -159,7 +159,7 @@ class UcafService extends LookupService {
body['AppointmentNo'] = patient.appointmentNo; body['AppointmentNo'] = patient.appointmentNo;
body['EpisodeID'] = patient.episodeNo; body['EpisodeID'] = patient.episodeNo;
await baseAppClient.post(GET_PROCEDURE_LIST, await baseAppClient.post(GET_ORDER_PROCEDURE,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
print("Success"); print("Success");
orderProcedureList.clear(); orderProcedureList.clear();

@ -1,4 +1,4 @@
import 'package:doctor_app_flutter/core/enum/view_state.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/service/patient/DischargedPatientService.dart'; import 'package:doctor_app_flutter/core/service/patient/DischargedPatientService.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';

@ -1,41 +0,0 @@
import 'package:doctor_app_flutter/core/enum/filter_type.dart';
import 'package:doctor_app_flutter/core/enum/view_state.dart';
import 'package:doctor_app_flutter/core/model/ER_sign_in/doctor_ER_sign_assessment_req_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/Prescriptions.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/get_medication_for_inpatient_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/perscription_pharmacy.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/post_prescrition_req_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_entity_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_model.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/SOAP/Allergy/get_allergies_res_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/Assessment/get_assessment_res_model.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/core/model/patient/vital_sign/patient-vital-sign-data.dart';
import 'package:doctor_app_flutter/core/service/patient_medical_file/ER_signin/ER_signin_service.dart';
import 'package:doctor_app_flutter/core/service/patient_medical_file/prescription/prescription_service.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import 'package:doctor_app_flutter/locator.dart';
import 'package:flutter/cupertino.dart';
class ERSignInViewModel extends BaseViewModel {
bool hasError = false;
ERSignInService _ERSignInService = locator<ERSignInService>();
Future signInERPatient({int patientId, int signInType}) async {
hasError = false;
await getDoctorProfile();
DoctorErSignAssessmentReqModel doctorErSignAssessmentReqModel = new DoctorErSignAssessmentReqModel(setupID:"010266", signInType:signInType, loginDoctorID:doctorProfile.doctorID, patientID: patientId );
setState(ViewState.BusyLocal);
await _ERSignInService.signInERPatient(doctorErSignAssessmentReqModel: doctorErSignAssessmentReqModel);
if (_ERSignInService.hasError) {
error = _ERSignInService.error;
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
}

@ -1,4 +1,4 @@
import 'package:doctor_app_flutter/core/enum/view_state.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/insurance/insurance_approval.dart'; import 'package:doctor_app_flutter/core/model/insurance/insurance_approval.dart';
import 'package:doctor_app_flutter/core/model/insurance/insurance_approval_in_patient_model.dart'; import 'package:doctor_app_flutter/core/model/insurance/insurance_approval_in_patient_model.dart';
import 'package:doctor_app_flutter/core/service/patient_medical_file/insurance/InsuranceCardService.dart'; import 'package:doctor_app_flutter/core/service/patient_medical_file/insurance/InsuranceCardService.dart';

@ -1,5 +1,5 @@
import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/core/enum/view_state.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/live_care/AlternativeServicesList.dart'; import 'package:doctor_app_flutter/core/model/live_care/AlternativeServicesList.dart';
import 'package:doctor_app_flutter/core/model/live_care/PendingPatientERForDoctorAppRequestModel.dart'; import 'package:doctor_app_flutter/core/model/live_care/PendingPatientERForDoctorAppRequestModel.dart';
import 'package:doctor_app_flutter/core/model/live_care/live_care_login_reguest_model.dart'; import 'package:doctor_app_flutter/core/model/live_care/live_care_login_reguest_model.dart';

@ -1,4 +1,4 @@
import 'package:doctor_app_flutter/core/enum/view_state.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/service/patient_medical_file/medical_report/PatientMedicalReportService.dart'; import 'package:doctor_app_flutter/core/service/patient_medical_file/medical_report/PatientMedicalReportService.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import 'package:doctor_app_flutter/core/model/patient/MedicalReport/MedicalReportTemplate.dart'; import 'package:doctor_app_flutter/core/model/patient/MedicalReport/MedicalReportTemplate.dart';

@ -1,4 +1,4 @@
import 'package:doctor_app_flutter/core/enum/view_state.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/patient_muse/PatientMuseResultsModel.dart'; import 'package:doctor_app_flutter/core/model/patient_muse/PatientMuseResultsModel.dart';
import 'package:doctor_app_flutter/core/service/patient/PatientMuseService.dart'; import 'package:doctor_app_flutter/core/service/patient/PatientMuseService.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';

@ -1,5 +1,5 @@
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/enum/view_state.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/PatientRegistration/CheckActivationCodeModel.dart'; import 'package:doctor_app_flutter/core/model/PatientRegistration/CheckActivationCodeModel.dart';
import 'package:doctor_app_flutter/core/model/PatientRegistration/CheckPatientForRegistrationModel.dart'; import 'package:doctor_app_flutter/core/model/PatientRegistration/CheckPatientForRegistrationModel.dart';
import 'package:doctor_app_flutter/core/model/PatientRegistration/GetPatientInfoRequestModel.dart'; import 'package:doctor_app_flutter/core/model/PatientRegistration/GetPatientInfoRequestModel.dart';

@ -1,13 +1,13 @@
import 'package:doctor_app_flutter/core/enum/filter_type.dart'; import 'package:doctor_app_flutter/core/enum/filter_type.dart';
import 'package:doctor_app_flutter/core/enum/patient_type.dart'; import 'package:doctor_app_flutter/core/enum/patient_type.dart';
import 'package:doctor_app_flutter/core/enum/view_state.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart'; import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/service/patient/out_patient_service.dart'; import 'package:doctor_app_flutter/core/service/patient/out_patient_service.dart';
import 'package:doctor_app_flutter/core/service/patient/patientInPatientService.dart'; import 'package:doctor_app_flutter/core/service/patient/patientInPatientService.dart';
import 'package:doctor_app_flutter/core/service/special_clinics/special_clinic_service.dart'; import 'package:doctor_app_flutter/core/service/special_clinics/special_clinic_service.dart';
import 'package:doctor_app_flutter/core/model/dashboard/get_special_clinical_care_mapping_List_Respose_Model.dart'; import 'package:doctor_app_flutter/core/model/dashboard/get_special_clinical_care_mapping_List_Respose_Model.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/utils/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
import '../../locator.dart'; import '../../locator.dart';
import 'base_view_model.dart'; import 'base_view_model.dart';
@ -70,7 +70,6 @@ class PatientSearchViewModel extends BaseViewModel {
setState(ViewState.Busy); setState(ViewState.Busy);
} }
await getDoctorProfile(isGetProfile: true); await getDoctorProfile(isGetProfile: true);
patientSearchRequestModel.loginDoctorID = doctorProfile.doctorID;
patientSearchRequestModel.doctorID = doctorProfile.doctorID; patientSearchRequestModel.doctorID = doctorProfile.doctorID;
await _outPatientService.getOutPatient(patientSearchRequestModel); await _outPatientService.getOutPatient(patientSearchRequestModel);
if (_outPatientService.hasError) { if (_outPatientService.hasError) {

@ -1,31 +1,32 @@
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart'; import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/enum/view_state.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/SOAP/Allergy/get_allergies_res_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/Assessment/get_assessment_res_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/chief_complaint/get_chief_complaint_req_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/chief_complaint/get_chief_complaint_res_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/chief_complaint/post_chief_complaint_request_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/history/get_history_req_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/history/get_history_res_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/physical_exam/get_physical_exam_list_res_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/physical_exam/get_physical_exam_req_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/physical_exam/post_physical_exam_request_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/progress_note/GetGetProgressNoteResModel.dart';
import 'package:doctor_app_flutter/core/model/SOAP/progress_note/get_progress_note_req_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/progress_note/post_progress_note_request_model.dart';
import 'package:doctor_app_flutter/core/model/search_drug/get_medication_response_model.dart'; import 'package:doctor_app_flutter/core/model/search_drug/get_medication_response_model.dart';
import 'package:doctor_app_flutter/core/service/patient_medical_file/prescription/prescription_service.dart'; import 'package:doctor_app_flutter/core/service/patient_medical_file/prescription/prescription_service.dart';
import 'package:doctor_app_flutter/core/service/patient_medical_file/soap/SOAP_service.dart'; import 'package:doctor_app_flutter/core/service/patient_medical_file/soap/SOAP_service.dart';
import 'package:doctor_app_flutter/core/model/SOAP/general_get_req_for_SOAP.dart'; import 'package:doctor_app_flutter/core/model/SOAP/ChiefComplaint/GetChiefComplaintReqModel.dart';
import 'package:doctor_app_flutter/core/model/SOAP/Assessment/get_assessment_req_model.dart'; import 'package:doctor_app_flutter/core/model/SOAP/ChiefComplaint/GetChiefComplaintResModel.dart';
import 'package:doctor_app_flutter/core/model/SOAP/Assessment/patch_assessment_req_model.dart'; import 'package:doctor_app_flutter/core/model/SOAP/GeneralGetReqForSOAP.dart';
import 'package:doctor_app_flutter/core/model/SOAP/post_episode_req_model.dart'; import 'package:doctor_app_flutter/core/model/SOAP/GetAllergiesResModel.dart';
import 'package:doctor_app_flutter/core/model/SOAP/in_patient/get_episode_for_inpatient_req_model.dart'; import 'package:doctor_app_flutter/core/model/SOAP/GetAssessmentReqModel.dart';
import 'package:doctor_app_flutter/core/model/SOAP/in_patient/post_episode_for_Inpatient_request_model.dart'; import 'package:doctor_app_flutter/core/model/SOAP/GetAssessmentResModel.dart';
import 'package:doctor_app_flutter/core/model/SOAP/GetGetProgressNoteReqModel.dart';
import 'package:doctor_app_flutter/core/model/SOAP/GetGetProgressNoteResModel.dart';
import 'package:doctor_app_flutter/core/model/SOAP/GetHistoryReqModel.dart';
import 'package:doctor_app_flutter/core/model/SOAP/GetHistoryResModel.dart';
import 'package:doctor_app_flutter/core/model/SOAP/GetPhysicalExamListResModel.dart';
import 'package:doctor_app_flutter/core/model/SOAP/GetPhysicalExamReqModel.dart';
import 'package:doctor_app_flutter/core/model/SOAP/PatchAssessmentReqModel.dart';
import 'package:doctor_app_flutter/core/model/SOAP/PostEpisodeReqModel.dart';
import 'package:doctor_app_flutter/core/model/SOAP/get_Allergies_request_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/in_patient/GetEpisodeForInpatientReqModel.dart';
import 'package:doctor_app_flutter/core/model/SOAP/in_patient/PostEpisodeForInpatientRequestModel.dart';
import 'package:doctor_app_flutter/core/model/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/core/model/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/Allergy/post_allergy_request_model.dart'; import 'package:doctor_app_flutter/core/model/SOAP/post_allergy_request_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/Assessment/post_assessment_request_model.dart'; import 'package:doctor_app_flutter/core/model/SOAP/post_assessment_request_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/history/post_histories_request_model.dart'; import 'package:doctor_app_flutter/core/model/SOAP/post_chief_complaint_request_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/post_histories_request_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/post_physical_exam_request_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/post_progress_note_request_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_allergy.dart'; import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_allergy.dart';
import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_examination.dart'; import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_examination.dart';
import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_history.dart'; import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_history.dart';
@ -151,6 +152,17 @@ class SOAPViewModel extends BaseViewModel {
nextOnPlanPage(model) { nextOnPlanPage(model) {
planCallBack.nextFunction(model); planCallBack.nextFunction(model);
} }
Future getAllergies(GetAllergiesRequestModel getAllergiesRequestModel) async {
setState(ViewState.Busy);
await _SOAPService.getAllergies(getAllergiesRequestModel);
if (_SOAPService.hasError) {
error = _SOAPService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
Future getMasterLookup(MasterKeysService masterKeys, Future getMasterLookup(MasterKeysService masterKeys,
{bool isBusyLocal = false}) async { {bool isBusyLocal = false}) async {
if (isBusyLocal) { if (isBusyLocal) {
@ -314,7 +326,7 @@ class SOAPViewModel extends BaseViewModel {
} }
Future getPatientProgressNote( Future getPatientProgressNote(
GetProgressNoteReqModel getGetProgressNoteReqModel) async { GetGetProgressNoteReqModel getGetProgressNoteReqModel) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _SOAPService.getPatientProgressNote(getGetProgressNoteReqModel); await _SOAPService.getPatientProgressNote(getGetProgressNoteReqModel);
if (_SOAPService.hasError) { if (_SOAPService.hasError) {
@ -324,6 +336,16 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future getPatientAssessment(
GetAssessmentReqModel getAssessmentReqModel) async {
setState(ViewState.Busy);
await _SOAPService.getPatientAssessment(getAssessmentReqModel);
if (_SOAPService.hasError) {
error = _SOAPService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
Future getMedicationList() async { Future getMedicationList() async {
setState(ViewState.Busy); setState(ViewState.Busy);
@ -428,6 +450,13 @@ class SOAPViewModel extends BaseViewModel {
return result.first; return result.first;
} }
break; break;
// case MasterKeysService.physiotherapyGoals:
// listOfPhysiotherapyGoals.clear();
// entryList.forEach((v) {
// listOfPhysiotherapyGoals.add(MasterKeyModel.fromJson(v));
// });
// break;
case MasterKeysService.DiagnosisType: case MasterKeysService.DiagnosisType:
List<MasterKeyModel> result = listOfDiagnosisType.where((element) { List<MasterKeyModel> result = listOfDiagnosisType.where((element) {
return element.id == id && return element.id == id &&

@ -2,7 +2,7 @@ import 'dart:io';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/core/enum/auth_method_types.dart'; import 'package:doctor_app_flutter/core/enum/auth_method_types.dart';
import 'package:doctor_app_flutter/core/enum/view_state.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/auth/activation_Code_req_model.dart'; import 'package:doctor_app_flutter/core/model/auth/activation_Code_req_model.dart';
import 'package:doctor_app_flutter/core/model/auth/activation_code_for_verification_screen_model.dart'; import 'package:doctor_app_flutter/core/model/auth/activation_code_for_verification_screen_model.dart';
import 'package:doctor_app_flutter/core/model/auth/check_activation_code_for_doctor_app_response_model.dart'; import 'package:doctor_app_flutter/core/model/auth/check_activation_code_for_doctor_app_response_model.dart';
@ -21,9 +21,9 @@ import 'package:doctor_app_flutter/core/model/doctor/clinic_model.dart';
import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart'; import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/core/model/doctor/profile_req_Model.dart'; import 'package:doctor_app_flutter/core/model/doctor/profile_req_Model.dart';
import 'package:doctor_app_flutter/core/model/doctor/user_model.dart'; import 'package:doctor_app_flutter/core/model/doctor/user_model.dart';
import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:local_auth/auth_strings.dart'; import 'package:local_auth/auth_strings.dart';
@ -112,8 +112,6 @@ class AuthenticationViewModel extends BaseViewModel {
insertIMEIDetailsModel.vidaRefreshTokenID = insertIMEIDetailsModel.vidaRefreshTokenID =
await sharedPref.getString(VIDA_REFRESH_TOKEN_ID); await sharedPref.getString(VIDA_REFRESH_TOKEN_ID);
insertIMEIDetailsModel.password = userInfo.password; insertIMEIDetailsModel.password = userInfo.password;
insertIMEIDetailsModel.loginDoctorID = loggedUser != null ? loggedUser.listMemberInformation[0].employeeID
: int.parse(user.editedBy.toString());
await _authService.insertDeviceImei(insertIMEIDetailsModel); await _authService.insertDeviceImei(insertIMEIDetailsModel);
if (_authService.hasError) { if (_authService.hasError) {
@ -156,8 +154,6 @@ class AuthenticationViewModel extends BaseViewModel {
isMobileFingerPrint: 1, isMobileFingerPrint: 1,
vidaAuthTokenID: user.vidaAuthTokenID, vidaAuthTokenID: user.vidaAuthTokenID,
vidaRefreshTokenID: user.vidaRefreshTokenID); vidaRefreshTokenID: user.vidaRefreshTokenID);
await sharedPref.setString(DOCTOR_ID, user.editedBy.toString());
await _authService await _authService
.sendActivationCodeVerificationScreen(activationCodeModel); .sendActivationCodeVerificationScreen(activationCodeModel);
if (_authService.hasError) { if (_authService.hasError) {
@ -178,7 +174,6 @@ class AuthenticationViewModel extends BaseViewModel {
loginDoctorID: loggedUser.listMemberInformation[0].employeeID, loginDoctorID: loggedUser.listMemberInformation[0].employeeID,
otpSendType: authMethodType.getTypeIdService().toString(), otpSendType: authMethodType.getTypeIdService().toString(),
); );
await sharedPref.setString(DOCTOR_ID, (loggedUser.listMemberInformation[0].employeeID).toString());
await _authService.sendActivationCodeForDoctorApp(activationCodeModel); await _authService.sendActivationCodeForDoctorApp(activationCodeModel);
if (_authService.hasError) { if (_authService.hasError) {
error = _authService.error; error = _authService.error;
@ -194,7 +189,6 @@ class AuthenticationViewModel extends BaseViewModel {
Future checkActivationCodeForDoctorApp( Future checkActivationCodeForDoctorApp(
{String activationCode, bool isSilentLogin = false}) async { {String activationCode, bool isSilentLogin = false}) async {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
CheckActivationCodeRequestModel checkActivationCodeForDoctorApp = CheckActivationCodeRequestModel checkActivationCodeForDoctorApp =
new CheckActivationCodeRequestModel( new CheckActivationCodeRequestModel(
zipCode: loggedUser != null ? loggedUser.zipCode : user.zipCode, zipCode: loggedUser != null ? loggedUser.zipCode : user.zipCode,
@ -214,8 +208,9 @@ class AuthenticationViewModel extends BaseViewModel {
: user.projectID.toString(), : user.projectID.toString(),
oTPSendType: await sharedPref.getInt(OTP_TYPE), oTPSendType: await sharedPref.getInt(OTP_TYPE),
iMEI: localToken, iMEI: localToken,
loginDoctorID: loggedUser != null ? loggedUser.listMemberInformation[0].employeeID loginDoctorID: userInfo.userID != null
: int.parse(user.editedBy.toString()),///loggedUser.listMemberInformation[0].employeeID, ? int.parse(userInfo.userID)
: user.editedBy,
// loggedUser.listMemberInformation[0].employeeID, // loggedUser.listMemberInformation[0].employeeID,
isForSilentLogin: isSilentLogin, isForSilentLogin: isSilentLogin,
generalid: "Cs2020@2016\$2958"); generalid: "Cs2020@2016\$2958");
@ -429,7 +424,7 @@ class AuthenticationViewModel extends BaseViewModel {
logout({bool isFromLogin = false}) async { logout({bool isFromLogin = false}) async {
localToken = ""; localToken = "";
String lang = await sharedPref.getString(APP_Language); String lang = await sharedPref.getString(APP_Language);
await Utils.clearSharedPref(); await Helpers.clearSharedPref();
doctorProfile = null; doctorProfile = null;
sharedPref.setString(APP_Language, lang); sharedPref.setString(APP_Language, lang);
deleteUser(); deleteUser();

@ -1,7 +1,7 @@
import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/core/enum/view_state.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart'; import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/utils/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class BaseViewModel extends ChangeNotifier { class BaseViewModel extends ChangeNotifier {

@ -1,4 +1,4 @@
import 'package:doctor_app_flutter/core/enum/view_state.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/service/home/dasboard_service.dart'; import 'package:doctor_app_flutter/core/service/home/dasboard_service.dart';
import 'package:doctor_app_flutter/core/service/home/doctor_reply_service.dart'; import 'package:doctor_app_flutter/core/service/home/doctor_reply_service.dart';
import 'package:doctor_app_flutter/core/service/special_clinics/special_clinic_service.dart'; import 'package:doctor_app_flutter/core/service/special_clinics/special_clinic_service.dart';
@ -59,7 +59,6 @@ class DashboardViewModel extends BaseViewModel {
_firebaseMessaging.getToken().then((String token) async { _firebaseMessaging.getToken().then((String token) async {
if (token != '') { if (token != '') {
// DEVICE_TOKEN = token; // DEVICE_TOKEN = token;
///TODO Elham* return it back
authProvider.insertDeviceImei(token); authProvider.insertDeviceImei(token);
} }
}); });

@ -1,4 +1,4 @@
import 'package:doctor_app_flutter/core/enum/view_state.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/service/home/doctor_reply_service.dart'; import 'package:doctor_app_flutter/core/service/home/doctor_reply_service.dart';
import 'package:doctor_app_flutter/core/model/doctor/list_gt_my_patients_question_model.dart'; import 'package:doctor_app_flutter/core/model/doctor/list_gt_my_patients_question_model.dart';
import 'package:doctor_app_flutter/core/model/doctor/replay/request_create_doctor_response.dart'; import 'package:doctor_app_flutter/core/model/doctor/replay/request_create_doctor_response.dart';

@ -1,4 +1,4 @@
import 'package:doctor_app_flutter/core/enum/view_state.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/hospitals/get_hospitals_request_model.dart'; import 'package:doctor_app_flutter/core/model/hospitals/get_hospitals_request_model.dart';
import 'package:doctor_app_flutter/core/service/hospitals/hospitals_service.dart'; import 'package:doctor_app_flutter/core/service/hospitals/hospitals_service.dart';

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

Loading…
Cancel
Save