SpectOcular
Authorized workflow

Google Workflow Setup

Restricted page for authorized SpectOcular staff. Enter the access code to continue.

Pilot backend

Google Workspace + Drive + Sheets setup.

Use admin@spectocularhealth.com for all pilot activity. This account is under the SpectOcular Google Workspace BAA and has MFA enabled.

Admin-only pilot rule

For simplicity and control during the pilot, all folder creation, master database ownership, uploads, notifications, invoice generation, and Apps Script execution should occur under admin@spectocularhealth.com.

MFA / 2FA requirement: The master database linking patient identifiers to subject IDs must remain accessible only through MFA-protected SpectOcular Workspace access. Do not share the master linkage sheet with OD/site users.
Files included in this package

Deploy these Apps Script files from admin@spectocularhealth.com.

Deployment checklist

  1. Sign into Google as admin@spectocularhealth.com.
  2. Confirm the account has MFA/2-Step Verification enabled and Workspace BAA is signed.
  3. Create a new Apps Script project named SpectOcular Pilot Workflow Backend.
  4. Paste Code.gs and appsscript.json.
  5. Run setupSpectOcularGoogleWorkflow() once.
  6. Approve permissions only from admin@spectocularhealth.com.
  7. Copy the returned root folder URL, master database URL, and portal token.
  8. Deploy the script as a Web App executing as admin@spectocularhealth.com.
  9. Paste the Web App URL and portal token into the Authorized Research Workflow page.
  10. Create one test subject and confirm the Drive folder + database rows are created.
  11. Upload a test signed packet PDF and confirm it lands in the correct subject folder.
  12. Submit one test agreement and confirm the row appears in Eyecare_Professional_Agreements.
  13. Submit one test monthly attestation and confirm the row appears in Monthly_Attestations.
  14. Generate a test monthly invoice/offset statement.

Drive/database structure created by the script

00_Master_Database_RESTRICTEDContains the master spreadsheet and patient ↔ subject linkage. MFA/admin-only.
01_SitesContains site folders and subject folders such as 01-00001.
03_Monthly_InvoicesStores monthly Retina IQ invoice/offset statements by site.

Production notes

Google Workspace is appropriate for the pilot. For national scale, migrate imaging ZIPs and model-training data to Azure Blob/Data Lake with formal user authentication, device-side upload agents, hash-based integrity checks, and auditable de-identification workflows.