Nevermind, found it...
Something like this worked for me:
def get_main_account(self, ot):
return self.config['main_account'].format(claim_type=ot.Claim_Type)

This was a great exercise!
Thank you

On Thu, Jan 22, 2026 at 9:21 PM Stefano Mihai Canta <[email protected]>
wrote:

> I can replace the variables for the custom postings, but what about the
> main account?
>
> On Thu, Jan 22, 2026 at 9:05 PM Stefano Mihai Canta <
> [email protected]> wrote:
>
>> Thank you!
>> Yesterday I spent some time creating something much simpler by just
>> overriding `extract` from beangulp, but your framework is more powerful. I
>> see the banking importer allows multiple postings by overriding the
>> `add_custom_postings` method, but does it allow for variable substitutions
>> similarly to the `investment` importer?
>>
>> I'd like to use this config for my importer and I'd like to replace
>> claim_type and claim_number at runtime.
>> anthem_eob.Importer({
>> 'filing_account' : 'Expenses:Medical',
>> "currency": "USD",
>> "main_account": "Expenses:Personal:Non-Retirement:{claim_type}:Claim",
>> "Plan Discount": "Expenses:Personal:Non-Retirement:{claim_type}
>> :InsDiscount",
>> "Plan Paid": "Expenses:Personal:Non-Retirement:{claim_type}:InsPayment",
>> "Your Cost": "Liabilities:Personal:Accounts-Payable:Medical:
>> {claim_number}",
>> "Deductible": "Equity:Personal:Limits:Medical-Insurance:Deductible",
>> "Coinsurance": "Equity:Personal:Limits:Medical-Insurance:Coinsurance",
>> "balancing": "Equity:Personal:Limits:Balancing"
>> }),
>>
>>
>> On Thu, Jan 22, 2026 at 12:57 AM [email protected] <[email protected]>
>> wrote:
>>
>>> Just checked in a couple here
>>> <https://github.com/redstreet/beancount_reds_importers/commit/2ca08959c919e64ea2a94bb8a8558edbe7b4e10c>.
>>> They import csv reports of EOBs, not EOBs directly.
>>>
>>> There’s also this article
>>> <https://reds-rants.netlify.app/personal-finance/double-entry-bookkeeping-for-us-healthcare/>
>>> (“Double-Entry Bookkeeping for US Healthcare”) if it helps.
>>> ​
>>>
>>> On Wednesday, January 21, 2026 at 8:28:19 AM UTC-8 [email protected]
>>> wrote:
>>>
>>> Does anyone have an EOB importer they can share? Something that can work
>>> with reds importers.
>>>
>>> Thank you!
>>> Stefano
>>>
>>>
>>>
>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Beancount" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To view this discussion visit
>>> https://groups.google.com/d/msgid/beancount/d792d7d3-c5dd-42dd-8999-f1aed5b8b737n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/beancount/d792d7d3-c5dd-42dd-8999-f1aed5b8b737n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/beancount/CAMzm8_ru-MKeQvM9pQ3cgwmrNYzE6nn9vroE%2B89OO2hnoYBW1g%40mail.gmail.com.

Reply via email to