OCXOCMPP ;SLC/RJS,CLA - ORDER CHECK CODE COMPILER (Generate Active Data Purge Logic) ;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
;
EN ;
;
Q:'$$LINE^OCXOCMP4("PURGE") 1
;
S D0=0 F S D0=$O(^OCXS(860.2,D0)) Q:'D0 D
.Q:$G(^OCXS(860.2,D0,"INACT"))
.S D1=0 F S D1=$O(^OCXS(860.2,D0,"C",D1)) Q:'D1 D
..S SEL=$G(^OCXS(860.2,D0,"C",D1,"SEL"))
..S ELE=$P(^OCXS(860.2,D0,"C",D1,0),U,2)
..I $L(SEL),'(SEL="LAST"),ELE S OCXSEL(ELE)=""
;
D IN^OCXOCMP4("PURGE"," N OCXE0,OCXE1,OCXS")
D IN^OCXOCMP4("PURGE"," I $G(DFN) S OCXE0=0 F S OCXE0=$O(^OCXD(860.1,DFN,1,""C"",OCXE0)) Q:'OCXE0 D")
;
S D0=0 F S D0=$O(OCXSEL(D0)) Q:'D0 D IN^OCXOCMP4("PURGE"," .Q:(OCXE0="_D0_")")
;
D IN^OCXOCMP4("PURGE"," .S OCXE1=$O(^OCXD(860.1,DFN,1,""C"",OCXE0,""""),-1) Q:'OCXE1")
D IN^OCXOCMP4("PURGE"," .S OCXE1=$O(^OCXD(860.1,DFN,1,""C"",OCXE0,OCXE1),-1) Q:'OCXE1")
D IN^OCXOCMP4("PURGE"," .S OCXE1=$O(^OCXD(860.1,DFN,1,""C"",OCXE0,OCXE1),-1) Q:'OCXE1")
D IN^OCXOCMP4("PURGE"," .F S OCXE1=$O(^OCXD(860.1,DFN,1,""C"",OCXE0,OCXE1),-1) Q:'OCXE1 D")
D IN^OCXOCMP4("PURGE"," ..K ^OCXD(860.1,DFN,1,OCXE1)")
D IN^OCXOCMP4("PURGE"," ..K ^OCXD(860.1,DFN,1,""B"",OCXE1,OCXE1)")
D IN^OCXOCMP4("PURGE"," ..K ^OCXD(860.1,DFN,1,""C"",OCXE0,OCXE1)")
;
Q
;
OCXOCMPP ;SLC/RJS,CLA - ORDER CHECK CODE COMPILER (Generate Active Data Purge Logic) ;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 ;
EN ;
+1 ;
+2 IF '$$LINE^OCXOCMP4("PURGE")
QUIT 1
+3 ;
+4 SET D0=0
FOR
SET D0=$ORDER(^OCXS(860.2,D0))
IF 'D0
QUIT
Begin DoDot:1
+5 IF $GET(^OCXS(860.2,D0,"INACT"))
QUIT
+6 SET D1=0
FOR
SET D1=$ORDER(^OCXS(860.2,D0,"C",D1))
IF 'D1
QUIT
Begin DoDot:2
+7 SET SEL=$GET(^OCXS(860.2,D0,"C",D1,"SEL"))
+8 SET ELE=$PIECE(^OCXS(860.2,D0,"C",D1,0),U,2)
+9 IF $LENGTH(SEL)
IF '(SEL="LAST")
IF ELE
SET OCXSEL(ELE)=""
End DoDot:2
End DoDot:1
+10 ;
+11 DO IN^OCXOCMP4("PURGE"," N OCXE0,OCXE1,OCXS")
+12 DO IN^OCXOCMP4("PURGE"," I $G(DFN) S OCXE0=0 F S OCXE0=$O(^OCXD(860.1,DFN,1,""C"",OCXE0)) Q:'OCXE0 D")
+13 ;
+14 SET D0=0
FOR
SET D0=$ORDER(OCXSEL(D0))
IF 'D0
QUIT
DO IN^OCXOCMP4("PURGE"," .Q:(OCXE0="_D0_")")
+15 ;
+16 DO IN^OCXOCMP4("PURGE"," .S OCXE1=$O(^OCXD(860.1,DFN,1,""C"",OCXE0,""""),-1) Q:'OCXE1")
+17 DO IN^OCXOCMP4("PURGE"," .S OCXE1=$O(^OCXD(860.1,DFN,1,""C"",OCXE0,OCXE1),-1) Q:'OCXE1")
+18 DO IN^OCXOCMP4("PURGE"," .S OCXE1=$O(^OCXD(860.1,DFN,1,""C"",OCXE0,OCXE1),-1) Q:'OCXE1")
+19 DO IN^OCXOCMP4("PURGE"," .F S OCXE1=$O(^OCXD(860.1,DFN,1,""C"",OCXE0,OCXE1),-1) Q:'OCXE1 D")
+20 DO IN^OCXOCMP4("PURGE"," ..K ^OCXD(860.1,DFN,1,OCXE1)")
+21 DO IN^OCXOCMP4("PURGE"," ..K ^OCXD(860.1,DFN,1,""B"",OCXE1,OCXE1)")
+22 DO IN^OCXOCMP4("PURGE"," ..K ^OCXD(860.1,DFN,1,""C"",OCXE0,OCXE1)")
+23 ;
+24 QUIT
+25 ;