SAIF.Services operations and processes¶
This page catalogues the business operations implemented by SAIF.Services, organized by the same functional areas used for Business rules: Claims (bills, EBilling, EDI, ICD-10 and payments), Claims (authority, information, tasks, notes, RTW, security and investigations), Legal, Policies and certificates, and Collections/Agencies/Groups/Imaging/Utilities. Each H3 heading is a service class; bullets describe its key operations, the validators and rules they enforce, the entities/tables they touch through GetRepository<T>() or a query provider, and any delegation to SAIF.Domain or an external system (Guidewire ClaimCenter/PolicyCenter, OnBase/ImagingClient, PDF rendering, CleanAddress, Simple Certified Mail, Google Maps, email/fax). SAIF.Services is entirely NHibernate ORM based; there is no application-layer raw SQL, so this page does not cite sql/* documents directly (see SQL catalog for the ORM-mapping catalog). Business-rule citations link to the corresponding heading in Business rules; where the source material referenced a rule number that has no matching heading in that catalogue (chiefly some higher-numbered SVC-BR-MSC-* and SVC-BR-COL-* sub-items rolled up into a single catalogued entry), the behavior is described in prose without a bracketed rule citation rather than linking to a non-existent anchor.
Claims: bills, EBilling, EDI, ICD-10 codes, and payments¶
This area covers Claims/Bills/**, Claims/EBilling/**, Edi/**, Claims/ICDCodeService/**, Claims/Payments/** and Utilities/Edi/** (paths relative to Services/SAIF.Services/). It implements medical/legal bill entry, audit, approval, payment and regeneration; electronic-billing (837/835/999) file processing; imaging and document management for EBilling batches; EDI override and bill-report services; ICD-10 code maintenance; and Guidewire check/recovery payment creation. Rule citations in this area use the SVC-BR-BIL-* prefix.
BillService¶
Claims/Bills/BillService.cs (IBillService).
- CanBillBeNonChargeable(billId) loads the SAIF.Domain
Bill, checks that it is reviewed, the billing provider type is IME, and the audit is a chargeable cost (SVC-BR-BIL-001); if the first WCD "Closed" status date is on or before the statement-from date it returns true (SVC-BR-BIL-002); otherwise it checks conditions for a "Denied…" decision date on or before the statement-from date (SVC-BR-BIL-003). - GetBillAmounts(claimId, paymentCategory, billTypes) joins
CbpBillandCbpAuditedServicevia the query provider and sumsAllowedAmount, returning 0 for null (SVC-BR-BIL-004). - ApproveBill(req) runs
ApproveBillRequestValidator(SVC-BR-BIL-010), begins a unit of work, calls DomainBill.Approve(DeterminePaymentIssueDate)(SVC-BR-BIL-060) readingPaymentTransactionTypeCode"MA", then commits. - DisallowAllServices(billId, reasonId) / AllowAllServices(billId) call Domain
Bill.Audit.DisallowAllServices(reasonId, USER)/AllowAllServices(USER)and commit; there is no validation on this path. - SendPendBill(req) runs
SendPendRequestValidator(SVC-BR-BIL-020..024), then for each bill id calls DomainBill.SendPend(PendDate, MailId.ToUpper())and commits. - SendToAudit(req) runs
SendToAuditRequestValidator(SVC-BR-BIL-025/026), calls DomainBill.SendToAudit(NoteText)per bill, and commits. - RegenerateBill(req) runs
RegenerateRequestValidator(SVC-BR-BIL-027..029). Full-duplicate bills are skipped with a message (SVC-BR-BIL-030); otherwise it calls DomainBillRegenerator.Regenerate(uow, bill, …, providers, claimApiService, gwClaimDataApiClient), commits, and adds a summary message (SVC-BR-BIL-031. - UpdatePaymentOptions(req) runs
PaymentOptionsRequestValidator(SVC-BR-BIL-040..043), then DomainBill.ModifyPaymentOptions(req)and commits. - GetPaymentOptions(billId, canUpdate) sets
ChargeableCost/IssueDatefromDeterminePaymentIssueDate(SVC-BR-BIL-060), andCanUpdatewhen the status is outside EXT/COM/SUS andcanUpdateis true (SVC-BR-BIL-061). - GetNextIssueDate(current, next) uses
IWorkCalendarService.IsWorkingDay/NextWorkDay(SVC-BR-BIL-062. - GetBillHeader(billId) reads claim detail from Guidewire ClaimCenter and throws "Claim does not exists in Claim Center" if missing (SVC-BR-BIL-063).
- Read-only lookups:
GetBillStatusHistory,GetBillStatusCodes(CbpBillStatusCode),GetBillTypes(CbpBillTypeCode),GetDisallowReasonCodes,GetBillDiagnosis(CbpDiagnosis),GetBillProcedure,GetConditions/GetClaimRequestDecisions/GetClaimWcdStatusHistory(ClaimQueryProvider),GetAuditedService,GetOtherServices,GetBill(DomainBillmapped to contract),GetPaymentSpecialHandling.
BillEntryService¶
Claims/Bills/BillEntryService.cs (IBillEntryService).
- GetNextClaimBillFromQueue(hasConflictAccess) calls
IClaimBillEntryRepository.GetNextClaimBillFromQueue, looping while a duplicateCbpBillwith the sameImageIdalready exists (SVC-BR-BIL-070) and handling return codes (SVC-BR-BIL-071. If the queue is empty it warns "No bills remain in the queue. Break time!!". It fetches the image viaImagingClient.GetImage(CLAIM, ImageId)(OnBase); a missing image is logged and skipped in production, warned otherwise (SVC-BR-BIL-072), and other imaging errors restore the task to the queue with a warning (SVC-BR-BIL-073). It then builds a new "PEN"/Standard bill, fillingTowId,ImageId, received date, claim number,ClaimIdfromclaimInformationService.GetClaimId, and worker name/DOB (SVC-BR-BIL-074), addsCbpBill, and commits. - GetClaimBillQueueRemainingCount counts
Taskrows (TaskUser="{CBPAPP}", not deleted). - GetBill(billId) calls
billService.GetBill, adding an error if not found and a warning if there is no image; gets the image URL viaImagingClient.GetImage/GetImageByTowId(SVC-BR-BIL-075). - GetBillNotes excludes provider-contact notes (SVC-BR-BIL-076);
GetNoteCategories/GetNoteTypesdelegate toNoteService. - SaveBill(bill, saveOnSubmit) validates with
BillValidator(SVC-BR-BIL-080..085). For a new bill it callsCreateNewBill("PEN"),FillBillData, then adds;FillBillDataresolves the provider location viaProviderQueryProvider.GetLocationand the claim viaClaimQueryProvider.GetClaim, and handles bill-type changes (SVC-BR-BIL-087); anUpdateNumbermismatch raises a contention error (SVC-BR-BIL-086); otherwise it updates and commits. - SubmitBill(bill) runs submit checks (SVC-BR-BIL-090..093) and calls
SaveBill(bill, true). - UpdateBillStatus(billId, recipientId, code) looks up
CbpBill/CbpBillStatusCode; an invalid code throws (SVC-BR-BIL-094); otherwise adds aCbpBillStatusrow and commits. - Lookups:
GetBillTypeCodes/GetBillStatusCodes,GetInboxBillsByResponsiblePartyId,GetProviderLocations(tin)viaProviderQueryProvider.GetProviderByTaxId(SVC-BR-BIL-095,GetRenderingProviders(locId)viaGetLocation/GetWorkingProviderRelationshipsByParentLocation(SVC-BR-BIL-096),GetNewBill.
BillDiagnosisService¶
Claims/Bills/BillDiagnosisService.cs.
- CreateDiagnosis/CreateDiagnoses(billId, list) loads the bill via
BillQueryProvider.GetBill, cleans the codes (trim/uppercase), validates withBillDiagnosisValidator(SVC-BR-BIL-100/101/102, requires a pointer on Standard bills (SVC-BR-BIL-103), checks for duplicates (SVC-BR-BIL-104/105), resolvesCbpDiagnosisTypeCode, adds the diagnosis, commits, re-reads and setsIsValidCode/description viaDiagnosisService.GetDiagnosis(SVC-BR-BIL-106. - UpdateDiagnosis/UpdateDiagnoses follow the same flow against existing rows.
- DeleteDiagnosis/DeleteDiagnoses remove entries from
bill.Diagnoseswith no additional checks. - GetDiagnoses, GetDiagnosisTypeCodes (
CbpDiagnosisTypeCode) are plain reads.
BillProcedureService¶
Claims/Bills/BillProcedureService.cs.
- CreateProcedures/UpdateProcedures load the bill via
BillQueryProvider.GetBill, validate withBillProcedureValidator(SVC-BR-BIL-110..114, resolveCbpPrimaryProcedureCode, add or modify the line on the bill, and commit. - DeleteProcedures, GetProcedures, GetPrimaryProcedureCodes are straightforward reads/deletes.
BillServiceService¶
Claims/Bills/BillServiceService.cs.
- CreateService(billId, svc) loads the bill, validates with
BillServiceValidator(SVC-BR-BIL-120..133), resolvesPharmacyDispenseAsWrittenCodeandProviderLocation, adds the line, and commits. - UpdateService follows the same flow; DeleteService removes the line from the bill.
- GetServices reads
CbpBillService; GetChargedServicesTotal sumsChargeAmount(SVC-BR-BIL-136). - GetServiceTypeCode(code) uses
BillQueryProvider.GetCbpServiceCodeNotExpired, falling back toGetNationalDrug(SVC-BR-BIL-137;GetPrescribingPrescriberCodesis a plain lookup.
AuthorizationService¶
Claims/Bills/AuthorizationService.cs.
- GetAuthorizations(claimId) reads
CbpAuthorization. ValidCptCode(code) matches a singleCbpServiceCodewhereCode==code && ServiceType=="M"(SVC-BR-BIL-140). - Surgery dates:
GetSurgeryDates;AddSurgeryDatechecks for a duplicate before addingCbpAuthorizationSurgery(SVC-BR-BIL-141);DeleteSurgeryDatedeletes. - CreateAuthorization resolves the type code, PM group and
ProviderLocation, validates withAuthorizationItemValidator(SVC-BR-BIL-142/143), then addsCbpAuthorization. UpdateAuthorization updates the existing row; DeleteAuthorization deletes it. - Lookups:
GetAuthorizationTypeCodes,GetServiceTypeCodes,GetTimelyTypeCodes.
NoteService (bills)¶
Claims/Bills/NoteService.cs.
- Reads:
GetNote,GetClaimNotes, and note type/category lookups viaGetAuditNote/GetAuditNotesForClaim/GetNoteTypes[ForCategory];GetBillNotesqueriesCbpNote;IsBillNoteByOtherUser. - CreateNote/UpdateNote(Note) validate with
BillNoteValidator(SVC-BR-BIL-150/151) then add or update the note on the bill. - CreateAuditNote/EditAuditNote(NoteModifyRequest) validate with
NoteModifyRequestValidator(SVC-BR-BIL-152..159) then add or modify. - DeleteNote/DeleteAuditNote validate with
NoteDeleteRequestValidator(SVC-BR-BIL-160). - InactivateNotes(ids) calls
GetAuditNotefor each id and inactivates it.
Small lookup services¶
- DiagnosisService.GetDiagnosis(code, includeExpired) reads
CbpDiagnosis. - ProcedureService.GetProcedure reads
CbpProcedureCode. - ServiceCodeService.GetServiceCode calls
IServiceCodeMaintenanceQueryProvider.GetServiceCode;Update/InsertthrowNotImplementedException(SVC-BR-BIL-165).
BillQueryService¶
Claims/Bills/BillQueryService.cs.
- SearchByCriteria queries
CbpBillwith filters; ifCheckNumberis set it also calls GuidewireIFinancialDataApiClient.GetBillDetailsForCheckNumber, then enriches withIClaimDataApiClient.GetClaims(claimIds)andGetPaymentsByInvoiceNumber. - GetBillEntryBillsByCriteria queries
CbpBill. SearchByResponsiblePartyId(id, displayAll) queriesCbpBillplus GuidewireGetClaims. - GetExplanationOfBenefits(billId) calls
documentService.GenerateDocument(config), returning aMemoryStream(PDF rendering).
EbillingService¶
Claims/EBilling/EBillingService.cs (IEbillingService). Processes 837/835/999 EDI files and drives EBilling batch state.
- Process837File(file, batchId): resolves the clearinghouse via GS sender-id tax id, retrieves the "837"/"ACK" batch (SVC-BR-BIL-200), calls Domain
File837Extractor.ProcessFile, marks the batch extracted, and commits on success; failure rolls back and throws (SVC-BR-BIL-201). - ProcessEOBAcknowledgementFile(999): retrieves the "835"/"EOB" batch, parses AK9 (throws if missing, SVC-BR-BIL-202), creates a new "835AK" batch, and either runs
ProcessEntireEobBatch(AK9 R/A) or per-pairProcessEobStatus(SVC-BR-BIL-203/204, then completes both batches, links the response batch, and commits. - Create835EobFile / Create277ResponseFile / Create837AckFile build ISA/GS/ST/AK1/AK2/AK9/SE/GE/IEA segments via
EdiBuildSegments; a null outfile throwsArgumentNullException. - CreateCbpBillsForBatch: retrieves the "837"/"INDEX" batch, and for each indexed bill calls Domain
GenerateCbpBills.Generate(uow, ebill, user, …, serviceCodeManager, claimApiService), committing per bill, then sets the batch to Setup (SVC-BR-BIL-205). - IndexBatch: retrieves the "837"/"EXTR" batch, then runs Domain
ProviderIndexerV2.IndexProvidersToLocation,PatientIndexer.IndexPatientsToClaim, andBillServiceIndexer.IndexBillServiceProvidersToLocation(each in its own transaction), then sets the batch to Indexed (SVC-BR-BIL-206). - AssignBills: retrieves the "837"/"IMAGE" batch, calls Domain
BillAssignment.AssignBillsResponsibily(...), then sets the batch to Completed; failures are wrapped as "Batch Id: {id}" (SVC-BR-BIL-207). - GetBatchImagingResults / AssociateEbillImages / CreateAffiliateImages:
DocumentQueriesplusImagingClient.GetImages(CLAIM, ImageListQuery)(OnBase); matched images set the ebill status to Imaged (SVC-BR-BIL-208) and are cross-referenced withImagingClient.SaveCrossReference. - ExtractEobs(clearinghouseCode, rowLimit) calls Domain
EobBuilder.GenerateEobsfor batch type "835"; wraps errors as "Unable to generate EBill Explination of Benefits". - ExtractEobForReject(eobId) loads the eob (throws "Invalid Eob" if missing, SVC-BR-BIL-209), then calls Domain
EobBuilder.GenerateEobusingGetLastBatch("835"). - File checks:
Read837TransactionSet/Read999TransactionSet(EdiManager),AreBillsAlreadyProcessed,IsClearinghouseRepetitionSeparatorAndElementDelimiterValid,IsValidFileStructure,IsFileAlreadyProcessed,IsValidSenderAndReceiver,IsValidFileBatchType,IsValidFileBatchNumber(SVC-BR-BIL-210. - ProcessInvoiceFile(csv, month, total): builds an
EbillInvoice; a prior in-balance invoice for the month throwsArgumentException, otherwise the old invoice/errors/bills are deleted and rerun (SVC-BR-BIL-220. Runs per-line DCN checks (SVC-BR-BIL-221..224), flags month ebills missing from the invoice (SVC-BR-BIL-225), and checks the balance (SVC-BR-BIL-226/227), then adds/deletes rows and commits. - Other:
CleanEbillingAddress,IsAddressOverridden,WriteEdiFile,RetrieveBatch(DomainBatch).
EBilling imaging services¶
Claims/EBilling/Imaging/: supports document capture and status transitions for EBilling batches, delegating heavily to OnBase (ImagingClient) and PDF merge (IPdfClient).
- EbillingImageService.ImageDocuments delegates to
DocumentImageManagerand wraps errors as "Batch Id". - DocumentImageManager (
DocumentManager.cs):ImageDocuments,UpdateBatchStatus,UpdateBillStatus,UpdateDocumentImageSequenceNumber,SendNewClaimEmail,CreateNewDocumentNote;ThrowExceptionIfZeroenforces SVC-BR-BIL-230. - DocumentManagementService:
GetBillImageRequest(non-imaged docs),CreateNewDocumentNote("Claim not found - 827 sent to Fast Track."),UpdateBillStatusto DocumentLoad (SVC-BR-BIL-231),UpdateBatchStatusToDocumentLoad,UpdateDocumentImageId,FormatNewClaimEmail,GetNotYetImagedBills. - DocumentImager:
ImageDocument(s)reads viaDocumentQueries.GetDocument, merges viaIPdfClient.Merge, uploads viaImagingClient.Upload(CLAIM, …). - DocumentFileService:
GetFile,MoveFile,ValidateDocuments,ValidateSource/DestinationDirectory,GetImageDocumentFileNames(SVC-BR-BIL-232..235). - ConfigurationService:
AlertLegal(ImageQueries.AlertLegal),GetImageClaimAlertSecurity,GetImageConfiguration(service date range fromServiceQueries),GetImageTaskConfiguration. - DocumentOverrideService.CheckForOverride:
GetDocumentOverride(docType, providerType).
Edi¶
Edi/: bill-level EDI overrides and 999-report validation.
- BillOverrideService:
Get(billId)/Get()are queries;Edit/Addstamp the transaction and map aMinValueStatementThruDateto null (SVC-BR-BIL-240), then update or addBillOverride;Deleteremoves it. All roll back on error. - AuditedServiceOverrideService:
Get(id, seq)/Get(),Edit(billId, seq),Add(AuditedServiceOverride),Delete: same pattern. - MedicalEdiBillService.IsValidEdiReport(batch#):
IEdiQueryProvider.GetBillReport. - MedicalEdiFileService:
Read999TransactionSet,IsFileStructureValid,IsFileBatchTypeValid,GetBatchNumberFrom999File,GetIk5SegmentResponseCode,IsSegmentValid/HasFileBeenAccepted(SVC-BR-BIL-241),GetIk3Segments.
Icd10CodeService¶
Claims/ICDCodeService/Icd10CodeService.cs.
- ProcessICDFile processes each entry with
ProcessIcdEntry, which routes by classification (SVC-BR-BIL-250. - ProcessProcedure looks up
ClaimQueryProvider.BillQueries.GetCbpProcedureCode, inserting if missing (and not deleted) or updating otherwise (SVC-BR-BIL-251; the non-PCS branch mirrors this withCbpServiceCodeStateless("Z") andCbpServiceDescriptionStateless. - ProcessDiagnosis looks up
GetCbpDiagnosis, then adds or updatesCbpDiagnosis(SVC-BR-BIL-251. - Helpers:
GetTrimmedDescription,GetValidMedicareReportFlag,WriteControlReport.
FinancialTransactionService¶
Claims/Payments/FinancialTransactionService.cs: creates Guidewire check and recovery transactions for legal bills and subpoenas.
- CreateLegalCheckTransaction(legalBill, issueDate, approverId): null-checks the bill (SVC-BR-BIL-260), builds
CheckFinancialData(send date today, issue date, claim id, provider location), requires a resolvable provider address (SVC-BR-BIL-261), maps the delivery method (SVC-BR-BIL-262, adds one Final/ExpenseDC/Legal payment line per service withPaidAmountandSpendCategory, sets the service date range from min/maxServiceFromDate, and calls GuidewireIFinancialDataApiClient.CreateCheckAsync(claimId, data). - CreateSubpoenaCheckTransactions: null-checks the subpoena (SVC-BR-BIL-263); returns an empty list if any recipient provider address is missing (SVC-BR-BIL-264); for each recipient with
PaidAmount > 0and not yet paid, creates one non-chargeable Legal check viaCreateCheckAsyncand marksIsRecipientPaid(SVC-BR-BIL-265). - CreateRecoveryAsync: delegates to Guidewire
IFinancialDataApiClient.CreateRecoveryAsync.
EdiFileService¶
Utilities/Edi/EdiFileService.cs (not behind an interface). LoadFile(file, desc) adds a DataModel.EdiFile row; DeleteFile(id) deletes it.
Claims: authority, information, Medicare, severity model, tasks, notes, RTW, security override, pharmacy eligibility, reports, security, and investigations¶
This area covers Claims/Authority/**, Claims/Information/**, Claims/Medicare/**, Claims/SeverityModel/**, Claims/Tasks/**, Claims/Notes/**, Claims/RTW/**, Claims/SecurityOverride/**, Claims/PharmacyElilgbility/**, Claims/Reports/**, Security/** and Investigations/**. It implements claim payment/reserve authority limits, the claim information API consumed by claim-summary UI (the "claim node builder"), Medicare beneficiary batch reconciliation, Guidewire severity-model activity creation, claim/legal task and note management (including masking rules for conflict/secure claims), return-to-work (RTW) load-code access, security overrides, the pharmacy eligibility extract, broken-provider-relationship reporting, and claim security/fraud lookups. Rule citations use the SVC-BR-CLM-* prefix and already appear fully qualified in the source material.
ClaimAuthorityService¶
Claims/Authority/ClaimAuthorityService.cs (IClaimAuthorityService). The constructor loads the current SAIF user into a static field and calls AuthorityMappingHelper.MapTables().
-
IsValidPaymentAuthorityEdits / IsValidReserveAuthorityEdits set the business process to Payments or Reserve, then call
ValidateAuthorityEdit: in production it forcesIsOverrideAuthority = false(SVC-BR-CLM-010), setsAuthorizingEmployeePaymentAuthorityfrom the current user's authority, and validates withClaimAuthorityValidator(SVC-BR-CLM-001..009. -
AddEditAuthorityLimit(edit, historyTimestamp, ApprovalTypes) maps the approval type to a business process (SVC-BR-CLM-011), validates, then reads
EmployeeAuthorityLimitmatching employee/function/purpose/process. A missing row goes throughAddAuthorityLimit; an existing row goes throughUpdateAuthorityLimit, which makes no change when the amount and expiration are unchanged (SVC-BR-CLM-012), reports a concurrency error onUpdateNumbermismatch (SVC-BR-CLM-013), and writes anEmployeeAuthorityPaymentLimitHistoryrow on every change (SVC-BR-CLM-014). - AddAuthorityLimit validates again, resolves
AuthorityBusinessProcessCode/AuthorityPaymentTypeCodevia.Single(throws if no match), stores aMinValueexpiration as null, and adds the limit plus a history row; it does not begin/commit its own transaction. - DeleteOrRevertExpiredAuthorities(ids): for each id, reverts to the most recent earlier non-expiring history entry with an amount if one exists, otherwise deletes the limit and writes a zeroed history row (SVC-BR-CLM-015);
UpdateUserfalls back to "CMN0011" when empty (SVC-BR-CLM-016). DeleteExpiredAuthorities always deletes and writes history. - GetExpiredAuthorities(runDate) reads limits expired before the run date. GetTerminatedAuthorities joins terminated (
EmployeeStatusCode != "A") employees to their limits (SVC-BR-CLM-017). - GetClaimAuthority(userId, messages): in production, an inactive user or one with no employee id gets an empty authority and an "Unknown User" error (SVC-BR-CLM-018); otherwise loads Payments/Reserve limits and sets
CanUpdate. - CanUserUpdate: authorized for "ClaimAuthorityUpdate" or "ClaimAuthorityEAIPUpdate" (SVC-BR-CLM-019).
- Lookups:
GetFunctionTypeList,GetApprovalTypeList,GetClaimAuthorityLimitHistory.
ClaimInformationService¶
Claims/Information/ClaimInformationService.cs (IClaimInformationService). Almost every method builds a SAIF.Domain Claim and reads one property from it.
- IsValidClaim, GetClaimId, GetPolicyNumberForClaim, GetSaifClaimNumber, GetClaimNumber, GetInjuryDate use
Claim.HasData/Claim.Data, returning a default when there is no data. - GetClaimSecurity(number|id) delegates to Domain
Claim.GetSecurityAttributes(). - HasSecurityOverride(claimId, userId) resolves the employee by
UserId.ToUpper()(false if not found) and delegates toClaimSecurityOverrideProvider.HasClaimSecurityOverride(SVC-BR-CLM-040). - Pass-through Domain
Claimproperties:GetWorkStatus/Info,GetWorkReleaseStatus/Info,GetLegalRepresentative,GetClaimSupervisor,GetRecoverableBalance,GetClaimCurrentReserves* (Guidewire-backed),GetActiveAttendingPhysician,GetOdInjuryDate,GetFirstClosureDate,GetAggravationDates,GetPrimaryBodyPart/Side,GetKnowledgeDate. - GetClaimDetail(id|number) maps Claim to
ClaimDetail, readsMyClaimLastLoginvia_profileService.GetInjuredWorkerUserByCustomerId, swallows a specific NHibernate "no row" message as a test-environment workaround, and addsGetGwReserves()plus cost category codes. - GetClaimType / GetClaimStatus use
Claim.DetailContractplusGetLatestClaimTypeActivity/GetLatestClaimStatus, returning empty when there is no activity. - GetWorker(claimId) builds a Domain
Workerand masks the SSN as***-**-plus the last four characters, returning empty if the tax id is shorter than 11 characters (SVC-BR-CLM-041). - GetClaimsMissingTaxId reads
IClaimQueryProvider.GetClaimsMissingTaxId. - GetPharmacyEligibilityReport, GetConditions, GetThirdPartyStatus, GetVocStatus are query-provider reads.
- GetLastPayment sums TD, VocTD and SupTD detail amounts (SVC-BR-CLM-042).
- Contact methods delegate to
IClaimContactService; GetAdjusterLocation reads the adjuster's location viaGetSaifUser.
ClaimContactService¶
Claims/Information/ClaimContactService.cs.
- GetResponsibleAdjuster returns empty if both
MailIdandPseudoUserare blank; otherwise looks upMailId, orPseudoUser; a pseudo user falls back toPseudoPhone/PseudoName(SVC-BR-CLM-043). - GetClaimsAssistant uses
ClaimAssistantMailId. - GetSupervisor: for a secure claim (
HostileWorkerset), returns the adjuster's manager (SVC-BR-CLM-044); otherwise returns the responsibility's supervisor, unless it equals the adjuster (SVC-BR-CLM-045). - GetVocationAdjuster, GetThirdPartyAdjuster, GetRtwAdjuster, GetPolicySmcContact, GetUserContactInfo: additional contact-role lookups.
ClaimInformationApiService¶
Claims/Information/Api/ClaimInformationApiService.cs (IClaimInformationApiService). Powers the claim-summary "node" API consumed by claim UI.
- The static constructor builds AutoMapper claim/code-table/worker mappings;
Builder(claimId)caches aClaimApiNodeBuilderthat creates a DomainClaimand a newLegalService. - Each BuildXxxNode(claimId) returns an empty node when the claim is invalid; otherwise it chains builder steps for Claim (values, status, compensability, type, body part, region, work release/status, third party, voc, pharmacy eligibility, last payment, first closure, aggravation, MyClaim, attributes), Contacts (adjuster, supervisor, assistant, RTW, third party, voc, SMC), Policy, Legal, MCO, Reserves, Worker, WorkerRep, ProviderLocations, AttendingPhysician, Conditions.
- BuildClaimAlertsNode adds contact alerts for adjuster/assistant/voc/EAIP adjuster and a "{LEGAL}" alert when
LegalQueries.IsImageAlertNeededis true. - ClaimNodeBuilder.AddClaimAttributes adds attribute labels (Fraud, secured worker, preferred worker, support order, worker conflict, multiple jobs, overpayment, CDA date, DCS) (SVC-BR-CLM-046.
- ContactsNodeBuilder.AddAdjusterSupervisor repeats the secure-claim manager rule (SVC-BR-CLM-044).
- LegalNodeBuilder.AddLegalNode takes non-Closed cases, latest MED/FMED mediation schedule, "None"/"Unassigned" numbering, and hearing fields from a "HEAR" schedule (SVC-BR-CLM-047).
ClaimCustomRepoService¶
Claims/Information/ClaimCustomRepoService.cs. GetClaimForOnBaseAsync(claimNumber) calls Guidewire ICCClaimApiService.GetClaimForOnBase; on success it maps Y/N flags to bool and sets HasLegalInformation via ILegalService.LegalCaseExistsAndHasImageAlertsFlag. A 404 falls back to IClaimDataApiClient.GetNonConvertedClaim, mapping IsNonConvertedClaim = true and IsConflictClaim/IsSecureClaim from IsRestricted/IsSecure (SVC-BR-CLM-048); other statuses pass Guidewire's status/error through.
MissingTimeLossService¶
Claims/Information/MissingTimeLossService.cs. SendMissingTimeLossReport(ILogWriter) reads missing-timeloss payments, flags any with no "Zero Prorate Letter" imaged today via IImagingClient.Exists (SVC-BR-CLM-050), and emails a summary (subject "CMM0120.MISSING.TIMELOSS.REPORT has FOUND ROWS - Missing TL Payment Issue", from config Noreplyemailsenderaddress, to the injected recipient list) when any are flagged; returns the count.
MedicareService¶
Claims/Medicare/MedicareService.cs. ProcessNextBatch(ILogWriter) deletes and reprocesses a fully-matched batch (SVC-BR-CLM-060), then for the next batch runs ProcessMedicareBeneficiarysStatelessMode: matched beneficiaries with an earlier LastSubmissionDate update MedicareQueryHistory (SVC-BR-CLM-061); unmatched beneficiaries insert a new history row. Throws Exception("Counts Don't match") if counts still differ after processing (SVC-BR-CLM-062).
SeverityModelActivityService¶
Claims/SeverityModel/SeverityModelActivityService.cs (SQL Server unit of work). CreateClaimActivities(processDate) reads ClaimSeverityModelActivity rows and builds a Guidewire Activity per distinct claim/activity (pattern severity_activities, subject "Severity Activity", mandatory). Role mapping: Adjuster/Supervisor/RTW Consultant map to adjuster/supervisor/rtw_ext; any other role is an error and the activity is skipped (SVC-BR-CLM-070). Calls IActivityDataApiClient.CreateActivityRequest; processDate is stored but never used*.
ClaimTaskGenerationService¶
Claims/Tasks/ClaimTaskGenerationService.cs (Oracle unit of work). CreateClaimActivities(processDate) reads lookback-day config, caps the lookback at 01/03/2021 so only claims received on/after 04-JAN-21 count (SVC-BR-CLM-080), loads claims missing a tax id, skips Void/fatal/Inmate/InProgress claims (SVC-BR-CLM-081), and creates REQ30/REQ60 tasks at the 30/60-day thresholds when not already present (SVC-BR-CLM-082), assigned to the responsible adjuster via ITaskService.CreateTaskStateless(isBatchCommit: true).
TaskService¶
Claims/Tasks/TaskService.cs (ValidatingServiceBase, ITaskService). Constructor reads note-related user preferences, builds ClaimUserSecurityAccess, and reads ValidGroups from config.
- GetTasks(TaskFilter) returns empty with no
ValidGroupsor an invalid group filter (SVC-BR-CLM-090); base query is onTask(not deleted, source CLAIM or IMAGE/CLAIM|EAIP,TaskUser != "INFO"); returns empty without an assigned user or resolved claim (SVC-BR-CLM-091); external RTW users never see image/document tasks (SVC-BR-CLM-092).SetAdditionalClaimTaskDatamasks the worker name "Confidential" unless the user has unrestricted/conflict/secure access or a security override applies (SVC-BR-CLM-093);CanUpdateTaskUser/CanUserEditrestrict external users to their own tasks (SVC-BR-CLM-094). - CreateTaskStateless(TaskEditContext, messages, isBatchCommit): category defaults to "CLMM"; an "INFO"
TaskUsergetsMaxValuedate and Info priority, otherwise the date moves to the previous working day and priority is Urgent or the category default (SVC-BR-CLM-095/096); validates withClaimTaskValidator(SVC-BR-CLM-100..102. CreateTask wraps this in Begin/Commit and returns the reloaded task. - UpdateTask(id, ref task): reports "Error: Invalid Task ID." if missing (no rollback), a concurrency error on
UpdateNumbermismatch (SVC-BR-CLM-097), validates, and on completion soft-deletes and creates a note. DeleteTask/DeleteTasks/CompleteTasks soft-delete and create a note when completing or whenIsSavedToNotepad(SVC-BR-CLM-098). - CreateTaskNote: throws if note preferences are missing (SVC-BR-CLM-099); for Inmate or Secure claims the note's
CreateUseris the responsible adjuster's mail id (SVC-BR-CLM-110); adds aClaimNote. - ReassignTasks: bulk update of user/date/priority/group/text, with text changes gated on
TaskTextCanBeBulkUpdated. - Other:
GetAdditionalInfoTask,GetOnBaseEncodedString(OnBase custom query),CanUserEdit,IsValidClaim,IsValidWorkDate,PrintTasks(GeneratePdf("Clm_TaskAndNotes_Tasks", …)),GetTaskGroups,GetTaskById.
ClaimNotesService¶
Claims/Notes/ClaimNotesService.cs.
- IsUpdateUser: CTNoteUpdate, CTNoteSupervisor, RTWAdmin, RTWInternalUpdate, RTWExternalUpdate or CTNCENotes. IsNCEUser: CTNCENotes.
- GetNotes(criteria)/GetNote(id) reads
ClaimNoteand computesCanEdit/CanEditNoteInfofrom age, next-work-day cutoff and supervisor/creator/secured-access status (SVC-BR-CLM-120). - SaveNote(id, NoteEdit) checks concurrency on
UpdateDate(SVC-BR-CLM-121), setsUpdateUser(RTW-suffixed for external users, or the responsible adjuster for inmate/secure claims) (SVC-BR-CLM-122), and appends or replaces the text. - DeleteNote requires
CanEdit(SVC-BR-CLM-123) and performs a hard delete. - CreateNote validates and sets
CreateUserper the same inmate/secure/RTW rules. PrintNotes callsGeneratePdf("Claims_TaskAndNotes_ClaimNotes", …).
NotePreferenceConversionService¶
Claims/Notes/NotePreferenceConversionService.cs. ConvertNotePreferences(path, …) reads *.config XML files (file name = user id), collects ClaimTasksNotes category/type/externalview keys, and for users with CTNoteUpdate, CTNoteSupervisor or CTNCENotes adds a Preference row (SVC-BR-CLM-124).
RTWService¶
Claims/RTW/RTWService.cs. GetRTWLoadCode(loadUser) strips a "TEST" prefix then finds the unexpired RtwLoadAssignment by load user. CanAccessRTWClaim requires an RTWCase match on claim id and load code for RTWExternalUpdate users; otherwise returns true (SVC-BR-CLM-130).
SecurityOverrideService¶
Claims/SecurityOverride/SecurityOverrideService.cs. AutoMapper maps IsSecureClaim from HostileWorker codes "R"/"T" and IsConflictClaim from IsWorkerConflict (SVC-BR-CLM-140).
- GetSecurityOverrideById / GetSecurityOverrides(includeExpired) reads
SecurityOverride, setsCanEdit/CanDeletefrom expiration/effective dates (SVC-BR-CLM-141). - CreateOverride validates with
SecurityOverrideValidator, copiesHostileWorkerCode/IsWorkerConflictfrom the claim's worker, and commits. UpdateOverride validates, checks concurrency onUpdateDate, and commits. DeleteOverride is a hard delete that does not checkCanDelete. - IsValidClaim / IsValidUserId: existence checks.
PharmacyEligibilityService¶
Claims/PharmacyElilgbility/PharmacyEligibilityService.cs. ProcessEligibilityExtract(warningLog, addressLog):
- Eligible claims: builds a Domain Claim per report row; skips Void and Denied claims with warnings (SVC-BR-CLM-150); writes the extract record.
- First-fill claims: sets status to FirstFill in memory, writes the extract, then
UpdatePharmEligrestores the status to Ineligible withTransmitDate = Nowand user "CMN0117" (SVC-BR-CLM-151. - WriteExtract: a missing address is logged and skipped; a foreign address is logged and replaced with SAIF's own address (SVC-BR-CLM-152/153); status/group-code mapping is Ineligible→"T" or otherwise "A" with GroupId by pharmacy tier (SVC-BR-CLM-154; language preference is only kept for codes 01–04 (SVC-BR-CLM-155).
- WriteExtractTrailer archives the existing file and writes a fixed-width file with a trailer row.
ClaimReportingService¶
Claims/Reports/ClaimReportingService.cs. GetBrokenProviderRelationshipDetails(request) finds expired provider relationships with no active replacement (SVC-BR-CLM-160), gets affected claims, and reports only active claims with outstanding reserves (SVC-BR-CLM-161). When CreateTasks is set, it creates a task per affected relationship assigned to the adjuster via ITaskService.CreateTaskStateless.
ClaimSecurityService¶
Security/ClaimSecurityService.cs. GetClaimSecurity(claim) computes HasConflictAccess/HasSecureAccess from the ConflictClaim/SecureClaim authorization resources (SVC-BR-CLM-170). GetClaimSecurity(userId, claim) resolves a specific user via ClaimUserSecurityAccess; LoadClaimSecurity sets claim.Security.
FraudInvestigationService¶
Investigations/FraudInvestigationService.cs. GetSubjectNameAsync(caseNumber) calls the Investigation repository extension GetSubjectName, falling back through legacy data worker name, Guidewire IWorkerDataApiClient.GetWorker, policy name, then "Unknown"; returns null if there is no record. GetClaimId delegates to a repository extension.
ClaimDomainBuilder¶
Claims/ClaimDomainBuilder.cs. A factory for Domain Claim/Worker objects; GetClaim(InjuryClaim) uses the Claim constructor without IClaimDataApiClient.
Legal¶
This area covers Legal/** (Bills/, Notes/, Subpoenas/, Tasks/). It implements the legal-bill lifecycle (entry, save, approval, rating against fee schedules, payment/check generation, recoveries and adjustments), legal notes, and the subpoena lifecycle (entry, approval, payment, document/label generation for the xPressions batch, and legal task management). Unqualified source citations in this area (an ID with the rule number omitted) map to the SVC-BR-LGL-* series in Business rules.
LegalService¶
Legal/LegalService.cs (ILegalService; IUnitOfWork, IUserProfileService, ILegalQueryProvider, ICCClaimApiService).
- GetClaimIdByClaimNumberOrCaseNumber(claimOrCaseNo, msgs) looks up the claim id via
ILegalQueryProvider.GetClaimIdForCase; a zero result adds the error "Case or claim not found" (SVC-BR-LGL-001). - GetClaimNumber(legalCaseId): throws
ArgumentExceptionif the legal case does not exist (SVC-BR-LGL-002); otherwise returnsICCClaimApiService.GetClaim(claimId).ClaimNumber. - GetCaseList(claimId, claimNumberOrCaseId, msgs): adds "No cases for this claim" if
GetLegalCasesis empty; builds aCaseInfoper case (mapped case, Guidewire claim, latest MCO); without LNConflict access, a conflict-worker first case restricts the caller to "You are not authorized to view this claim" and only non-conflict cases are returned (SVC-BR-LGL-003); otherwise each case gets an assigned attorney, a "(P)" primary-case suffix, a selection flag, and an opposing-counsel address (Correspondence, then Physical, "N/A" if absent) (SVC-BR-LGL-005);SetSelectedCasedefaults to the primary case, else the first (SVC-BR-LGL-004). - DetermineAssignedAttorney(caseInfo) (SVC-BR-LGL-006): appeal attorney first (name via
GetAdpEmployeeName), else the case's most recent schedule attorney, else "OUTSIDECNCL" with the firm name fromGetOtherFirm. - LegalAttorneyList reads
AttorneyProfilerows not expired (or expired within the last year), ordered by last name (SVC-BR-LGL-007). - LegalCaseExistsAndHasImageAlertsFlag(claimId) and UserHasLNConflictAccess are supporting lookups used elsewhere (claim-summary alerts, conflict checks).
CaseCostService¶
Legal/CaseCostService.cs (ICaseCostService; IUserProfileService, ILegalQueryProvider, IBillServiceHelper, ICCClaimApiService).
PopulateAdditionalCaseListProperties(caseList, includeSubpoenas, includeNotes) builds a combined cost history per case:
- Historic case costs from
GetCaseCost(ordered by approved date), forced to status "Paid" with the rendering provider defaulting to the billing provider (SVC-BR-LGL-008). - Subpoena rows (one per recipient) when included: status "Returned" if
ReturnedDateis set, provider "Witness" without a provider location, billed = paid =PaidAmount, prepayment "Yes", payment id fromGetSubpoenaFinancialTransaction,IsPaidSubpoenarequires status Paid and LNBillUpdate (SVC-BR-LGL-009). - Legal bill service lines (one row each): hours = units x 15/60, rounded away from zero, for Conference/Conference Cancellation/Deposition/Deposition Cancellation codes (SVC-BR-LGL-010; MCO rate type shows the claim's MCO plan short description; adjusted (non-amended, with a parent) lines get a "[+] " status prefix;
IsPaidLegalBillrequires Paid and LNBillUpdate; free-text adjustment reasons useFreeformDescription; "OUTSIDECNCL" displays as "Outside Counsel"; the financial transaction comes fromBillServiceHelper.GetFinancialTransaction. MoveAmendedCaseCostsToAdjustedListswalks each adjusted line's parent chain intoAdjustmentHistory, removing parents from the main list (SVC-BR-LGL-011); the combined list is ordered by service-from date descending; notes (when included) come fromBillServiceHelper.GetBillNotes.
BillService (Legal, sealed)¶
Legal/Bills/BillService.cs (IBillService; IUnitOfWork, IUserProfileService, IProviderInformationService, IEnvironmentService, IBillServiceHelper, ILegalService, ILogService, Guidewire IClaimDataApiClient).
- GetInboxItems(employeeIdOrMailId, legalAttorneys): loads legal bills not in the Paid grouping, bulk-fetches Guidewire claims, masks conflict-worker claimant names as "Confidential" without LNConflict (SVC-BR-LGL-012), assigns attorneys (falling back to legal support employees), and orders by bill-status date.
- GetPendingBills(userId): a specific active employee's pending-approval bills, or all pending-approval bills for "ALL"/blank; maps claims; computes the employee's Payments/LegalBill initiate and approve limits via
BillServiceHelper.UserAuthorityLevel;IsPaidAmountOverAuthorityis true when the paid-amount sum exceeds both limits (SVC-BR-LGL-013); fills adjustment/quantity text and a case-notes summary; masks conflict claimants. - GetLegalBill(billId, msgs): adds "Bill not found" if missing; adds physical/payment addresses from
IProviderInformationService. - BillUpdateEmployeesList: legal support employees authorized for "LNBillUpdate".
- LegalSupportEmployeeList (private): department "005201", status active, job title starting "Legal " (SVC-BR-LGL-014); non-production environments also add hard-coded ids GREMIL, MELHIL, CHACAT, BRISLY, AARCHA.
- CurrentUserPaymentLimit / CurrentUserApprovalLimit:
UserAuthorityLevelfor Initiate or Approve, LegalBill type. Additional lookup lists (fees by IME/MCO, special handling, rate types, adjustment reasons, status codes, service codes) are simple reference reads.
BillSaveService¶
Legal/Bills/BillSaveService.cs (IBillSaveService; IValidationService, ILegalQueryProvider, IBillServiceHelper, ILegalService).
- SaveBill: defaults status to InProgress, then
SaveLegalBill. - SubmitBill:
SetApproverId(SVC-BR-LGL-020); if it fails, saves as-is; otherwise sets status PendingApproval and saves. - ApproveBill: defaults a null status to PendingApproval; unless ApprovedWithChange, sets approver = current user's employee id and approved date = now;
UpdateBillStatusCodesets Approved when the approver's initiate or approve limit is >= the paid-amount sum, otherwise routes to PendingApproval with the profile's manager as approver and an explanatory comment (SVC-BR-LGL-021). - ApproveWithChanges: sets approver = current user, status ApprovedWithChange, appends " [APPROVED WITH CHANGES]" (SVC-BR-LGL-022).
- DisapproveBill: clears approver/date, sets status InProgress, appends " [Returned by approver]" (SVC-BR-LGL-023).
- AdjustBill(bill, msgs, newStatus) (SVC-BR-LGL-024): creates a child bill (
ParentBillId= old id,Id= 0); compares each service line to the original, removing unchanged lines and generating comments for paid-amount decreases ("Partial return of...", forced Approved), increases ("Additonal payment of..."), service-code changes, and from/thru-date changes; a failedSetApproverIdreverts status to InProgress; no remaining lines produces the error "No changes were made to any bill service lines." and returns 0. - DeleteBill(billId): deletes the legal bill and, if it has a parent, un-amends the parent's matching lines (SVC-BR-LGL-025).
- SaveLegalBill (private): skips validation for PaymentReturned/Paid bills (SVC-BR-LGL-026); otherwise validates with
LegalBillValidator/LegalBillServiceValidator(received date between injury date and today (SVC-BR-LGL-027); service-from date >= injury date and <= today, +6 months for prepayments (SVC-BR-LGL-028; thru-date >= from-date and within the same window (SVC-BR-LGL-029; anUpdateNumbermismatch reports "Error: This record has been updated by someone else." and rolls back (SVC-BR-LGL-031); invoice text is uppercased and witness info truncated to 100 characters (SVC-BR-LGL-032); status changes add a history row with "CREATED"/"ADDED..." annotations (SVC-BR-LGL-033);SaveBillServicesupserts changed lines and keepsAdjustmentReasonTextonly for FreeformDescription; a new bill's matching parent lines are markedIsAmended = true. - SetApproverId (private): resolves the assigned or requesting attorney's profile; returns false if none exists; the approver is the attorney if not expired, else the profile's manager (SVC-BR-LGL-020).
BillRateService¶
Legal/Bills/BillRateService.cs (IBillRateService; IProviderQueryProvider, IClaimQueryProvider, IValidationService).
- CalculateAllowedAmount(claimId, providerLocationId, serviceLine): caps the paid amount at billed (SVC-BR-LGL-040); invalid lines (per
LegalBillServiceValidator) return false; CopyElectronic/CopyPaper use a fee lookup with reason ElectronicCopies/PaperCopies if reduced (SVC-BR-LGL-041); UnknownService pays 0 with reason Unknown (SVC-BR-LGL-042); an IME rate type with a matching IME fee is capped atMaximumAmountwith reason ImeContract if reduced (SVC-BR-LGL-043); otherwise the active MCO for the service date is checked and, if the provider is in-network, an MCO fee is applied and capped with reason McoContract (SVC-BR-LGL-044); the fee formula is a flat amount, or initial-units x rate plus additional blocks, capped at billed (SVC-BR-LGL-045); the fallback pays the billed amount at the Standard rate, clearing IME/MCO/NegotiatedRate reasons (SVC-BR-LGL-046). - CheckForDuplicateService(caseId, providerLocationId, billId, line): an exact match (provider, case, code, from-date, billed amount) on another bill pays 0 with reason DuplicateBill; a same-provider/case/date match sets
IsPossibleDuplicate = true(SVC-BR-LGL-047).
BillPaymentService¶
Legal/Bills/BillPaymentService.cs (IBillPaymentService; IDocumentService, IFinancialTransactionService, Guidewire IClaimDataApiClient/IActivityDataApiClient/IFinancialDataApiClient).
- GenerateCheckTransactionsAsync(issueDate, controlReport): bulk status Approved to ReadyToPay, then for each ReadyToPay bill: zero/negative paid sum is counted as zero-pay only; bills with no parent go through
GenerateCheckTransactionAsync; bills with a parent go throughGenerateTransactionsForAdjustedBillAsync(SVC-BR-LGL-050, SVC-BR-LGL-051). - GenerateCheckTransactionAsync: calls
IFinancialTransactionService.CreateLegalCheckTransaction(bill, issueDate, approverId); a non-empty response sets status Paid andIssueDate; anInvalidPaymentAddressExceptiontriggersRejectBillForAddressCorrection(status ApprovedWithChange plus an email throughIDocumentService.EmailService.SendEmail) (SVC-BR-LGL-052). - GenerateTransactionsForAdjustedBillAsync: requires exactly 1 line, a Paid-grouping parent, and an amended original line (SVC-BR-LGL-053); a positive delta creates a check via
CreateLegalCheckTransaction; a negative delta calls GuidewireGetGWClaimFinancialsto find the parent payment thenCreateRecoveryAsyncwithRecoveryFinancialData(CostCategory = Legal,CostType = CostTypeExpenseDC,Exposure = GeneralDamage,PayeeRole = CheckPayee,RecoveryCategory = recovprov_ext); either path sets status Paid (SVC-BR-LGL-054). - GenerateZeroPaymentLetters(batchArgs):
XPrintControl, ReadyToPay bills with paid sum 0,ZeroPaymentper zero-paid line with an adjustment reason (payment address, Guidewire claim, "Legal Bills Zero Pay Letters" banner); sets Paid and adds anXDocument(".ps") (SVC-BR-LGL-055); writes the xPressions XML. - GetAttorneysWithPendingLegalBills: per active attorney, count/email/name of PendingApproval bills.
- UpdateBillStatus(from, to): bulk status change with history. ReturnBillPayment(billId, msgs): requires Paid status and no amended line ("Error: The bill could not be found" / "Error: The amended bill cannot be returned");
GetGWClaimFinancials+CreateRecoveryAsyncfor the first line's amount; zeroes paid amounts and sets PaymentReturned (SVC-BR-LGL-056).
BillServiceHelper¶
Legal/Bills/BillServiceHelper.cs (IBillServiceHelper). UserAuthorityLevel(employeeId, purpose, paymentType) reads active EmployeeAuthorityLimit rows for Payments/function/purpose (SVC-BR-LGL-060). GetNextIssueDate(code) returns PaymentTransactionTypeCode.NextIssueDate or today. IsValidIssueDate requires >= next issue date, <= today+14, and a working day (SVC-BR-LGL-061). IsValidReceivedDate/IsValidServiceFromDate/IsValidServiceThruDate implement the injury-date/today windows (SVC-BR-LGL-027, 028, 029. GetBillNotes, GetFinancialTransaction, LogError, UnitsToQuantityString are supporting lookups/formatters.
LegalNotesService¶
Legal/Notes/LegalNotesService.cs (ILegalNotesService). GetNotes(criteria): throws ArgumentNullException if CaseId == 0 (SVC-BR-LGL-070); filters by case/date/category, then SetNoteAccessProperties computes CanEdit (LNNoteSupervisor or creator, within 2 working days, not system-created) and CanEditNoteInfo (SVC-BR-LGL-071). CreateNote/UpdateNote require LNUpdate (SVC-BR-LGL-072), validate with LegalNoteValidator, and (for update) check UpdateNumber concurrency; append text is stamped "ADDED {date} by {user}". DeleteNote blocks system-created notes and requires CanEdit (SVC-BR-LGL-073). PrintNotes calls GeneratePdf("Legal_TaskAndNotes_CaseNotes", xml).
SubpoenaService¶
Legal/Subpoenas/SubpoenaService.cs (ISubpoenaService; ILocationQueryProvider, IGoogleMapsApiServiceProxy, ICCClaimApiService).
- GetInboxItems: not-Paid/not-ReadyToPay subpoenas with Guidewire claims, conflict masking (SVC-BR-LGL-012), requester user id, and a witness list.
- GetCalculatedSubpoenaPayment(fromLocation, toLocation): round-trip mileage via
IGoogleMapsApiServiceProxy(doubled), retried once with a stripped address line on failure, else mileage 0 with an error message; mileage cost = round(miles xMileageRate, 2); paid = flat fee + mileage cost when miles > 0 (SVC-BR-LGL-080; an overload accepts miles directly, treating negative miles as 0. - GetSubpoena: loads the subpoena ("Subpoena not found" if missing) with formatted recipient addresses.
- GetApprovalEmail: sent to
LegalSubpoenaApprovers@saif.comwith a deep link to the Subpoena entry UI (SVC-BR-LGL-081). - InitiateEmployeeList, ListOfHearingLocations (excludes "FED"), DefaultComplianceDate/MinimumComplianceDate (next LS issue date +14/+7 days, SVC-BR-LGL-082), CurrentUserPaymentLimit/CurrentUserApprovalLimit for the Subpoena payment type.
SubpoenaSaveService¶
Legal/Subpoenas/SubpoenaSaveService.cs (ISubpoenaSaveService).
- ApproveSubpoena: approved only if the user's initiate or approve limit >= the maximum recipient paid amount (SVC-BR-LGL-083); otherwise unchanged.
- DisapproveSubpoena: status InProgress. DeleteSubpoena: hard delete.
- SaveSubpoena: defaults status InProgress and type MedicalRecords; validates with
SubpoenaValidator/SubpoenaRecipientValidatorunless Paid;UpdateNumberconcurrency check; an opposing-counsel firm with no address blocks the save (SVC-BR-LGL-084);SetSubpoenaDatacomputes appearance date-time, nullsMinValuedates, truncates special-delivery text to 1000 characters, and setsIssueDateto the next LS issue date (recomputed on approval, +2 work days for witness types) (SVC-BR-LGL-085);SaveRecipientsupserts provider recipients (registered agent + provider location) and witness recipients (LegalPerson/LegalPersonAddress, uppercased state).
SubpoenaPaymentService¶
Legal/Subpoenas/SubpoenaPaymentService.cs (ISubpoenaPaymentService; IFinancialTransactionService, IFinancialDataApiClient, Guidewire IClaimDataApiClient).
- GenerateCheckTransactionsAsync(controlReport): spend category from
BillServicecodeSubpoenaFee; Approved subpoenas whose issue date matches the next issue date forPaymentTransactionTypeCode.Subpoena(non-"NOML" first); MedicalRecords/Claims types with anInvalidPaymentAddressExceptionon any recipient reject to InProgress plus an email, otherwise callIFinancialTransactionService.CreateSubpoenaCheckTransactionsand set ReadyToPay; witness types go straight to ReadyToPay with no check created here (SVC-BR-LGL-086). - UpdateSubpoenaStatus(from, to): only for the next-issue-date subpoenas.
- ReturnSubpoenaPaymentAsync(recipientId): the recipient must exist and not already be returned; Guidewire
GetGWClaimFinancials+CreateRecoveryAsyncforAmountPaid; zeroes the paid amount and stampsReturnedDate(SVC-BR-LGL-087).
SubpoenaDocumentService¶
Legal/Subpoenas/SubpoenaDocumentService.cs (ISubpoenaDocumentService; IDocumentService, IProviderInformationService, IPolicyInformationService, ICCClaimApiService).
- GetPreviewSubpoena(id): first recipient; standard opening text; special-handling code (CERT/NOML) appended; renders package "Payment_Legal_Subpoena_sSub".
- PrintSubpoena(id, processServerEmailList): package "Payment_Legal_Subpoena", duplex for MedicalRecords/Claims/OtherMedical types, 2 copies for a process server with no email list or a no-process-server zero-pay-no-mail case (SVC-BR-LGL-088); non-zero-pay witness types also run
GenerateCashDisbursements(emails package "Fin_DC_F269" toAPInvoices@saif.comin production, GL601.030); an email list triggersEmailSubpoenaToProcessServerwith the PDF attached and a computed serve-by date. - AddSubpoenaDocumentToList, GenerateCashDisbursement support document records and cash-disbursement XML (empty when the approver is missing or paid = 0; account 601.030, division 5201).
- CreateDocumentRecord (private): the Guidewire claim must exist, else "The claim {id} does not exist in Claim Center." (SVC-BR-LGL-089); attorney signature reads "Special Assistant Attorney General" for state-entity policies, else "Trial Counsel" (SVC-BR-LGL-090); opposing-counsel address falls back through Correspondence, Physical, then the worker's Home/Mailing/Primary address.
SubpoenaLabelService¶
Legal/Subpoenas/SubpoenaLabelService.cs (ISubpoenaLabelService; ISimpleCertifiedMailServiceProxy). GenerateBatchLabels/GenerateRecipientLabels: ReadyToPay CERT-handling subpoenas get per-recipient labels via ISimpleCertifiedMailServiceProxy.SaveLabelAsGif; a SimpleCertifiedException triggers an "ACTION REQUIRED - Certified Label creation failure" email (SVC-BR-LGL-091). GenerateOpposingCounselLabel: firm label, else worker label; unknown page count returns size Unknown.
ZeroPaySubpoenaProcess, WitnessSubpoenaProcess, OpposingCounselService¶
Legal/Subpoenas/ZeroPaySubpoenaProcess.cs, WitnessSubpoenaProcess.cs, OpposingCounselService.cs -- xPressions batch document generators.
- ZeroPaySubpoenaProcess.GenerateZeroPayDocuments: ReadyToPay provider-type subpoenas with
PaidAmount == 0; generates labels for mailed recipients; document config (CERT, "Deliver to Mail Room"/"Deliver to Transformers Team" outside production),XPrintControl, and anXDocumentwith an OnBase IDX string (file LEGAL, category "LG - LEGAL WORK PRODUCT", type SUBPOENA) (SVC-BR-LGL-092); errors are emailed to developers. - WitnessSubpoenaProcess.GenerateWitnessDocuments: ReadyToPay witness types split by
ProcessName("WITNESS"/"CASHDISBURSEMENT" vs process-server/zero-pay-no-mail) (SVC-BR-LGL-093); "WITNESS" also generates labels;GenerateWitnessCashDisbursementRequestconcatenates each recipient's cash-disbursement XML. - OpposingCounselService.GenerateOpposingCounselDocuments: ReadyToPay provider-type subpoenas (excluding Claims+DoNotMail), one document per subpoena with an envelope chosen from label size (SVC-BR-LGL-094; sets all selected subpoenas to Paid and commits only if the updated count matches the selected count, otherwise rolls back and returns 0.
LegalTaskService¶
Legal/Tasks/LegalTaskService.cs (ILegalTaskService, extends ValidatingServiceBase; IClaimInformationService, IImagingClient, IWorkCalendarService, IClaimQueryProvider, IWorkerQueryProvider, ICCClaimApiService, IClaimDataApiClient).
- GetTasks(filter): returns empty for an empty
ValidGroupsor an invalid group user (SVC-BR-LGL-100); base query is LEGAL source (or IMAGE excluding POLCY) withTaskUser != "INFO"; returns empty without a user or resolved claim (SVC-BR-LGL-101); top 300 results, newest first (SVC-BR-LGL-102); claims from GuidewireGetClaims; worker name and task text are masked "Confidential" for restricted/conflict/secure claims without access or override (SVC-BR-LGL-103); images come fromIImagingClient.GetImagesin batches of 1000. - CreateTask/CreateTaskStateless:
FillTaskData(category LGLT with a case, CLMM otherwise; context key is the case id or claim number; INFO user getsMaxValuedate and Info priority; otherwise the date moves to the previous working day and priority is Urgent or the category default), validated withLegalTaskValidator(SVC-BR-LGL-104). - UpdateTask: missing task gives "Error: Invalid Activity ID."; concurrency check; task text is cleaned only without restriction or with access; priority Urgent or Medium;
IsCompleterunsCompleteTask. - CompleteTask (private): restricted/secured claims without access return null/false; an IMAGE LEGAL task requires a note category (SVC-BR-LGL-105); soft-deletes and calls
CreateTaskNote, which throws if note preferences (key "CategoryCode") are missing, attributes the note to the responsible adjuster for inmate/secure claims, and writes aLegalNote(LGLT/LEGAL) or aClaimNote(category LEGAL, type UPDT) otherwise (SVC-BR-LGL-106-or-claimnote-(legal%2Fupdt). - DeleteTask/CompleteTasks/DeleteTasks: restricted/secured without access is blocked (SVC-BR-LGL-108); otherwise soft-deletes, noting when
IsSavedToNotepad. - ReassignTasks: optional user/date/priority/text changes; text changes require an image and an unmasked worker (SVC-BR-LGL-107).
- GetClaimDocumentURL/GetCaseDocumentURL, PrintTasks, CanUserEdit (LNUpdate), IsValidClaim, IsValidWorkDate, AdjustTaskDate, HasMedia: supporting operations.
Policies, certificates, output documents, RCT, and documents¶
This area covers Policies/** (Certificates, DcbsOregonBusiness, Information, PayrollReport, PolicyAssociation, PolicyDocumentsApi, SecurityServices), OutputDocuments/**, Rct/** and Documents/**. It implements certificate-of-insurance issuance/renewal/resend, certificate holder and preference maintenance, Oregon-business-registry file processing, policy security/association lookups, the policyholder/agency document inbox (release, hold, replace, view), Oregon RCT (Retroactive Coverage Transmission) staging/XML export, and the generic document-template/request/distribution engine. Unqualified source citations in this area (an ID with the rule number omitted) map to the SVC-BR-POL-* series (Policies and certificates) or the SVC-BR-DOC-* series (Documents), depending on the subsystem cited.
CertificateService¶
Policies/Certificates/CertificateService.cs (ICertificateService; IValidationService, ICertificateInformationService, ICertificateSecurityService, certificate/util IDocumentService, ICertificatePreferenceService, ICertificateDistributionService).
- AddCertificate(edit, distributionOptions):
CertificateSecurityService.CertificateCanBeAddedchecks add rights (SVC-BR-POL-020, SVC-BR-POL-021); validates withCertificateValidator(SVC-BR-POL-001..009;CurrentCertificateHolderId == 0forces the holder action to Add (SVC-BR-POL-030); builds the certificate (batch-print status, create/update/issue stamps, holder-action processing except for Bid certificates, SVC-BR-POL-031); images it viaDocumentService.GetCertificateDocumentStream+CertificateDistributionService.ImageCertificate; saves and distributes; rolls back on any exception. - ProcessCertificateHolderAction (internal): NoUpdate loads the existing holder; Add creates a new one; Expire calls SAIF.Domain
CertificateHolder.Expire()then creates a new holder; Supersede (only whenCurrentCertificateHolderId != 0) creates a new holder then calls SAIF.DomainCertificateHolder.Supersede(new)(SVC-BR-POL-032). - EditCertificate(id, edit, opts): throws "Error: Certificate not found." if missing; checks edit rights (SVC-BR-POL-022-%3D-any-certificate%3B-maintainown(osc)..024) and validates;
DidCertificateChangecompares DBA, period, holder, names, address, job description, other coverages, and cancel-notice flag (SVC-BR-POL-042): a change sets a new issue date/user and distribution point New, otherwise Resend; re-images only when changed; distributes and commits. - DeleteCertificate(id): checks edit/delete rights (same POL-022..024 range) then deletes.
- RenewCertificate(id, edit, renewalPeriod, opts): confirms the certificate has not already been renewed (SVC-BR-POL-025) (the renew-authority check, SVC-BR-POL-026; sets
RenewedFlagon the original, builds the new certificate (IsRenewalCertificate = true, effective at the renewal period), images, adds, distributes and commits. - ResendCertificate(id, opts): previews the stream, redistributes it, and resets batch-print status in its own transaction only when mailing to the certificate holder (SVC-BR-POL-043).
- Reads:
GetCertificate,GetCertificates(policy, period),GetCertificatesReadyForBatchDistribution,GetEditableCertificates,GetStandardOtherCoverageTexts;PreviewCertificatethrowsImageNotFoundwhen no image exists;SetCertificateBatchPrintStatusimplements the DoNotPrint/ReadyToPrint mapping (SVC-BR-POL-040, SVC-BR-POL-041.
CertificateSecurityService¶
Policies/Certificates/CertificateSecurityService.cs (ICertificateSecurityService). CanCurrentUserViewOsc (SVC-BR-POL-050); CanCurrentUserAccess(OtherStatesPolicy) (SVC-BR-POL-051); CanCurrentUserAdd/AddOsc/Renew/RenewOsc and CertificateCanBeAdded are resource checks (SVC-BR-POL-020, SVC-BR-POL-021, SVC-BR-POL-026; CertificateCanBeEdited/Deleted (SVC-BR-POL-022-%3D-any-certificate%3B-maintainown(osc)..024); CertificateCanBeResent is always true (SVC-BR-POL-027; CertificateOtherCoveragesCanBeMaintained (SVC-BR-POL-052); GetCertificateModificationCutoff = today minus 9 days (SVC-BR-POL-024).
PolicyAssociationService¶
Policies/PolicyAssociation/PolicyAssociationService.cs (IPolicyAssociationService). GetPolicyAssociations(policy[, type])/GetAllPolicyAssociations query PolicyRelationship (parent/member) and Policy (relationship and experience-rating associations); an unsupported association type throws "Invalid associationType for this method."
PolicyInformationService and PayrollReportService¶
Policies/Information/PolicyInformationService.cs (IPolicyInformationService) and Policies/PayrollReport/PayrollReportService.cs (IPayrollReportService). GetPolicyName, IsPolicyStateEntity are Policy queries. GetPayrollReport delegates to PolicyQueryProvider.GetPayrollReportForReportId.
OregonBusinessService¶
Policies/DcbsOregonBusiness/OregonBusinessService.cs (IOregonBusinessService; IErrorConditionHandler). ProcessOregonBusinessFile(log, path) parses the DCBS file, adds an OregonBusiness row per record, and throws "Error in Processing Oregon Businesses- review the log file" on any parse/save error.
PolicyDocumentsApiService¶
Policies/PolicyDocumentsApi/PolicyDocumentsApiService.cs (PolicyDocumentApi.IPolicyDocumentApiService; IPolicyDocumentsService, IPayrollReportService, IImagingClient, IPdfClient).
- GetPayrollReport(reportId):
ValidateReportId(a null report or id 0 gives InvalidReportId, SVC-BR-POL-080);ValidatePayrollReportStatusmaps null docs to UnknownError, no docs to HistoricalReportNotFound, and any not-released to ReportNotReleased (SVC-BR-POL-081); on failure returns an empty PDF; otherwise takes the first packet, fetches each image viaIImagingClient.GetPdf(DocTypeGroup.POLICY, id), and merges withIPdfClient.Merge(any exception returns an empty byte array). - AreDocumentsViewableToPolicyholder: unless the policy status group is "APP" (SVC-BR-POL-082). GetPolicyholderViewableDocuments delegates to
PolicyDocumentsService. HasValidCurrentUserAccess: requires PolicyPayrollReportExternal, PolInfoMntUpdtExt, or the SAIF domain (SVC-BR-POL-083). GetPolicyNumberForPayrollReport: supporting lookup.
PolicyDocumentsService¶
OutputDocuments/PolicyDocumentsService.cs (IPolicyDocumentsService; IPolicyAssociationService, IPolicySecurityService, IPolicyQueryProvider, IImageQueryProvider, IPolicyOutputDocumentRepository).
- GetPolicy(policy, assocType): loads the policy and its non-application associations, filters with
PolicySecurityService.ValidatePoliciesForCurrentUser(SVC-BR-POL-076); a single remaining association is displayed as "None" (SVC-BR-POL-084); demo users see masked names ("Policyholder", "Policyholder Legal Name", "SAIF Appointed Agent") (SVC-BR-POL-085. - GetPayrollReportDocuments/GetPayrollReportPackets:
GetPayrollReportForReportId, thenGetPolicyOutputDocumentsBySourceKeyText(packetSeq), then SAIF.DomainPacketManager.CreatePackets. - GetAgencyViewableDocuments/GetPolicyholderViewableDocuments (with/without category): released agency-viewable documents packeted, with the policyholder versions also keeping only
IsPolicyholderViewable. - GetHeldAndPendingDocuments: held-and-pending agency-viewable documents. GetDocumentsForAgency(filter): cutoff =
DocumentSystemDateminusDaysBack(SVC-BR-POL-086); packets a producer-filtered inbox, applies demo masking, adds LEASE ("Client of... #") / WRAP ("Subcontractor of... #") description prefixes (SVC-BR-POL-087), and sorts newest-first. - AddDocument/AddPacket: resolves the type/package code and adds a Pending
PolicyOutputDocument. DeleteDocument: concurrency check (SVC-BR-POL-088) then status Deleted. HoldDocuments: toggles Held/Pending, erroring "There are no document holds to..." when nothing changes (SVC-BR-POL-089). ReplaceDocument: concurrency check; on failure adds a Deleted document for the replacement image and rethrows; on success marks the old document Deleted, adds the new one with the old status, and updatesOutputLog.ImageId. MarkAgencyDocumentViewed/MarkAgencyDocumentsDeleted/UnDeleted: viewed flag and bulk delete/restore, erroring when nothing changes. - GetImage, GetDocument, GetDocumentsForPacket (requires a released document, SVC-BR-POL-090), GetCategories, GetManualAddDocumentTypes, GetDocumentDate: supporting reads.
PolicyDocumentsBatchService¶
OutputDocuments/PolicyDocumentsBatchService.cs (IPolicyDocumentsBatchService; ITaskFactory, IAgencyService, IEmailService, INoteService).
- ReleaseDocuments(reportOnly): releases pending documents whose
DocumentDate <= document system date(SVC-BR-POL-091), stampingReleaseDate; generates direct-writer notifications only for paperless SAIF agencies (SVC-BR-POL-092);reportOnlyrolls back instead of committing and skips emails/updates (SVC-BR-POL-093). - GenerateAllExternalAgencyNotifications: emails agency/producer lists for released, inbox-viewable, not-yet-viewed documents with an agency id (skipped under
reportOnly). - RevertUserlessAgencies: for each reverting agency, unsets paperless flags and sends an internal email (default calling user "SYSTEM"; skipped under
reportOnly). - GenerateHoldTasks: creates hold-notification tasks via
ITaskFactory/INoteService.
ViewDocumentService¶
OutputDocuments/ViewDocumentService.cs (IViewDocumentService; IContextValidator, IPdfClient, IImagingClient). GetImageFile(imageId, packetId): throws FileNotFoundException if the document is missing; ContextValidator.ValidatePolicyNumber failures become UnauthorizedAccessException (SVC-BR-POL-094); fetches the PDF (single image or merged packet), retrying once if null.
ContextValidator and ContextParser¶
OutputDocuments/ContextValidator.cs / ContextParser.cs. ValidatePolicyNumber implements the POL-094 policy-context check. ValidateAgencyNumber throws "InvalidAgencyContext" for a missing agency. ContextParser.GetPolicyNumber/GetAgencyNumber throw No/InvalidContext exceptions when the context is absent or malformed.
Rct (Retroactive Coverage Transmission)¶
Rct/RctPolicySelectedService.cs, RctPolicyToTransmitService.cs, RctServicePlanService.cs, RctStagingService.cs, RctXmlService.cs.
- RctPolicySelectedService: Get/Insert/Modify CRUD on
RctPolicySelected. - RctPolicyToTransmitService: Get/RemoveAll/Remove/Insert/Update CRUD on
RctPolicyToTransmit; PolicySelectionAsync(reloadFlag, processDate) calls GuidewireICCClaimApiService. - RctServicePlanService.ProcessAllServicePlans(csv): for each row, the policy must exist (SVC-BR-POL-100) and the service-plan code must be valid or "NA" for removal (SVC-BR-POL-101;
ProcessOneServicePlanexpires/inserts/ignores anRctPolicyServicePlanrow; any per-row failure rolls back the entire batch (SVC-BR-POL-102). - RctStagingService:
LoadRctPolicyStagingDataadds staging policies/locations;RemoveAllRctPolicyStagingDatadeletes them; both acceptreportOnly. - RctXmlService:
GetXmlAndWriteXmlFilesOutreads staging data and county codes then formats the policy XML;GetRctXmlMemoryStringvalidates against the embeddedEvolutionSAIF.xsd;WriteXmlToFtpFolderthrows "Rct xml file write not successful..." on failure.
Documents (generic template/request/distribution engine)¶
Documents/DocumentBuildService.cs, DocumentDeferredService.cs, DocumentParameterService.cs, DocumentRequestService.cs, TemplateSearchService.cs.
- DocumentBuildService.GetRequestedDocument(request[, params]): combines the request and parameter services, then renders through
IDocumentService. - DocumentDeferredService:
SheetCountreads the output file under configxpressionsoutputdocumentspath;GetCertifiedLabelcallsISimpleCertifiedMailServiceProxyand copiesIsProductionMode;GetDocumentLabel,AddressErrorMessageare supporting helpers. - DocumentParameterService: gets template/request parameters;
StoreOriginalDocumentRequestParametersadds aDocumentRequestParameterper template parameter (failure throws "Error: Store paramaters failed");SaveChangedDocumentRequestParameters(failure throws "Error: Change paramaters failed");NeedVocCoordinatorsapplies when a parameter's DataType is "SELECTVOC" (SVC-BR-DOC-010);LoadClaimDataToRequestParametersuses the claim unit of work. - DocumentRequestService:
SubmitDocumentRequestrequires the template to exist (SVC-BR-DOC-001) and adds aDocumentRequestLog(failure throws "Error: Store request failed");UpdateRequestStatusvalidates againstDocRequestLogStatusCode(SVC-BR-DOC-002) and requires the request to exist (SVC-BR-DOC-003);SetRequestAsCompletereuses the same existence check; distribution-log CRUD requires the distribution to exist (SVC-BR-DOC-004);MarkDocumentRequestsInProcess,UpdateDocumentRequestAndDistribution,ResetDocumentRequest,IsWordDocument(output profile "WORD") are supporting operations. - TemplateSearchService: template searches are filtered by admin role, DocCenterDevAdmin/DocCenterProdAdmin seeing all templates and others a filtered set (SVC-BR-DOC-020);
CreateTemplate/UpdateTemplatevalidate and throw the first error (SVC-BR-DOC-022); adds/deletes template output profiles and options;DeleteTemplaterequires the template to exist ("That document template does not exist.", SVC-BR-DOC-021) and cascades to distributions and request logs;DisableTemplate,GetDocumentSqlLinesand code-table lookups round out the service.
Collections, agencies, groups, imaging, and utilities¶
This area covers Collections/**, Agencies/**, Groups/**, Imaging/**, OnlineSupport/**, OnlineMessages/**, Notifications/**, SystemUsers/**, Tasks/** (collections/marketing/underwriting task factory), Utilities/** (including CleanAddress adapters, PDF tracking, Workfront), AddressVerificationService/**, PositivePay/**, Corporate/** and Employees/**. It implements the collections-case ledger (debtors, notes, tasks, transactions, interest, cash-receipts batch posting, SOIL department-of-revenue offsets), agency and group profile/imaging maintenance, imaging auto-import (IDX generation), MCO enrollment-document export, online-support error logging, online messages/tutorials, OnBase notification rule matrices, the Guidewire user-access extract, marketing/underwriting task creation, address cleansing/verification, PDF-tracking purges, IS/Workfront incident reporting, positive-pay file generation, purchase-order notifications, and the employee directory. Rule citations that use the SVC-BR-COL-* prefix link directly (numbers 050-056 and 060-064 are consolidated under the single SVC-BR-COL-050 and SVC-BR-COL-060 headings respectively). Many SVC-BR-MSC-* numbers cited in the source (roughly 030 and above) have no corresponding heading in Business rules; those behaviors are described here in prose without a bracketed rule citation.
Collections: CollectionsService¶
Collections/CollectionsService.cs (ICollectionsRepository; extends ValidatingServiceBase). Every save runs through ValidateAndAddErrors<T> -> IValidationService.Validate.
- GetCaseById/GetCaseSummaryById/GetRequestById: loads
DataModel.Case(a missing case yields an emptyCase, or null forGetCaseByIdwithId == 0); summary variants add category totals and, for a policy case, the market type;CaseTypeis derived from the case code (SVC-BR-COL-001); county is resolved viaGetCountyCodes(). - GetCasesByReference(referenceId): a 7-or-8-character reference is shortened to 7 characters (SVC-BR-COL-002); for WRKR/FOTH/THRD/CTHRD codes it fetches the Guidewire claim synchronously to build a "claim# - Last, First Middle" description.
- GetDebtors(caseId)/GetDebtor(id):
GetAdditionalDebtorDataresolves contact info by case type (ClaimOther, Claim via Guidewire worker address, Policy, ThirdParty); name/SSN fall back to the worker API when blank (SVC-BR-COL-003); for POL/FPOL, the location defaults to the policy "POL" mailing location, showing "-- Invalid address --" when it is not an active policy location (SVC-BR-COL-004);GetDebtorsmasks the SSN toxxx-xx-####without LegalColUpdate (SVC-BR-COL-005). - GetDebtorName/GetPrimaryDebtorName/GetDebtorSsn: repository read, falling back to the worker API when blank and
WorkerID > 0. - CreateDebtor(caseId, edit, msgs): validates with
DebtorValidator(SVC-BR-COL-030..036); adds aLocation(code LGCOL, primary, uppercased state) and aDebtorlinked to the case; if the statement is not held, a second transaction setsLastStatementDateto the first of the current month and recomputes the balance (SVC-BR-COL-006. - SaveDebtor: validates, updates or creates the Location, updates debtor fields, and recomputes the last statement date/balance when the statement-held flag toggles from true to false (same SVC-BR-COL-006 rule).
- UpdateDebtors(caseId, list): for POL/FPOL, a chosen location equal to the default mailing location is stored as null (SVC-BR-COL-007); the first invalid debtor stops the batch with nothing committed.
- DeleteDebtor: deletes the debtor's Location (if any) then the Debtor.
- Notes:
GetNotes/GetNoteextend the thru-date to 23:59:59 and setCanEditwhen today is within 2 working days of creation (SVC-BR-COL-008);SaveNoteappends "ADDED {date} by {USER}" for append text (SVC-BR-COL-009);CreateNotevalidates then adds;DeleteNotedeletes with no checks. - SaveRequest(caseId, Request, activities, msgs):
UpdateNumconcurrency check (SVC-BR-COL-010); validates the request (RequestValidator, SVC-BR-COL-037..039) and each activity (ActivityValidator, SVC-BR-COL-025..027; county code "C7" setsState = "WA", otherwise "OR" (SVC-BR-COL-011); for a new case, sets the collection code and zero balance, then runsGenerateDebtors(SVC-BR-COL-012..015). - GenerateDebtors (private): Claim cases get one debtor via the Guidewire claim's worker; Policy cases get one generic debtor (CPOL) or one per active
BusinessAffiliate(other codes) (SVC-BR-COL-013); ThirdParty cases get debtors fromThirdPartyCasesplit by THRD (has a Person) / CTHRD (no Person) (SVC-BR-COL-014); FOTH cases get no automatic debtors, and generated debtors default to statement-held and excluded from SOIL (SVC-BR-COL-015). - ValidateContext(caseType, context, out name): a "POL" type resolves
Policy.PolicyName("Invalid policy number." on any exception); otherwise resolves the Guidewire claim ("Invalid claim number." if the worker is null or an exception occurs) (SVC-BR-COL-038. - GetSearchResults(criteria):
_workerDataApiClient.FindClaimswhenPolicyNameis blank; wildcardsterm%(StartsWith) or%term%otherwise, with a missing first/last name becoming%(SVC-BR-COL-016); results capped at 300 rows (SVC-BR-COL-017). - Tasks:
CreateTaskvalidates withCollectionTaskValidator(SVC-BR-COL-028/029, setsTaskUser = "SYSTEM", resolvesContextKeyto PolicyNum or claim number, and stamps Source COLL/Category COLL/Action NONE/Priority MED (SVC-BR-COL-018);GetTasksfilters source COLL, not deleted, capped at the first 300 by date descending (SVC-BR-COL-019);DeleteTasksoft-deletes;SaveTaskupdates date/text and validates;ValidateCollectionTaskCriteriarequiresThruDate >= FromDate. - Transactions:
GetTransactionssetsCanEdit = falsewhen the transaction predates the last statement date, is referenced by aPaymentRef, hasPayDownOrder == 0, or is system-generated (SVC-BR-COL-020); InsertTransaction validates withTransactionValidator(returns -1 if invalid), lowers the balance forPayDownOrder == 0(payment) or raises it otherwise (SVC-BR-COL-021), then in a separate transaction callsCollectionsRepo.ApplyPayments(caseId, date)(SVC-BR-COL-022%60-runs)); SaveTransaction checksUpdateNumconcurrency, adjusts the balance by the delta whenCanEdit, and clearsApprovedByUserwhen approval is not required (SVC-BR-COL-023); DeleteTransaction deletes and reduces the balance; GetTransactionCodes setsIsInterestAllowed = PayDownOrder != 0(SVC-BR-COL-024). - Lookup lists:
GetActivityCodes(with a "--Select--" option),GetCountyCodes(Oregon counties plus synthetic "C7" out-of-state/WA),GetCreditReps/GetWriteOffApprovalUsers(non-expired only). IsUpdateUser:IsAuthorized("LegalColUpdate").
Collections: CalculateInterestService¶
Collections/CalculateInterestService.cs (ICalculateInterestService). CalculateInterest(runDate, caseId, reportOnlyMode, controlLog, interestReport, emailList): computes interest via CollectionsRepo.GetInterest(caseId, runDate) (SVC-BR-COL-045); always sends the report first (PDF package "Claims_Batch_LCB0003", emailed from Helpdesk@saif.com to the given recipients, even in report-only mode, SVC-BR-COL-046); when not report-only, adds the interest amount to the case balance and creates an INT "Interest Charge" transaction (IsSystemGenerated = true) per row, then commits; always returns true.
Collections: CashReceiptsService¶
Collections/CashReceiptsService.cs (ICashReceiptsService). ApplyCashReceipts(runDate, controlReport, controlLog, emailList) returns 0, 5 or 6: no unbalanced BatchControl rows for the run date returns 6 without posting (SVC-BR-COL-040); the first batch that fails to balance returns 5 with no report (SVC-BR-COL-041, reduces the case balance, and marks the receipt processed; a count/total mismatch against BatchCount/BatchAmount rolls back and returns false (SVC-BR-COL-042); on success, calls ApplyPayments(caseId, batchDate) for each distinct affected case (SVC-BR-COL-043. GenerateReport groups receipts into Fraud (WRKR/FPOL/FOTH) and Third-party (THRD/CTHRD) totals (SVC-BR-COL-044); PDF package "Claims_Batch_LCB0009", emailed as "CashReceipt.pdf".
Collections: GenerateTasksService¶
Collections/GenerateTasksService.cs (IGenerateTasksService). BatchTasks(prevWorkDay, ...) runs, in order: RemoveExitingTasks (soft-deletes today's own tasks to prevent rerun duplicates); PolicyPaymentTasks (missing policy payments, SVC-BR-COL-050; ThirdPartyPaymentTasks; DebtorsWithExpiredLocTasks; BalanceAtMinimumTasks (balance brought to the minimum threshold, ~$100*); JudgmentExpiringTasks (judgment-years cases nearing expiry, filtered in memory because the LINQ provider does not support the date computation). SetCommonPropteryValues stamps TaskUser (case credit rep), TaskDate = Today, ContextKey (PolicyNum or SAIF claim number), Source COLL/Category COLL/Action NONE/Priority MED (all rolled up under SVC-BR-COL-050.
Collections: SoilService¶
Collections/SoilService.cs (ISoilService; IWorkerDataApiClient). LoadDeptRevenueSoilBalance(fileName, ...): skips lines <= 60 characters; parses fixed-position SSN/name/reference/balance fields; merges duplicate SSNs by summing balances and concatenating reference text (SVC-BR-COL-060; inserts into DeptRevenueSoilBalance. UpdateSoilDebtorReference(runDate): stages worker addresses in TempDataPersonAddress, calls CreateSoilDebtorReferenceRecords (stored procedure), then clears the temp rows. GenerateSoilAdjustments(runDate): the same temp-table pattern with CreateSoilAdjustmentRecords, then tallies DeptRevenueSoilAdjustment rows by transaction code (A=add, C=change, D=delete). CreateSoilFile(runDate, fileName): writes a fixed-format ASCII CSV ordered by SSN with program code "879", a fixed interest block, and a placeholder address, stripping commas from name parts (all under the consolidated SVC-BR-COL-060 heading).
Collections validators¶
Collections/Validators/ActivityValidator.cs, CollectionTaskValidator.cs (extends Tasks/TaskValidator<T>), DebtorValidator.cs, NoteValidator.cs, RequestValidator.cs, TransactionValidator.cs implement the field-level rules cited above (SVC-BR-COL-025..039).
Agencies: AgencyService¶
Agencies/AgencyService.cs (IAgencyService; IDocumentService, IEnvironmentService, IImagingClient; mapping in Agencies/AgenciesMappingHelper.cs).
- GetAgency(id): maps latest contract description, paperless status (Paperless/Pending/Papered), agency agent vs. producers, underwriter (team function with
UnderwriterCode), title-cased names, andIsActive(no expiration date); demo users see producer/agent names masked as "Producer" (SVC-BR-MSC-001). - GetAgencySearchResults(term, maxHits): matches id or name; with
maxHits > 0, orders active-first, then starts-with, then contains, then name (SVC-BR-MSC-002). - GetPaperlessAgencyIds/GetRevertingAgencies: paperless agencies with no active users are "reverting" (SVC-BR-MSC-003).
- GetAgencyActiveUserStatus(agencyId): id 0 is always true; otherwise checks for a non-deleted
ExternalUserTypematching the customer group, excluding test/production-test users in production (SVC-BR-MSC-004). - GetEmailListForAgencyNotification/GetEmailListForProducerNotification: only active, non-blank, non-deleted, opted-in emails (SVC-BR-MSC-005).
- UpdateEmailNotification: creates/deletes a
DocumentNotification; returns false if already in the requested state. UpdatePaperlessRequest/UpdateAgencyPaperless: setsAgencyPaperlessflags with stamps. - ProcessConfirmationEmail(agencyId, pdfPath, fileName): emails the PDF from
NoReply@saif.com, images the email (package "General_Image_EmailNotification", category "AG - ADMINISTRATION"), and uploads the agreement PDF viaImagingApiClient.Upload(SVC-BR-MSC-006).
Agencies: Agencies.Imaging.ImageService¶
Agencies/Imaging/ImageService.cs (IAgencyImageService; security levels 0 = non-confidential, 50 = confidential).
- AddImage: links an
ImageAgencyto an existing agency and image ("Error: Agency not be found."/"Error: Image not be found."). DeleteImage: soft delete, no permission check. - EditImage: requires
CanUserEditImages(SVC-BR-MSC-011); may move the image to another agency; validates withImageEditValidator(SVC-BR-MSC-007); the document type must match the agency file code/category/type ("Error: Type not found."); setsSecurityLevelto 50 or 0. - GetImage/GetImages: filtered on deleted/confidential flags (SVC-BR-MSC-010);
ShowDeletedis forced false without the delete role. GetImageFile:IImagingService.GetPDF(imageId). GetCategories:ImageCategoryCodefor the agency file code.
Groups: GroupService¶
Groups/GroupService.cs (IGroupService). Read-only access to GroupAssociation: search list optionally filtered by acronym/name (case-insensitive contains); GetGroupHeader(acronym) formats the phone number and sets IsParent from GroupType.ParentType; GetGroup(id).
Groups: Groups.Imaging¶
Groups/Imaging/ImageService.cs (IImageService; IGroupImageSecurityProvider, IGroupImageRepository, IImageCategoryCodeRepository, IImageUpdater, IImageDeleter).
- GetImages: adds
CanUserSeeConfidentialImages/CanUserSeeDeletedImagesto the filter, then delegates security filtering toIGroupImageRepository.GetFilteredImageGroups(SVC-BR-MSC-020). GetImage/GetImageOrDefault: call the unfilteredGetImageGroup/GetImageGroupOrDefault(not security-filtered**). UpdateImage/DeleteImage: wrap the updater/deleter in Begin/Commit. GetCategories:GetImageCategoryCodes(). - ImageUpdater: validates (SVC-BR-MSC-021/023/024), then sets the group, date, text, document type and
SecurityLevel(Confidential/NonConfidential constants). ImageDeleter: validates, thenIGroupImageRepository.DeletewithImageDelete{ImageGroupId, UpdateDate, UserId}-- delete does not require the edit or delete role (SVC-BR-MSC-025. GroupImageSecurityProvider: resolves theIsAuthorizedrole checks.
Imaging: AutoImportHelperService¶
Imaging/AutoImportHelperService.cs (IAutoImportHelperService; IClaimInformationService, IConfigurationService, IPolicyQueryProvider, IClaimQueryProvider).
GenerateIdxFile(details): loads AutoImportIndexDefaults by DocDescriptionCode (case-insensitive), throwing "No Auto Import Index File defaults were found." when none exist; TaskDate is the default date if in the future, else Today; CreateUser is the uppercased source; an LPTCode replaces the reference with the claim number plus check character via GetClaimFromInjuryClaimCrossReference (throws if missing); LoadPolicyOrClaimInfo resolves CLAIM via IClaimInformationService.GetClaimDetail or POLCY via IPolicyQueryProvider.GetPolicy, throwing for any other file code; LoadTaskMailIDList resolves ADJUSTER/LEGAL/REQUESTER/VOC/other sources to mail ids, with VOC unimplemented; LoadDocumentDate resolves DOI (claim injury date, required), POLICY-DEFAULT (05/31/2007), or the file-name date, rejecting dates more than 7 days in the future; writes KEY=value lines to <idmfilepath>\<name>.idx with NPages fixed at 1. (These IDX-generation and file-routing behaviors are described in prose because the source's SVC-BR-MSC-030+ citations have no corresponding heading in Business rules.)
Imaging: ImportPreProcessor¶
Imaging/ImportPreProcessor.cs (IImportPreProcessor). ProcessFile(fileInfo): strips U+200C from the file name; requires 3 or 4 underscore-separated segments (CLAIM_DESC_DATE_UNIQUE.ext, date optional), otherwise a format error; parses ten accepted date formats, and a trailing NofM segment appends " (N of M)" to the comment; copies the file to the auto-import path with an epoch-timestamp suffix, generates the IDX, and moves the source to complete\; on failure, deletes the copy and routes "MAJORIS-MEDICAL-" files with a "no defaults found" error to UndefinedDocument\, otherwise to error\, then rethrows; moves never overwrite (append (n)).
Imaging: McoImageExporter and MajorisImageExporter¶
Imaging/McoImageExporter.cs (abstract) and MajorisImageExporter.cs (IMcoImageExporter; IClaimDataApiClient, IFileSystem).
- SetWorkingDirectory: the root must exist; creates
<root>\Majoris. - ExportActiveEnrollmentDocuments: gets active MCO claims (Majoris via
GetGWActiveMCOClaims), fetches images byDocTypeGroup.CLAIM, keeps images whose claim is still active, renders each withGetPdfand writes the file**; a config-key overload reads a JSON{Type, SubTypes[]}list fromIEnvironmentService. - ExportNewEnrollmentDocuments(date): claims with a matching
mcoEffectiveDate, images fetched claim by claim. File name pattern:{claim+check}_{DOCTYPE}_{SUBTYPE}_{date-or-01-01-1970}_{00000}.pdf. - InsertErrorImage/TranslateError: adds a
DocumentImagingErrorfor a new failure (timeout -> "PDF Timed out, file too large Error"; aNoMatchingDataExceptionwith image id 0 -> "TOWID/ISN Error"; otherwise trimmed to 300/100/999 characters)**. ExportErrorEnrollmentDocuments: retries each error row viaGetImageByDocHandle/GetPdf, writes the file, deletes the error row on success, and reports resolved vs. current errors.
OnlineSupport¶
OnlineSupport/ErrorLogs/ErrorLogService.cs (IErrorLogService), EnvironmentManager (IEnvironmentManager), OnlineSupport/Repositories/ErrorLogRepository.cs (IErrorLogRepository), OnlineSupportRepository.
- ErrorLogService: exposes environment groups,
FilterTimeRangevalues and application names; queries delegate to the repository. EnvironmentManager: group code "O" returns all environments; other codes return that group's environments. EnvironmentOptions: hard-coded D/T/Q/P/L/O options with environment-name search strings (netprod, webprod, netqa, nettest01/02, netdev01/02, localhost, tfs, inetpub, "program files (x86)", others). - ErrorLogRepository.GetErrorLogs: an
ErrorIdtakes priority; environment "O" excludes the list, other codes include it (blank excluded); filters on application, time range (2h/today/24h/week/month/range with thru+1 day), user, and a substring search in state or error info; with no criteria it effectively returns nothing (ErrorId 0lookup). Long error text (>100 characters) is split on a marker string or truncated;ErrorInformationgets an "Id:" prefix. (These behaviors correspond to the source'sSVC-BR-MSC-040citation, which has no matching heading in Business rules.)
OnlineMessages: OnlineMessagesApiService¶
OnlineMessages/OnlineMessagesApiService.cs (IOnlineMessagesApiService). The constructor defers a query of active OnlineMessages (StartDate <= Now <= TerminationDate or null).
- UserHasAccessToMessage(userType, priority): not-in-AD users with type All and Urgent priority get access; employees or type All get access; non-employees with type SAIFEmployee are denied; otherwise
IsAuthorized(userCode.SecurityGroupName)from the database resource name.** - GetMessagePriorities: "tutorial" maps to "low"; an unknown value defaults to urgent/high/medium.
- GetMessagesForUser/GetTutorialList: filters by permitted user type, priority list, and application (
{app, "all"}unless "none"); orders newest-first; shows Spanish text when present unless the language is "en".** An unknown user type falls back to "all". (TheseSVC-BR-MSC-041/042-cited behaviors have no matching heading in Business rules.**)
Notifications: NotificationService¶
Notifications/NotificationService.cs (INotificationService; entity OnBaseNotificationRuleMatrix). GetNotificationMatrixRules(docType, subtype): doc type compared case-insensitively; a null/empty subtype matches rows with no subtype, otherwise an exact case-insensitive match; maps alert flags for Legal, CBP, EAIP, Agency, CreditColRep, Legcol, OSHA, PLUS, PWP, Underwriter. (Cites SVC-BR-MSC-043, not present in Business rules.)
SystemUsers: UserExtractService¶
SystemUsers/UserExtractService.cs (IUserExtractService).
- UpdateUserAccess: for each
SystemUserRef, checksIsAuthorizedfor PolicyCenter/BillingCenter/ContactManager; updates changed flags with user "GWI0001U" and returns the changed count.** - ExtractUsers(file, log): includes a user when
UpdateDate > LastExtractDate, or when never extracted but has an update date and any Guidewire access; sources values fromSystemUser/WcisEmployee/inactive default (no employee id) orAdpEmployeeFeed(active when status "A", skipped if not found); email falls back to<id>@saif.com; writes XML with string surgery (Remove(39,117)) and stampsLastExtractDatewith user "GWI0001X". (CitesSVC-BR-MSC-044/045, not present in Business rules.)
Tasks: TaskFactory and validators¶
Tasks/TaskFactory.cs (ITaskFactory). CreateMarketingTask/CreateUnderwritingTask: validates (throwing SaifValidationException on failure); resolves category "MA"/"U" with priority/source/action from category defaults**; resolves the policy via PolicyQueries.GetPolicy; adds the task (no unit-of-work Begin/Commit; the caller is responsible). TaskValidator<T>: due date required and must be a working day; text required, <= 4000 characters.* CreatePolicyTaskRequestValidator: adds "Invalid Policy Number." plus the same due-date/text rules.** (Cites SVC-BR-MSC-050/060/061/062, not present in Business rules.**)
Utilities: general helpers, CleanAddress adapters, PDF tracking, Workfront¶
- ValidatorFactory: Autofac resolution of
IValidator<T>. EnumerableExtensions.ChunkBy: chunk size must be > 0. PhoneNumberFormatter/PhoneNumberParser: 10 digits formattedAAA.PPP.NNNN xEXT.** Utilities/Edi/EdiFileService: stores EDI segments/elements (composite children inherit the parent's index) and deletes files. - CleanAddress adapters (built on
CleanAddressServiceBase, disposing theCleanAddressSvc.clsCAServicesproxy):AddressSearchService.FindCityStateByZipparses fixed 55-character records (city 28, state 2, county 25);CleanAddressBatchService.RunCleanAddressBatchmaps the return code toBatchReturnTypeor Unknown;CleanAddressService.ConvertToProperCase;CleanAddressService.CleanAddress(25 ref outputs, exception sets return code -999). Result classification: clean = RC 1, or RC -1 without error code "11"; unmatched = RC -1/-99/-999; multiple matches = neither clean nor unmatched; POSTNET barcode = zip + zip4(if 4 chars) + DPC(if 2 chars) + check digit.**CleanAddressErrorHelperparses 2-character USPS codes (00-81) against a description table. - PdfTrackingService (
Utilities/Pdf/PdfTrackingService.cs,IPdfTrackingService): lookups onPDFTracking/PDFStatusCode/PDFApplicationErrorCode/PDFTrackingCode. Purge: a record qualifies whenPurgeDateis betweenMinValueand cutoff, orCreateDateis older than cutoff-30 days, optionally filtered by application code or file id*;GetCutoffDatecaps the cutoff at Now; file deletion under{pdfDataDirectory}\{TrackingCode.Description}\{orig|out|err}\...only runs whencommitis true (otherwise it is a preview); database-record deletion and orphaned-folder purge are commented out/dead code in the current source. - ISRequestService (
Utilities/Workfront/ISRequestService.cs,IISRequestService): help-desk address isHelpDesk@saif.comin production, else the current user's email**;GetRequestListscalls the Workfront API (WorkRequest/ApplicationLists) with default credentials;SendIncidentReportsends an HTML email ("Report a problem" with urgency for type P, else "How to question"), CC'ing the user and attaching request files.
AddressVerificationService¶
AddressVerificationService/AddressVerificationService.cs (IAddressVerificationService; IAddressVerficationQueryProvider, IProviderQueryProvider, IVerifiedAddressProviderMatchService, IProviderDataApiClient).
- StatelessProcessProviderAddressesForUpdates(lastProcessDate, ...): for each active provider address needing an update, gets a verified address (
GetLocationVerificationRequests->GetAddressVerificationRequests->GetVerifiedAddress); when the update is valid, expires the oldBatchProviderAddressand inserts a new one effective tomorrow (city <= 25 characters, country US, not foreign), then updates Guidewire viaIProviderDataApiClient.UpdateProviderAddressAsync/AddProviderAddressAsync, mapping PHY->Business, COR->Mailing, PAY->Billing, withisPrimarytrue for PHY always, COR when there is no PHY, and PAY when there is no COR** ; on API failure it manually restores the old row and deletes the new one, then rethrows. - Match rules: an exact match on all fields needs no update; an update is triggered when line 1 differs only by a PO-box variant or matches the first 3 characters (with line 2/city/state matching), or only city/state/zip/zip4 differs; otherwise the address is written to the unchanged report as a Failure** ; the provider zip is left-padded to 5 digits, comparisons are trimmed with null treated as equal to null. (These
SVC-BR-MSC-067/068-cited rules have no matching heading in Business rules.**)
BatchProcessingService, PositivePayService, PurchaseOrderService, EmployeeDirectoryService¶
- BatchProcessingService: gets or updates
BatchProcessLog.RunDateby module name, returning a default when no row exists. - PositivePayService (
PositivePay/PositivePayService.cs): newly issued checks (IssueDate == date, reconciliation status in {1,3,4,5,6}, reconciliation date 1700-01-01) and newly canceled checks (reconciliation date == date, status in {3,4,5,6}); detail record code "01", totals record "02" (count + summed amount); written to{path}\{file}.prnviaFileWriter<PositivePayView>.** (CitesSVC-BR-MSC-069, not present in Business rules.**) - PurchaseOrderService (
Corporate/PurchaseOrderService.cs;IDocumentService): selects POs that are issue-pending/not closed/not canceled, or matching a requested id substring; comment text is everything after the 3rd comma; PDF package "Fin_OLCA_VendPO", emailed fromhelpdesk@saif.com(To/CC split on ";"), and also written toDocumentStoreasPurchaseOrders-{s}.pdf.** (CitesSVC-BR-MSC-070, not present in Business rules.**) - EmployeeDirectoryService (
IRepository<Employee>): active employees (status "A");GetEmployeealso returns direct reports and peers;EmployeesMappingHelperderivesPolicyUseremail as<Id>@saif.com.
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.
Related documentation¶
- Index
- Overview
- Architecture
- Dependencies
- Configuration
- Business rules
- Security and authorization
- Database tables
- SQL catalog
- API reference
Sources¶
Services/SAIF.Services/Claims/Bills/BillService.cs,BillEntryService.cs,BillDiagnosisService.cs,BillProcedureService.cs,BillServiceService.cs,AuthorizationService.cs,NoteService.cs,BillQueryService.csServices/SAIF.Services/Claims/EBilling/(EbillingService and imaging-related services)Services/SAIF.Services/Edi/(Edi override/report services)Services/SAIF.Services/Claims/ICDCodeService/Icd10CodeService.csServices/SAIF.Services/Claims/Payments/FinancialTransactionService.csServices/SAIF.Services/Utilities/Edi/EdiFileService.csServices/SAIF.Services/Claims/Authority/ClaimAuthorityService.csServices/SAIF.Services/Claims/Information/ClaimInformationService.cs,ClaimContactService.cs,ClaimCustomRepoService.cs,MissingTimeLossService.cs,Api/ClaimInformationApiService.csServices/SAIF.Services/Claims/Medicare/MedicareService.csServices/SAIF.Services/Claims/SeverityModel/SeverityModelActivityService.csServices/SAIF.Services/Claims/Tasks/ClaimTaskGenerationService.cs,TaskService.csServices/SAIF.Services/Claims/Notes/ClaimNotesService.cs,NotePreferenceConversionService.csServices/SAIF.Services/Claims/RTW/RTWService.csServices/SAIF.Services/Claims/SecurityOverride/SecurityOverrideService.csServices/SAIF.Services/Claims/PharmacyElilgbility/PharmacyEligibilityService.csServices/SAIF.Services/Claims/Reports/ClaimReportingService.csServices/SAIF.Services/Security/ClaimSecurityService.csServices/SAIF.Services/Investigations/FraudInvestigationService.csServices/SAIF.Services/Claims/ClaimDomainBuilder.csServices/SAIF.Services/Legal/LegalService.cs,CaseCostService.csServices/SAIF.Services/Legal/Bills/BillService.cs,BillSaveService.cs,BillRateService.cs,BillPaymentService.cs,BillServiceHelper.csServices/SAIF.Services/Legal/Notes/LegalNotesService.csServices/SAIF.Services/Legal/Subpoenas/SubpoenaService.cs,SubpoenaSaveService.cs,SubpoenaPaymentService.cs,SubpoenaDocumentService.cs,SubpoenaLabelService.cs,ZeroPaySubpoenaProcess.cs,WitnessSubpoenaProcess.cs,OpposingCounselService.csServices/SAIF.Services/Legal/Tasks/LegalTaskService.csServices/SAIF.Services/Policies/Certificates/(CertificateService, CertificateSecurityService, CertificateHolderService, CertificatePreferenceService, CertificateDistributionService, DocumentService, ReportingService, Information/CertificateInformationService)Services/SAIF.Services/Policies/SecurityServices/PolicySecurityService.csServices/SAIF.Services/Policies/PolicyAssociation/PolicyAssociationService.csServices/SAIF.Services/Policies/Information/PolicyInformationService.cs,Policies/PayrollReport/PayrollReportService.csServices/SAIF.Services/Policies/DcbsOregonBusiness/OregonBusinessService.csServices/SAIF.Services/Policies/PolicyDocumentsApi/PolicyDocumentsApiService.csServices/SAIF.Services/OutputDocuments/(PolicyDocumentsService, PolicyDocumentsBatchService, ViewDocumentService, ContextValidator, ContextParser)Services/SAIF.Services/Rct/(RctPolicySelectedService, RctPolicyToTransmitService, RctServicePlanService, RctStagingService, RctXmlService)Services/SAIF.Services/Documents/(DocumentBuildService, DocumentDeferredService, DocumentParameterService, DocumentRequestService, TemplateSearchService)Services/SAIF.Services/Collections/(CollectionsService, CalculateInterestService, CashReceiptsService, GenerateTasksService, SoilService, Validators/)Services/SAIF.Services/Agencies/AgencyService.cs,Imaging/ImageService.csServices/SAIF.Services/Groups/GroupService.cs,Imaging/ImageService.csServices/SAIF.Services/Imaging/(AutoImportHelperService, ImportPreProcessor, McoImageExporter, MajorisImageExporter)Services/SAIF.Services/OnlineSupport/(ErrorLogs/ErrorLogService, Repositories/ErrorLogRepository)Services/SAIF.Services/OnlineMessages/OnlineMessagesApiService.csServices/SAIF.Services/Notifications/NotificationService.csServices/SAIF.Services/SystemUsers/UserExtractService.csServices/SAIF.Services/Tasks/TaskFactory.csServices/SAIF.Services/Utilities/(ValidatorFactory, EnumerableExtensions, PhoneNumberFormatter/Parser, CleanAddress adapters, Pdf/PdfTrackingService, Workfront/ISRequestService)Services/SAIF.Services/AddressVerificationService/AddressVerificationService.csServices/SAIF.Services/PositivePay/PositivePayService.csServices/SAIF.Services/Corporate/PurchaseOrderService.csServices/SAIF.Services/Employees/EmployeeDirectoryService.cs