Medical Coding

Create outpatient billing batch

Creates a local outpatient billing batch for one or more upload IDs already scoped to the authenticated organization.

POSTNeeds publication reviewFile or artifactMedical CodingoperationId: createMedicalCodingOutpatientBatchhttps://dev-api.quickintell.com/api/v1/medical-coding/outpatient/batches
Needs publication reviewFile or artifactPrior auth and clinical

Route status

Needs publication review

The endpoint contract is visible, but QuickRCM has not approved it yet for normal production API use.

Publication status

Needs publication review

Requires product, security/compliance, tenancy, side-effect, or module-owner approval before production public API use. Also requires E2 side-effect policy, E3 async and idempotency policy, and E4 file and artifact governance before production recipes, SDK inclusion, or try-out access.

Authentication

Bearer API key declared

OpenAPI declares bearer API-key security for this operation.

Tenant context

API-key organization

API-key organization context is authoritative; request organizationId is not a public tenant selector.

Side-effect summary

File or artifact

Touches documents, reports, transcripts, PDFs, EDI, or generated artifacts. Metadata is safer than raw content.

Source artifact

docs/openapi/openapi.json

OpenAPI 3.1.0; API 1.0.0.

When to use this endpoint

Use this page as an internal baseline for the prior auth and clinical contract generated for POST /api/v1/medical-coding/outpatient/batches. External use still depends on route classification, release evidence, and endpoint-specific side-effect approval.

What this does now

Shows the generated OpenAPI shape for POST /api/v1/medical-coding/outpatient/batches, but keeps the route out of ordinary production API positioning until review is complete.

What this does not do

Does not prove external GA readiness, SDK readiness, live production execution, or complete module behavior. Mutating behavior still needs side-effect and retry evidence.

Not public from this page

Raw file contents, storage keys, signed URLs, and generated artifacts are not public from this page.

Headers and tenancy

Current headers and tenant authority. Target headers stay labeled as future until OpenAPI and release evidence declare them.

HeaderRequiredCurrent statusNotes
AuthorizationYesCurrentBearer <QUICKRCM_API_KEY>. OpenAPI security: bearerAuth.
Idempotency-KeyNoTarget/futureDo not claim universal header support until E3 and OpenAPI metadata exist.
X-Request-IdNoTarget/futureUse for support correlation only after approved; not declared as a standard OpenAPI header today.

Required scopes

Unclassified until E6 route metadata exists; do not infer scopes from route names.

Wrong-org behavior

Tenant-safe 404, empty list, or 403 is endpoint-specific and remains an evidence gap until E1 is closed.

Actor and audit

No public actor, audit, or correlation contract is published from OpenAPI alone.

Idempotency and retries

Retry behavior is documented conservatively because universal idempotency headers are not declared.

TopicStatusGuidance
Current idempotencyNo idempotency mechanism is declared.Do not retry blindly. Check resource, status, batch, or job state before repeating the request.
Universal headerNot declaredDo not document universal Idempotency-Key support until OpenAPI and E3 evidence declare it.
Conflict behaviorUnresolvedSame-key changed-payload, in-flight retry, fingerprint scope, and TTL behavior remain endpoint-specific evidence gaps.

Async jobs and polling

Queued work is accepted work, not proof of completed workflow execution.

TopicStatusGuidance
Immediate response202Treat the response as accepted or queued work, not completed workflow execution.
Polling and terminal statesEndpoint-specificUse only operation-specific status endpoints visible in OpenAPI; generic job behavior, cancellation, retries, and retention are unresolved.
Later side effectsPossibleQueued work may later cause local or external effects only where endpoint evidence says so.

Files and artifacts

File-like routes need content-class, ownership, scanning, retention, and URL policy evidence before public recipes.

