Aller au contenu principal

Document Folder Batch

Category: Healthcare Standards
Node id: document-folder-batch

Standards: PHI, IEC-62304-Class-C

Process every PDF in a local input folder: extract, run the quality/review gate, and write each result as a JSON file — auto-approved documents to output_dir, documents needing human review to review_dir. Filesystem in / JSON out; no GCS, no FHIR. Concurrency-bounded; one file's failure never aborts the batch.

What it does​

  • Batch PDF ingestion from a local folder
  • Quality/review gate: auto-approved vs human-review routing
  • One structured JSON file written per document (split across output_dir / review_dir)
  • Reuses the single-document extraction core (no divergence)

Runtime​

  • Performance tier: variable

Input ports​

NameTypeRequiredDescription
input_dirtextNoInput directory of PDFs (overrides config; default /data/pdf)
output_dirtextNoOutput directory for auto-approved JSON (overrides config; default /data/pdf-output)
review_dirtextNoOutput directory for JSON needing human review (overrides config; default /data/pdf-review)

Output ports​

NameTypeRequiredDescription
summaryjsonNoCounts: total, passed, needs_review, failed + input/output/review dirs
resultsjsonNoPer-file results (file, output path, document_type, needs_review, error)
review_queuejsonNoPaths of JSON files written to review_dir (need human review)
needs_review_countnumberNoNumber of documents routed to human review
successbooleanNoTrue when no file failed

Settings​

Basic​

SettingNameTypeRequiredDefaultAllowed valuesDescription
Input Directoryinput_dirstringNo/data/pdfFolder containing the PDFs
Output Directoryoutput_dirstringNo/data/pdf-outputFolder for auto-approved JSON
Review Directoryreview_dirstringNo/data/pdf-reviewFolder for JSON needing human review
Suffix FiltersuffixstringNo.pdfOnly process files ending with this (case-insensitive)
ModelmodelstringNogemini-2.5-proGemini model (falls back to GEMINI_MODEL)

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 1Files processed in parallel
Min Confidencemin_confidencenumberNo0.6min 0; max 1Below this, a document is routed to human review

Runtime notes​

  • Runs on the hydra-server host filesystem — dirs are paths on the VM, not the client.
  • Documents are routed to review_dir when confidence < min_confidence or the model flagged fields.
  • needs_review_count + review_queue feed a downstream quality-gate / notification stage.

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

Quelque chose n'est pas clair ? Envoyez vos commentaires sur la documentation par courriel.