|
|
|
|
@ -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) {
|
|
|
|
|
|