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

# DGMTAUD.m

Go to the documentation of this file.
```DGMTAUD ;ALB/TT,RMO,CAW,LD,BRM - AUDIT CHANGES TO MEANS TEST ; 1/2/02 11:39am
```
``` ;;5.3;Registration;**33,45,182,433**;Aug 13, 1993
```
``` ;
```
```EN ;INPUT:  DFN     - Patient IEN
```
``` ;        DGMTACT - Type of Action from Means Test
```
``` ;        DGMTI   - Means Test IEN
```
``` ;        DGMTINF - Means Test Interactive/Non-interactive flag
```
``` ;        DGMTP   - Prior zero node
```
``` ;        DGMTA   - After zero node
```
``` ;        DGMTYPT - Type of Test 1=MT, 2=COPAY, 4=LTC
```
``` ;        DGDEP   - (Optional) Dependent Info
```
``` ;        DGDEPI  - (Optional) Dependent IEN
```
``` ;OUTPUT:  None
```
``` I DGMTP=DGMTA Q
```
```SETD ; Update audit file
```
``` ;
```
``` ;DGMTFLG - Flag for status or deductible agreement change
```
``` ;          0=no change,1=status change,2=agree to pay deductible change
```
``` ;
```
``` ;DGMTFLG1 - source flag  0=no change, 1=source change
```
``` ;DGMTFLG2 - Dependent Flag 0=no change, 1=dependent info change
```
``` ;DGMTATYP - Means Test Change Type
```
``` ;           1-Add
```
``` ;           2-Category change
```
``` ;           3-Agree to pay deductible
```
``` ;           4-Adjudicate
```
``` ;           5-Edit
```
``` ;           7-Status change
```
``` ;          13-Source of test change
```
``` ;          14-Delete primary means test that was previously uploaded
```
``` ;          15-Deleted Dependent
```
``` ;(IVM)     16-Name Change
```
``` ;(IVM)     17-Date of Birth Change
```
``` ;(IVM)     18-SSN Change
```
``` ;(IVM)     19-Sex Change
```
``` ;(IVM)     20-Relationship Change
```
``` ;
```
``` ;DGMTACT - type of change
```
``` ;          'DEL' (delete): changes related to that means test
```
``` ;                are deleted from file 408.41.
```
``` ;          'COM' (Complete) a means test then type is edited
```
``` ;          'UPL' (Upload), this is a means test uploaded from an
```
``` ;                external source such as IVM and is a Source of
```
``` ;                Test change.
```
``` ;          'EDT' is Edit,
```
``` ;          'ADD' is Add,
```
``` ;          'ADJ' is Adjudicate,
```
``` ;          'CAT' is Category change,
```
``` ;          'STA' is Status change,
```
``` ;          'DUP' is delete a primary means test,
```
``` ;          'DDP' is deleted dependent
```
``` ;          'NAM' is name change (dependent only)
```
``` ;          'DOB' is Date of Birth change (dependent only)
```
``` ;          'SSN' is Social Security Number change (dependent only)
```
``` ;          'SEX' is Sex change (dependent only)
```
``` ;          'REL' is Relationship change (dependent only)
```
``` ;
```
```SET S DGMTATYP="" I '\$D(DGMTYPT) S DGMTYPT=\$P(DGMTA,U,19)
```
``` I DGMTACT="DEL" G DEL
```
``` I DGMTACT="STA" S DGMTATYP=\$P("7^10^^10","^",DGMTYPT)
```
``` I DGMTACT="EDT"!(DGMTACT="COM") S DGMTATYP=\$P("5^9^^9","^",DGMTYPT)
```
``` I DGMTACT="ADD" S DGMTATYP=\$P("1^8^^8","^",DGMTYPT)
```
``` I DGMTACT="CAT" S DGMTATYP=\$P("2^11^^11","^",DGMTYPT)
```
``` I DGMTACT="ADJ" S DGMTATYP=\$P("4^12^^12","^",DGMTYPT)
```
``` I DGMTACT="UPL" S DGMTATYP=\$P("13^^^","^",DGMTYPT)
```
``` I DGMTACT="DUP" S DGMTATYP=\$P("14^^^","^",DGMTYPT)
```
``` I DGMTACT="DDP" S DGMTATYP=15
```
``` I DGMTACT="NAM" S DGMTATYP=16
```
``` I DGMTACT="DOB" S DGMTATYP=17
```
``` I DGMTACT="SSN" S DGMTATYP=18
```
``` I DGMTACT="SEX" S DGMTATYP=19
```
``` I DGMTACT="REL" S DGMTATYP=20
```
``` S (DGMTFLG,DGMTFLG1,DGMTFLG2)=0
```
``` I (\$\$SR^DGMTAUD1(DGMTP)'=\$\$SR^DGMTAUD1(DGMTA)) S DGMTFLG1=1,DGMTOSRC=\$\$SR^DGMTAUD1(DGMTP),DGMTNSRC=\$\$SR^DGMTAUD1(DGMTA)
```
``` 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))
```
``` I DGMTATYP=15 S DGMTSOLD=\$P(DGDEP,U),DGMTSNEW="",DGMTFLG=1
```
``` I DGMTATYP>15 S (DGMTFLG,DGMTFLG2)=1
```
```ED ;File and edit
```
``` 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
```
```LOCK L +^DGMT(408.41,DGMTAUD):1 G:'\$T LOCK
```
``` S DR="[DGMT UPDATE AUDIT]" D ^DIE L -^DGMT(408.41,DGMTAUD)
```
```Q 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
```
```DEL ;Delete audits associated to MT
```
``` S DIK="^DGMT(408.41,"
```
``` S DA=0 F  S DA=\$O(^DGMT(408.41,"AM",DGMTYPT,DFN,DGMTI,DA)) Q:'DA  D ^DIK
```
``` K DA,DIK Q
```
``` ;
```
```DIS ;Display changes pertaining to a means test for a vet
```
``` D DIS^DGMTAUD2 Q
```
{"ft_lang_label":"__label__en","ft_lang_prob":0.59933686,"math_prob":0.83056754,"size":7635,"snap":"2022-40-2023-06","text_gpt3_token_len":3176,"char_repetition_ratio":0.19473201,"word_repetition_ratio":0.24121557,"special_character_ratio":0.35703996,"punctuation_ratio":0.20151427,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9902654,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-01-31T09:23:14Z\",\"WARC-Record-ID\":\"<urn:uuid:bd1ea164-07bc-49f2-bc11-8cc341a209aa>\",\"Content-Length\":\"41196\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:0f40eb98-ee12-4f05-831b-e81209d8af72>\",\"WARC-Concurrent-To\":\"<urn:uuid:44dc8e9d-9d74-4218-ab29-1f476aab3118>\",\"WARC-IP-Address\":\"156.96.113.49\",\"WARC-Target-URI\":\"https://vivian.worldvista.org/dox/Routine_DGMTAUD_source.html\",\"WARC-Payload-Digest\":\"sha1:7WFYOB4DRLIVT7HRNMASHWD5POSNNUM3\",\"WARC-Block-Digest\":\"sha1:CPGE2B5XIEH54QJSSED5DEIUZOFJD5HA\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-06/CC-MAIN-2023-06_segments_1674764499857.57_warc_CC-MAIN-20230131091122-20230131121122-00549.warc.gz\"}"}