MDCLN ;HIOFO/NCA - Cleanup Disabled Studies ;4/19/01 11:52
;;1.0;Clinical Procedures;**21**;Apr 01, 2004;Build 30
N MDLP,MDFDA
S MDLP=0 F S MDLP=$O(^MDK(704.202,"AS",2,MDLP)) Q:MDLP<1 D
.I $P($G(^MDD(702,MDLP,0)),"^",9)'=3!($P($G(^MDD(702,MDLP,0)),"^",9)=3) D
..S MDFDA(702,+MDLP_",",.09)=3
..D FILE^DIE("","MDFDA") W !,+MDLP
..K MDFDA S MDFDA(704.202,+MDLP_",",.09)=0
..D FILE^DIE("","MDFDA")
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMDCLN 418 printed Nov 22, 2024@16:52:36 Page 2
MDCLN ;HIOFO/NCA - Cleanup Disabled Studies ;4/19/01 11:52
+1 ;;1.0;Clinical Procedures;**21**;Apr 01, 2004;Build 30
+2 NEW MDLP,MDFDA
+3 SET MDLP=0
FOR
SET MDLP=$ORDER(^MDK(704.202,"AS",2,MDLP))
if MDLP<1
QUIT
Begin DoDot:1
+4 IF $PIECE($GET(^MDD(702,MDLP,0)),"^",9)'=3!($PIECE($GET(^MDD(702,MDLP,0)),"^",9)=3)
Begin DoDot:2
+5 SET MDFDA(702,+MDLP_",",.09)=3
+6 DO FILE^DIE("","MDFDA")
WRITE !,+MDLP
+7 KILL MDFDA
SET MDFDA(704.202,+MDLP_",",.09)=0
+8 DO FILE^DIE("","MDFDA")
End DoDot:2
End DoDot:1
+9 QUIT