BMCPCCV ;IHS/OIT/FCJ - PCC VISIT REFERRED FR
;;4.0;REFERRED CARE INFO SYSTEM;**8**;JAN 09, 2006;Build 101
;WHEN PCC VISIT IS DELETED OR MERGED THIS ROUTINE IS CALLED
;FROM THE MODULE PCC LINK FILE FOR THE VISIT REFERRED FROM
;NOT USED FOR VISIT REFERRED TOO.
;
;BMC*4.0*8 IHS.OIT.FCJ NEW ROUTINE
;
;
MRG ;EP;WHEN A VISIT IS MERGED
;APCDVMF IS THE MERGE FROM VISIT IEN
;APCDVMT IS THE MERGE TO VISIT IEN
;
S BMCRIEN=0
F S BMCRIEN=$O(^BMCREF("VSTR",APCDVMF,BMCRIEN)) Q:BMCRIEN'?1N.N D
.S DA=BMCRIEN,DIE="^BMCREF(",DR="1309////"_APCDVMT
.D ^DIE K DIE,DA,DR
K BMCRIEN
Q
;
;
DEL ;EP;WHEN A VISIT IS DELETED
;
Q:$G(BMCVFL)=1 ;*9
S BMCRIEN=0
F S BMCRIEN=$O(^BMCREF("VSTR",APCDVDLT,BMCRIEN)) Q:BMCRIEN'?1N.N D
.S DA=BMCRIEN,DIE="^BMCREF(",DR="1303////@;1309////@"
.D ^DIE K DIE,DA,DR
K BMCRIEN
Q
BMCPCCV ;IHS/OIT/FCJ - PCC VISIT REFERRED FR
+1 ;;4.0;REFERRED CARE INFO SYSTEM;**8**;JAN 09, 2006;Build 101
+2 ;WHEN PCC VISIT IS DELETED OR MERGED THIS ROUTINE IS CALLED
+3 ;FROM THE MODULE PCC LINK FILE FOR THE VISIT REFERRED FROM
+4 ;NOT USED FOR VISIT REFERRED TOO.
+5 ;
+6 ;BMC*4.0*8 IHS.OIT.FCJ NEW ROUTINE
+7 ;
+8 ;
MRG ;EP;WHEN A VISIT IS MERGED
+1 ;APCDVMF IS THE MERGE FROM VISIT IEN
+2 ;APCDVMT IS THE MERGE TO VISIT IEN
+3 ;
+4 SET BMCRIEN=0
+5 FOR
SET BMCRIEN=$ORDER(^BMCREF("VSTR",APCDVMF,BMCRIEN))
IF BMCRIEN'?1N.N
QUIT
Begin DoDot:1
+6 SET DA=BMCRIEN
SET DIE="^BMCREF("
SET DR="1309////"_APCDVMT
+7 DO ^DIE
KILL DIE,DA,DR
End DoDot:1
+8 KILL BMCRIEN
+9 QUIT
+10 ;
+11 ;
DEL ;EP;WHEN A VISIT IS DELETED
+1 ;
+2 ;*9
IF $GET(BMCVFL)=1
QUIT
+3 SET BMCRIEN=0
+4 FOR
SET BMCRIEN=$ORDER(^BMCREF("VSTR",APCDVDLT,BMCRIEN))
IF BMCRIEN'?1N.N
QUIT
Begin DoDot:1
+5 SET DA=BMCRIEN
SET DIE="^BMCREF("
SET DR="1303////@;1309////@"
+6 DO ^DIE
KILL DIE,DA,DR
End DoDot:1
+7 KILL BMCRIEN
+8 QUIT