Produced by Araxis Merge on 3/20/2019 1:04:55 PM Eastern Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
# | Location | File | Last Modified |
---|---|---|---|
1 | eInsurance_IB_2.0_602.zip | TAS eIns US3691 SDD v1.1.docx | Wed Feb 27 18:49:32 2019 UTC |
2 | eInsurance_IB_2.0_602.zip | TAS eIns US3691 SDD v1.1.docx | Wed Mar 20 16:48:01 2019 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 3 | 362 |
Changed | 2 | 4 |
Inserted | 0 | 0 |
Removed | 0 | 0 |
Whitespace | |
---|---|
Character case | Differences in character case are significant |
Line endings | Differences in line endings (CR and LF characters) are ignored |
CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
1 | MCCF EDI T AS EINSURA NCE US3691 | |
2 | System Des ign Docume nt | |
3 | IB*2.0*602 | |
4 | ||
5 | ||
6 | ||
7 | ||
8 | Department of Vetera ns Affairs | |
9 | August 201 8 | |
10 | Version 1. 1 | |
11 | User Story ID:US3691 | |
12 | User Story Name:Purg e Old and Abnormal R ecords fro m IIV Resp onse File and the | |
13 | IIV Transm ission Que ue | |
14 | Epic Taxon omy | |
15 | eBiz Com pliance Port Upd ate Increase No Touch TAS Apps | |
16 | Story: | |
17 | As the... | |
18 | I need... | |
19 | So that... | |
20 | eInsurance Team memb er | |
21 | VistA to a utomatical ly remove as part of the exist ing automa tic monthl y purge: | |
22 | Any record s in the I IV Respons e File (ex cept Do No t Purge) t hat point to record locations in the IIV Transmiss ion Queue where no a ctual reco rds exist | |
23 | VistA to r emove as p art of a n ew pre/pos t-install routine: | |
24 | Any record s older th an six mon ths in the IIV Trans mission Qu eue (excep t those wi th associa ted Do Not Purge Res ponse reco rds) | |
25 | No orphan records re main in th e IIV Resp onse File (unless ma rked Do No t Purge) a fter the m onthly pur ge routine runs | |
26 | and | |
27 | No records older tha n six mont hs (which cannot be transmitte d to FSC a nd meet th e criteria for purgi ng) remain in the II V Transmis sion Queue after the pre/post- install ro utine runs . | |
28 | ||
29 | Design: | |
30 | Note: Both US3691 an d US3754 m odify the IBCNEKIT r outines fo r IB*2.0*6 02 | |
31 | ||
32 | To make th e code mor e robust o ver time, we want to avoid usi ng hardcod ed IEN val ues direct ly. When p reparing t he “STATLI ST” variab le, use a FILEMAN ca ll to get the proper IEN value s. | |
33 | While calc ulating th e default start purg e date to display to the user, the first TRANSMISS ION QUEUE (#365.1) r ecord that has a pur ge-able TR ANSMISSION STATUS (# 365.1, .04 ) field is utilized. | |
34 | In additio n, we’ll n eed to mak e sure tha t the corr esponding IIV RESPON SE (#365) field DO N OT PURGE ( #365, .11) is not se t. If we n eed to con tinue sear ching past the first record fo r the earl iest purge -able date , we’ll wa nt to disp lay a mess age inform ing the us er that it may take some time. | |
35 | ||
36 | Routines | |
37 | Activities | |
38 | Routine Na me | |
39 | IBCNEKIT | |
40 | Enhancemen t Category | |
41 | New | |
42 | Modify | |
43 | Delete | |
44 | No Change | |
45 | RTM | |
46 | ||
47 | Related Op tions | |
48 | “Purge eIV Transacti ons” [IBCN E PURGE II V DATA] | |
49 | Related Ro utines | |
50 | Routines “ Called By” | |
51 | Routines “ Called” | |
52 | ||
53 | IBCNEKI2 | |
54 | ^DIR | |
55 | ^DIK | |
56 | ^%ZTLOAD | |
57 | $$GET1^DIQ | |
58 | $$MGRP^IBC NEUT5 | |
59 | MSG^IBCNEU T5 | |
60 | $$SITE^VAS ITE | |
61 | $$FMADD^XL FDT | |
62 | $$FMTE^XLF DT | |
63 | Routines | |
64 | Activities | |
65 | Data Dicti onary (DD) Reference s | |
66 | ^IBCN(365 | |
67 | ^IBCN(365. 1 | |
68 | Related Pr otocols | |
69 | ||
70 | Related In tegration Control Re gistration s (ICRs) | |
71 | ||
72 | Data Passi ng | |
73 | Input | |
74 | Output Re ference | |
75 | Both | |
76 | Global Re ference | |
77 | Local | |
78 | Input Attr ibute Name and Defin ition | |
79 | Name: | |
80 | Definition : | |
81 | Output Att ribute Nam e and Defi nition | |
82 | Name: | |
83 | Definition : | |
84 | Current Lo gic | |
85 | IBCNEKIT ; DAOU/ESG - PURGE eIV DATA FILE S ;11-JUL- 2002 ;;2.0 ;INTEGRATE D BILLING; **184,271, 316,416,54 9,595**;21 -MAR-94;Bu ild 22 ;;P er VA Dire ctive 6402 , this rou tine shoul d not be m odified. ; | |
86 | Modified L ogic (Chan ges are in bold) | |
87 | IBCNEKIT ; DAOU/ESG - PURGE eIV DATA FILE S ;11-JUL- 2002 ;;2.0 ;INTEGRATE D BILLING; **184,271, 316,416,54 9,595,602* *;21-MAR-9 4;Build 22 ;;Per VA Directive 6402, this routine s hould not be modifie d. ; | |
88 | Current Lo gic | |
89 | INIT ; Thi s procedur e calculat es the def ault begin ning and e nding date s ; and di splays scr een messag es about t his option to the us er. ; NEW DATE,FOUND ,TQIEN,TQS ,RPIEN,RPS NEW DIR,X ,Y,DTOUT,D UOUT,DIRUT ,DIROUT ; S STOP=0 ; ; This is the list of statuse s that are OK to pur ge ; 3=Res ponse Rece ived ; 5=C ommunicati on Failure ; 7=Cance lled S STA TLIST=",3, 5,7," ; ; Try to fin d a beginn ing date i n the eIV Transmissi on Queue f ile S DATE ="",FOUND= 0,BEGDT=DT F S DATE =$O(^IBCN( 365.1,"AE" ,DATE)) Q: 'DATE!FOUN D S TQIEN =0 F S TQ IEN=$O(^IB CN(365.1," AE",DATE,T QIEN)) Q:' TQIEN D Q:FOUND . S TQS=$P($ G(^IBCN(36 5.1,TQIEN, 0)),U,4) ; status . I '$F(STAT LIST,","_T QS_",") Q . S FOUND= 1 . S BEGD T=$P(DATE, ".",1) . Q ; ; If no t successf ul, try to find a be ginning da te in the eIV Respon se file. I 'FOUND D . S DATE=" " . F S D ATE=$O(^IB CN(365,"AE ",DATE)) Q :'DATE!FOU ND S RPIE N=0 F S R PIEN=$O(^I BCN(365,"A E",DATE,RP IEN)) Q:'R PIEN D Q :FOUND .. S RPS=$P($ G(^IBCN(36 5,RPIEN,0) ),U,6) ; s tatus .. I '$F(STATL IST,","_RP S_",") Q . . S FOUND= 1 .. S BEG DT=$P(DATE ,".",1) .. Q . Q ; | |
90 | … | |
91 | INITX ; Q ; | |
92 | Modified L ogic (Chan ges are in bold) | |
93 | INIT ; Thi s procedur e calculat es the def ault begin ning and e nding date s ; and di splays scr een messag es about t his option to the us er. ; NEW DATE,FOUND ,TQIEN,TQS ,RPIEN,RPS ,IBHL7,IBD NP NEW DIR ,X,Y,DTOUT ,DUOUT,DIR UT,DIROUT ; S STOP=0 ; ; This is the lis t of statu ses that a re OK to p urge ; 3=R esponse Re ceived ; 5 =Communica tion Failu re ; 7=Can celled ; I B*2.0*602/ DM make su re we get the proper IENs for STATLIST S STATLIST= ","_$$FIND 1^DIC(365. 14,,"B","R esponse Re ceived") S STATLIST= STATLIST_" ,"_$$FIND1 ^DIC(365.1 4,,"B","Co mmunicatio n Failure" ) S STATLI ST=STATLIS T_","_$$FI ND1^DIC(36 5.14,,"B", "Cancelled ")_"," ; ; Try to fi nd a begin ning date in the eIV Transmiss ion Queue file S DAT E="",FOUND =0,BEGDT=D T F S DAT E=$O(^IBCN (365.1,"AE ",DATE)) Q :'DATE!FOU ND S TQIE N=0 F S T QIEN=$O(^I BCN(365.1, "AE",DATE, TQIEN)) Q: 'TQIEN D Q:FOUND . S TQS=$P( $G(^IBCN(3 65.1,TQIEN ,0)),U,4) ; status . I '$F(STA TLIST,","_ TQS_",") Q . ;IB*2.0 *602/DM ma ke sure th e default earliest d ate is not a DO NOT PURGE entr y . ;chec k the HL7 messages m ultiple to see if DO NOT PURGE is set on any respo nse . S (I BDNP,IBHL7 )=0 . F S IBHL7=$O( ^IBCN(365. 1,TQIEN,2, IBHL7)) Q: 'IBHL7!IBD NP D .. S RPIEN=$P( $G(^IBCN(3 65.1,TQIEN ,2,IBHL7,0 )),U,3) Q: 'RPIEN .. I +$$GET1^ DIQ(365,RP IEN_",","D O NOT PURG E","I") S IBDNP=1 .. Q . ; . I IBDNP,IBV ER=2 Q . I IBDNP W !,"Please wait, chec king for t he earlies t purge da te ...",! Q . ; . S FOUND=1 . S BEGDT=$P (DATE,".", 1) . Q ; ; If not su ccessful, try to fin d a beginn ing date i n the eIV Response f ile. I 'FO UND D . S DATE="" . F S DATE= $O(^IBCN(3 65,"AE",DA TE)) Q:'DA TE!FOUND S RPIEN=0 F S RPIEN =$O(^IBCN( 365,"AE",D ATE,RPIEN) ) Q:'RPIEN D Q:FOU ND .. S RP S=$P($G(^I BCN(365,RP IEN,0)),U, 6) ; statu s .. I '$F (STATLIST, ","_RPS_", ") Q .. ;I B*2.0*602/ DM do not choose a D O NOT PURG E response .. I +$$ GET1^DIQ(3 65,RPIEN_" ,","DO NOT PURGE","I ") Q .. S FOUND=1 .. S BEGDT=$ P(DATE,"." ,1) .. Q . Q ; | |
94 | …INITX ; Q ; | |
95 | ||
96 | ||
97 | ||
98 | ||
99 | Current Lo gic | |
100 | PURGE ; Th is procedu re is queu ed to run in the bac kground an d does the ; actual purging. V ariables a vailable f rom the Ta skMan call are: ; ; STATLIST = list of s tatuses th at are OK to purge ; BEGDT = b eginning d ate for pu rging ; EN DDT = endi ng date fo r purging ; ; First loop throu gh the eIV Transmiss ion Queue file and d elete all ; records in the dat e range wh ose status is in the list ; N CNT,DA,DAT E,DIK,HLIE N,PFLAG,TQ IEN,TQS ;IB*2.0*5 49 added P FLAG S DAT E=$O(^IBCN (365.1,"AE ",BEGDT),- 1),CNT=0 F S DATE=$ O(^IBCN(36 5.1,"AE",D ATE)) Q:'D ATE!($P(DA TE,".",1)> ENDDT)!$G( ZTSTOP) S TQIEN=0 F S TQIEN=$ O(^IBCN(36 5.1,"AE",D ATE,TQIEN) ) Q:'TQIEN D Q:$G( ZTSTOP) . S CNT=CNT+ 1 . I $D(Z TQUEUED),C NT#100=0,$ $S^%ZTLOAD () S ZTSTO P=1 Q . S TQS=$P($G( ^IBCN(365. 1,TQIEN,0) ),U,4) ; t rans queue status . I '$F(STAT LIST,","_T QS_",") Q ; must b e in the l ist . S PF LAG=$$GET1 ^DIQ(365,T QIEN_",",. 11,"I") ; Do Not Pur ge Flag IB *2.0*549 a dded line . Q:+PFLAG ; IB*2 .0*549 add ed line . ; . ; loop through t he HL7 mes sages mult iple and k ill any re sponse . ; records t hat are fo und for th is transmi ssion queu e entry . S HLIEN=0, DIK="^IBCN (365," . F S HLIEN= $O(^IBCN(3 65.1,TQIEN ,2,HLIEN)) Q:'HLIEN D .. S DA =$P($G(^IB CN(365.1,T QIEN,2,HLI EN,0)),U,3 ) I DA D ^ DIK .. Q . ; . ; now we can ki ll the tra nsmission queue entr y itself . S DA=TQIE N,DIK="^IB CN(365.1," D ^DIK . Q ; ; Chec k for a st op request I $G(ZTST OP) G PURG EX ; ; Now we must l oop throug h the eIV Response f ile itself to purge any ; resp onse recor ds that do not have a correspo nding tran smission ; queue ent ry. These are the un solicited responses. The statu s of ; the se respons es is alwa ys 'respon se receive d' so we d on't need to ; check the statu s. For thi s loop, st art from t he very be ginning of ; the fil e. ; S DAT E="",DIK=" ^IBCN(365, ",CNT=0 F S DATE=$O (^IBCN(365 ,"AE",DATE )) Q:'DATE !($P(DATE, ".",1)>END DT)!$G(ZTS TOP) S DA= 0 F S DA= $O(^IBCN(3 65,"AE",DA TE,DA)) Q: 'DA D Q: $G(ZTSTOP) . S CNT=C NT+1 . I $ D(ZTQUEUED ),CNT#100= 0,$$S^%ZTL OAD() S ZT STOP=1 Q . ; . ; If there is a pointer t o the tran smission q ueue file, then we . ; should get out of this loop because t he purpose of this s ection . ; is to pur ge those r esponses w ith no lin k to the t ransmissio n . ; queu e file. . ; . I $P($ G(^IBCN(36 5,DA,0)),U ,5) Q . D ^DIK . Q ; PURGEX ; ; Tell Task Manager to delete th e task's r ecord I $D (ZTQUEUED) S ZTREQ=" @" Q ; | |
101 | Modified L ogic (Chan ges are in bold) | |
102 | PURGE ; Th is procedu re is queu ed to run in the bac kground an d does the ; actual purging. V ariables a vailable f rom the Ta skMan call are: ; ; STATLIST = list of s tatuses th at are OK to purge ; BEGDT = b eginning d ate for pu rging ; EN DDT = endi ng date fo r purging ; ; First loop throu gh the eIV Transmiss ion Queue file and d elete all ; records in the dat e range wh ose status is in the list ; N CNT,DA,DAT E,DIK,HLIE N,PFLAG,TQ IEN,TQS S DATE=$O(^I BCN(365.1, "AE",BEGDT ),-1),CNT= 0 F S DAT E=$O(^IBCN (365.1,"AE ",DATE)) Q :'DATE!($P (DATE,".", 1)>ENDDT)! $G(ZTSTOP) S TQIEN=0 F S TQIE N=$O(^IBCN (365.1,"AE ",DATE,TQI EN)) Q:'TQ IEN D Q: $G(ZTSTOP) . S CNT=C NT+1 . I $ D(ZTQUEUED ),CNT#100= 0,$$S^%ZTL OAD() S ZT STOP=1 Q . S TQS=$P( $G(^IBCN(3 65.1,TQIEN ,0)),U,4) ; trans qu eue status . I '$F(S TATLIST,", "_TQS_",") Q ; mus t be in th e list . ; loop thro ugh the HL 7 messages multiple and kill a ny respons e . ; reco rds that a re found f or this tr ansmission queue ent ry . ; IB* 2.0*602/DM Preserve any TQ and response that has D O NOT PURG E set to 1 (YES) . S PFLAG=0,H LIEN=0,DIK ="^IBCN(36 5," . F S HLIEN=$O( ^IBCN(365. 1,TQIEN,2, HLIEN)) Q: 'HLIEN D .. S DA=$P ($G(^IBCN( 365.1,TQIE N,2,HLIEN, 0)),U,3) Q :'DA .. I +$$GET1^DI Q(365,DA_" ,","DO NOT PURGE","I ") S PFLAG =1 Q .. D ^DIK .. Q . ; . ; no w we can k ill the tr ansmission queue ent ry itself . ; IB*2.0 *602/DM as long as t here was n o DO NOT P URGE respo nses . I ' PFLAG S DA =TQIEN,DIK ="^IBCN(36 5.1," D ^D IK . Q ; ; Check for a stop re quest I $G (ZTSTOP) G PURGEX ; ; Now we m ust loop t hrough the eIV Respo nse file i tself to p urge any ; response records th at do not have a cor responding transmiss ion ; queu e entry. T hese are t he unsolic ited respo nses. The status of ; these re sponses is always 'r esponse re ceived' so we don't need to ; check the status. Fo r this loo p, start f rom the ve ry beginni ng of ; th e file. ; S DATE="", DIK="^IBCN (365,",CNT =0 F S DA TE=$O(^IBC N(365,"AE" ,DATE)) Q: 'DATE!($P( DATE,".",1 )>ENDDT)!$ G(ZTSTOP) S DA=0 F S DA=$O(^I BCN(365,"A E",DATE,DA )) Q:'DA D Q:$G(ZT STOP) . S CNT=CNT+1 . I $D(ZTQ UEUED),CNT #100=0,$$S ^%ZTLOAD() S ZTSTOP= 1 Q . ; . ; IB*2.0*6 02/DM neve r drop a D O NOT PURG E response . Q:+$$GE T1^DIQ(365 ,DA_",","D O NOT PURG E","I") . ; If there is a poin ter to the transmiss ion queue file, . ; make sure the transm ission que ue record actually e xists. . ; If the TQ exists, q uit this l oop, if no t, remove this respo nse. . ; . S TQIEN=+ $$GET1^DIQ (365,DA_", ","TRANSMI SSION QUEU E","I") . I TQIEN,$D (^IBCN(365 .1,TQIEN,0 )) Q . D ^DIK . Q ; PURGEX ; ; Tell Task Manager to delete th e task's r ecord I $D (ZTQUEUED) S ZTREQ=" @" Q ; | |
103 | ||
104 | Post Insta ll: | |
105 | As part of the post install, w e’ll queue a task to run the F IXTQ subro utine sinc e it may t ake some t ime to com plete. | |
106 | The FIXTQ’ s mission is to loca te any abn ormal IIV TRANSMISSI ON QUEUE ( #365.1) re cords (TQ) . For any found that are older than T-18 2 , the ab normal TQ record alo ng with an y correspo nding IIV RESPONSE ( #365) reco rd will be removed. | |
107 | For any ab normal TQ records fo und within T-182 thr ough T-14, we’ll ema il the eIn s insuranc e team ( PII ) a listin g detailin g the firs t 10 entri es discove red along with a tot al count. The email must conta in the sit e number ( station). Additional ly, if no abnormal r ecords are discovere d, we’ll s till email the eIns team to le t them kno w none wer e found. The purpos e of the e mail is to provide t he eInsura nce team a sample of records ( if any was found) th at could p oint to a potential problem wi th the exi sting eIns urance sof tware. | |
108 | This is wh at constit utes an ab normal TQ record | |
109 | Any TQ rec ord withou t a DATE/T IME CREATE D (#365.1, .06) | |
110 | Any TQ rec ord withou t a QUERY FLAG (#365 .1,.11) | |
111 | Any TQ rec ord with a QUERY FLA G that is set to “I” (Identifi cation) as this aspe ct of eIV was termin ated long time ago. | |
112 | Any TQ rec ord that h as a TRANS MISSION ST ATUS (#365 .1, .04) t hat is NOT equal to “Response Received” and not eq ual to “Co mmunicatio n Failure” and not e qual to “C ancelled”. There is no reason for any T Q entry mo re than 6 months ago to have a ny status other than those sta tuses list ed above. If they a re, they c an’t be tr ansmitted to FSC as a 270 mess age for on e reason o r another. | |
113 | ||
114 | Routines | |
115 | Activities | |
116 | Routine Na me | |
117 | IBY602PO | |
118 | Enhancemen t Category | |
119 | New | |
120 | Modify | |
121 | Delete | |
122 | No Change | |
123 | RTM | |
124 | ||
125 | Related Op tions | |
126 | ||
127 | Related Ro utines | |
128 | Routines “ Called By” | |
129 | Routines “ Called” | |
130 | ||
131 | Patch Inst all Post | |
132 | ^%DT | |
133 | ^%ZTLOAD | |
134 | ^DIC, ^DIK , ^DIQ | |
135 | ^IBCNEUT5 | |
136 | ^VASITE | |
137 | ^XLFDT | |
138 | ^XPDUTL | |
139 | ^XUPROD | |
140 | Routines | |
141 | Activities | |
142 | Data Dicti onary (DD) Reference s | |
143 | ^IBCN(365. 1 | |
144 | Related Pr otocols | |
145 | ||
146 | Related In tegration Control Re gistration s (ICRs) | |
147 | ||
148 | Data Passi ng | |
149 | Input | |
150 | Output Re ference | |
151 | Both | |
152 | Global Re ference | |
153 | Local | |
154 | Input Attr ibute Name and Defin ition | |
155 | Name: | |
156 | Definition : | |
157 | Output Att ribute Nam e and Defi nition | |
158 | Name: | |
159 | Definition : | |
160 | Current Lo gic | |
161 | N/A | |
162 | Modified L ogic (Chan ges are in bold) | |
163 | IBY602PO ; EDE/DM - P ost-Instal lation for IB*2.8*60 2 ; 23-MAR -2018 ;;2. 0;INTEGRAT ED BILLING ;**602**;0 9-AUG-2018 ;;Per VA Directive 6402, this routine s hould not be modifie d. ; | |
164 | Modified L ogic (Chan ges are in bold) | |
165 | ; ; This routine ha ndles the purging of the eIV d ata stored in the ; eIV Transm ission Que ue file (# 365.1), th e eIV Resp onse file (#365) and ; the EIV EICD TRAC KING file (#365.18) IB*2.0*621 /DM ; User can pick a date ran ge for the purge. Da ta created within 6 months ; c annot be p urged. The actual gl obal kills are done by a backg round ; ta sk after h ours (8:00 pm). ;EN ; NEW STOP, BEGDT,ENDD T,STATLIST ,IBVER S I BVER=1 D I NIT I STOP G EXIT ; initiali ze/calcula te default dates D D EFLT I STO P G EXIT ; allow us er to chan ge default end date if test sy stem ;IB*2 .0*621 D B EGDT I STO P G EXIT ; user int erface for beginning date D EN DDT I STOP G EXIT ; user int erface for ending da te D CONFI RM I STOP G EXIT ; confirma tion messa ge/final c heck D QUE UE ; queuing processEXI T ; Q ;EN1 ; Automat ed Monthly Purge *IB *2*595 NEW STOP,BEGD T,ENDDT,ST ATLIST,IBV ER S IBVER =2 D INIT I STOP G E XIT1 ; initiali ze/calcula te default dates D Q UEUE ; queuing processEXI T1 ; QPURG E ; This p rocedure i s queued t o run in t he backgro und and do es the ; a ctual purg ing. Varia bles avail able from the TaskMa n call are : ; ; STAT LIST = lis t of statu ses that a re OK to p urge ; BEG DT = begin ning date for purgin g ; ENDDT = ending d ate for pu rging ; ; First loop through t he eIV Tra nsmission Queue file and delet e all ; re cords in t he date ra nge whose status is in the lis t ; N CNT, DA,DATE,DI K,HLIEN,PF LAG,TQIEN, TQS ;IB*2.0*54 9 added PF LAG N IBWE XT,IBIORV S DATE=$O( ^IBCN(365. 1,"AE",BEG DT),-1),CN T=0 F S DATE=$O( ^IBCN(365. 1,"AE",DAT E)) Q:'DAT E!($P(DATE ,".",1)>EN DDT)!$G(ZT STOP) S TQ IEN=0 F S TQIEN=$O (^IBCN(365 .1,"AE",DA TE,TQIEN)) Q:'TQIEN D Q:$G(ZTSTO P) . S CNT =CNT+1 . I $D(ZTQUEU ED),CNT#10 0=0,$$S^%Z TLOAD() S ZTSTOP=1 Q . S TQS=$ P($G(^IBCN (365.1,TQI EN,0)),U,4 ) ; trans queue stat us . S IBW EXT=$P($G( ^IBCN(365. 1,TQIEN,0) ),U,10) ; IB*2.0*621 /DM WHICH EXTRACT . S IBIORV=$ P($G(^IBCN (365.1,TQI EN,0)),U,1 1) ; IB*2. 0*621/DM Q UERY FLAG . I IBWEXT =4,IBIORV= "V" Q ; skip EIC D Verifica tion entri es as they . ; will b e addresse d with EIC D Identifi cations . I '$F(STAT LIST,","_T QS_",") Q ; must be in the lis t . I IBWE XT=4,IBIOR V="I" D CH KTRK(TQIEN ) Q ; check EI V EICD TRA CKING for purge . ; loop throu gh the HL7 messages multiple a nd kill an y response . ; recor ds that ar e found fo r this tra nsmission queue entr y . ; IB*2 .0*621/DM Preserve a ny TQ and response t hat has DO NOT PURGE set to 1 (YES) . S PFLAG=0,HL IEN=0,DIK= "^IBCN(365 ," . F S HLIEN=$O (^IBCN(365 .1,TQIEN,2 ,HLIEN)) Q :'HLIEN D .. S DA= $P($G(^IBC N(365.1,TQ IEN,2,HLIE N,0)),U,3) Q:'DA .. I +$$GET1^ DIQ(365,DA _",",.11," I") S PFLA G=1 Q ;"DO NOT P URGE" .. D ^DIK .. Q . ; . ; n ow we can kill the t ransmissio n queue en try itself . ; as lo ng as ther e was no D O NOT PURG E response s IB*2.0*6 21/DM . I 'PFLAG S DA=TQIE N,DIK="^IB CN(365.1," D ^DIK K DA,DIK . Q ; ; Check for a sto p request I $G(ZTSTO P) G PURGE X ; ; Now we must lo op through the eIV R esponse fi le itself to purge a ny ; respo nse record s that do not have a correspon ding trans mission ; queue entr y. These a re the uns olicited r esponses. The status of ; thes e response s is alway s 'respons e received ' so we do n't need t o ; check the status . For this loop, sta rt from th e very beg inning of ; the file . ; S DATE ="",DIK="^ IBCN(365," ,CNT=0 F S DATE=$O( ^IBCN(365, "AE",DATE) ) Q:'DATE! ($P(DATE," .",1)>ENDD T)!$G(ZTST OP) S DA=0 F S DA=$O(^I BCN(365,"A E",DATE,DA )) Q:'DA D Q:$G(ZTSTO P) . S CNT =CNT+1 . I $D(ZTQUEU ED),CNT#10 0=0,$$S^%Z TLOAD() S ZTSTOP=1 Q . ; . ; I f there is a pointer to the tr ansmission queue fil e, then we . ; shoul d get out of this lo op because the purpo se of this section . ; is to p urge those responses with no l ink to the transmiss ion . ; qu eue file. . ; . I $P ($G(^IBCN( 365,DA,0)) ,U,5) Q . D ^DIK . Q ; K DA,DI KPURGEX ; ; Tell Tas kManager t o delete t he task's record I $ D(ZTQUEUED ) S ZTREQ= "@" Q ;INI T ; This p rocedure c alculates the defaul t beginnin g and endi ng dates ; and displ ays screen messages about this option to the user. ; NEW DAT E,FOUND,TQ IEN,TQS,RP IEN,RPS,IB HL7,IBDNP NEW DIR,X, Y,DTOUT,DU OUT,DIRUT, DIROUT ; S STOP=0 ; ; This is the list o f statuses that are OK to purg e ; 3=Resp onse Recei ved ; 5=Co mmunicatio n Failure ; 7=Cancel led S STAT LIST=","_$ $FIND1^DIC (365.14,," B","Respon se Receive d") S STAT LIST=STATL IST_","_$$ FIND1^DIC( 365.14,,"B ","Communi cation Fai lure") S S TATLIST=ST ATLIST_"," _$$FIND1^D IC(365.14, ,"B","Canc elled")_", " ; ; Try to find a beginning date in th e eIV Tran smission Q ueue file S DATE="", FOUND=0,BE GDT=DT F S DATE=$O( ^IBCN(365. 1,"AE",DAT E)) Q:'DAT E!FOUND S TQIEN=0 F S TQIEN=$O (^IBCN(365 .1,"AE",DA TE,TQIEN)) Q:'TQIEN D Q:FOUND . S TQS=$P($ G(^IBCN(36 5.1,TQIEN, 0)),U,4) ; status . I '$F(STAT LIST,","_T QS_",") Q . ;IB*2.0* 602/DM mak e sure the default e arliest da te is not a DO NOT P URGE entry . ;check t he HL7 mes sages mult iple to se e if DO NO T PURGE is set on an y response . S (IBDN P,IBHL7)=0 . F S IBHL7=$O (^IBCN(365 .1,TQIEN,2 ,IBHL7)) Q :'IBHL7!IB DNP D .. S RPI EN=$P($G(^ IBCN(365.1 ,TQIEN,2,I BHL7,0)),U ,3) Q:'RPI EN .. I +$ $GET1^DIQ( 365,RPIEN_ ",","DO NO T PURGE"," I") S IBDN P=1 .. Q . ; . I IBD NP,IBVER=2 Q . I IBDNP W !,"Pleas e wait, ch ecking for the earli est purge date ...", ! Q . ; . S FOUND=1 . S BEGDT= $P(DATE,". ",1) . Q ; ; If not successful , try to f ind a begi nning date in the eI V Response file. I ' FOUND D . S DATE="" . F S DATE=$O( ^IBCN(365, "AE",DATE) ) Q:'DATE! FOUND S RPIEN=0 F S RPIEN=$O (^IBCN(365 ,"AE",DATE ,RPIEN)) Q :'RPIEN D Q:FOUND .. S RPS=$P( $G(^IBCN(3 65,RPIEN,0 )),U,6) ; status .. I '$F(STAT LIST,","_R PS_",") Q .. ;IB*2.0 *602/DM do not choos e a DO NOT PURGE res ponse .. I +$$GE T1^DIQ(365 ,RPIEN_"," ,"DO NOT P URGE","I") Q .. S FO UND=1 .. S BEGDT=$P( DATE,".",1 ) .. Q . Q ; ; defau lt end dat e, Today m inus 182 d ays (appro x 6 months ) S ENDDT= $$FMADD^XL FDT(DT,-18 2) ; ;I IB VER=1,'FOU ND!(BEGDT> ENDDT) D S STOP=1 G INITX ; IB *2.0*621 I IBVER=1,' FOUND,'$$P ROD^XUPROD (1)!(BEGDT >ENDDT) D S STOP=1 G INITX . W !!?5,"Pur ging of eI V data is not possib le at this time." . I 'FOUND W !?5,"Ther e are no e ntries in the file t hat are el igible to be",!?5,"p urged or t here is no data in t he file." . E W !?5,"The oldest da te in the file is ", $$FMTE^XLF DT(BEGDT," 5Z"),".",! ?5,"Data c annot be p urged unle ss it is a t least 6 months old ." . W ! S DIR(0)="E " D ^DIR K DIR . Q I IBVER=2,' FOUND!(BEG DT>ENDDT) D S STOP=1 G INITX .; Send a Mai lMan messa ge with El igible Pur ge counts ; IB*2.0*6 21 - Updat ed Message .N MGRP,M SG,IBXMY . S MSG(1)=" Purge Elec tronic Ins urance Ver ification (eIV) Data Files did not find records" . S MSG(2)=" for statio n "_+$$SIT E^VASITE() _"." .S MS G(3)="" .S MSG(4)="T he option runs autom atically o n a monthl y basis an d purges d ata from t he" .S MSG (5)="IIV R ESPONSE fi le (#365), the IIV T RANSMISSIO N QUEUE fi le (#365.1 ), and the " .S MSG(6 )="EIV EIC D TRACKING file (#36 5.18). The data must be at lea st six mon ths old" . S MSG(7)=" before it can be pur ged. Only insurance transactio ns that ha ve a trans mission" . S MSG(8)=" status of ""Response Received" ", ""Commu nication F ailure"", or ""Cance lled""" .S MSG(9)="m ay be purg ed." .; Se t to IB si te paramet er MAILGRO UP - IBCNE EIV MESSA GE .S MGRP =$$MGRP^IB CNEUT5() . S IBXMY(" PI I
|
|
166 | ||
167 | Revision H istory | |
168 | Date | |
169 | Version | |
170 | Descriptio n | |
171 | Author | |
172 | 11/29/2018 | |
173 | 1.2 | |
174 | After IOC Testing | |
175 | Henry Norm and | |
176 | 03/27/2018 | |
177 | 1.1 | |
178 | Formal SDD , pre-IOC | |
179 | Daniel Mor an | |
180 | 02/27/2018 | |
181 | 1.0 | |
182 | Initial dr aft | |
183 | Daniel Mor an |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.