pushed reverted code

vida--4-ipd-reverted-test
Sultan Khan 3 months ago
parent 83f7c48bcf
commit b592b424a0

@ -6,6 +6,7 @@ import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart'; import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/core/service/NavigationService.dart'; import 'package:doctor_app_flutter/core/service/NavigationService.dart';
import 'package:doctor_app_flutter/core/service/hospitals/hospitals_service.dart';
import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart';
import 'package:doctor_app_flutter/utils/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/utils/dr_app_shared_pref.dart';
import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart';
@ -41,6 +42,8 @@ class BaseAppClient {
bool callLog = true; bool callLog = true;
try { try {
Map<String, dynamic>? profile = await sharedPref.getObj(DOCTOR_PROFILE); Map<String, dynamic>? profile = await sharedPref.getObj(DOCTOR_PROFILE);
if (body?['MemberID'] == null) body?['MemberID'] = HospitalsService.memberId; // changed from null; because create update episode not working
String? token = await sharedPref.getString(TOKEN); String? token = await sharedPref.getString(TOKEN);
if(!isCustomRequest) { if(!isCustomRequest) {
if (profile != null) { if (profile != null) {
@ -93,10 +96,11 @@ class BaseAppClient {
body['SessionID'] = SESSION_ID.toString(); body['SessionID'] = SESSION_ID.toString();
body['IsLoginForDoctorApp'] = IS_LOGIN_FOR_DOCTOR_APP.toString(); body['IsLoginForDoctorApp'] = IS_LOGIN_FOR_DOCTOR_APP.toString();
body['PatientOutSA'] = body['PatientOutSA'] ?? '0'; // PATIENT_OUT_SA; body['PatientOutSA'] = body['PatientOutSA'] ?? '0'; // PATIENT_OUT_SA;
if (body['VidaAuthTokenID'] == null) { print("the token is ${await sharedPref.getString(VIDA_AUTH_TOKEN_ID)}");
if (body['VidaAuthTokenID'] == null && await sharedPref.getString(VIDA_AUTH_TOKEN_ID) !=null) {
body['VidaAuthTokenID'] = await sharedPref.getString(VIDA_AUTH_TOKEN_ID); body['VidaAuthTokenID'] = await sharedPref.getString(VIDA_AUTH_TOKEN_ID);
} }
if (body['VidaRefreshTokenID'] == null) { if (body['VidaRefreshTokenID'] == null && await sharedPref.getString(VIDA_REFRESH_TOKEN_ID) !=null) {
body['VidaRefreshTokenID'] = await sharedPref.getString(VIDA_REFRESH_TOKEN_ID); body['VidaRefreshTokenID'] = await sharedPref.getString(VIDA_REFRESH_TOKEN_ID);
} }
@ -125,7 +129,7 @@ class BaseAppClient {
// body['ProjectID'] = 12; // body['ProjectID'] = 12;
// body['DoctorID'] = 1002; //3844083 // body['DoctorID'] = 1002; //3844083
// body?['TokenID'] = "@dm!n"; // body['TokenID'] = "@dm!n";
// print("ProjectID :"); // print("ProjectID :");
// print(body['ProjectID']); // print(body['ProjectID']);
@ -216,7 +220,7 @@ class BaseAppClient {
String? token = await sharedPref.getString(TOKEN); String? token = await sharedPref.getString(TOKEN);
Map<String, dynamic>? profile = await sharedPref.getObj(DOCTOR_PROFILE); Map<String, dynamic>? profile = await sharedPref.getObj(DOCTOR_PROFILE);
if (body?['MemberID'] == null) body?['MemberID'] = HospitalsService.memberId;
if (profile != null) { if (profile != null) {
DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile); DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
if (body!['DoctorID'] == null) { if (body!['DoctorID'] == null) {
@ -273,6 +277,10 @@ class BaseAppClient {
body['TokenID'] = body.containsKey('TokenID') ? body['TokenID'] ?? token : token; body['TokenID'] = body.containsKey('TokenID') ? body['TokenID'] ?? token : token;
body['PatientID'] = body['PatientID'] != null ? body['PatientID'] : patient!.patientId ?? patient.patientMRN; body['PatientID'] = body['PatientID'] != null ? body['PatientID'] : patient!.patientId ?? patient.patientMRN;
body['PatientMRN'] = body['PatientMRN'] != null ? body['PatientMRN'] : patient!.patientId ?? patient.patientMRN;
if (body['ProjectID'] == null) {
body['ProjectID'] = patient?.projectId.toString();
}
body['PatientOutSA'] = 0; //user['OutSA']; //TODO change it body['PatientOutSA'] = 0; //user['OutSA']; //TODO change it
body['SessionID'] = SESSION_ID; //getSe body['SessionID'] = SESSION_ID; //getSe

@ -13,9 +13,7 @@ const DOCTOR_ROTATION = 'https://doctorrota.hmg.com/';
// const BASE_URL = 'http://10.20.200.111:1010/'; // const BASE_URL = 'http://10.20.200.111:1010/';
// const BASE_URL = 'https://uat.hmgwebservices.com/'; // const BASE_URL = 'https://uat.hmgwebservices.com/';
// const BASE_URL = 'https://hmgwebservices.com/'; const BASE_URL = 'https://hmgwebservices.com/';
const BASE_URL = 'https://uat.hmgwebservices.com/';
// const BASE_URL = 'https://webservices.hmg.com/'; // const BASE_URL = 'https://webservices.hmg.com/';
// //
@ -217,6 +215,7 @@ const GET_SICK_LEAVE_PATIENT = "Services/Patients.svc/REST/GetPatientSickLeave";
const GET_MY_OUT_PATIENT = "Services/DoctorApplication.svc/REST/GetMyOutPatient"; const GET_MY_OUT_PATIENT = "Services/DoctorApplication.svc/REST/GetMyOutPatient";
const PATIENT_MEDICAL_REPORT_GET_LIST = "Services/Patients.svc/REST/DAPP_ListMedicalReport"; const PATIENT_MEDICAL_REPORT_GET_LIST = "Services/Patients.svc/REST/DAPP_ListMedicalReport";
const PATIENT_MEDICAL_REPORT_GET_LIST_VIDA_PLUS = "Services/Patients.svc/REST/DAPP_InsertMedicalReport_New";
const PATIENT_MEDICAL_REPORT_GET_TEMPLATE = "Services/Patients.svc/REST/DAPP_GetTemplateByID"; const PATIENT_MEDICAL_REPORT_GET_TEMPLATE = "Services/Patients.svc/REST/DAPP_GetTemplateByID";
const PATIENT_MEDICAL_REPORT_INSERT = "Services/Patients.svc/REST/DAPP_InsertMedicalReport"; const PATIENT_MEDICAL_REPORT_INSERT = "Services/Patients.svc/REST/DAPP_InsertMedicalReport";
const PATIENT_MEDICAL_REPORT_VERIFIED = "Services/Patients.svc/REST/DAPP_VerifiedMedicalReport"; const PATIENT_MEDICAL_REPORT_VERIFIED = "Services/Patients.svc/REST/DAPP_VerifiedMedicalReport";
@ -259,6 +258,7 @@ const GET_DIAGNOSIS_FOR_IN_PATIENT = "Services/DoctorApplication.svc/REST/Doctor
const GET_DIABETIC_CHART_VALUES = "Services/DoctorApplication.svc/REST/DoctorApp_GetDiabeticChartValues"; const GET_DIABETIC_CHART_VALUES = "Services/DoctorApplication.svc/REST/DoctorApp_GetDiabeticChartValues";
const GET_PENDING_ORDERS = "Services/DoctorApplication.svc/REST/DoctorApp_GetPendingOrdersForInPatient"; const GET_PENDING_ORDERS = "Services/DoctorApplication.svc/REST/DoctorApp_GetPendingOrdersForInPatient";
const GET_PENDING_ORDERS_VIDA_PLUS = "Services/DoctorApplication.svc/REST/DoctorApp_GetDoctorProgressNote";
const GET_ADMISSION_ORDERS = "/Services/DoctorApplication.svc/REST/DoctorApp_GetAdmissionOrders"; const GET_ADMISSION_ORDERS = "/Services/DoctorApplication.svc/REST/DoctorApp_GetAdmissionOrders";
@ -413,7 +413,7 @@ const TRANSACTION_NO = 0;
const LANGUAGE_ID = 2; const LANGUAGE_ID = 2;
const STAMP = '2020-04-27T12:17:17.721Z'; const STAMP = '2020-04-27T12:17:17.721Z';
const IP_ADDRESS = '9.9.9.9'; const IP_ADDRESS = '9.9.9.9';
const VERSION_ID = 9.9; const VERSION_ID = 10.5;
const CHANNEL = 9; const CHANNEL = 9;
const SESSION_ID = 'BlUSkYymTt'; const SESSION_ID = 'BlUSkYymTt';
const IS_LOGIN_FOR_DOCTOR_APP = true; const IS_LOGIN_FOR_DOCTOR_APP = true;

@ -1253,5 +1253,14 @@ const Map<String, Map<String, String>> localizedValues = {
"progressNoteCanNotBeEmpty": {"en": "Progress Note Can Not Be Empty", "ar":"تعذر تنفيذ الإجراء"}, "progressNoteCanNotBeEmpty": {"en": "Progress Note Can Not Be Empty", "ar":"تعذر تنفيذ الإجراء"},
"youHavePendingInterventions": {"en": "You Have Pending Interventions. That need your attention", "ar":"لديك تدخلات معلقة. التي تحتاج إلى اهتمامك"}, "youHavePendingInterventions": {"en": "You Have Pending Interventions. That need your attention", "ar":"لديك تدخلات معلقة. التي تحتاج إلى اهتمامك"},
"open": {"en": "Open", "ar":"يفتح"}, "open": {"en": "Open", "ar":"يفتح"},
"chiefComplaintLengthErrorMsg":{"en": "The text is too short; minimum 26 characters required.", "ar":"النص قصير جدًا؛ الحد الأدنى المطلوب هو 26 حرفًا."} "chiefComplaintLengthErrorMsg":{"en": "The text is too short; minimum 26 characters required.", "ar":"النص قصير جدًا؛ الحد الأدنى المطلوب هو 26 حرفًا."},
"filterInPatient":{"en": "Select Dates", "ar":"حدد التواريخ."},
"remarksNotAdded": {
"en": "Remarks Not Added",
"ar": "لم تتم إضافة ملاحظات"
},
"addDoctorRemarks": {
"en": " Doctor Remarks",
"ar": " ملاحظات الطبيب"
}
}; };

@ -1,6 +1,7 @@
class PostChiefComplaintRequestModel { class PostChiefComplaintRequestModel {
int? appointmentNo; int? appointmentNo;
int? episodeID; int? episodeID;
String? pomrId;
int? patientMRN; int? patientMRN;
int? admissionNo; int? admissionNo;
String? chiefComplaint; String? chiefComplaint;
@ -24,7 +25,7 @@ class PostChiefComplaintRequestModel {
this.doctorID, this.doctorID,
this.editedBy, this.editedBy,
this.numberOfWeeks, this.numberOfWeeks,
this.admissionNo}); this.admissionNo,this.pomrId});
PostChiefComplaintRequestModel.fromJson(Map<String, dynamic> json) { PostChiefComplaintRequestModel.fromJson(Map<String, dynamic> json) {
appointmentNo = json['AppointmentNo']; appointmentNo = json['AppointmentNo'];
@ -39,6 +40,7 @@ class PostChiefComplaintRequestModel {
doctorID = json['DoctorID']; doctorID = json['DoctorID'];
editedBy = json['EditedBy']; editedBy = json['EditedBy'];
admissionNo = json['AdmissionNo']; admissionNo = json['AdmissionNo'];
pomrId = json[' String? pomrId;'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -58,6 +60,7 @@ class PostChiefComplaintRequestModel {
data['isLactation'] = this.isLactation; data['isLactation'] = this.isLactation;
data['numberOfWeeks'] = this.numberOfWeeks; data['numberOfWeeks'] = this.numberOfWeeks;
data['DoctorID'] = this.doctorID; data['DoctorID'] = this.doctorID;
data['pomrId'] = this.pomrId;
if (editedBy != null) { if (editedBy != null) {
data['EditedBy'] = this.editedBy; data['EditedBy'] = this.editedBy;
} }

@ -1,7 +1,7 @@
class GetEpisodeForInpatientReqModel { class GetEpisodeForInpatientReqModel {
int? patientID; int? patientID;
int? patientTypeID; int? patientTypeID;
int? admissionNo; dynamic? admissionNo;
GetEpisodeForInpatientReqModel( GetEpisodeForInpatientReqModel(
{this.patientID, this.patientTypeID, this.admissionNo}); {this.patientID, this.patientTypeID, this.admissionNo});

@ -64,7 +64,9 @@ class AdmissionOrdersRequestModel {
data['DeviceTypeID'] = this.deviceTypeID; data['DeviceTypeID'] = this.deviceTypeID;
data['TokenID'] = this.tokenID; data['TokenID'] = this.tokenID;
data['PatientID'] = this.patientID; data['PatientID'] = this.patientID;
data['PatientMRN'] = this.patientID;
data['AdmissionNo'] = this.admissionNo; data['AdmissionNo'] = this.admissionNo;
data['AdmissionRequestNo'] = this.admissionNo;
data['SessionID'] = this.sessionID; data['SessionID'] = this.sessionID;
data['ProjectID'] = this.projectID; data['ProjectID'] = this.projectID;
data['SetupID'] = this.setupID; data['SetupID'] = this.setupID;

@ -50,4 +50,32 @@ class GetDiagnosisForInPatientResponseModel {
data['EditedOn'] = this.editedOn; data['EditedOn'] = this.editedOn;
return data; return data;
} }
/*
*
* String? iCDCode10ID;
int? diagnosisTypeID;
int? conditionID;
bool? complexDiagnosis;
String? asciiDesc;
int? createdBy;
String? createdOn;
int? editedBy;
String? editedOn;
String? createdByName;
String? editedByName;
*/
GetDiagnosisForInPatientResponseModel.fromJsonForVidaPlus(json) {
iCDCode10ID = json['selectedIcdCode'];
diagnosisTypeID = json['DiagnosisTypeID'];
conditionID = json['ConditionID'];
complexDiagnosis = json['ComplexDiagnosis'];
asciiDesc = json['selectedDisease'];
createdBy = json['CreatedBy'];
createdOn = json['createdOn'];
editedBy = json['EditedBy'];
editedOn = json['EditedOn'];
createdByName = json['createdBy'];
editedByName = json['EditedByName'];
}
} }

@ -3,11 +3,15 @@ class GetDischargeSummaryReqModel {
int? admissionNo; int? admissionNo;
int? patientType; int? patientType;
int? patientTypeID; int? patientTypeID;
int? clinicId;
int? doctorId;
GetDischargeSummaryReqModel( GetDischargeSummaryReqModel(
{this.patientID, {this.patientID,
this.admissionNo, this.admissionNo,
this.patientType = 1, this.patientType = 1,
this.clinicId = null,
this.doctorId = null,
this.patientTypeID = 1}); this.patientTypeID = 1});
GetDischargeSummaryReqModel.fromJson(Map<String, dynamic> json) { GetDischargeSummaryReqModel.fromJson(Map<String, dynamic> json) {
@ -15,14 +19,20 @@ class GetDischargeSummaryReqModel {
admissionNo = json['AdmissionNo']; admissionNo = json['AdmissionNo'];
patientType = json['PatientType']; patientType = json['PatientType'];
patientTypeID = json['PatientTypeID']; patientTypeID = json['PatientTypeID'];
clinicId = json['ClinicID'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = new Map<String, dynamic>();
print("the clinic id is $clinicId");
print("the doctorId id is $doctorId");
data['PatientID'] = this.patientID; data['PatientID'] = this.patientID;
data['PatientMRN'] = this.patientID;
data['AdmissionNo'] = this.admissionNo; data['AdmissionNo'] = this.admissionNo;
data['PatientType'] = this.patientType; data['PatientType'] = this.patientType;
data['PatientTypeID'] = this.patientTypeID; data['PatientTypeID'] = this.patientTypeID;
data['ClinicID'] = this.clinicId;
data['DoctorID'] = this.doctorId;
data['isDentalAllowedBackend'] = false; data['isDentalAllowedBackend'] = false;
return data; return data;

@ -47,6 +47,7 @@ class InsuranceApprovalInPatientRequestModel {
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = new Map<String, dynamic>();
data['PatientID'] = this.patientID; data['PatientID'] = this.patientID;
data['PatientMRN'] = this.patientID;
data['PatientTypeID'] = this.patientTypeID; data['PatientTypeID'] = this.patientTypeID;
data['EXuldAPPNO'] = this.eXuldAPPNO; data['EXuldAPPNO'] = this.eXuldAPPNO;
data['ProjectID'] = this.projectID; data['ProjectID'] = this.projectID;

@ -1,5 +1,6 @@
class GetNursingProgressNoteRequestModel { class GetNursingProgressNoteRequestModel {
int? patientID; int? patientID;
int? patientMRN;
int? admissionNo; int? admissionNo;
int? patientTypeID; int? patientTypeID;
int? patientType; int? patientType;
@ -10,6 +11,7 @@ class GetNursingProgressNoteRequestModel {
this.admissionNo, this.admissionNo,
this.patientTypeID = 1, this.patientTypeID = 1,
this.patientType = 1, this.patientType = 1,
this.patientMRN,
this.setupID}); this.setupID});
GetNursingProgressNoteRequestModel.fromJson(Map<String, dynamic> json) { GetNursingProgressNoteRequestModel.fromJson(Map<String, dynamic> json) {
@ -18,6 +20,7 @@ class GetNursingProgressNoteRequestModel {
patientTypeID = json['PatientTypeID']; patientTypeID = json['PatientTypeID'];
patientType = json['PatientType']; patientType = json['PatientType'];
setupID = json['SetupID']; setupID = json['SetupID'];
patientMRN = json['PatientMRN'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -27,6 +30,7 @@ class GetNursingProgressNoteRequestModel {
data['PatientTypeID'] = this.patientTypeID; data['PatientTypeID'] = this.patientTypeID;
data['PatientType'] = this.patientType; data['PatientType'] = this.patientType;
data['SetupID'] = this.setupID; data['SetupID'] = this.setupID;
data['PatientMRN'] = this.patientMRN;
return data; return data;
} }
} }

@ -1,3 +1,5 @@
import 'package:doctor_app_flutter/utils/extenstions_utils.dart';
class NoteModel { class NoteModel {
String? setupID; String? setupID;
int? projectID; int? projectID;
@ -73,6 +75,30 @@ class NoteModel {
conditionDescription = json['ConditionDescription']; conditionDescription = json['ConditionDescription'];
} }
NoteModel.fromJsonForVidaPlusResponse(json){
setupID = json['SetupID'];
projectID = json['ProjectID'];
patientID = json['PatientID'];
patientType = json['PatientType'];
admissionNo = json['AdmissionNo'];
lineItemNo = json['LineItemNo'];
visitType = json['VisitType'];
notes = json['progressNote'];
assessmentDate = json['AssessmentDate'];
visitTime = json['VisitTime'];
status = json['Status'];
nursingRemarks = json['NursingRemarks'];
createdOn = json['CreatedOn'];
editedOn = json['EditedOn'];
createdBy = json['CreatedBy'];
admissionClinicID = int.parse(json['speciality'].isEmpty == true?"-1":json['speciality']);
admissionClinicName = json['specialityName'];
doctorClinicName = json['DoctorClinicName'];
doctorName = json['userFullName'];
visitTypeDesc = json['VisitTypeDesc'];
condition = int.parse(json['patientCondition'].isEmpty == true?"-1":json['patientCondition']);
conditionDescription = json['patientConditionName'];}
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = new Map<String, dynamic>();
data['SetupID'] = this.setupID; data['SetupID'] = this.setupID;

@ -17,6 +17,7 @@ class UpdateNoteReqModel {
bool? patientOutSA; bool? patientOutSA;
int? patientTypeID; int? patientTypeID;
int? conditionId; int? conditionId;
String? patientMRN;
UpdateNoteReqModel( UpdateNoteReqModel(
@ -37,7 +38,8 @@ class UpdateNoteReqModel {
this.isLoginForDoctorApp, this.isLoginForDoctorApp,
this.patientOutSA, this.patientOutSA,
this.patientTypeID, this.patientTypeID,
this.conditionId}); this.conditionId,
this.patientMRN});
UpdateNoteReqModel.fromJson(Map<String, dynamic> json) { UpdateNoteReqModel.fromJson(Map<String, dynamic> json) {
projectID = json['ProjectID']; projectID = json['ProjectID'];
@ -58,6 +60,7 @@ class UpdateNoteReqModel {
patientOutSA = json['PatientOutSA']; patientOutSA = json['PatientOutSA'];
patientTypeID = json['PatientTypeID']; patientTypeID = json['PatientTypeID'];
conditionId = json['ConditionId']; conditionId = json['ConditionId'];
patientMRN = json['PatientMRN'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -80,6 +83,7 @@ class UpdateNoteReqModel {
data['PatientOutSA'] = this.patientOutSA; data['PatientOutSA'] = this.patientOutSA;
data['PatientTypeID'] = this.patientTypeID; data['PatientTypeID'] = this.patientTypeID;
data['ConditionId'] = this.conditionId; data['ConditionId'] = this.conditionId;
data['PatientMRN'] = this.patientMRN;
return data; return data;
} }
} }

@ -12,6 +12,12 @@ class GetReservationsRequestModel {
int? deviceTypeID; int? deviceTypeID;
String? tokenID; String? tokenID;
String? sessionID; String? sessionID;
int? patientMRN;
int? AdmissionRequestNo;
int? PatientTypeID;
int? ResultType;
int? AdmissionNo;
int? LoginDoctorID;
GetReservationsRequestModel( GetReservationsRequestModel(
{this.patientID, {this.patientID,
@ -26,7 +32,14 @@ class GetReservationsRequestModel {
this.patientOutSA, this.patientOutSA,
this.deviceTypeID, this.deviceTypeID,
this.tokenID, this.tokenID,
this.sessionID}); this.patientMRN,
this.sessionID,
this.AdmissionRequestNo = 0,
this.PatientTypeID= 0,
this.ResultType = 0,
this.AdmissionNo = 0,
this.LoginDoctorID ,
});
GetReservationsRequestModel.fromJson(Map<String, dynamic> json) { GetReservationsRequestModel.fromJson(Map<String, dynamic> json) {
patientID = json['PatientID']; patientID = json['PatientID'];
@ -42,6 +55,7 @@ class GetReservationsRequestModel {
deviceTypeID = json['DeviceTypeID']; deviceTypeID = json['DeviceTypeID'];
tokenID = json['TokenID']; tokenID = json['TokenID'];
sessionID = json['SessionID']; sessionID = json['SessionID'];
patientMRN = json['PatientMRN'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -59,6 +73,12 @@ class GetReservationsRequestModel {
data['DeviceTypeID'] = this.deviceTypeID; data['DeviceTypeID'] = this.deviceTypeID;
data['TokenID'] = this.tokenID; data['TokenID'] = this.tokenID;
data['SessionID'] = this.sessionID; data['SessionID'] = this.sessionID;
data['PatientMRN'] = this.patientMRN;
data['AdmissionRequestNo'] = this.AdmissionRequestNo;
data['PatientTypeID'] = this.PatientTypeID;
data['ResultType'] = this.ResultType;
data['AdmissionNo'] = this.AdmissionNo;
data['LoginDoctorID'] = this.LoginDoctorID;
return data; return data;
} }
} }

@ -101,7 +101,7 @@ class GetReservationsResponseModel {
editedOn = json['EditedOn']; editedOn = json['EditedOn'];
patientName = json['PatientName']; patientName = json['PatientName'];
patientNameN = json['PatientNameN']; patientNameN = json['PatientNameN'];
gender = json['Gender']; gender = json['Gender']?.toString()??"";
dateofBirth = json['DateofBirth']; dateofBirth = json['DateofBirth'];
mobileNumber = json['MobileNumber']; mobileNumber = json['MobileNumber'];
emailAddress = json['EmailAddress']; emailAddress = json['EmailAddress'];

@ -55,6 +55,7 @@ class PatiantInformtion {
int? patientType; int? patientType;
int? patientMRN; int? patientMRN;
String? admissionNo; String? admissionNo;
int? admissionID;
String? admissionDate; String? admissionDate;
DateTime? admissionDateWithDateTimeForm; DateTime? admissionDateWithDateTimeForm;
String? createdOn; String? createdOn;
@ -80,6 +81,12 @@ class PatiantInformtion {
int? vcId; int? vcId;
String? voipToken; String? voipToken;
String? pomrId; String? pomrId;
int? rowId;
int? createdBy;
int? editedBy;
String? editedOn;
PatiantInformtion( PatiantInformtion(
{this.patientDetails, {this.patientDetails,
this.projectId, this.projectId,
@ -156,7 +163,8 @@ class PatiantInformtion {
this.voipToken, this.voipToken,
this.admissionDateWithDateTimeForm, this.admissionDateWithDateTimeForm,
this.appointmentDateWithDateTimeForm, this.appointmentDateWithDateTimeForm,
this.pomrId this.pomrId,
this.admissionID
}); });
PatiantInformtion.fromJson(Map<String, dynamic> json) { PatiantInformtion.fromJson(Map<String, dynamic> json) {
@ -264,7 +272,7 @@ class PatiantInformtion {
consultationNotes = json['ConsultationNotes']; consultationNotes = json['ConsultationNotes'];
patientStatus = json['PatientStatus']; patientStatus = json['PatientStatus'];
voipToken = json['VoipToken']; voipToken = json['VoipToken'];
pomrId = json['pomrId']; pomrId = json['pomrId']??(json["PatientPomrID"]?.toString());
admissionDateWithDateTimeForm = json["AdmissionDate"] != null admissionDateWithDateTimeForm = json["AdmissionDate"] != null
? AppDateUtils.convertStringToDate(json["AdmissionDate"]) ? AppDateUtils.convertStringToDate(json["AdmissionDate"])
: json["admissionDate"] != null : json["admissionDate"] != null
@ -274,6 +282,10 @@ class PatiantInformtion {
appointmentDateWithDateTimeForm = json["AppointmentDate"] != null appointmentDateWithDateTimeForm = json["AppointmentDate"] != null
? AppDateUtils.convertStringToDate(json["AppointmentDate"]) ? AppDateUtils.convertStringToDate(json["AppointmentDate"])
: null; : null;
rowId = json['RowID'];
createdBy = json['CreatedBy'];
editedBy = json['EditedBy'];
admissionID = json['AdmissionID'];
} }
} }

@ -56,6 +56,8 @@ class ProgressNoteRequest {
data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp; data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp;
data['PatientOutSA'] = this.patientOutSA; data['PatientOutSA'] = this.patientOutSA;
data['PatientTypeID'] = this.patientTypeID; data['PatientTypeID'] = this.patientTypeID;
return data; return data;
} }
} }

@ -15,6 +15,8 @@ class PatientSearchRequestModel {
int? nursingStationID; int? nursingStationID;
int? clinicID = 0; int? clinicID = 0;
int? loginDoctorID; int? loginDoctorID;
int? pageIndex;
int? pageSize;
PatientSearchRequestModel( PatientSearchRequestModel(
@ -27,12 +29,16 @@ class PatientSearchRequestModel {
this.patientID = 0, this.patientID = 0,
this.searchType = 1, this.searchType = 1,
this.mobileNo = "", this.mobileNo = "",
this.identificationNo = "0", this.identificationNo = "",
this.from = "0", this.from = "",
this.to = "0", this.to = "",
this.clinicID, this.clinicID = 0,
this.nursingStationID = 0, this.nursingStationID = 0,
this.projectID, this.loginDoctorID}); this.projectID,
this.loginDoctorID,
this.pageIndex = 0 ,
this.pageSize = 10
});
PatientSearchRequestModel.fromJson(Map<String, dynamic> json) { PatientSearchRequestModel.fromJson(Map<String, dynamic> json) {
doctorID = json['DoctorID']; doctorID = json['DoctorID'];
@ -51,11 +57,14 @@ class PatientSearchRequestModel {
clinicID = json['ClinicID']; clinicID = json['ClinicID'];
projectID = json['ProjectID']; projectID = json['ProjectID'];
loginDoctorID = json['LoginDoctorID']; loginDoctorID = json['LoginDoctorID'];
pageIndex = json['PageIndex'];
pageSize = json['PageSize'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = new Map<String, dynamic>();
data['DoctorID'] = this.doctorID; data['DoctorID'] = this.doctorID;
data['MemberID'] = this.doctorID;
data['FirstName'] = this.firstName; data['FirstName'] = this.firstName;
data['MiddleName'] = this.middleName; data['MiddleName'] = this.middleName;
data['LastName'] = this.lastName; data['LastName'] = this.lastName;
@ -71,6 +80,8 @@ class PatientSearchRequestModel {
data['ClinicID'] = this.clinicID; data['ClinicID'] = this.clinicID;
data['ProjectID'] = this.projectID; data['ProjectID'] = this.projectID;
data['LoginDoctorID'] = this.loginDoctorID; data['LoginDoctorID'] = this.loginDoctorID;
data['PageIndex'] = this.pageIndex;
data['PageSize'] = this.pageSize;
return data; return data;
} }
} }

@ -64,6 +64,7 @@ class PendingOrderRequestModel {
data['DeviceTypeID'] = this.deviceTypeID; data['DeviceTypeID'] = this.deviceTypeID;
data['TokenID'] = this.tokenID; data['TokenID'] = this.tokenID;
data['PatientID'] = this.patientID; data['PatientID'] = this.patientID;
data['PatientMRN'] = this.patientID;
data['AdmissionNo'] = this.admissionNo; data['AdmissionNo'] = this.admissionNo;
data['SessionID'] = this.sessionID; data['SessionID'] = this.sessionID;
data['ProjectID'] = this.projectID; data['ProjectID'] = this.projectID;

@ -23,6 +23,10 @@ class ReferralRequest {
String? sessionID; String? sessionID;
bool? isLoginForDoctorApp; bool? isLoginForDoctorApp;
bool? patientOutSA; bool? patientOutSA;
String? diseaseDescription;
String? diseaseCode;
String? toDate;
ReferralRequest( ReferralRequest(
{this.roomID, {this.roomID,
@ -103,6 +107,9 @@ class ReferralRequest {
data['SessionID'] = this.sessionID; data['SessionID'] = this.sessionID;
data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp; data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp;
data['PatientOutSA'] = this.patientOutSA; data['PatientOutSA'] = this.patientOutSA;
data['Diagnosis'] = this.diseaseDescription;
data['DiagnosisCode'] = this.diseaseCode;
data['ToDate'] = this.toDate;
return data; return data;
} }
} }

@ -5,11 +5,15 @@ import 'package:doctor_app_flutter/core/model/hospitals/get_hospitals_request_mo
import 'package:doctor_app_flutter/core/model/hospitals/get_hospitals_response_model.dart'; import 'package:doctor_app_flutter/core/model/hospitals/get_hospitals_response_model.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart';
class HospitalsService extends BaseService { class HospitalsService extends BaseService {
static String memberId = "";
List<GetHospitalsResponseModel> hospitals = []; List<GetHospitalsResponseModel> hospitals = [];
List<VidaPlusProjectListModel> vidaPlusProjectListModel = []; List<VidaPlusProjectListModel> vidaPlusProjectListModel = [];
Future getHospitals(GetHospitalsRequestModel getHospitalsRequestModel) async { Future getHospitals(GetHospitalsRequestModel getHospitalsRequestModel) async {
memberId = getHospitalsRequestModel.memberID??"";
hasError = false; hasError = false;
await baseAppClient.post( await baseAppClient.post(
GET_PROJECTS, GET_PROJECTS,

@ -3,6 +3,7 @@ import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart'; import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/core/model/referral/ReferralRequest.dart'; import 'package:doctor_app_flutter/core/model/referral/ReferralRequest.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/utils/date-utils.dart';
class ReferralService extends BaseService { class ReferralService extends BaseService {
Future referralPatient( Future referralPatient(
@ -15,8 +16,11 @@ class ReferralService extends BaseService {
int? priority, int? priority,
int? frequency, int? frequency,
String? referringDoctorRemarks, String? referringDoctorRemarks,
String? extension}) async { String? extension,
// await getDoctorProfile(); String? diagnosisCode,
String? diagnosisDescription}) async {
// await getDoctorProfile();
print("the referralClinic is $referralClinic");
ReferralRequest referralRequest = ReferralRequest(); ReferralRequest referralRequest = ReferralRequest();
Map<String, dynamic>? profile = await sharedPref.getObj(DOCTOR_PROFILE); Map<String, dynamic>? profile = await sharedPref.getObj(DOCTOR_PROFILE);
DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile!); DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile!);
@ -35,6 +39,11 @@ class ReferralService extends BaseService {
referralRequest.editedBy = doctorProfile!.doctorID; referralRequest.editedBy = doctorProfile!.doctorID;
referralRequest.createdBy = doctorProfile!.doctorID; referralRequest.createdBy = doctorProfile!.doctorID;
referralRequest.patientOutSA = false; referralRequest.patientOutSA = false;
referralRequest.diseaseCode = diagnosisCode;
referralRequest.diseaseDescription = diagnosisDescription;
referralRequest.toDate = AppDateUtils.convertDateToServerFormat(DateTime.now());
var json =referralRequest.toJson();
json["Specialty"] = doctorProfile?.specialty?.first;
await baseAppClient.post( await baseAppClient.post(
REFER_TO_DOCTOR, REFER_TO_DOCTOR,
@ -43,7 +52,7 @@ class ReferralService extends BaseService {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, },
body: referralRequest.toJson(), body: json,
); );
} }
} }

@ -1,4 +1,5 @@
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/hospitals/get_hospitals_request_model.dart';
import 'package:doctor_app_flutter/core/model/referral/MyReferralPatientModel.dart'; import 'package:doctor_app_flutter/core/model/referral/MyReferralPatientModel.dart';
import 'package:doctor_app_flutter/lookups/hospital_lookup.dart'; import 'package:doctor_app_flutter/lookups/hospital_lookup.dart';
import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart'; import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart';
@ -72,6 +73,7 @@ class PatientReferralService extends LookupService {
await baseAppClient.post( await baseAppClient.post(
PROJECT_GET_INFO, PROJECT_GET_INFO,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
print("the response is ${response['ProjectInfo'][0]['facilityGroupId']}");
setupID = response['ProjectInfo'][0]['facilityGroupId']; setupID = response['ProjectInfo'][0]['facilityGroupId'];
}, },
onFailure: (String error, int statusCode) { onFailure: (String error, int statusCode) {

@ -2,12 +2,14 @@ import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.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/service/base/base_service.dart';
import 'package:flutter/material.dart';
class PatientInPatientService extends BaseService { class PatientInPatientService extends BaseService {
List<PatiantInformtion> inPatientList = []; List<PatiantInformtion> inPatientList = [];
List<PatiantInformtion> myInPatientList = []; List<PatiantInformtion> myInPatientList = [];
Future getInPatientList(PatientSearchRequestModel requestModel, bool isMyInpatient) async { Future getInPatientList(PatientSearchRequestModel requestModel, bool isMyInpatient,
{bool isVidaPlusProject = false}) async {
hasError = false; hasError = false;
await getDoctorProfile(isGetProfile: true); await getDoctorProfile(isGetProfile: true);
requestModel.loginDoctorID = doctorProfile!.doctorID; requestModel.loginDoctorID = doctorProfile!.doctorID;

@ -1,6 +1,7 @@
import 'package:doctor_app_flutter/client/base_app_client.dart'; import 'package:doctor_app_flutter/client/base_app_client.dart';
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/core/model/SOAP/assessment/patient_previous_diagnosis.dart';
import 'package:doctor_app_flutter/core/model/diabetic_chart/GetDiabeticChartValuesRequestModel.dart'; import 'package:doctor_app_flutter/core/model/diabetic_chart/GetDiabeticChartValuesRequestModel.dart';
import 'package:doctor_app_flutter/core/model/diabetic_chart/GetDiabeticChartValuesResponseModel.dart'; import 'package:doctor_app_flutter/core/model/diabetic_chart/GetDiabeticChartValuesResponseModel.dart';
import 'package:doctor_app_flutter/core/model/diagnosis/GetDiagnosisForInPatientRequestModel.dart'; import 'package:doctor_app_flutter/core/model/diagnosis/GetDiagnosisForInPatientRequestModel.dart';
@ -27,6 +28,7 @@ import 'package:doctor_app_flutter/core/model/patient/refer_to_doctor_request.da
import 'package:doctor_app_flutter/core/model/patient/vital_sign/vital_sign_res_model.dart'; import 'package:doctor_app_flutter/core/model/patient/vital_sign/vital_sign_res_model.dart';
import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart'; import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:flutter/material.dart';
class PatientService extends BaseService { class PatientService extends BaseService {
List<VitalSignResModel> _patientVitalSignList = []; List<VitalSignResModel> _patientVitalSignList = [];
@ -339,6 +341,29 @@ class PatientService extends BaseService {
); );
} }
Future getVidaPlusProgressNote(patient) async {
hasError = false;
await baseAppClient.post(
GET_PROGRESS_NOTE,
onSuccess: (dynamic response, int statusCode) {
_patientProgressNoteList = [];
// _patientProgressNoteList =
response['ListProgressNote']['resultData'].forEach((v) {
v['data'].forEach((response) {
_patientProgressNoteList.add(new NoteModel.fromJsonForVidaPlusResponse(response));
});
});
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
},
body: patient,
);
}
Future updatePatientProgressNote(UpdateNoteReqModel req) async { Future updatePatientProgressNote(UpdateNoteReqModel req) async {
hasError = false; hasError = false;
@ -524,6 +549,42 @@ class PatientService extends BaseService {
); );
} }
getDiagnosis(PatiantInformtion patient) async {
Map<String, dynamic> request = {
// "hospitalGroupId": 105,
// "hospitalId": 313,
// "patientId": 70023498,
// "patientPomrId": 9907,
// "startRow": 0,
// "endRow": 10,
// "isSelected": true,
// "ProjectID": 313
"hospitalGroupId": await sharedPref.getString(DOCTOR_SETUP_ID),
"hospitalId": patient.projectId,
"patientId": patient.patientId,
"patientPomrId": patient.pomrId,
"startRow": 0,
"endRow": 1000000,
"ProjectID": patient.projectId
};
List<dynamic> dynamicResponse = [];
hasError = false;
await baseAppClient.post(GET_LIST_OF_DIAGNOSIS,
onSuccess: (dynamic response, int statusCode) {
_diagnosisForInPatientList.clear();
dynamicResponse = response['ListDiagnosisDetailsSearch']['resultData'];
response['ListDiagnosisDetailsSearch']['resultData'].forEach((v) =>
_diagnosisForInPatientList.add(GetDiagnosisForInPatientResponseModel.fromJsonForVidaPlus(v)));
}, onFailure: (String error, int statusCode) {
_diagnosisForInPatientList.clear();
hasError = true;
super.error = error;
}, body: request);
return dynamicResponse;
}
Future getDiabeticChartValues(GetDiabeticChartValuesRequestModel getDiabeticChartValuesRequestModel) async { Future getDiabeticChartValues(GetDiabeticChartValuesRequestModel getDiabeticChartValuesRequestModel) async {
hasError = false; hasError = false;
@ -559,4 +620,38 @@ class PatientService extends BaseService {
body: stpMasterListRequestModel.toJson(), body: stpMasterListRequestModel.toJson(),
); );
} }
Future<bool> createProgressNote(
CreateNoteModel data,
PatiantInformtion patient,
) async {
var profile = await getDoctorProfile();
Map<String, dynamic> request = {
"planNote": data.notes,
"PatientMRN": patient.patientMRN,
"EpisodeID": patient.pomrId,
"CreatedByName": patient.doctorName,
"CreatedBy": patient.doctorId,
"Speciality": patient.clinicId,
"ProgressNotesTypes": "DOCTOR_NOTE",
"PatientCondition": data.conditionId,
"ProjectID": patient.projectId
};
var success = false;
await baseAppClient.post(CREATE_PROGRESS_NOTE,
onSuccess: (dynamic response, int statusCode) {
if (response['ListCreateProgressNote'] != null) {
// DrAppToastMsg.showSuccesToast(
// response['ListCreateProgressNote']['message']);
success = true;
}
}, onFailure: (String error, int statusCode) {
success = false;
hasError = true;
super.error = error;
}, body: request);
return success;
}
} }

@ -1,4 +1,5 @@
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/core/model/operation_report/create_update_operation_report_request_model.dart'; import 'package:doctor_app_flutter/core/model/operation_report/create_update_operation_report_request_model.dart';
import 'package:doctor_app_flutter/core/model/operation_report/get_operation_details_request_modle.dart'; import 'package:doctor_app_flutter/core/model/operation_report/get_operation_details_request_modle.dart';
@ -6,6 +7,8 @@ import 'package:doctor_app_flutter/core/model/operation_report/get_operation_det
import 'package:doctor_app_flutter/core/model/operation_report/get_reservations_response_model.dart'; import 'package:doctor_app_flutter/core/model/operation_report/get_reservations_response_model.dart';
import 'package:doctor_app_flutter/core/model/operation_report/get_reservations_request_model.dart'; import 'package:doctor_app_flutter/core/model/operation_report/get_reservations_request_model.dart';
import '../../../../config/shared_pref_kay.dart' show DOCTOR_PROFILE;
class OperationReportService extends BaseService { class OperationReportService extends BaseService {
List<GetReservationsResponseModel> _reservationList = []; List<GetReservationsResponseModel> _reservationList = [];
@ -18,9 +21,12 @@ class OperationReportService extends BaseService {
Future getReservations( Future getReservations(
{GetReservationsRequestModel? getReservationsRequestModel, {GetReservationsRequestModel? getReservationsRequestModel,
int? patientId}) async { int? patientId, int? patientMRN}) async {
Map<String, dynamic>? profile = await sharedPref.getObj(DOCTOR_PROFILE);
DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile!);
getReservationsRequestModel = getReservationsRequestModel =
GetReservationsRequestModel(patientID: patientId); GetReservationsRequestModel(patientID: patientId,patientMRN: patientMRN, LoginDoctorID: doctorProfile.doctorID);
hasError = false; hasError = false;
await baseAppClient.post(GET_RESERVATIONS, await baseAppClient.post(GET_RESERVATIONS,

@ -9,14 +9,15 @@ class PatientMedicalReportService extends BaseService {
List<MedicalReportModel> medicalReportList = []; List<MedicalReportModel> medicalReportList = [];
List<MedicalReportTemplate> medicalReportTemplate = []; List<MedicalReportTemplate> medicalReportTemplate = [];
Future getMedicalReportList(PatiantInformtion patient) async { Future getMedicalReportList(PatiantInformtion patient, bool isVidaPlusProject) async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
await getDoctorProfile(); await getDoctorProfile();
body['AdmissionNo'] = patient.admissionNo; body['AdmissionNo'] = isVidaPlusProject ?patient.admissionID : patient.admissionNo;
body['SetupID'] = doctorProfile!.setupID; body['SetupID'] = doctorProfile!.setupID;
// body['ProjectID'] = doctorProfile!.projectID; body['ProjectID'] = doctorProfile!.projectID;
medicalReportList = []; medicalReportList = [];
await baseAppClient.postPatient(PATIENT_MEDICAL_REPORT_GET_LIST, onSuccess: (dynamic response, int statusCode) { await baseAppClient.postPatient(PATIENT_MEDICAL_REPORT_GET_LIST, onSuccess: (dynamic response, int statusCode) {
if (response['DAPP_ListMedicalReportList'] != null) { if (response['DAPP_ListMedicalReportList'] != null) {
response['DAPP_ListMedicalReportList'].forEach((v) { response['DAPP_ListMedicalReportList'].forEach((v) {
@ -33,8 +34,7 @@ class PatientMedicalReportService extends BaseService {
Future getMedicalReportTemplate() async { Future getMedicalReportTemplate() async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['SetupID'] = "91877";
body['TemplateID'] = 43;
await baseAppClient.post(PATIENT_MEDICAL_REPORT_GET_TEMPLATE, onSuccess: (dynamic response, int statusCode) { await baseAppClient.post(PATIENT_MEDICAL_REPORT_GET_TEMPLATE, onSuccess: (dynamic response, int statusCode) {
medicalReportTemplate.clear(); medicalReportTemplate.clear();
@ -62,11 +62,11 @@ class PatientMedicalReportService extends BaseService {
}, body: body, patient: patient); }, body: body, patient: patient);
} }
Future verifyMedicalReport(PatiantInformtion patient, MedicalReportModel medicalReport) async { Future verifyMedicalReport(PatiantInformtion patient, MedicalReportModel medicalReport, bool? isVidaPlusProject,) async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['SetupID'] = "91877"; body['SetupID'] = "91877";
body['AdmissionNo'] = patient.admissionNo; body['AdmissionNo'] = isVidaPlusProject == true? patient.admissionID : patient.admissionNo;
body['InvoiceNo'] = medicalReport.invoiceNo; body['InvoiceNo'] = medicalReport.invoiceNo;
body['LineItemNo'] = medicalReport.lineItemNo; body['LineItemNo'] = medicalReport.lineItemNo;
if (body['ProjectID'] == null) { if (body['ProjectID'] == null) {
@ -80,7 +80,7 @@ class PatientMedicalReportService extends BaseService {
}, body: body, patient: patient); }, body: body, patient: patient);
} }
Future addMedicalReport(PatiantInformtion patient, String htmlText) async { Future addMedicalReport(PatiantInformtion patient, String htmlText, bool? isVidaPlusProject) async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['SetupID'] = body.containsKey('SetupID') body['SetupID'] = body.containsKey('SetupID')
@ -88,15 +88,21 @@ class PatientMedicalReportService extends BaseService {
? body['SetupID'] ? body['SetupID']
: SETUP_ID : SETUP_ID
: SETUP_ID; : SETUP_ID;
body['AdmissionNo'] = int.parse(patient.admissionNo!); print("isVidaPlusProject $isVidaPlusProject");
body['AdmissionNo'] = isVidaPlusProject == true? patient.admissionID ?? -1 :int.parse(patient.admissionNo!);
print('the admission no is ${body['AdmissionNo']}');
body['MedicalReportHTML'] = htmlText; body['MedicalReportHTML'] = htmlText;
body['ProjectID'] = patient.projectId; body['ProjectID'] = patient.projectId;
body['PatientID'] = patient.patientId;
body['DoctorID'] = patient.doctorId; body['DoctorID'] = patient.doctorId;
if(isVidaPlusProject == true) {
body['PatientType'] = patient.patientType;
}
await baseAppClient.postPatient(INSERT_MEDICAL_REPORT, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) { await baseAppClient.post(INSERT_MEDICAL_REPORT, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error.toString(); super.error = error.toString();
}, body: body, patient: patient); }, body: body);
} }
Future updateMedicalReport(PatiantInformtion patient, String htmlText, int limitNumber, String invoiceNumber) async { Future updateMedicalReport(PatiantInformtion patient, String htmlText, int limitNumber, String invoiceNumber) async {

@ -359,11 +359,11 @@ class PrescriptionService extends LookupService {
}, body: body); }, body: body);
} }
Future getMedicationForInPatient(PatiantInformtion patient) async { Future getMedicationForInPatient(PatiantInformtion patient, {required bool isVidaPlusProject}) async {
hasError = false; hasError = false;
_getMedicationForInPatientRequestModel = GetMedicationForInPatientRequestModel( _getMedicationForInPatientRequestModel = GetMedicationForInPatientRequestModel(
isDentalAllowedBackend: false, isDentalAllowedBackend: false,
admissionNo: int.parse(patient.admissionNo!), admissionNo: isVidaPlusProject ? patient.admissionID : int.parse(patient.admissionNo!),
projectID: patient.projectId, projectID: patient.projectId,
); );
await baseAppClient.postPatient(GET_MEDICATION_FOR_IN_PATIENT, patient: patient, onSuccess: (dynamic response, int statusCode) { await baseAppClient.postPatient(GET_MEDICATION_FOR_IN_PATIENT, patient: patient, onSuccess: (dynamic response, int statusCode) {

@ -37,6 +37,29 @@ class PendingOrderService extends BaseService {
}, body: pendingOrderRequestModel.toJson()); }, body: pendingOrderRequestModel.toJson());
} }
Future getPendingOrdersForVidaPlus({PendingOrderRequestModel? pendingOrderRequestModel, int? patientId, int? admissionNo,}) async {
pendingOrderRequestModel = PendingOrderRequestModel(
patientID: patientId,
admissionNo: admissionNo,
patientTypeID: 1,
patientType: 1,
);
hasError = false;
await baseAppClient.post(GET_PENDING_ORDERS_VIDA_PLUS, onSuccess: (dynamic response, int statusCode) {
print("Success");
_pendingOrderList.clear();
response['List_DoctorProgressNote'].forEach(
(v) {
_pendingOrderList.add(PendingOrderModel.fromJson(v));
},
);
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: pendingOrderRequestModel.toJson());
}
Future getAdmissionOrders({AdmissionOrdersRequestModel? admissionOrdersRequestModel, int? patientId, int? admissionNo}) async { Future getAdmissionOrders({AdmissionOrdersRequestModel? admissionOrdersRequestModel, int? patientId, int? admissionNo}) async {
admissionOrdersRequestModel = AdmissionOrdersRequestModel( admissionOrdersRequestModel = AdmissionOrdersRequestModel(
patientID: patientId, patientID: patientId,

@ -15,9 +15,9 @@ class PatientMedicalReportViewModel extends BaseViewModel {
List<MedicalReportTemplate> get medicalReportTemplate => List<MedicalReportTemplate> get medicalReportTemplate =>
_service.medicalReportTemplate; _service.medicalReportTemplate;
Future getMedicalReportList(PatiantInformtion patient) async { Future getMedicalReportList(PatiantInformtion patient,{bool isVidaPlusProject = false}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _service.getMedicalReportList(patient); await _service.getMedicalReportList(patient, isVidaPlusProject);
if (_service.hasError) { if (_service.hasError) {
error = _service.error; error = _service.error;
setState(ViewState.ErrorLocal); // ViewState.Error setState(ViewState.ErrorLocal); // ViewState.Error
@ -46,41 +46,41 @@ class PatientMedicalReportViewModel extends BaseViewModel {
} }
Future verifyMedicalReport( Future verifyMedicalReport(
PatiantInformtion patient, MedicalReportModel medicalReport) async { PatiantInformtion patient, MedicalReportModel medicalReport, bool? isVidaPlusProject) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _service.verifyMedicalReport(patient, medicalReport); await _service.verifyMedicalReport(patient, medicalReport, isVidaPlusProject);
if (_service.hasError) { if (_service.hasError) {
error = _service.error; error = _service.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
} else } else
await getMedicalReportList(patient); await getMedicalReportList(patient, isVidaPlusProject: isVidaPlusProject == true);
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future addMedicalReport(PatiantInformtion patient, String htmlText) async { Future addMedicalReport(PatiantInformtion patient, String htmlText, bool? isVidaPlusProject) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _service.addMedicalReport(patient, htmlText); await _service.addMedicalReport(patient, htmlText, isVidaPlusProject);
if (_service.hasError) { if (_service.hasError) {
error = _service.error; error = _service.error;
await getMedicalReportList(patient); await getMedicalReportList(patient, isVidaPlusProject: isVidaPlusProject == true);
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
} else { } else {
await getMedicalReportList(patient); await getMedicalReportList(patient,isVidaPlusProject: isVidaPlusProject == true);
setState(ViewState.Idle); setState(ViewState.Idle);
} }
} }
Future updateMedicalReport(PatiantInformtion patient, String htmlText, Future updateMedicalReport(PatiantInformtion patient, String htmlText,
int limitNumber, String invoiceNumber) async { int limitNumber, String invoiceNumber, bool? isVidaPlusProject) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _service.updateMedicalReport( await _service.updateMedicalReport(
patient, htmlText, limitNumber, invoiceNumber); patient, htmlText, limitNumber, invoiceNumber);
if (_service.hasError) { if (_service.hasError) {
error = _service.error; error = _service.error;
await getMedicalReportList(patient); await getMedicalReportList(patient, isVidaPlusProject: isVidaPlusProject == true);
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
} else { } else {
await getMedicalReportList(patient); await getMedicalReportList(patient,isVidaPlusProject: isVidaPlusProject == true);
setState(ViewState.Idle); setState(ViewState.Idle);
} }
} }

@ -8,6 +8,7 @@ import 'package:doctor_app_flutter/core/service/special_clinics/special_clinic_s
import 'package:doctor_app_flutter/core/model/dashboard/get_special_clinical_care_mapping_List_Respose_Model.dart'; import 'package:doctor_app_flutter/core/model/dashboard/get_special_clinical_care_mapping_List_Respose_Model.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/utils/date-utils.dart'; import 'package:doctor_app_flutter/utils/date-utils.dart';
import 'package:doctor_app_flutter/utils/utils.dart';
import '../../locator.dart'; import '../../locator.dart';
import 'base_view_model.dart'; import 'base_view_model.dart';
@ -132,14 +133,14 @@ class PatientSearchViewModel extends BaseViewModel {
List<PatiantInformtion> filteredInPatientItems = []; List<PatiantInformtion> filteredInPatientItems = [];
List<PatiantInformtion> filteredMyInPatientItems = []; List<PatiantInformtion> filteredMyInPatientItems = [];
Future getInPatientList(PatientSearchRequestModel requestModel, {bool isMyInpatient = false, bool isLocalBusy = false}) async { Future getInPatientList(PatientSearchRequestModel requestModel, {bool isMyInpatient = false, bool isLocalBusy = false, bool isVidaPlusProject = false, bool isForceFullRefresh = false}) async {
await getDoctorProfile(); await getDoctorProfile();
if (isLocalBusy) { if (isLocalBusy) {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
} else { } else {
setState(ViewState.Busy); setState(ViewState.Busy);
} }
if (inPatientList.length == 0) await _inPatientService.getInPatientList(requestModel, false); if (inPatientList.length == 0 || isForceFullRefresh) await _inPatientService.getInPatientList(requestModel, false, isVidaPlusProject: isVidaPlusProject);
if (_inPatientService.hasError) { if (_inPatientService.hasError) {
error = _inPatientService.error; error = _inPatientService.error;
if (isLocalBusy) { if (isLocalBusy) {
@ -342,4 +343,10 @@ class PatientSearchViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
} }
flushSelectedDates(){
selectedFromDate = null;
selectedToDate = null;
}
} }

@ -430,12 +430,14 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future getEpisodeForInpatient(PatiantInformtion patient) async { Future getEpisodeForInpatient(PatiantInformtion patient, bool isVidaPlusProject ) async {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
var admissionNo = (isVidaPlusProject)? (patient.admissionID??"-1"):int.parse( (patient.admissionNo??"-1")) ;
GetEpisodeForInpatientReqModel getEpisodeForInpatientReqModel = GetEpisodeForInpatientReqModel getEpisodeForInpatientReqModel =
GetEpisodeForInpatientReqModel( GetEpisodeForInpatientReqModel(
patientID: patient.patientId, patientID: patient.patientId,
admissionNo: int.parse(patient.admissionNo!), admissionNo: admissionNo,
patientTypeID: 1); patientTypeID: 1);
await _SOAPService.getEpisodeForInpatient(getEpisodeForInpatientReqModel); await _SOAPService.getEpisodeForInpatient(getEpisodeForInpatientReqModel);
if (_SOAPService.hasError) { if (_SOAPService.hasError) {
@ -932,6 +934,7 @@ class SOAPViewModel extends BaseViewModel {
isLactation: false, isLactation: false,
ispregnant: false, ispregnant: false,
doctorID: '', doctorID: '',
pomrId: patientInfo.pomrId,
numberOfWeeks: 0); numberOfWeeks: 0);
} }

@ -1,5 +1,7 @@
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart'; import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/enum/view_state.dart'; import 'package:doctor_app_flutter/core/enum/view_state.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/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/core/model/patient/my_referral/PendingReferral.dart'; import 'package:doctor_app_flutter/core/model/patient/my_referral/PendingReferral.dart';
import 'package:doctor_app_flutter/core/model/patient/my_referral/clinic-doctor.dart'; import 'package:doctor_app_flutter/core/model/patient/my_referral/clinic-doctor.dart';
@ -11,6 +13,7 @@ import 'package:doctor_app_flutter/core/service/patient/DischargedPatientService
import 'package:doctor_app_flutter/core/service/patient/MyReferralPatientService.dart'; import 'package:doctor_app_flutter/core/service/patient/MyReferralPatientService.dart';
import 'package:doctor_app_flutter/core/service/patient/ReferralService.dart'; import 'package:doctor_app_flutter/core/service/patient/ReferralService.dart';
import 'package:doctor_app_flutter/core/service/patient/patient-doctor-referral-service.dart'; import 'package:doctor_app_flutter/core/service/patient/patient-doctor-referral-service.dart';
import 'package:doctor_app_flutter/core/service/patient/patient_service.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -48,6 +51,31 @@ class PatientReferralViewModel extends BaseViewModel {
List<PatiantInformtion> get patientArrivalList => _referralPatientService.patientArrivalList; List<PatiantInformtion> get patientArrivalList => _referralPatientService.patientArrivalList;
PatientService _patientService = locator<PatientService>();
List<dynamic> diagnosisForInPatientList = [];
Future getDiagnosisForInPatient(
GetDiagnosisForInPatientRequestModel requestModel, bool isVidaPlusProject, PatiantInformtion patient) async {
await getDoctorProfile();
setState(ViewState.Busy);
List<dynamic> response = [];
if(isVidaPlusProject){
response = await _patientService.getDiagnosis(patient);
}
if (_patientService.hasError) {
error = _patientService.error;
setState(ViewState.ErrorLocal);
} else {
diagnosisForInPatientList = response;
setState(ViewState.Idle);
}
}
Future getPatientReferral(PatiantInformtion patient) async { Future getPatientReferral(PatiantInformtion patient) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _referralPatientService.getPatientReferral(patient); await _referralPatientService.getPatientReferral(patient);
@ -222,7 +250,7 @@ class PatientReferralViewModel extends BaseViewModel {
} }
} }
Future makeInPatientReferral( Future makeInPatientReferral(bool isVidaPlusProject,
{PatiantInformtion? patient, {PatiantInformtion? patient,
int? projectID, int? projectID,
int? clinicID, int? clinicID,
@ -232,7 +260,8 @@ class PatientReferralViewModel extends BaseViewModel {
String? referralDate, String? referralDate,
String? remarks, String? remarks,
String? ext, String? ext,
bool isLocalBusy = false}) async { bool isLocalBusy = false,
dynamic? diagnosis}) async {
if (isLocalBusy) if (isLocalBusy)
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
else else
@ -241,12 +270,14 @@ class PatientReferralViewModel extends BaseViewModel {
patientID: patient!.patientId, patientID: patient!.patientId,
roomID: patient.roomId, roomID: patient.roomId,
referralClinic: clinicID, referralClinic: clinicID,
admissionNo: int.parse(patient.admissionNo!), admissionNo: isVidaPlusProject?patient.admissionID:int.parse(patient.admissionNo!),
referralDoctor: doctorID, referralDoctor: doctorID,
patientTypeID: patient.patientType, patientTypeID: patient.patientType,
referringDoctorRemarks: remarks, referringDoctorRemarks: remarks,
priority: priority, priority: priority,
frequency: frequencyCode, frequency: frequencyCode,
diagnosisCode: diagnosis['selectedIcdCode'],
diagnosisDescription: diagnosis['selectedDisease'],
extension: ext, extension: ext,
); );
if (_referralService.hasError) { if (_referralService.hasError) {

@ -19,6 +19,7 @@ import 'package:doctor_app_flutter/core/model/patient/vital_sign/vital_sign_res_
import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart'; import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/service/patient/patient_service.dart'; import 'package:doctor_app_flutter/core/service/patient/patient_service.dart';
import '../../config/shared_pref_kay.dart';
import '../../locator.dart'; import '../../locator.dart';
import '../model/note/stp_master_list_req_model.dart'; import '../model/note/stp_master_list_req_model.dart';
import '../model/note/stp_master_list_res_model.dart'; import '../model/note/stp_master_list_res_model.dart';
@ -156,14 +157,27 @@ class PatientViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future getPatientProgressNote(patient, {bool isLocalBusy = false}) async { Future getPatientProgressNote(patientRequest,PatiantInformtion patient,
{bool isLocalBusy = false, bool isVidaPlus = false}) async {
if (isLocalBusy) { if (isLocalBusy) {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
} else { } else {
setState(ViewState.Busy); setState(ViewState.Busy);
} }
if (isVidaPlus) {
await _patientService.getPatientProgressNote(patient); Map<String, dynamic> request = {
"hospitalGroupId": await sharedPref.getString(DOCTOR_SETUP_ID),
"hospitalId": patient.projectId,
"patientId": patient.patientId,
"patientPomrId": patient.pomrId,
"endRow": 10000, // because no information is provided for the end row
"startRow": 0,
"ProjectID": patient.projectId
};
await _patientService.getVidaPlusProgressNote(request);
} else {
await _patientService.getPatientProgressNote(patientRequest);
}
if (_patientService.hasError) { if (_patientService.hasError) {
error = _patientService.error; error = _patientService.error;
if (isLocalBusy) { if (isLocalBusy) {
@ -185,9 +199,14 @@ class PatientViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future createPatientProgressNote(CreateNoteModel req) async { Future createPatientProgressNote(CreateNoteModel req, PatiantInformtion patient,
{bool isVidaPlus = false}) async {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
await _patientService.createPatientProgressNote(req); if (isVidaPlus) {
await _patientService.createProgressNote(req, patient);
} else {
await _patientService.createPatientProgressNote(req);
}
if (_patientService.hasError) { if (_patientService.hasError) {
error = _patientService.error; error = _patientService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
@ -326,11 +345,16 @@ class PatientViewModel extends BaseViewModel {
} }
Future getDiagnosisForInPatient( Future getDiagnosisForInPatient(
GetDiagnosisForInPatientRequestModel requestModel) async { GetDiagnosisForInPatientRequestModel requestModel, bool isVidaPlusProject, PatiantInformtion patient) async {
await getDoctorProfile(); await getDoctorProfile();
setState(ViewState.Busy); setState(ViewState.Busy);
await _patientService.getDiagnosisForInPatient(requestModel); if(isVidaPlusProject){
await _patientService.getDiagnosis(patient);
}else {
await _patientService.getDiagnosisForInPatient(requestModel);
}
if (_patientService.hasError) { if (_patientService.hasError) {
error = _patientService.error; error = _patientService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
@ -340,7 +364,7 @@ class PatientViewModel extends BaseViewModel {
} }
Future getDiabeticChartValues(PatiantInformtion patient, int resultType, Future getDiabeticChartValues(PatiantInformtion patient, int resultType,
{bool isLocalBusy = false}) async { {bool isLocalBusy = false, bool isVidaPlusProject = false}) async {
await getDoctorProfile(); await getDoctorProfile();
if (isLocalBusy) if (isLocalBusy)
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
@ -350,9 +374,8 @@ class PatientViewModel extends BaseViewModel {
GetDiabeticChartValuesRequestModel requestModel = GetDiabeticChartValuesRequestModel requestModel =
GetDiabeticChartValuesRequestModel( GetDiabeticChartValuesRequestModel(
patientID: patient.patientId, patientID: patient.patientId,
admissionNo: int.parse(patient.admissionNo!), admissionNo:isVidaPlusProject? patient.admissionID ?? -1 : int.parse(patient.admissionNo!),
patientTypeID: 1, patientTypeID: 1,
patientType: 1,
resultType: resultType, resultType: resultType,
); );
await _patientService.getDiabeticChartValues(requestModel); await _patientService.getDiabeticChartValues(requestModel);

@ -15,11 +15,19 @@ class PendingOrdersViewModel extends BaseViewModel {
List<AdmissionOrdersModel> get admissionOrderList => List<AdmissionOrdersModel> get admissionOrderList =>
_pendingOrderService.admissionOrderList; _pendingOrderService.admissionOrderList;
Future getPendingOrders({required int patientId, required int admissionNo}) async { Future getPendingOrders(
{required int patientId,
required int admissionNo,
required bool isVidaPlus}) async {
hasError = false; hasError = false;
setState(ViewState.Busy); setState(ViewState.Busy);
await _pendingOrderService.getPendingOrders( if (isVidaPlus) {
patientId: patientId, admissionNo: admissionNo); await _pendingOrderService.getPendingOrdersForVidaPlus(
patientId: patientId, admissionNo: admissionNo);
} else {
await _pendingOrderService.getPendingOrders(
patientId: patientId, admissionNo: admissionNo);
}
if (_pendingOrderService.hasError) { if (_pendingOrderService.hasError) {
error = _pendingOrderService.error; error = _pendingOrderService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);

@ -155,9 +155,9 @@ class PrescriptionViewModel extends BaseViewModel {
} }
} }
getMedicationForInPatient(PatiantInformtion patient) async { getMedicationForInPatient(PatiantInformtion patient, bool isVidaPlusProject) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _prescriptionService.getMedicationForInPatient(patient); await _prescriptionService.getMedicationForInPatient(patient, isVidaPlusProject: isVidaPlusProject);
if (_prescriptionService.hasError) { if (_prescriptionService.hasError) {
error = _prescriptionService.error!; error = _prescriptionService.error!;
setState(ViewState.Error); setState(ViewState.Error);

@ -18,11 +18,14 @@ class DischargeSummaryViewModel extends BaseViewModel {
Future getPendingDischargeSummary({ Future getPendingDischargeSummary({
required int patientId, required int patientId,
required int admissionNo, required int admissionNo, required int? clinicId, required int? doctorId,
}) async { }) async {
print("the clinic id is $clinicId");
print("the doctorId id is $doctorId");
GetDischargeSummaryReqModel getDischargeSummaryReqModel = GetDischargeSummaryReqModel getDischargeSummaryReqModel =
GetDischargeSummaryReqModel( GetDischargeSummaryReqModel(
admissionNo: admissionNo, patientID: patientId); admissionNo: admissionNo, patientID: patientId, clinicId: clinicId , doctorId:doctorId);
hasError = false; hasError = false;
setState(ViewState.Busy); setState(ViewState.Busy);
await _dischargeSummaryService.getPendingDischargeSummary( await _dischargeSummaryService.getPendingDischargeSummary(

@ -21,7 +21,7 @@ class OperationReportViewModel extends BaseViewModel {
Future getReservations(int patientId) async { Future getReservations(int patientId) async {
hasError = false; hasError = false;
setState(ViewState.Busy); setState(ViewState.Busy);
await _operationReportService.getReservations(patientId: patientId); await _operationReportService.getReservations(patientId: patientId, patientMRN: patientId);
if (_operationReportService.hasError) { if (_operationReportService.hasError) {
error = _operationReportService.error; error = _operationReportService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);

@ -3,6 +3,7 @@ import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/view_state.dart'; import 'package:doctor_app_flutter/core/enum/view_state.dart';
import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart'; import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart'; import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart';
import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/dashboard_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/dashboard_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
@ -36,6 +37,7 @@ import 'package:flutter_zoom_videosdk/native/zoom_videosdk.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:sticky_headers/sticky_headers/widget.dart'; import 'package:sticky_headers/sticky_headers/widget.dart';
import '../../locator.dart';
import '../../utils/notification_permission_utils.dart'; import '../../utils/notification_permission_utils.dart';
import '../video_call_zoom/zoom_video_call.dart'; import '../video_call_zoom/zoom_video_call.dart';
import '../patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart'; import '../patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart';
@ -94,7 +96,7 @@ class _HomeScreenState extends State<HomeScreen> {
} }
} }
}); });
startZoom(); //startZoom();
}); });
}, },
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
@ -418,14 +420,16 @@ class _HomeScreenState extends State<HomeScreen> {
)); ));
changeColorIndex(); changeColorIndex();
if (model.doctorProfile != null && !Utils.isVidaPlusInPatientProject(projectsProvider, model.doctorProfile!.projectID!)) { if (model.doctorProfile != null) {
patientCards.add(HomePatientCard( patientCards.add(
HomePatientCard(
gradient: backgroundColors[colorIndex], gradient: backgroundColors[colorIndex],
backgroundIconColor: backgroundIconColors[colorIndex], backgroundIconColor: backgroundIconColors[colorIndex],
cardIcon: DoctorApp.inpatient, cardIcon: DoctorApp.inpatient,
textColor: textColors[colorIndex], textColor: textColors[colorIndex],
text: TranslationBase.of(context).myInPatient, text: TranslationBase.of(context).myInPatient,
onTap: () { onTap: () {
locator<PatientSearchViewModel>().flushSelectedDates();
Navigator.push( Navigator.push(
context, context,
FadePage( FadePage(
@ -487,7 +491,7 @@ class _HomeScreenState extends State<HomeScreen> {
text: TranslationBase.of(context).myOutPatient_2lines, text: TranslationBase.of(context).myOutPatient_2lines,
onTap: () { onTap: () {
String date = AppDateUtils.convertDateToFormat(DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day), 'yyyy-MM-dd'); String date = AppDateUtils.convertDateToFormat(DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day), 'yyyy-MM-dd');
locator<PatientSearchViewModel>().flushSelectedDates();
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(

@ -14,6 +14,9 @@ import '../../routes.dart';
import '../../widgets/shared/errors/error_message.dart'; import '../../widgets/shared/errors/error_message.dart';
class DischargedPatient extends StatefulWidget { class DischargedPatient extends StatefulWidget {
final bool isVidaPlusProject;
const DischargedPatient({super.key, required this.isVidaPlusProject});
@override @override
_DischargedPatientState createState() => _DischargedPatientState(); _DischargedPatientState createState() => _DischargedPatientState();
} }

@ -9,12 +9,17 @@ class NoData extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Expanded( return Center(
child: SingleChildScrollView( child: Container(
child: Container( child: ErrorMessage(error: TranslationBase.of(context).noDataAvailable),
child: ErrorMessage(
error: TranslationBase.of(context).noDataAvailable)),
), ),
); );
// Expanded(
// child: SingleChildScrollView(
// child: Container(
// child: ErrorMessage(error: TranslationBase.of(context).noDataAvailable),
// ),
// ),
// );
} }
} }

@ -0,0 +1,254 @@
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/patient_muse/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart';
import 'package:doctor_app_flutter/utils/date-utils.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/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import '../../../config/config.dart';
class FilterDatePage extends StatefulWidget {
final PatientSearchViewModel patientSearchViewModel;
const FilterDatePage({Key? key, required this.patientSearchViewModel})
: super(key: key);
@override
_FilterDatePageState createState() => _FilterDatePageState();
}
class _FilterDatePageState extends State<FilterDatePage> {
@override
void initState() {
// TODO: implement initState
super.initState();
}
@override
Widget build(BuildContext context) {
var screenSize;
return AppScaffold(
isShowAppBar: false,
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
body: SingleChildScrollView(
child: Container(
height: MediaQuery.of(context).size.height * 1.0,
child: Padding(
padding: EdgeInsets.all(0.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
BottomSheetTitle(
title: TranslationBase.of(context).filterInPatient,
),
SizedBox(
height: 10.0,
),
Center(
child: FractionallySizedBox(
widthFactor: 0.9,
child: Column(
children: [
Container(
color: Colors.white,
child: InkWell(
onTap: () => selectDate(context,
firstDate: getFirstDate(),
lastDate: getLastDate()),
child: TextField(
decoration: textFieldSelectorDecoration(
TranslationBase.of(context).fromDate,
widget.patientSearchViewModel
.selectedFromDate !=
null
? "${AppDateUtils.convertStringToDateFormat(widget.patientSearchViewModel.selectedFromDate.toString(), "yyyy-MM-dd")}"
: "",
true,
suffixIcon: Icon(
Icons.calendar_today,
color: Colors.black,
)),
enabled: false,
),
),
),
SizedBox(
height: 10,
),
Container(
color: Colors.white,
child: InkWell(
onTap: () => selectDate(context,
isFromDate: false,
firstDate: getFirstDate(),
lastDate: getLastDate()),
child: TextField(
decoration: textFieldSelectorDecoration(
TranslationBase.of(context).toDate,
widget.patientSearchViewModel
.selectedToDate !=
null
? "${AppDateUtils.convertStringToDateFormat(widget.patientSearchViewModel.selectedToDate.toString(), "yyyy-MM-dd")}"
: "",
true,
suffixIcon: Icon(
Icons.calendar_today,
color: Colors.black,
)),
enabled: false,
),
),
),
],
),
),
),
],
),
),
),
),
bottomSheet: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(0.0),
),
border: Border.all(color: HexColor('#707070'), width: 0),
),
height: MediaQuery.of(context).size.height * 0.1,
width: double.infinity,
child: Column(
children: [
SizedBox(
height: 10,
),
Container(
child: FractionallySizedBox(
widthFactor: .80,
child: Center(
child: AppButton(
title: TranslationBase.of(context).search,
padding: 10,
color: AppGlobal.appGreenColor,
onPressed: () async {
if (widget.patientSearchViewModel.selectedFromDate ==
null ||
widget.patientSearchViewModel.selectedToDate ==
null) {
Utils.showErrorToast(
"Please Select All The date Fields ");
} else {
Navigator.pop(context);
await widget.patientSearchViewModel.getInPatientList(
PatientSearchRequestModel(
from:
"${AppDateUtils.convertDateToFormat(widget.patientSearchViewModel.selectedFromDate!, "yyyy-MM-dd")} 00:00:00",
to: "${AppDateUtils.convertDateToFormat(widget.patientSearchViewModel.selectedToDate!, "yyyy-MM-dd")} 00:00:00",
searchType: null),
isForceFullRefresh: true);
Navigator.of(context).pop();
}
},
),
),
),
),
SizedBox(
height: 5,
),
],
),
));
}
selectDate(BuildContext context,
{bool isFromDate = true, DateTime? firstDate, lastDate}) async {
Utils.hideKeyboard(context);
DateTime currentDate = DateTime.now();
DateTime? selectedDate = isFromDate
? this.widget.patientSearchViewModel.selectedFromDate ?? currentDate
: this.widget.patientSearchViewModel.selectedToDate ?? currentDate;
final DateTime? picked = await showDatePicker(
context: context,
initialDate: selectedDate,
firstDate: firstDate!,
lastDate: lastDate,
initialEntryMode: DatePickerEntryMode.calendar,
);
if (picked != null) {
if (isFromDate) {
setState(() {
this.widget.patientSearchViewModel.selectedFromDate = picked;
var date = picked.add(Duration(days: 30));
if (date.isBefore(lastDate)) {
this.widget.patientSearchViewModel.selectedToDate = date;
} else
this.widget.patientSearchViewModel.selectedToDate = lastDate;
});
} else {
setState(() {
this.widget.patientSearchViewModel.selectedToDate = picked;
});
}
}
}
getFirstDate() {
DateTime dateTime = DateTime.now().subtract(Duration(days: 30 * 24));
return DateTime(dateTime.year, dateTime.month, dateTime.day + 1);
}
getLastDate() {
DateTime dateTime = DateTime.now().add(Duration(days: 30 * 24));
return DateTime(dateTime.year, dateTime.month, dateTime.day);
}
InputDecoration textFieldSelectorDecoration(
String hintText, String selectedText, bool isDropDown,
{Icon? suffixIcon}) {
return InputDecoration(
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
borderRadius: BorderRadius.circular(8),
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFEFEFEF), width: 2.0),
borderRadius: BorderRadius.circular(8),
),
disabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFEFEFEF), width: 2.0),
borderRadius: BorderRadius.circular(8),
),
hintText: selectedText != null ? selectedText : hintText,
suffixIcon: isDropDown
? suffixIcon != null
? suffixIcon
: Icon(
Icons.keyboard_arrow_down_sharp,
color: Color(0xff2E303A),
)
: null,
hintStyle: TextStyle(
fontSize: 13,
color: Color(0xff2E303A),
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
),
labelText: selectedText != null ? '$hintText\n$selectedText' : null,
labelStyle: TextStyle(
fontSize: 13,
color: Color(0xff2E303A),
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
),
);
}
}

@ -2,6 +2,7 @@ import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/view_state.dart'; import 'package:doctor_app_flutter/core/enum/view_state.dart';
import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart'; import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/screens/patients/In_patient/filter_date_page.dart';
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
@ -22,8 +23,9 @@ class InPatientListPage extends StatefulWidget {
final bool showBottomSheet; final bool showBottomSheet;
final String? selectedClinicName; final String? selectedClinicName;
final Function? onChangeValue; final Function? onChangeValue;
final bool isVidaPlusProject;
InPatientListPage({this.isMyInPatient = false, this.patientSearchViewModel, this.selectedClinicName, this.onChangeValue, this.isAllClinic = false, this.showBottomSheet = false}); InPatientListPage({this.isMyInPatient = false, this.patientSearchViewModel, this.selectedClinicName, this.onChangeValue, this.isAllClinic = false, this.showBottomSheet = false, required this.isVidaPlusProject});
@override @override
_InPatientListPageState createState() => _InPatientListPageState(); _InPatientListPageState createState() => _InPatientListPageState();
@ -135,15 +137,32 @@ class _InPatientListPageState extends State<InPatientListPage> {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
}, },
), ),
suffixIcon: (widget.isVidaPlusProject)?IconButton(
icon: Icon(
DoctorApp.filter_1,
color: Colors.black,
),
iconSize: 20,
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (BuildContext context) => FilterDatePage(
patientSearchViewModel: widget.patientSearchViewModel!,
),
settings: RouteSettings(name: 'FilterOutPatentDateScreen'),
));
},
):null,
onFieldSubmitted: () {}, onFieldSubmitted: () {},
), ),
widget.patientSearchViewModel!.state == ViewState.Idle widget.patientSearchViewModel!.state == ViewState.Idle
? (widget.isMyInPatient && widget.patientSearchViewModel!.myIinPatientList.length > 0) ? (widget.isMyInPatient && widget.patientSearchViewModel!.myIinPatientList.length > 0)
? ListOfMyInpatient(isAllClinic: widget.isAllClinic, hasQuery: hasQuery, patientSearchViewModel: widget.patientSearchViewModel!) ? ListOfMyInpatient(isAllClinic: widget.isAllClinic, hasQuery: hasQuery, patientSearchViewModel: widget.patientSearchViewModel!, isVidaPlusProject: widget.isVidaPlusProject,)
: widget.patientSearchViewModel!.filteredInPatientItems.length > 0 : widget.patientSearchViewModel!.filteredInPatientItems.length > 0
? (widget.isMyInPatient && widget.patientSearchViewModel!.myIinPatientList.length == 0) ? (widget.isMyInPatient && widget.patientSearchViewModel!.myIinPatientList.length == 0)
? NoData() ? NoData()
: ListOfAllInPatient(isAllClinic: widget.isAllClinic, hasQuery: hasQuery, patientSearchViewModel: widget.patientSearchViewModel!) : ListOfAllInPatient(isAllClinic: widget.isAllClinic, hasQuery: hasQuery, patientSearchViewModel: widget.patientSearchViewModel!, isVidaPlusProject: widget.isVidaPlusProject,)
: NoData() : NoData()
: Center( : Center(
child: Container( child: Container(

@ -6,6 +6,7 @@ import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/patients/In_patient/InPatientHeader.dart'; import 'package:doctor_app_flutter/screens/patients/In_patient/InPatientHeader.dart';
import 'package:doctor_app_flutter/utils/date-utils.dart';
import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/utils/tab_utils.dart'; import 'package:doctor_app_flutter/utils/tab_utils.dart';
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
@ -33,9 +34,10 @@ class InPatientScreen extends StatefulWidget {
class _InPatientScreenState extends State<InPatientScreen> with SingleTickerProviderStateMixin { class _InPatientScreenState extends State<InPatientScreen> with SingleTickerProviderStateMixin {
late TabController _tabController; late TabController _tabController;
ProjectViewModel? viewModel = null;
int _activeTab = 0; int _activeTab = 0;
int selectedMapId = 0; int selectedMapId = 0;
bool isVidaPlusProject = false;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
@ -60,11 +62,13 @@ class _InPatientScreenState extends State<InPatientScreen> with SingleTickerProv
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final screenSize = MediaQuery.of(context).size; final screenSize = MediaQuery.of(context).size;
viewModel = Provider.of<ProjectViewModel>(context);
PatientSearchRequestModel requestModel = PatientSearchRequestModel(); PatientSearchRequestModel requestModel = PatientSearchRequestModel();
return BaseView<PatientSearchViewModel>( return BaseView<PatientSearchViewModel>(
onModelReady: (model) async { onModelReady: (model) async {
model.clearPatientList(); model.clearPatientList();
var doctorProfile = await model.getDoctorProfile();
if (widget.specialClinic != null && widget.specialClinic!.clinicID != null) { if (widget.specialClinic != null && widget.specialClinic!.clinicID != null) {
print(widget.specialClinic!.toJson()); print(widget.specialClinic!.toJson());
await model.getSpecialClinicalCareMappingList(widget.specialClinic!.clinicID); await model.getSpecialClinicalCareMappingList(widget.specialClinic!.clinicID);
@ -72,7 +76,27 @@ class _InPatientScreenState extends State<InPatientScreen> with SingleTickerProv
// model.specialClinicalCareMappingList[0].nursingStationID; // model.specialClinicalCareMappingList[0].nursingStationID;
} }
requestModel.clinicID = 0; requestModel.clinicID = 0;
await model.getInPatientList(requestModel); isVidaPlusProject =
Utils.isVidaPlusProject(viewModel!, doctorProfile.projectID ?? -1);
if (isVidaPlusProject) {
DateTime dateTime = DateTime.now();
String currentDate = AppDateUtils.convertDateToFormat(
dateTime,
'yyyy-MM-dd');
print("the current date is $currentDate");
requestModel.from = "$currentDate 00:00:00";
dateTime = dateTime.add(Duration(days: 1));
currentDate = AppDateUtils.convertDateToFormat(
dateTime,
'yyyy-MM-dd');
requestModel.to = "$currentDate 00:00:00";
requestModel.pageSize = 10;
requestModel.pageIndex = 0;
requestModel.searchType = null;
}
await model.getInPatientList(requestModel,
isVidaPlusProject: isVidaPlusProject);
}, },
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
@ -90,7 +114,11 @@ class _InPatientScreenState extends State<InPatientScreen> with SingleTickerProv
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
PatientSearchRequestModel requestModel = PatientSearchRequestModel(nursingStationID: selectedMapId, clinicID: 0); PatientSearchRequestModel requestModel = PatientSearchRequestModel(nursingStationID: selectedMapId, clinicID: 0);
await model.getInPatientList(requestModel, isLocalBusy: true); await model.getInPatientList(requestModel,
isLocalBusy: true,
isVidaPlusProject: Utils.isVidaPlusProject(
Provider.of<ProjectViewModel>(context),
requestModel.projectID ?? -1));
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (model.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(model.error); DrAppToastMsg.showErrorToast(model.error);
@ -161,15 +189,21 @@ class _InPatientScreenState extends State<InPatientScreen> with SingleTickerProv
isAllClinic: widget.isAllClinic, isAllClinic: widget.isAllClinic,
showBottomSheet: widget.showBottomSheet, showBottomSheet: widget.showBottomSheet,
selectedClinicName: widget.selectedClinicName, selectedClinicName: widget.selectedClinicName,
onChangeValue: onChangeState), onChangeValue: onChangeState,
isVidaPlusProject: isVidaPlusProject,
),
InPatientListPage( InPatientListPage(
isMyInPatient: true, isMyInPatient: true,
patientSearchViewModel: model, patientSearchViewModel: model,
isAllClinic: widget.isAllClinic, isAllClinic: widget.isAllClinic,
showBottomSheet: widget.showBottomSheet, showBottomSheet: widget.showBottomSheet,
selectedClinicName: widget.selectedClinicName, selectedClinicName: widget.selectedClinicName,
onChangeValue: onChangeState), onChangeValue: onChangeState,
DischargedPatient(), isVidaPlusProject: isVidaPlusProject,
),
DischargedPatient(
isVidaPlusProject: isVidaPlusProject,
),
], ],
), ),
), ),

@ -12,11 +12,12 @@ class ListOfAllInPatient extends StatelessWidget {
required this.isAllClinic, required this.isAllClinic,
required this.hasQuery, required this.hasQuery,
required this.patientSearchViewModel, required this.patientSearchViewModel,
required this.isVidaPlusProject,
}) : super(key: key); }) : super(key: key);
final bool isAllClinic; final bool isAllClinic;
final bool hasQuery; final bool hasQuery;
final bool isVidaPlusProject;
final PatientSearchViewModel patientSearchViewModel; final PatientSearchViewModel patientSearchViewModel;
@override @override
@ -55,6 +56,7 @@ class ListOfAllInPatient extends StatelessWidget {
"isInpatient": true, "isInpatient": true,
"arrivalType": "1", "arrivalType": "1",
"isMyPatient": patientSearchViewModel.filteredInPatientItems[index].doctorId == patientSearchViewModel.doctorProfile!.doctorID, "isMyPatient": patientSearchViewModel.filteredInPatientItems[index].doctorId == patientSearchViewModel.doctorProfile!.doctorID,
"isVidaPlusProject": isVidaPlusProject,
}); });
}); });
}, },

@ -11,10 +11,12 @@ class ListOfMyInpatient extends StatelessWidget {
required this.isAllClinic, required this.isAllClinic,
required this.hasQuery, required this.hasQuery,
required this.patientSearchViewModel, required this.patientSearchViewModel,
required this.isVidaPlusProject,
}) : super(key: key); }) : super(key: key);
final bool isAllClinic; final bool isAllClinic;
final bool hasQuery; final bool hasQuery;
final bool isVidaPlusProject;
final PatientSearchViewModel patientSearchViewModel; final PatientSearchViewModel patientSearchViewModel;
@override @override
@ -56,6 +58,7 @@ class ListOfMyInpatient extends StatelessWidget {
"isInpatient": true, "isInpatient": true,
"arrivalType": "1", "arrivalType": "1",
"isMyPatient": true, "isMyPatient": true,
"isVidaPlusProject": isVidaPlusProject,
}); });
}, },
); );

@ -94,7 +94,7 @@ class _InsuranceApprovalScreenNewState
onTap: (){}, onTap: (){},
profileUrl: model profileUrl: model
.insuranceApprovalInPatient[index] .insuranceApprovalInPatient[index]
.doctorImage!, .doctorImage??'',
clinic: model clinic: model
.insuranceApprovalInPatient[index] .insuranceApprovalInPatient[index]
.clinicName!, .clinicName!,

@ -121,7 +121,7 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
child: ClipRRect( child: ClipRRect(
borderRadius: BorderRadius.circular(50), borderRadius: BorderRadius.circular(50),
child: Image.network( child: Image.network(
model.insuranceApprovalInPatient[indexInsurance].doctorImage!, model.insuranceApprovalInPatient[indexInsurance].doctorImage??'',
fit: BoxFit.fill, fit: BoxFit.fill,
width: 700, width: 700,
), ),

@ -34,11 +34,12 @@ class _AdmissionOrdersScreenState extends State<AdmissionOrdersScreen> {
final routeArgs = ModalRoute.of(context)!.settings.arguments as Map; final routeArgs = ModalRoute.of(context)!.settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient']; PatiantInformtion patient = routeArgs['patient'];
String arrivalType = routeArgs['arrivalType']; String arrivalType = routeArgs['arrivalType'];
bool isVidaPlusProject = routeArgs['isVidaPlusProject'];
if (routeArgs.containsKey('isDischargedPatient')) if (routeArgs.containsKey('isDischargedPatient'))
isDischargedPatient = routeArgs['isDischargedPatient']; isDischargedPatient = routeArgs['isDischargedPatient'];
return BaseView<PendingOrdersViewModel>( return BaseView<PendingOrdersViewModel>(
onModelReady: (model) => model.getAdmissionOrders( onModelReady: (model) => model.getAdmissionOrders(
admissionNo: int.parse(patient.admissionNo!), admissionNo: isVidaPlusProject? patient.admissionID??-1 :int.parse(patient.admissionNo!),
patientId: patient.patientMRN!), patientId: patient.patientMRN!),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,

@ -33,6 +33,7 @@ class _DiabeticChartState extends State<DiabeticChart> {
List<TimeSeriesSales2> timeSeriesData1 = []; List<TimeSeriesSales2> timeSeriesData1 = [];
List<TimeSeriesSales2> timeSeriesData2 = []; List<TimeSeriesSales2> timeSeriesData2 = [];
bool isVidaPlusProject= false;
List<DiabeticType> diabeticType = [ List<DiabeticType> diabeticType = [
DiabeticType(nameAr: "Urine Glucose", nameEn: "Urine Glucose", value: 1), DiabeticType(nameAr: "Urine Glucose", nameEn: "Urine Glucose", value: 1),
@ -47,12 +48,13 @@ class _DiabeticChartState extends State<DiabeticChart> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context)!.settings.arguments as Map; final routeArgs = ModalRoute.of(context)!.settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient']; PatiantInformtion patient = routeArgs['patient'];
isVidaPlusProject = routeArgs['isVidaPlusProject'];
ProjectViewModel projectsProvider = Provider.of(context); ProjectViewModel projectsProvider = Provider.of(context);
return BaseView<PatientViewModel>( return BaseView<PatientViewModel>(
onModelReady: (model) async { onModelReady: (model) async {
selectedDiabeticType = diabeticType[2]; selectedDiabeticType = diabeticType[2];
await model.getDiabeticChartValues(patient, selectedDiabeticType.value!, isLocalBusy: false); await model.getDiabeticChartValues(patient, selectedDiabeticType.value!, isLocalBusy: false, isVidaPlusProject: isVidaPlusProject);
generateData(model); generateData(model);
}, },
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
@ -178,6 +180,7 @@ class _DiabeticChartState extends State<DiabeticChart> {
if (model.diabeticChartValuesList.length > 0) { if (model.diabeticChartValuesList.length > 0) {
model.diabeticChartValuesList.toList().forEach( model.diabeticChartValuesList.toList().forEach(
(element) { (element) {
if(element.dateChart == null ) return;
DateTime elementDate = AppDateUtils.getDateTimeFromServerFormat(element.dateChart!); DateTime elementDate = AppDateUtils.getDateTimeFromServerFormat(element.dateChart!);
if (element.resultValue!.toInt() != 0) if (element.resultValue!.toInt() != 0)
timeSeriesData1.add( timeSeriesData1.add(
@ -206,7 +209,7 @@ class _DiabeticChartState extends State<DiabeticChart> {
timeSeriesData2.clear(); timeSeriesData2.clear();
}); });
await model.getDiabeticChartValues(patient, selectedDiabeticType.value!, isLocalBusy: true); await model.getDiabeticChartValues(patient, selectedDiabeticType.value!, isLocalBusy: true, isVidaPlusProject: isVidaPlusProject);
if (model.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {
Utils.showErrorToast(model.error); Utils.showErrorToast(model.error);
} }

@ -29,6 +29,7 @@ class _ProgressNoteState extends State<DiagnosisScreen> {
bool isDischargedPatient = false; bool isDischargedPatient = false;
AuthenticationViewModel authenticationViewModel = AuthenticationViewModel(); AuthenticationViewModel authenticationViewModel = AuthenticationViewModel();
late ProjectViewModel projectViewModel; late ProjectViewModel projectViewModel;
bool isVidaPlusProject = false;
getDiagnosisForInPatient(BuildContext context, PatientViewModel model, getDiagnosisForInPatient(BuildContext context, PatientViewModel model,
{bool isLocalBusy = false}) async { {bool isLocalBusy = false}) async {
@ -42,11 +43,11 @@ class _ProgressNoteState extends State<DiagnosisScreen> {
print(type); print(type);
GetDiagnosisForInPatientRequestModel getDiagnosisForInPatientRequestModel = GetDiagnosisForInPatientRequestModel getDiagnosisForInPatientRequestModel =
GetDiagnosisForInPatientRequestModel( GetDiagnosisForInPatientRequestModel(
admissionNo: int.parse(patient.admissionNo!), admissionNo: isVidaPlusProject? patient.admissionID : int.parse(patient.admissionNo!),
patientTypeID: patient.patientType, patientTypeID: patient.patientType,
patientID: patient.patientId, patientID: patient.patientId,
); );
model.getDiagnosisForInPatient(getDiagnosisForInPatientRequestModel); model.getDiagnosisForInPatient(getDiagnosisForInPatientRequestModel,isVidaPlusProject,patient);
} }
@override @override
@ -55,6 +56,7 @@ class _ProgressNoteState extends State<DiagnosisScreen> {
projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
final routeArgs = ModalRoute.of(context)!.settings.arguments as Map; final routeArgs = ModalRoute.of(context)!.settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient']; PatiantInformtion patient = routeArgs['patient'];
isVidaPlusProject = routeArgs['isVidaPlusProject'];
if (routeArgs.containsKey('isDischargedPatient')) if (routeArgs.containsKey('isDischargedPatient'))
isDischargedPatient = routeArgs['isDischargedPatient']; isDischargedPatient = routeArgs['isDischargedPatient'];
return BaseView<PatientViewModel>( return BaseView<PatientViewModel>(

@ -12,8 +12,9 @@ import 'discharge_Summary_widget.dart';
class AllDischargeSummary extends StatefulWidget { class AllDischargeSummary extends StatefulWidget {
final Function? changeCurrentTab; final Function? changeCurrentTab;
final PatiantInformtion? patient; final PatiantInformtion? patient;
final bool isVidaPlusProject;
const AllDischargeSummary({this.changeCurrentTab, this.patient}); const AllDischargeSummary({this.changeCurrentTab, this.patient, this.isVidaPlusProject = false});
@override @override
_AllDischargeSummaryState createState() => _AllDischargeSummaryState(); _AllDischargeSummaryState createState() => _AllDischargeSummaryState();
@ -28,7 +29,8 @@ class _AllDischargeSummaryState extends State<AllDischargeSummary> {
onModelReady: (model) { onModelReady: (model) {
model.getAllDischargeSummary( model.getAllDischargeSummary(
patientId: widget.patient!.patientId!, patientId: widget.patient!.patientId!,
admissionNo: int.parse(widget.patient!.admissionNo!), admissionNo: widget.isVidaPlusProject? widget.patient?.admissionID ?? -1 :int.parse(widget.patient!.admissionNo!),
); );
}, },
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(

@ -26,6 +26,7 @@ class _DoctorReplyScreenState extends State<DischargeSummaryPage>
late TabController _tabController; late TabController _tabController;
int _activeTab = 0; int _activeTab = 0;
int pageIndex = 1; int pageIndex = 1;
bool isVidaPlusProject = false;
@override @override
void initState() { void initState() {
@ -51,6 +52,7 @@ class _DoctorReplyScreenState extends State<DischargeSummaryPage>
final screenSize = MediaQuery.of(context).size; final screenSize = MediaQuery.of(context).size;
final routeArgs = ModalRoute.of(context)!.settings.arguments as Map; final routeArgs = ModalRoute.of(context)!.settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient']; PatiantInformtion patient = routeArgs['patient'];
isVidaPlusProject = routeArgs['isVidaPlusProject'];
return WillPopScope( return WillPopScope(
onWillPop: () async { onWillPop: () async {
@ -119,8 +121,9 @@ class _DoctorReplyScreenState extends State<DischargeSummaryPage>
children: [ children: [
PendingDischargeSummary( PendingDischargeSummary(
patient: patient, patient: patient,
isVidaPlusProject: isVidaPlusProject,
), ),
AllDischargeSummary(patient: patient), AllDischargeSummary(patient: patient, isVidaPlusProject: isVidaPlusProject,),
], ],
), ),
), ),

@ -12,8 +12,9 @@ import 'discharge_Summary_widget.dart';
class PendingDischargeSummary extends StatefulWidget { class PendingDischargeSummary extends StatefulWidget {
final Function? changeCurrentTab; final Function? changeCurrentTab;
final PatiantInformtion? patient; final PatiantInformtion? patient;
final bool isVidaPlusProject;
const PendingDischargeSummary({Key? key, this.changeCurrentTab, this.patient}) const PendingDischargeSummary({Key? key, this.changeCurrentTab, this.patient, this.isVidaPlusProject = false})
: super(key: key); : super(key: key);
@override @override
@ -30,7 +31,9 @@ class _PendingDischargeSummaryState extends State<PendingDischargeSummary> {
onModelReady: (model) { onModelReady: (model) {
model.getPendingDischargeSummary( model.getPendingDischargeSummary(
patientId: widget.patient!.patientId!, patientId: widget.patient!.patientId!,
admissionNo: int.parse(widget.patient!.admissionNo!), clinicId: widget.patient?.clinicId,
doctorId: widget.patient?.doctorId,
admissionNo: widget.isVidaPlusProject? widget.patient?.admissionID ?? -1 :int.parse(widget.patient!.admissionNo!),
); );
}, },
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(

@ -23,8 +23,9 @@ class AddVerifyMedicalReport extends StatefulWidget {
final PatientMedicalReportViewModel? model; final PatientMedicalReportViewModel? model;
final MedicalReportStatus? status; final MedicalReportStatus? status;
final String? medicalNote; final String? medicalNote;
final bool? isVidaPlusProject;
const AddVerifyMedicalReport({Key? key, this.patient, this.patientType, this.arrivalType, this.medicalReport, this.model, this.status, this.medicalNote}) : super(key: key); const AddVerifyMedicalReport({Key? key, this.patient, this.patientType, this.arrivalType, this.medicalReport, this.model, this.status, this.medicalNote, this.isVidaPlusProject}) : super(key: key);
@override @override
_AddVerifyMedicalReportState createState() => _AddVerifyMedicalReportState(); _AddVerifyMedicalReportState createState() => _AddVerifyMedicalReportState();
@ -98,8 +99,8 @@ class _AddVerifyMedicalReportState extends State<AddVerifyMedicalReport> {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
widget.medicalReport != null widget.medicalReport != null
? await widget.model!.updateMedicalReport(widget.patient!, txtOfMedicalReport, widget.medicalReport != null ? widget.medicalReport!.lineItemNo! : 0, ? await widget.model!.updateMedicalReport(widget.patient!, txtOfMedicalReport, widget.medicalReport != null ? widget.medicalReport!.lineItemNo! : 0,
widget.medicalReport != null ? widget.medicalReport!.invoiceNo! : "") widget.medicalReport != null ? widget.medicalReport!.invoiceNo! : "", widget.isVidaPlusProject)
: await widget.model!.addMedicalReport(widget.patient!, txtOfMedicalReport); : await widget.model!.addMedicalReport(widget.patient!, txtOfMedicalReport, widget.isVidaPlusProject);
//model.getMedicalReportList(patient); //model.getMedicalReportList(patient);
Navigator.pop(context); Navigator.pop(context);
@ -127,7 +128,7 @@ class _AddVerifyMedicalReportState extends State<AddVerifyMedicalReport> {
txtOfMedicalReport = (await _controller.getText())!; txtOfMedicalReport = (await _controller.getText())!;
if (txtOfMedicalReport.isNotEmpty) { if (txtOfMedicalReport.isNotEmpty) {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
await widget.model!.verifyMedicalReport(widget.patient!, widget.medicalReport!); await widget.model!.verifyMedicalReport(widget.patient!, widget.medicalReport!, widget.isVidaPlusProject);
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
Navigator.pop(context); Navigator.pop(context);
if (widget.model!.state == ViewState.ErrorLocal) { if (widget.model!.state == ViewState.ErrorLocal) {

@ -33,18 +33,20 @@ class MedicalReportPage extends StatefulWidget {
} }
class _MedicalReportPageState extends State<MedicalReportPage> { class _MedicalReportPageState extends State<MedicalReportPage> {
bool isVidaPlusProject = false;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context)!.settings.arguments as Map; final routeArgs = ModalRoute.of(context)!.settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient']; PatiantInformtion patient = routeArgs['patient'];
String patientType = routeArgs['patientType']; String patientType = routeArgs['patientType'];
String arrivalType = routeArgs['arrivalType']; String arrivalType = routeArgs['arrivalType'];
isVidaPlusProject = routeArgs['isVidaPlusProject'];
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<PatientMedicalReportViewModel>( return BaseView<PatientMedicalReportViewModel>(
onModelReady: (model) async { onModelReady: (model) async {
await model.getDoctorProfile(isGetProfile: true); await model.getDoctorProfile(isGetProfile: true);
await model.getMedicalReportList(patient); await model.getMedicalReportList(patient, isVidaPlusProject: isVidaPlusProject);
await model.getMedicalReportTemplate(); await model.getMedicalReportTemplate();
}, },
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
@ -97,6 +99,7 @@ class _MedicalReportPageState extends State<MedicalReportPage> {
arrivalType: arrivalType, arrivalType: arrivalType,
model: model, model: model,
status: MedicalReportStatus.ADD, status: MedicalReportStatus.ADD,
isVidaPlusProject: isVidaPlusProject
), ),
settings: RouteSettings(name: 'AddVerifyMedicalReport'), settings: RouteSettings(name: 'AddVerifyMedicalReport'),
), ),

@ -31,6 +31,7 @@ DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
class ProgressNoteScreen extends StatefulWidget { class ProgressNoteScreen extends StatefulWidget {
final int visitType; final int visitType;
const ProgressNoteScreen({Key? key, required this.visitType}) : super(key: key); const ProgressNoteScreen({Key? key, required this.visitType}) : super(key: key);
@override @override
@ -43,6 +44,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
bool isDischargedPatient = false; bool isDischargedPatient = false;
late AuthenticationViewModel authenticationViewModel; late AuthenticationViewModel authenticationViewModel;
late ProjectViewModel projectViewModel; late ProjectViewModel projectViewModel;
bool isVidaPlusProject = false;
getProgressNoteList(BuildContext context, PatientViewModel model, {bool isLocalBusy = false}) async { getProgressNoteList(BuildContext context, PatientViewModel model, {bool isLocalBusy = false}) async {
final routeArgs = ModalRoute.of(context)!.settings.arguments as Map; final routeArgs = ModalRoute.of(context)!.settings.arguments as Map;
@ -54,12 +56,12 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
ProgressNoteRequest progressNoteRequest = ProgressNoteRequest( ProgressNoteRequest progressNoteRequest = ProgressNoteRequest(
visitType: widget.visitType, visitType: widget.visitType,
// if equal 5 then this will return progress note // if equal 5 then this will return progress note
admissionNo: int.parse(patient.admissionNo!), admissionNo: (isVidaPlusProject)?patient.admissionID:int.parse(patient.admissionNo!),
projectID: patient.projectId, projectID: patient.projectId,
tokenID: token, tokenID: token,
patientTypeID: patient.patientType, patientTypeID: patient.patientType,
languageID: 2); languageID: 2);
model.getPatientProgressNote(progressNoteRequest.toJson(), isLocalBusy: isLocalBusy).then((c) { model.getPatientProgressNote(progressNoteRequest.toJson(),patient, isLocalBusy: isLocalBusy, isVidaPlus: isVidaPlusProject).then((c) {
notesList = model.patientProgressNoteList; notesList = model.patientProgressNoteList;
}); });
} }
@ -71,9 +73,10 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
final routeArgs = ModalRoute.of(context)!.settings.arguments as Map; final routeArgs = ModalRoute.of(context)!.settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient']; PatiantInformtion patient = routeArgs['patient'];
String arrivalType = routeArgs['arrivalType']; String arrivalType = routeArgs['arrivalType'];
isVidaPlusProject = routeArgs['isVidaPlusProject'] ?? false;
if (routeArgs.containsKey('isDischargedPatient')) isDischargedPatient = routeArgs['isDischargedPatient']; if (routeArgs.containsKey('isDischargedPatient')) isDischargedPatient = routeArgs['isDischargedPatient'];
return BaseView<PatientViewModel>( return BaseView<PatientViewModel>(
onModelReady: (model) => getProgressNoteList(context, model), onModelReady: (model) => getProgressNoteList(context, model, ),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
backgroundColor: Theme.of(context).scaffoldBackgroundColor, backgroundColor: Theme.of(context).scaffoldBackgroundColor,
@ -101,6 +104,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
patient: patient, patient: patient,
visitType: widget.visitType, visitType: widget.visitType,
isUpdate: false, isUpdate: false,
isVidaPlusProject:isVidaPlusProject
), ),
settings: RouteSettings(name: 'UpdateNoteOrder'), settings: RouteSettings(name: 'UpdateNoteOrder'),
), ),
@ -219,7 +223,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
patientOutSA: false, patientOutSA: false,
); );
await model.updatePatientProgressNote(reqModel); await model.updatePatientProgressNote(reqModel);
await getProgressNoteList(context, model, isLocalBusy: true); await getProgressNoteList(context, model, isLocalBusy: true,);
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
}); });
}, },
@ -274,7 +278,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
patientOutSA: false, patientOutSA: false,
); );
await model.updatePatientProgressNote(reqModel); await model.updatePatientProgressNote(reqModel);
await getProgressNoteList(context, model, isLocalBusy: true); await getProgressNoteList(context, model, isLocalBusy: true, );
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
}); });
}, },

@ -36,10 +36,11 @@ class UpdateNoteOrder extends StatefulWidget {
final PatiantInformtion patient; final PatiantInformtion patient;
final int? visitType; final int? visitType;
final bool isUpdate; final bool isUpdate;
final bool isVidaPlusProject;
final List<dynamic>? elementList; final List<dynamic>? elementList;
final Function(dynamic)? okFunction; final Function(dynamic)? okFunction;
const UpdateNoteOrder({Key? key, this.note, required this.patientModel, required this.patient, this.visitType, required this.isUpdate, this.elementList, this.okFunction}) : super(key: key); const UpdateNoteOrder({Key? key, this.note, required this.patientModel, required this.patient, this.visitType, required this.isUpdate, this.elementList, this.okFunction, this.isVidaPlusProject = false}) : super(key: key);
@override @override
_UpdateNoteOrderState createState() => _UpdateNoteOrderState(); _UpdateNoteOrderState createState() => _UpdateNoteOrderState();
@ -249,7 +250,7 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
await widget.patientModel.updatePatientProgressNote(reqModel); await widget.patientModel.updatePatientProgressNote(reqModel);
} else { } else {
CreateNoteModel reqModel = CreateNoteModel( CreateNoteModel reqModel = CreateNoteModel(
admissionNo: int.parse(widget.patient.admissionNo!), admissionNo: (widget.isVidaPlusProject)?widget.patient.admissionID:int.parse(widget.patient.admissionNo!),
createdBy: doctorProfile.doctorID, createdBy: doctorProfile.doctorID,
visitType: widget.visitType, visitType: widget.visitType,
patientID: widget.patient.patientId, patientID: widget.patient.patientId,
@ -259,7 +260,7 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
notes: progressNoteController.text, notes: progressNoteController.text,
conditionId: selectValue['ParameterCode']); conditionId: selectValue['ParameterCode']);
await widget.patientModel.createPatientProgressNote(reqModel); await widget.patientModel.createPatientProgressNote(reqModel, widget.patient, isVidaPlus: widget.isVidaPlusProject);
} }
if (widget.patientModel.state == ViewState.ErrorLocal) { if (widget.patientModel.state == ViewState.ErrorLocal) {
@ -268,11 +269,11 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
ProgressNoteRequest progressNoteRequest = ProgressNoteRequest( ProgressNoteRequest progressNoteRequest = ProgressNoteRequest(
visitType: widget.visitType, visitType: widget.visitType,
// if equal 5 then this will return progress note // if equal 5 then this will return progress note
admissionNo: int.parse(widget.patient.admissionNo!), admissionNo: (widget.isVidaPlusProject)?widget.patient.admissionID:int.parse(widget.patient.admissionNo!),
projectID: widget.patient.projectId, projectID: widget.patient.projectId,
patientTypeID: widget.patient.patientType, patientTypeID: widget.patient.patientType,
languageID: 2); languageID: 2);
await widget.patientModel.getPatientProgressNote(progressNoteRequest.toJson()); await widget.patientModel.getPatientProgressNote(progressNoteRequest.toJson(), widget.patient, isVidaPlus: widget.isVidaPlusProject);
} }
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
DrAppToastMsg.showSuccesToast(TranslationBase.of(context).yourOrderAddedSuccessfully); DrAppToastMsg.showSuccesToast(TranslationBase.of(context).yourOrderAddedSuccessfully);

@ -32,6 +32,7 @@ class _ProgressNoteState extends State<NursingProgressNoteScreen> {
bool isDischargedPatient = false; bool isDischargedPatient = false;
AuthenticationViewModel authenticationViewModel = AuthenticationViewModel(); AuthenticationViewModel authenticationViewModel = AuthenticationViewModel();
late ProjectViewModel projectViewModel; late ProjectViewModel projectViewModel;
bool isVidaPlusProject= false;
getProgressNoteList(BuildContext context, PatientViewModel model, {bool isLocalBusy = false}) async { getProgressNoteList(BuildContext context, PatientViewModel model, {bool isLocalBusy = false}) async {
final routeArgs = ModalRoute.of(context)!.settings.arguments as Map; final routeArgs = ModalRoute.of(context)!.settings.arguments as Map;
@ -40,9 +41,10 @@ class _ProgressNoteState extends State<NursingProgressNoteScreen> {
print(type); print(type);
GetNursingProgressNoteRequestModel getNursingProgressNoteRequestModel = GetNursingProgressNoteRequestModel( GetNursingProgressNoteRequestModel getNursingProgressNoteRequestModel = GetNursingProgressNoteRequestModel(
admissionNo: int.parse(patient.admissionNo!), admissionNo: (isVidaPlusProject)? patient.admissionID :int.parse(patient.admissionNo!),
patientTypeID: patient.patientType, patientTypeID: patient.patientType,
patientID: patient.patientId, patientID: patient.patientId,
patientMRN: patient.patientId,
); );
model.getNursingProgressNote(getNursingProgressNoteRequestModel); model.getNursingProgressNote(getNursingProgressNoteRequestModel);
} }
@ -53,6 +55,7 @@ class _ProgressNoteState extends State<NursingProgressNoteScreen> {
projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
final routeArgs = ModalRoute.of(context)!.settings.arguments as Map; final routeArgs = ModalRoute.of(context)!.settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient']; PatiantInformtion patient = routeArgs['patient'];
isVidaPlusProject = routeArgs['isVidaPlusProject']?? false;
if (routeArgs.containsKey('isDischargedPatient')) isDischargedPatient = routeArgs['isDischargedPatient']; if (routeArgs.containsKey('isDischargedPatient')) isDischargedPatient = routeArgs['isDischargedPatient'];
return BaseView<PatientViewModel>( return BaseView<PatientViewModel>(
onModelReady: (model) => getProgressNoteList(context, model), onModelReady: (model) => getProgressNoteList(context, model),

@ -19,8 +19,10 @@ class PendingOrdersScreen extends StatelessWidget {
patient = routeArgs['patient']; patient = routeArgs['patient'];
String patientType = routeArgs['patientType']; String patientType = routeArgs['patientType'];
bool isInpatient = routeArgs['isInpatient']; bool isInpatient = routeArgs['isInpatient'];
var isVidaPlus = routeArgs['isVidaPlusProject'];
return BaseView<PendingOrdersViewModel>( return BaseView<PendingOrdersViewModel>(
onModelReady: (model) => model.getPendingOrders(patientId: patient.patientMRN!, admissionNo: int.parse(patient.admissionNo!)), onModelReady: (model) => model.getPendingOrders(patientId: patient.patientMRN!, admissionNo: isVidaPlus? patient.admissionID?? 0 :int.parse(patient.admissionNo!), isVidaPlus: isVidaPlus),
builder: (BuildContext context, PendingOrdersViewModel model, Widget? child) => AppScaffold( builder: (BuildContext context, PendingOrdersViewModel model, Widget? child) => AppScaffold(
appBar: PatientProfileAppBar( appBar: PatientProfileAppBar(
patient, patient,

@ -14,6 +14,7 @@ class PatientProfileCardModel {
final bool isDartIcon; final bool isDartIcon;
final IconData? dartIcon; final IconData? dartIcon;
final Color? color; final Color? color;
final bool isVidaPlusProject;
PatientProfileCardModel( PatientProfileCardModel(
this.nameLine1, this.nameLine1,
@ -29,5 +30,6 @@ class PatientProfileCardModel {
this.isDartIcon = false, this.isDartIcon = false,
this.dartIcon, this.dartIcon,
this.color, this.color,
this.isVidaPlusProject = false,
}); });
} }

@ -68,6 +68,7 @@ String noteValidation ="";
TextEditingController noteController = TextEditingController(); TextEditingController noteController = TextEditingController();
late StreamController<String> videoCallDurationStreamController; late StreamController<String> videoCallDurationStreamController;
late Stream<String> videoCallDurationStream; late Stream<String> videoCallDurationStream;
bool isVidaPlusProject = false;
@override @override
void initState() { void initState() {
@ -95,6 +96,7 @@ String noteValidation ="";
arrivalType = routeArgs['arrivalType']; arrivalType = routeArgs['arrivalType'];
from = routeArgs['from']; from = routeArgs['from'];
to = routeArgs['to']; to = routeArgs['to'];
isVidaPlusProject = routeArgs['isVidaPlusProject']?? false;
isSigned = routeArgs['isSigned'] ?? false; isSigned = routeArgs['isSigned'] ?? false;
if (routeArgs.containsKey("isSearch")) { if (routeArgs.containsKey("isSearch")) {
isFromSearch = routeArgs['isSearch']; isFromSearch = routeArgs['isSearch'];
@ -148,7 +150,7 @@ String noteValidation ="";
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final screenSize = MediaQuery.of(context).size; final screenSize = MediaQuery.of(context).size;
ProjectViewModel projectViewModel = Provider.of<ProjectViewModel>(context); ProjectViewModel projectViewModel = Provider.of<ProjectViewModel>(context, listen: false);
return BaseView<LiveCarePatientViewModel>( return BaseView<LiveCarePatientViewModel>(
onModelReady: (model) async { onModelReady: (model) async {
if (isFromLiveCare && patient.patientStatus == 1) await model.addPatientToDoctorList(patient.vcId!); if (isFromLiveCare && patient.patientStatus == 1) await model.addPatientToDoctorList(patient.vcId!);
@ -202,6 +204,7 @@ String noteValidation ="";
to: to, to: to,
isDischargedPatient: isDischargedPatient, isDischargedPatient: isDischargedPatient,
isFromSearch: isFromSearch, isFromSearch: isFromSearch,
isVidaPlusProject: isVidaPlusProject
) )
: ProfileGridForOther( : ProfileGridForOther(
patient: patient, patient: patient,
@ -231,7 +234,7 @@ String noteValidation ="";
onModelReady: (model) async { onModelReady: (model) async {
model.getDoctorProfile(); model.getDoctorProfile();
if (isInpatient) { if (isInpatient) {
await model.getEpisodeForInpatient(patient); await model.getEpisodeForInpatient(patient, isVidaPlusProject);
} }
}, },
builder: (_, model, w) => Positioned( builder: (_, model, w) => Positioned(
@ -487,7 +490,7 @@ String noteValidation ="";
); );
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
if (patient.admissionNo != null && patient.admissionNo!.isNotEmpty) { if (patient.admissionNo != null && patient.admissionNo!.isNotEmpty) {
PostEpisodeForInpatientRequestModel postEpisodeReqModel = PostEpisodeForInpatientRequestModel(admissionNo: int.parse(patient.admissionNo!), patientID: patient.patientId); PostEpisodeForInpatientRequestModel postEpisodeReqModel = PostEpisodeForInpatientRequestModel(admissionNo: isVidaPlusProject?patient.admissionID:int.parse(patient.admissionNo!), patientID: patient.patientId);
await model.postEpisodeForInPatient(postEpisodeReqModel); await model.postEpisodeForInPatient(postEpisodeReqModel);
} else { } else {
PostEpisodeReqModel postEpisodeReqModel = PostEpisodeReqModel(appointmentNo: int.parse(patient.appointmentNo.toString()), patientMRN: patient.patientMRN); PostEpisodeReqModel postEpisodeReqModel = PostEpisodeReqModel(appointmentNo: int.parse(patient.appointmentNo.toString()), patientMRN: patient.patientMRN);
@ -501,7 +504,7 @@ String noteValidation ="";
} else { } else {
patient.episodeNo = model.episodeID; patient.episodeNo = model.episodeID;
if(Utils.isVidaPlusProject( if(Utils.isVidaPlusProject(
Provider.of<ProjectViewModel>(context), Provider.of<ProjectViewModel>(context, listen: false),
patient.projectId!, patient.projectId!,
)){ )){
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(

@ -15,11 +15,12 @@ class ProfileGridForInPatient extends StatelessWidget {
final bool isInpatient; final bool isInpatient;
final bool isDischargedPatient; final bool isDischargedPatient;
final bool isFromSearch; final bool isFromSearch;
final bool isVidaPlusProject;
String? from; String? from;
String? to; String? to;
ProfileGridForInPatient( ProfileGridForInPatient(
{Key? key, this.patient, this.patientType, this.arrivalType, this.height, this.isInpatient = false, this.from, this.to, this.isDischargedPatient = false, this.isFromSearch = false}) {Key? key, this.patient, this.patientType, this.arrivalType, this.height, this.isInpatient = false, this.from, this.to, this.isDischargedPatient = false, this.isFromSearch = false, required this.isVidaPlusProject})
: super(key: key); : super(key: key);
@override @override
@ -31,6 +32,7 @@ class ProfileGridForInPatient extends StatelessWidget {
VITAL_SIGN_DETAILS, VITAL_SIGN_DETAILS,
'assets/images/svgs/profile_screen/vital signs.svg', 'assets/images/svgs/profile_screen/vital signs.svg',
isInPatient: isInpatient, isInPatient: isInpatient,
isVidaPlusProject: isVidaPlusProject
), ),
PatientProfileCardModel( PatientProfileCardModel(
TranslationBase.of(context).lab, TranslationBase.of(context).lab,
@ -38,6 +40,8 @@ class ProfileGridForInPatient extends StatelessWidget {
LAB_RESULT, LAB_RESULT,
'assets/images/svgs/profile_screen/lab results.svg', 'assets/images/svgs/profile_screen/lab results.svg',
isInPatient: isInpatient, isInPatient: isInpatient,
isVidaPlusProject: isVidaPlusProject
), ),
PatientProfileCardModel( PatientProfileCardModel(
TranslationBase.of(context).lab, TranslationBase.of(context).lab,
@ -45,6 +49,7 @@ class ProfileGridForInPatient extends StatelessWidget {
ALL_SPECIAL_LAB_RESULT, ALL_SPECIAL_LAB_RESULT,
'assets/images/svgs/profile_screen/lab results.svg', 'assets/images/svgs/profile_screen/lab results.svg',
isInPatient: isInpatient, isInPatient: isInpatient,
isVidaPlusProject: isVidaPlusProject
), ),
PatientProfileCardModel( PatientProfileCardModel(
TranslationBase.of(context).radiology, TranslationBase.of(context).radiology,
@ -52,6 +57,7 @@ class ProfileGridForInPatient extends StatelessWidget {
RADIOLOGY_PATIENT, RADIOLOGY_PATIENT,
'assets/images/svgs/profile_screen/Radiology.svg', 'assets/images/svgs/profile_screen/Radiology.svg',
isInPatient: isInpatient, isInPatient: isInpatient,
isVidaPlusProject: isVidaPlusProject
), ),
PatientProfileCardModel( PatientProfileCardModel(
TranslationBase.of(context).patient, TranslationBase.of(context).patient,
@ -59,6 +65,7 @@ class ProfileGridForInPatient extends StatelessWidget {
ORDER_PRESCRIPTION_OLD, ORDER_PRESCRIPTION_OLD,
'assets/images/svgs/profile_screen/order prescription.svg', 'assets/images/svgs/profile_screen/order prescription.svg',
isInPatient: isInpatient, isInPatient: isInpatient,
isVidaPlusProject: isVidaPlusProject
), ),
PatientProfileCardModel( PatientProfileCardModel(
TranslationBase.of(context).patient, TranslationBase.of(context).patient,
@ -66,6 +73,7 @@ class ProfileGridForInPatient extends StatelessWidget {
ORDER_PRESCRIPTION_NEW, ORDER_PRESCRIPTION_NEW,
'assets/images/svgs/profile_screen/order prescription.svg', 'assets/images/svgs/profile_screen/order prescription.svg',
isInPatient: isInpatient, isInPatient: isInpatient,
isVidaPlusProject: isVidaPlusProject
), ),
PatientProfileCardModel( PatientProfileCardModel(
TranslationBase.of(context).progress, TranslationBase.of(context).progress,
@ -74,6 +82,7 @@ class ProfileGridForInPatient extends StatelessWidget {
'assets/images/svgs/profile_screen/Progress notes.svg', 'assets/images/svgs/profile_screen/Progress notes.svg',
isInPatient: isInpatient, isInPatient: isInpatient,
isDischargedPatient: isDischargedPatient, isDischargedPatient: isDischargedPatient,
isVidaPlusProject: isVidaPlusProject
), ),
PatientProfileCardModel( PatientProfileCardModel(
TranslationBase.of(context).order, TranslationBase.of(context).order,
@ -82,6 +91,7 @@ class ProfileGridForInPatient extends StatelessWidget {
'assets/images/svgs/profile_screen/order sheets.svg', 'assets/images/svgs/profile_screen/order sheets.svg',
isInPatient: isInpatient, isInPatient: isInpatient,
isDischargedPatient: isDischargedPatient, isDischargedPatient: isDischargedPatient,
isVidaPlusProject: isVidaPlusProject
), ),
PatientProfileCardModel( PatientProfileCardModel(
TranslationBase.of(context).orders, TranslationBase.of(context).orders,
@ -90,6 +100,7 @@ class ProfileGridForInPatient extends StatelessWidget {
'assets/images/svgs/profile_screen/Order Procedures.svg', 'assets/images/svgs/profile_screen/Order Procedures.svg',
isInPatient: isInpatient, isInPatient: isInpatient,
//onTap: () {}, //onTap: () {},
isVidaPlusProject: isVidaPlusProject
), ),
PatientProfileCardModel( PatientProfileCardModel(
TranslationBase.of(context).health, TranslationBase.of(context).health,
@ -97,6 +108,7 @@ class ProfileGridForInPatient extends StatelessWidget {
HEALTH_SUMMARY, HEALTH_SUMMARY,
'assets/images/svgs/profile_screen/health summary.svg', 'assets/images/svgs/profile_screen/health summary.svg',
isInPatient: isInpatient, isInPatient: isInpatient,
isVidaPlusProject: isVidaPlusProject
), ),
PatientProfileCardModel( PatientProfileCardModel(
TranslationBase.of(context).medical, TranslationBase.of(context).medical,
@ -105,6 +117,7 @@ class ProfileGridForInPatient extends StatelessWidget {
'assets/images/svgs/profile_screen/medical report.svg', 'assets/images/svgs/profile_screen/medical report.svg',
isInPatient: isInpatient, isInPatient: isInpatient,
isDisable: false, isDisable: false,
isVidaPlusProject: isVidaPlusProject
), ),
PatientProfileCardModel( PatientProfileCardModel(
TranslationBase.of(context).referral, TranslationBase.of(context).referral,
@ -113,6 +126,7 @@ class ProfileGridForInPatient extends StatelessWidget {
'assets/images/svgs/profile_screen/refer patient.svg', 'assets/images/svgs/profile_screen/refer patient.svg',
isInPatient: isInpatient, isInPatient: isInpatient,
isDisable: isDischargedPatient || isFromSearch, isDisable: isDischargedPatient || isFromSearch,
isVidaPlusProject: isVidaPlusProject
), ),
PatientProfileCardModel( PatientProfileCardModel(
TranslationBase.of(context).insurance, TranslationBase.of(context).insurance,
@ -121,6 +135,7 @@ class ProfileGridForInPatient extends StatelessWidget {
'assets/images/svgs/profile_screen/insurance approval.svg', 'assets/images/svgs/profile_screen/insurance approval.svg',
isInPatient: isInpatient, isInPatient: isInpatient,
//onTap: () {}, //onTap: () {},
isVidaPlusProject: isVidaPlusProject
), ),
PatientProfileCardModel( PatientProfileCardModel(
TranslationBase.of(context).discharge, TranslationBase.of(context).discharge,
@ -128,6 +143,7 @@ class ProfileGridForInPatient extends StatelessWidget {
DISCHARGE_SUMMARY, DISCHARGE_SUMMARY,
'assets/images/svgs/profile_screen/discharge summary.svg', 'assets/images/svgs/profile_screen/discharge summary.svg',
isInPatient: isInpatient, isInPatient: isInpatient,
isVidaPlusProject: isVidaPlusProject
), ),
PatientProfileCardModel( PatientProfileCardModel(
TranslationBase.of(context).patientSick, TranslationBase.of(context).patientSick,
@ -136,6 +152,7 @@ class ProfileGridForInPatient extends StatelessWidget {
'assets/images/svgs/profile_screen/patient sick leave.svg', 'assets/images/svgs/profile_screen/patient sick leave.svg',
isInPatient: isInpatient, isInPatient: isInpatient,
//onTap: () {}, //onTap: () {},
isVidaPlusProject: isVidaPlusProject
), ),
PatientProfileCardModel( PatientProfileCardModel(
TranslationBase.of(context).operation, TranslationBase.of(context).operation,
@ -143,6 +160,7 @@ class ProfileGridForInPatient extends StatelessWidget {
GET_OPERATION_REPORT, GET_OPERATION_REPORT,
'assets/images/svgs/profile_screen/operating report.svg', 'assets/images/svgs/profile_screen/operating report.svg',
isInPatient: isInpatient, isInPatient: isInpatient,
isVidaPlusProject: isVidaPlusProject,
), ),
PatientProfileCardModel( PatientProfileCardModel(
TranslationBase.of(context).pending, TranslationBase.of(context).pending,
@ -150,6 +168,7 @@ class ProfileGridForInPatient extends StatelessWidget {
PENDING_ORDERS, PENDING_ORDERS,
'assets/images/svgs/profile_screen/pending orders.svg', 'assets/images/svgs/profile_screen/pending orders.svg',
isInPatient: isInpatient, isInPatient: isInpatient,
isVidaPlusProject: isVidaPlusProject
), ),
PatientProfileCardModel( PatientProfileCardModel(
TranslationBase.of(context).admission, TranslationBase.of(context).admission,
@ -157,6 +176,7 @@ class ProfileGridForInPatient extends StatelessWidget {
ADMISSION_ORDERS, ADMISSION_ORDERS,
'assets/images/svgs/profile_screen/admission req.svg', 'assets/images/svgs/profile_screen/admission req.svg',
isInPatient: isInpatient, isInPatient: isInpatient,
isVidaPlusProject: isVidaPlusProject
), ),
PatientProfileCardModel( PatientProfileCardModel(
"Nursing", "Nursing",
@ -164,6 +184,7 @@ class ProfileGridForInPatient extends StatelessWidget {
NURSING_PROGRESS_NOTE, NURSING_PROGRESS_NOTE,
'assets/images/svgs/profile_screen/Progress notes.svg', 'assets/images/svgs/profile_screen/Progress notes.svg',
isInPatient: isInpatient, isInPatient: isInpatient,
isVidaPlusProject: isVidaPlusProject
), ),
PatientProfileCardModel( PatientProfileCardModel(
TranslationBase.of(context).diagnosis, TranslationBase.of(context).diagnosis,
@ -171,6 +192,7 @@ class ProfileGridForInPatient extends StatelessWidget {
DIAGNOSIS_FOR_IN_PATIENT, DIAGNOSIS_FOR_IN_PATIENT,
'assets/images/svgs/profile_screen/diagnosis.svg', 'assets/images/svgs/profile_screen/diagnosis.svg',
isInPatient: isInpatient, isInPatient: isInpatient,
isVidaPlusProject: isVidaPlusProject
), ),
PatientProfileCardModel( PatientProfileCardModel(
TranslationBase.of(context).diabetic, TranslationBase.of(context).diabetic,
@ -178,6 +200,7 @@ class ProfileGridForInPatient extends StatelessWidget {
DIABETIC_CHART_VALUES, DIABETIC_CHART_VALUES,
'assets/images/svgs/profile_screen/diabetic chart.svg', 'assets/images/svgs/profile_screen/diabetic chart.svg',
isInPatient: isInpatient, isInPatient: isInpatient,
isVidaPlusProject: isVidaPlusProject
), ),
PatientProfileCardModel( PatientProfileCardModel(
"VTE", "VTE",
@ -185,6 +208,7 @@ class ProfileGridForInPatient extends StatelessWidget {
VTE_ASSESSMENT, VTE_ASSESSMENT,
'assets/images/svgs/profile_screen/diabetic chart.svg', 'assets/images/svgs/profile_screen/diabetic chart.svg',
isInPatient: isInpatient, isInPatient: isInpatient,
isVidaPlusProject: isVidaPlusProject
), ),
PatientProfileCardModel( PatientProfileCardModel(
TranslationBase.of(context).pharmacy, TranslationBase.of(context).pharmacy,
@ -192,6 +216,7 @@ class ProfileGridForInPatient extends StatelessWidget {
PHARMACY_INTERVENTION, PHARMACY_INTERVENTION,
'assets/images/svgs/profile_screen/medical report.svg', 'assets/images/svgs/profile_screen/medical report.svg',
isInPatient: isInpatient, isInPatient: isInpatient,
isVidaPlusProject: isVidaPlusProject
), ),
]; ];
@ -223,6 +248,7 @@ class ProfileGridForInPatient extends StatelessWidget {
isDisable: item.isDisable, isDisable: item.isDisable,
onTap: item.onTap, onTap: item.onTap,
isLoading: item.isLoading, isLoading: item.isLoading,
isVidaPlusProject: item.isVidaPlusProject
); );
}).toList(), }).toList(),
), ),

@ -1,9 +1,12 @@
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/view_state.dart'; import 'package:doctor_app_flutter/core/enum/view_state.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/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/core/provider/robot_provider.dart'; import 'package:doctor_app_flutter/core/provider/robot_provider.dart';
import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart'; import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart';
import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/utils/date-utils.dart'; import 'package:doctor_app_flutter/utils/date-utils.dart';
@ -25,6 +28,9 @@ import 'package:permission_handler/permission_handler.dart';
import 'package:speech_to_text/speech_recognition_error.dart'; import 'package:speech_to_text/speech_recognition_error.dart';
import 'package:speech_to_text/speech_to_text.dart' as stt; import 'package:speech_to_text/speech_to_text.dart' as stt;
import '../../../../../client/base_app_client.dart' show sharedPref;
import '../../../../../config/shared_pref_kay.dart' show SLECTED_PATIENT_TYPE;
class PatientMakeInPatientReferralScreen extends StatefulWidget { class PatientMakeInPatientReferralScreen extends StatefulWidget {
@override @override
_PatientMakeInPatientReferralScreenState createState() => _PatientMakeInPatientReferralScreenState(); _PatientMakeInPatientReferralScreenState createState() => _PatientMakeInPatientReferralScreenState();
@ -34,6 +40,7 @@ class _PatientMakeInPatientReferralScreenState extends State<PatientMakeInPatien
PatiantInformtion? patient; PatiantInformtion? patient;
List<dynamic>? referToList; List<dynamic>? referToList;
dynamic _referTo; dynamic _referTo;
dynamic? selectedDiagnosis;
dynamic _selectedBranch; dynamic _selectedBranch;
dynamic _selectedClinic; dynamic _selectedClinic;
dynamic _selectedDoctor; dynamic _selectedDoctor;
@ -53,6 +60,8 @@ class _PatientMakeInPatientReferralScreenState extends State<PatientMakeInPatien
var recognizedWord; var recognizedWord;
var event = RobotProvider(); var event = RobotProvider();
var isVidaPlusProject = false;
@override @override
void initState() { void initState() {
requestPermissions(); requestPermissions();
@ -141,6 +150,7 @@ class _PatientMakeInPatientReferralScreenState extends State<PatientMakeInPatien
final routeArgs = ModalRoute.of(context)!.settings.arguments as Map; final routeArgs = ModalRoute.of(context)!.settings.arguments as Map;
patient = routeArgs['patient']; patient = routeArgs['patient'];
bool isInpatient = routeArgs['isInpatient']; bool isInpatient = routeArgs['isInpatient'];
isVidaPlusProject = routeArgs['isVidaPlusProject'];
referToList = []; referToList = [];
dynamic sameBranch = {"id": 1, "name": TranslationBase.of(context).sameBranch}; dynamic sameBranch = {"id": 1, "name": TranslationBase.of(context).sameBranch};
dynamic otherBranch = {"id": 2, "name": TranslationBase.of(context).otherBranch}; dynamic otherBranch = {"id": 2, "name": TranslationBase.of(context).otherBranch};
@ -149,8 +159,30 @@ class _PatientMakeInPatientReferralScreenState extends State<PatientMakeInPatien
final screenSize = MediaQuery.of(context).size; final screenSize = MediaQuery.of(context).size;
getDiagnosisForInPatient(BuildContext context, PatientReferralViewModel model,
{bool isLocalBusy = false}) async {
final routeArgs = ModalRoute.of(context)!.settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
// String type = await sharedPref.getString(SLECTED_PATIENT_TYPE);
//
// print(type);
String type = await sharedPref.getString(SLECTED_PATIENT_TYPE) == '0' ? "2" : "1";
print(type);
GetDiagnosisForInPatientRequestModel getDiagnosisForInPatientRequestModel =
GetDiagnosisForInPatientRequestModel(
admissionNo: isVidaPlusProject? patient.admissionID : int.parse(patient.admissionNo!),
patientTypeID: patient.patientType,
patientID: patient.patientId,
);
model.getDiagnosisForInPatient(getDiagnosisForInPatientRequestModel,isVidaPlusProject,patient);
}
return BaseView<PatientReferralViewModel>( return BaseView<PatientReferralViewModel>(
onModelReady: (model) => model.getReferralFrequencyList(), onModelReady: (model) {
model.getReferralFrequencyList();
getDiagnosisForInPatient(context, model);
},
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
appBarTitle: TranslationBase.of(context).referPatient, appBarTitle: TranslationBase.of(context).referPatient,
@ -434,6 +466,47 @@ class _PatientMakeInPatientReferralScreenState extends State<PatientMakeInPatien
onChanged: (value) {}, onChanged: (value) {},
onFieldSubmitted: () {}, onFieldSubmitted: () {},
), ),
Visibility(
visible: isVidaPlusProject,
child:
Column(
children: [
SizedBox(
height: 10,
),
AppTextFieldCustom(
height: screenSize.height * 0.075,
hintText: TranslationBase.of(context).diagnosis,
dropDownText: selectedDiagnosis != null ? selectedDiagnosis['selectedDisease'] : null,
enabled: false,
isTextFieldHasSuffix: true,
validationError: branchError,
onClick: () {
ListSelectDialog dialog = ListSelectDialog(
list: model.diagnosisForInPatientList,
attributeName: 'selectedDisease',
attributeValueId: 'selectedIcdCode',
okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) {
setState(() {
selectedDiagnosis = selectedValue;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
},
onChanged: (value) {},
onFieldSubmitted: () {},
),
],
),
),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
@ -552,6 +625,7 @@ class _PatientMakeInPatientReferralScreenState extends State<PatientMakeInPatien
_selectedBranch == null || _selectedBranch == null ||
_selectedClinic == null || _selectedClinic == null ||
_selectedDoctor == null || _selectedDoctor == null ||
( isVidaPlusProject && selectedDiagnosis == null) ||
_remarksController.text == null || _remarksController.text == null ||
_extController.text == null) return; _extController.text == null) return;
{ {
@ -566,7 +640,10 @@ class _PatientMakeInPatientReferralScreenState extends State<PatientMakeInPatien
remarks: _remarksController.text, remarks: _remarksController.text,
priority: _activePriority, priority: _activePriority,
referralDate: appointmentDate, referralDate: appointmentDate,
isLocalBusy: true); diagnosis: selectedDiagnosis,
isLocalBusy: true,
isVidaPlusProject
);
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (model.state == ViewState.ErrorLocal) if (model.state == ViewState.ErrorLocal)
DrAppToastMsg.showErrorToast(model.error); DrAppToastMsg.showErrorToast(model.error);

@ -54,8 +54,9 @@ class InterventionHistoryBottomSheet extends StatelessWidget {
color: Colors.white, color: Colors.white,
child: InterventionHistoryItem( child: InterventionHistoryItem(
interventionHistory: interventionList[index], interventionHistory: interventionList[index],
onAcceptClick: (intervention) { onAcceptClick: (intervention, remarks) {
model.updateInterventionDiseaseStatus( model.updateInterventionDiseaseStatus(
remarks: remarks,
isAccepted: true, isAccepted: true,
interventionID: interventionList[index].interventionId.toString(), interventionID: interventionList[index].interventionId.toString(),
successMessage: TranslationBase.of(context).interventionAcceptedSuccessfully, successMessage: TranslationBase.of(context).interventionAcceptedSuccessfully,
@ -63,8 +64,9 @@ class InterventionHistoryBottomSheet extends StatelessWidget {
); );
Navigator.pop(context); Navigator.pop(context);
}, },
onRejectClick: (intervention) { onRejectClick: (intervention, remarks) {
model.updateInterventionDiseaseStatus( model.updateInterventionDiseaseStatus(
remarks: remarks,
interventionID: interventionList[index].interventionId.toString(), interventionID: interventionList[index].interventionId.toString(),
successMessage: TranslationBase.of(context).interventionRejectedSuccessfully, successMessage: TranslationBase.of(context).interventionRejectedSuccessfully,
errorMessage: TranslationBase.of(context).unableToPerformTheAction errorMessage: TranslationBase.of(context).unableToPerformTheAction

@ -1,22 +1,26 @@
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/pharmacy-intervention-model/intervention_history.dart'; import 'package:doctor_app_flutter/core/model/pharmacy-intervention-model/intervention_history.dart';
import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class InterventionHistoryItem extends StatelessWidget { class InterventionHistoryItem extends StatelessWidget {
final InterventionHistory interventionHistory; final InterventionHistory interventionHistory;
final Function(InterventionHistory) onAcceptClick; final Function(InterventionHistory, String) onAcceptClick;
// string is index here final Function(InterventionHistory, String) onRejectClick;
final Function(InterventionHistory) onRejectClick; final TextEditingController remarksController = TextEditingController();
const InterventionHistoryItem({
InterventionHistoryItem({
super.key, super.key,
required this.interventionHistory, required this.interventionHistory,
required this.onAcceptClick, required this.onAcceptClick,
required this.onRejectClick, required this.onRejectClick,
}); });
@override @override
@ -56,6 +60,19 @@ class InterventionHistoryItem extends StatelessWidget {
color: Color(0xFF2B353E), color: Color(0xFF2B353E),
), ),
SizedBox(height: 8,), SizedBox(height: 8,),
AppTextFieldCustom(
hintText: TranslationBase.of(context).addDoctorRemarks,
controller: remarksController,
maxLines: 48,
minLines: 2,
hasBorder: true,
inputType: TextInputType.multiline,
onClick: () {},
onChanged: (value) {},
onFieldSubmitted: () {},
),
SizedBox(height: 16,),
Row(children: [ Row(children: [
Expanded( Expanded(
child: SizedBox( child: SizedBox(
@ -69,7 +86,11 @@ class InterventionHistoryItem extends StatelessWidget {
color: AppGlobal.appRedColor, color: AppGlobal.appRedColor,
fontColor: Colors.white, fontColor: Colors.white,
onPressed: () async { onPressed: () async {
onRejectClick(interventionHistory); if(remarksController.text.isEmpty == true) {
DrAppToastMsg.showErrorToast(TranslationBase.of(context).remarksNotAdded);
return;
}
onRejectClick(interventionHistory, remarksController.text);
}, },
), ),
), ),
@ -89,7 +110,11 @@ class InterventionHistoryItem extends StatelessWidget {
color: AppGlobal.appGreenColor, color: AppGlobal.appGreenColor,
fontColor: Colors.white, fontColor: Colors.white,
onPressed: () async { onPressed: () async {
onAcceptClick(interventionHistory); if(remarksController.text.isEmpty == true) {
DrAppToastMsg.showErrorToast(TranslationBase.of(context).remarksNotAdded);
return;
}
onAcceptClick(interventionHistory,remarksController.text);
}, },
), ),
), ),

@ -25,9 +25,19 @@ class NewPrescriptionsPage extends StatelessWidget {
PatiantInformtion patient = routeArgs['patient']; PatiantInformtion patient = routeArgs['patient'];
bool isInpatient = routeArgs['isInpatient']; bool isInpatient = routeArgs['isInpatient'];
bool isFromLiveCare = routeArgs['isFromLiveCare']; bool isFromLiveCare = routeArgs['isFromLiveCare'];
bool isVidaPlusProject = routeArgs['isVidaPlusProject'];
return BaseView<PrescriptionViewModel>( return BaseView<PrescriptionViewModel>(
onModelReady: (model) async { onModelReady: (model) async {
await model.getPrescriptionListNew(mrn: patient.patientMRN, appNo: patient.appointmentNo == null ? 0 : int.parse(patient.appointmentNo.toString())); // if(isVidaPlusProject)
// {
// model.getMedicationForInPatient(patient, isVidaPlusProject);
// }else {
await model.getPrescriptionListNew(
mrn: patient.patientMRN,
appNo: patient.appointmentNo == null
? 0
: int.parse(patient.appointmentNo.toString()));
// }
await model.isPrincipalCovered(patient: patient); await model.isPrincipalCovered(patient: patient);
}, },

@ -27,9 +27,11 @@ class OldPrescriptionsPage extends StatelessWidget {
String arrivalType = routeArgs['arrivalType']; String arrivalType = routeArgs['arrivalType'];
bool isInpatient = routeArgs['isInpatient']; bool isInpatient = routeArgs['isInpatient'];
bool isFromLiveCare = routeArgs['isFromLiveCare']; bool isFromLiveCare = routeArgs['isFromLiveCare'];
bool isVidaPlusProject = routeArgs['isVidaPlusProject'];
var admissionNumber = isVidaPlusProject ? patient.admissionID : patient.admissionNo;
return BaseView<PrescriptionViewModel>( return BaseView<PrescriptionViewModel>(
onModelReady: (model) async { onModelReady: (model) async {
patient.admissionNo == null ? model.getPrescriptions(patient, patientType: patientType, isLocalBusy: false) : model.getMedicationForInPatient(patient); admissionNumber == null ? model.getPrescriptions(patient, patientType: patientType, isLocalBusy: false) : model.getMedicationForInPatient(patient, isVidaPlusProject);
}, },
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
@ -39,7 +41,7 @@ class OldPrescriptionsPage extends StatelessWidget {
patient, patient,
isInpatient: isInpatient, isInpatient: isInpatient,
), ),
body: patient.admissionNo == null body: admissionNumber == null
? FractionallySizedBox( ? FractionallySizedBox(
widthFactor: 1.0, widthFactor: 1.0,
child: SingleChildScrollView( child: SingleChildScrollView(
@ -167,6 +169,7 @@ class OldPrescriptionsPage extends StatelessWidget {
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
isVidaPlusProject: isVidaPlusProject,
startOn: AppDateUtils.getDateTimeFromServerFormat( startOn: AppDateUtils.getDateTimeFromServerFormat(
model.medicationForInPatient[index].startDatetime!, model.medicationForInPatient[index].startDatetime!,
), ),

@ -21,6 +21,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
final DateTime? startOn; final DateTime? startOn;
final DateTime? stopOn; final DateTime? stopOn;
final int? prescriptionIndex; final int? prescriptionIndex;
final bool isVidaPlusProject;
PrescriptionItemsInPatientPage( PrescriptionItemsInPatientPage(
{Key? key, {Key? key,
@ -30,6 +31,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
this.arrivalType, this.arrivalType,
this.stopOn, this.stopOn,
this.startOn, this.startOn,
this.isVidaPlusProject = false,
this.prescriptionIndex}); this.prescriptionIndex});
@override @override
@ -38,7 +40,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
return BaseView<PrescriptionViewModel>( return BaseView<PrescriptionViewModel>(
onModelReady: (model) async { onModelReady: (model) async {
if (model.medicationForInPatient.length == 0) { if (model.medicationForInPatient.length == 0) {
await model.getMedicationForInPatient(patient!); await model.getMedicationForInPatient(patient!,isVidaPlusProject);
} }
}, },
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(

@ -1996,6 +1996,9 @@ class TranslationBase {
String get dateFromCanNotBeEmpty => localizedValues['dateFromCanNotBeEmpty']![locale.languageCode]!; String get dateFromCanNotBeEmpty => localizedValues['dateFromCanNotBeEmpty']![locale.languageCode]!;
String get open => localizedValues['open']![locale.languageCode]!; String get open => localizedValues['open']![locale.languageCode]!;
String get chiefComplaintLengthErrorMsg => localizedValues['chiefComplaintLengthErrorMsg']![locale.languageCode]!; String get chiefComplaintLengthErrorMsg => localizedValues['chiefComplaintLengthErrorMsg']![locale.languageCode]!;
String get filterInPatient => localizedValues['filterInPatient']![locale.languageCode]!;
String get remarksNotAdded => localizedValues['remarksNotAdded']![locale.languageCode]!;
String get addDoctorRemarks => localizedValues['addDoctorRemarks']![locale.languageCode]!;
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -31,6 +31,7 @@ class PatientProfileButton extends StatelessWidget {
final IconData? dartIcon; final IconData? dartIcon;
final bool isFromLiveCare; final bool isFromLiveCare;
final Color? color; final Color? color;
final bool isVidaPlusProject;
PatientProfileButton({ PatientProfileButton({
Key? key, Key? key,
@ -53,6 +54,7 @@ class PatientProfileButton extends StatelessWidget {
this.dartIcon, this.dartIcon,
this.isFromLiveCare = false, this.isFromLiveCare = false,
this.color, this.color,
this.isVidaPlusProject = false
}) : super(key: key); }) : super(key: key);
@override @override
@ -152,7 +154,8 @@ class PatientProfileButton extends StatelessWidget {
'isInpatient': isInPatient, 'isInpatient': isInPatient,
'isDischargedPatient': isDischargedPatient, 'isDischargedPatient': isDischargedPatient,
'isSelectInpatient': isSelectInpatient, 'isSelectInpatient': isSelectInpatient,
"isFromLiveCare": isFromLiveCare "isFromLiveCare": isFromLiveCare,
"isVidaPlusProject": isVidaPlusProject
}); });
} }
} }

@ -104,26 +104,28 @@ class AppScaffold extends StatelessWidget {
) )
: null, : null,
bottomSheet: bottomSheet, bottomSheet: bottomSheet,
body: projectProvider.isInternetConnection body:
? baseViewModel != null // projectProvider.isInternetConnection
// ?
baseViewModel != null
? NetworkBaseView( ? NetworkBaseView(
baseViewModel: baseViewModel!, baseViewModel: baseViewModel!,
child: body!, child: body!,
) )
: Stack(children: <Widget>[body!, buildAppLoaderWidget(isLoading)]) : Stack(children: <Widget>[body!, buildAppLoaderWidget(isLoading)])
: Center( // : Center(
child: Column( // child: Column(
mainAxisAlignment: MainAxisAlignment.center, // mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, // crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[ // children: <Widget>[
Image.asset( // Image.asset(
"assets/images/undraw_connected_world_wuay.png", // "assets/images/undraw_connected_world_wuay.png",
height: 250, // height: 250,
), // ),
AppText('No Internet Connection') // AppText('No Internet Connection')
], // ],
), // ),
), // ),
), ),
); );
} }

@ -6,6 +6,7 @@ import '../../../config/config.dart';
class ListSelectDialog extends StatefulWidget { class ListSelectDialog extends StatefulWidget {
final List<dynamic> list; final List<dynamic> list;
final String attributeName; final String attributeName;
final String attributeValueId; final String attributeValueId;
final okText; final okText;

Loading…
Cancel
Save