TopicStatusGuidance
Content classPotential file or artifactDocuments, PDFs, reports, transcripts, EDI, OCR, or generated artifacts need E4 classification before public examples.
Ownership and storage keysEvidence requiredTenant ownership must be proven before retrieval or upload docs. Never expose storage keys as public identifiers.
URLs, scanning, and retentionUnresolved unless endpoint-specific evidence existsShort-lived URLs, MIME limits, checksums, scanner status, retention, expiration, and legal hold behavior are not implied by OpenAPI examples.

Publication warnings

  • This endpoint needs explicit product, security/compliance, tenancy, or side-effect approval before publication.
  • HTTP 202 or queued behavior requires endpoint-specific polling, terminal-state, retry, and retention guidance.
  • Universal Idempotency-Key header support is not declared; retry only after checking endpoint-specific state.
  • File and artifact examples must stay metadata-only until scanning, retention, ownership, and URL policy are approved.

Evidence

EvidenceStatusCaveat
OpenAPI artifactdocs/openapi/openapi.json; OpenAPI 3.1.0; API 1.0.0.Generated baseline contract only.
Route registryNeeds publication review from documentation classification overlay.E6 route registry evidence is still required before external publication.
Example validationGenerated examples are internal baseline aids.No external publication claim; examples must pass no-PHI/no-secret/no-raw-payload/no-storage-key checks.
Last reviewedImplementation run 20260619T-docs-impl; source boardroom packet 20260619T064820Z.Refresh this evidence for release workspaces.
Release evidenceE9 required.No SDK readiness, production readiness, or expanded external docs claim from this endpoint page.

Medical Coding public API.

Medical Coding APIs expose organization-scoped CodingJob list/detail reads, local CodingJob creation, safe workflow-field updates, simulated extraction and rerun markers, coded-item review metadata, import-batch metadata, clarification answer capture, claims-handoff markers, outpatient upload and batch metadata, local outpatient check and draft state, Clinical Documentation Improvement (CDI) query lifecycle state, coding automation-rule configuration, and an unauthenticated static code-system directory. Authenticated Medical Coding public API routes also use the module public API rate-limit action with a 60-request / 60-second window. If a caller is throttled, back off before retrying instead of polling tightly. The code-systems directory endpoint is declared without bearer authentication and returns static code-system metadata. For authenticated Medical Coding operations, the bearer API key selects the organization. Public callers should not send `organizationId` as a tenant selector. Read endpoints accept Medical Coding read or write scopes; write endpoints require Medical Coding write scope. Path identifiers and linked records such as CodingJob, Appointment, ScribeJob, Claim, Patient, BillingEncounter, upload, CDI query, automation rule, and assignee user records must resolve inside the authenticated organization or the handler returns a not-found or authorization-style error. Most mutation endpoints manage QuickRCM local workflow state. They do not directly invoke a large language model (LLM), optical character recognition (OCR), electronic health record (EHR) write-back, payer or clearinghouse submission, claim creation, claim adjudication, electronic data interchange (EDI) exchange, or binary file upload unless a specific endpoint says otherwise. Safe markers such as `VALIDATED_ONLY`, `SIMULATED_ONLY`, `QUEUED_ONLY`, and `SAFE_WRITE_DB_ONLY` are local workflow markers, not external processing results. Examples must use synthetic identifiers and generic clinical/coding text only, with no protected health information (PHI), credentials, tokens, raw EDI, transcripts, S3 keys, payer portal credentials, signed URLs, or vendor payloads.

What this endpoint does

Use case
Use this to group outpatient upload metadata records into a local batch before review or downstream processing.
Before calling
Authenticate with Medical Coding write scope. Use upload IDs returned by createMedicalCodingOutpatientUpload or trusted same-organization context.

Request and response behavior

Request guidance
`uploadIds` is required, must contain 1 through 100 identifiers, and is de-duplicated by the handler before lookup and item creation. `creditsEstimate` is optional and defaults to unique upload count multiplied by 50. `metadata` is optional JSON and should stay operational.
  • Use upload IDs from the same organization.
  • Duplicate upload IDs collapse to unique IDs before item creation.
  • Do not include raw document text or signed URLs in `metadata`.
