Case Study

How Shulam Built a Compliance Video Agent for Ziv Health

From 30-minute manual screen recordings to one command, 2 minutes, zero retakes. The Compliance Evidence Recorder automates MDI telehealth partner onboarding.

7
Requirements
All recorded in one run
2 min
Total Runtime
Down from 30+ min manual
6.5 MB
Output Size
Under 100MB upload limit
0
Skips
Every field filled, every button clicked
9
Intake Exchanges
Body profile → HIPAA consent
8
Categories
Weight loss through longevity

The problem

Before Ziv Health could go live with MDI (MD Integrations) as its telehealth partner, the clinical team needed video evidence proving the platform meets 7 compliance requirements. Privacy policy visible. Terms acknowledged. Side effects shown before purchase. Consultation fee as a separate line item. The full intake questionnaire walked through. Treatment plan visible. And a clear way for patients to message their doctor.

Recording this manually meant opening a screen recorder, navigating to each page, scrolling to the right sections, filling out the 9-exchange intake questionnaire field by field, and hoping nothing went wrong. One missed scroll, one wrong click, and you start over. Each attempt took 30+ minutes.

And this had to be done for every telehealth category — weight loss, men's health, women's HRT, dermatology, hair loss, longevity, and more. Each category has a different intake flow. Manual recording doesn't scale.

How Shulam built it — in one session

Hour 1

Mapped the requirements

MDI requires 7 evidence points: privacy policy, terms acknowledgment, consultation awareness, consultation fee, intake questionnaire, treatment plan, and doctor communication. Each must be visible in a single video.

Hour 2

Built the Playwright framework

Per-section video recording with title slides and banner narration. API proxy to forward intake calls from the dev server to Railway. ffmpeg concat for the final MP4.

Hour 3

Mapped all 9 intake exchanges

Read the backend ConversationalIntakeService to extract every field ID, label, and option. Mapped 3 UI types (OptionCards, CheckboxGroup, InputFieldGroup) to Playwright selectors.

Hour 4

Discovered the API URL mismatch

Dev mode uses zivrx-api-production.up.railway.app (Railway fallback), not api.zivhealth.com. Proxy was only intercepting one domain. Extended to cover both — exchanges started working.

Hour 5

Found two backend bugs, built workarounds

Preferences exchange sends options+checkboxes+inputFields simultaneously but UI only shows one (infinite loop). MDI consent checkbox uses wrong fieldId. Built API injection pattern to bypass both.

Hour 6

Zero-skip run, video submitted to MDI

All 7 requirements, all 9 intake exchanges, all fields filled. 6.5 MB MP4 uploaded to MDI submission portal. Waiting for clinical team Green Light.

Two bugs the agent found

Building CER uncovered two bugs in the intake flow that would have affected real patients. Both were worked around in the agent and flagged for fix.

Preferences infinite loop

The preferences exchange returns options, checkboxes, and input fields in a single response. The UI renders them in priority order (options > checkboxes > inputFields), so only options show. Clicking an option submits it, but the backend returns the same structure — creating an infinite loop.

Workaround: Click one option for video evidence, then inject the remaining fields (personalization goals, delivery preference, prior medications) via direct API POST.

MDI consent fieldId mismatch

The backend expects fieldId 'mdi_consent_confirm' but the frontend's checkbox handler sends 'mdi_consent' (the group name). The consent acknowledgment never registers in the conversation state, so the exchange never advances to the 'understand questions' sub-step.

Workaround: Show the consent checkbox visually (for the video), then inject all 3 MDI compliance sub-steps via direct API calls: consent confirmation, 'yes I understand', and the verbatim doctor message.

Beyond MDI — 6 use cases

The Compliance Evidence Recorder was built for MDI onboarding, but the pattern applies anywhere you need automated, reproducible video evidence of a web application.

🏥

Telehealth Partner Onboarding

MDI, OpenLoop, CareValidate — any partner that requires video evidence before going live. Record once per partner, per category.

📜

State Licensing Evidence

Some states require video proof that your platform meets telehealth regulations. CER walks through state-specific requirements automatically.

🏛️

Insurance Credentialing

Insurance networks reviewing telehealth platforms need to see the patient experience. CER records the full journey from product page through intake.

📊

Investor Due Diligence

Investors evaluating a telehealth platform want to see the product. CER produces a polished walkthrough video in 2 minutes — no demo prep needed.

🧪

QA Regression Testing

After every deploy, run CER to verify the patient-facing flow still works end-to-end. If any selector fails, the video shows exactly where it broke.

📁

Compliance Audit Trail

Run CER monthly and archive the videos. If a regulator asks 'what did your site look like on date X?', you have timestamped video evidence.

Technical architecture

// Compliance Evidence Recorder — stack
Playwright (headless Chromium) → per-section .webm recording
API proxy → intercepts Railway + api subdomain
Exchange mapping → reads from ConversationalIntakeService
Wait strategy → waitForSelector before every interaction
API injection → bypasses UI bugs for preferences + consent
ffmpeg → concat webm → single H.264 MP4 (crf 23, faststart)
// Output: 6.5 MB, 1280x720, 2 min runtime

The agent drives a real Chromium browser through the patient-facing site at zivhealth.com. It fills real forms, clicks real buttons, scrolls to real content. The clinical reviewer sees exactly what a patient sees — because it is what a patient sees.

Each section is recorded as a separate video segment with a title slide (Evidence 1/7, 2/7...) and a banner narrating what is being shown. The segments are concatenated into a single MP4. No audio needed — the banners make the video self-documenting.

Need compliance evidence for your telehealth platform?

CER is included in every Lighthouse plan. Your first video records in 2 minutes.

Apply for Lighthouse →