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,categorysuch asattachmentin HL7’s exampleclaiminformationcategorycode system, optionalcode/timing[x], andvalueAttachmentorvalueReference), linked from billed lines viaClaim.item.informationSequence. - Unsolicited: In a
Communicationreferencing theClaiminabout, with file payloads inpayload.contentAttachmentorcontentReference(and text notes incontentString). - Solicited: In a
Communicationanswering an insurer’sCommunicationRequest, linked viaCommunication.basedOn. - Input: In FHIR operation input parameters or
Task.inputwhen aTaskdrives 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:
- Profile validation on write: Per Configure FHIR profiles, Cloud Healthcare API enforces enabled profiles on
create,update,patch, andexecuteBundle(not bulkimport), supporting a subset ofStructureDefinitionrules (slicingwithvalue/pattern/profilediscriminators,min/max,type,fixed,pattern,minValue,maxValue,maxLength, andbindingexceptValueSet.compose.include.filterandValueSet.compose.exclude). - Referential integrity: Unless
disableReferentialIntegrityis set at creation, referential integrity rejects creates, updates, or patches pointing to nonexistent in-store resources or versions, and blocks deletes of referenced targets. - Store versioning and Pub/Sub: Versioning and Pub/Sub change publishing are
FhirStorecapabilities; subscribing a completeness worker belongs to the application layer. - 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
importbypasses profile validation and referential integrity,Resource-purgeskips incoming version-reference checks, anddeidentifycan leave broken references on filtered subsets. Extension references requirecomplexDataTypeReferenceParsingset toENABLED(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-sensitiveApproveorRejectcompletes 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:
- 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. - 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
Detailsfield, and verify data boundaries with security and compliance teams. - 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 Userexcept whenAllowAdHocSubscriptionsis 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). - 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 toresultsfield 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):
- Store checks vs. app checklist: On write (
create/executeBundle), theFhirStoreconfirms 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 inspectsClaim.item(sequence: 1) and linkedsupportingInfo(sequence: 1→doc-901) against an illustrative procedure checklist requiring both an operative-plan summary and an imaging report, seesdoc-901satisfies only the operative-plan summary, and flagsmissing_imaging_report. - AI-assisted triage: A classifier inspects
comm-412’s PDF, proposesimaging_reportfor page 1 as a candidate for claim line1, 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"
}
}
- Asynchronous review and re-validation: Flow 1 calls
Create an approval (v2)forcoding-triageusingviewer_urland saves the approval in Dataverse. A reviewer inspects the packet in the controlled viewer, confirms page 2 belongs to another encounter, and picksRequest Missing Record. Flow 2 handles the Dataverse response, creates aCommunicationRequestfor the imaging report, and holds the claim. When a solicitedCommunicationciting that request inbasedOnarrives later and passes store validation, the application indexes the replacement imaging report as aDocumentReferenceand links it as evidence for claim line1before re-running the completeness checklist, clearing the hold, and advancing the claim toclinical-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
- Google Cloud Documentation, FHIR — Cloud Healthcare API: https://docs.cloud.google.com/healthcare-api/docs/concepts/fhir
- Google Cloud Documentation, Configure FHIR profiles — Cloud Healthcare API: https://docs.cloud.google.com/healthcare-api/docs/how-tos/fhir-profiles
- Google Cloud Documentation, FHIR referential integrity — Cloud Healthcare API: https://docs.cloud.google.com/healthcare-api/docs/concepts/fhir-referential-integrity
- HL7 FHIR R4, Financial Module — Attachments - Supporting Information (§13.0.10): https://hl7.org/fhir/R4/financial-module.html#attachments
- HL7 FHIR R4, Financial Module — Real-time eClaims Exchange (§13.0.14): https://hl7.org/fhir/R4/financial-module.html#real-time
- HL7 FHIR R4, Claim: https://hl7.org/fhir/R4/claim.html
- HL7 FHIR R4, DocumentReference: https://hl7.org/fhir/R4/documentreference.html
- HL7 FHIR R4, Communication: https://hl7.org/fhir/R4/communication.html
- HL7 FHIR R4, CommunicationRequest: https://hl7.org/fhir/R4/communicationrequest.html
- HL7 FHIR R4, Attachment Datatype: https://hl7.org/fhir/R4/datatypes.html#Attachment
- HL7 FHIR R4, Claim Information Category Codes: https://hl7.org/fhir/R4/valueset-claim-informationcategory.html
- Microsoft Learn, Get started with Power Automate approvals: https://learn.microsoft.com/en-us/power-automate/get-started-approvals
- Microsoft Learn, Create and test an approval workflow with Power Automate: https://learn.microsoft.com/en-us/power-automate/modern-approvals
- Microsoft Learn, Request approvals from Microsoft 365 groups: https://learn.microsoft.com/en-us/power-automate/group-approvals
- Microsoft Learn, Set up sequential approvals: https://learn.microsoft.com/en-us/power-automate/set-up-sequential-approvals
- Microsoft Learn, Known issues — Power Automate approvals: https://learn.microsoft.com/en-us/power-automate/approvals-known-issues
- Microsoft Learn, Limits of automated, scheduled, and instant flows: https://learn.microsoft.com/en-us/power-automate/limits-and-config
- Microsoft Learn, Standard approvals — Connectors: https://learn.microsoft.com/en-us/connectors/approvals/
- Insonl, Generative AI and LLM assistants for business: https://insonl.com/services/ai/generative-ai
- Insonl, Gmail API Intake Queue for Operational Attachments: https://insonl.com/journal/gmail-intake-queue-operational-attachments
- Insonl, Free AI Workflow Audit: https://insonl.com/ai
