The referral pack, processed without leaving the record.
Referrals, prior authorizations, consent forms and discharge summaries arrive as PDFs and have to be handled exactly as they arrived. Kernstra, a PDF viewer and editor SDK, lets a clinic’s back office complete, correct, annotate and sign them inside the EHR or practice system, with nothing sent to a third party, then file the finished document straight to the patient record. Because no document leaves the browser, Kernstra never receives protected health information.
Illustrative scenario. Riverside Health, the staff and the patient are not real; the tools and behavior are.
What a PDF viewer inside an EHR or practice system has to do.
Each of these is a requirement a clinical back office puts on a document tool. The answers describe how the SDK works, not a roadmap.
Patient data must not leave your boundary
A referral letter is protected health information. Sending it to a third-party service to render or edit it is a data-processing question nobody wants to open.
There is no Kernstra server in the path. No page content, text or bytes of a document are ever transmitted. Each load sends one license status check, with your key and a pseudonymous browser identifier, carrying nothing about the documents.
It has to live inside the practice system
Staff work in one screen. A document tool that opens a new tab, or needs its own window size, breaks the workflow.
The viewer measures its own container, not the browser window. Put it in a side panel, a modal or a narrow column of your system and it lays itself out for that space.
Scanned bundles are big
A hospital discharge pack or a historical record can run to hundreds of pages of scans. Staff cannot wait for the whole file before they can start.
Range requests bring down the structure and the first pages. A 107 MB, 100-page scanned document opened after about 0.2 MB and showed its first page in 157 ms, after about 6 MB, with the rest loading while staff read.
Corrections must not alter the document
A wrong date of birth on a referral has to be corrected, but the corrected letter must still be the same letter, in the same face, for the record.
Text edits go into the document’s own text objects, in the embedded font, with the line reflowing inside its own width. Nothing else on the page moves.
Who did what, and when
Every annotation and signature needs a name against it, and the finished document must not be quietly changed afterwards.
Every note, mark and stamp carries the author your system sets. One undo history spans every tool, and the document can be locked on filing so it cannot be modified.
Forms are still forms
Prior-authorization and consent forms arrive with fields. Staff need to type into them, not retype them somewhere else.
Fields in the document are detected and made editable, with an event on every change so your system can validate as staff type, and the form can be flattened on filing.
Form filling and seven tools carry a referral through the back office. The rest are there when you need them.
This setup is a configuration object, not a project.
The tools the back office does not need are switched off, so the toolbar shows the ones above. The viewer sits in a side panel of the practice system, the author is the logged-in staff member, and the document is locked and filed to the patient record on approval.
- Fits the panel it is givenA 420-pixel side panel gets the narrow layout, its tools in a strip along the bottom; a full-screen review gets the full toolbar. Same configuration.
- Named entriesThe annotation author comes from your session, so every note, mark and stamp is attributable to a staff member.
- Approve, lock, fileOn approval, protect the document and send the bytes to the patient record through your own API. Kernstra never stores them.
const viewer = new PDFViewer(sidePanel, referral, { mode: 'full', tools: { // the tools the back office uses stay on; these are switched off addText: false, freeText: false, draw: false, arrow: false, line: false, rectangle: false, ellipse: false, polygon: false, polyline: false, highlight: false, check: false, cross: false, dot: false, erase: false, image: false, link: false, managePages: false, sign: { draw: true, type: true, upload: false }, }, toolbar: { layout: 'bar', print: true, download: false }, annotations: { author: session.staff.displayName }, }); viewer.on('formFieldChanged', ({ field }) => validate(field.name, field.value)); // approval: lock the document and file it to the record async function file() { await referral.security.protect({ ownerPassword: vault.key, permissions: { modify: false, annotate: false, fillForms: false, assemble: false, copy: false, print: true }, }); // your system, your API await ehr.documents.put(patient.id, await referral.save()); }
The numbers behind the back office.
Send us a blank referral or authorization form. We will process it while you watch.
Twenty minutes with an engineer who works on the SDK. Bring a real, blank form from your practice and we will open it inside a mock of your system, fill it, correct it, annotate it, sign it and lock it in front of you, then walk through the integration with your record system.