Prompt medical response to injured people at traffic accidents is crucial and medical treatment is relying on correct health data of the patient. Among various automated personal identification systems, QR Code-based systems exist, where most of them are not open source and available with a fee. Besides, these systems are not having universal compatibility which results in hindering the access to personal identification information generated by other systems.
In this study several Python modules including cryptography, pqrcode and zbarlight were used in an algorithm to provide a generic encrypted QR Code-based personal identification system that can be used anywhere in the world. The encryption will prevent the access to personal health data by anyone other than the police or health professionals.
The proposed method consists of two separate systems, all the steps needed for QR Code generation form the first system and obtaining the actual personal identification information through QR Code decoding and decryption form the second system.
Extracting personal identification data from the database (MySQL or MariaDB) with MySQL Python package and combine all the key data fields for a given person in a string in a specified order. The field names of the database were excluded in the QR Code generation to reduce the complexity of the image.
Cryptography module of Python is used to generate a key which is saved for decryption step and the personal identification string obtained from the database was encrypted. The key will be identical for all the QR Codes generated.
Following the encryption step, pyqrcode module of Python is used to encode the encrypted string and the image of QR Code is generated. This image is assumed to be printed and carried by the person all the time.
During a traffic accident police officer or a health professional can use various means to scan the QR Code carried by the person. Then, the python code using zbarlight decodes the encrypted QR Code contained in the image.
Cryptography module with the key used in encryption to decrypt the code and print the information with the respective field names.
Final part of the algorithm splits the decrypted string and print the personal information with field names. Also the generated information is saved in csv format for importing to any system in which the information is sought.