Claims loss run example
The following example shows extracting repeated fields from a section containing a list of claims:
- It captures Sept and Oct claims by specifying sections that start with "claim number" and collection range that starts with "September" and ends with "November".
- From each section, it excludes intervening text that isn't part of a section but that does repeat (
monthly_number_unprocessed_claims
) using a Stop parameter. Instead, it captures this info outside of sections with"match:all"
.
Config
{
"fields": [
{
"id": "total_unprocessed_claims",
"type": "number",
"anchor": "total unprocessed claims",
"method": {
"id": "row"
}
},
{
"id": "monthly_number_unprocessed_claims",
"match": "all",
"anchor": {
"match": {
"type": "includes",
"text": "unprocessed claims:",
"isCaseSensitive": true
},
"end": {
"text": "total claims",
"type": "startsWith"
}
},
"method": {
"id": "row",
"position": "right",
"includeAnchor": true
}
}
],
"sections": [
{
"id": "unprocessed_sept_oct_claims",
"range": {
"anchor": {
"start": {
"text": "September",
"type": "startsWith",
"isCaseSensitive": true
},
"match": {
"type": "includes",
"text": "claim number"
},
"end": {
"type": "startsWith",
"text": "November",
"isCaseSensitive": true
}
},
"stop": {
"type": "includes",
"text": "unprocessed claims:",
"isCaseSensitive": true
}
},
"fields": [
{
"id": "claim_number",
"type": "number",
"anchor": {
"match": {
"type": "startsWith",
"text": "Claim number:",
"isCaseSensitive": true
}
},
"method": {
"id": "label",
"position": "right"
}
},
{
"id": "phone_number",
"type": "phoneNumber",
"anchor": {
"match": {
"type": "includes",
"text": "Phone number",
"isCaseSensitive": true
}
},
"method": {
"id": "row",
"position": "right"
}
}
]
}
]
}
Example document
The following image shows the data extracted by this config for the following example PDF:
Example PDF | Download link |
---|
Output
{
"total_unprocessed_claims": {
"source": "5",
"value": 5,
"type": "number"
},
"monthly_number_unprocessed_claims": [
{
"type": "string",
"value": "Sept unprocessed claims: 2"
},
{
"type": "string",
"value": "Oct unprocessed claims: 1"
},
{
"type": "string",
"value": "Nov unprocessed claims: 2"
}
],
"unprocessed_sept_oct_claims": [
{
"claim_number": {
"source": "1223456789",
"value": 1223456789,
"type": "number"
},
"phone_number": {
"type": "phoneNumber",
"source": "512 409 8765",
"value": "+15124098765"
}
},
{
"claim_number": {
"source": "9876543211",
"value": 9876543211,
"type": "number"
},
"phone_number": null
},
{
"claim_number": {
"source": "6785439210",
"value": 6785439210,
"type": "number"
},
"phone_number": {
"type": "phoneNumber",
"source": "505 238 8765",
"value": "+15052388765"
}
}
]
}
Updated 3 months ago
Did this page help you?