iDevApp › WordPress plugins › New patient registration

iDev Patient Registration

An online new patient registration form: accept the PDPA / GDPR notice, photograph an ID card or passport and have it read on the phone (or type the details), staff check and approve, a connector in the hospital creates the HN in HOSxP, and the patient card with a QR code is emailed. All personal data is encrypted.

  • Version 1.2.1
  • WordPress 6.2+
  • PHP 7.4+
  • Language Thai / English

1Features

On a phone: 5 steps, starting with consent
On a phone: 5 steps, starting with consent
On a computer
On a computer
  • Patients choose 1 of 3 ways: photograph the ID card · photograph the passport · type the details
  • Continuous camera focus checks sharpness and takes the photo by itself when the document is still and clear; tap to focus
  • Reads the data on the patient’s phone (photos are not sent to outside services; the reader loads automatically in Pro or you host it on your server) · passports are read from the MRZ with check digits, and Thai passports give the ID number
  • Contact details: phone, email LINE and WhatsApp
  • Staff check against the document photo, correct it, then enter the HN (or approve it for HOSxP automatically with Pro)
  • Patient card designer layout, colours, background image, logo, QR code / barcode sent as an image by email
  • Data and document photos are encrypted (XSalsa20-Poly1305), with key management, key backup and key rotation
  • Document photos are deleted automatically after the HN is issued · registrations per hour are limited

2Free and Pro

FreePro 2,900 THB (lifetime)
Online new patient registrationunlimitedunlimited
QR patient card · encryption · emailincludedincluded
Automatic ID card / passport readingyes, if you host the reader (tesseract.js) on your serverloaded for you
HOSxP connectorno — enter it in HOSxP and type the HNcreates / finds the HN and sends the patient card automatically
Patient card designs3 designs, colours / logo+ 4 new designs and 9 ready-made ones (hospital, formal, dental, eye clinic, women, children, pharmacy, premium)
Emails to patientsbasicdesigner 3 templates, Thai / English text, live preview

One file to install: the zip of iDev Patient Registration Pro already includes the free version (if it is installed it is switched off for you and your data stays). For 1 website, no yearly fee, and included in I-Clinic / I-Drug. Licences issued before version 1.2 work with Pro.

Permission to connect to the HOSxP database must come from BMS (the developer of HOSxP). Customers contact BMS themselves; the Pro price does not include it.

Updating from 1.1 to 1.2: sites using the HOSxP connector must also install iDev Patient Registration Pro (with the same licence), or the connector stops receiving registrations. Your data and connector key stay.

To buy and enter a licence, see Licence prices and how to buy

3Getting started

  1. Create the registration page

    Create a page, e.g. "New patient registration", with the block New patient registration or [idev_patient_registration]

  2. General settings

    Patient registration › Settings › General Enter the hospital / clinic name in Thai and English, address, phone and how long to keep document photos

    General tab
    General tab
  3. Choose the registration methods and fields

    In the tab Form Turn the registration methods, automatic reading and automatic capture on or off, and set which fields are required / optional / hidden (English name, address, location, allergies, emergency contact, LINE, WhatsApp)

    Form tab
    Form tab
  4. Consent text

    In the tab Consent (PDPA / GDPR) Thai and English text, DPO contact and a privacy policy link. Have your DPO or legal team check it; editing the text creates a new version.

  5. Design the patient card

    In the tab Patient card Choose the layout (full colour / white with a coloured header / light), colours, background image, logo, the details shown and the QR / barcode. The preview updates as you go.

    Patient card designer — the card is 1012 × 638 px (credit-card size)
    Patient card designer — the card is 1012 × 638 px (credit-card size)

    For the QR data use {hn} {ref} {site} recommended {hn} only, for the scanner at registration. Don’t put names or dates of birth in the QR code.

  6. Set up the encryption key (important)

    In the tab Encryption key Click Use a separate key file (recommended) and click Download the key backup and keep it offline, e.g. on an encrypted USB drive or in a password manager

    Encryption key tab
    Encryption key tab

    If the key is lost nobody — including administrators — can open patient data. If you use a key derived from AUTH_KEY and that value in wp-config.php changes, add the old value as IDEV_MEDREG_OLD_AUTH_KEY and IDEV_MEDREG_OLD_SECURE_AUTH_KEY to recover it

  7. Connect HOSxP (with Pro)

    Install iDev Patient Registration Pro and the HOSxP connector tab appears. Click Create connector key (copy it now; it won’t be shown again), then Download the connector (zip) and install it on a computer in the hospital that can reach the HOSxP database

    HOSxP connector tab
    HOSxP connector tab

4Working with HOSxP

The website never connects to the HOSxP database directly. The connector is a small PHP program on a computer in the hospital that runs every 1–5 minutes:

  1. it fetches the registrations staff have approved
  2. finds the existing patient (keeps the HN) or creates a new HN
  3. sends the HN back to the website → the system sends the Patient card by email automatically

The connector has 3 modes: dry-run (test, writes nothing) · lookup-only (finds existing patients only) · insert (creates new HNs). Start with dry-run.

# Linux: crontab -e and add this line (every 2 minutes)
*/2 * * * * php /opt/hosxp-connector/hosxp-connector.php >/dev/null 2>&1

Windows: Task Scheduler → Create Task → trigger every 2 minutes → Action C:\php\php.exe argument C:\hosxp-connector\hosxp-connector.php · details are in README-TH.md in the connector zip

You don’t need HOSxP: on the registrations list click Enter HN after recording the patient in the hospital system, and the patient card is sent in the same way

5Staff work

Patient registration › Registrations
Patient registration › Registrations
  • Status: waiting for review → approved, waiting for HOSxP → HN issued (or rejected / HOSxP failed)
  • Open a registration to check it against the document photo, fix anything read wrongly, then click ✓ Approve and send to HOSxP
  • For patients who typed their details, check the original document at registration on their first visit
  • Resend the card by email · Download the card as an image
  • The role Medical records staff sees only the registration menu, without site administrator rights

6Blocks and shortcodes

Block / shortcodeWhat it does
[idev_patient_registration]Registration form (block New patient registration)

For developers

HookWhen
idev_medreg_submittedA patient submits the form
idev_medreg_hn_issuedThe HN is issued (from HOSxP or entered by staff)
idev_medreg_submit_responsefilter for the data returned after registration

7Troubleshooting

The ID card / passport can’t be read

  • Take the photo in good light with no glare on the card, and fill the frame with the document
  • Passports: both <<< lines at the bottom must be visible
  • If only part is read, patients can correct and complete every field before sending

The camera doesn’t open on the page

The site must use https and the patient must allow the camera. If it still won’t open, they can take the photo with the camera app and upload it

Registrations show "(unreadable — check the encryption key)"

The current key is not the one they were saved with. See the Encryption key tab, which shows how many registrations use each key and how to add the old AUTH_KEY to recover them

The connector says "needs an iDev Patient Registration licence" (402)

The HOSxP connector is part of iDev Patient Registration Pro and needs a licence for this site’s domain. Enter the key in iDevApp › License

The HOSxP connector hasn’t been in touch for over 15 minutes

Check that cron is still running on the connector computer, that it can reach the internet and that the connector key matches the latest one