insonl
← journal

Design a Review Queue for Medical Claims Attachments

date
22 November 2026
by
insonl
read
9 min read

Illustrative example. A claims team captures email and portal attachments into object storage using transport patterns like building a Gmail API intake queue for operational attachments. Downstream, scanned operative notes, imaging PDFs, discharge summaries, and fax cover sheets still land in one flat inbox, leaving reviewers chasing missing claim links and incomplete metadata instead of coding or clinical questions.

That bottleneck is a medical claims attachment intake review queue problem, not a transport-capture problem. Transport intake captures files and recovers missed events within the configured recovery window; the downstream queue maps each file to a healthcare record type, runs deterministic completeness checks, and routes exceptions to the right lane.

Using public documentation from Google Cloud’s Cloud Healthcare API, HL7 FHIR R4, and Microsoft Power Automate approvals, this guide specifies an illustrative, made-up intake flow compatible with generative AI-assisted triage—not an Insonl healthcare client. It covers operational queue design only, not legal or regulatory advice, and makes no HIPAA or regional compliance promises; evaluate compliance with qualified counsel.

Model attachments with FHIR record types first

A flat claim_id + file_url table hides how a file arrived and what it supports. Per Google Cloud’s FHIR concepts, Fast Healthcare Interoperability Resources (FHIR) models medical, administrative, infrastructural, and financial data as uniquely identified resources over HTTP REST (JSON, XML, or RDF), with reusable data types, common metadata, and an HTML narrative fallback for clinical safety.

In the HL7 FHIR R4 Financial Module (§13.0.10), supporting information—scanned documents, PDFs, word processing files, X-rays, images, CDAs, or FHIR resources—reaches a Claim (specifically a complete claim or preauthorization; Claim.use also defines predetermination) or an ExplanationOfBenefit in four ways:

  • Included: In Claim.supportingInfo (sequence, category such as attachment in HL7’s example claiminformationcategory code system, optional code/timing[x], and valueAttachment or valueReference), linked from billed lines via Claim.item.informationSequence.
  • Unsolicited: In a Communication referencing the Claim in about, with file payloads in payload.contentAttachment or contentReference (and text notes in contentString).
  • Solicited: In a Communication answering an insurer’s CommunicationRequest, linked via Communication.basedOn.
  • Input: In FHIR operation input parameters or Task.input when a Task drives workflow.

Index each file with DocumentReference rather than embedding raw binaries across claim messages. In FHIR R4, DocumentReference handles any serialized object with a recognized MIME type (PDFs, scanned paper, digital fax records, clinical notes, CDAs, images), separating reference provenance and lifecycle (meta and status: current, superseded, or entered-in-error) from underlying document metadata (docStatus, type, category, subject, author, authenticator, relatesTo, securityLabel, context.encounter, context.period). Its content.attachment uses Attachment: contentType, BCP 47 language, base64 data, a url resolving to the attachment data (or both identifying the same content), byte size before base64 encoding, base64 SHA-1 hash, title, and creation.

Separate deterministic completeness checks from AI triage

Base FHIR financial resources leave many elements optional (0..) to support partial-adjudication reporting. As HL7’s Financial Module notes, FHIR profiles are usually necessary to tighten cardinalities (1..), require jurisdictional terminologies, and constrain extensions for an exchange.

In Google Cloud’s Cloud Healthcare API, a FhirStore pairs deterministic store controls with application checks:

  1. Profile validation on write: Per Configure FHIR profiles, Cloud Healthcare API enforces enabled profiles on create, update, patch, and executeBundle (not bulk import), supporting a subset of StructureDefinition rules (slicing with value/pattern/profile discriminators, min/max, type, fixed, pattern, minValue, maxValue, maxLength, and binding except ValueSet.compose.include.filter and ValueSet.compose.exclude).
  2. Referential integrity: Unless disableReferentialIntegrity is set at creation, referential integrity rejects creates, updates, or patches pointing to nonexistent in-store resources or versions, and blocks deletes of referenced targets.
  3. Store versioning and Pub/Sub: Versioning and Pub/Sub change publishing are FhirStore capabilities; subscribing a completeness worker belongs to the application layer.
  4. Application checks for store gaps: Per FHIR referential integrity, store integrity skips external URLs outside the store base URL, logical references by business identifier, and display-only references. Bulk import bypasses profile validation and referential integrity, Resource-purge skips incoming version-reference checks, and deidentify can leave broken references on filtered subsets. Extension references require complexDataTypeReferenceParsing set to ENABLED (new-store default). Even when references resolve in-store, application logic must verify the linked claim or request is the expected record and eligible for this queue.

