Are you referring to a Crystal Report that you would run by going to File>Reports and then running?
This is possible, I have a few in our environment that run this way. Athena calls these Component Reports, you shouldn't lose it during an upgrade.
You can backup the report file(s) before the upgrade to be safe though and you could always add back. Feel free to message me for more info, but here is an example to get you started. The below appears in the UPDATE QUERY for the Crystal Report in question.
?SELECTED_BILLING_VISITS.ITEMDATA.U? is the important part, it gets you a list of the selected tickets.
In my example we add some notes to our system to indicate that we mailed the patient a refund.
/* Add a billing note */
Insert Into BillingNote(BillingNotesId, NoteSubject, NoteText, PatientProfileID, IsActive, Created, CreatedBy, ModifiedDate, ModifiedBy)
Select Distinct dbo.Convert_Date_to_ID(GETDATE()) + 11,
'Refund Generated',
'Patient was mailed a refund see corr tab notes on tickets for details',
pp.PatientProfileId,
1,
GETDATE(),
'System',
GETDATE(),
'System'
From PatientVisit pv
INNER JOIN PatientProfile pp On pv.PatientProfileId = pp.PatientProfileId
Where pv.PatientVisitId IN (?SELECTED_BILLING_VISITIDS.ITEMDATA.U?)
/* Add a corr tab note */
Insert Into PatientCorrespondence(PatientVisitId, PatientProfileId, Source, UserId, Description, DescriptionLong, NextContactDate, Created, CreatedBy, LastModified, LastModifiedBy)
Select pv.PatientVisitId,
pp.PatientProfileId,
Null,
'System',
'**long**',
'Patient was mailed refund. Details shown below' + CHAR(13)+CHAR(10) +
'Guarantor Name: ' + ISNULL(g.First,'') + ' ' + ISNULL(g.Last,'') + CHAR(13)+CHAR(10) +
'Guarantor Address1: ' + ISNULL(g.Address1,'') + CHAR(13)+CHAR(10) +
'Guarantor Address2: ' + ISNULL(g.Address2,'') + CHAR(13)+CHAR(10) +
'Guarantor City: ' + ISNULL(g.City,'') + CHAR(13)+CHAR(10) +
'Guarantor State: ' + ISNULL(g.State,'') + CHAR(13)+CHAR(10) +
'Guarantor Zip: ' + ISNULL(g.Zip,'') + CHAR(13)+CHAR(10) +
'Refunded Amount: ' + CAST(ISNULL(pva.PatBalance,'') As Varchar),
Null,
GETDATE(),
'System',
GETDATE(),
'System'
From PatientVisit pv
INNER JOIN PatientProfile pp On pv.PatientProfileId = pp.PatientProfileId
INNER JOIN Guarantor g ON pp.GuarantorId = g.GuarantorId
INNER JOIN PatientVisitAgg pva ON pv.PatientVisitId = pva.PatientVisitId
Where pv.PatientVisitId IN (?SELECTED_BILLING_VISITIDS.ITEMDATA.U?)
Posted : May 3, 2023 5:35 am