Skip to content

Serialize import metadata to key-value text

This operation builds the KEY=VALUE\r\n-delimited text payload that a calling library (e.g. SAIF.Services.Printing) delivers to the external imaging system (presumed OnBase, inferred from constant naming*), by appending one line per public property of a populated clsImageImport instance.

Field Value
Operation ID OP-IMG-001
Trigger Caller calls .ToString() on a populated clsImageImport instance
Inputs All public property values of the clsImageImport instance
Outputs A single String containing KEY=VALUE lines separated by vbCrLf
Primary components clsImageImport.ToString
Entry point SAIF.Services.Imaging.Import\clsImageImport.vb

Steps

  1. Append BATID, CLAIMID, CLAIMNUM lines unconditionally from BatID/ClaimID/ClaimNum.
  2. Append CommentText, CreateUser, DiscoveryFlag, DisplayField1/2/3 lines unconditionally.
  3. Append the DocumentDate line (BR-IMG-001).
  4. If DocumentDate equals Date.MinValue or Date.MaxValue (unset sentinel): emit a blank value instead of a formatted date.
  5. Append the DocumentDateDays line (BR-IMG-002).
  6. If DocumentDateDays is not greater than 0: emit a blank value.
  7. Append ImageFileCode, ImageCategoryCode, ImageDocumentTypeCode, ImageDeleteFlag, ImageIndexFlag lines unconditionally.
  8. Append the ImageSeqNum line (BR-IMG-002).
  9. If ImageSeqNum is not greater than 0: emit a blank value.
  10. Append the NPages line (BR-IMG-002).
  11. If NPages is not greater than 0: emit a blank value.
  12. Append the PolicyNum line (BR-IMG-002).
  13. If PolicyNum is not greater than 0: emit a blank value.
  14. Append the ReceivedDate line (BR-IMG-001).
  15. If ReceivedDate equals Date.MinValue or Date.MaxValue (unset sentinel): emit a blank value.
  16. Append SLevel, ImageDocumentNameCode, ExternalViewCode, SystemGeneratedFlag, AgencyID, ProducerID, GroupAssociationCode, Spec lines unconditionally.
  17. Append the TaskCategory line unconditionally.
  18. Append the TaskDate line (BR-IMG-001).
    • If TaskDate equals Date.MinValue or Date.MaxValue (unset sentinel): emit a blank value.
  19. Append TaskMailIDList, TaskPriority, TaskSecurity, TaskText, PolicyAccount, PolicySecuredFlag lines unconditionally.
  20. Append the AffiliationId line (BR-IMG-002).
    • If AffiliationId is not greater than 0: emit a blank value.
  21. Append the LegalCaseId line (BR-IMG-002).
    • If LegalCaseId is not greater than 0: emit a blank value.
  22. Append LegalCaseNum, LegalCopyToClaimFlag, LegalDistributionFlag lines unconditionally.
  23. Return the fully-built string to the caller, who is responsible for delivering it to the external imaging system.*

This operation performs no delegation into any referenced library — it is a pure in-memory string-building routine over the instance's own properties.

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Start([ToString invoked]) --> S1[Append identity/claim/policy fields]
    S1 --> S2{Date field at<br>sentinel value?}
    S2 -->|Yes| S2a[Emit blank value]
    S2 -->|No| S2b[Emit formatted date]
    S2a --> S3
    S2b --> S3[Append remaining fields]
    S3 --> S4{Numeric field<br>not greater than 0?}
    S4 -->|Yes| S4a[Emit blank value]
    S4 -->|No| S4b[Emit numeric value]
    S4a --> S5
    S4b --> S5[Append legal-case fields]
    S5 --> Done([Return KEY=VALUE text payload])

Failure and edge-case behavior

  • Unset date properties (DocumentDate, ReceivedDate, TaskDate at Date.MinValue/Date.MaxValue) never raise an exception — they are blanked per BR-IMG-001.
  • Unassigned numeric identifiers/counts (DocumentDateDays, ImageSeqNum, NPages, PolicyNum, AffiliationId, LegalCaseId at 0 or negative) never raise an exception — they are blanked per BR-IMG-002.
  • No other validation exists; string/flag properties (e.g., ClaimID, AgencyID, ProducerID) are emitted as-is even if left at their default (empty) values.*

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.

Sources

  • SAIF.Services.Imaging.Import\clsImageImport.vb
  • .saifdocgen\state\runs\20260821-113120-claims-bof-web-legal\analysis\TSK010-analysis.md