Keep generative AI downstream of those gates to propose DocumentReference.type codes for untagged PDFs, flag header mismatches, or suggest candidate claim lines for human confirmation—never override missing references or decide clinical necessity.

The matrix below is an illustrative, made-up completeness specification (not from a real payer, provider, or Insonl client):

Check layer Verified fields / rules Engine Exception lane
1. Reference linkage Claim.patient and Claim.insurance.coverage resolve; Communication.about (unsolicited/solicited) and basedOn (solicited only) resolve to an eligible target Store referential integrity + app check for logical IDs and eligibility intake-missing-linkage
2. Profile completeness Exchange-profile DocumentReference.status, type, subject, content.attachment (contentType, size, hash) Store profile validation (write) + app check after bulk loads intake-incomplete-metadata
3. Solicitation match Solicited Communication matches open CommunicationRequest; unsolicited maps to eligible active Claim Deterministic app query intake-orphan-attachment
4. Document triage Untagged PDF classified by type and candidate Claim.item.sequence AI extraction + confidence flag (human-verified) coding-triage
5. Clinical sufficiency Documented findings justify billed service under plan rules Human clinical reviewer only clinical-review

Route review lanes with Power Automate approvals

HL7’s Real-time eClaims Exchange (§13.0.14) notes that claims involving supporting information often cannot adjudicate synchronously because attachments tend to require manual review. In some cases, the initial response only acknowledges receipt and typically reports processability or blocking errors; deferred responses return asynchronously depending on the supported exchange method (such as FHIR REST GET/SEARCH or polling).

For Microsoft 365 teams, Power Automate approvals (saved in Dataverse) map exception lanes to explicit decision patterns:

  • Custom Responses - Wait for one response: Fits triage lanes (intake-incomplete-metadata, coding-triage) where binary Approve/Reject loses state. Define explicit choices (illustrative: Link to Claim, Request Missing Record, Escalate to Clinical, Mark Duplicate); the first response finishes the step.
  • Approve/Reject - First to respond: Fits pool checks assigned to semicolon-separated individuals (email, UPN, or Microsoft Entra ID user ID) or supported mail-enabled groups. Per group approvals, only mail-enabled Microsoft 365 groups and security groups are supported, one member’s response represents the group, and Teams notifications are not sent for group approvals (members use email if external senders are allowed, the Power Automate portal, or the Teams Approvals app). The first case-sensitive Approve or Reject completes the step.
  • Sequential approval: Fits staged gates where coding confirms completeness before clinical review. Per sequential approvals, the next stage follows approval by the current reviewer, and the same approver cannot appear in multiple steps.
  • Approve/Reject - Everyone must approve: Fits multi-party sign-off where all approvers must approve for success and one rejection ends the wait.

Four documented constraints shape production queues:

  1. Split flows for long waits: Microsoft documents a 28-day approval wait limit in approval known issues (after which the flow fails, leaving an abandoned approval in the action center for manual deletion) and a separate 30-day cloud-flow run maximum from run start in flow limits. For longer waits, long-running approvals store approvals in Dataverse across two flows using Create an approval (v2)—one sends the request (cancelable by the sender in the Approvals Sent tab), and a second processes Dataverse responses even if the original run has ended.
  2. Link to a viewer, not raw files: Per the Standard approvals connector, duplicate attachment filenames cause approval creation to fail, and emailing clinical files spreads sensitive copies across messaging channels. Put a non-sensitive summary and controlled viewer link in the item link and Markdown Details field, and verify data boundaries with security and compliance teams.
  3. Check roles, guests, and tenant policies: Individual assignees respond via Outlook, Teams adaptive cards, or the Power Automate action center with a qualifying Power Automate, Office 365, or Dynamics 365 license. Users outside the Dataverse environment auto-receive Approvals User except when AllowAdHocSubscriptions is disabled in Microsoft Entra, a security group restricts Dataverse access, or on US Government plans. Unaccepted B2B guests are dropped from assignees, and actionable Outlook emails are unsupported for guests (they must use the Power Automate portal).
  4. Respect connector limits: Timestamps show in UTC, the flow creator appears in approval details to prevent spoofing, actionable emails require Microsoft’s standard approval email account, and Custom Responses - Wait for all responses (documented under known issues as custom responses set to “Everyone must approve”) can fail across many users due to results field size limits.

