CR 6204 Lab reports enhancements in progress

Dev_3.3_MedicalReportCR
haroon amjad 2 years ago
parent df610690d5
commit 34d3cf2945

@ -25,34 +25,36 @@ class RequestSendLabReportEmail {
String invoiceNo;
String orderDate;
String orderNo;
bool isDownload;
RequestSendLabReportEmail(
{this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID,
this.patientID,
this.tokenID,
this.patientTypeID,
this.patientType,
this.to,
this.dateofBirth,
this.patientIditificationNum,
this.patientMobileNumber,
this.patientName,
this.setupID,
this.projectName,
this.clinicName,
this.doctorName,
this.projectID,
this.invoiceNo,
this.orderDate,
this.orderNo});
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID,
this.patientID,
this.tokenID,
this.patientTypeID,
this.patientType,
this.to,
this.dateofBirth,
this.patientIditificationNum,
this.patientMobileNumber,
this.patientName,
this.setupID,
this.projectName,
this.clinicName,
this.doctorName,
this.projectID,
this.invoiceNo,
this.orderDate,
this.orderNo,
this.isDownload});
RequestSendLabReportEmail.fromJson(Map<String, dynamic> json) {
versionID = json['VersionID'];
@ -81,6 +83,7 @@ class RequestSendLabReportEmail {
invoiceNo = json['InvoiceNo'];
orderDate = json['OrderDate'];
orderNo = json['OrderNo'];
isDownload = json['IsDownload'];
}
Map<String, dynamic> toJson() {
@ -111,6 +114,7 @@ class RequestSendLabReportEmail {
data['InvoiceNo'] = this.invoiceNo;
data['OrderDate'] = this.orderDate;
data['OrderNo'] = this.orderNo;
data['IsDownload'] = this.isDownload;
return data;
}
}

@ -194,7 +194,7 @@ class LabsService extends BaseService {
RequestSendLabReportEmail _requestSendLabReportEmail = RequestSendLabReportEmail();
Future sendLabReportEmail({PatientLabOrders patientLabOrder, AuthenticatedUser userObj}) async {
Future sendLabReportEmail({PatientLabOrders patientLabOrder, AuthenticatedUser userObj, bool isDownload = false}) async {
_requestSendLabReportEmail.projectID = patientLabOrder.projectID;
_requestSendLabReportEmail.invoiceNo = patientLabOrder.invoiceNo;
_requestSendLabReportEmail.doctorName = patientLabOrder.doctorName;
@ -208,6 +208,7 @@ class LabsService extends BaseService {
_requestSendLabReportEmail.projectName = patientLabOrder.projectName;
_requestSendLabReportEmail.setupID = patientLabOrder.setupID;
_requestSendLabReportEmail.orderNo = patientLabOrder.orderNo;
_requestSendLabReportEmail.isDownload = isDownload;
await baseAppClient.post(SEND_LAB_RESULT_EMAIL, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) {
hasError = true;

@ -135,7 +135,7 @@ class LabsViewModel extends BaseViewModel {
}
}
sendLabReportEmail({PatientLabOrders patientLabOrder, String mes, AuthenticatedUser userObj}) async {
sendLabReportEmail({PatientLabOrders patientLabOrder, String mes, AuthenticatedUser userObj, bool isDownload = false}) async {
await _labsService.sendLabReportEmail(patientLabOrder: patientLabOrder, userObj: userObj);
if (_labsService.hasError) {
error = _labsService.error;

@ -73,7 +73,11 @@ class _LaboratoryResultPageState extends State<LaboratoryResultPage> {
width: MediaQuery.of(context).size.width * 0.9,
child: DefaultButton(
TranslationBase.of(context).downloadReport,
() => {},
() async {
GifLoaderDialogUtils.showMyDialog(context);
await model.sendLabReportEmail(patientLabOrder: widget.patientLabOrders, mes: TranslationBase.of(context).sendSuc, userObj: projectViewModel.user, isDownload: true);
GifLoaderDialogUtils.hideDialog(context);
},
textColor: Colors.white,
),
),

Loading…
Cancel
Save