Accepted for/Published in: JMIR Rehabilitation and Assistive Technologies
Date Submitted: Nov 25, 2024
Open Peer Review Period: Jan 21, 2025 - Mar 18, 2025
Date Accepted: Jun 3, 2025
(closed for review but you can still tweet)
A Novel QR Code-Based Solution for Secure Electronic Health Record Transfer in VTE Home Rehabilitation Management: The QRST-AB algorithm
ABSTRACT
Background:
Venous thromboembolism (VTE) is a common vascular disorder requiring extended anticoagulation therapy post-discharge to reduce recurrence risk. Home rehabilitation management systems that utilize electronic health records (EHR) from hospital care provide opportunities for continuous patient monitoring. However, transferring medical data from clinical to home settings raises significant concerns about privacy and security. Conventional methods such as manual data entry, optical character recognition, and dedicated data transmission lines face notable technical and operational challenges.
Objective:
The aim of this study is to develop a QR code-based secure transmission algorithm (QRST-AB) using Avro and Byte Pair Encoding (BPE). The algorithm facilitates the creation of out-of-hospital health records by enabling patients to scan QR codes via a dedicated mobile application, ensuring data security and user privacy.
Methods:
Between January and October 2024, 300 hospitalized VTE patients were recruited at the Sixth Medical Center of the Chinese PLA General Hospital. Post-discharge, participants used a home rehabilitation application tailored for VTE management. The QRST-AB algorithm was developed to securely transfer in-hospital EHR to the application. It incorporates cryptographic hash functions for authentication and employs BPE, Avro, and Gzip for optimized data compression. Specifically, BPE tokenizes medical text, while Avro serializes JSON objects, contributing to data encryption. A proprietary tokenizer was trained using a "Chinese Medical Text Dataset," and compression efficiency was evaluated using a "Performance Benchmark Dataset." Comparative analyses were conducted to assess the compression efficiency of JSON serialization methods, Avro and ASN.1, and tokenization algorithms, BPE and unigram.
Results:
The dataset consisted of JSON files from 300 patients, averaging 240.1 fields per file (range: 89–623) and 7,095 bytes in size (range: 2,748–17,425 bytes). Using the BPE + Avro + Gzip algorithm, the average file size was reduced to 1,048 bytes, achieving a compression ratio of 6.67. This was 1.82 times more efficient than traditional Gzip compression (average file size: 1,907 bytes; compression ratio: 3.66; P < 0.001). For Chinese medical text tokenization, BPE outperformed unigram with a compression ratio of 4.68 versus 4.55 (P < 0.001). Avro and ASN.1 demonstrated comparable compression ratios of 2.57 and 2.59, respectively, when used alone (P = 0.299). However, Avro combined with BPE and Gzip significantly outperformed ASN.1, achieving compression ratios of 6.67 versus 5.21 (P < 0.001). Additionally, 84.7% of patients needed to scan only one QR code, requiring an average of 3.1 seconds.
Conclusions:
The QRST-AB algorithm efficiently compresses and transmits data in an encrypted manner and authenticates the identity of the scanning users, ensuring the privacy and security of medical data. Delivered as a software development kit, the algorithm offers straightforward implementation and usability, supporting its broad adoption across various applications.
Citation
Request queued. Please wait while the file is being generated. It may take some time.
Copyright
© The authors. All rights reserved. This is a privileged document currently under peer-review/community review (or an accepted/rejected manuscript). Authors have provided JMIR Publications with an exclusive license to publish this preprint on it's website for review and ahead-of-print citation purposes only. While the final peer-reviewed paper may be licensed under a cc-by license on publication, at this stage authors and publisher expressively prohibit redistribution of this draft paper other than for review purposes.