|
|
|
|
@ -189,24 +189,25 @@ class LabResultWidget extends StatelessWidget {
|
|
|
|
|
child: InkWell(
|
|
|
|
|
onTap: () async {
|
|
|
|
|
var labAccessNumber = patientLabResultList[index].LabAccessionNo;
|
|
|
|
|
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?.isNotEmpty == true || patientLabResultList[index].UploadedDocuments?.length == 1) {
|
|
|
|
|
await model.getLabAttachments(patient, labAccessNumber: labAccessNumber, uploadedDocument: patientLabResultList[index].UploadedDocuments?.first);
|
|
|
|
|
model.openPDF();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// 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?.isNotEmpty == true || patientLabResultList[index].UploadedDocuments?.length == 1) {
|
|
|
|
|
// await model.getLabAttachments(patient, labAccessNumber: labAccessNumber, uploadedDocument: patientLabResultList[index].UploadedDocuments?.first);
|
|
|
|
|
// model.openPDF();
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
showUploadedDocumentsBottomSheet(
|
|
|
|
|
context,
|
|
|
|
|
documents: patientLabResultList[index].UploadedDocuments,
|
|
|
|
|
fileName: patientLabResultList[index].FileNameWithExtensionList,
|
|
|
|
|
labAccessNumber: labAccessNumber,
|
|
|
|
|
);
|
|
|
|
|
projectID: int.parse(patientLabResultList[index].projectID!),
|
|
|
|
|
setupID: patientLabResultList[index].setupID);
|
|
|
|
|
},
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
@ -360,6 +361,8 @@ class LabResultWidget extends StatelessWidget {
|
|
|
|
|
List<UploadedDocument>? documents,
|
|
|
|
|
List<String>? fileName,
|
|
|
|
|
String? labAccessNumber,
|
|
|
|
|
int? projectID,
|
|
|
|
|
String? setupID,
|
|
|
|
|
}) {
|
|
|
|
|
const double kItemHeight = 66.0; // ListTile with contentPadding: 10
|
|
|
|
|
final double screenHeight = MediaQuery.of(context).size.height;
|
|
|
|
|
@ -439,11 +442,11 @@ class LabResultWidget extends StatelessWidget {
|
|
|
|
|
onTap: () async {
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
if (documents?.isNotEmpty == true) {
|
|
|
|
|
await model.getLabAttachments(patient, uploadedDocument: documents![index]);
|
|
|
|
|
await model.getLabAttachments(patient, uploadedDocument: documents![index], projectID: projectID, setupID: setupID);
|
|
|
|
|
model.openPDF();
|
|
|
|
|
}
|
|
|
|
|
if (fileName?.isNotEmpty == true) {
|
|
|
|
|
await model.getLabAttachments(patient, labAccessNumber: labAccessNumber, FileName: fileName![index]);
|
|
|
|
|
await model.getLabAttachments(patient, labAccessNumber: labAccessNumber, FileName: fileName![index], projectID: projectID, setupID: setupID);
|
|
|
|
|
model.openPDF();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|