# LabConcept--A New Mobile Healthcare Platform for Standardizing Patient Results in Telemedicine
## 3 Appling the LabConcept Telemedicine Platform
### Loading the results  
The submenu corresponding to the \"Load results\" feature is divided into three categories with different functions: scan QR, import and LIS. The corresponding software interfaces are presented in Figure 4b. 1. Scan QR--This is the submenu that links the \"load_results_1.m\" corresponding to the \"load_results_1.fig\" GUI, which allows the user to upload the results via the mobile device's internal camera. The QR scan simulation for hematology results from the result bulletin is presented in Figure 5a. Figure 4: The LabConcept’s interface: (**a**) Main menu; (**b**) Load results menu. Figure 5: Loading the results via the embedded QR code from the results bulletin for hematology: (**a**) Loading the results via the embedded QR code from the results bulletin; (**b**) The recognized results from the simulated results bulletin for hematology. In order to use the internal camera from the mobile device, the LabConcept platform was set with the corresponding video input. A portion of the algorithm from the \"load_results_1.m\" program that performs the image acquisition is presented below [16]:  
_axes(handles.axes1);_  
_global vid;_  
_global i;_  
_i=0;_  
_vid = videoinput('winvideo', 1, YUY2_640 \(\times\) 480');_  
_himage = image(zeros(480,640,3),'parent',handles.axes1);_  
_preview(vid,himage);_  
The video acquisition is displayed on axes1 from the \"load_results_1.fig\" GUI and it samples images every second. The algorithm stops the acquisition after a clear image is detected and can be decoded by the QR algorithm:  
_ini = thread('final')(init.jpg');_  
_axes(handles.axes1);_  
_imshow(ini);_  
The \"load_results_1.m\" also contains a QR algorithm that decodes the captured image of the QR embedded on the result bulletin. The algorithm uses Reed-Solomon error correction and the elements are encoded as bytes of 8 bits (b\({}_{7}\)b\({}_{6}\)b\({}_{5}\)b\({}_{4}\)b\({}_{3}\)b\({}_{2}\)b\({}_{1}\)b\({}_{0}\)) with standard numerical value (SNV) [17]:  
\[\text{SNV}=\sum_{i=0}^{7}{\text{b}_{i}\cdot\alpha^{i}} \tag{1}\]  
where \(\alpha\epsilon\text{F}_{256}\) is a primitive element that satisfies:  
\[\alpha^{8}+\alpha^{4}+\alpha^{3}+\alpha^{2}+1=0 \tag{2}\]  
The Reed-Solomon code uses one of 37 different polynomials over F\({}_{256}\), with degrees (n) ranging from 7 to 68, depending on how many error bytes the code adds. Their polynomials are all in the form [18]:  
\[\text{P}(\text{n})=\prod_{i=0}^{n}\left(\text{x}\alpha^{i}\right) \tag{3}\]  
For the simulation, we used the ZXing library [13,19]:  
_import com.google.zxing.qrcode.QRCodeReader;_  
_import com.google.zxing.client.j2 se.BufferedImageLuminanceSource;_  
_import com.google.zxing.BinaryBitmap;_  
_import com.google.zxing.common.HybridBinaryizer;_  
_import com.google.zxing.Result;_  
_primage = im2 jzuzad(ini);_  
_image = BufferedImageLuminanceSource(pimage);_  
_bimage = BinaryBitmap(HybridBinaryizer(image));_  
_qrcode = QRCodeReader;_  
_try_  
_result = qrcode.decode(bimage);_  
_qrsting = char(result.getText());_  
_catch e_  
_qrsting = [];_  
_end_  
_clear pimage;_  
_clear qrcode;_The,qrstring\" variable is the decoded QR string from the sampled image of the results bulletin's QR coding proposed by the authors. In the simulation example from Figure 5, the recognized string from the QR scanning procedure is:  
\"@RBC4.64/HGB13.9/HCT40.1/MCV86.4/MCH30.0/MCHC34.7/RDW12.0/THR322/PDW16.8/PCT0.31/MPV9.7/WBC9.5/LYM#2.01/LYM%21.2/MON#0.68/MON%7.2/NEU #6.62/NEU%69.6/EO#0.14/EO%1.5/BA#0.05/BA%0.55\" and the header and trailer symbols \"@\", \"@\" with the separators \"/\" between the domain parameters were used for coding.