OCXOCMPH ;SLC/RJS,CLA - ORDER CHECK CODE COMPILER (Build GETDF Function) ;10/29/98 12:37
;;3.0;ORDER ENTRY/RESULTS REPORTING;**32**;Dec 17,1997
;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
;
Q
BLDDF ;
N OCXDF,OCXGDF,OCXDR,OCXHL7
S OCXGDF=$$LINE^OCXOCMP4("GETDF") Q:'OCXGDF
S OCXHL7=$O(^OCXS(860.6,"B","GENERIC HL7 MESSAGE ARRAY",0)) Q:'OCXHL7
;
S OCXDF=0 F S OCXDF=$O(^TMP("OCXCMP",$J,"DATA FIELD",OCXDF)) Q:'OCXDF D
.S OCXDR=$G(^TMP("OCXCMP",$J,"DATA FIELD",OCXDF,OCXHL7,1))
.I $L(OCXDR) D
..D IN^OCXOCMP4("GETDF"," "_OCXDR)
..S ^TMP("OCXCMP",$J,"DATA FIELD",OCXDF,OCXHL7,1)="||NOOP||"
;
Q
;
SWAP ;
Q:'$$LINE^OCXOCMP4("SWAPOUT","NAME","ARRAY") 1
D IN^OCXOCMP4("SWAPOUT"," Q:'$L(NAME)")
D IN^OCXOCMP4("SWAPOUT"," K ^TMP(""OCXSWAP"",$J,NAME)")
D IN^OCXOCMP4("SWAPOUT"," S ^TMP(""OCXSWAP"",$J)=($P($H,"","",2)+($H*86400)+(2*60))_"" <- ^TMP ENTRY EXPIRATION DATE FOR ^OCXOPURG""")
D IN^OCXOCMP4("SWAPOUT"," M ^TMP(""OCXSWAP"",$J,NAME)=ARRAY")
D IN^OCXOCMP4("SWAPOUT"," K ARRAY")
;
Q:'$$LINE^OCXOCMP4("SWAPIN","NAME","ARRAY") 1
D IN^OCXOCMP4("SWAPIN"," Q:'$L(NAME)")
D IN^OCXOCMP4("SWAPIN"," K ARRAY")
D IN^OCXOCMP4("SWAPIN"," M ARRAY=^TMP(""OCXSWAP"",$J,NAME)")
D IN^OCXOCMP4("SWAPIN"," K ^TMP(""OCXSWAP"",$J,NAME)")
;
Q
;
OCXOCMPH ;SLC/RJS,CLA - ORDER CHECK CODE COMPILER (Build GETDF Function) ;10/29/98 12:37
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**32**;Dec 17,1997
+2 ;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
+3 ;
+4 QUIT
BLDDF ;
+1 NEW OCXDF,OCXGDF,OCXDR,OCXHL7
+2 SET OCXGDF=$$LINE^OCXOCMP4("GETDF")
IF 'OCXGDF
QUIT
+3 SET OCXHL7=$ORDER(^OCXS(860.6,"B","GENERIC HL7 MESSAGE ARRAY",0))
IF 'OCXHL7
QUIT
+4 ;
+5 SET OCXDF=0
FOR
SET OCXDF=$ORDER(^TMP("OCXCMP",$JOB,"DATA FIELD",OCXDF))
IF 'OCXDF
QUIT
Begin DoDot:1
+6 SET OCXDR=$GET(^TMP("OCXCMP",$JOB,"DATA FIELD",OCXDF,OCXHL7,1))
+7 IF $LENGTH(OCXDR)
Begin DoDot:2
+8 DO IN^OCXOCMP4("GETDF"," "_OCXDR)
+9 SET ^TMP("OCXCMP",$JOB,"DATA FIELD",OCXDF,OCXHL7,1)="||NOOP||"
End DoDot:2
End DoDot:1
+10 ;
+11 QUIT
+12 ;
SWAP ;
+1 IF '$$LINE^OCXOCMP4("SWAPOUT","NAME","ARRAY")
QUIT 1
+2 DO IN^OCXOCMP4("SWAPOUT"," Q:'$L(NAME)")
+3 DO IN^OCXOCMP4("SWAPOUT"," K ^TMP(""OCXSWAP"",$J,NAME)")
+4 DO IN^OCXOCMP4("SWAPOUT"," S ^TMP(""OCXSWAP"",$J)=($P($H,"","",2)+($H*86400)+(2*60))_"" <- ^TMP ENTRY EXPIRATION DATE FOR ^OCXOPURG""")
+5 DO IN^OCXOCMP4("SWAPOUT"," M ^TMP(""OCXSWAP"",$J,NAME)=ARRAY")
+6 DO IN^OCXOCMP4("SWAPOUT"," K ARRAY")
+7 ;
+8 IF '$$LINE^OCXOCMP4("SWAPIN","NAME","ARRAY")
QUIT 1
+9 DO IN^OCXOCMP4("SWAPIN"," Q:'$L(NAME)")
+10 DO IN^OCXOCMP4("SWAPIN"," K ARRAY")
+11 DO IN^OCXOCMP4("SWAPIN"," M ARRAY=^TMP(""OCXSWAP"",$J,NAME)")
+12 DO IN^OCXOCMP4("SWAPIN"," K ^TMP(""OCXSWAP"",$J,NAME)")
+13 ;
+14 QUIT
+15 ;