# GetClaimRequest - Advanced Documentation ## Overview Retrieves a complete claim request (records request) by ID with all associated data including status, provider contact details, prompt values, chronological comments, and related documents. ## Return Structure The `ClaimRequestInfo` contains deeply nested data: ### Core Fields | Field | Type | Notes | |-------|------|-------| | ID | long | Request ID | | Status | string | Computed from state (see below) | | RequestType | LookupInfo | Type of records request | | RequestDate | DateTime | When requested | | ReviewDate | DateTime | When reviewed | | OrderDate | DateTime | When ordered | | CancellationDate | DateTime | When cancelled (if applicable) | ### Claim Reference | Field | Notes | |-------|-------| | Claim.ID | Parent claim ID | | Claim.Name | Claim name | | Claim.ClaimTypeID | Claim type | | Claim.ClaimantID | Claimant contact ID | | Claim.ClaimantIDDisplayName | Claimant name | | Claim.ClaimantIDIsPerson | Person vs company flag | ### Provider (Contact) The provider is enriched with fresh contact details: - `Provider.PrimaryEmail` - email address - `Provider.PrimaryPhone` - phone number - `Provider.PrimaryAddress` - mailing address ### Nested Collections - **PromptValues** - `List` with prompt field values for document generation - **Comments** - `List` with ID, Comment text, CreatedDate, CreatedBy (chronological) - **RelatedDocuments** - `List` with File info (storage location, name, size) ## Status Computation Status is derived from the request's state fields, not stored directly. The `GetClaimRequestStatusForSave` method computes it based on dates and flags. ## Script Example ```javascript async () => { const request = await SecureApi.GetClaimRequest(5001); return { id: request.ID, status: request.Status, type: request.RequestType?.Name, provider: request.Provider?.Name, providerEmail: request.Provider?.PrimaryEmail, claimName: request.Claim?.Name, commentCount: request.Comments?.length ?? 0, documentCount: request.RelatedDocuments?.length ?? 0, promptValues: request.PromptValues?.map(p => ({ name: p.Name, value: p.Value })) }; } ``` ## Error Conditions - Request not found - throws RadoloException - Request belongs to a different firm - throws RadoloException - Not logged in or no company selected - throws RadoloException