Skip to content

Serialize imaging-import metadata into wire format

Serializes the populated property values on a clsImageImport instance into a newline-delimited KEY=value wire-format block for downstream imaging/xPresso consumption.

Field Value
Operation ID op-img-001-serialize-wire-format
Trigger Caller invokes clsImageImport.ToString()
Inputs Populated property values on the clsImageImport instance (claim, policy, agency/group, legal, task, imaging fields)
Outputs Newline-delimited (vbCrLf) KEY=value wire-format block
Primary components clsImageImport.ToString()
Entry point SAIF.Services.Imaging.Import/clsImageImport.vb

Steps

  1. Append fixed unconditional identifier/text fields (BATID, CLAIMID, CLAIMNUM, CommentText, CreateUser, DiscoveryFlag, DisplayField1..3) — BR-IMG-010.
  2. Emit DocumentDate (MM-dd-yyyy) only if strictly within (Date.MinValue, Date.MaxValue), else blank — BR-IMG-001.
  3. Emit DocumentDateDays only if greater than zero, else blank — BR-IMG-002.
  4. Append unconditional imaging classification fields (ImageFileCode, ImageCategoryCode, ImageDocumentTypeCode, ImageDeleteFlag, ImageIndexFlag). ImageFileCode and ImageIndexFlag receive non-empty defaults at construction per BR-IMG-008; ImageCategoryCode, ImageDocumentTypeCode, and ImageDeleteFlag default to empty and are populated by the caller, with ImageDocumentTypeCode values expected to come from the advisory-only vocabulary in BR-IMG-009. The full key set's presence and order is fixed per BR-IMG-010.
  5. Emit ImageSeqNum only if greater than zero, else blank — BR-IMG-003.
  6. Emit NPages only if greater than zero, else blank — BR-IMG-004.
  7. Emit PolicyNum only if greater than zero, else blank — BR-IMG-005.
  8. Emit ReceivedDate, using the same range rule as step 2 — BR-IMG-001.
  9. Append unconditional fields (SLevel, ImageDocumentNameCode, ExternalViewCode, SystemGeneratedFlag, AgencyID, ProducerID, GroupAssociationCode, Spec, TaskCategory) — BR-IMG-010.
  10. Emit TaskDate, using the same range rule as step 2 — BR-IMG-001.
  11. Append unconditional fields (TaskMailIDList, TaskPriority, TaskSecurity, TaskText, PolicyAccount, PolicySecuredFlag) — BR-IMG-010.
  12. Emit AffiliationId only if greater than zero, else blank — BR-IMG-006.
  13. Emit LegalCaseId only if greater than zero, else blank — BR-IMG-007.
  14. Append final unconditional legal fields (LegalCaseNum, LegalCopyToClaimFlag, LegalDistributionFlag) — BR-IMG-010.
  15. Return the accumulated StringBuilder content as the wire-format string.

Process flow

The following diagram visualizes this operation's control flow, with one decision node per conditional emission rule (BR-IMG-001 through BR-IMG-007) and unconditional field appends collapsed into single nodes between decisions.

flowchart TD
    Start(["Caller invokes<br>ToString()"]) --> A["Append fixed<br>identifier fields"]
    A --> B{"DocumentDate<br>in range?"}
    B -->|Yes| B1["Emit DocumentDate<br>MM-dd-yyyy"]
    B -->|No| B2["Emit DocumentDate<br>blank"]
    B1 --> C{"DocumentDateDays<br>> 0?"}
    B2 --> C
    C -->|Yes| C1["Emit<br>DocumentDateDays"]
    C -->|No| C2["Emit blank"]
    C1 --> D["Append imaging<br>classification fields"]
    C2 --> D
    D --> E{"ImageSeqNum<br>> 0?"}
    E -->|Yes| E1["Emit ImageSeqNum"]
    E -->|No| E2["Emit blank"]
    E1 --> F{"NPages<br>> 0?"}
    E2 --> F
    F -->|Yes| F1["Emit NPages"]
    F -->|No| F2["Emit blank"]
    F1 --> G{"PolicyNum<br>> 0?"}
    F2 --> G
    G -->|Yes| G1["Emit PolicyNum"]
    G -->|No| G2["Emit blank"]
    G1 --> H{"ReceivedDate<br>in range?"}
    G2 --> H
    H -->|Yes| H1["Emit ReceivedDate"]
    H -->|No| H2["Emit blank"]
    H1 --> I["Append SLevel..<br>TaskCategory fields"]
    H2 --> I
    I --> J{"TaskDate<br>in range?"}
    J -->|Yes| J1["Emit TaskDate"]
    J -->|No| J2["Emit blank"]
    J1 --> K["Append TaskMailIDList..<br>PolicySecuredFlag fields"]
    J2 --> K
    K --> L{"AffiliationId<br>> 0?"}
    L -->|Yes| L1["Emit AffiliationId"]
    L -->|No| L2["Emit blank"]
    L1 --> M{"LegalCaseId<br>> 0?"}
    L2 --> M
    M -->|Yes| M1["Emit LegalCaseId"]
    M -->|No| M2["Emit blank"]
    M1 --> N["Append final<br>legal fields"]
    M2 --> N
    N --> End(["Return wire-format<br>string"])

Failure and edge-case behavior

  • No try/catch blocks, validation, or null guards exist in ToString(); a Nothing-valued string property appends as empty text without raising an exception.
  • The fixed key set (BR-IMG-010) still emits values that fall outside the advisory-only OnBase vocabulary (BR-IMG-009) as-is, since assignment is never validated against those constants.
  • Callers must construct the instance via New clsImageImport to receive the BR-IMG-008 construction-time defaults before populating and serializing it.*

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • SAIF.Services.Imaging.Import/clsImageImport.vb