Saltar al contenido principal

Document Batch (GCS)

Category: Healthcare Standards
Node id: document-batch

Standards: PHI, IEC-62304-Class-C

Process every PDF under a GCS bucket/prefix: extract → map to FHIR R4 → upsert via transaction, with per-file human-review gating. Concurrency-bounded; one file's failure never aborts the batch.

What it does​

  • Batch PDF ingestion from Google Cloud Storage
  • Concurrency-bounded, per-file isolation (one failure never aborts the batch)
  • Per-file human-review gating of low-confidence extractions
  • Idempotent FHIR upsert (document_id = object name)

Runtime​

  • Performance tier: variable

Input ports​

NameTypeRequiredDescription
gcs_buckettextNoGCS bucket (overrides config)
prefixtextNoObject prefix to scope the batch (overrides config)

Output ports​

NameTypeRequiredDescription
summaryjsonNoCounts: total, written, needs_review, failed
resultsjsonNoPer-file results (object, document_type, written, error, ...)
review_queuejsonNoObject names flagged needs_review (not written)
successbooleanNoTrue when no file failed

Settings​

Basic​

SettingNameTypeRequiredDefaultAllowed valuesDescription
GCS Bucketgcs_bucketstringYesBucket containing the PDFs
PrefixprefixstringNoObject prefix to scope the batch
Suffix FiltersuffixstringNo.pdfOnly process objects ending with this (case-insensitive)
Max Filesmax_filesnumberNo0min 0Cap the number of files processed (0 = all)
ModelmodelstringNogemini-2.5-proGemini model (falls back to GEMINI_MODEL)

Fhir​

SettingNameTypeRequiredDefaultAllowed valuesDescription
FHIR URLfhir_urlstringNoTarget FHIR server base URL (required unless dry_run)
FHIR Auth Tokenauth_tokensecretNoBearer token for the FHIR server
MRN Identifier Systemidentifier_systemstringNourn:tietai:hydra:mrn
Document Identifier Systemdocument_identifier_systemstringNourn:tietai:hydra:document

Auth​

SettingNameTypeRequiredDefaultAllowed valuesDescription
GCP Projectgcp_projectstringNoVertex AI project (falls back to GEMINI_PROJECT / GOOGLE_CLOUD_PROJECT)
GCP Locationgcp_locationstringNoglobalVertex AI location (falls back to GEMINI_LOCATION)

Advanced​

SettingNameTypeRequiredDefaultAllowed valuesDescription
Max Concurrencymax_concurrencynumberNo4min 1Number of files processed in parallel
Dry Rundry_runbooleanNofalseExtract + map but do not write to FHIR
Write When Needs Reviewwrite_when_needs_reviewbooleanNofalseWrite even low-confidence documents (default: route to review_queue)
Min Confidencemin_confidencenumberNo0.6min 0; max 1Below this, a document is routed to review instead of written

Runtime notes​

  • Auth via GCP Application Default Credentials / workload identity (GCS + Vertex).
  • Schedule this node's pipeline for recurring bucket processing.
  • Set dry_run to validate extraction/mapping without writing to FHIR.

See Build any workflow for how to put nodes together and Ports, types and data flow for how port types connect.

¿Algo no está claro? Envíe sus comentarios sobre la documentación por correo electrónico..