Illustrative walkthrough: one preauthorization packet

(Illustrative, made-up example—not a real payer, provider, patient, or Insonl client. All IDs, filenames, and timestamps are invented.)

Suppose a provider writes Claim/clm-2026-8841 (use: "preauthorization") with billed line Claim.item (sequence: 1, informationSequence: [1]) pointing to Claim.supportingInfo (sequence: 1, category: attachment) referencing DocumentReference/doc-901 (an operative-plan summary PDF, status: "current", contentType: "application/pdf", with size and hash). Separately, an unsolicited Communication/comm-412 (about: [{"reference": "Claim/clm-2026-8841"}]) arrives with an untagged PDF (scan_01.pdf):

  1. Store checks vs. app checklist: On write (create/executeBundle), the FhirStore confirms in-store references on each written resource (Patient, Coverage, DocumentReference/doc-901, Claim/clm-2026-8841) resolve and validates each written resource against its applicable enabled profile. Next, the application completeness service inspects Claim.item (sequence: 1) and linked supportingInfo (sequence: 1 → doc-901) against an illustrative procedure checklist requiring both an operative-plan summary and an imaging report, sees doc-901 satisfies only the operative-plan summary, and flags missing_imaging_report.
  2. AI-assisted triage: A classifier inspects comm-412’s PDF, proposes imaging_report for page 1 as a candidate for claim line 1, flags a date-of-birth conflict on page 2, and emits a queue record instead of auto-linking:
{
  "queue_item_id": "rq-20261122-0041",
  "claim_ref": "Claim/clm-2026-8841",
  "claim_use": "preauthorization",
  "claim_item_sequence": 1,
  "linked_supporting_info_sequence": [1],
  "delivery_mode": "unsolicited_communication",
  "source_refs": ["DocumentReference/doc-901", "Communication/comm-412"],
  "deterministic_checks": {
    "store_referential_integrity": "passed",
    "store_profile_validation": "passed",
    "app_doc_checklist": "missing_imaging_report"
  },
  "ai_triage_proposal": {
    "proposed_doc_type": "imaging_report",
    "candidate_claim_item_sequence": 1,
    "conflict_flag": "dob_mismatch_page_2",
    "auto_link_allowed": false
  },
  "routing": {
    "lane": "coding-triage",
    "approval_pattern": "Custom Responses - Wait for one response",
    "allowed_outcomes": ["Link to Claim", "Request Missing Record", "Escalate to Clinical", "Mark Duplicate"],
    "viewer_url": "https://review.example-claims.test/queue/rq-20261122-0041"
  }
}
  1. Asynchronous review and re-validation: Flow 1 calls Create an approval (v2) for coding-triage using viewer_url and saves the approval in Dataverse. A reviewer inspects the packet in the controlled viewer, confirms page 2 belongs to another encounter, and picks Request Missing Record. Flow 2 handles the Dataverse response, creates a CommunicationRequest for the imaging report, and holds the claim. When a solicited Communication citing that request in basedOn arrives later and passes store validation, the application indexes the replacement imaging report as a DocumentReference and links it as evidence for claim line 1 before re-running the completeness checklist, clearing the hold, and advancing the claim to clinical-review.

Next step

Before wiring models into an attachment queue, map record types, deterministic gates, and escalation paths—the engineering scope behind Insonl’s generative AI services. Start with Insonl’s free AI workflow audit, which delivers a written workflow map, recommendations, and a fixed-scope estimate. The audit is free; Insonl charges only for follow-on engineering work you choose to proceed with.

Sources