Compare commits

..

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

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

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

@ -13,6 +13,8 @@ const PATIENT_PROGRESS_NOTE_URL =
"Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient";
const PATIENT_INSURANCE_APPROVALS_URL =
"Services/DoctorApplication.svc/REST/GetApprovalStatusForInpatient";
const PATIENT_ORDERS_URL =
"Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient";
const PATIENT_REFER_TO_DOCTOR_URL =
"Services/DoctorApplication.svc/REST/ReferToDoctor";
const PATIENT_GET_DOCTOR_BY_CLINIC_URL =
@ -42,6 +44,7 @@ const GET_PATIENT_VITAL_SIGN_DATA =
const GET_PATIENT_LAB_OREDERS =
'Services/DoctorApplication.svc/REST/GetPatientLabOreders';
const GET_PRESCRIPTION = 'Services/Patients.svc/REST/GetPrescriptionApptList';
const GET_RADIOLOGY = 'Services/DoctorApplication.svc/REST/GetPatientRadResult';
const GET_LIVECARE_PENDINGLIST =
'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 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 =
'Services/DoctorApplication.svc/REST/GetCoveringDoctor';
const ADD_RESCHDEULE = 'Services/DoctorApplication.svc/REST/PostRequisition';
@ -152,6 +155,8 @@ const GET_PROCEDURE_LIST =
'Services/DoctorApplication.svc/REST/GetOrderedProcedure';
const POST_PROCEDURE_LIST = 'Services/DoctorApplication.svc/REST/PostProcedure';
const GET_PATIENT_ARRIVAL_LIST =
'Services/DoctorApplication.svc/REST/PatientArrivalList';
const GET_PATIENT_IN_PATIENT_LIST =
'Services/DoctorApplication.svc/REST/GetMyInPatient';
@ -175,6 +180,8 @@ const GET_PATIENT_LAB_ORDERS_RESULT_HISTORY_BY_DESCRIPTION =
// SOAP
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_FOR_IN_PATIENT =
@ -201,13 +208,15 @@ const PATCH_PROGRESS_NOTE =
'Services/DoctorApplication.svc/REST/PatchProgressNote';
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_CHIEF_COMPLAINT =
'Services/DoctorApplication.svc/REST/GetChiefcomplaint';
const GET_PHYSICAL_EXAM = 'Services/DoctorApplication.svc/REST/GetPhysicalExam';
const GET_PROGRESS_NOTE = 'Services/DoctorApplication.svc/REST/GetProgressNote';
const GET_ASSESSMENT = 'Services/DoctorApplication.svc/REST/GetAssessment';
const GET_ORDER_PROCEDURE =
'Services/DoctorApplication.svc/REST/GetOrderedProcedure';
const GET_LIST_CATEGORISE =
'Services/DoctorApplication.svc/REST/GetProcedureCategories';
@ -262,6 +271,7 @@ const GET_IN_PATIENT_ORDERS =
'Services/DoctorApplication.svc/REST/GetPatientRadResult';
///Prescriptions
const PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList';
const GET_PRESCRIPTIONS_ALL_ORDERS =
'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
const GET_PRESCRIPTION_REPORT_NEW =
@ -270,11 +280,18 @@ const SEND_PRESCRIPTION_EMAIL =
'Services/Notifications.svc/REST/SendPrescriptionEmail';
const GET_PRESCRIPTION_REPORT_ENH =
'Services/Patients.svc/REST/GetPrescriptionReport_enh';
const GET_PHARMACY_LIST = "Services/Patients.svc/REST/GetPharmcyList";
const UPDATE_PROGRESS_NOTE_FOR_INPATIENT =
"Services/DoctorApplication.svc/REST/UpdateProgressNoteForInPatient";
const CREATE_PROGRESS_NOTE_FOR_INPATIENT =
"Services/DoctorApplication.svc/REST/CreateProgressNoteForInPatient";
const GET_PRESCRIPTION_IN_PATIENT =
'Services/DoctorApplication.svc/REST/GetPrescriptionReportForInPatient';
const GET_INSURANCE_IN_PATIENT =
"Services/DoctorApplication.svc/REST/GetApprovalStatusForInpatient";
const GET_SICK_LEAVE_PATIENT = "Services/Patients.svc/REST/GetPatientSickLeave";
const GET_MY_OUT_PATIENT =
"Services/DoctorApplication.svc/REST/GetMyOutPatient";
@ -381,13 +398,6 @@ const GET_INTERVENTION_MEDICATION_HISTORY =
const SET_ACCEPTED_OR_REJECTED =
"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;
//*********change value to decode json from Dropdown ************
@ -438,7 +448,7 @@ const TRANSACTION_NO = 0;
const LANGUAGE_ID = 2;
const STAMP = '2020-04-27T12:17:17.721Z';
const IP_ADDRESS = '9.9.9.9';
const VERSION_ID = 8.3;
const VERSION_ID = 6.5;
const CHANNEL = 9;
const SESSION_ID = 'BlUSkYymTt';
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",
"ar": "مسح رمزاال QR لاسترداد ملف تعريف المريض"
},
"scanERQrCode": {
"en": "Scan Qr code to handle ER Sign In",
"ar": "امسح رمز ال ER للتعامل مع تسجيل الدخول"
},
"scanQr": {"en": "Scan Qr", "ar": "اقراء ال QR"},
"profile": {"en": "Profile", "ar": "ملفي الشخصي"},
"gender": {"en": "Gender", "ar": "الجنس"},
@ -676,8 +672,8 @@ const Map<String, Map<String, String>> localizedValues = {
"editedBy": {"en": "Edited By :", "ar": "عدلت من : "},
"currentMedications": {"en": "Current Medications", "ar": "الأدوية الحالية"},
"noItem": {
"en": "sorry, there is no items exists in this list",
"ar": "آسف ، لا توجد عناصر موجودة في هذه القائمة"
"en": "No items exists in this list",
"ar": "لا توجد عناصر في هذه القائمة"
},
"postUcafSuccessMsg": {
"en": "UCAF request send successfully",
@ -793,7 +789,7 @@ const Map<String, Map<String, String>> localizedValues = {
},
"SpecialResult": {"en": "Special Result", "ar": "نتيجة خاصة"},
"noDataAvailable": {
"en": "Sorry, no data is available",
"en": "No data available",
"ar": " لا يوجد بيانات متاحة "
},
"show-more-btn": {"en": "Flowchart", "ar": "النتائج التراكمية"},
@ -1133,17 +1129,10 @@ const Map<String, Map<String, String>> localizedValues = {
"VTE_Type": {"en": "VTE Type", "ar": "VTE Type"},
"pharmacology": {"en": "Pharmacology", "ar": "علم العقاقير"},
"reasonsThrombo": {"en": "Reasons Thrombo", "ar": "أسباب ثرومبو"},
"youDoNotHaveFavoriteTemplate": {"en": "You Don't Have Favorite Template", "ar": "ليس لديك وصفة طبية مفضلة"},
"youDoNotHaveFavoritePrescription": {"en": "you Don't Have Favorite Prescription", "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,
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 {
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 {
List<PrescriptionEntityModel> entityList;
List<EntityList> entityList;
dynamic rowcount;
dynamic statusMessage;
@ -9,9 +7,9 @@ class PrescriptionModel {
PrescriptionModel.fromJson(Map<String, dynamic> json) {
if (json['entityList'] != null) {
entityList = new List<PrescriptionEntityModel>();
entityList = new List<EntityList>();
json['entityList'].forEach((v) {
entityList.add(new PrescriptionEntityModel.fromJson(v));
entityList.add(new EntityList.fromJson(v));
});
}
rowcount = json['rowcount'];
@ -28,3 +26,149 @@ class PrescriptionModel {
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,11 +1,13 @@
class PrescriptionReqModel {
String vidaAuthTokenID;
dynamic patientMRN;
dynamic appNo;
PrescriptionReqModel(
{ this.patientMRN, this.appNo});
{this.vidaAuthTokenID, this.patientMRN, this.appNo});
PrescriptionReqModel.fromJson(Map<String, dynamic> json) {
vidaAuthTokenID = json['VidaAuthTokenID'];
patientMRN = json['PatientMRN'];
appNo = json['AppointmentNo'];
@ -13,6 +15,7 @@ class PrescriptionReqModel {
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['VidaAuthTokenID'] = this.vidaAuthTokenID;
data['PatientMRN'] = this.patientMRN;
data['AppointmentNo'] = this.appNo;
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 {
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 appointmentNo;
String episodeID;
@ -8,7 +8,7 @@ class GetProgressNoteReqModel {
dynamic doctorID;
dynamic editedBy;
GetProgressNoteReqModel(
GetGetProgressNoteReqModel(
{this.patientMRN,
this.appointmentNo,
this.episodeID,
@ -18,7 +18,7 @@ class GetProgressNoteReqModel {
this.editedBy,
this.doctorID});
GetProgressNoteReqModel.fromJson(Map<String, dynamic> json) {
GetGetProgressNoteReqModel.fromJson(Map<String, dynamic> json) {
patientMRN = json['PatientMRN'];
appointmentNo = json['AppointmentNo'];
episodeID = json['EpisodeID'];

@ -32,8 +32,6 @@ class InsertIMEIDetailsModel {
String vidaAuthTokenID;
String vidaRefreshTokenID;
dynamic password;
int loginDoctorID;
InsertIMEIDetailsModel(
{this.iMEI,
@ -68,7 +66,7 @@ class InsertIMEIDetailsModel {
this.patientOutSA,
this.vidaAuthTokenID,
this.vidaRefreshTokenID,
this.password, this.loginDoctorID});
this.password});
InsertIMEIDetailsModel.fromJson(Map<String, dynamic> json) {
iMEI = json['IMEI'];
@ -104,7 +102,7 @@ class InsertIMEIDetailsModel {
vidaAuthTokenID = json['VidaAuthTokenID'];
vidaRefreshTokenID = json['VidaRefreshTokenID'];
password = json['Password'];
loginDoctorID = json['LoginDoctorID']; }
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
@ -141,8 +139,6 @@ class InsertIMEIDetailsModel {
data['VidaAuthTokenID'] = this.vidaAuthTokenID;
data['VidaRefreshTokenID'] = this.vidaRefreshTokenID;
data['Password'] = this.password;
data['LoginDoctorID'] = this.loginDoctorID;
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 {
String name;
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 {
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 {
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;
bool isLoginForDoctorApp;
bool patientOutSA;
int conditionId;
CreateNoteModel(
{this.visitType,
@ -39,8 +38,7 @@ class CreateNoteModel {
this.tokenID,
this.sessionID,
this.isLoginForDoctorApp,
this.patientOutSA,
this.conditionId});
this.patientOutSA});
CreateNoteModel.fromJson(Map<String, dynamic> json) {
visitType = json['VisitType'];
@ -62,7 +60,6 @@ class CreateNoteModel {
sessionID = json['SessionID'];
isLoginForDoctorApp = json['IsLoginForDoctorApp'];
patientOutSA = json['PatientOutSA'];
conditionId = json['ConditionId'];
}
Map<String, dynamic> toJson() {
@ -86,7 +83,6 @@ class CreateNoteModel {
data['SessionID'] = this.sessionID;
data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp;
data['PatientOutSA'] = this.patientOutSA;
data['ConditionId'] = this.conditionId;
return data;
}
}

@ -19,8 +19,6 @@ class NoteModel {
Null doctorClinicName;
String doctorName;
String visitTypeDesc;
int condition;
String conditionDescription;
NoteModel(
{this.setupID,
@ -42,10 +40,7 @@ class NoteModel {
this.admissionClinicName,
this.doctorClinicName,
this.doctorName,
this.visitTypeDesc,
this.condition,
this.conditionDescription,
});
this.visitTypeDesc});
NoteModel.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID'];
@ -68,8 +63,6 @@ class NoteModel {
doctorClinicName = json['DoctorClinicName'];
doctorName = json['DoctorName'];
visitTypeDesc = json['VisitTypeDesc'];
condition = json['Condition'];
conditionDescription = json['ConditionDescription'];
}
Map<String, dynamic> toJson() {
@ -94,8 +87,6 @@ class NoteModel {
data['DoctorClinicName'] = this.doctorClinicName;
data['DoctorName'] = this.doctorName;
data['VisitTypeDesc'] = this.visitTypeDesc;
data['Condition'] = this.condition;
data['ConditionDescription'] = this.conditionDescription;
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 patientOutSA;
int patientTypeID;
int conditionId;
UpdateNoteReqModel(
{this.projectID,
@ -35,8 +34,7 @@ class UpdateNoteReqModel {
this.sessionID,
this.isLoginForDoctorApp,
this.patientOutSA,
this.patientTypeID,
this.conditionId});
this.patientTypeID});
UpdateNoteReqModel.fromJson(Map<String, dynamic> json) {
projectID = json['ProjectID'];
@ -56,7 +54,6 @@ class UpdateNoteReqModel {
isLoginForDoctorApp = json['IsLoginForDoctorApp'];
patientOutSA = json['PatientOutSA'];
patientTypeID = json['PatientTypeID'];
conditionId = json['ConditionId'];
}
Map<String, dynamic> toJson() {
@ -78,7 +75,6 @@ class UpdateNoteReqModel {
data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp;
data['PatientOutSA'] = this.patientOutSA;
data['PatientTypeID'] = this.patientTypeID;
data['ConditionId'] = this.conditionId;
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 {
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 {
int projectID;

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

@ -5,7 +5,7 @@
*@return:VitalSignResModel
*@desc: VitalSignResModel class
*/
import 'package:doctor_app_flutter/utils/date-utils.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
class VitalSignResModel {
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 {
int rowID;

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

@ -1,18 +1,18 @@
class ProcedureValidationRequestModel {
class ProcedureValadteRequestModel {
String vidaAuthTokenID;
int patientMRN;
int appointmentNo;
int episodeID;
List<String> procedure;
ProcedureValidationRequestModel(
ProcedureValadteRequestModel(
{this.vidaAuthTokenID,
this.patientMRN,
this.appointmentNo,
this.episodeID,
this.procedure});
ProcedureValidationRequestModel.fromJson(Map<String, dynamic> json) {
ProcedureValadteRequestModel.fromJson(Map<String, dynamic> json) {
vidaAuthTokenID = json['VidaAuthTokenID'];
patientMRN = json['PatientMRN'];
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 {
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 {
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 {
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/start_call_res.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/utils/video_channel_utils.dart';
import 'package:doctor_app_flutter/util/VideoChannel.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:flutter/cupertino.dart';

@ -142,6 +142,7 @@ class AuthenticationService extends BaseService {
Future insertDeviceImei(InsertIMEIDetailsModel insertIMEIDetailsModel) async {
hasError = false;
// insertIMEIDetailsModel.tokenID = "@dm!n";
_insertDeviceImeiRes = {};
try {
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/core/model/doctor/doctor_profile_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 {
String error;

@ -1,6 +1,6 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/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 'base_service.dart';

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

@ -11,7 +11,7 @@ class PatientInPatientService extends BaseService {
PatientSearchRequestModel requestModel, bool isMyInpatient) async {
hasError = false;
await getDoctorProfile(isGetProfile: true);
requestModel.loginDoctorID = doctorProfile.doctorID;
if (isMyInpatient) {
requestModel.doctorID = doctorProfile.doctorID;
} 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/diagnosis/GetDiagnosisForInPatientRequestModel.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/GetNursingProgressNoteRequestModel.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/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/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_doctor_by_clinic_id_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/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_muse/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
class PatientService extends BaseService {
List<VitalSignResModel> _patientVitalSignList = [];
@ -80,8 +78,6 @@ class PatientService extends BaseService {
List<GetDiabeticChartValuesResponseModel> get diabeticChartValuesList =>
_diabeticChartValuesList;
List<dynamic> stpMasterList = [];
// TODO: replace var with model
var _insuranceApporvalsList = [];
@ -168,9 +164,8 @@ class PatientService extends BaseService {
Future getInPatient(
PatientSearchRequestModel requestModel, bool isMyInpatient) async {
hasError = false;
await getDoctorProfile();
requestModel.loginDoctorID = doctorProfile.doctorID;
if (isMyInpatient) {
requestModel.doctorID = doctorProfile.doctorID;
} else {
@ -275,7 +270,7 @@ class PatientService extends BaseService {
Future getPatientRadiology(patient) async {
hasError = false;
await baseAppClient.post(
GET_IN_PATIENT_ORDERS,
GET_RADIOLOGY,
onSuccess: (dynamic response, int statusCode) {
_patientRadiologyList = [];
response['List_GetRadOreders'].forEach((v) {
@ -563,22 +558,4 @@ class PatientService extends BaseService {
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,
int patientId}) async {
getReservationsRequestModel =
GetReservationsRequestModel(patientID: patientId);
GetReservationsRequestModel(patientID: patientId, doctorID: "");
hasError = false;
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/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_in_patient_model.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
@ -34,7 +34,7 @@ class InsuranceCardService extends BaseService {
hasError = false;
insuranceApprovalInPatient.clear();
await baseAppClient.post(PATIENT_INSURANCE_APPROVALS_URL,
await baseAppClient.post(GET_INSURANCE_IN_PATIENT,
onSuccess: (dynamic response, int statusCode) {
//prescriptionsList.clear();
response['List_ApprovalMain_InPatient'].forEach((prescriptions) {

@ -1,6 +1,6 @@
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/lab_result_history.dart';
import 'package:doctor_app_flutter/core/model/labs/LabOrderResult.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_request.dart';
import 'package:doctor_app_flutter/core/model/labs/lab_result.dart';

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

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

@ -1,6 +1,6 @@
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/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_items_request_model.dart';

@ -1,42 +1,24 @@
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/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/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/vital_sign/patient-vital-sign-data.dart';
import 'package:doctor_app_flutter/utils/date-utils.dart';
import 'package:flutter/cupertino.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
class PrescriptionService extends LookupService {
List<PrescriptionModel> _prescriptionList = List();
List<PrescriptionModel> get prescriptionList => _prescriptionList;
List<PrescriptionEntityModel> _prescriptionListNew = List();
List<PrescriptionEntityModel> get prescriptionListNew => _prescriptionListNew;
List<SearchDrugModel> _drugsList = List();
List<SearchDrugModel> get drugsList => _drugsList;
@ -55,6 +37,7 @@ class PrescriptionService extends LookupService {
ItemByMedicineRequestModel _itemByMedicineRequestModel =
ItemByMedicineRequestModel();
SearchDrugRequestModel _drugRequestModel = SearchDrugRequestModel(
//search: ["Acetaminophen"],
search: ["Amoxicillin"],
);
@ -98,23 +81,16 @@ class PrescriptionService extends LookupService {
}, body: getAssessmentReqModel.toJson());
}
Future getPrescriptionListNew({int mrn, int appNo }) async {
Future getPrescription({int mrn}) async {
_prescriptionReqModel = PrescriptionReqModel(
patientMRN: mrn,
appNo:appNo
);
hasError = false;
_prescriptionList.clear();
_prescriptionListNew.clear();
await baseAppClient.post(GET_PRESCRIPTION_LIST,
onSuccess: (dynamic response, int statusCode) {
_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) {
hasError = true;
super.error = error;
@ -260,185 +236,4 @@ class PrescriptionService extends LookupService {
});
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();
GetProcedureReqModel _getProcedureReqModel = GetProcedureReqModel(
// clinicId: 17,
// pageSize: 10,
// pageIndex: 1,
// //patientMRN: 3120725,
// //categoryId: null,
// vidaAuthTokenID:
// "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxNDg1IiwianRpIjoiZjQ4YTk0OTQtYTczZS00MDI3LWI2MjgtNzc4MjAwMzUyYWEzIiwiZW1haWwiOiJNb2hhbWVkLlJlc3dhbkBjbG91ZHNvbHV0aW9uLXNhLmNvbSIsImlkIjoiMTQ4NSIsIk5hbWUiOiJTSEFLRVJBIFBBUlZFRU4gKFVTRUQgQlkgRVNFUlZJQ0VTKSIsIkVtcGxveWVlSWQiOiIxNDg1IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiIxNDg1IiwiU0VTU0lPTklEIjoiMjE1ODUyMTAiLCJDbGluaWNJZCI6IjMiLCJyb2xlIjoiRE9DVE9SUyIsIm5iZiI6MTYwODM2NDU2OCwiZXhwIjoxNjA5MjI4NTY4LCJpYXQiOjE2MDgzNjQ1Njh9.YLbvq5nxPn8o9ZYkcbc5YAX7Jy23Mm0s33oRmE8GHDI",
//
// search: ["lab"],
);
GetProcedureReqModel _getProcedureCategoriseReqModel = GetProcedureReqModel(
@ -50,6 +59,11 @@ class ProcedureService extends BaseService {
pageSize: 100,
pageIndex: 1,
patientMRN: 0,
//categoryId: null,
vidaAuthTokenID:
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxNDg1IiwianRpIjoiZjQ4YTk0OTQtYTczZS00MDI3LWI2MjgtNzc4MjAwMzUyYWEzIiwiZW1haWwiOiJNb2hhbWVkLlJlc3dhbkBjbG91ZHNvbHV0aW9uLXNhLmNvbSIsImlkIjoiMTQ4NSIsIk5hbWUiOiJTSEFLRVJBIFBBUlZFRU4gKFVTRUQgQlkgRVNFUlZJQ0VTKSIsIkVtcGxveWVlSWQiOiIxNDg1IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiIxNDg1IiwiU0VTU0lPTklEIjoiMjE1ODUyMTAiLCJDbGluaWNJZCI6IjMiLCJyb2xlIjoiRE9DVE9SUyIsIm5iZiI6MTYwODM2NDU2OCwiZXhwIjoxNjA5MjI4NTY4LCJpYXQiOjE2MDgzNjQ1Njh9.YLbvq5nxPn8o9ZYkcbc5YAX7Jy23Mm0s33oRmE8GHDI",
//search: ["DENTAL"],
);
Future getProcedureTemplate(
@ -183,8 +197,8 @@ class ProcedureService extends BaseService {
}, body: updateProcedureRequestModel.toJson());
}
Future validationProcedure(
ProcedureValidationRequestModel validationProcedureRequestModel) async {
Future valadteProcedure(
ProcedureValadteRequestModel procedureValadteRequestModel) async {
hasError = false;
_valadteProcedureList.clear();
await baseAppClient.post(GET_PROCEDURE_VALIDATION,
@ -194,6 +208,6 @@ class ProcedureService extends BaseService {
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: validationProcedureRequestModel.toJson());
}, body: procedureValadteRequestModel.toJson());
}
}

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

@ -1,26 +1,28 @@
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/Assessment/get_assessment_res_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/general_get_req_for_SOAP.dart';
import 'package:doctor_app_flutter/core/model/SOAP/Assessment/get_assessment_req_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/Assessment/patch_assessment_req_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/post_episode_req_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/in_patient/get_episode_for_inpatient_req_model.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/Allergy/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/history/post_histories_request_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/SOAP/ChiefComplaint/GetChiefComplaintReqModel.dart';
import 'package:doctor_app_flutter/core/model/SOAP/ChiefComplaint/GetChiefComplaintResModel.dart';
import 'package:doctor_app_flutter/core/model/SOAP/GeneralGetReqForSOAP.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/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/post_allergy_request_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/post_assessment_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 '../../base/lookup-service.dart';
@ -34,6 +36,23 @@ class SOAPService extends LookupService {
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 {
hasError = false;
@ -210,8 +229,7 @@ class SOAPService extends LookupService {
Future getPatientAllergy(GeneralGetReqForSOAP generalGetReqForSOAP) async {
hasError = false;
///TODO Elham* change the url constant to get getPatientAllergy
await baseAppClient.post(GET_ALLERGIES,
await baseAppClient.post(GET_ALLERGY,
onSuccess: (dynamic response, int statusCode) {
print("Success");
patientAllergiesList.clear();
@ -273,7 +291,7 @@ class SOAPService extends LookupService {
}
Future getPatientProgressNote(
GetProgressNoteReqModel getGetProgressNoteReqModel) async {
GetGetProgressNoteReqModel getGetProgressNoteReqModel) async {
hasError = false;
await baseAppClient.post(GET_PROGRESS_NOTE,
onSuccess: (dynamic response, int statusCode) {

@ -1,9 +1,9 @@
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/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/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/vital_sign/patient-vital-sign-history.dart';
@ -159,7 +159,7 @@ class UcafService extends LookupService {
body['AppointmentNo'] = patient.appointmentNo;
body['EpisodeID'] = patient.episodeNo;
await baseAppClient.post(GET_PROCEDURE_LIST,
await baseAppClient.post(GET_ORDER_PROCEDURE,
onSuccess: (dynamic response, int statusCode) {
print("Success");
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/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_in_patient_model.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/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/PendingPatientERForDoctorAppRequestModel.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/viewModel/base_view_model.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/service/patient/PatientMuseService.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/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/CheckPatientForRegistrationModel.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/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/service/patient/out_patient_service.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/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/utils/date-utils.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import '../../locator.dart';
import 'base_view_model.dart';
@ -70,7 +70,6 @@ class PatientSearchViewModel extends BaseViewModel {
setState(ViewState.Busy);
}
await getDoctorProfile(isGetProfile: true);
patientSearchRequestModel.loginDoctorID = doctorProfile.doctorID;
patientSearchRequestModel.doctorID = doctorProfile.doctorID;
await _outPatientService.getOutPatient(patientSearchRequestModel);
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/view_state.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/enum/viewstate.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/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/Assessment/get_assessment_req_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/Assessment/patch_assessment_req_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/post_episode_req_model.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/in_patient/post_episode_for_Inpatient_request_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/ChiefComplaint/GetChiefComplaintReqModel.dart';
import 'package:doctor_app_flutter/core/model/SOAP/ChiefComplaint/GetChiefComplaintResModel.dart';
import 'package:doctor_app_flutter/core/model/SOAP/GeneralGetReqForSOAP.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/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/Allergy/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/history/post_histories_request_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/post_allergy_request_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/post_assessment_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_examination.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) {
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,
{bool isBusyLocal = false}) async {
if (isBusyLocal) {
@ -314,7 +326,7 @@ class SOAPViewModel extends BaseViewModel {
}
Future getPatientProgressNote(
GetProgressNoteReqModel getGetProgressNoteReqModel) async {
GetGetProgressNoteReqModel getGetProgressNoteReqModel) async {
setState(ViewState.Busy);
await _SOAPService.getPatientProgressNote(getGetProgressNoteReqModel);
if (_SOAPService.hasError) {
@ -324,6 +336,16 @@ class SOAPViewModel extends BaseViewModel {
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 {
setState(ViewState.Busy);
@ -428,6 +450,13 @@ class SOAPViewModel extends BaseViewModel {
return result.first;
}
break;
// case MasterKeysService.physiotherapyGoals:
// listOfPhysiotherapyGoals.clear();
// entryList.forEach((v) {
// listOfPhysiotherapyGoals.add(MasterKeyModel.fromJson(v));
// });
// break;
case MasterKeysService.DiagnosisType:
List<MasterKeyModel> result = listOfDiagnosisType.where((element) {
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/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_for_verification_screen_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/profile_req_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/utils/utils.dart';
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/services.dart';
import 'package:local_auth/auth_strings.dart';
@ -112,8 +112,6 @@ class AuthenticationViewModel extends BaseViewModel {
insertIMEIDetailsModel.vidaRefreshTokenID =
await sharedPref.getString(VIDA_REFRESH_TOKEN_ID);
insertIMEIDetailsModel.password = userInfo.password;
insertIMEIDetailsModel.loginDoctorID = loggedUser != null ? loggedUser.listMemberInformation[0].employeeID
: int.parse(user.editedBy.toString());
await _authService.insertDeviceImei(insertIMEIDetailsModel);
if (_authService.hasError) {
@ -156,8 +154,6 @@ class AuthenticationViewModel extends BaseViewModel {
isMobileFingerPrint: 1,
vidaAuthTokenID: user.vidaAuthTokenID,
vidaRefreshTokenID: user.vidaRefreshTokenID);
await sharedPref.setString(DOCTOR_ID, user.editedBy.toString());
await _authService
.sendActivationCodeVerificationScreen(activationCodeModel);
if (_authService.hasError) {
@ -178,7 +174,6 @@ class AuthenticationViewModel extends BaseViewModel {
loginDoctorID: loggedUser.listMemberInformation[0].employeeID,
otpSendType: authMethodType.getTypeIdService().toString(),
);
await sharedPref.setString(DOCTOR_ID, (loggedUser.listMemberInformation[0].employeeID).toString());
await _authService.sendActivationCodeForDoctorApp(activationCodeModel);
if (_authService.hasError) {
error = _authService.error;
@ -194,7 +189,6 @@ class AuthenticationViewModel extends BaseViewModel {
Future checkActivationCodeForDoctorApp(
{String activationCode, bool isSilentLogin = false}) async {
setState(ViewState.BusyLocal);
CheckActivationCodeRequestModel checkActivationCodeForDoctorApp =
new CheckActivationCodeRequestModel(
zipCode: loggedUser != null ? loggedUser.zipCode : user.zipCode,
@ -214,8 +208,9 @@ class AuthenticationViewModel extends BaseViewModel {
: user.projectID.toString(),
oTPSendType: await sharedPref.getInt(OTP_TYPE),
iMEI: localToken,
loginDoctorID: loggedUser != null ? loggedUser.listMemberInformation[0].employeeID
: int.parse(user.editedBy.toString()),///loggedUser.listMemberInformation[0].employeeID,
loginDoctorID: userInfo.userID != null
? int.parse(userInfo.userID)
: user.editedBy,
// loggedUser.listMemberInformation[0].employeeID,
isForSilentLogin: isSilentLogin,
generalid: "Cs2020@2016\$2958");
@ -429,7 +424,7 @@ class AuthenticationViewModel extends BaseViewModel {
logout({bool isFromLogin = false}) async {
localToken = "";
String lang = await sharedPref.getString(APP_Language);
await Utils.clearSharedPref();
await Helpers.clearSharedPref();
doctorProfile = null;
sharedPref.setString(APP_Language, lang);
deleteUser();

@ -1,7 +1,7 @@
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/utils/dr_app_shared_pref.dart';
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
import 'package:flutter/material.dart';
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/doctor_reply_service.dart';
import 'package:doctor_app_flutter/core/service/special_clinics/special_clinic_service.dart';
@ -59,8 +59,7 @@ class DashboardViewModel extends BaseViewModel {
_firebaseMessaging.getToken().then((String token) async {
if (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/model/doctor/list_gt_my_patients_question_model.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/service/hospitals/hospitals_service.dart';

@ -1,7 +1,7 @@
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/labs/lab_order_result.dart';
import 'package:doctor_app_flutter/core/model/labs/lab_result_history.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/labs/LabOrderResult.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/lab_result.dart';
import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart';
@ -9,7 +9,7 @@ import 'package:doctor_app_flutter/core/model/labs/patient_lab_special_result.da
import 'package:doctor_app_flutter/core/service/patient_medical_file/lab_order/labs_service.dart';
import 'package:doctor_app_flutter/locator.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/dr_app_toast_msg.dart';
import 'base_view_model.dart';
@ -96,6 +96,10 @@ class LabsViewModel extends BaseViewModel {
List<LabResultList> labResultLists = List();
List<LabResultList> get labResultListsCoustom {
return labResultLists;
}
getLaboratoryResult(
{String projectID,
int clinicID,

@ -7,7 +7,7 @@ import 'package:doctor_app_flutter/core/model/livecare/get_pending_res_list.dart
import 'package:doctor_app_flutter/core/model/livecare/start_call_req.dart';
import 'package:doctor_app_flutter/core/model/livecare/start_call_res.dart';
import 'package:doctor_app_flutter/core/model/livecare/transfer_to_admin.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/cupertino.dart';
//TODO: change it when Live care return back.

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

Loading…
Cancel
Save