Skip to main content

Widgets

Osigu ships two JavaScript widgets you can embed in your web app:

  • The Pre-authorization widget — renders the full pre-auth flow (beneficiary search, product selection, indication upload, complete). Built on ARC's REST API.
  • The Prescription widget — renders the full electronic-prescription flow (patient search, diagnosis picker, medications, issue). Built on the ePrescription (EHR) REST API.

If you'd rather not build a UI on top of the REST API, embed the widget, listen for a couple of events, and you're done. The widget calls the REST API for you — your backend doesn't need to talk to Osigu at all for the operations the widget covers.

Widget vs REST — pick one

There is no hybrid mode — if you use the widget, don't call the REST endpoints for the same operations, or you'll double-book state. Widget events tell you when the flow finishes; take that outcome and hand it off to the rest of your app.

What each widget covers

Common shape

Both widgets share the same integration contract:

  1. Include the loader script from https://widgets.osigu.com/v1/loader.js.
  2. Mount the widget with a config object (auth token, sponsor / patient scoping, event handlers).
  3. Listen for lifecycle events (ready, complete, error, close).

See each widget's Installation and Configuration pages for the exact API.

When the widgets aren't right

  • You need a custom step in the middle of the flow (e.g. an internal approval before submission). The widget can't be paused.
  • You need to render inside a native app — no WebView equivalent is shipped today.
  • You need deep visual re-skinning past what customization supports.

In these cases, wire the REST API.