source: FOIAVistA/trunk/r/AUTOMATED_LAB_INSTRUMENTS-LA/LA7SBCR.m@ 711

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

initial load of FOIAVistA 6/30/08 version

File size: 1.2 KB
Line 
1LA7SBCR ;DALOI/JMC - Shipping Barcode Reader Utility ; 7 Feb 1997
2 ;;5.2;AUTOMATED LAB INSTRUMENTS;**27,46**;Sep 27, 1994
3 Q
4 ;
5BAR(Y) ; Ask user if utilizing a barcode reader
6 ; Returns -1 = user aborted
7 ; 0 = No
8 ; 1 = Yes
9 ;
10 N DIR,DIRUT,DTOUT,DUOUT,X,Y
11 S DIR(0)="Y0",DIR("A")="Are you using a barcode reader",DIR("B")="YES"
12 D ^DIR
13 I $G(DIRUT) Q -1
14 Q Y
15 ;
16RD(LA7SDP,LA7CASE) ; Read input from barcode reader.
17 ; Input
18 ; LA7SDP=array containing default prompt to display
19 ; LA7CASE=0 return scanned text as barcoded
20 ; =1 return scanned text in upper case.
21 ; =2 return scanned text in lower case.
22 ;
23 ; Returns
24 ; Y=1^barcode value.
25 ; =0 if user quits/timeouts
26 ; =-1 if invalid read
27 ;
28 N DIR,DIRUT,DTOUT,DUOUT,I,LA7Y,X,Y
29 I $G(LA7SDP)="" S LA7SDP="Scan barcode"
30 S LA7CASE=+$G(LA7CASE)
31 S I=0
32 F S I=$O(LA7SDP(I)) Q:'I S DIR("A",I)=LA7SDP(I)
33 S DIR("A")=LA7SDP
34 S DIR(0)="FUO^3:245"
35 D ^DIR
36 I $D(DIRUT) Q 0 ; User quit
37 I Y="" Q -1 ; Invalid read
38 S LA7Y=Y
39 I LA7CASE=1 S LA7Y=$$UP^XLFSTR(LA7Y)
40 I LA7CASE=2 S LA7Y=$$LOW^XLFSTR(LA7Y)
41 Q "1^"_LA7Y
42 ;
43DT(X) ; Validate date/time
44 N %DT,Y
45 S %DT="ST" D ^%DT
46 I Y<1 S Y=""
47 Q Y
Note: See TracBrowser for help on using the repository browser.