VBECA3B ;DALOI/RLM-API interfaces for CPRS ;9/20/00 12:44
;;2.0;VBEC;;Jun 05, 2015;Build 4
;
; Note: This routine supports data exchange with an FDA registered
; medical device. As such, it may not be changed in any way without
; prior written approval from the medical device manufacturer.
;
; Integration Agreements:
;
QUIT
;
CPRS ;
K VBECBBD D CR,SPC,TRX
K VBECA,VBECB,VBECI
Q
CR ;Component Request
K ^TMP("BBD",$J,"COMPONENT REQUEST")
S VBECA="" F S VBECA=$O(^TMP("VBDATA",$J,"COMPONENT REQUEST",VBECA)) Q:VBECA="" D
. S ^TMP("BBD",$J,"COMPONENT REQUEST",VBECA)=""
. F VBECI=.01,.04,.03,.05,.09,.08 S ^TMP("BBD",$J,"COMPONENT REQUEST",VBECA)=^TMP("BBD",$J,"COMPONENT REQUEST",VBECA)_$G(^TMP("VBDATA",$J,"COMPONENT REQUEST",VBECA,VBECI))_"^"
K VBECA,VBECB,VBECI
Q
SPC ;Specimen
K ^TMP("BBD",$J,"SPECIMEN")
S VBECA="" F S VBECA=$O(^TMP("VBDATA",$J,"SPECIMEN",VBECA)) Q:VBECA="" D
. Q:$G(^TMP("VBDATA",$J,"SPECIMEN",VBECA,"63.01,.03"))=""
. S ^TMP("BBD",$J,"SPECIMEN",VBECA)=""
. F VBECI=2.91,10.3,11.3 I $G(^TMP("VBDATA",$J,"SPECIMEN",VBECA,"63.01,"_VBECI))]"" S ^TMP("BBD",$J,"SPECIMEN",VBECA,VBECI)=$G(^TMP("VBDATA",$J,"SPECIMEN",VBECA,"63.01,"_VBECI))
. F VBECI="63.012,.01","63.46,.01","63.46,.02","63.48,.01","63.199,.01" S VBECB=0 D
. . F S VBECB=$O(^TMP("VBDATA",$J,"SPECIMEN",VBECA,VBECI,VBECB)) Q:VBECB="" S ^TMP("BBD",$J,"SPECIMEN",VBECA,VBECI,VBECB)=$G(^TMP("VBDATA",$J,"SPECIMEN",VBECA,VBECI,VBECB))
. F VBECI=.03,.01,10,2.9,2.1,2.4,2.6,2.9,11,6 D
. . S VBDTA=$G(^TMP("VBDATA",$J,"SPECIMEN",VBECA,"63.01,"_VBECI))
. . I VBECI=10,VBDTA="NOT DONE" S VBDTA="ND"
. . I VBECI=11,VBDTA="NOT DONE" S VBDTA="ND"
. . I (VBECI=2.1)!(VBECI=2.4)!(VBECI=2.6) S VBDTA=$S(VBDTA="N":"Neg",1:VBDTA)
. . I (VBECI=2.9)!(VBECI=6)!(VBECI=11),VBDTA'="ND" W !,VBDTA S VBDTA=$S(VBDTA?1"N".E:"Neg",VBDTA?1"P".E:"Pos",1:VBDTA) W !,VBDTA
. . S ^TMP("BBD",$J,"SPECIMEN",VBECA)=^TMP("BBD",$J,"SPECIMEN",VBECA)_VBDTA_"^"
. . ;S ^TMP("BBD",$J,"SPECIMEN",VBECA)=^TMP("BBD",$J,"SPECIMEN",VBECA)_$G(^TMP("VBDATA",$J,"SPECIMEN",VBECA,"63.01,"_VBECI))_"^"
K VBECA,VBECB,VBECI
Q
TRX ;Units assigned/crossmatched
K ^TMP("BBD",$J,"CROSSMATCH")
S VBECA="" F S VBECA=$O(^TMP("VBDATA",$J,"CROSSMATCH",VBECA)) Q:VBECA="" F VBECI=.01,.04,.07,.08,.06,.16,3 S ^TMP("BBD",$J,"CROSSMATCH",VBECA)=$G(^TMP("BBD",$J,"CROSSMATCH",VBECA))_$G(^TMP("VBDATA",$J,"CROSSMATCH",VBECA,VBECI))_"^"
K VBECA,VBECB,VBECI
Q
ZEOR ;VBECA3B
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HVBECA3B 2499 printed Dec 13, 2024@02:43:46 Page 2
VBECA3B ;DALOI/RLM-API interfaces for CPRS ;9/20/00 12:44
+1 ;;2.0;VBEC;;Jun 05, 2015;Build 4
+2 ;
+3 ; Note: This routine supports data exchange with an FDA registered
+4 ; medical device. As such, it may not be changed in any way without
+5 ; prior written approval from the medical device manufacturer.
+6 ;
+7 ; Integration Agreements:
+8 ;
+9 QUIT
+10 ;
CPRS ;
+1 KILL VBECBBD
DO CR
DO SPC
DO TRX
+2 KILL VBECA,VBECB,VBECI
+3 QUIT
CR ;Component Request
+1 KILL ^TMP("BBD",$JOB,"COMPONENT REQUEST")
+2 SET VBECA=""
FOR
SET VBECA=$ORDER(^TMP("VBDATA",$JOB,"COMPONENT REQUEST",VBECA))
if VBECA=""
QUIT
Begin DoDot:1
+3 SET ^TMP("BBD",$JOB,"COMPONENT REQUEST",VBECA)=""
+4 FOR VBECI=.01,.04,.03,.05,.09,.08
SET ^TMP("BBD",$JOB,"COMPONENT REQUEST",VBECA)=^TMP("BBD",$JOB,"COMPONENT REQUEST",VBECA)_$GET(^TMP("VBDATA",$JOB,"COMPONENT REQUEST",VBECA,VBECI))_"^"
End DoDot:1
+5 KILL VBECA,VBECB,VBECI
+6 QUIT
SPC ;Specimen
+1 KILL ^TMP("BBD",$JOB,"SPECIMEN")
+2 SET VBECA=""
FOR
SET VBECA=$ORDER(^TMP("VBDATA",$JOB,"SPECIMEN",VBECA))
if VBECA=""
QUIT
Begin DoDot:1
+3 if $GET(^TMP("VBDATA",$JOB,"SPECIMEN",VBECA,"63.01,.03"))=""
QUIT
+4 SET ^TMP("BBD",$JOB,"SPECIMEN",VBECA)=""
+5 FOR VBECI=2.91,10.3,11.3
IF $GET(^TMP("VBDATA",$JOB,"SPECIMEN",VBECA,"63.01,"_VBECI))]""
SET ^TMP("BBD",$JOB,"SPECIMEN",VBECA,VBECI)=$GET(^TMP("VBDATA",$JOB,"SPECIMEN",VBECA,"63.01,"_VBECI))
+6 FOR VBECI="63.012,.01","63.46,.01","63.46,.02","63.48,.01","63.199,.01"
SET VBECB=0
Begin DoDot:2
+7 FOR
SET VBECB=$ORDER(^TMP("VBDATA",$JOB,"SPECIMEN",VBECA,VBECI,VBECB))
if VBECB=""
QUIT
SET ^TMP("BBD",$JOB,"SPECIMEN",VBECA,VBECI,VBECB)=$GET(^TMP("VBDATA",$JOB,"SPECIMEN",VBECA,VBECI,VBECB))
End DoDot:2
+8 FOR VBECI=.03,.01,10,2.9,2.1,2.4,2.6,2.9,11,6
Begin DoDot:2
+9 SET VBDTA=$GET(^TMP("VBDATA",$JOB,"SPECIMEN",VBECA,"63.01,"_VBECI))
+10 IF VBECI=10
IF VBDTA="NOT DONE"
SET VBDTA="ND"
+11 IF VBECI=11
IF VBDTA="NOT DONE"
SET VBDTA="ND"
+12 IF (VBECI=2.1)!(VBECI=2.4)!(VBECI=2.6)
SET VBDTA=$SELECT(VBDTA="N":"Neg",1:VBDTA)
+13 IF (VBECI=2.9)!(VBECI=6)!(VBECI=11)
IF VBDTA'="ND"
WRITE !,VBDTA
SET VBDTA=$SELECT(VBDTA?1"N".E:"Neg",VBDTA?1"P".E:"Pos",1:VBDTA)
WRITE !,VBDTA
+14 SET ^TMP("BBD",$JOB,"SPECIMEN",VBECA)=^TMP("BBD",$JOB,"SPECIMEN",VBECA)_VBDTA_"^"
+15 ;S ^TMP("BBD",$J,"SPECIMEN",VBECA)=^TMP("BBD",$J,"SPECIMEN",VBECA)_$G(^TMP("VBDATA",$J,"SPECIMEN",VBECA,"63.01,"_VBECI))_"^"
End DoDot:2
End DoDot:1
+16 KILL VBECA,VBECB,VBECI
+17 QUIT
TRX ;Units assigned/crossmatched
+1 KILL ^TMP("BBD",$JOB,"CROSSMATCH")
+2 SET VBECA=""
FOR
SET VBECA=$ORDER(^TMP("VBDATA",$JOB,"CROSSMATCH",VBECA))
if VBECA=""
QUIT
FOR VBECI=.01,.04,.07,.08,.06,.16,3
SET ^TMP("BBD",$JOB,"CROSSMATCH",VBECA)=$GET(^TMP("BBD",$JOB,"CROSSMATCH",VBECA))_$GET(^TMP("VBDATA",$JOB,"CROSSMATCH",VBECA,VBECI))_"^"
+3 KILL VBECA,VBECB,VBECI
+4 QUIT
ZEOR ;VBECA3B