Last active
May 26, 2020 16:15
-
-
Save Kvit/c5f42003f515649187cf11b9272f1e22 to your computer and use it in GitHub Desktop.
Pseudo Billing Rules
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| global.ruleArea = ORDER | |
| // basic rules | |
| if (orderPayer == INSURANCE_PAYER ) { billTo = PRIMARY_INSURANCE; priceList = PRICE_INSURANCE } | |
| if (orderPayer == CLIENT) { billTo = CLIENT , priceList = LookupPriceList (CLIENT) } | |
| if (orderPayer == PATIENT) { billTo = PATIENT , priceList = PRICE_SELF_PAY } | |
| if (orderPayer == null) stop (404, "Payer Not Found", @biller) | |
| // client rules | |
| if (orderClient $in [...] ) billTo = CLIENT | |
| // client - payer rules | |
| if (orderClient $in [MDL,...] and orderPayer $in [BCBS] ) billTo = CLIENT | |
| if (orderClient $in [...] and orderPayer $in [Medicare, Medicaid] ) billTo = PRIMARY_INSURANCE | |
| // client - line of busness - payer | |
| if (orderClient $in [...] and orderTest $not $in [CYTO, PATH,...] ) stop (402, "Contract / Price Not Found") | |
| if (orderClient $in [...] and orderTest $in [PATH,...] and orderPayer $in [BCBS] ) billTo = CLIENT | |
| // etc.. more scope conditions |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment