source: FOIAVistA/trunk/r/AUTOMATED_LAB_INSTRUMENTS-LA/LA7SBCR3.m@ 1354

Last change on this file since 1354 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 1.0 KB
Line 
1LA7SBCR3 ;DALISC/JMC - Shipping Barcode Reader Utility ; 7 Feb 1997
2 ;;5.2;LAB MESSAGING;**27**;Sep 27, 1994
3 Q
4 ;
5TEST(LA7,LA7PROM,LA7BAR) ; Setup test/specimen info.
6 ; Input:
7 ; LA7=array to return values
8 ; LA7PROM=prompt to display to user
9 ; LA7BAR=0/1 using barcode reader
10 ;
11 ; Returns array LA7()
12 ;
13 ; If successful ERROR=0
14 ; NLT=National Laboratory Test code
15 ; SPECIMEN=HL7 specimen code
16 ; UID=Sender's Unique Identifier
17 ;
18 ; unsuccessful ERROR=>0
19 ;
20 N LA7X,X,Y
21 ; Initialize array.
22 F Y="ERROR","NLT","SPECIMEN","UID" S LA7(Y)=""
23 S LA7PROM=$G(LA7PROM,"Test")
24 I LA7BAR D
25 . S Y=$$RD^LA7SBCR(LA7PROM)
26 . I Y<1 S LA7("ERROR")="1^User timeout/abort" Q
27 . S Y=$$UPCASE^LRAFUNC(Y)
28 . S LA7=$P(Y,"STX^",2),LA7=$P(LA7,"^ETX",1)
29 . I LA7="" S LA7("ERROR")="2^Incorrect barcode format" Q
30 . S $P(LA7("UID"),"^",3)=$P(LA7,"^",1)
31 . S $P(LA7("NLT"),"^",3)=$P(LA7,"^",2)
32 . S $P(LA7("SPECIMEN"),"^",3)=$P(LA7,"^",3)
33 . S LA7("ERROR")=0
34 Q
Note: See TracBrowser for help on using the repository browser.