Serialize import metadata¶
This operation converts a populated clsImageImport data-transfer object into the fixed-order, newline-delimited KEY=VALUE string contract that downstream consumers (such as SAIF.Services.Printing) send onward as an outbound imaging request payload. It is the only operation this library implements.
| Field | Value |
|---|---|
| Operation ID | OP-SII-01 |
| Trigger | A caller (e.g. clsPrint.ImportInfo) invokes ToString() on a populated clsImageImport instance |
| Inputs | A populated clsImageImport instance — string, numeric, and date properties such as BatID, ClaimID, ClaimNum, CommentText, ImageFileCode, DocumentDate, DocumentDateDays, NPages, PolicyNum, AffiliationId, LegalCaseId, and related task/imaging fields |
| Outputs | A single newline-delimited (vbCrLf-separated) string of KEY=VALUE lines, one per property, in fixed declaration order |
| Primary components | clsImageImport.ToString |
| Entry point | Services\SAIF.Services.Imaging.Import\clsImageImport.vb |
Steps¶
- Create a new
Text.StringBuilderto accumulate the output. - Append fixed-order lines for string-backed fields —
BATID,CLAIMID,CLAIMNUM,CommentText,CreateUser,DiscoveryFlag,DisplayField1–DisplayField3,ImageFileCode,ImageCategoryCode,ImageDocumentTypeCode,ImageDeleteFlag,ImageIndexFlag,ImageDocumentNameCode,ExternalViewCode,SystemGeneratedFlag,AgencyID,ProducerID,GroupAssociationCode,Spec,TaskCategory,TaskMailIDList,TaskPriority,TaskSecurity,TaskText,PolicyAccount,PolicySecuredFlag,LegalCaseNum,LegalCopyToClaimFlag, andLegalDistributionFlag— appending each property's raw value with no blank-suppression logic. - For
DocumentDate,ReceivedDate, andTaskDate, emit the value formatted asMM-dd-yyyyonly when the value is strictly betweenDate.MinValueandDate.MaxValue; otherwise emit the key with a blank value (BR-002). - If the date is at either sentinel bound: append the key with an empty value instead of a formatted date.
- For
DocumentDateDays,ImageSeqNum,NPages,PolicyNum,AffiliationId, andLegalCaseId, emit the numeric value only when it is greater than zero; otherwise emit the key with a blank value (BR-001). - If the numeric value is zero or negative: append the key with an empty value instead of the number.
- Return the completed string via
Result.ToString.
Process flow¶
The following diagram visualizes the serialization control flow, including the two conditional formatting branches applied while building the output.
flowchart TD
Start([Caller invokes ToString]) --> Build[Create StringBuilder]
Build --> AppendStrings[Append fixed-order string fields]
AppendStrings --> Dates{Date between<br>MinValue and MaxValue?}
Dates -->|Yes| FormatDates[Append MM-dd-yyyy]
Dates -->|No| BlankDates[Append blank date value]
FormatDates --> Numbers{Numeric value greater than 0?}
BlankDates --> Numbers
Numbers -->|Yes| AppendNumbers[Append numeric value]
Numbers -->|No| BlankNumbers[Append blank numeric value]
AppendNumbers --> Finish([Return completed string])
BlankNumbers --> Finish
Failure and edge-case behavior¶
- Empty or default string properties are still emitted as keys with blank values; there is no omission of unset string fields.
- Date properties at the
Date.MinValue/Date.MaxValuesentinel bounds serialize as blank rather than as a formatted date (BR-002). - Zero or negative numeric properties serialize as blank rather than as
0or a negative value (BR-001). - The method performs no validation of field combinations, string lengths, or required values before returning the payload; malformed or incomplete data is serialized as-is.
Related documentation¶
Sources¶
Services\SAIF.Services.Imaging.Import\clsImageImport.vb