What the data for this use case looks like
This use case processes data from the national medical insurance information platform, hospital HIS and medical insurance interfaces, medical insurance catalog and coding library, and cross-regional medical settlement platform. Data updates occur daily. Documents processed daily include medical insurance settlement lists, expense details, medical record homepages, prescriptions, denial lists, and settlement reconciliation statements. Fields covered include diagnosis and treatment item codes, medical supplies codes, expense amounts, insured person information, settlement status, and more. Units include yuan, number of visits, settlement order number identifiers, and others. Document structures and field order vary across different sources.
What constraints do these characteristics impose on the document parsing and chunking workflow
Daily batch updates of large volumes of documents require adaptation to structural differences across multiple sources and formats. Medical insurance documents contain a large number of coding and amount fields. Chunking must preserve field relevance, and avoid splitting associated information across fields. Some documents are image-format prescriptions or settlement vouchers, so image parsing support is required. Parsing errors directly affect subsequent expense audit and ledger summary work. Field extraction accuracy must be guaranteed. Chunking rules must adapt to the characteristics of structured documents to avoid redundant or missing key information.
Configuration Recommendations
Recommended configuration for FastGPT v4.17.0 is listed below:
| Configuration Item | Recommended Value | Rationale |
|---|---|---|
chunkSize | 800–1200 characters | Medical settlement documents contain associated fields such as codes, amounts, and details. Too short chunking will split the association between codes and corresponding expenses. Too long chunking will not meet retrieval and matching requirements. Adjust based on actual measurements. |
chunkSplitter | Switch based on document type | Medical insurance documents have two structure types: tabular (settlement lists, expense details) and textual (prescriptions, denial lists). Matching corresponding chunking rules avoids field misalignment caused by generic chunking. |
customPdfParse | Enabled | Medical insurance PDF documents often have fixed headers and structured tables. Enabling custom parsing allows accurate field extraction and filters redundant page headers and footers. |
PARSE_FILE_TIMEOUT_SECONDS | 300–600 seconds | Single files in daily batch updates may be large. Too short a timeout setting will cause large file parsing failures. Too long a timeout will block the parsing queue. Adapt to the performance of locally deployed servers. |
UPLOAD_FILE_MAX_SIZE | 100–500 MB | Packed files of batch settlement lists often exceed conventional upload thresholds. Must match the storage and bandwidth conditions of locally deployed servers. |
chunkSettingMode | Manual mode | Medical insurance document fields are fixed and formats are unified. Manual configuration allows precise adaptation to the chunking requirements of specific voucher types. |
Three Common Configuration Errors
- Empty parsing results after uploading image-format prescriptions or settlement vouchers. This occurs because image parsing adaptation for
customPdfParseis not enabled, or local docking configuration for MinerU is not completed, preventing parsing of image address content. - Partial file parsing timeouts during batch upload of settlement lists. This occurs because
PARSE_FILE_TIMEOUT_SECONDSis set too low, failing to match the actual parsing time of large batch files. - Field misalignment after parsing tabular expense detail documents. This occurs because
chunkSplitteris configured for generic text chunking, and no adjustment is made to chunking rules for table row and column structures, leading to chaotic field extraction.
How to Verify Correct Configuration
- Upload a single medical insurance settlement list PDF, check if the parsed text contains complete diagnosis and treatment item codes and expense amount fields, to verify if the
customPdfParseconfiguration takes effect. - Upload a single Excel-format expense detail document, check if the chunking result is split by row or column, to verify if the
chunkSplitterconfiguration matches the document type. - Upload a packed settlement file of around 100 MB, check if the parsing task completes within the
PARSE_FILE_TIMEOUT_SECONDSperiod, to verify the reasonableness of the timeout setting. - Attempt to upload an image-format prescription voucher, check if text content can be normally parsed, to verify that image parsing related configurations are correct.
The values given are common starting points and should be measured against the reader's own samples.
Question material comes from public community discussions. Configuration values are common starting points and should be measured against your own samples. Verified on 2026-09-28.