DocD.Handlers 2.0.2

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package DocD.Handlers --version 2.0.2
                    
NuGet\Install-Package DocD.Handlers -Version 2.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DocD.Handlers" Version="2.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DocD.Handlers" Version="2.0.2" />
                    
Directory.Packages.props
<PackageReference Include="DocD.Handlers" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DocD.Handlers --version 2.0.2
                    
#r "nuget: DocD.Handlers, 2.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package DocD.Handlers@2.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DocD.Handlers&version=2.0.2
                    
Install as a Cake Addin
#tool nuget:?package=DocD.Handlers&version=2.0.2
                    
Install as a Cake Tool

DocD.Handlers

A .NET 8 library for processing and generating various document types including insurance denials, settlement releases, and letters using Microsoft Word templates.

Overview

DocD.Handlers provides a comprehensive set of document processing capabilities for insurance-related documents. The library uses the FreeSpire.Office suite to manipulate Word documents and supports mail merge operations, template processing, and automated document generation.

Features

  • Document Type Support:

    • Insurance denial letters (insured and claimant)
    • Settlement release documents
    • Standard business letters
  • Template Processing:

    • Word template loading and processing
    • Mail merge field handling
    • Dynamic content insertion
    • Bookmark-based content replacement
  • Advanced Features:

    • Automatic signature block insertion
    • Address formatting and insertion
    • Settlement amount conversion to written form
    • Class code integration
    • Exclusions and definitions management
    • Additional insured party handling
  • Formatting:

    • Consistent Calibri 11pt font application
    • Table formatting support
    • Custom signature styling (Brush Script MT)

Installation

dotnet add package DocD.Handlers

Dependencies

  • .NET 8.0
  • FreeSpire.Office 8.2.0
  • Humanizer 2.14.1
  • Newtonsoft.Json 13.0.3
  • System.Text.Json 9.0.8
  • System.Security.Cryptography packages

Usage

Basic Document Generation

using DocD.Handlers.DocumentHandlers;
using DocD.Handlers.Dtos;
using DocD.Handlers.Models;
using Spire.Doc;

// Create a new document instance
var document = new Document();

// Create user information
var user = new User
{
    EmployeeName = "John Doe",
    JobTitle = "Claims Adjuster",
    Email = "john.doe@company.com",
    PhoneNumber = "555-123-4567"
};

// Create template information
var template = new TemplateStoreDto
{
    Filename = "path/to/template.docx",
    Title = "Standard Letter Template"
};

Generating a Standard Letter

var letterData = new LetterDataDto
{
    ClaimNumber = "CLM-2024-001",
    MergeFieldProperties = new List<MergeFieldProperty>
    {
        new() { FieldName = "CompanyName", FieldValue = "ABC Insurance" },
        new() { FieldName = "Date", FieldValue = DateTime.Now.ToString("MMMM dd, yyyy") }
    },
    MailToAddress = "123 Main St\nAnytown, ST 12345",
    CcAddress = "456 Oak Ave\nOther City, ST 67890"
};

var generatedDocument = document.BuildStandardLetter(letterData, template, user);

Generating a Denial Letter

var denialData = new DenialDataDto
{
    MergeFieldProperties = new List<MergeFieldProperty>
    {
        new() { FieldName = "Insured Insurance Carrier_Gen", FieldValue = "" },
        new() { FieldName = "Carrier Initials_Gen", FieldValue = "FWCI" },
        new() { FieldName = "PolicyNumber", FieldValue = "POL-123456" }
    },
    InsuredAddress = "789 Business Blvd\nBusiness City, ST 11111",
    ClaimantAddress = "321 Residential Dr\nHome Town, ST 22222",
    IsSubContractorInvolved = false
};

var definitions = new List<Definition>();
var exclusions = new List<Exclusions>();
var classCodes = "[]"; // JSON string of class codes

var denialDocument = document.BuildInsuredDenialLetterAsync(
    denialData, template, user, definitions, exclusions, classCodes);

Generating a Release Document

var releaseData = new ReleaseDataDto
{
    MergeFieldProperties = new List<MergeFieldProperty>
    {
        new() { FieldName = "Settlement Amount", FieldValue = "5000.00" },
        new() { FieldName = "ClaimantName", FieldValue = "Jane Smith" },
        new() { FieldName = "_AdditionalParty1", FieldValue = "Party Name" }
    }
};

var releaseDocument = document.BuildRelease(releaseData, template, user);

Key Components

Document Extensions

  • DenialExtensions: Handles insurance denial letter generation with support for exclusions, definitions, and class codes
  • ReleaseExtensions: Processes settlement release documents with automatic settlement amount conversion
  • LetterExtensions: Manages standard business letter creation with signature blocks and address formatting

Data Models

  • DocumentDataBase: Base class for all document data
  • User: User information for signatures and contact details
  • MergeFieldProperty: Key-value pairs for mail merge operations
  • TemplateStoreDto: Template file information and metadata

Special Features

Settlement Amount Processing

The library automatically converts numeric settlement amounts to written form:

  • 5000.00 becomes Five Thousand and 00/100 Dollars
Additional Insured Handling

Merge fields starting with underscore (_) are automatically processed as additional insured parties and combined into a single field.

Signature Integration

Documents support both signature blocks (contact information) and signature lines (styled employee names).

Template Requirements

Templates should be Microsoft Word documents (.docx) with:

  • Mail merge fields in the format <<FieldName>>
  • Bookmarks for special content areas:
    • [SignatureBlock] - For employee contact information
    • [Signature] - For styled signature
    • [Address] - For recipient address
    • [ccAddress] - For CC address
    • Definitions - For definition insertions
    • Exclusions - For exclusion content
    • FriendlyNames - For simplified exclusion descriptions
    • ClassCodes - For class code listings

License

This software is licensed under a custom license agreement. See the included LICENSE.md file for complete terms and conditions.

Author

Timothy Jones
Copyright � 2025 Tim Jones. All rights reserved.

Version

Current version: 1.0.8

What's New (1.0.8)

  • Documentation updates and clarifications for template bookmarks and merge-field usage.
  • Minor wording fixes in README and USAGE.md.
  • No API or breaking changes; fully compatible with .NET 8.

Support

This package is designed for internal business use and includes functionality specific to insurance document processing workflows.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated