requisition storage and retrieval are an integral part of any routine or specialized outpatient clinical laboratory .
patients receive a paper requisition from their physician indicating the required tests , and the patient brings it to a satellite bleed - station or a hospital for specimen collection .
the process of specimen collection involves a number of individuals : the ordering physician or their surrogate , data entry clerk , phlebotomist , and laboratory assistant or technologist .
as such , there is ample room for errors at the level of order - entry .
these are either brought to the hospital bleed - station or , for referred - in specimens , come from another laboratory along with the collected specimen .
if the patient has no record in our laboratory information system ( lis ) , a record is created , the specimens are then electronically recorded as  arrived ,  a barcode label is created for each tube and then the specimen is appropriately routed for testing in high volume and/or specialized areas as needed . in the past , when there was a question about the possibility of order - entry error ( misidentification of ordering physician , demographic information in question , unusual test - request or test combination , question from referring laboratory , possible specimen mix - up ) , we would manually retrieve the paper requisition from filing cabinets located in the accessioning area by date .
these were stored in the order they were received . after a period of about 6 weeks , these requisitions are placed into a long - term storage facility for a period required by the accreditation body . as we receive up to  1000/day ,
the task of finding a requisition is laborious . however , since a one - dimensional barcode label with the patient 's unique provincial health number ( phn ) is automatically generated along with the barcodes produced for each of the collected samples , it seemed natural to apply this label to each requisition and build a solution to electronically store the requisitions for more rapid retrieval . while a number of commercial products for requisition storage and retrieval exist , our budgetary constraints did not permit us to pursue these options . given the simplicity of our needs , namely , to be able to find a requisition for confirmation of demographic , diagnostic and test - request information , it seemed reasonable to use a number of available open - source tools to create a program capable of scanning a patient requisition and storing the it by according to the content of any barcode(s ) present .
the goal of this project was to produce a simple , entirely open - source tool solution to this problem .
the software we developed , dubbed  reqscan ,  requires an automatic document feed ( adf ) scanner connected to a computer running gnu / linux .
it is written in python , a cross - platform scripting language , which functions as a 
python and all other required software tools for this project ( so - called  dependencies  ) , are free and open - source .
reqscan interfaces with scanners using scanner access now easy ( sane ) , a public domain application programming interface which supports thousands of devices .
the program scans all pages in the adf source ( which can be specifically selected if there is more than one ; for example , a front and rear loader ) , and the files are saved to a temporary directory as tiff files according to the scanning resolution chosen .
they are then processed using zbar , a barcode scanning library , and saved in portable document format ( pdf ) in a folder named after the current date , with file names consisting of the barcode data . if more than one barcode is found on a given page , the requisition is saved as multiple separate pdfs each having a unique barcode name corresponding to the barcode content .
if the same barcode is found on different pages , the files are saved as ( barcode_content).pdf , ( barcode_content)_2.pdf , ( barcode_content)_3.pdf etc . , where ( barcode_content ) represents the encoded information .
errors ( such as records with missing barcodes ) are handled robustly , such that jobs with hundreds of records will not terminate due to an error with individual files .
the scans of the failed files are saved as individual pdf files named failed_1.pdf , failed_2.pdf etc .
, these can easily be concatenated for rapid review if desired as we discuss below .
both a command - line and a graphical interface [ figure 1 ] are available .
reqscan window displayed on ubuntu linux 14.04 reqscan supports all the barcode symbologies supported by zbar ( ean-13 , ean-8 , upca , upce , isbn-13 , isbn-10 , i25 , code 39 , code 128 , and qr ) .
we have also undertaken a preliminary implementation of data matrix barcodes using libdmtx but , unlike the other symbologies implemented through zbar , currently this is not searching for multiple data matrix barcodes per page .
retrieval of previously scanned requisitions is a simple matter of searching the file system ( or an appropriately dated folder ) for a phn using gnu / linux built - in file searching commands ( e.g.  find  or  locate  ) or search options in gui file managers .
reqscan is available for download for free at https://github.com/eviatarbach/reqscan under the gnu general public license version 3 .
paul 's hospital in vancouver , bc , canada since january of 2013 , scanning all incoming outpatient requisition forms daily .
between early january and mid - march 2013 , the second author invested approximately 10 h implementing customizations specific to the work - flow of his laboratory setting .
specifically , barcode data containing undesirable characters , e.g. , : % , | , and , $ , # , and ^ were removed by renaming using linux command - line shell scripts .
additionally , a short shell script using the open source tool , pdf toolkit ( pdftk ) , to concatenate pages named  failed_1.pdf  ,  failed_2.pdf    failed_n.pdf  into a single file was undertaken .
requisitions from the in - hospital outpatient phlebotomy station were generally hand - written original from the ordering physician .
these are barcoded in our laboratory accessioning with a label containing the patient phn in code 128 symbology .
those from in - hospital clinics are also the original but may contain one or more barcodes associated with the work - flow of the clinic .
requisitions accompanying referred - in specimens were provided as : ( 1 ) a photocopy of the original ( 2 ) a single - page printed request for a single patient ( without a photocopy of the original requisition ) stating the patient 's identifying information , off - site sample collection information ( e.g. ordering and cc physicans , collection time , receive - time , shipment date , accession number , test requests ) ( 3 ) as in situation ( 2 ) but with a stapled appended photocopy of the original requisition ( 4 ) a single page containing printed requests for multiple patients and the accompanying off - site sample / demographic information but without copies of the original requisitions .
our label - printing process for accessioning specimens using sunquest v 6.4 ( tucson , az ) is currently set to print container i d barcode labels for all collected specimens from a given patient , but only one barcode referring to the patient 's phn .
for this reason , single - page requisitions referring to a single patient ( original , photocopy or printed ) are barcoded with a single phn label .
multipage requisitions for a single patient are barcoded with the phn on their first page only .
single - page requisitions referring to multiple patients are barcoded with multiple labels for the phns of all patients to which the requisition refers . in our situation
, we set reqscan to search for code 39 and code 128 only , as these are the symbologies used by our laboratory and some onsite clinics .
numerous other barcode symbologies may appear on requisitions sent to us from other hospitals , clinics or private laboratories , but these are set to be ignored since the barcode content may refer to patient identifiers or sample accession numbers of other hospitals or their lis . a 1-week period from sunday october 5 to saturday october 11 , 2014
was selected to examine barcode retrieval success rates . in that week , 4,653 individual sheets were scanned at 300 dpi .
reqscan found 4,528 ( code 39 and code 128 ) barcodes and corresponding pdf files were created .
these files were visually inspected for barcode labels that should have been identified under ideal circumstances .
thirty - five of the 1,025 pages did contain barcode information that reqscan should have picked up .
this meant that a total of 4,528 of 4,563 available barcodes were successfully identified over 4,653 pages making a success rate of 97.3% for conversion to a searchable pdf document .
notably ; however , only about 1/3 of missed barcodes were those applied in - house .
barcodes that were not successfully found were typically rotated to angles between about 35 and 55. we have not observed examples of a barcode being decoded incorrectly , nor would we expect to since barcodes generally contain internal checksums . though we do not currently employ two - dimensional barcodes for patient identification labels , a decision outside the authors control , we did want to assess the success of reqscan on qr codes at various sizes and orientations . using the linux command - line utilities qrencode and the open - source utility latex ,
qr codes were generated as 1,200 dpi png images and incorporated into a pdf document at a base size of 20 mm  20 mm and rotated to angles of 0340 at increments of 20 ( for 18 equally sized barcodes at various rotations ) .
each barcode was encoded with the phrase  the quick brown fox at x degrees ,  where x was the extent of rotation .
duplicate images were produced but scaled down in size to 60% ( 12 mm  12 mm ) , 40% ( 8 mm  8 mm ) and 30% ( 6 mm  6 mm ) relative to their original size .
this four - page document containing 72 barcodes and various size and rotation combinations was printed at 600 dpi and run through reqscan in triplicate .
barcode identification success was 100% at 600 dpi scan resolution , 97.6% at 500 dpi , 94.9% at 400 dpi and 78.2% at 300 dpi .
not surprisingly , unrecognized barcodes were uniformly among the smallest ( 6 mm  6 mm at 500 and 400 dpi scanning resolution and both 6 mm  6 mm and 8 mm  8 mm at 300 dpi scanning resolution ) .
the setup of this software requires some knowledge of installing and updating a linux system .
it also requires the user to be able to use the linux software repository of their linux distribution ( there are many ) , and use the appropriate command - line tools to install the necessary additional open - source tools (  dependencies  ) required .
these tools are : python 2.7 , tkinter , the python - zbar bindings , python imaging library , scanimage , dmtx - utils , and imagemagick .
it is natural for the user to want to customize the output to suit their needs .
for example , they may wish to delete files of a certain name - format , shorten the names to the first n characters , suppress undesirable symbols arising in barcodes from outside sources , or concatenate the one - page pdf files of pages on which no barcode information was retrieved .
these kinds of file manipulations are part of basic knowledge of linux shell scripting and could be undertaken by any determined individual with introductory programming experience such as that afforded by an introductory undergraduate course in computer science .
another natural file - manipulation a user might wish to undertake is to concatenate a barcoded page that is followed by a series of unbarcoded pages that all refer to the same patient .
of course , this approach assumes that pages remain in the order they were received .
although we considered doing this , we found that it too often led to the concatenation of documents from two separate patients .
however , this procedure can be performed programmatically by sorting the current directory 's file list by the pdf 's timestamp ( i.e. time of creation ) and concatenating a page successfully named by its barcode content with the successive n files named  failed_1.pdf ,  
the user could also use the shell scripts and pdftk to concatenate all pdfs for which identical barcode content was found , as these are named according to the barcode information followed by an integer that is incremented as many times as necessary .
finally , it would be a trivial task to make the day 's pdfs write - protected by scheduling a so - called  cron - job  wherein the administrator (  root  ) could schedule a command to alter the write - privileges of new folders at a fixed time daily .
because there are so many possibilities of customizations that could be undertaken with shell - scripts , we have not implemented them , realizing that sites should decide on their needs and undertake these simple shell scripting tasks themselves . however , if this seems daunting , the easiest way to make reqscan function  out of the box 
is to make sure a clear , near - horizontal barcode is applied to each page of all single - page and multi - page requisitions .
if care is taken in application and scanning resolution is high enough , near 100% scanning success rate is expected , and the small number of failures could be manually renamed .
it has been our observation that one - dimensional barcodes can be consistently found at 300 dpi scanning resolution but that two - dimensional barcodes require 600 dpi .
we elect to scan images at 300 dpi resolution rescale images to 25% of their original length and width which results in scanned pages which are between  50 and 150 kb and have dimensions of 636 and 825 pts and 75 dpi .
this has not impeded our interpretation of a scanned requisition , but we could certainly re - evaluate this and store at a higher resolution if needed .
it is important to note that we use this software to take care of a clerical problem and not an accreditation - mandated document storage requirement . at present , reqscan is not compliant with the provincial requirements for requisition storage .
the provincial requirement is tiff only storage , 400 dpi resolution and storage on write - only media .
notwithstanding , for the simple purpose it was designed , we have been satisfied with reqscan as the process of retrieval is essentially instantaneous . in terms of  sunk - cost  in setup , development and implementation - related customization , reqscan was written on a budget of $ 1500 by the first author .
it was tested by a premedical student volunteer daily for 30 days and shell - script customizations requiring about 10 h of invested time were undertaken by the second author .
systematic review of the causes of laboratory errors demonstrates that most can be traced to the preanalytical phase which includes errors in patient identification , the order - entry process , the specimen type , handling , processing , and storage . with respect to errors related to the interpretation of a paper requisition , in a study of 660 medical institutions in multiple countries
, it was demonstrated that approximately 5% of outpatient laboratory requisitions were associated with at least one order - entry error and that 10% of institutions had errors with at least 18% of requisitions .
after those related to the physician name , not surprisingly , these errors were traced to the laboratory ordering a test that was not on the requisition or not ordering a test that was .
error rates for send - out tests are substantially lower ( about 2% ) but as high as 5% in some laboratories .
while software of the type we provide here is not designed to prevent preanalytic errors per se , it does facilitate rapid requisition retrieval for confirmation and correction of any errors or omissions at the order - entry level in a post - hoc manner .
one context in which the corresponding author has found reqscan particularly useful relates to samples collected for tumor localization .
paul 's hospital performs aldosterone analysis for a province - wide primary aldosteronism screening program .
part of this service involves tumor localization procedures in which multiple specimens are collection from the left and right adrenal veins and the inferior vena cava .
errors in specimen identification could lead to the surgical removal of the incorrect adrenal gland . because 12 specimens from three anatomical locations , collected in close temporal proximity arrive for accessioning and order - entry at our laboratory all at once , there is always a risk for specimen mix - up .
it is now very easy to electronically retrieve the scanned requisition from radiology and confirm that labeling is correct .
additionally , those performing billing procedures for the laboratory have also found reqscan useful for correcting or confirming billings to the insurer that have been questioned or rejected .
we recognize that there are advantages and disadvantages to the development of in - house software .
the ways that we have managed to keep costs down on this project were : ( 1 ) to limit the scope of the project to a specific task that would be done well ( 2 ) to avoid developing features that would require professional consultants ( 3 ) to build the project around the work - flow rather than the converse ( 3 ) and to undertake modest customizations using the programming expertise available on site .
keeping the project simple and dedicated as made reqscan a good solution for the one problem it addresses .
the benefits of dedicated commercial scanning technology for rapid retrieval paper work associated with internal and referred - in anatomical pathology consult cases has been described , and although financial benefits were modest , uptake and utility was high .
the availability of scanned requisitions is considered a standard part of the laboratory automation solution and in ideal circumstances would be integrated within or seamlessly link to the lis .
from the perspective of avoidance of order - entry error , however , electronic physician order - entry has been found to be superior .
obviously , commercial solutions would offer the manner of convenience and refinement of lis integration that is out of scope for this small - scale project .
nevertheless , user satisfaction has been observed to be high and document retrieval is essentially instantaneous .
the weekday human time - commitment for scanning is approximately 45 min for the  700 requisitions scanned each day .
approximately half of this time is consumed with removing staples from requisitions sent from other hospitals and institutions . since implementation
, we have had no downtime due to scanner breakdown and maintenance of the scanner is simply cleaning of the reflective surfaces read by the scanner optics .
the rate at which zbar successfully identifies the barcode is not 100% but in real - world environments , barcodes are often haphazardly applied , partially obscure or accidentally marred with marker or pen . in the absence of these problems , we have not observed situations where the barcode could not be identified .
two - dimensional qr barcodes , by nature of their built - in error correction , are much less vulnerable to information loss from distortion and marring and would be a good choice for an application like this where the documentation may have suffered some abuse before arrival .
the setup of this software requires some knowledge of installing and updating a linux system .
it also requires the user to be able to use the linux software repository of their linux distribution ( there are many ) , and use the appropriate command - line tools to install the necessary additional open - source tools (  dependencies  ) required .
these tools are : python 2.7 , tkinter , the python - zbar bindings , python imaging library , scanimage , dmtx - utils , and imagemagick .
it is natural for the user to want to customize the output to suit their needs .
for example , they may wish to delete files of a certain name - format , shorten the names to the first n characters , suppress undesirable symbols arising in barcodes from outside sources , or concatenate the one - page pdf files of pages on which no barcode information was retrieved .
these kinds of file manipulations are part of basic knowledge of linux shell scripting and could be undertaken by any determined individual with introductory programming experience such as that afforded by an introductory undergraduate course in computer science .
another natural file - manipulation a user might wish to undertake is to concatenate a barcoded page that is followed by a series of unbarcoded pages that all refer to the same patient .
of course , this approach assumes that pages remain in the order they were received .
although we considered doing this , we found that it too often led to the concatenation of documents from two separate patients .
however , this procedure can be performed programmatically by sorting the current directory 's file list by the pdf 's timestamp ( i.e. time of creation ) and concatenating a page successfully named by its barcode content with the successive n files named  failed_1.pdf ,  
the user could also use the shell scripts and pdftk to concatenate all pdfs for which identical barcode content was found , as these are named according to the barcode information followed by an integer that is incremented as many times as necessary .
finally , it would be a trivial task to make the day 's pdfs write - protected by scheduling a so - called  cron - job  wherein the administrator (  root  ) could schedule a command to alter the write - privileges of new folders at a fixed time daily .
because there are so many possibilities of customizations that could be undertaken with shell - scripts , we have not implemented them , realizing that sites should decide on their needs and undertake these simple shell scripting tasks themselves . however , if this seems daunting , the easiest way to make reqscan function  out of the box 
is to make sure a clear , near - horizontal barcode is applied to each page of all single - page and multi - page requisitions .
if care is taken in application and scanning resolution is high enough , near 100% scanning success rate is expected , and the small number of failures could be manually renamed .
it has been our observation that one - dimensional barcodes can be consistently found at 300 dpi scanning resolution but that two - dimensional barcodes require 600 dpi .
we elect to scan images at 300 dpi resolution rescale images to 25% of their original length and width which results in scanned pages which are between  50 and 150 kb and have dimensions of 636 and 825 pts and 75 dpi .
this has not impeded our interpretation of a scanned requisition , but we could certainly re - evaluate this and store at a higher resolution if needed .
it is important to note that we use this software to take care of a clerical problem and not an accreditation - mandated document storage requirement . at present , reqscan is not compliant with the provincial requirements for requisition storage .
the provincial requirement is tiff only storage , 400 dpi resolution and storage on write - only media .
notwithstanding , for the simple purpose it was designed , we have been satisfied with reqscan as the process of retrieval is essentially instantaneous . in terms of  sunk - cost  in setup , development and implementation - related customization , reqscan was written on a budget of $ 1500 by the first author .
it was tested by a premedical student volunteer daily for 30 days and shell - script customizations requiring about 10 h of invested time were undertaken by the second author .
systematic review of the causes of laboratory errors demonstrates that most can be traced to the preanalytical phase which includes errors in patient identification , the order - entry process , the specimen type , handling , processing , and storage . with respect to errors related to the interpretation of a paper requisition , in a study of 660 medical institutions in multiple countries
, it was demonstrated that approximately 5% of outpatient laboratory requisitions were associated with at least one order - entry error and that 10% of institutions had errors with at least 18% of requisitions .
after those related to the physician name , not surprisingly , these errors were traced to the laboratory ordering a test that was not on the requisition or not ordering a test that was .
error rates for send - out tests are substantially lower ( about 2% ) but as high as 5% in some laboratories .
while software of the type we provide here is not designed to prevent preanalytic errors per se , it does facilitate rapid requisition retrieval for confirmation and correction of any errors or omissions at the order - entry level in a post - hoc manner .
one context in which the corresponding author has found reqscan particularly useful relates to samples collected for tumor localization .
paul 's hospital performs aldosterone analysis for a province - wide primary aldosteronism screening program .
part of this service involves tumor localization procedures in which multiple specimens are collection from the left and right adrenal veins and the inferior vena cava .
errors in specimen identification could lead to the surgical removal of the incorrect adrenal gland . because 12 specimens from three anatomical locations , collected in close temporal proximity arrive for accessioning and order - entry at our laboratory all at once
it is now very easy to electronically retrieve the scanned requisition from radiology and confirm that labeling is correct .
additionally , those performing billing procedures for the laboratory have also found reqscan useful for correcting or confirming billings to the insurer that have been questioned or rejected .
we recognize that there are advantages and disadvantages to the development of in - house software .
the ways that we have managed to keep costs down on this project were : ( 1 ) to limit the scope of the project to a specific task that would be done well ( 2 ) to avoid developing features that would require professional consultants ( 3 ) to build the project around the work - flow rather than the converse ( 3 ) and to undertake modest customizations using the programming expertise available on site .
keeping the project simple and dedicated as made reqscan a good solution for the one problem it addresses .
the benefits of dedicated commercial scanning technology for rapid retrieval paper work associated with internal and referred - in anatomical pathology consult cases has been described , and although financial benefits were modest , uptake and utility was high .
the availability of scanned requisitions is considered a standard part of the laboratory automation solution and in ideal circumstances would be integrated within or seamlessly link to the lis .
from the perspective of avoidance of order - entry error , however , electronic physician order - entry has been found to be superior .
obviously , commercial solutions would offer the manner of convenience and refinement of lis integration that is out of scope for this small - scale project .
nevertheless , user satisfaction has been observed to be high and document retrieval is essentially instantaneous .
the weekday human time - commitment for scanning is approximately 45 min for the  700 requisitions scanned each day .
approximately half of this time is consumed with removing staples from requisitions sent from other hospitals and institutions . since implementation
, we have had no downtime due to scanner breakdown and maintenance of the scanner is simply cleaning of the reflective surfaces read by the scanner optics .
the rate at which zbar successfully identifies the barcode is not 100% but in real - world environments , barcodes are often haphazardly applied , partially obscure or accidentally marred with marker or pen . in the absence of these problems , we have not observed situations where the barcode could not be identified .
two - dimensional qr barcodes , by nature of their built - in error correction , are much less vulnerable to information loss from distortion and marring and would be a good choice for an application like this where the documentation may have suffered some abuse before arrival .
we present an open source solution for requisition scanning that finds the barcode(s ) on a document and saves the document as a pdf in a folder specified by the date and named according to the barcodes identified .
 requisition storage and retrieval are an integral part of the outpatient laboratory testing process . 
 it is frequently necessary to review an original requisition to confirm the ordering physician , patient demographics , diagnostic information , and requested tests . 
 manual retrieval of a paper requisition is time - consuming and tedious . 
 although commercial solutions exist for the scanning and archiving of barcoded paper requisitions , the tools to accomplish this are freely available from the open source software community . 
 we present a simple dedicated piece of software , reqscan , for scanning patient laboratory requisitions , finding all barcode information , and saving the requisition as a portable document format named according the barcode(s ) found . 
 this python application offers a simple solution to patient requisition digitization . 
 reqscan has been successfully tested and implemented into routine practice for storage and retrieval of outpatient requisitions at st . 
 paul 's hospital , department of pathology and laboratory medicine in vancouver , british columbia , canada . 
INTRODUCTION
APPROACH
RESULTS
DISCUSSION
Set Up and User Modifications
General Comments
CONCLUSION