Various referral conditions can now be applied to invoices built from Billing wizard. Trigger APIs are now available for referrals.
1. In order to access API triggers, please go to the administration
2. Select Data Model on the left side
3. There are key data set keyboards that have been updated: find_referral and build_invoice
4. patient_find_referral:
This trigger can be applied in billing wizards for overriding different referral conditions.
Eg: IF the event's service location is Inpatient treatment AND there is a non-expired referral AND the referral is addressed to the relevant provider THEN invoice under that referral.
The referral trigger can be added for the above condition as ;
if ((referral = assessment.patient.find_referral({ provider: svc.medical_provider.provider })))
{
options.referral = referral
}