IVMCMD1 ;ALB/SEK,KCL - DELETE DCD INCOME TESTS CON'T ; 29-MAY-97
;;2.0;INCOME VERIFICATION MATCH;**17**;21-OCT-94
;
;
;
EN ;This entry point is called from the routine (IVMCMD) and
;contains calls that are responsible for completing the
;deletion of an income test.
;
; Delete record from Annual Means Test (#408.31) file
D DEL31(IVMMTIEN)
S IVMDONE=1
;
; Open case record in the IVM Patient (#301.5) file
D OPEN(DFN,IVMDOT)
;
; Send 'delete' bulletin/notification to local mail group
D BULL
;
; Call means test event driver
D EVNT
;
; Call DGMTR if deleted means test
D:IVMTOT=1 EN^DGMTR
;
; Cleanup variables
D CLEAN
;
ENQ Q
;
;
DEL31(IVMDIEN) ; Delete record from Annual Means Test (#408.31) file.
;
; Input(s):
; IVMDIEN - as IEN of the Annual Means Test (#408.31) file
;
; Output(s): None
;
N DA,DIK
S DA=IVMDIEN,DIK="^DGMT(408.31,"
D ^DIK
Q
;
;
OPEN(IVMDFN,IVMOPNDT) ; Open IVM Patient (#301.5) file case record
;
; Input(s):
; IVMDFN - as pointer to patient in Patient (#2) file
; IVMOPNDT - as date of income test
;
; Output(s): None
;
N DA,DR,DIE
S DA=$O(^IVM(301.5,"APT",+IVMDFN,+$$LYR^DGMTSCU1(IVMOPNDT),0))
I $G(^IVM(301.5,+DA,0))']"" G OPENQ
S DR=".04////0",DIE="^IVM(301.5,"
D ^DIE
K ^IVM(301.5,+DA,1)
OPENQ Q
;
;
BULL ; Build/Transmit mail msg to IVM mail group notifying
; local site that a Means Test or Copay Test was deleted.
;
; Input(s):
; DFN - as pointer to patient in Patient (#2) file
; IVMDOT - as date of test
; IVMTOT - as type of test
;
; Output(s): None
;
S IVMPAT=$$PT^IVMUFNC4(DFN)
S XMSUB="DCD - Income Test Deletion for "_$P($P(IVMPAT,"^"),",")_" ("_$P(IVMPAT,"^",3)_")"
S IVMTEXT(1)="A deletion request has been received from the Health Eligibility Center."
S IVMTEXT(2)="A "_$P($G(^DG(408.33,+IVMTOT,0)),"^")_" was transmitted in error and has now"
S IVMTEXT(3)="been deleted for the following patient:"
S IVMTEXT(4)=" "
S IVMTEXT(5)=" Patient Name: "_$P(IVMPAT,"^")
S IVMTEXT(6)=" ID: "_$P(IVMPAT,"^",2)
S IVMTEXT(7)=" Type of Test: "_$P($G(^DG(408.33,+IVMTOT,0)),"^")
S Y=IVMDOT X ^DD("DD")
S IVMTEXT(8)=" Date of Test: "_Y
S IVMTEXT(9)=" "
;
; notify mail group
D MAIL^IVMUFNC("DGMT MT/CT UPLOAD ALERTS")
Q
;
;
EVNT ; Call means test event driver
S DGMTYPT=IVMTOT D QUE^DGMTR
Q
;
;
CLEAN ; Cleanup variables used for deletion.
K DA,DFN,DGINC,DGINR,DGMTA,DGMTACT,DGMTI,DGMTP
K DGMTYPT,DIE,DIK,DR,IVM12,IVM121,IVM13,IVM41,IVM411
K IVMAR1,IVMDEP,IVMFILE,IVMNOD,IVMOLD
K IVMPAT,IVMTEXT,IVMVAMCA,XMSUB,Y
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIVMCMD1 2708 printed Oct 16, 2024@18:02:06 Page 2
IVMCMD1 ;ALB/SEK,KCL - DELETE DCD INCOME TESTS CON'T ; 29-MAY-97
+1 ;;2.0;INCOME VERIFICATION MATCH;**17**;21-OCT-94
+2 ;
+3 ;
+4 ;
EN ;This entry point is called from the routine (IVMCMD) and
+1 ;contains calls that are responsible for completing the
+2 ;deletion of an income test.
+3 ;
+4 ; Delete record from Annual Means Test (#408.31) file
+5 DO DEL31(IVMMTIEN)
+6 SET IVMDONE=1
+7 ;
+8 ; Open case record in the IVM Patient (#301.5) file
+9 DO OPEN(DFN,IVMDOT)
+10 ;
+11 ; Send 'delete' bulletin/notification to local mail group
+12 DO BULL
+13 ;
+14 ; Call means test event driver
+15 DO EVNT
+16 ;
+17 ; Call DGMTR if deleted means test
+18 if IVMTOT=1
DO EN^DGMTR
+19 ;
+20 ; Cleanup variables
+21 DO CLEAN
+22 ;
ENQ QUIT
+1 ;
+2 ;
DEL31(IVMDIEN) ; Delete record from Annual Means Test (#408.31) file.
+1 ;
+2 ; Input(s):
+3 ; IVMDIEN - as IEN of the Annual Means Test (#408.31) file
+4 ;
+5 ; Output(s): None
+6 ;
+7 NEW DA,DIK
+8 SET DA=IVMDIEN
SET DIK="^DGMT(408.31,"
+9 DO ^DIK
+10 QUIT
+11 ;
+12 ;
OPEN(IVMDFN,IVMOPNDT) ; Open IVM Patient (#301.5) file case record
+1 ;
+2 ; Input(s):
+3 ; IVMDFN - as pointer to patient in Patient (#2) file
+4 ; IVMOPNDT - as date of income test
+5 ;
+6 ; Output(s): None
+7 ;
+8 NEW DA,DR,DIE
+9 SET DA=$ORDER(^IVM(301.5,"APT",+IVMDFN,+$$LYR^DGMTSCU1(IVMOPNDT),0))
+10 IF $GET(^IVM(301.5,+DA,0))']""
GOTO OPENQ
+11 SET DR=".04////0"
SET DIE="^IVM(301.5,"
+12 DO ^DIE
+13 KILL ^IVM(301.5,+DA,1)
OPENQ QUIT
+1 ;
+2 ;
BULL ; Build/Transmit mail msg to IVM mail group notifying
+1 ; local site that a Means Test or Copay Test was deleted.
+2 ;
+3 ; Input(s):
+4 ; DFN - as pointer to patient in Patient (#2) file
+5 ; IVMDOT - as date of test
+6 ; IVMTOT - as type of test
+7 ;
+8 ; Output(s): None
+9 ;
+10 SET IVMPAT=$$PT^IVMUFNC4(DFN)
+11 SET XMSUB="DCD - Income Test Deletion for "_$PIECE($PIECE(IVMPAT,"^"),",")_" ("_$PIECE(IVMPAT,"^",3)_")"
+12 SET IVMTEXT(1)="A deletion request has been received from the Health Eligibility Center."
+13 SET IVMTEXT(2)="A "_$PIECE($GET(^DG(408.33,+IVMTOT,0)),"^")_" was transmitted in error and has now"
+14 SET IVMTEXT(3)="been deleted for the following patient:"
+15 SET IVMTEXT(4)=" "
+16 SET IVMTEXT(5)=" Patient Name: "_$PIECE(IVMPAT,"^")
+17 SET IVMTEXT(6)=" ID: "_$PIECE(IVMPAT,"^",2)
+18 SET IVMTEXT(7)=" Type of Test: "_$PIECE($GET(^DG(408.33,+IVMTOT,0)),"^")
+19 SET Y=IVMDOT
XECUTE ^DD("DD")
+20 SET IVMTEXT(8)=" Date of Test: "_Y
+21 SET IVMTEXT(9)=" "
+22 ;
+23 ; notify mail group
+24 DO MAIL^IVMUFNC("DGMT MT/CT UPLOAD ALERTS")
+25 QUIT
+26 ;
+27 ;
EVNT ; Call means test event driver
+1 SET DGMTYPT=IVMTOT
DO QUE^DGMTR
+2 QUIT
+3 ;
+4 ;
CLEAN ; Cleanup variables used for deletion.
+1 KILL DA,DFN,DGINC,DGINR,DGMTA,DGMTACT,DGMTI,DGMTP
+2 KILL DGMTYPT,DIE,DIK,DR,IVM12,IVM121,IVM13,IVM41,IVM411
+3 KILL IVMAR1,IVMDEP,IVMFILE,IVMNOD,IVMOLD
+4 KILL IVMPAT,IVMTEXT,IVMVAMCA,XMSUB,Y
+5 QUIT