Skip to content
/ MTF Public

A basic tool to get 835 via the MTF API portal, with 835 parsing & reporting via python

Notifications You must be signed in to change notification settings

herbicider/MTF

Repository files navigation

MTF 835 Processor

This tool automates the downloading and processing of 835 ERA files using the MTF provided CLI tool.

Created by Kevin Xing from Hayat Pharmacy.

Installation & Setup

1. Prerequisite: Python (Optional)

Required only for Reports.

  • If you just want to download files, you can skip this.
  • To get the HTML Reports, install Python 3 from python.org.
  • IMPORTANT: During installation, check the box that says "Add Python to PATH".

2. Download the MTF CLI

You need the official CLI tool from the MTF Portal to make this work.

  1. Log in to the MTF Portal.
  2. Go to the Developer tab.
  3. Create an API Key if you haven't already.
  4. Scroll down and download the CLI Tool (a .zip file).
  5. Extract the contents of the zip file into this project folder. Your folder structure should look like this:
Project_Folder/
├── mtf-cli/                <-- This folder comes from the ZIP file
│   ├── bin/
│   ├── node_modules/
│   ├── package.json
│   └── ...
├── 1_Update_And_Report.bat
├── 2_Download_Only.bat
├── api_keys.txt
├── process_835.py
└── run-all-locations.ps1

3. Configure Your Keys

  1. Double-click setup.bat. This will verify your setup and create a configuration file named api_keys.txt.
  2. Open api_keys.txt in a text editor (like Notepad).
  3. Add your Location IDs (e.g., H1, H2) and the API Keys you generated in the portal. Format them exactly like this:
H1
Your-Long-API-Key-Here-For-H1

H2
Your-Long-API-Key-Here-For-H2

Generate the API key for each location you want to download files from via the MTF Portal, under the Developer tab.

Usage

Once setup is complete, you can simply double-click these files to run tasks:

  • 1_Update_And_Report.bat (Recommended, Python required)
    • Downloads new files with today's date for all locations.
    • Automatically generates the interactive HTML report.
  • 2_Download_Only.bat
    • Only downloads new files. Does not generate reports.
  • 3_Regenerate_Report.bat (Python required)
    • Does not download anything.
    • Regenerates the HTML report from files you already have. Use this if you modified the report or want to refresh it.
  • 4_Catch_Up_Last_90_Days.bat MFT keeps up to 90 days of data available via the API.
    • Downloads files from the last 90 days for all locations.
    • Use this first to get all data or if the script hasn't been run for a long time.

Output

  • Reports: Open the reports/ folder and click processed_835_summary.html to view your dashboard.
  • Downloads: The raw 835 text files are stored in the downloads/ folder, organized by location.

Troubleshooting

  • Window closes immediately? Try running setup.bat. It will pause and show you if Python or the CLI is missing.
  • "mtf-cli not found"? Make sure you extracted the zip file correctly so that a folder named mtf-cli exists right next to the .bat files. This CLI tool is provided by the MTF Portal under "Developer" tab. Create the API keys there as well, then scroll down to download the CLI tool. I have included everything you need into this codebase. Just make sure the folder structure is correct.
  • Python not found? If you want reports, ensure Python 3 is installed and added to your PATH. You can verify by opening Command Prompt and typing python --version. Feel free to reach out to me if you need help!

About

A basic tool to get 835 via the MTF API portal, with 835 parsing & reporting via python

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published