Skip to content

clsLetterRequest

clsLetterRequest wraps one LetterRequest record retrieved from the Legal API, enriches it with worker, attorney, policy, and print-tracking data, and exposes the formatted merge fields used to generate legal correspondence. It also builds the <Documents> XML payload consumed by the print flow, including an alternate-recipient document when the worker has attorney information.

Purpose

  • Represent one persisted legal letter request together with its request key, related legal-case key, print dates, claimant, copy count, and letter-type code.
  • Consolidate the worker, employer/policy, adjuster, and attorney values that letter templates read during print generation.
  • Generate the XML document package used by the print pipeline for the main recipient and, when appropriate, the worker's attorney copy.

Context

  • Namespace: SAIF.Business.Claim.Legal
  • Assembly/package: SAIF.Business.Claim.Legal

Public members

Member Kind Type/return type Purpose
LetterTypeEnum Enum RREQ, MAIL, RMAIL, DEFLT, RDISC, POLCY Enumerates the letter-type codes that drive post-fill enrichment and print behavior.
DOCUMENTDESC Read-only property String Supplies the banner document-description field in generated document XML; the current implementation returns an empty string.
INSTRUCTIONS Read-only property String Supplies the banner instruction field in generated document XML; the current implementation returns an empty string.
XDOCUMENT_SEQ_NUM Read-only property String Returns the literal xDocument sequence token XDOCUMENTSEQNUM for template/report consumers.
XDOCUMENT_PRINT_GROUP Read-only property String Returns the print-group name Lgl_Print_Labels used for document output.
HoldDate Read-only property String Formats the request's hold date as a short date string for letter output.
LegalCaseSeqNum Read-only property Decimal Identifies the legal case associated with this letter request.
LetterRequestSeqNum Read-only property Decimal Identifies this persisted letter request record.
LetterTypeCode Read-only property String Carries the raw letter-type code received from the source record.
PrintedDate Read-only property String Formats the saved printed date as MMMM d, yyyy for merge output.
PrintedDateSave Write-only property Date Accepts the print date to persist back to the request record and marks the object dirty when the value changes.
Claimant Read-only property String Returns the claimant name stored on the letter request.
NumCopies Read-only property Decimal Returns how many copies the print request asks the pipeline to produce.
DefaultPrinter Read-only property String Returns the request's configured default printer name.
IsDefaultPrinterEmpty Read-only property Boolean Indicates whether the request currently has a default printer value.
LetterType Read-only property LetterTypeEnum Exposes the parsed enum form of LetterTypeCode so later logic can branch on supported letter categories.
SaifClaimNum Read-only property String Returns the SAIF claim number loaded during post-fill worker-data retrieval.
PolicyNum Read-only property String Returns the policy number associated with the claim.
PrimaryTaxId Read-only property String Returns the worker's primary tax ID from the worker-info lookup.
WorkerName Read-only property String Returns the worker name formatted for correspondence.
InjuryDate Read-only property String Formats the injury date as MM/dd/yyyy.
InjuryDateText Read-only property String Formats the injury date as MMMM d, yyyy for narrative letter text.
RequestedDate Read-only property String Formats the letter request date for merge output.
LCEDueDate Read-only property String Exposes the cached LCE due-date value for templates.
LegalIssues Read-only property String Exposes the cached legal-issues text slot for templates.
HearingDate Read-only property String Formats the cached hearing date when one has been loaded; otherwise returns an empty string.
HearingTime Read-only property String Exposes the cached hearing-time text slot for templates.
HearingLocation Read-only property String Exposes the cached hearing-location text slot for templates.
HearingLocationName Read-only property String Exposes the cached hearing-location name slot for templates.
ALJ Read-only property String Exposes the cached ALJ name slot for templates.
WCBNum Read-only property String Returns the WCB number loaded from worker-info data.
WCDClaimNum Read-only property String Returns the WCD claim number loaded from worker-info data.
OutputFilePath Read-only property String Resolves and caches the configured xPression output folder, ensuring the path ends with \.
PostmarkDate Read-only property String Formats the postmark date for merge output.
PostmarkDateText Read-only property String Formats the postmark date as long-form text when a postmark date is present.
OarDueDateText Read-only property String Formats the OAR due date as long-form text when a due date is present.
OarDueDate Read-only property String Formats the OAR due date for merge output.
HandicapWorkerReserveFlag Read-only property String Returns the handicap-worker-reserve indicator loaded from worker-info data.
PTD Read-only property String Returns the PTD indicator/value loaded from worker-info data.
AdjusterMailid Read-only property String Returns the assigned adjuster's mail ID.
RequestedBy Read-only property String Returns the requestor identifier/name captured with the worker-info payload.
AdjusterName Read-only property String Returns the assigned adjuster name formatted for correspondence.
AdjusterPhone Read-only property String Returns the assigned adjuster phone number.
ReconDateText Read-only property String Returns the reconciliation date text loaded for template use.
OarMailDateText Read-only property String Returns the OAR mailing-date text loaded for template use.
ReconRecDateText Read-only property String Returns the reconciliation-received date text cached for template use.
SaifAttorneyEmployee Read-only property clsEmployeeData Lazily loads the default managing-attorney employee record from configuration so author/signature details can be written into document XML.
StateEntityFlag Read-only property String Returns the state-entity indicator loaded from worker-info data.
SAIFAttorney Read-only property String Returns the SAIF attorney signature block assembled during post-fill processing.
SAIFAttorneyPhone Read-only property String Returns the formatted SAIF attorney phone line used in the signature block.
SAIFAttorneyFax Read-only property String Returns the formatted SAIF attorney fax line used in the signature block.
WorkerAttorney Read-only property String Returns the display name used for the worker-attorney recipient, with fallback to firm name or worker name when needed.
WorkerAttorneyName Read-only property String Returns the attorney name captured from the worker-attorney lookup before fallback formatting is applied.
WorkerHasAttorney Read-only property Boolean Indicates whether attorney-name data was loaded, which controls whether alternate-recipient XML is emitted.
WorkerAttorneyFirm Read-only property String Returns the worker attorney's firm name.
WorkerAttorneyAddress Read-only property String Returns the formatted mailing address for the worker attorney.
WorkerAttorneyPhone Read-only property String Returns the worker attorney phone number from the loaded address object.
PolicyAddress Read-only property String Returns the formatted mailing address for the policy/employer recipient.
PolicyPhone Read-only property String Returns the policy/employer phone number from the loaded mailing address.
PolicyName Read-only property String Returns the addressee/display name stored on the loaded policy mailing address.
PolicyLegalName Read-only property String Returns the employer's legal name loaded from policy data.
PolicyDBAName Read-only property String Returns the employer's DBA name loaded from policy data.
PolicyShortName Read-only property String Chooses the shortened employer name used in letter output, preferring DBA text unless the legal name is STATE OF OREGON, and truncates the result to 20 characters.
PolicyAddressHeader Read-only property String Builds the uppercase policy-address header block from legal name, optional DBA name, and mailing address.
WorkerAttorneyAddressHeader Read-only property String Builds the uppercase worker-attorney header block from firm name and mailing address.
IsValid Override read-only property Boolean Returns the framework validation state for this business object.
IsDirty Override read-only property Boolean Returns whether this business object has unsaved changes.
BeforeRetrieve(inPortalRequest) Protected override method Sub Retrieves the request DTOs for the current LetterRequestSeqNum before the framework materializes the object.
AfterRetrieve(inPortalRequest) Protected override method IBusinessObject Copies retrieved DTO data into this object, runs PostFill, marks the object old, and returns the populated instance.
BeforeUpdate(inPortalRequest) Protected override method Sub Pushes the current printed date back to the Legal API before the framework save completes.
AfterUpdate(inPortalRequest) Protected override method Sub Provides the post-update lifecycle hook; this implementation performs no additional work.
GetLegalCaseNumber() Method String Queries LEGAL.vw_cases for the case number associated with this request's legal-case sequence.
Equals(objA, objB) Shared method Boolean Compares two objects as clsLetterRequest instances using this type's request-sequence equality logic.
Equals(inObject As Object) Override method Boolean Implements object-based equality by delegating to the typed clsLetterRequest comparison.
Equals(inObject As clsLetterRequest) Method Boolean Treats two letter requests as equal when their LetterRequestSeqNum values match.
GetHashCode() Override method Integer Returns a hash code derived from LetterRequestSeqNum.
ToString() Override method String Returns the request sequence number as the object's string representation.
PostFill() Method Sub Enriches the retrieved request with worker data for all letters and conditionally loads worker-attorney, SAIF-attorney, policy, and print-date values based on LetterType.
GetReportXmlNewFormat(packageName, hasEnclosure, letterNumber) Method String Builds the <Documents> XML payload for batch printing, adding an alternate-recipient document when WorkerHasAttorney is true.
Load(inDataPortalInfo, inLetterRequest) Protected Friend method Sub Copies values from a retrieved LetterRequest DTO into the business object, attaches criteria, and marks the instance old.
New() Protected Friend constructor — Initializes a new instance and registers business rules.
New(inDataPortalInfo) Protected Friend constructor — Initializes a new instance for a specific data-portal context and registers business rules.
GetLetterRequest(inDataportal, inLetterRequestSeqNum) Shared method clsLetterRequest Retrieves one letter request by sequence number through the framework data portal.
AddBusinessRules() Protected override method Sub Provides the business-rule registration hook; this implementation adds no explicit rules.

Sources

  • SAIF.Business.Claim.Legal\Print\clsLetterRequest.vb