Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: AMHLRDEL

AMHLRDEL.m

Go to the documentation of this file.
AMHLRDEL ; IHS/CMI/LAB - DELETE BH RECORD ;
 ;;4.0;IHS BEHAVIORAL HEALTH;;MAY 14, 2010
 ;
EN ;
 W $C(7),$C(7)
DELETE ;
 S AMHVFLE=9002011 F AMHVL=0:0 S AMHVFLE=$O(^DIC(AMHVFLE)) Q:AMHVFLE>9002011.49!(AMHVFLE'=+AMHVFLE)  D DELETE2
 S DIK="^AMHREC(",DA=AMHR,X=2 D ^DIK K DA,DIK
 D EOJ
 Q
 ;
DELETE2 ;
 S AMHVNM=$P(^DIC(AMHVFLE,0),U)
 S AMHVDG=^DIC(AMHVFLE,0,"GL"),AMHVIGR=AMHVDG_"""AD"",AMHR,AMHVDFN)"
 S AMHVDFN="" F AMHVI=1:1 S AMHVDFN=$O(@AMHVIGR) Q:AMHVDFN=""  W:'$D(ZTQUEUED) "." S DIK=AMHVDG,DA=AMHVDFN D ^DIK
 Q
 ;
EOJ ; EOJ CLEANUP
 K AMHVDFN,AMHVDG,AMHR,AMHVFLE,AMHVI,AMHVIGR,AMHVL,AMHVNM
 K %,X
 K D,D0,DA,DIC,DICR,DIE,DIG,DIH,DIU,DIV,DIW,DQ,DR,DIK
 Q