source: WorldVistAEHR/trunk/r/LAB_SERVICE-LR-LS/LRBLBU.m@ 767

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

initial load of WorldVistAEHR

File size: 1.3 KB
Line 
1LRBLBU ;AVAMC/REG/CYM/CRT - BB UNIT BAR CODE ;1/15/90 14:17 ; 11/30/00 3:34pm
2 ;;5.2;LAB SERVICE;**247,267**;Sep 27, 1994
3 ;Per VHA Directive 97-033 this routine should not be modified. Medical Device # BK970021
4 ; This routine interprets Codabar barcodes used to label
5 ; the Unit ID of units of blood.
6 ; Called from LRBLJCK, LRBLJD, LRBLJD1, LRBLJM, LRBLPED and LRBLPUS1.
7 S LR("CODE")=0
8 I $$ISBTUID^LRBLB(.X) Q
9 S X=$$STRIP^LRBLB(X)
10 D L
11 I X?7N D
12 . S A=+$E(X,1,2),B=A\20,B=$E("FGKL",B),A=A#20+1,A=$E("CEFGHJKLMNPQRSTVWXYZ",A),A=B_A
13 . S (LR(3),X)=A_$E(X,3,7)
14 . I '$D(^LRD(65,"C",X)),'$D(^LRD(65,"B",X)) S X=LR(4),LR("CODE")=1
15 I $D(^LRD(65,"C",LR(4))),$D(^(LR(3))) G W
16 I $D(^LRD(65,"B",LR(4))),$D(^(LR(3))) G W
17 W ?32,"(Bar code)",?45,"UNIT ID: ",X Q
18 ;
19L S X=$E(X,LR,$L(X)),A=$E(X,1),B=$E(X,$L(X)),LR(4)=X,LR(3)="?" Q
20 ;
21W W !?15,"1. ",LR(3),!?15,"2. ",LR(4),!!,"Select 1 or 2: " R X:DTIME I X=""!(X["^") K X Q
22 I X'=1&(X'=2) W $C(7),!!,"Enter number 1 or number 2",! G W
23 S X=$S(X=1:LR(3),1:LR(4)) W ". ",X Q
24EN ;from LRBLDC
25 I $$ISBTUID^LRBLB(.X) Q
26 S X=$$STRIP^LRBLB(X)
27 D L I X?7N S A=+$E(X,1,2),B=A\20,B=$E("FGKL",B),A=A#20+1,A=$E("CEFGHJKLMNPQRSTVWXYZ",A),A=B_A S (LR(3),X)=A_$E(X,3,7) I '$D(^LRE("C",X)) S X=LR(4)
28 I $D(^LRE("C",LR(4))),$D(^(LR(3))) G W
29 W " (Bar code)",?45,"UNIT ID: ",X,! Q
Note: See TracBrowser for help on using the repository browser.