HIPAASOC2

Process Prescription Document Extractor — HIPAA Compliant

Healthcare organizations process thousands of documents daily. Manual processing delays patient care and increases compliance risk.

99
Fields Extracted
180s
Max Processing

What This Template Does

AI-powered extraction using gemini-2.5-flash. Part of 113 production-ready templates.

Capabilities

  • Healthcare Extraction
  • Prescription Processing
  • Medication Extraction
  • Prescription
  • Rx

Output Schema

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Prescription Document Extraction Schema",
  "description": "Schema for extracted prescription data from Rx documents and medication orders",
  "type": "object",
  "required": [
    "document_type",
    "prescription_date",
    "prescriber_info",
    "patient_info",
    "medication"
  ],
  "properties": {
    "document_type": {
      "type": "string",
      "const": "prescription",
      "description": "Document type identifier
...

Quick Start

$ pip install doclayer
$ doclayer process document.pdf --agent healthcare.prescription

See It In Action

Real extraction example showing input document and structured output.

Input Document
═══════════════════════════════════════════════════════════════════════════════
                              PRESCRIPTION
═══════════════════════════════════════════════════════════════════════════════

PRESCRIBER INFORMATION:
-----------------------
Dr. Amanda Richardson, MD
Board Certified Internal Medicine
Lakeside Medical Group
789 Wellness Boulevard, Suite 200
Portland, OR 97201

Phone: (503) 555-1234
Fax: (503) 555-1235
NPI: 1122334455
State License: MD-OR-445566
DEA: AR1234563

═════════
Extracted Data
{
  "document_type": "prescription",
  "prescription_type": "printed",
  "prescription_date": "2024-01-12",
  "prescriber_info": {
    "name": "Dr. Amanda Richardson, MD",
    "credentials": "MD",
    "specialty": "Internal Medicine",
    "npi": "1122334455",
    "dea_number": "AR1234563",
    "state_license": "MD-OR-445566",
    "practice_name": "Lakeside Medical Group",
    "address": {
      "street": "789 Wellness Boulevard, Suite 200",
      "city": "Portland",
      "state": "OR",
      "zip": "97201"
    },
    "phone": "(503) 555-1234",
    "fax": "(503) 555-1235"
  },
  "patient_info": {
    "name": "Emily Johnson",
    "date_of_birth": "1968-07-22",
    "address": "456 Oak Street, Portland, OR 97202",
    "phone": "(503) 555-8899",
    "allergies": [
      "Penicillin",
      "Sulfa drugs"
    ]
  },
  "medication": {
    "drug_name": "Lisinopril",
    "brand_or_generic": "Generic",
    "generic_name": "Lisinopril",
    "strength": "10",
    "strength_unit": "mg",
    "dosage_form": "tablet",
    "ndc": "68180-0513-01",
    "rxnorm_code": "314076"
  },
  "sig": {
    "sig_code": "1 tab PO QD AM",
    "sig_expanded": "Take one (1) tablet by mouth once daily in the morning for blood pressure",
    "dose": "1 tablet",
    "route": "PO",
    "frequency": "Once daily in the morning",
    "duration": "30 days",
    "prn": false,
    "prn_reason": null,
    "special_instructions": "Monitor blood pressure weekly. Report any dizziness or persistent dry cough. Avoid potassium supplements without consulting physician."
  },
  "quantity": {
    "quantity_prescribed": 30,
    "quantity_unit": "tablets",
    "days_supply": 30
  },
  "refills": {
    "refills_authorized": 3,
    "refills_remaining": 3,
    "no_refill_date": null,
    "no_refill_reason": null
  },
  "daw_code": {
    "code": 0,
    "meaning": "No product selection indicated - Substitution Permitted",
    "brand_medically_necessary": false
  },
  "controlled_substance": {
    "is_controlled": false,
    "schedule": null,
    "dea_required": false,
    "state_pmp_reported": false
  },
  "pharmacy_info": {
    "pharmacy_name": "Wellness Pharmacy",
    "pharmacy_address": "100 Main Street, Portland, OR 97201",
    "pharmacy_phone": "(503) 555-7777",
    "pharmacy_npi": "9988776655",
    "pharmacist_name": "Robert Chen, RPh",
    "rx_number": "RX-2024-112233",
    "date_filled": "2024-01-12",
    "date_dispensed": "2024-01-12"
  },
  "dispensed_info": {
    "quantity_dispensed": 30,
    "generic_substituted": true,
    "manufacturer": "Lupin Pharmaceuticals",
    "lot_number": "L123456",
    "expiration_date": "2025-12-01",
    "acquisition_cost": null
  },
  "prior_authorization": {
    "pa_required": false,
    "pa_number": null,
    "pa_expiration": null
  },
  "insurance_info": {
    "plan_name": "BlueCross BlueShield of Oregon",
    "bin": "003858",
    "pcn": "A4",
    "group": "BCBSOR001",
    "member_id": "XYZ123456789",
    "copay": "$10.00"
  },
  "clinical_info": {
    "diagnosis": "Essential Hypertension",
    "icd_code": "I10",
    "weight_based_dosing": false,
    "patient_weight": null
  },
  "validation": {
    "prescriber_signature_present": true,
    "date_valid": true,
    "quantity_reasonable": true,
    "controlled_requirements_met": true,
    "all_required_fields_present": true
  }
}

Example of routine prescription for blood pressure medication from primary care physician. Demonstrates standard prescription processing with generic substitution and insurance coverage details.

Frequently Asked Questions

What documents can Prescription Document Extractor process?

The Prescription Document Extractor template processes healthcare documents including various formats and layouts. See the instructions for specific document types supported.

How accurate is the Prescription Document Extractor extraction?

The Prescription Document Extractor template uses Gemini 2.5 Flash for high-accuracy extraction. Results include confidence scores for each field.

Can I customize the Prescription Document Extractor template?

Yes, you can modify the extraction schema, add custom fields, or adjust the instructions to match your specific requirements.

Start Extracting Data Today

Process your first document in under 5 minutes. No credit card required.