ipd-changes-for-vida-plus
haroon amjad 1 month ago
parent c9217dca73
commit 9139039cc8

@ -136,7 +136,7 @@ class BaseAppClient {
// body['ProjectID'] = 12;
// body['DoctorID'] = 1002; //3844083
// body['TokenID'] = "@dm!n";
// body?['TokenID'] = "@dm!n";
// print("ProjectID :");
// print(body['ProjectID']);

@ -16,9 +16,9 @@ const DOCTOR_ROTATION = 'https://doctorrota.hmg.com/';
// const BASE_URL = 'https://hmgwebservices.com/';
// 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://webservices.hmg.com/';
//

@ -11,6 +11,8 @@ import 'package:doctor_app_flutter/core/model/labs/request_patient_lab_special_r
import 'package:doctor_app_flutter/core/model/labs/request_send_lab_report_email.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/locator.dart';
import 'package:doctor_app_flutter/utils/utils.dart';
import '../../base/base_service.dart';
@ -84,7 +86,7 @@ class LabsService extends BaseService {
}, body: body);
}
Future getPatientLabResult({required PatientLabOrders patientLabOrder, required PatiantInformtion patient, bool isInpatient = false}) async {
Future getPatientLabResult({required PatientLabOrders patientLabOrder, required ProjectViewModel projectViewModel, required PatiantInformtion patient, bool isInpatient = false}) async {
hasError = false;
String url = "";
@ -95,15 +97,16 @@ class LabsService extends BaseService {
}
Map<String, dynamic> body = Map();
if(ProjectViewModel.getVidaPlusStatus()){
if (Utils.isVidaPlusProject(projectViewModel, int.parse(patientLabOrder.projectID ?? "0"))) {
// if(ProjectViewModel.getVidaPlusStatus()){
body['InvoiceNo_VP'] = patientLabOrder.InvoiceNo_VP;
}else {
} else {
body['InvoiceNo'] = patientLabOrder.invoiceNo;
}
body['OrderNo'] = patientLabOrder.orderNo;
body['isDentalAllowedBackend'] = false;
body['SetupID'] = patientLabOrder.setupID;
body['ProjectID'] = patientLabOrder.projectID;
body['ProjectID'] = patientLabOrder.projectID;
body['ClinicID'] = patientLabOrder.clinicID ?? 0;
body['InvoiceType'] = patientLabOrder.invoiceType ?? "";
await baseAppClient.postPatient(url, patient: patient, onSuccess: (dynamic response, int statusCode) {
@ -223,12 +226,12 @@ class LabsService extends BaseService {
Map<String, dynamic> body = Map();
body['FileHash'] = [FileHash??FileName??""];
if(ProjectViewModel.getVidaPlusStatus()){
// if(ProjectViewModel.getVidaPlusStatus()){
body['Lang'] = "en"??"";
body['Internationalization'] = false;
}else {
// } else {
body['LabAccessionNumber'] = labAccessNumber??"";
}
// }
await baseAppClient.postPatient(GET_ATTACHMENT, patient: patient, onSuccess: (dynamic response, int statusCode) {
labAttachment.clear();
response['GetVidaLabAttachment']['data'].forEach((lab) {

@ -9,6 +9,7 @@ import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart';
import 'package:doctor_app_flutter/core/model/labs/patient_lab_special_result.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/core/service/patient_medical_file/lab_order/labs_service.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/locator.dart';
import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart';
import 'package:open_filex/open_filex.dart';
@ -89,9 +90,9 @@ class LabsViewModel extends BaseViewModel {
}
}
getPatientLabResult({PatientLabOrders? patientLabOrder, PatiantInformtion? patient, bool? isInpatient}) async {
getPatientLabResult(ProjectViewModel? projectViewModel, {PatientLabOrders? patientLabOrder, PatiantInformtion? patient, bool? isInpatient}) async {
setState(ViewState.Busy);
await _labsService.getPatientLabResult(patientLabOrder: patientLabOrder!, patient: patient!, isInpatient: isInpatient!);
await _labsService.getPatientLabResult(patientLabOrder: patientLabOrder!, projectViewModel: projectViewModel!, patient: patient!, isInpatient: isInpatient!);
if (_labsService.hasError) {
error = _labsService.error;
setState(ViewState.Error);

@ -13,6 +13,7 @@ import 'package:doctor_app_flutter/core/viewModel/prescription/prescription_view
import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart';
import 'package:doctor_app_flutter/core/viewModel/profile/discharge_summary_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/profile/operation_report_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/scan_qr_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/sick_leave_view_model.dart';
import 'package:doctor_app_flutter/screens/pharmacy_intervention/viewmodel/pharmacy_intervention_service.dart';
@ -157,4 +158,5 @@ void setupLocator() {
locator.registerFactory(() => ERSignInViewModel());
locator.registerFactory(() => PharmacyInterventionViewModel());
locator.registerFactory(() => SecurityServiceImpl());
locator.registerFactory(() => ProjectViewModel());
}

@ -33,21 +33,21 @@ void main() async {
tz.initializeTimeZones();
if (kReleaseMode) {
await service.initialize();
// Set up critical threat callback to navigate to unsafe device page
service.setOnCriticalThreatCallback(() {
final navigationService = locator.get<NavigationService>();
final context = navigationService.navigatorKey.currentContext;
if (context != null) {
// Clear entire navigation stack and show unsafe device page
Navigator.of(context).pushAndRemoveUntil(
MaterialPageRoute(builder: (_) => const UnsafeDevice()),
(route) => false, // Remove all previous routes
);
debugPrint('🚨 Navigated to UnsafeDevice page - Critical threat detected');
}
});
// await service.initialize();
//
// // Set up critical threat callback to navigate to unsafe device page
// service.setOnCriticalThreatCallback(() {
// final navigationService = locator.get<NavigationService>();
// final context = navigationService.navigatorKey.currentContext;
// if (context != null) {
// // Clear entire navigation stack and show unsafe device page
// Navigator.of(context).pushAndRemoveUntil(
// MaterialPageRoute(builder: (_) => const UnsafeDevice()),
// (route) => false, // Remove all previous routes
// );
// debugPrint('🚨 Navigated to UnsafeDevice page - Critical threat detected');
// }
// });
}
runApp(MyApp());
}

@ -189,13 +189,13 @@ class LabResultWidget extends StatelessWidget {
child: InkWell(
onTap: () async {
var labAccessNumber = patientLabResultList[index].LabAccessionNo;
if (patientLabResultList[index].FileNameWithExtensionList?.isEmpty == true || patientLabResultList[index].FileNameWithExtensionList?.length == 1) {
if (patientLabResultList[index].FileNameWithExtensionList?.isNotEmpty == true || patientLabResultList[index].FileNameWithExtensionList?.length == 1) {
await model.getLabAttachments(patient, labAccessNumber: labAccessNumber, FileName: patientLabResultList[index].FileNameWithExtensionList?.first);
model.openPDF();
return;
}
if (patientLabResultList[index].UploadedDocuments?.isEmpty == true || patientLabResultList[index].UploadedDocuments?.length == 1) {
if (patientLabResultList[index].UploadedDocuments?.isNotEmpty == true || patientLabResultList[index].UploadedDocuments?.length == 1) {
await model.getLabAttachments(patient, labAccessNumber: labAccessNumber, uploadedDocument: patientLabResultList[index].UploadedDocuments?.first);
model.openPDF();
return;

@ -1,11 +1,14 @@
import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/labs_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/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'laboratory_result_widget.dart';
@ -26,7 +29,8 @@ class _LaboratoryResultPageState extends State<LaboratoryResultPage> {
@override
Widget build(BuildContext context) {
return BaseView<LabsViewModel>(
onModelReady: (model) => model.getPatientLabResult(patientLabOrder: widget.patientLabOrders, patient: widget.patient, isInpatient: !widget.patientLabOrders.isInOutPatient!),
onModelReady: (model) =>
model.getPatientLabResult(Provider.of<ProjectViewModel>(context), patientLabOrder: widget.patientLabOrders, patient: widget.patient, isInpatient: !widget.patientLabOrders.isInOutPatient!),
builder: (_, model, w) => AppScaffold(
isShowAppBar: true,
appBar: PatientProfileAppBar(

@ -31,9 +31,9 @@ class _SplashScreenState extends State<SplashScreen> {
void initState() {
super.initState();
AppGlobal.CONTEX = context;
if (kReleaseMode) {
checkDeviceSafety();
}
// if (kReleaseMode) {
// checkDeviceSafety();
// }
Timer(Duration(seconds: 2, milliseconds: 500), () async {
if (isJailBroken || !isRealDevice || !isSafeDevice) {
// Critical threat detected - navigate to unsafe device page

Loading…
Cancel
Save