A MuleSoft IDP prompt that captures the referring/prescribing provider's identity, credentials, and full practice contact block from an unstructured fax or letterhead within a referral packet.
IDP Prompt — Prescriber Information Extraction
Objective: Every referral needs the prescribing provider's identity and contact details captured accurately — for callbacks, NPI verification, and routing. This information usually sits in an inconsistent fax header or letterhead rather than a labeled form field. This prompt normalizes it into a structured record.
Prerequisites
- MuleSoft IDP (Einstein) enabled; a
GENERIC document action created in Anypoint IDP.
- IDP Connector wired into the calling Mule app.
- Document-action prompt configured with
source: "llm".
The prompt
Extract prescribing provider information from the document.
IMPORTANT: You MUST respond with ONLY a valid JSON object. No markdown, no explanation, no code fences. Use null for any field not found in the document.
Output format (JSON object):
{"Prescriber Name": "string|null (include credentials: MD, DO, NP, APNP)", "NPI Number": "string|null (10-digit)", "Practice Name": "string|null", "Office Address": "string|null", "Phone Number": "string|null", "Fax Number": "string|null", "Email Address": "string|null"}
Sample payload — extraction output
{
"Prescriber Name": "Dr. Sarah Kim, MD",
"NPI Number": "1234567893",
"Practice Name": "Lakeview Endocrinology",
"Office Address": "410 Lakeview Dr, Suite 200, Madison, WI 53703",
"Phone Number": "608-555-0142",
"Fax Number": "608-555-0143",
"Email Address": null
}
Testing and validation
- Happy path: a clean letterhead with all fields present returns a fully populated record, with credentials appended to the name (e.g. "MD", "NP").
- Edge case: a fax cover sheet where the sender's fax number is prominent but the practice's actual office fax appears lower on the page — verify the model picks the practice/office fax, not the transmitting fax machine's number.
- Confirm the 10-digit NPI is captured as a string, not coerced to a number (leading behavior matters for downstream validation/checksum).
Deliverable: A structured prescriber record ready to match against an NPI registry or route the referral to the correct practice contact.