मुख्य कंटेंट तक स्किप करें

Printing, PDF, verify & share

Preview clinic letterhead output, print browser copies, download signed PDFs, scan QR verification and share expiring links with optional OTP.

Who can do this: Practitioners use clinical.document.read, clinical.document.share and rx.read; owners/admins use branding.manage; receptionists/accountants use billing.read for bill print. Where: clinical print (/app/clinical-documents/:id/print), letterhead (/app/settings/brand-profiles), public verify (/verify/:token), bill print (/app/billing/:billId/print), Rx print (/app/prescriptions/:prescriptionId/print).

Clinical print page with Print, Download PDF and Share actions

Before you start​

  • Sign the clinical document if you need Download PDF or Share.
  • Allow browser pop-ups for printing.
  • Add the patient's mobile number before using OTP-protected links.
  • Set up Letterhead & Branding before printing official output.

Preview and print a clinical document​

  1. Open a document and click Print. Result: /app/clinical-documents/:id/print opens.
  2. Choose Print language: English, ?????? or default. Result: Preview reloads in that language when content is available.
  3. Review Document preview (read-only). Result: Server-rendered HTML appears in a sandboxed preview.
  4. Click Print. Result: The browser print dialog opens and PRINT is recorded in the access log.
tip

Use browser print if the PDF is still being prepared or failed.

Download PDF​

  1. Open the print page for a signed Final document. Result: PDF status is checked.
  2. If you see PDF is being prepared?, wait and try again. Result: The render job will mark the PDF ready.
  3. Click Download PDF when enabled. Result: A short-lived URL opens or the PDF file downloads, and EXPORT is logged.
  1. Click Share. Result: Share document opens.
  2. Choose Link valid for 1, 3, 7, 14 or 30 days. Result: Expiry is stored with the link.
  3. Tick Require a one-time code sent to the patient's mobile when needed. Result: The public page requires OTP. Restricted documents are OTP-gated by the server.
  4. Click Create link. Result: Link created. Copy it or send it on WhatsApp. appears and SHARE is logged.
  5. Click Copy link or Send on WhatsApp. Result: The message contains only facility name and link.
  6. Click Revoke on an active link. Result: The link stops working immediately.
caution

Share links are for signed documents only. Do not paste clinical content directly into WhatsApp.

  1. The patient opens /api/share/:token. Result: A no-cache landing page shows facility name, document number, expiry and OTP requirement.
  2. If OTP is required, the patient requests and enters the 6-digit code. Result: A 10-minute proof is created.
  3. The patient views the document or PDF. Result: Public VIEW or EXPORT access is logged.

Verify a printed document​

  1. Scan the QR code on printed output. Result: /verify/:token opens.
  2. Read Document verification. Result: It shows document number, title, facility, signed date, content fingerprint and status.
  3. Check the status: Valid, Valid ? amended version, Replaced by a newer version or Voided (entered in error). Result: Authenticity is confirmed without revealing patient data.

Set letterhead and QR​

  1. Open Letterhead & Branding. Result: Default and branch profiles are listed.
  2. Click New profile. Result: Profile form sections open.
  3. Fill Letterhead, Contact & registrations, Look & paper, Logo, signature & seal and Footer. Result: Printed output uses those settings.
  4. Turn on Print the verification QR code. Result: Signed document output includes a QR when available.
  5. Click Save. Result: Brand profile saved. appears.
Letterhead and branding profiles page
  1. Open /app/prescriptions/:prescriptionId/print. Result: The Rx print view opens.
  2. Use the print action. Result: Browser prints the prescription.
  3. Open /app/billing/:billId/print. Result: Bill print, payment and send actions load.
  4. If unpaid, record payment first. Result: The bill refreshes and can be printed or sent.
Prescription print view

Troubleshooting​

Problem / messageWhat it meansWhat to do
?Your browser blocked the print window. Allow pop-ups for this site and try again.?Browser blocked print.Allow pop-ups and retry.
PDF_NOT_READY / ?The PDF is not ready yet?PDF render is pending.Use Print or retry later.
PDF_UNAVAILABLE / ?A PDF is only available for the current signed version; print the document instead?Not the current signed final.Open current final or print.
DOCUMENT_NOT_SHAREABLE / ?Only signed documents can be shared.?Draft or unsupported status.Sign first.
PATIENT_PHONE_MISSING / ?The patient has no mobile number on file for the OTP check?OTP needs a mobile.Add mobile or do not require OTP if allowed.
SHARE_UNAVAILABLE / ?Sharing is not configured on this server.?Public sharing config is missing.Ask admin to configure sharing.
FORBIDDEN / ?You do not have permission to share documents.?Missing clinical.document.share.Update role permissions.
?This verification code is invalid, has expired or the document is no longer available.?QR token invalid or unavailable.Reprint from the current signed document.
INVALID_OTP / ?The code is incorrect or has expired.?OTP failed.Request and enter a fresh code.