| Crates.io | tktax-medical |
| lib.rs | tktax-medical |
| version | 0.2.2 |
| created_at | 2025-02-01 05:06:03.118986+00 |
| updated_at | 2025-02-01 05:06:03.118986+00 |
| description | Medical and insurance expenditure line-item generation for tktax. |
| homepage | |
| repository | https://github.com/klebs6/tktax |
| max_upload_size | |
| id | 1538163 |
| size | 84,968 |
tktax-medical is a specialized sub-crate of the broader tktax ecosystem. It facilitates analysis and generation of medical- or insurance-related line items in the context of tax accounting. The library builds upon shared types from multiple tktax sub-crates to streamline the process of identifying, categorizing, and reporting health expenditures.
Key features include:
predict_category (from tktax_3p) to inspect and categorize transaction descriptions.LineItem<TxCat> for generating consistent, domain-specific records.GetMedicalAndInsuranceExpenditures trait can be implemented for any Account, providing a clear, extensible API.Add as a Dependency
[dependencies]
tktax-medical = { git = "https://github.com/klebs6/tktax", path = "tktax-medical" }
# Also ensure dependencies on other tktax crates as needed
Import and Use Within Your Code
use tktax_medical::GetMedicalAndInsuranceExpenditures;
use tktax_account::Account; // Provided by tktax_account
use tktax_transaction_category::CategoryMap; // Provided by tktax_transaction_category
fn main() {
// Assume you have a valid Account instance and a category_map
let my_account = Account::new(/* ... */);
let my_category_map = CategoryMap::new(/* ... */);
let medical_items = my_account.medical_and_insurance_expenditures(&my_category_map);
for item in medical_items {
println!("Detected medical expense: {}", item);
}
}
Integrate With Other tktax Tools
This crate synergizes seamlessly with other tktax sub-crates to produce comprehensive tax reporting. For instance, you can feed the generated medical line-items into further processing pipelines, aggregated reports, or specialized data export functions.
MedicalExpense<'a, TxCat> Struct
TransactionCategory trait.Transaction, representing the underlying financial record.LineItem<TxCat> Implementation
LineItem<TxCat> trait, providing standardized methods for quantity retrieval, pricing, and referencing the transaction.GetMedicalAndInsuranceExpenditures Trait
Account to discover and capture medical or insurance transactions automatically.Sorting and Formatting
fmt::Display is implemented for user-facing display.No unwrap or expect
Contributions are welcome! Please open issues or submit pull requests on GitHub. Make sure to follow the general tktax repository coding guidelines and style conventions.
Licensed under the MIT License.
Enjoy efficient and streamlined handling of health-related financial transactions with tktax-medical.