SRBL ;BIR/ADM - BLOOD PRODUCT VERIFICATION FOR VBECS ;09/01/05 ;;3.0; Surgery ;**148**;24 Jun 93 ; ; Reference to AVUNIT^VBECA1B supported by DBIA #4629 ; SCAN D BAR ; test bar code reader S SRQ=0,DFN=$P(^SRF(SRTN,0),"^") K ^TMP("SRBL",$J) D AVUNIT^VBECA1B("SRBL",DFN) ; get list of units available for the patient TST K DIR S DIR(0)="FA^1:50",(SRPROMPT,DIR("A"))="Enter Blood Product Identifier: " S DIR("?")="Enter or scan the Blood Product Unit Id" D ^DIR K DIR G END:$D(DTOUT)!$D(DUOUT) D CODA,MATCH I 'SRMATCH G SRNO I SRMATCH=1 S SRY=SRMATCH D SRYES Q D LIST I SRQ G END S SRY=Y D SRYES Q LIST W ! S Y=^TMP("SRBL",$J,0),Z=$P(Y,"^",7),SRSSN=$E(Z,1,3)_"-"_$E(Z,4,5)_"-"_$E(Z,6,12) S SRNAME=$P(Y,"^",5)_","_$P(Y,"^",4)_" "_SRSSN S (SRI,SRZ)=0 F S SRZ=$O(SRBL(SRZ)) Q:'SRZ D .S Z=SRBL(SRZ),SRPROD=$P(Z,"^",4),X=$P(Z,"^",2) D ^%DT S SREXP=Y .W !!," ",SRZ_") Unit ID: ",SRUID,?45,SRPROD .W !,?4,"Patient: ",SRNAME,?45,"Expiration Date: " S Y=SREXP D DD^%DT W Y .S SRI=SRI+1 W ! K DIR S DIR(0)="NO^1:"_SRI,DIR("A")="Select the blood product matching the unit label" D ^DIR K DIR I $D(DTOUT)!$D(DUOUT)!'Y S SRQ=1 Q S SRY=Y Q MATCH ; retrieve matching units from list of available units S (SRIDT,SRMATCH)=0 F S SRIDT=$O(^TMP("SRBL",$J,SRIDT)) Q:'SRIDT D .S X=^TMP("SRBL",$J,SRIDT) .I $P(X,"^",3)=SRUID S SRMATCH=SRMATCH+1,SRBL(SRMATCH)=X Q CODA ; interpret Codabar barcodes used to label the Unit ID of blood component I $$ISBTUID(.X) S SRUID=X Q S SRUID=$$STRIP(X) W ?45,"UNIT ID: ",SRUID Q SRYES S X=$P(SRBL(SRY),"^",2) D ^%DT I Y