source: WorldVistAEHR/trunk/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DGMTAUD.m@ 724

Last change on this file since 724 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 3.8 KB
Line 
1DGMTAUD ;ALB/TT,RMO,CAW,LD,BRM - AUDIT CHANGES TO MEANS TEST ; 1/2/02 11:39am
2 ;;5.3;Registration;**33,45,182,433**;Aug 13, 1993
3 ;
4EN ;INPUT: DFN - Patient IEN
5 ; DGMTACT - Type of Action from Means Test
6 ; DGMTI - Means Test IEN
7 ; DGMTINF - Means Test Interactive/Non-interactive flag
8 ; DGMTP - Prior zero node
9 ; DGMTA - After zero node
10 ; DGMTYPT - Type of Test 1=MT, 2=COPAY, 4=LTC
11 ; DGDEP - (Optional) Dependent Info
12 ; DGDEPI - (Optional) Dependent IEN
13 ;OUTPUT: None
14 I DGMTP=DGMTA Q
15SETD ; Update audit file
16 ;
17 ;DGMTFLG - Flag for status or deductible agreement change
18 ; 0=no change,1=status change,2=agree to pay deductible change
19 ;
20 ;DGMTFLG1 - source flag 0=no change, 1=source change
21 ;DGMTFLG2 - Dependent Flag 0=no change, 1=dependent info change
22 ;DGMTATYP - Means Test Change Type
23 ; 1-Add
24 ; 2-Category change
25 ; 3-Agree to pay deductible
26 ; 4-Adjudicate
27 ; 5-Edit
28 ; 7-Status change
29 ; 13-Source of test change
30 ; 14-Delete primary means test that was previously uploaded
31 ; 15-Deleted Dependent
32 ;(IVM) 16-Name Change
33 ;(IVM) 17-Date of Birth Change
34 ;(IVM) 18-SSN Change
35 ;(IVM) 19-Sex Change
36 ;(IVM) 20-Relationship Change
37 ;
38 ;DGMTACT - type of change
39 ; 'DEL' (delete): changes related to that means test
40 ; are deleted from file 408.41.
41 ; 'COM' (Complete) a means test then type is edited
42 ; 'UPL' (Upload), this is a means test uploaded from an
43 ; external source such as IVM and is a Source of
44 ; Test change.
45 ; 'EDT' is Edit,
46 ; 'ADD' is Add,
47 ; 'ADJ' is Adjudicate,
48 ; 'CAT' is Category change,
49 ; 'STA' is Status change,
50 ; 'DUP' is delete a primary means test,
51 ; 'DDP' is deleted dependent
52 ; 'NAM' is name change (dependent only)
53 ; 'DOB' is Date of Birth change (dependent only)
54 ; 'SSN' is Social Security Number change (dependent only)
55 ; 'SEX' is Sex change (dependent only)
56 ; 'REL' is Relationship change (dependent only)
57 ;
58SET S DGMTATYP="" I '$D(DGMTYPT) S DGMTYPT=$P(DGMTA,U,19)
59 I DGMTACT="DEL" G DEL
60 I DGMTACT="STA" S DGMTATYP=$P("7^10^^10","^",DGMTYPT)
61 I DGMTACT="EDT"!(DGMTACT="COM") S DGMTATYP=$P("5^9^^9","^",DGMTYPT)
62 I DGMTACT="ADD" S DGMTATYP=$P("1^8^^8","^",DGMTYPT)
63 I DGMTACT="CAT" S DGMTATYP=$P("2^11^^11","^",DGMTYPT)
64 I DGMTACT="ADJ" S DGMTATYP=$P("4^12^^12","^",DGMTYPT)
65 I DGMTACT="UPL" S DGMTATYP=$P("13^^^","^",DGMTYPT)
66 I DGMTACT="DUP" S DGMTATYP=$P("14^^^","^",DGMTYPT)
67 I DGMTACT="DDP" S DGMTATYP=15
68 I DGMTACT="NAM" S DGMTATYP=16
69 I DGMTACT="DOB" S DGMTATYP=17
70 I DGMTACT="SSN" S DGMTATYP=18
71 I DGMTACT="SEX" S DGMTATYP=19
72 I DGMTACT="REL" S DGMTATYP=20
73 S (DGMTFLG,DGMTFLG1,DGMTFLG2)=0
74 I ($$SR^DGMTAUD1(DGMTP)'=$$SR^DGMTAUD1(DGMTA)) S DGMTFLG1=1,DGMTOSRC=$$SR^DGMTAUD1(DGMTP),DGMTNSRC=$$SR^DGMTAUD1(DGMTA)
75 I $P(DGMTA,U,3)'=$P(DGMTP,U,3) S DGMTFLG=1,DGMTSOLD=$$S^DGMTAUD1($P(DGMTP,U,3)),DGMTSNEW=$$S^DGMTAUD1($P(DGMTA,U,3))
76 I DGMTATYP=15 S DGMTSOLD=$P(DGDEP,U),DGMTSNEW="",DGMTFLG=1
77 I DGMTATYP>15 S (DGMTFLG,DGMTFLG2)=1
78ED ;File and edit
79 D NOW^%DTC S (DIE,DIC)="^DGMT(408.41,",DIC(0)="L",X=% K DD,DO D FILE^DICN G:Y'>0 Q S (DA,DGMTAUD)=+Y
80LOCK L +^DGMT(408.41,DGMTAUD):1 G:'$T LOCK
81 S DR="[DGMT UPDATE AUDIT]" D ^DIE L -^DGMT(408.41,DGMTAUD)
82Q K DA,DE,DGDASH,DGMTAI,DGMTAIZ,DGMTATYP,DGMTAUD,DGMTD,DGMTFLG,DGMTFLG1,DGMTSNEW,DGMTSOLD,DGMTOSRC,DGMTNSRC,DGNAM,DIC,DIE,DQ,DR,DTOUT,DUOUT,X,Y,% Q
83DEL ;Delete audits associated to MT
84 S DIK="^DGMT(408.41,"
85 S DA=0 F S DA=$O(^DGMT(408.41,"AM",DGMTYPT,DFN,DGMTI,DA)) Q:'DA D ^DIK
86 K DA,DIK Q
87 ;
88DIS ;Display changes pertaining to a means test for a vet
89 D DIS^DGMTAUD2 Q
Note: See TracBrowser for help on using the repository browser.