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
Fastest path to launch. Zero backend work for the covered flow. Osigu owns the UX so you inherit UX improvements over time. Limited visual customisation.
Total control over the UX. More code. You maintain the flow. Best when you need custom steps or non-standard branding.
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
Beneficiary search, product selection, indication capture, complete request. Handles OTP if the sponsor demands it.
Patient resolution, diagnosis picker, medication picker with posology, issuance. Handles v1 / v1.1 / v2 based on your provider's configuration.
Common shape
Both widgets share the same integration contract:
- Include the loader script from
https://widgets.osigu.com/v1/loader.js. - Mount the widget with a config object (auth token, sponsor / patient scoping, event handlers).
- 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.
Related
- Pre-authorization widget — start here for pre-authorizations.
- Prescription widget — start here for e-prescriptions.
- Concept: Authorizations — what the widget calls under the hood.