Response semantics
HTTP 201 returns local batch `id`, `organizationId`, status such as `OBB_DRAFT`, and `totalItems`. It does not run OCR, LLM coding, billing validation, or claim creation.
  • `status: OBB_DRAFT` is local batch state.
  • `totalItems` is the count of unique upload IDs used for the batch.
  • Batch creation does not process the uploaded files.

Errors and retries

404 means one or more upload IDs were not found in the authenticated organization. Fix invalid upload IDs or metadata before retrying. After timeouts, reconcile batches before creating another one.
  • 404 can indicate at least one upload ID is missing or wrong-tenant.
  • 400 can indicate no upload IDs or more than 100.
  • No idempotency key is declared for this endpoint.
  • 429 can indicate the authenticated API key exceeded 60 requests in 60 seconds for the Medical Coding public API action; retry with bounded backoff.

Template boundary before examples

The route class, authentication state, tenancy rule, side-effect mode, idempotency status, async behavior, file policy, warnings, links, and evidence above are part of the endpoint contract. Treat generated examples below as internal baseline aids until release evidence closes.

Path parameters

This endpoint does not define path parameters.

Query parameters

This endpoint does not define query parameters.

OpenAPI-declared header parameters

Standard platform header guidance appears in the governance panel. This table only lists operation-specific headers declared in OpenAPI.

This endpoint does not define operation-specific header parameters.

Request body

JSON fields from the generated OpenAPI schema with pilot enrichment applied where available. Nested object fields are shown with dotted paths.

NameLocationRequiredTypeDescriptionValidation and safety notes
uploadIdsbodyYesstring[]Required array of 1 to 100 OutpatientBillingUpload identifiers. Each must belong to the API key organization; duplicates are de-duplicated.Sensitive credential or storage-adjacent value; use placeholders only.
creditsEstimatebodyNointegerOptional non-negative integer credit estimate. Defaults to unique upload count times 50 when omitted.Minimum value: 0. File, artifact, or raw-payload adjacent; keep examples metadata-only.
metadatabodyNoobjectOptional JSON object merged with `source: public-api`; avoid PHI and secrets.Sensitive credential or storage-adjacent value; use placeholders only.

Generated request example

Generated examples are baseline contract aids only. They are not external publication evidence and must not include real PHI, credentials, raw vendor payloads, raw EDI, transcripts, storage keys, or signed URLs.

{
  "uploadIds": [
    "example-uploadids"
  ],
  "creditsEstimate": 1,
  "metadata": {}
}

Successful responses

Generated response examples show the baseline OpenAPI contract. Tenant identifier echo, PHI redaction, pagination, money, date/time, and enum semantics remain endpoint-specific publication checks.

200
Medical coding public API response
Generated from the OpenAPI response schema.
{
  "success": true,
  "data": {}
}
201
Medical coding public API resource created
Generated from the OpenAPI response schema.
{
  "success": true,
  "data": {}
}
202
Medical coding public API request queued or simulated
Generated from the OpenAPI response schema.
{
  "success": true,
  "data": {}
}

Error responses

Errors must remain sanitized. Do not include raw payer, EHR, SFTP, SMTP, Stripe, LLM/OCR, browser automation, file, transcript, EDI, worker, or vendor payloads.

400
Invalid request
Handle this response as normal integration control flow.
{
  "error": "Request validation failed",
  "statusCode": 400
}
401
Authentication required
Handle this response as normal integration control flow.
{
  "error": "Authentication required",
  "statusCode": 401
}
403
Organization access denied
Handle this response as normal integration control flow.
{
  "error": "Forbidden",
  "statusCode": 403
}
404
Medical coding resource not found
Handle this response as normal integration control flow.
{
  "error": "Resource not found",
  "statusCode": 404
}

Adjacent endpoints

Nearby generated endpoints in the same OpenAPI tag. Route class and side-effect labels still apply per endpoint.