Produced by Araxis Merge on 2/27/2019 2:32:47 PM Eastern Standard 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 | MCCF_EDI_TAS_P2_PRCA_4_5_332.zip\MCCF_EDI_TAS_P2_PRCA_4_5_332\PRCA_4_5_332_IB_2_0_633.zip | TAS ePay US3976 SDD.docx | Fri Jan 25 13:52:08 2019 UTC |
2 | MCCF_EDI_TAS_P2_PRCA_4_5_332.zip\MCCF_EDI_TAS_P2_PRCA_4_5_332\PRCA_4_5_332_IB_2_0_633.zip | TAS ePay US3976 SDD.docx | Tue Feb 26 14:10:36 2019 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 1 | 766 |
Changed | 0 | 0 |
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 US3976 | |
2 | System Des ign Docume nt | |
3 | PRCA*4.5*x xx | |
4 | ||
5 | ||
6 | ||
7 | ||
8 | Department of Vetera ns Affairs | |
9 | May 2018 | |
10 | Version 1 | |
11 | User Story Number: U S3976 | |
12 | ||
13 | Epic Taxon omy | |
14 | Compliance | |
15 | Port | |
16 | Update | |
17 | Increa se No Touc h | |
18 | ||
19 | Story : US 3976 | |
20 | User Story Name: Nu mber of da ys (Age) o f Unposted Tricare E FTs to pre vent Posti ng | |
21 | ||
22 | As a... | |
23 | I want to. .. | |
24 | So that... | |
25 | ePay User | |
26 | Add the Nu mber of da ys (Age) o f Unposted Tricare E FTs site p arameter a nd adjust Pharmacy m aximum par ameter to 99 | |
27 | I can prev ent postin g of EFTs that are t oo old | |
28 | ||
29 | Conversati on (if des ired by de velopers) | |
30 | Change to site param eters for new parame ter. – Th e new para meter prom pt will be ‘NUMBER O F DAYS (AG E) OF UNPO STED TRICA RE EFTS TO PREVENT P OSTING: 30 //’ with a default o f 30 and a maximum v alue of 60 will appe ar immedia tely below the ‘NUMB ER OF DAYS (AGE) OF UNPOSTED P HARMACY EF TS TO PREV ENT POSTIN G: 60//’ | |
31 | Change to ERA WL to check Tric are ERAs b eing too o ld. Note a warning m essage wil l display if the sel ected Tric are ERA is older tha n 14 days and an err or message will appe ar if the selected T ricare ERA is older than the s pecified n umber of d ays in the site para meter/ | |
32 | Change to EFT unpost ed overrid e option ( extend num ber of day s aging). This opti on will no w prompt f or t he ov erride of Medical, P harmacy or Tricare E RAs where previously it only p rompted fo r the over ride or Me dical or P harmacy ER As. | |
33 | ||
34 | Current pr ompts: | |
35 | NUMBER OF DAYS (AGE) OF UNPOST ED MEDICAL EFTS TO P REVENT POS TING: 60// | |
36 | NUMBER OF DAYS (AGE) OF UNPOST ED PHARMAC Y EFTS TO PREVENT PO STING: 200 // | |
37 | ||
38 | Change to: | |
39 | NUMBER OF DAYS (AGE) OF UNPOST ED MEDICAL EFTS TO P REVENT POS TING: 60// | |
40 | NUMBER OF DAYS (AGE) OF UNPOST ED PHARMAC Y EFTS TO PREVENT PO STING: 200 // | |
41 | NUMBER OF DAYS (AGE) OF UNPOST ED TRICARE EFTS TO P REVENT POS TING: 30// | |
42 | ||
43 | Summary: | |
44 | Changes to the ERA W orklist pr ocess | |
45 | Currently, if the us er selects a Medical or Pharma cy ERA in the workli st, the sy stem check s how many days it h as been si nce the ER A was init ially file d and if i t exceeds the maximu m number o f days ent ered in th e associat ed EDI Sit e Paramete r. If the ERA excee ds the max imum numbe r of days, an error message di splayed an d user is not allowe d to work the ERA un til either a new max imum is en tered or t he user ov errides it temporari ly by usin g the Unpo sted EFT O verride op tion [RCDP E UNPOSTED EFT OVERR IDE]. Wit h this enh ancement, TRICARE E RAs will b e checked in a simil ar manner. | |
46 | ||
47 | Other Chan ges | |
48 | ||
49 | Site Param eter edit and audit functions will be ch anged. The site para meter repo rt and sit e paramete r audit re ports will also be c hanged. T he Unposte d EFT Over ride optio n will be modified t o include an overrid e option f or TRICARE ERAs. | |
50 | ||
51 | Data Dicti onary Chan ges | |
52 | An additio nal site p arameter f ields will be create d in files #344.61 t o store th e new maxi mum number of days f or TRICARE ERAs and the overri de comment . | |
53 | File RCDPE PARAMETER (#344.61) | |
54 | ||
55 | New fields : | |
56 | ||
57 | 344.61,.13 TRICARE EFT POST PREVENT DA YS 0;6 NUM BER | |
58 | ||
59 | NUMBER OF DAYS ( AGE) OF UN POSTED MED ICAL TRICA RE TO PREV ENT POSTIN G: | |
60 | ||
61 | INPUT TRANSFORM: K:+X'=X! (X>60)!(X< 14)!(X?.E1 "."1.N) X | |
62 | LAST E DITED: SEP 26, 2017 | |
63 | HELP-P ROMPT: Enter nu mber of da ys an EFT can age be fore | |
64 | preventi ng newer E FTs (14-60 ). | |
65 | DESCRI PTION: The numb er of cale ndar days beyond whi ch | |
66 | un-poste d tricare payments ( EFTs) will prevent | |
67 | the user from post ing newer medical EF Ts | |
68 | without posting th e older pa yments fir st. | |
69 | ||
70 | A value of 30 is t he initial default. The user | |
71 | can rese t the valu e to a num ber from 1 4 to 60, | |
72 | inclusiv e, but can not delete the value . | |
73 | ||
74 | 344.61,26 TRICAR E EFT OVER RIDE;2 DAT E | |
75 | ||
76 | TRICAR E ELECTRON IC FUND TR ANSFER OVE RRIDE | |
77 | INPUT TRANSFORM: S %DT="E STX" D ^%D T S X=Y K: Y<1 X | |
78 | LAST E DITED: MAY 06, 2014 | |
79 | HELP-P ROMPT: Enter th e precise date (opti onal time) recorded | |
80 | for the tricare EF T override . | |
81 | DESCRI PTION: An overr ide will a llow unres tricted sc ratchpad | |
82 | creation within th e ERA Work list optio n for one | |
83 | day. | |
84 | ||
85 | ||
86 | 344.61,27 USER - TRICARE O VERRIDE;4 POINTER TO NEW PERSO N FILE (# | |
87 | 200) | |
88 | ||
89 | USER W HO ENTERED THE TRICA RE OVERRID E | |
90 | LAST E DITED: MAY 06, 2014 | |
91 | HELP-P ROMPT: Enter th e user who entered t he tricare | |
92 | override . | |
93 | DESCRI PTION: A record of the pe rson who e ntered the pharmacy | |
94 | override is needed for audit ing purpos es. | |
95 | ||
96 | ||
97 | 344.61,28 COMMEN T - TRICAR E OVERRIDE ;6 FREE TE XT | |
98 | ||
99 | COMMEN T EXPLAINI NG THE TRI CARE OVERR IDE | |
100 | INPUT TRANSFORM: K:$L(X)> 50!($L(X)< 1) X | |
101 | LAST E DITED: MAY 06, 2014 | |
102 | HELP-P ROMPT: Enter th e reason f or the Tri care Overr ide, | |
103 | 1-50 cha racters. | |
104 | DESCRI PTION: The reas on for ent ering the Tricare Ov erride | |
105 | must be recorded f or auditin g purposes . | |
106 | ||
107 | ||
108 | ||
109 | Routines c hanges | |
110 | ||
111 | The follow ing routin es will be modified: | |
112 | RCDPEWLP - See zzRCD PEWLP3976 | |
113 | RCDPEUPO - Option [R CDPE UNPOS TED EFT OV ERRIDE] | |
114 | EN,DMSGS a nd OVERRID E methods modified t o account for Tricar e EFTs\ | |
115 | See zzRCDP EUPO3976 | |
116 | ||
117 | RCDPESP(mo dified) | |
118 | Bottom of RXPARMS – See zzRCD PESP3976 | |
119 | ||
120 | RCDPESP1 – Option [R CDPE SITE PARAMETER REPORT] | |
121 | Bottom of SPRPT | |
122 | See zzRCDP ESP13976 | |
123 | Display of new Trica re EFT Ove rride fiel d if run in ‘Both’ mode | |
124 | ||
125 | ||
126 | ||
127 | ||
128 | Resolution – Added C hanged Obj ects | |
129 | ||
130 | Routines | |
131 | Activities | |
132 | Routine Na me | |
133 | RCDPEWLP | |
134 | Enhancemen t Category | |
135 | New | |
136 | Modify | |
137 | Delete | |
138 | No Change | |
139 | RTM | |
140 | ||
141 | Related Op tions | |
142 | RCDPE EDI LOCKBOX WO RKLIST | |
143 | ||
144 | Related Ro utines | |
145 | Routines “ Called By” | |
146 | Routines “ Called” | |
147 | ||
148 | RCDPEAA2 | |
149 | RCDPEAA3 | |
150 | RCDPEAR1 | |
151 | RCDPENR1 | |
152 | RCDPEOUPO | |
153 | RCDPEWL0 | |
154 | RCDPEWL1 | |
155 | RCDPEWL6 | |
156 | RCDPEWL7 | |
157 | RCDPEWL8 | |
158 | RCDPEX2 | |
159 | RCDPTAR | |
160 | $$BN1^P RCAFN | |
161 | EN^PSOO RDER | |
162 | CHECK^R CDPEUPO | |
163 | HDR^RCD PEWL | |
164 | SEL^RCD PEWL | |
165 | PARAMS^ RCDPEWL0 | |
166 | HDR^RCD PEWL7 | |
167 | INIT^RC DPEWL7 | |
168 | EN^RCDP EX1 | |
169 | ||
170 | ||
171 | Current Lo gic | |
172 | RCDPEWLP ; ALBANY/KML - EDI LOC KBOX ERA a nd EEOB WO RKLIST pro cedures ;O ct 15, 201 4@12:37:32 ;;4.5;Acc ounts Rece ivable;**2 98,303,304 ,319**;Mar 20, 1995; Build 18 ; ;Per VA Di rective 64 02, this r outine sho uld not be modified. ; Q ; ; p rca*4.5*29 8 - proced ures built to handle outstandi ng EFTs; a nd ERAs wi th excepti ons; ;AGED EFTS(ERADA ,TYPE) ; s earch medi cal or pha rmacy aged EFTs that have not been poste d ; ENTRY point for the Selec t ERA acti on on the ERA Workli st screen ; Input - ERADA = IE N in file 344.4 ; TY PE = pharm acy or med ical ERA ; "M" (medi cal ERA-EF T); "P" (p hamacy ERA -EFT); ; O utput = 1P - error f or aged, u nposted ph armacy EFT s ; 2P - w arning for aged,unpo sted medic al EFTs ; 3P - Overr ide exists for aged, unposted pharmacy E FTs ; 1M - error for aged, unp osted medi cal EFTs ; 2M - warn ing for ag ed, unpost ed medical EFTs ; 3M - Overrid e exists f or aged, u nposted me dical EFTs ; 0 - the re exist n o error or warning c onditions ; Can be c ombination s - "1P" o r "2P" or "3P" or "1 M" or "2M" or "3M" o r "1P^1M" or "1P^2M" or" ; "1P ^3M" or "2 P^1M" or " 2P^2M" or "2P^3M" or "3P^1M" o r "3P^2M" or "3P^3M" ; ; 1. If there are unposted payments ( EFTs) asso ciated wit h third pa rty medica l claims m ore than 1 4 calendar days old, ; the sy stem shall display a WARNING m essage for action Se lect ERA o n the ERA WORKLIST, and allow to enter t he worklis t ; 2. If there are unposted p ayments (E FTs) assoc iated with pharmacy claims mor e than 21 calendar d ays old, ; the syst em shall d isplay a W ARNING mes sage for a ction Sele ct ERA on the ERA WO RKLIST, an d allow to enter the worklist ; 3. If th ere are un posted pay ments (EFT s) associa ted with t hird party medical o r pharmacy claims, ; aged mor e than the number of days spec ified in s ite parame ters, ; th e system s hall displ ay an erro r message for action Select ER A on the E EOB WORKLI ST [RCDPE EDI LOCKBO X WORKLIST ] ; additi onal condi tions for item 3 bel ow: ; 3a. If the us er has sel ected a me dical ERA that is 14 days or o lder, allo w the user to create the scrat chpad. ; 3 b. If the user has s elected a pharmacy E RA that is 21 days o r older, a llow the u ser to cre ate the sc ratchpad. ; 3c. If a n override exists, a llow the u ser to cre ate the sc ratchpad. ; 3d. If t he user ha s selected a medical ERA that has been r eceived wi thin 14 da ys, and th ere are ag ed,unposte d EFTs, an d there is no overri de, preven t user fro m entering scratchpa d ; 3e. If the user has select ed a pharm acy ERA th at has bee n received within 21 days,and there are aged,unpos ted EFTs, and there is no over ride, prev ent user f rom enteri ng scratch pad ;Do no t consider EFTs that are older than two months pri or to nati onal relea se. ; note : EFTs tha t designat ed to be a uto-posted to a rece ipt are in cluded in the search for aged, unposted EFTs N X,E FTDA,UNPOS T,EFT0,SEL ERADT,STAR TDT,DATE,R C3444,RC34 431 S UNPO ST=0 S RC3 444=^RCY(3 44.4,ERADA ,0) I '$P( RC3444,U,5 ) G AEFTSQ ; ignor e selected ERAs that have ZERO payment S EFTDA=+$ O(^RCY(344 .31,"AERA" ,ERADA,0)) S:EFTDA R C34431=^RC Y(344.31,E FTDA,0) I 'EFTDA,$P( RC3444,U,9 )=2 G AEFT SQ ; ign ore select ed ERAs th at are MAT CHED TO PA PER CHECK I 'EFTDA,$ P(RC3444,U ,15)="CHK" G AEFTSQ ;ignore s elected ER As that ar e UNMATCHE D and have an EXPECT ED PAYMENT CODE of " CHK" I 'EF TDA S SELE RADT=$P($P (RC3444,U, 7),".") ; FILE DATE/ TIME (344. 4, .07) of the selec ted ERA wh en there i sn't an as sociated E FT (unmatc hed ERA) E S SELERA DT=$P(RC34 431,U,13) ; DATE REC EIVED (344 .31,.13) o f the EFT associated with the selected E RA I TYPE ="P" D G AEFTSQ . I $$FMDIFF^ XLFDT(DT,S ELERADT)>2 1 S UNPOST =0 Q ;th e selected ERA is ol der than 2 1 days, qu it determi nation and allow use r to enter scratchpa d with sel ected ERA . S UNPOST =$$GETEFTS (TYPE) ; s elected ER A was rece ived less than 21 da ys ago; ga ther any u nposted, a ged EFTs I TYPE="M" D . I $$FM DIFF^XLFDT (DT,SELERA DT)>14 S U NPOST=0 Q ;the sel ected ERA is older t han 14 day s, quit de terminatio n and allo w user to enter scra tchpad wit h selected ERA . S U NPOST=$$GE TEFTS(TYPE ) ; select ed ERA was received less than 14 days ag o; gather any unpost ed, aged E FTsAEFTSQ ; Q UNPOS T ;GETEFTS (TYPE,OPTI ON) ; ENTR Y point fo r Unposted EFT Overr ide option ; ; Set u p search c riteria fo r unposted EFTs; if aged, unpo sted EFTs exist then generate warning/pr evention m essages ; Input ; TY PE = "M" ( medical ER A-EFT); "P " (phamacy ERA-EFT); "B" (both pharmacy and medica l) ; OPTIO N = if = n ull or und efined the n Select E RA action on the ERA Worklist called thi s function ; if = 1 then Overr ide option called th is functio n ; Output - See out put for AG EDEFS ; N OVERRIDE,D AYSLIMIT,O UTCOME,TRA RRY,ARRAY, STR,X,DTAR RY S OPTIO N=$G(OPTIO N) I TYPE= "B" S DAYS LIMT("M")= $$GET1^DIQ (344.61,1, .06),DAYSL IMT("P")=$ $GET1^DIQ( 344.61,1,. 07) ; both medical a nd pharmac y EFTs nee d to be ev aluated E S DAYSLIM T(TYPE)=$$ GET1^DIQ(3 44.61,1,$S (TYPE="M": .06,1:.07) ) ; number of days a n EFT can age before post prev ention rul es apply S STARTDT=$ $CUTOFF D EFTDET(STA RTDT,TYPE, .DAYSLIMT, .TRARRY) ; aged unpo sted EFTs exist; gen erate prev ention mes sage and i f this was called wi thin Workl ist (and n ot Overrid e option) then gener ate msg wi th list of TRACE #s F X="P","M " I $D(TRA RRY("ERROR ",X)) D . D CHECK^RC DPEUPO(X,. OVERRIDE) ; determin e if Overr ide exists . I OVERR IDE S OUTC OME=$G(OUT COME)_3_X_ U . E S O UTCOME=$G( OUTCOME)_1 _X_U . K T RARRY("WAR NING",X) ; Error mes sage super sede warni ng message . No need to display warning m sg if erro r conditio n exists . Q:OPTION Q:OVERRID E . M ARRA Y=TRARRY(" ERROR",X) . D FTRACE (.ARRAY,.S TR),PREVMS G(X,.DAYSL IMT,.STR) . K ARRAY F X="P","M " I $D(TRA RRY("WARNI NG",X)) D . S OUTCOM E=$G(OUTCO ME)_2_X_U . Q:OPTION ; functi on was cal led by the OVERRIDE option; do n't need t o display list of tr ace number s . M ARRA Y=TRARRY(" WARNING",X ) . D FTRA CE(.ARRAY, .STR),WARN MSG(X,.STR ) . K ARRA Y ; aged u nposted EF Ts > 21 da ys exist; generate w arning mes sage S:'$D (OUTCOME) OUTCOME=0 ; error or warning c onditions do not exi stGETSQ ; Q OUTCOME ;CUTOFF() ; RETURN E FT cut-off date ; EF T cut-off date repre sents 2 mo nths prior to instal l date of patch 298 (ignore EF TS that ar e aged old er than th e 2 month prior date ) N RCX,DA TE S RCX=+ $P($G(^RCY (344.61,1, 0)),U,9) S :RCX=0 RCX =DT S DATE =$$FMADD^X LFDT(RCX,- 61,0,0) Q DATE ;EFTD ET(RECVDT, TYPE,DAYSL IMT,TRARRY ) ; gather EFT data ; only col lect EFTs that meet the requir ements of aged and u nposted ; ; input - RECVDT = d ate to sta rt $ORDER through th e DATE REC EIVED cros s-referenc e of 344.3 ; TYPE = "M" (medic al ERA-EFT ); "P" (ph amacy ERA- EFT); "B" (both phar macy and m edical) ; DAYSLIMT = number of days an E FT can age before po st prevent ion rules apply ; TR ARRY = pas sed by ref erence, ar ray to hol d trace nu mbers that represent the aged, unposted EFTs ; ; output - T RARRY = ar ray of tra ce numbers that need to be rep orted as a ged and un posted ; N EFTDA S EFTDA="" F S RECVD T=$O(^RCY( 344.31,"AD R",RECVDT) ) Q:'RECVD T F S EF TDA=$O(^RC Y(344.31," ADR",RECVD T,EFTDA)) Q:'EFTDA D CHKEFT(R ECVDT,EFTD A,TYPE,.DA YSLIMT,.TR ARRY) Q ;C HKEFT(RECV DT,EFTDA,T YPE,DAYSLI MT,TRARRY) ; ; Check an indivi dual EFT f or warning s/errors ; Input: ; RECVDT: Da te Receive d ; EFTDA: IEN of ED I THIRD PA RY EFT DET AIL ; TYPE = "M" (me dical ERA- EFT); "P" (phamacy E RA-EFT); " B" (both p harmacy an d medical) ; DAYSLIM T = number of days a n EFT can age before post prev ention rul es apply ; TRARRY: Array with warning e rror info ; N EFT0,E RAREC,MSTA TUS,AGED,T RACE S EFT 0=$G(^RCY( 344.31,EFT DA,0)) Q:E FT0="" ; Ignore if no data Q: +$P(EFT0,U ,7)=0 ; Ig nore zero payment am ts I $P($G (^RCY(344. 31,EFTDA,3 )),U,2)]"" Q ; Igno re duplica te EFTs wh ich have b een remove d S ERARE C=+$P(EFT0 ,U,10) ; E RA RECORD (344.31, . 1) pointer to ERA re cord I ERA REC,$P($G( ^RCY(344.4 ,ERAREC,0) ),U,14)=1 Q ; DETAI L POST STA TUS (344.4 , .14); ig nore poste d ERA-EFTs I 'ERARE C,$P($G(^R CY(344.31, EFTDA,0)), U,8) Q:$$P ROC(EFTDA) ;Exclude EFT matche d to Paper EOB if re ceipt is p rocessed S MSTATUS=+ $P(EFT0,U, 8) ; MATCH STATUS (3 44.31,, .0 8) S AGED= $$FMDIFF^X LFDT(DT,RE CVDT) ; ge t aged num ber of day s of the E FT S TRACE =$P(EFT0,U ,4) ; TRAC E # (344.3 1, .04) I (TYPE="B") !(TYPE="P" ),$$PHARM( ERAREC) D . I AGED>D AYSLIMT("P ") S TRARR Y("ERROR", "P",TRACE) ="ERA = "_ ERAREC_U_M STATUS Q ; aged un posted EFT that gene rates the error mess age and wi ll prevent user from entering the scratc hpad with the select ed ERA . I '$D(TRARR Y("ERROR") ),AGED>21 S TRARRY(" WARNING"," P",TRACE)= "ERA = "_E RAREC_U_MS TATUS ;a ged unpost ed PHARMAC Y EFT that will gene rate a war ning messa ge when en tering the scratchpa d with the selected ERA I (TYP E="B")!(TY PE="M"),'$ $PHARM(ERA REC) D . I AGED>DAYS LIMT("M") S TRARRY(" ERROR","M" ,TRACE)="E RA = "_ERA REC_U_MSTA TUS Q ; a ged unpost ed EFT tha t generate s the erro r message and will p revent use r from ent ering the scratchpad with the selected E RA . I '$D (TRARRY("E RROR")),AG ED>14 S TR ARRY("WARN ING","M",T RACE)="ERA = "_ERARE C_U_MSTATU S ;aged u nposted ME DICAL EFT that will generate a warning m essage whe n entering the scrat chpad with the selec ted ERA Q ;PROC(EFTD A) ; Check if TR Rec eipt for a n EFT link ed to Pape r EOB is p rocessed ; Input - EFT IEN ; Output - B oolean (Re turns 1 if TR receip t exists a nd is OPEN , otherwis e returns 0) ; ;Find TR receip t and chec k if it do es not hav e a status of CLOSED N IEN344, RET S IEN3 44=$O(^RCY (344,"AEFT ",EFTDA,0) ) I IEN344 S:$P($G(^ RCY(344,IE N344,0)),U ,14)'=1 RE T=1 Q +$G( RET) ;FTRA CE(TRARRY, STR) ; inp ut array n eeds to be formatted as a stri ng of trac e#s each s eparated b y commas t o be displ ayed in th e warning or error m essage ; i nput - TRA RRY = pass ed by refe rence, arr ay of trac e numbers that repre sent the a ged, unpos ted EFTs ; STR = pas sed by ref erence, em pty array that will be populat ed with tr ace number s ; ; out put - STR = reconstr ucted arra y of trace numbers ; ; fixed code follo ws N CTR,L EN,TRACE,X K STR ; array retu rned S CTR =1,TRACE=" " F S TRA CE=$O(TRAR RY(TRACE)) Q:TRACE=" " D . S S TR(CTR)=$G (STR(CTR)) ; initial ize . I $L (STR(CTR)) +$L(TRACE) >77 S CTR= CTR+1,STR( CTR)=TRACE Q . S STR (CTR)=STR( CTR)_$S(ST R(CTR)]"": ",",1:"")_ TRACE ; a dd comma i f needed Q ;WARNMSG (TYPE,STR) ; Display warning m essage whe n aged, un posted EFT s exist ; ; input - TYPE = "P" (pharmacy ); "M" (me dical) ; S TR = popul ated array where eac h subscrpt contains a string o f trace nu mbers in " trace#, tr ace#," for mat ; pass ed by refe rence ; N DIR,LN,X ,Y S LN=5, X=0 S DIR( 0)="EA" S DIR("A",1) ="WARNING: Unposted "_$S(TYPE= "P":"pharm acy ",1:"m edical ")_ "EFTs exis t that are more than "_$S(TYPE ="P":21,1: 14)_" days old." S D IR("A",2)= " " ; bla nk line S DIR("A",3) ="Post the older pay ments firs t. The EFT s may be u nmatched o r matched. " S DIR("A ",4)="Trac e number(s ) associat ed with un posted EFT s:" F S X =$O(STR(X) ) Q:'X S DIR("A",LN )=STR(X),L N=LN+1 S D IR("A",LN) =" " ; bl ank line S DIR("A")= "Press ENT ER to cont inue: " W ! D ^DIR Q ;PREVMSG( TYPE,DAYS, STR) ; Dis play Error message w hen aged, unposted E FTs exist ; ; input - TYPE = " P" (pharma cy); "M" ( medical) ; DAYS = nu mber of da ys an EFT can age be fore post prevention rules app ly ; STR = passed by reference , name of array that will retu rn reforma tted array of trace numbers ; ; output - STR = po pulated ar ray where each subsc rpt contai ns a strin g of trace numbers i n "trace#, trace#," format ; N DIR,LN,X ,Y S LN=6, X=0 S DIR( 0)="EA" S DIR("A",1) ="ERROR: U nposted "_ $S(TYPE="P ":"Pharmac y ",1:"Med ical ")_"E FTs exist that are m ore than " _$S(TYPE=" P":DAYS("P "),1:DAYS( "M"))_" da ys old. Sc ratchpad" S DIR("A", 2)="creati on is not allowed fo r newer pa yments. Po st older p ayments fi rst." S DI R("A",3)=" The EFTs m ay be matc hed or unm atched." S DIR("A",4 )=" " ; b lank line S DIR("A", 5)="Trace number(s) associated with unpo sted EFTs: " F S X=$ O(STR(X)) Q:'X S DI R("A",LN)= " "_STR(X) ,LN=LN+1 S DIR("A",L N)=" " ; blank line S DIR("A" )="Press E NTER to co ntinue: " W ! D ^DIR Q ;EXCDEN Y ; praca* 4.5*298 di splay acce ss denied message fo r those ER As that ar e selected off the E RA Worklis t and have exception s ; PRCA* 4.5*304 - undeclared parameter s (from WL ^RCDPEWL7) : RCERA an d RCEXC N DIR,Y,RCD WLIEN,X,Y, DTOUT,DUOU T,DIRUT,DI ROUT S DIR (0)="YA" S DIR("A",1 )="ACCESS DENIED: Sc ratchpad c reation is not allow ed when th ird party" S DIR("A" ,2)="medic al excepti ons exist. Fix Trans mission Ex ceptions f irst and t hen Data" S DIR("A", 3)="Except ions with the EXE ED I Lockbox 3rd Party Exceptions option wh ich is" S DIR("A",4) ="located on the EDI Lockbox M ain Menu." S DIR("A" ,5)="" ;PR CA*4.5*304 - Allow u sers to go and fix e xceptions S DIR("A") ="Do you w ant to beg in clearin g Exceptio ns for thi s ERA (Y/N )?: " S DI R("B")="Y" W ! D ^DI R ; ;PRCA* 4.5*304 - allow jump to work o n Exceptio ns ;If the y wish to work on th e exceptio ns, send t he necessa ry data, d efault the payer ran ge to ALL (for now) I Y=1 D S :$G(RCMBG) '="" VALMB G=RCMBG S: $G(RCDWLIE N)'="" RCE RA=RCDWLIE N S RCEXC= 1 K RCMBG ; VALMBCK= "R" . S R CMBG=$G(VA LMBG) . S RCDWLIEN=R CERA . D E N^RCDPEX1 Q ;EXCWARN (ERADA) ; prca*4.5*2 98 generat e warning when excep tion exist s ; ; inp ut - ERADA = Interna l Entry Nu mber in fi le 344.4 ; output - WARNING ME SSAGE if e xception e xists on t he ERA ; ; Q:$$PHAR M(ERADA) ; ignore ph armacy ERA s Q:$$XCEP T(ERADA)=" " ; excep tion does not exist N DIR S DI R(0)="EA" S DIR("A", 1)="WARNIN G: Fix Tra nsmission Exceptions first and then Data Exception s via" S D IR("A",2)= "the EXE E DI Lockbox 3rd Party Exception s option w hich is lo cated on t he" S DIR( "A",3)="ED I Lockbox Main Menu. " S DIR("A ",4)=" " S DIR("A")= "Press ENT ER to cont inue: " W ! D ^DIR Q ;XCEPT(ER ADA) ; prc a*4.5*298 return ERA exception state ; ; input - ERADA = In ternal Ent ry Number in file 34 4.4 ; outp ut - "x" o r "" ; "x" = excepti on exists for at lea st one of the claims in the ER A ; N RES S RES=$S($ D(^RCY(344 .4,"AEXC", 1,ERADA)): "x",$D(^RC Y(344.4,"A EXC",2,ERA DA)):"x",$ D(^RCY(344 .4,"AEXC", 99,ERADA)) :"ERADA",1 :"") Q RES ;PHARM(X1 ) ; prca*4 .5*298 det ermine if pharmacy E RA ; ; inp ut - X1 = Internal E ntry Numbe r in file 344.4 ; ou tput - 1 o r 0 ; 1 = pharmacy E RA ; 0 = n on-pharmac y ERA ; Q $S($D(^RC Y(344.4,X1 ,1,"ECME") ):1,1:0) ; GETPHARM(P RCAIEN,RCA RRY) ;prca *4.5*298 r eturn phar macy data to show on EEOB item s in scrat chpad ; ; input - P RCAIEN = i en to reco rd in 430 ; RCARRY = Array nam e that wil l be used to store a nd return pharmacy d ata elemen ts ; outpu t - RCARRY = holds p harmacy da ta ; IA 6 033 (contr olled subs cription) - read acc ess of fil e 362.4. s tatus is p ending ; I CR 1878 (s upported) - usage of EN^PSOORD ER ; N RC0 ,RXDATA,RX IEN,RCDFN, RXFILL K R CARRY Q:PR CAIEN="" S RCDFN=$P( ^PRCA(430, PRCAIEN,0) ,U,7) S RC 0=+$O(^IBA (362.4,"C" ,PRCAIEN,0 )) Q:RC0=0 S RXDATA= $G(^IBA(36 2.4,RC0,0) ) S RCARRY ("DOS")=$$ FMTE^XLFDT ($P(RXDATA ,U,3),"2Z" ) S RCARRY ("FILL")=+ $P(RXDATA, U,10) ; rx fill# S R XIEN=+$P(R XDATA,U,5) ; RX ien ptr file 5 2 D EN^PSO ORDER(RCDF N,RXIEN) S RCARRY("R X")=$P(^TM P("PSOR",$ J,RXIEN,0) ,U,5) I RC ARRY("FILL ")=0 S RCA RRY("RELEA SED STATUS ")=$S($P(^ TMP("PSOR" ,$J,RXIEN, 0),U,13)]" ":"Release d",1:"Not Released") ; determi ne release status fr om Rx on t he first f ill (no re fills) I R CARRY("FIL L")>0 S RC ARRY("RELE ASED STATU S")=$S($P( $G(^TMP("P SOR",$J,RX IEN,"REF", RCARRY("FI LL"),0)),U ,8)]"":"Re leased",1: "Not Relea sed") ; ; determine release st atus from Rx refill # ;PRCA319 add $G() Q ;CV ; Ch ange View action for ERA Workl ist D FULL ^VALM1 D P ARAMS^RCDP EWL0("CV") D HDR^RCD PEWL7,INIT ^RCDPEWL7 S VALMBCK= "R",VALMBG =1 Q ;NOED IT ; Displ ay no edit allowed s elected ER A is desig nated for auto-posti ng N DIR S DIR(0)="E A",DIR("A" ,1)="This action is not availa ble for Au to-Posted ERAs." S D IR("A")="P ress ENTER to contin ue: " W ! D ^DIR K D IR W ! Q ; VR(ERADA) ; handling of auto-p osted ERAs ; entry p oint for t he Look at Receipt p rotocol fo r standard Worklist; ; ; inpu t - ERADA = ien from file 344. 49 (and 34 4.4) ; N R CDA,RCZ,RC Z0,EEOBREC D SEL^RCD PEWL(.RCDA ) ; select an EEOB o ff the scr atchpad S RCZ=+$O(RC DA(0)),RCZ =+$G(RCDA( RCZ)) Q:'R CZ S RCZ0= $G(^RCY(34 4.49,ERADA ,1,RCZ,0)) S EEOBREC =$P($G(^RC Y(344.4,ER ADA,1,+$P( RCZ0,U,9), 4)),U,3) I EEOBREC'] "" D NOVIE W Q D EN^ VALM("RCDP E AUTO EOB RECEIPT P REVIEW") Q ;NOVIEW ; selected EEOB canno t be viewe d if no re ceipt numb er N DIR S DIR(0)="E A",DIR("A" ,1)="THIS ACTION IS NOT AVAILA BLE SINCE THE EEOB H AS NOT BEE N AUTO-POS TED." S DI R("A")="Pr ess ENTER to continu e: " W ! D ^DIR K DI R W ! Q ;I NIT(ERADA, EEOBREC) ; List Temp late - RCD PE AUTO EO B RECEIPT PREVIEW en try point ; display EEOBs that have been posted (r eceipt exi sts) ; ; i nput - ERA DA = ien f rom file 3 44.49 (and 344.4) ; EEOBREC = selected E EOBs recei pt ; outpu t - ^TMP(" RCDPE_AP_E OB_PREVIEW ",$J) N X, Z,Z1,Z10,Z 0,Z2,RCZ N RCPT K ^T MP("RCDPE_ AP_EOB_PRE VIEW",$J) S VALMCNT= 0,VALMBG=1 S Z=0 F S Z=$O(^RC Y(344.49,E RADA,1,Z)) Q:'Z S Z 0=$G(^(Z,0 )) D . I $ P(Z0,U)\1= +Z0 S Z2=$ P(Z0,U,2) . S RCPT=+ $P($G(^RCY (344.4,ERA DA,1,+$P(Z 0,U,9),4)) ,U,3),RCPT (RCPT)="" ; receipt array . I $P($P(Z0, U),".",2), $D(RCPT(EE OBREC)) D ; if the EEOB has same recei pt# has th e selected EEOB then it can be listed on the previ ew screen .. S:$P(Z0 ,U,2)="" $ P(Z0,U,2)= Z2 .. S RC Z=$S(+$P(Z 0,U,6)=0:0 ,+$P(Z0,U, 6)<0:-1,$P (Z0,U,7):1 ,1:2) .. S RCZ(RCZ,Z )=Z0 .. K RCPT .. S Z1=0 F S Z1=$O(^RCY (344.49,ER ADA,1,Z,1, Z1)) Q:'Z1 S Z10=$G (^(Z1,0)) D ... I $P (Z10,U,5)= 1 S RCZ(RC Z,Z,"ADJ", Z1)="Dec a dj $"_$J(0 -$P(Z10,U, 3),"",2)_" pending - ",RCZ(RCZ ,Z,"ADJ",Z 1,1)=$J("" ,4)_$P(Z10 ,U,9) F RC Z=1,2,0,-1 D . Q:'$D (RCZ(RCZ)) . I RCZ=1 D SET("PA YMENTS (LI NES FOR RE CEIPT):") . I RCZ=0, VALMCNT>0 D SET(" ") D SET("ZE RO DOLLAR PAYMENTS:" ) . I RCZ= -1,VALMCNT >0 D SET(" ") D SET( "LINES WIT H NEGATIVE BALANCES STILL NEED ING TO BE DISTRIBUTE D:") . S Z =0 F S Z= $O(RCZ(RCZ ,Z)) Q:'Z S Z0=RCZ( RCZ,Z) D . . S X="" . . S X=$$SE TFLD^VALM1 ($P(Z0,U), X,"LINE #" ) .. S X=$ $SETFLD^VA LM1($S($P( Z0,U,7):$$ BN1^PRCAFN ($P(Z0,U,7 )),1:$S(RC Z=0:"",1:" [SUSPENSE] ")_$S($P(Z 0,U,2)["** ADJ"&'$P($ P(Z0,U,2), "ADJ",2):" TOTALS MIS MATCH ADJ" ,1:$P(Z0,U ,2))),X,"A CCOUNT") . . S X=$$SE TFLD^VALM1 ($J(+$P(Z0 ,U,6),"",2 ),X,"AMOUN T") .. D S ET(X) .. S Z1=0 F S Z1=$O(RCZ (RCZ,Z,"AD J",Z1)) Q: 'Z1 D SET ($J("",12) _$G(RCZ(RC Z,Z,"ADJ", Z1))) S Z2 =0 F S Z2 =$O(RCZ(RC Z,Z,"ADJ", Z1,Z2)) Q: 'Z2 D SET ($J("",12) _$G(RCZ(RC Z,Z,"ADJ", Z1,Z2))) Q ;SET(X) ; S VALMCNT =VALMCNT+1 S ^TMP("R CDPE_AP_EO B_PREVIEW" ,$J,VALMCN T,0)=X Q ; HDR ; D HD R^RCDPEWL Q ;FNL ; K ^TMP("RCD PE_AP_EOB_ PREVIEW",$ J) Q ;RCDP EWLP | |
173 | ||
174 | Modified L ogic (Chan ges are in bold) | |
175 | ||
176 | RCDPEWLP ; ALBANY/KML - EDI LOC KBOX ERA a nd EEOB WO RKLIST pro cedures ;O ct 15, 201 4@12:37:32 ;;4.5;Acc ounts Rece ivable;**2 98,303,304 ,319**;Mar 20, 1995; Build 18 ; ;Per VA Di rective 64 02, this r outine sho uld not be modified. ; Q ; ; p rca*4.5*29 8 - proced ures built to handle outstandi ng EFTs; a nd ERAs wi th excepti ons; ;AGED EFTS(ERADA ,TYPE) ; s earch medi cal or pha rmacy aged EFTs that have not been poste d ; ENTRY point for the Selec t ERA acti on on the ERA Workli st screen ; Input - ERADA = IE N in file 344.4 ; TY PE = pharm acy or med ical ERA ; "M" (medi cal ERA-EF T); "P" (p hamacy ERA -EFT); ; O utput = 1P - error f or aged, u nposted ph armacy EFT s ; 2P - w arning for aged,unpo sted medic al EFTs ; 3P - Overr ide exists for aged, unposted pharmacy E FTs ; 1M - error for aged, unp osted medi cal EFTs ; 2M - warn ing for ag ed, unpost ed medical EFTs ; 3M - Overrid e exists f or aged, u nposted me dical EFTs ; 0 - the re exist n o error or warning c onditions ; Can be c ombination s - "1P" o r "2P" or "3P" or "1 M" or "2M" or "3M" o r "1P^1M" or "1P^2M" or" ; "1P ^3M" or "2 P^1M" or " 2P^2M" or "2P^3M" or "3P^1M" o r "3P^2M" or "3P^3M" ; ; 1. If there are unposted payments ( EFTs) asso ciated wit h third pa rty medica l claims m ore than 1 4 calendar days old, ; the sy stem shall display a WARNING m essage for action Se lect ERA o n the ERA WORKLIST, and allow to enter t he worklis t ; 2. If there are unposted p ayments (E FTs) assoc iated with pharmacy claims mor e than 21 calendar d ays old, ; the syst em shall d isplay a W ARNING mes sage for a ction Sele ct ERA on the ERA WO RKLIST, an d allow to enter the worklist ; 3. If th ere are un posted pay ments (EFT s) associa ted with t hird party medical o r pharmacy claims, ; aged mor e than the number of days spec ified in s ite parame ters, ; th e system s hall displ ay an erro r message for action Select ER A on the E EOB WORKLI ST [RCDPE EDI LOCKBO X WORKLIST ] ; additi onal condi tions for item 3 bel ow: ; 3a. If the us er has sel ected a me dical ERA that is 14 days or o lder, allo w the user to create the scrat chpad. ; 3 b. If the user has s elected a pharmacy E RA that is 21 days o r older, a llow the u ser to cre ate the sc ratchpad. ; 3c. If a n override exists, a llow the u ser to cre ate the sc ratchpad. ; 3d. If t he user ha s selected a medical ERA that has been r eceived wi thin 14 da ys, and th ere are ag ed,unposte d EFTs, an d there is no overri de, preven t user fro m entering scratchpa d ; 3e. If the user has select ed a pharm acy ERA th at has bee n received within 21 days,and there are aged,unpos ted EFTs, and there is no over ride, prev ent user f rom enteri ng scratch pad ;Do no t consider EFTs that are older than two months pri or to nati onal relea se. ; note : EFTs tha t designat ed to be a uto-posted to a rece ipt are in cluded in the search for aged, unposted EFTs ; Inp ut: ERADA - IEN in f ile 344.4 ; TYPE - M edical, Ph armacu or Tricare (" M","P" or "T") ; Ret urns: "1P" - Error f or aged, u nposted ph armacy EFT s ; "2P" - Warning f or aged,un posted pha rmacyl EFT s ; "3P" - Override exists for aged, unp osted phar macy EFTs ; "1M" - E rror for a ged, unpos ted medica l EFTs ; " 2M" - Warn ing for ag ed, unpost ed medical EFTs ; "3 M" - Overr ide exists for aged, unposted medical EF Ts ; "1T" - Error fo r aged, un posted Tri care EFTs ; "2T" - W arning for aged, unp osted Tric are EFTs ; "3T" - Ov erride exi sts for ag ed, unpost ed Tricare EFTs ; 0 - No error or warnin g conditio ns ; NOTE: Can be co mbinations - "1P" or "2P" or " 3P" or "1M " or "2M" or "3M" ; or "1P^1M" or "1P^2M " or "1P^3 M" or "2P^ 1M" or "2P ^2M" or ; "2P^3M" o r "3P^1M" or "3P^2M" or "3P^3M ", etc. ; ; 1. If th ere are un posted pay ments (EFT s) associa ted with t hird party Medical c laims more ; than 1 4 calendar days old, the syste m shall di splay a WA RNING mess age for ac tion ; Se lect ERA o n the ERA WORKLIST, and allow the user t o enter th e worklist . ; 2. If there are unposted p ayments (E FTs) assoc iated with Pharmacy claims mor e than 21 ; calendar days old, the syste m shall di splay a WA RNING mess age for ac tion Selec t ERA ; on the ERA W ORKLIST, a nd allow t o enter th e worklist . ; 3. If there are unposted p ayments (E FTs) assoc iated with third par ty Tricare claims mo re ; than 14 calend ar days ol d, the sys tem shall display a WARNING me ssage for action ; Select ERA on the ER A WORKLIST , and allo w the user to enter the workli st. ; 4. I f there ar e unposted payments (EFTs) ass ociated wi th third p arty medic al, pharma cy or ; tr icare clai ms, aged m ore than t he number of days sp ecified in site para meters, ; the system shall dis play an er ror messag e for acti on Select ERA on the ; EEOB W ORKLIST [R CDPE EDI L OCKBOX WOR KLIST]. ; additional condition s for item 3 below: ; 3a. If the user h as selecte d a medica l ERA that is 14 day s or older , allow th e user to ; create the scratc hpad. ; 3b . If the u ser has se lected a p harmacy ER A that is 21 days or older, al low the us er to ; cr eate the s cratchpad. ; 3c. If the user h as selecte d a Tricar e ERA that is 14 day s or older , allow th e user to ; create t he scratch pad. ; 3d. If an ove rride exis ts, allow the user t o create t he scratch pad. ; 3e. If the us er has sel ected a me dical ERA that has b een receiv ed within 14 days, a nd ; there are aged, unposted E FTs, and t here is no override, prevent u ser from e ntering ; scratchpad ; 3f. If the user h as selecte d a pharma cy ERA tha t has been received within 21 days,and ; there are aged,unpo sted EFTs, and there is no ove rride, pre vent user from enter ing ; scra tchpad ; 3 g. If the user has s elected a Tricare ER A that has been rece ived withi n 14 days, and ; ther e are aged ,unposted EFTs, and there is n o override , prevent user from entering ; scratchpa d ; Do not consider EFTs that are older than two m onths prio r to natio nal releas e. ; Note: EFTs that designate d to be au to-posted to a recei pt are inc luded in t he search ; for age d, unposte d EFTs | |
177 | N X,EFTDA ,UNPOST,EF T0,SELERAD T,STARTDT, DATE,RC344 4,RC34431 N DATE,EFT DA,EFT0,RC 3444,RC344 31,SELERAD T,UNPOST,X | |
178 | S UNPOST= 0 S RC3444 =^RCY(344. 4,ERADA,0) I '$P(RC3 444,U,5) D AEFTSQ Q ; ignore s elected ER As that ha ve ZERO pa yment S E FTDA=+$O(^ RCY(344.31 ,"AERA",ER ADA,0)) S: EFTDA RC34 431=^RCY(3 44.31,EFTD A,0) I 'EF TDA,$P(RC3 444,U,9)=2 D AEFTSQ Q ; ign ore select ed ERAs th at are MAT CHED TO PA PER CHECK ; ; Ignore selected ERAs that are UNMATC HED and ha ve an EXPE CTED PAYME NT CODE of "CHK" | |
179 | I 'EFTDA, $P(RC3444, U,15)="CHK " D AEFTSQ Q ;igno re selecte d ERAs tha t are UNMA TCHED and have an EX PECTED PAY MENT CODE of "CHK" ; ; Use the FILE DATE /TIME (344 .4, .07) o f the sele cted ERA w hen there isn't an a ssociated EFT ; (unm atched ERA ). Otherwi se use the DATE RECE IVED (344. 31,.13) of the EFT a ssociated with ; th e selected ERA | |
180 | I 'EFTDA S SELERADT =$P($P(RC3 444,U,7)," .") ; FILE DATE/TIME (344.4, . 07) of the selected ERA when t here isn't an associ ated EFT ( unmatched ERA) E S SELERADT=$ P(RC34431, U,13) ; DA TE RECEIVE D (344.31, .13) of th e EFT asso ciated wit h the sele cted ERA I TYPE="P" D G AEFT SQ . ; . ; If the se lected ERA is older than 21 da ys, quit d eterminati on and all ow user to . ; ente r scratchp ad with se lected ERA | |
181 | . I $$FMD IFF^XLFDT( DT,SELERAD T)>21 S UN POST=0 Q ;the sele cted ERA i s older th an 21 days , quit det ermination and allow user to e nter scrat chpad with selected ERA . ; . ; Selected ERA was r eceived le ss than 21 days ago; gather an y unposted , aged EFT s | |
182 | . S UNPOS T=$$GETEFT S(TYPE) ; selected E RA was rec eived less than 21 d ays ago; g ather any unposted, aged EFTs I TYPE="M" D . ; . ; If the se lected ERA is older than 14 da ys, quit d eterminati on and all ow user to . ; enter scratchpa d with sel ected ERA | |
183 | . I $$FMD IFF^XLFDT( DT,SELERAD T)>14 S UN POST=0 Q ;the sele cted ERA i s older th an 14 days , quit det ermination and allow user to e nter scrat chpad with selected ERA . ; . ; Selected ERA was r eceived le ss than 14 days ago; gather an y unposted , aged EFT s | |
184 | . S UNPOS T=$$GETEFT S(TYPE) ; selected E RA was rec eived less than 14 d ays ago; g ather any unposted, aged EFTsA EFTSQ ; Q UNPOST ;G ETEFTS(TYP E,OPTION) ; EP from RCDPEUPO f or Unposte d EFT Over ride optio n ; Set up search cr iteria for unposted EFTs; if a ged, unpos ted EFTs e xist then generate w arning/pre vention me ssages ; I nput ; TYP E = "M" (m edical ERA -EFT); "P" (phamacy ERA-EFT); "B" (both pharmacy a nd medical ) ; OPTION = if = nu ll or unde fined then Select ER A action o n the ERA Worklist c alled this function ; if = 1 t hen Overri de option called thi s function ; Output - See outp ut for AGE DEFS ; Inp ut: TYPE - "M" (Medi cal ERA-EF T); ; "P" (Phamacy ERA-EFT) ; "T" (Tric are ERA-EF T) ; "A" ( Medical, P harmacy an d Tricare) ; OPTION - "" or un defined th en - Calle d by Selec t ERA acti on on the ERA Workli st ; 1 - C alled by R CDPE UNPOS TED EFT OV ERRIDE opt ion ; Retu rns: See o utput for AGEDEFS | |
185 | ; N OVERR IDE,DAYSLI MIT,OUTCOM E,TRARRY,A RRAY,STR,X ,DTARRYN A RRAY,DAYSL IMIT,DTARR Y,OUTCOME, OVERRIDE,S TARTDT,STR ,TRARRY,X | |
186 | S OPTION= $G(OPTION) I TYPE="B " S DAYSLI MT("M")=$$ GET1^DIQ(3 44.61,1,.0 6),DAYSLIM T("P")=$$G ET1^DIQ(34 4.61,1,.07 ) ; both m edical and pharmacy EFTs need to be eval uated E S DAYSLIMT( TYPE)=$$GE T1^DIQ(344 .61,1,$S(T YPE="M":.0 6,1:.07)) ; number o f days an EFT can ag e before p ost preven tion rules apply I T YPE="A" D ; Retrieve Medical, Pharmacy a nd Tricare limits . S DAYSLIMT ("M")=$$GE T1^DIQ(344 .61,1,.06) ; Medical Aged Days limit . S DAYSLIMT( "P")=$$GET 1^DIQ(344. 61,1,.07) ; Pharmacy Aged Days limit . S DAYSLIMT ("T")=$$GE T1^DIQ(344 .61,1,.13) ; Tricare Aged Days limit E D ; Retriev e Aged Day s limit fo r specifie d type . S DAYSLIMT( TYPE)=$$GE T1^DIQ(344 .61,1,$S(T YPE="M":.0 6,TYPE="M" :.07,1:.13 )) | |
187 | S STARTDT =$$CUTOFF D EFTDET(S TARTDT,TYP E,.DAYSLIM T,.TRARRY) ; aged un posted EFT s exist; g enerate pr evention m essage and if this w as called within Wor klist (and not Overr ide option ) then gen erate msg with list of TRACE # s F X="P", "M" I $D(T RARRY("ERR OR",X)) D . D CHECK^ RCDPEUPO(X ,.OVERRIDE ) ; determ ine if Ove rride exis ts . I OVE RRIDE S OU TCOME=$G(O UTCOME)_3_ X_U . E S OUTCOME=$ G(OUTCOME) _1_X_U . K TRARRY("W ARNING",X) ; Error m essage sup ersede war ning messa ge. No nee d to displ ay warning msg if er ror condit ion exists . Q:OPTIO N Q:OVERR IDE . M AR RAY=TRARRY ("ERROR",X ) . D FTRA CE(.ARRAY, .STR),PREV MSG(X,.DAY SLIMT,.STR ) . K ARRA Y ; ; Aged unposted EFTs exist . Generate preventio n message and if thi s was call ed within ; the Work list (and not Overri de option) then gene rate msg w ith list o f TRACE #s F X="M"," P","T" D . I $D(TRAR RY("ERROR" ,X)) D . . D CHECK^R CDPEUPO(X, .OVERRIDE) ; Determi ne if Over ride exist s . . I OV ERRIDE S O UTCOME=$G( OUTCOME)_3 _X_U . . E S OUTCOM E=$G(OUTCO ME)_1_X_U . . ; . . ; Error me ssage supe rsedes war ning messa ge. No nee d to displ ay warning msg . . ; if error condition exists . . K TRARRY( "WARNING", X) . . Q:O PTION Q:O VERRIDE . . M ARRAY= TRARRY("ER ROR",X) . . D FTRACE (.ARRAY,.S TR),PREVMS G(X,.DAYSL IMT,.STR) . . K ARRA Y ; | |
188 | F X="P"," M" I $D(TR ARRY("WARN ING",X)) D . S OUTCO ME=$G(OUTC OME)_2_X_U . Q:OPTIO N ; funct ion was ca lled by th e OVERRIDE option; d on't need to display list of t race numbe rs . M ARR AY=TRARRY( "WARNING", X) . D FTR ACE(.ARRAY ,.STR),WAR NMSG(X,.ST R) . K ARR AY ; aged unposted E FTs > 21 d ays exist; generate warning me ssage F X= "M","P","T " D . I $D (TRARRY("W ARNING",X) ) D . . S OUTCOME=$G (OUTCOME)_ 2_X_U . . ; . . ; Ca lled by th e OVERRIDE option, d on't need to display list of t race numbe rs . . Q:O PTION . . M ARRAY=TR ARRY("WARN ING",X) . . D FTRACE (.ARRAY,.S TR),WARNMS G(X,.STR) . . K ARRA Y ; aged u nposted EF Ts > 21 da ys exist; generate w arning mes sage ; | |
189 | S:'$D(OUT COME) OUTC OME=0 ; er ror or war ning condi tions do n ot existGE TSQ ; Q OU TCOME ;CUT OFF() ; Ge t the EFT cut-off da te ; EFT c ut-off dat e represen ts 2 month s prior to install d ate of pat ch 298 (ig nore EFTS that are a ged older than the 2 month pri or date) N RCX,DATE ; Input: N one ; Retu rns: EFT C ut-off dat e ; EFT cu t-off date represent s 2 months prior to install da te of patc h 298 ; (i gnore EFTS that are aged older than the 2 month pr ior date) N DATE,RCX | |
190 | S RCX=+$P ($G(^RCY(3 44.61,1,0) ),U,9) S:R CX=0 RCX=D T S DATE=$ $FMADD^XLF DT(RCX,-61 ,0,0) Q DA TE ;EFTDET (RECVDT,TY PE,DAYSLIM T,TRARRY) ; gather E FT data ; only colle ct EFTs th at meet th e requirem ents of ag ed and unp osted ; ; input - RE CVDT = dat e to start $ORDER th rough the DATE RECEI VED cross- reference of 344.3 ; TYPE = "M " (medical ERA-EFT); "P" (pham acy ERA-EF T); "B" (b oth pharma cy and med ical) ; DA YSLIMT = n umber of d ays an EFT can age b efore post preventio n rules ap ply ; TRAR RY = passe d by refer ence, arra y to hold trace numb ers that r epresent t he aged, u nposted EF Ts ; ; ou tput - TRA RRY = arra y of trace numbers t hat need t o be repor ted as age d and unpo sted | |
191 | ; Only co llect EFTs that meet the requi rements of aged and unposted ; Input: RE CVDT - Dat e to start $ORDER th rough the DATE RECEI VED cross- reference ; of 344.3 ; TYPE - "M" - (Med ical ERA-E FT) ; "P" - (Phamacy ERA-EFT) ; "T" - (T ricare ERA -EFT) ; "A " - (Medic al, Pharma cy and Tri care) ; DA YSLIMT - N umber of d ays an EFT can age b efore post preventio n rules ap ply ; Outp ut: TRARRY - Array t o hold tra ce numbers that repr esent the aged, unpo sted EFTs ; N EFTDA S EFTDA=" " F S REC VDT=$O(^RC Y(344.31," ADR",RECVD T)) Q:'REC VDT F S EFTDA=$O(^ RCY(344.31 ,"ADR",REC VDT,EFTDA) ) Q:'EFTDA D CHKEFT (RECVDT,EF TDA,TYPE,. DAYSLIMT,. TRARRY) F D Q:'REC VDT . S RE CVDT=$O(^R CY(344.31, "ADR",RECV DT)) . Q:' RECVDT . S EFTDA="" . F D Q: EFTDA="" . . S EFTDA =$O(^RCY(3 44.31,"ADR ",RECVDT,E FTDA)) . . Q:'EFTDA . . D CHKE FT(RECVDT, EFTDA,TYPE ,.DAYSLIMT ,.TRARRY) | |
192 | Q ;CHKEFT (RECVDT,EF TDA,TYPE,D AYSLIMT,TR ARRY) ; Ch eck an ind ividual EF T for warn ings/error s ; Input: ; RECVDT: Date Rece ived ; EFT DA: IEN of EDI THIRD PARY EFT DETAIL ; T YPE = "M" (medical E RA-EFT); " P" (phamac y ERA-EFT) ; "B" (bot h pharmacy and medic al) ; DAYS LIMT = num ber of day s an EFT c an age bef ore post p revention rules appl y ; TRARR Y: Array w ith warnin g error in fo ; Input : RECVDT - Date Rece ived ; EFT DA - IEN o f EDI THIR D PARY EFT DETAIL ; TYPE - "M" - (Medica l ERA-EFT) ; "P" - ( Phamacy ER A-EFT) ; " T" - (Tric are ERA-EF T) ; "A" - (Medical, Pharmacy and Tricar e) ; DAYSL IMT - Numb er of days an EFT ca n age befo re post pr evention r ules apply ; TRARRY - Array w ith warnin g error in fo | |
193 | ; N EFT0, ERAREC,MST ATUS,AGED, TRACE S EF T0=$G(^RCY (344.31,EF TDA,0)) Q: EFT0="" ; Ignore if no data Q :+$P(EFT0, U,7)=0 ; I gnore zero payment a mts N AGED ,ERAREC,MS TATUS,TRAC E Q:$G(^RC Y(344.31,E FTDA,0))=" " ; Ignore if no data Q :+$$GET1^D IQ(344.31, EFTDA_",", .07,"I")=0 ; Ignore zero payme nt amts ; ; Ignore d uplicate E FTs which have been removed | |
194 | I $P($G(^ RCY(344.31 ,EFTDA,3)) ,U,2)]"" Q ; Ignore duplicate EFTs whic h have bee n removed S ERAREC= +$P(EFT0,U ,10) ; ERA RECORD (3 44.31, .1) pointer t o ERA reco rd I ERARE C,$P($G(^R CY(344.4,E RAREC,0)), U,14)=1 Q ; DETAIL POST STATU S (344.4, .14); igno re posted ERA-EFTs I 'ERAREC, $P($G(^RCY (344.31,EF TDA,0)),U, 8) Q:$$PRO C(EFTDA) ; Exclude EF T matched to Paper E OB if rece ipt is pro cessed S M STATUS=+$P (EFT0,U,8) ; MATCH S TATUS (344 .31,, .08) S AGED=$$ FMDIFF^XLF DT(DT,RECV DT) ; get aged numbe r of days of the EFT S TRACE=$ P(EFT0,U,4 ) ; TRACE # (344.31, .04) S ER AREC=+$$GE T1^DIQ(344 .31,EFTDA_ ",",.1,"I" ) ; Pointe r to ERA r ecord I ER AREC,$$GET 1^DIQ(344. 4,ERAREC_" ,",.14,"I" )=1 Q ; Ig nore poste d ERA-EFTs ; ; Excl ude EFT ma tched to P aper EOB i f receipt is process ed I 'ERAR EC,$$GET1^ DIQ(344.31 ,EFTDA_"," ,.08,"I") Q:$$PROC(E FTDA) S MS TATUS=+$$G ET1^DIQ(34 4.31,EFTDA _",",.08," I") ; MATC H STATUS S AGED=$$FM DIFF^XLFDT (DT,RECVDT ) ; Get ag ed number of days of the EFT S TRACE=$$G ET1^DIQ(34 4.31,EFTDA _",",.04," I") ; TRAC E # | |
195 | I (TYPE=" A")!(TYPE= "P"),$$PHA RM(ERAREC) D . I AGE D>DAYSLIMT ("P") S TR ARRY("ERRO R","P",TRA CE)="ERA = "_ERAREC_ U_MSTATUS Q ; aged unposted EFT that g enerates t he error m essage and will prev ent user f rom enteri ng the scr atchpad wi th the sel ected ERA . ; . ; Ag ed unposte d EFT that generates the error message a nd will pr event user from . ; entering t he scratch pad with t he selecte d ERA . I AGED>DAYSL IMT("P") D Q . . S TRARRY("ER ROR","P",T RACE)="ERA = "_ERARE C_U_MSTATU S | |
196 | . I '$D(T RARRY("ERR OR")),AGED >21 S TRAR RY("WARNIN G","P",TRA CE)="ERA = "_ERAREC_ U_MSTATUS ;aged un posted PHA RMACY EFT that will generate a warning m essage whe n entering the scrat chpad with the selec ted ERA . ; . ; Aged unposted PHARMACY E FT that wi ll generat e a warnin g message when enter ing . ; th e scratchp ad with th e selected ERA . I ' $D(TRARRY( "ERROR")), AGED>21 D . . S TRAR RY("WARNIN G","P",TRA CE)="ERA = "_ERAREC_ U_MSTATUS | |
197 | I (TYPE=" A")!(TYPE= "M"),'$$PH ARM(ERAREC ) D . I AG ED>DAYSLIM T("M") S T RARRY("ERR OR","M",TR ACE)="ERA = "_ERAREC _U_MSTATUS Q ; aged unposted EFT that g enerates t he error m essage and will prev ent user f rom enteri ng the scr atchpad wi th the sel ected ERA . I '$D(TR ARRY("ERRO R")),AGED> 14 S TRARR Y("WARNING ","M",TRAC E)="ERA = "_ERAREC_U _MSTATUS ;aged unpo sted MEDIC AL EFT tha t will gen erate a wa rning mess age when e ntering th e scratchp ad with th e selected ERA . ; . ; Aged un posted EFT that gene rates the error mess age and wi ll prevent user from . ; enter ing the sc ratchpad w ith the se lected ERA . I AGED> DAYSLIMT(" M") D Q . . S TRARR Y("ERROR", "M",TRACE) ="ERA = "_ ERAREC_U_M STATUS Q . ; . ; Age d unposted MEDICAL E FT that wi ll generat e a warnin g message when enter ing . ; th e scratchp ad with th e selected ERA . I ' $D(TRARRY( "ERROR")), AGED>14 D . . S TRAR RY("WARNIN G","M",TRA CE)="ERA = "_ERAREC_ U_MSTATUS ; I (TYPE= "A")!(TYPE ="T"),$$PH ARM(ERAREC ,1)=2 D . ; . ; Aged unposted EFT that g enerates t he error m essage and will prev ent user f rom . ; en tering the scratchpa d with the selected ERA . I AG ED>DAYSLIM T("T") D Q . . S TR ARRY("ERRO R","T",TRA CE)="ERA = "_ERAREC_ U_MSTATUS . ; . ; Ag ed unposte d MEDICAL EFT that w ill genera te a warni ng message when ente ring . ; t he scratch pad with t he selecte d ERA . I '$D(TRARRY ("ERROR")) ,AGED>14 D . . S TRA RRY("WARNI NG","T",TR ACE)="ERA = "_ERAREC _U_MSTATUS | |
198 | Q ;PROC(E FTDA) ; Ch eck if TR Receipt fo r an EFT l inked to P aper EOB i s processe d ; Input - EFT IEN ; Output - Boolean (Returns 1 if TR rec eipt exist s and is O PEN, other wise retur ns 0) ; ; Input: EFT DA - IEN f or file 34 4.31 ; Ret urns: 1 if TR receip t exists a nd is OPEN , 0 otherw ise | |
199 | ;Find TR receipt an d check if it does n ot have a status of CLOSED N I EN344,RET S IEN344=$ O(^RCY(344 ,"AEFT",EF TDA,0)) I IEN344 S:$ P($G(^RCY( 344,IEN344 ,0)),U,14) '=1 RET=1 N IEN344,R ET ; ; Fin d TR recei pt and che ck if it d oes not ha ve a statu s of CLOSE D S IEN344 =$O(^RCY(3 44,"AEFT", EFTDA,0)) I IEN344,$ $GET1^DIQ( 344,IEN344 _",",.14," I")'=1 S R ET=1 Q +$G (RET) N IE N344,RET ; ; Find TR receipt a nd check i f it does not have a status of CLOSED S IEN344=$O( ^RCY(344," AEFT",EFTD A,0)) I IE N344,$$GET 1^DIQ(344, IEN344_"," ,.14,"I")' =1 S RET=1 | |
200 | Q +$G(RET ) | |
201 | ;FTRACE(T RARRY,STR) ; Input a rray needs to be for matted as a string o f trace #s each | |
202 | displayed in the wa rning or e rror messa ge ; input - TRARRY = passed b y referenc e, array o f trace nu mbers that represent the aged, unposted EFTs ; STR = passed by referen ce, empty array that will be p opulated w ith trace numbers ; ; output - STR = re constructe d array of trace num bers ; se parated by commas to be displa yed in the warning o r error me ssage ; In put: TRARR Y - Array of trace n umbers tha t represen t the aged , unposted EFTs ; ST R - Empty array that will be p opulated w ith trace numbers ; Output: ST R - Recons tructed ar ray of tra ce numbers | |
203 | ; ; fixed code foll ows N CTR, LEN,TRACE, X K STR ; array ret urned S CT R=1,TRACE= "" F S TR ACE=$O(TRA RRY(TRACE) ) Q:TRACE= "" D . S STR(CTR)=$ G(STR(CTR) ) ; initia lize . I $ L(STR(CTR) )+$L(TRACE )>77 S CTR =CTR+1,STR (CTR)=TRAC E Q . S ST R(CTR)=STR (CTR)_$S(S TR(CTR)]"" :",",1:"") _TRACE ; add comma if needed Q ;WARNMS G(TYPE,STR ) ; Displa y warning message wh en aged, u nposted EF Ts exist ; ; input - TYPE = "P " (pharmac y); "M" (m edical) ; STR = popu lated arra y where ea ch subscrp t contains a string of trace n umbers in "trace#, t race#," fo rmat ; pas sed by ref erence ; Input: TYP E -"M" - M edical, "P " - Pharma cy or "T" - Tricare ; STR - Ar ray where each subsc rpt contai ns a strin g of trace numbers i n ; "trac e#, trace# ," format | |
204 | ; N DIR, LN,X,Y S L N=5,X=0 S DIR(0)="EA " S DIR("A ",1)="WARN ING: Unpos ted "_$S(T YPE="P":"p harmacy ", 1:"medical ")_"EFTs exist that are more than "_$S( TYPE="P":2 1,1:14)_" days old." S DIR("A" ,2)=" " ; blank lin e S DIR("A ",3)="Post the older payments first. The EFTs may be unmatch ed or matc hed." S DI R("A",4)=" Trace numb er(s) asso ciated wit h unposted EFTs:" F S X=$O(ST R(X)) Q:'X S DIR("A ",LN)=STR( X),LN=LN+1 S DIR("A" ,LN)=" " ; blank li ne S DIR(" A")="Press ENTER to continue: " W ! D ^D IR S DIR(" A")="Press ENTER to continue: " W ! D ^D IR | |
205 | Q ;PREVMS G(TYPE,DAY S,STR) ; D isplay Err or message when aged , unposted EFTs exis t ; ; inpu t - TYPE = "P" (phar macy); "M" (medical) ; DAYS = number of days an EF T can age before pos t preventi on rules a pply ; STR = passed by referen ce, name o f array th at will re turn refor matted arr ay of trac e numbers ; ; outpu t - STR = populated array wher e each sub scrpt cont ains a str ing of tra ce numbers in "trace #, trace#, " format ; Input: T YPE - "M" - Medical, "P" - Pha rmacy or " T" - Trica re ; DAYS - Number o f days an EFT can ag e before p ost preven tion rules apply ; S TR - Array that will return re formatted array of t race numbe rs ; Outpu t: STR - A rray where each subs crpt conta ins a stri ng of trac e numbers in ; "tra ce#, trace #," format | |
206 | ; N DIR,L N,X,Y S LN =6,X=0 S D IR(0)="EA" S DIR("A" ,1)="ERROR : Unposted "_$S(TYPE ="P":"Phar macy ",1:" Medical ") _"EFTs exi st that ar e more tha n "_$S(TYP E="P":DAYS ("P"),1:DA YS("M"))_" days old. Scratchpa d" S DIR(" A",2)="cre ation is n ot allowed for newer payments. Post olde r payments first." S DIR("A",3 )="The EFT s may be m atched or unmatched. " S DIR("A ",4)=" " ; blank li ne S DIR(" A",5)="Tra ce number( s) associa ted with u nposted EF Ts:" F S X=$O(STR(X )) Q:'X S DIR("A",L N)=" "_STR (X),LN=LN+ 1 S DIR("A ",LN)=" " ; blank l ine S DIR( "A")="Pres s ENTER to continue: " W ! D ^ DIR S DIR( "A")="Pres s ENTER to continue: " W ! D ^ DIR | |
207 | Q ;EXCDEN Y ; praca* 4.5*298 di splay acce ss denied message fo r those ER As that ar e selected off the E RA Worklis t and have exception s ; PRCA* 4.5*304 - undeclared parameter s (from WL ^RCDPEWL7) : RCERA an d RCEXC N DIR,Y,RCD WLIEN,X,Y, DTOUT,DUOU T,DIRUT,DI ROUTN DIR, DIROUT,DIR UT,DTOUT,D UOUT,RCDWL IEN,X,Y | |
208 | S DIR(0)= "YA" S DIR ("A",1)="A CCESS DENI ED: Scratc hpad creat ion is not allowed w hen third party" S D IR("A",2)= "medical e xceptions exist. Fix Transmiss ion Except ions first and then Data" S DI R("A",3)=" Exceptions with the EXE EDI Lo ckbox 3rd Party Exce ptions opt ion which is" S DIR( "A",4)="lo cated on t he EDI Loc kbox Main Menu." S D IR("A",5)= "" ;PRCA*4 .5*304 - A llow users to go and fix excep tions S DI R("A")="Do you want to begin c learing Ex ceptions f or this ER A (Y/N)?: " S DIR("B ")="Y" W ! D ^DIR ; ;PRCA*4.5* 304 - allo w jump to work on Ex ceptions ; If they wi sh to work on the ex ceptions, send the n ecessary d ata, defau lt the pay er range t o ALL (for now) I Y= 1 D S:$G( RCMBG)'="" VALMBG=RC MBG S:$G(R CDWLIEN)'= "" RCERA=R CDWLIEN S RCEXC=1 K RCMBG ; VA LMBCK="R" . S RCMBG =$G(VALMBG ) . S RCDW LIEN=RCERA . D EN^RC DPEX1 Q ;E XCWARN(ERA DA) ; prca *4.5*298 g enerate wa rning when exception exists ; ; input - ERADA = I nternal En try Number in file 3 44.4 ; out put - WARN ING MESSAG E if excep tion exist s on the E RA ; ; In put: ERADA - Interna l Entry Nu mber in fi le 344.4 ; Output: W ARNING MES SAGE if ex ception ex ists on th e ERA | |
209 | ; Q:$$PHA RM(ERADA) ; ignore p harmacy ER As Q:$$XCE PT(ERADA)= "" ; exce ption does not exist N DIR S D IR(0)="EA" S DIR("A" ,1)="WARNI NG: Fix Tr ansmission Exception s first an d then Dat a Exceptio ns via" S DIR("A",2) ="the EXE EDI Lockbo x 3rd Part y Exceptio ns option which is l ocated on the" S DIR ("A",3)="E DI Lockbox Main Menu ." S DIR(" A",4)=" " S DIR("A") ="Press EN TER to con tinue: " W ! D ^DIR S DIR("A") ="Press EN TER to con tinue: " W ! D ^DIR | |
210 | Q ;XCEPT( ERADA) ; p rca*4.5*29 8 return E RA excepti on state ; ; input - ERADA = Internal E ntry Numbe r in file 344.4 ; ou tput - "x" or "" ; " x" = excep tion exist s for at l east one o f the clai ms in the ERA ; Inpu t: ERADA - Internal Entry Numb er in file 344.4 ; R eturns: "x " or "" ; "x" - Exce ption exis ts for at least one of the cla ims in the ERA | |
211 | ; N RES S RES=$S($D (^RCY(344. 4,"AEXC",1 ,ERADA)):" x",$D(^RCY (344.4,"AE XC",2,ERAD A)):"x",$D (^RCY(344. 4,"AEXC",9 9,ERADA)): "ERADA",1: "") Q RES ;PHARM(X1, TCHK) ; pr ca*4.5*298 determine if pharma cy ERA ; ; input - X 1 = Intern al Entry N umber in f ile 344.4 ; output - 1 or 0 ; 1 = pharma cy ERA ; 0 = non-pha rmacy ERA ; Input: X 1 - Intern al Entry N umber in f ile 344.4 ; TCHK - 1 to check if Tricare , 0 otherw ise ; Retu rns: 1 - P harmacy ER A ; 2 - Tr icare ErA ; 0 - Non- pharmacy E RA | |
212 | ; N PNAM ,PTIN S:'$ D(TCHK) TC HK=0 I TCH K D Q:$$P AYTYPE^RCD PEU1(PNAM, PTIN,"P") 2 . S PNAM =$$GET1^DI Q(344.4,X1 _",",.06," I") ; Paye r Name . S PTIN=$$GE T1^DIQ(344 .4,X1_",", .06,"I") ; Payer TIN | |
213 | Q $S($D(^ RCY(344.4, X1,1,"ECME ")):1,1:0) ;GETPHARM (PRCAIEN,R CARRY) ;pr ca*4.5*298 return ph armacy dat a to show on EEOB it ems in scr atchpad ; ; input - PRCAIEN = ien to re cord in 43 0 ; RCARRY = Array n ame that w ill be use d to store and retur n pharmacy data elem ents ; out put - RCAR RY = holds pharmacy data ; In put: PRCAI EN - IEN t o record i n 430 ; RC ARRY - Arr ay name th at will be used to s tore and r eturn phar macy data elements ; Output: R CARRY - ho lds pharma cy data | |
214 | ; IA 6033 (controll ed subscri ption) - r ead access of file 3 62.4. stat us is pend ing ; ICR 1878 (supp orted) - u sage of EN ^PSOORDER ; N RC0,RX DATA,RXIEN ,RCDFN,RXF ILL K RCAR RY Q:PRCAI EN="" S RC DFN=$P(^PR CA(430,PRC AIEN,0),U, 7) S RC0=+ $O(^IBA(36 2.4,"C",PR CAIEN,0)) Q:RC0=0 S RXDATA=$G( ^IBA(362.4 ,RC0,0)) S RCARRY("D OS")=$$FMT E^XLFDT($P (RXDATA,U, 3),"2Z") S RCARRY("F ILL")=+$P( RXDATA,U,1 0) ; rx fi ll# S RXIE N=+$P(RXDA TA,U,5) ; RX ien ptr file 52 D EN^PSOORD ER(RCDFN,R XIEN) S RC ARRY("RX") =$P(^TMP(" PSOR",$J,R XIEN,0),U, 5) I RCARR Y("FILL")= 0 S RCARRY ("RELEASED STATUS")= $S($P(^TMP ("PSOR",$J ,RXIEN,0), U,13)]"":" Released", 1:"Not Rel eased") ; determine release st atus from Rx on the first fill (no refil ls) I RCAR RY("FILL") >0 S RCARR Y("RELEASE D STATUS") =$S($P($G( ^TMP("PSOR ",$J,RXIEN ,"REF",RCA RRY("FILL" ),0)),U,8) ]"":"Relea sed",1:"No t Released ") ; ; det ermine rel ease statu s from Rx refill # ; PRCA319 ad d $G() Q ; CV ; Chang e View act ion for ER A Worklist D FULL^VA LM1 D PARA MS^RCDPEWL 0("CV") D HDR^RCDPEW L7,INIT^RC DPEWL7 S V ALMBCK="R" ,VALMBG=1 D FULL^VAL M1 D PARAM S^RCDPEWL0 ("CV") D H DR^RCDPEWL 7,INIT^RCD PEWL7 S VA LMBCK="R", VALMBG=1 | |
215 | Q ;NOEDIT ; Display no edit a llowed sel ected ERA is designa ted for au to-posting N DIR S D IR(0)="EA" ,DIR("A",1 )="This ac tion is no t availabl e for Auto -Posted ER As." S DIR ("A")="Pre ss ENTER t o continue : " W ! D ^DIR K DIR W ! Q ;VR (ERADA) ; handling o f auto-pos ted ERAs ; entry poi nt for the Look at R eceipt pro tocol for standard W orklist; ; ; input - ERADA = ien from f ile 344.49 (and 344. 4) ; N RCD A,RCZ,RCZ0 ,EEOBREC D SEL^RCDPE WL(.RCDA) ; select a n EEOB off the scrat chpad S RC Z=+$O(RCDA (0)),RCZ=+ $G(RCDA(RC Z)) Q:'RCZ S RCZ0=$G (^RCY(344. 49,ERADA,1 ,RCZ,0)) S EEOBREC=$ P($G(^RCY( 344.4,ERAD A,1,+$P(RC Z0,U,9),4) ),U,3) I E EOBREC']"" D NOVIEW Q D EN^VA LM("RCDPE AUTO EOB R ECEIPT PRE VIEW") Q ; NOVIEW ; s elected EE OB cannot be viewed if no rece ipt number N DIR S D IR(0)="EA" ,DIR("A",1 )="THIS AC TION IS NO T AVAILABL E SINCE TH E EEOB HAS NOT BEEN AUTO-POSTE D." S DIR( "A")="Pres s ENTER to continue: " W ! D ^ DIR K DIR W ! Q ;INI T(ERADA,EE OBREC) ; L ist Templa te - RCDPE AUTO EOB RECEIPT PR EVIEW entr y point ; display EE OBs that h ave been p osted (rec eipt exist s) ; ; inp ut - ERADA = ien fro m file 344 .49 (and 3 44.4) ; EE OBREC = se lected EEO Bs receipt ; output - ^TMP("RC DPE_AP_EOB _PREVIEW", $J) N X,Z, Z1,Z10,Z0, Z2,RCZ N R CPT ; Dis play EEOBs that have been post ed (receip t exists) ; Input: E RADA - IEN from file 344.49 (a nd 344.4) ; EEOBREC - Selected EEOBs rec eipt ; Out put: ^TMP( "RCDPE_AP_ EOB_PREVIE W",$J) N R CPT,RCZ,XX ,Z,Z,Z0,Z1 ,Z2,Z10 | |
216 | K ^TMP("RC DPE_AP_EOB _PREVIEW", $J) S VALM CNT=0,VALM BG=1 S Z=0 F S Z=$O (^RCY(344. 49,ERADA,1 ,Z)) Q:'Z S Z0=$G(^ (Z,0)) D . I $P(Z0,U )\1=+Z0 S Z2=$P(Z0,U ,2) . S RC PT=+$P($G( ^RCY(344.4 ,ERADA,1,+ $P(Z0,U,9) ,4)),U,3), RCPT(RCPT) ="" ; rec eipt array . I $P($P (Z0,U),"." ,2),$D(RCP T(EEOBREC) ) D ; if the EEOB has same r eceipt# ha s the sele cted EEOB then it ca n be liste d on the p review scr een .. S:$ P(Z0,U,2)= "" $P(Z0,U ,2)=Z2 .. S RCZ=$S(+ $P(Z0,U,6) =0:0,+$P(Z 0,U,6)<0:- 1,$P(Z0,U, 7):1,1:2) .. S RCZ(R CZ,Z)=Z0 . . K RCPT . . S Z1=0 F S Z1=$O( ^RCY(344.4 9,ERADA,1, Z,1,Z1)) Q :'Z1 S Z1 0=$G(^(Z1, 0)) D ... I $P(Z10,U ,5)=1 S RC Z(RCZ,Z,"A DJ",Z1)="D ec adj $"_ $J(0-$P(Z1 0,U,3),"", 2)_" pendi ng - ",RCZ (RCZ,Z,"AD J",Z1,1)=$ J("",4)_$P (Z10,U,9) F RCZ=1,2, 0,-1 D . Q :'$D(RCZ(R CZ)) . I R CZ=1 D SET ("PAYMENTS (LINES FO R RECEIPT) :") . I RC Z=0,VALMCN T>0 D SET( " ") D SET ("ZERO DOL LAR PAYMEN TS:") . I RCZ=-1,VAL MCNT>0 D S ET(" ") D SET("LINES WITH NEGA TIVE BALAN CES STILL NEEDING TO BE DISTRI BUTED:") . S Z=0 F S Z=$O(RCZ (RCZ,Z)) Q :'Z S Z0= RCZ(RCZ,Z) D .. S X= "" .. S X= $$SETFLD^V ALM1($P(Z0 ,U),X,"LIN E #") .. S X=$$SETFL D^VALM1($S ($P(Z0,U,7 ):$$BN1^PR CAFN($P(Z0 ,U,7)),1:$ S(RCZ=0:"" ,1:"[SUSPE NSE]")_$S( $P(Z0,U,2) ["**ADJ"&' $P($P(Z0,U ,2),"ADJ", 2):"TOTALS MISMATCH ADJ",1:$P( Z0,U,2))), X,"ACCOUNT ") .. S X= $$SETFLD^V ALM1($J(+$ P(Z0,U,6), "",2),X,"A MOUNT") .. D SET(X) .. S Z1=0 F S Z1=$O (RCZ(RCZ,Z ,"ADJ",Z1) ) Q:'Z1 D SET($J("" ,12)_$G(RC Z(RCZ,Z,"A DJ",Z1))) S Z2=0 F S Z2=$O(RC Z(RCZ,Z,"A DJ",Z1,Z2) ) Q:'Z2 D SET($J("" ,12)_$G(RC Z(RCZ,Z,"A DJ",Z1,Z2) )) Q ;SET( X) ; S VAL MCNT=VALMC NT+1 S ^TM P("RCDPE_A P_EOB_PREV IEW",$J,VA LMCNT,0)=X Q ;HDR ; D HDR^RCDP EWL Q ;FNL ; K ^TMP( "RCDPE_AP_ EOB_PREVIE W",$J) Q ; RCDPEWLP | |
217 | ||
218 | ||
219 | Routines | |
220 | Activities | |
221 | Routine Na me | |
222 | RCDPEUPO | |
223 | Enhancemen t Category | |
224 | New | |
225 | Modify | |
226 | Delete | |
227 | No Change | |
228 | RTM | |
229 | ||
230 | Related Op tions | |
231 | RCDPE UNPO STED EFT O VERRIDE | |
232 | ||
233 | Related Ro utines | |
234 | Routines “ Called By” | |
235 | Routines “ Called” | |
236 | ||
237 | N/A | |
238 | $$GETEF TS^RCDPEWL P | |
239 | ||
240 | ||
241 | Current Lo gic | |
242 | RCDPEUPO ; ALBANY/KML - Unposte d EFT Over ride ;Jun 06, 2014@1 9:11:19 ;; 4.5;Accoun ts Receiva ble;**298* *;Mar 20, 1995;Build 121 ;Per VA Directi ve 6402, t his routin e should n ot be modi fied. Q ; ; prca*4.5 *298 - pro cedures bu ilt to imp lement the Unposted EFT Overri de option ;EN ; Disp lay warnin g message when aged, unposted EFTs exist N MSG D O WNSKEY^XUS RB(.MSG,"R CDPE AGED PMT",DUZ) I 'MSG(0) D NOENTRY Q N AGEDEF TS S AGEDE FTS=$$GETE FTS^RCDPEW LP("B",1) ; need to examine bo th medical and pharm acy EFTs D DMSGS(AGE DEFTS) Q ; DMSGS(CODE S) ; displ ay warning /error mes sages (if any) ; ; I nput - COD ES = 1P - error cond ition for aged, unpo sted pharm acy EFTs ; = 2P - wa rning cond ition for aged,unpos ted medica l EFTs ; = 3P - Over ride exist s for aged , unposted pharmacy EFTs ; = 1 M - error condition for aged, unposted m edical EFT s ; = 2M - warning c ondition f or aged, u nposted me dical EFTs ; = 3M - Override e xists for aged, unpo sted medic al EFTs ; = 0 - ther e exist no error or warning co nditions ; possible values for CODES = " 1P" or "2P " or "3P" or "1M" or "2M" or " 3M" or "1P ^1M" or "1 P^2M" or" ; "1P^3M" or "2P^1M" or "2P^2M " or "2P^3 M" or "3P^ 1M" or "3P ^2M" or "3 P^3M" I 'C ODES D NON E Q N DAYS LIMT,DIR,E RROR,I,LN, MSGTXT,OVE RRIDE,STAT E,TYPE,X,Y S LN=3 S (OVERRIDE, ERROR)=0 S DIR("A",1 )="Current Warning a nd/or Erro r messages for Unpos ted EFTs:" S DIR("A" ,2)=" " F I=1:1 S ST ATE=$P(COD ES,U,I) Q: STATE="" D . I $E(S TATE,1)=1 D ; 1 = E RROR condi tion . . S ERROR=1,T YPE=$G(TYP E)_$E(STAT E,2) . . S DAYSLIMT= $$GET1^DIQ (344.61,1, $S($E(STAT E,2)="M":. 06,1:.07)) ; number of days an EFT can a ge before post preve ntion rule s apply . . S DIR("A ",LN)="ERR OR: Unpost ed "_$S($E (STATE,2)= "P":"pharm acy ",1:"m edical ")_ "EFTs exis t that are more than "_DAYSLIM T_" days o ld." S LN= LN+1 . . S DIR("A",L N)="Scratc hpad creat ion is not allowed f or newer p ayments." S LN=LN+1 . . S DIR( "A",LN)=" " S LN=LN+ 1 . I $E(S TATE,1)=2 D ; 2 = w arning con dition . . S DIR("A" ,LN)="WARN ING: Unpos ted "_$S($ E(STATE,2) ="P":"phar macy ",1:" medical ") _"EFTs exi st that ar e more tha n "_$S($E( STATE,2)=" P":21,1:14 )_" days o ld." S LN= LN+1 . . S DIR("A",L N)=" " S L N=LN+1 . I $E(STATE, 1)=3 D ;O VERRIDE co ndition . . S OVERRI DE=OVERRID E+1 . . S DIR("A",LN )="An Over ride for " _$S($E(STA TE,2)="P": "pharmacy ",1:"medic al ")_"is already in place." S LN=LN+1 . . S DIR(" A",LN)=" " I OVERRID E=2 S DIR( 0)="EA",DI R("A")="Pr ess ENTER to continu e: " D ^DI R Q I ERRO R D . M MS GTXT=DIR(" A") . S DI R(0)="YA", DIR("A",LN )="An over ride will allow unre stricted s cratchpad creation f or one day ." . S DIR ("A")="Do you want t o continue (Y/N)? " D ^DIR . Q :'Y . S OV ERRIDE=$$O VERRIDE(TY PE,.MSGTXT ) . I OVER RIDE D MAI L(.MSGTXT) I 'ERROR D . S DIR( 0)="EA",DI R("A",LN)= "There are no error conditions to overri de.",LN=LN +1 . S DIR ("A",LN)=" ",DIR("A" )="Press E NTER to co ntinue: " . D ^DIR Q ;OVERRIDE (TYPE,TEXT ) ; when E RROR state exists, p erform the Override ; ; Input - TYPE = " M" (medica l); "P" (p hamacy); " PM" or "MP "(aged, un posted EFT s exist fo r both med ical and p harmacy cl aims) ; TE XT = warni ng and/or error stat ements; pa ssed by re ference ; Output - D ONE = 1 - OVERRIDE w as perform ed; 0 - Ov erride was not perfo rmed ; TEX T = additi onal text to be disp layed with warning a nd/or erro r statemen ts; conten ts of TEXT array wil l be in th e body of the mail m essage ( r efer to MA IL tag) ; N DIR,DONE ,DTTM,RCDF DA,REASON, X1,Y,DUOUT ,DIRUT L + ^RCY(344.6 1,1,0):DIL OCKTM E D NOLOCK S DONE=0 G O VERQ S DON E=1 I TYPE ="P"!(TYPE ="M") D . S DIR(0)=" EA",DIR("A ",1)="An O verride no w exists f or posting "_$S(TYPE ="P":"phar macy ",1:" medical ") _"payments ." . S DIR ("A",2)=" " . S DIR( "A")="Pres s ENTER to continue: " . D ^DI R I TYPE=" PM"!(TYPE= "MP") D I 'DONE G O VERQ . S D IR(0)="SA^ M:Medical; P:Pharmacy ",DIR("A") ="Override for (M)ed ical or (P )harmacy? " . D ^DIR . I $D(DU OUT)!($D(D IRUT)) S D ONE=0 Q . S TYPE=Y W ! K DIR S DIR("A")= "Reason fo r Override : ",DIR(0) ="FA^1:50" D ^DIR I $D(DUOUT)! ($D(DIRUT) ) S DONE=0 W !!," Ne ed to ente r a reason for Overr ide.",!," Override n ot perform ed.",! G O VERQ S REA SON=Y,DTTM =$$NOW^XLF DT S RCDFD A(344.61," 1,",$S(TYP E="M":20,1 :21))=DTTM S RCDFDA( 344.61,"1, ",$S(TYPE= "M":22,1:2 3))=DUZ S RCDFDA(344 .61,"1,",$ S(TYPE="M" :24,1:25)) =REASON D FILE^DIE(" ","RCDFDA" ) S X1="" S X1=$O(TE XT(X1),-1) S X1=X1+1 S TEXT(X1 )=$S(TYPE= "M":"Medic al ",1:"Ph armacy ")_ "Override Details",X 1=X1+1 S T EXT(X1)="U ser: "_$P( $G(^VA(200 ,DUZ,0))," ^") S X1=X 1+1 S TEXT (X1)="Date /Time: "_D TTM S TEXT (X1)="Reas on for Ove rride: "_R EASONOVERQ ; L -^RCY (344.61,1, 0) Q DONE ;MAIL(TEXT ) ;generat e mail mes sage when OVERRIDE i s implemen ted ; ; i nput - TEX T = lines of text th at represe nt the bod y of the m ail messag e ; N ARRA Y,CNT,CNT1 ,GLB,RCPRO G1,SBJ,SUB S RCPROG1 ="RCDUPEO" ,GLB=$NA(^ TMP(RCPROG 1,$J,"XMTE XT")) ; ;B uild heade r S SUB="E FT" K @GLB S SBJ="ED I LBOX-STA # "_$P($$S ITE^VASITE ,"^",3)_"- Unposted E FTs Overri de "_$$FMT E^XLFDT($$ NOW^XLFDT) M @GLB=TE XT N XMDUZ ,XMINSTR,X MSUB,XMTEX T,XMY S XM DUZ=DUZ,XM TEXT=GLB,X MSUB=SBJ,X MY("I:G.RC DPE AUDIT" )="" S XMI NSTR("FROM ")="POSTMA STER" S XM INSTR("FLA GS")="P" D SENDMSG^X MXAPI(XMDU Z,XMSUB,XM TEXT,.XMY, .XMINSTR) Q ;CHECK(T YPE,OVERRI DE) ; dete rmine if o verride ex ists for t oday's dat e ; ; inp ut - TYPE = "M" for medical; " P" for Pha rmacy ; OV ERRIDE = p assed by r eference; array to h old the OV ERRIDE dat a ; output - OVERRID E = return ed array h olding exi sting OVER RIDE data K OVERRIDE S OVERRID E(TYPE)=+$ $GET1^DIQ( 344.61,1,$ S(TYPE="M" :20,1:21), "I") ; get MEDICAL E FT OVERRID E (344.61, 20) or PH ARMACY EFT OVERRIDE (344.61, 2 1) depende nt on type of EFTs I 'OVERRIDE (TYPE) K O VERRIDE(TY PE) S OVER RIDE=0 Q I $P(OVERRI DE(TYPE)," .")'=DT K OVERRIDE(T YPE) S OVE RRIDE=0 Q ; overrid e does not exist for 'TODAYS' date, post preventio n rules wi ll apply S OVERRIDE= 1 Q ;NONE ; the syst em does no t have any aged, unp osted EFTs N DIR S D IR(0)="EA" S DIR("A" ,1)="The s ytem does not have a ny aged, u nposted EF Ts." S DIR ("A",2)="T herefore, no error c onditions to overrid e." S DIR( "A",3)=" " S DIR("A" )="Press E NTER to co ntinue: " D ^DIR Q ; NOACTION ; OVERRIDE already ex ists N DIR S DIR(0)= "EA" S DIR ("A",1)="A n Override for "_$S( TYPE="P":" pharmacy " ,1:"medica l ")_"is a lready in place." S DIR("A",2) ="No actio n needed" S DIR("A", 3)=" " S D IR("A")="P ress ENTER to contin ue: " D ^D IR Q ;NOEN TRY ; user is not au thorized t o use the option N D IR S DIR(0 )="EA" S D IR("A",1)= "You are n ot authori zed to use this opti on." S DIR ("A",2)="T his option is locked with RCDP E AGED PMT key." S D IR("A",3)= " " S DIR( "A")="Pres s ENTER to continue: " D ^DIR Q ;NOLOCK ; entry at 344.61 ca nnot be lo cked N DIR S DIR(0)= "EA" S DIR ("A",1)="A nother use r is editi ng the Ove rride Para meters." S DIR("A",2 )="Try aga in later." S DIR("A" ,3)=" " S DIR("A")=" Press ENTE R to conti nue: " D ^ DIR Q ; | |
243 | ||
244 | Modified L ogic (Chan ges are in bold) | |
245 | RCDPEUPO ; ALBANY/KML - Unposte d EFT Over ride ;Jun 06, 2014@1 9:11:19 ;; 4.5;Accoun ts Receiva ble;**298* *;Mar 20, 1995;Build 121 ;Per VA Directi ve 6402, t his routin e should n ot be modi fied. Q ; ; prca*4.5 *298 - pro cedures bu ilt to imp lement the Unposted EFT Overri de option ;EN ; Disp lay warnin g message when aged, unposted EFTs exist N MSG D O WNSKEY^XUS RB(.MSG,"R CDPE AGED PMT",DUZ) I 'MSG(0) D NOENTRY Q N AGEDEF TS S AGEDE FTS=$$GETE FTS^RCDPEW LP("A",1) ; need to examine Me dical, pha rmacy and Tricare EF Ts D DMSGS (AGEDEFTS) Q ;DMSGS( CODES) ; d isplay war ning/error messages (if any) ; ; Input - CODES = 1 P - error condition for aged, unposted p harmacy EF Ts ; = 2P - warning condition for aged,u nposted me dical EFTs ; = 3P - Override e xists for aged, unpo sted pharm acy EFTs ; = 1M - er ror condit ion for ag ed, unpost ed medical EFTs ; = 2M - warni ng conditi on for age d, unposte d medical EFTs ; = 3 M - Overri de exists for aged, unposted m edical EFT s ; = 0 - there exis t no error or warnin g conditio ns ; possi ble values for CODES = "1P" or "2P" or " 3P" or "1M " or "2M" or "3M" or "1P^1M" o r "1P^2M" or" ; "1P^ 3M" or "2P ^1M" or "2 P^2M" or " 2P^3M" or "3P^1M" or "3P^2M" o r "3P^3M" ; Input: C ODES - 1P - error co ndition fo r aged, un posted Pha rmacy EFTs ; 2P - wa rning cond ition for aged,unpos ted Pharma cy EFTs ; 3P - Overr ide exists for aged, unposted pharmacy E FTs ; 1M - error con dition for aged, unp osted Medi cal EFTs ; 2M - warn ing condit ion for ag ed, unpost ed Medical EFTs ; 3M - Overrid e exists f or aged, u nposted Me dical EFTs ; 1T - er ror condit ion for ag ed, unpost ed Tricare EFTs ; 2T - warning condition for aged, unposted Tricare EF Ts ; 3T - Override e xists for aged, unpo sted Trica re EFTs ; 0 - there exist no e rror or wa rning cond itions ; p ossible va lues for C ODES = "1P " or "2P" or "3P" or "1M" or " 2M" or "3M " or "1P^1 M" or "1P^ 2M" or" ; "1P^3M" or "2P^1M" o r "2P^2M" or "2P^3M" or "3P^1M " or "3P^2 M" or "3P^ 3M" | |
246 | I 'CODES D NONE Q N DAYSLIMT, DIR,ERROR, I,LN,MSGTX T,OVERRIDE ,S1,S2,STA TE,TYPE,X, Y S LN=3 S (OVERRIDE ,ERROR)=0 S DIR("A", 1)="Curren t Warning and/or Err or message s for Unpo sted EFTs: " S DIR("A ",2)=" " F I=1:1 S S TATE=$P(CO DES,U,I) Q :STATE="" D . S S1= $E(STATE,1 ),S2=$E(ST ATE,2) | |
247 | . I S1=1 D ; 1 = E RROR condi tion . . S ERROR=1,T YPE=$G(TYP E)_$E(STAT E,2) . . ; . . ; Num ber of day s an EFT c an age bef ore post p revention rules appl y | |
248 | . . S DAYS LIMT=$$GET 1^DIQ(344. 61,1,$S(S2 ="M":.06,S 2=”P”:.07, 1:.13)) ; number of days an EF T can age before pos t preventi on rules a pply . . S DIR("A",L N)="ERROR: Unposted "_$S($E(ST ATE,2)="P" :"pharmacy ",1:"medi cal ")_"EF Ts exist t hat are mo re than "_ DAYSLIMT_" days old. " S LN=LN+ 1 . . S DI R("A",LN)= "ERROR: Un posted " . . S DIR(" A",LN)=DIR ("A",LN)_$ S(S2="P":" pharmacy " ,S2="M":"m edical ",1 :"tricare ") . . S D IR("A",LN) =DIR("A",L N)_"EFTs e xist that are more t han "_DAYS LIMT_" day s old." . . S LN=LN+ 1 | |
249 | . . S DIR ("A",LN)=" Scratchpad creation is not all owed for n ewer payme nts." S LN =LN+1 . . S DIR("A", LN)=" " S LN=LN+1 . I S1=2 D ; 2 = warn ing condit ion . . S DIR("A",LN )="WARNING : Unposted "_$S($E(S TATE,2)="P ":"pharmac y ",1:"med ical ")_"E FTs exist that are m ore than " _$S($E(STA TE,2)="P": 21,1:14)_" days old. " S LN=LN+ 1 . . S DI R("A",LN)= " " S LN=L N+1 . . S DIR("A",LN )="WARNING : Unposted "_$S(S2=" P":"pharma cy ",S2="M ":"medical ",1:"tric are ") . . S DIR("A" ,LN)=DIR(" A",LN)_"EF Ts exist t hat are mo re than " . . S DIR( "A",LN)=DI R("A",LN)_ $S(S2="P": 21,1:14)_" days old. " . . S LN =LN+1 . . S DIR("A", LN)=" ",LN =LN+1 | |
250 | . I S1=3 D ;OVERRI DE conditi on . . S O VERRIDE=OV ERRIDE+1 . . S DIR(" A",LN)="An Override for "_$S($ E(STATE,2) ="P":"phar macy ",1:" medical ") _"is alrea dy in plac e." S LN=L N+1 . . S DIR("A",LN )="An Over ride for " _$S(S2="P" :"pharmacy ",S2="M": "medical " ,1:"tricar e ") . . S DIR("A",L N)=DIR("A" ,LN)_"is a lready in place." | |
251 | . . S DIR ("A",LN)=" " I OVERR IDE=2 S DI R(0)="EA", DIR("A")=" Press ENTE R to conti nue: " D ^ DIR Q I OV ERRIDE=2 D Q . S DI R(0)="EA", DIR("A")=" Press ENTE R to conti nue: " . D ^DIR | |
252 | I ERROR D . M MSGTX T=DIR("A") . S DIR(0 )="YA",DIR ("A",LN)=" An overrid e will all ow unrestr icted scra tchpad cre ation for one day." . S DIR("A ")="Do you want to c ontinue (Y /N)? " D ^ DIR . Q:'Y . S OVERR IDE=$$OVER RIDE(TYPE, .MSGTXT) . I OVERRID E D MAIL(. MSGTXT) I 'ERROR D . S DIR(0)= "EA",DIR(" A",LN)="Th ere are no error con ditions to override. ",LN=LN+1 . S DIR("A ",LN)=" ", DIR("A")=" Press ENTE R to conti nue: " . D ^DIR Q ;O VERRIDE(TY PE,TEXT) ; when ERRO R state ex ists, perf orm the Ov erride ; ; Input - T YPE = "M" (medical); "P" (pham acy); "PM" or "MP"(a ged, unpos ted EFTs e xist for b oth medica l and phar macy claim s) ; TEXT = warning and/or err or stateme nts; passe d by refer ence ; Out put - DONE = 1 - OVE RRIDE was performed; 0 - Overr ide was no t performe d ; TEXT = additiona l text to be display ed with wa rning and/ or error s tatements; contents of TEXT ar ray will b e in the b ody of the mail mess age ( refe r to MAIL tag) ; Inp ut: TYPE - "M" Medic al ; "P" P hamacy ; " T" - Trica re ; Any c ombination of above flags ; TE XT - Warni ng and/or error stat ements; pa ssed by re ference ; Output: TE XT - Addit ional text to be dis played wit h warning and/or err or stateme nts ; cont ents of TE XT array w ill be in the body o f the mail message ; (refer to MAIL tag) ; Returns : DONE - 1 - OVERRID E was perf ormed; 0 - Override was not pe rformed | |
253 | ; N DIR,D ONE,DTTM,R CDFDA,REAS ON,X1,Y,DU OUT,DIRUT N DIR,DIRU T,DONE,DTT M,DUOUT,RC DFDA,REASO N,X1,Y | |
254 | L +^RCY(3 44.61,1,0) :DILOCKTM E D NOLOC K S DONE=0 G OVERQ S DONE=1 I TYPE="P"!( TYPE="M") !(TYPE="T" )D . S DIR (0)="EA",D IR("A",1)= "An Overri de now exi sts for po sting "_$S (TYPE="P": "pharmacy ",1:"medic al ")_"pay ments." . S DIR(0)=" EA",DIR("A ",1)="An O verride no w exists f or posting " . S DIR ("A",1)=DI R("A",1)_$ S(TYPE="P" :"pharmacy ",TYPE="M ":"medical ",1:"tric are ")_"pa yments." | |
255 | . S DIR(" A",2)=" " . S DIR("A ")="Press ENTER to c ontinue: " . D ^DIR I TYPE="PM "!(TYPE="M P") D I ' DONE G OVE RQ I $L(TY PE)>1 D I 'DONE G O VERQ | |
256 | . S DIR(0 )="SA^M:Me dical;P:Ph armacy",DI R("A")="Ov erride for (M)edical or (P)har macy? " . S DIR(0)=" SA" . S:TY PE["M" DIR (0)=DIR(0) _"^M:Medic al" . S:TY PE["P" DIR (0)=DIR(0) _";P:Pharm acy" . S:T YPE["T" DI R(0)=DIR(0 )_";T:Tric are" . I $ L(TYPE)=3 S DIR("A") ="Override r for (M)e dical, (P) harmacy or (T)ricare ? " . E D . . S DIR ("A")="Ove rride for " . . I (T YPE="PM")! (TYPE="MP" ) S DIR("A ")=DIR("A" )_"(M)edic al or (P)h armacy? " . . E I ( TYPE="PT") !(TYPE="TP ") S DIR(" A")=DIR("A ")_"(P)har macy or (T )ricare? " . . E S DIR("A")=D IR("A")_"( M)edical o r (T)ricar e? " | |
257 | . D ^DIR . I $D(DUO UT)!($D(DI RUT)) S DO NE=0 Q . S TYPE=Y W ! | |
258 | K DIR S D IR("A")="R eason for Override: ",DIR(0)=" FA^1:50" D ^DIR I $D (DUOUT)!($ D(DIRUT)) S DONE=0 W !!," Need to enter a reason f or Overrid e.",!," Ov erride not performed .",! G OVE RQ S REASO N=Y,DTTM=$ $NOW^XLFDT S RCDFDA( 344.61,"1, ",$S(TYPE= "M":20,1:2 1))=DTTM S RCDFDA(34 4.61,"1,", $S(TYPE="M ":22,1:23) )=DUZ S RC DFDA(344.6 1,"1,",$S( TYPE="M":2 4,1:25))=R EASON S RC DFDA(344.6 1,"1,",$S( TYPE="M":2 0,TYPE="P" :21,1:26)) =DTTM S RC DFDA(344.6 1,"1,",$S( TYPE="M":2 2,TYPE="P" :23,1:27)) =DUZ S RCD FDA(344.61 ,"1,",$S(T YPE="M":24 ,TYPE="P": 25,1:28))= REASON | |
259 | D FILE^DI E("","RCDF DA") S X1= "" S X1=$O (TEXT(X1), -1) S X1=X 1+1 S TEXT (X1)=$S(TY PE="M":"Me dical ",1: "Pharmacy ")_"Overri de Details ",X1=X1+1 S TEXT(X1) =$S(TYPE=" M":"Medica l ",TYPE=" P":"Pharma cy ",1:"Tr icare ")_" Override D etails" S X1=X1+1 | |
260 | S TEXT(X1 )="User: " _$P($G(^VA (200,DUZ,0 )),"^") S X1=X1+1 S TEXT(X1)=" Date/Time: "_DTTM S TEXT(X1)=" Reason for Override: "_REASONO VERQ ; L - ^RCY(344.6 1,1,0) Q D ONE ;MAIL( TEXT) ;gen erate mail message w hen OVERRI DE is impl emented ; Input: TEX T - Lines of text th at represe nt the bod y of the m ail messag e | |
261 | ; ; inpu t - TEXT = lines of text that represent the body o f the mail message ; N ARRAY,C NT,CNT1,GL B,RCPROG1, SBJ,SUB S RCPROG1="R CDUPEO",GL B=$NA(^TMP (RCPROG1,$ J,"XMTEXT" )) ; ;Buil d header S SUB="EFT" K @GLB S SBJ="EDI L BOX-STA# " _$P($$SITE ^VASITE,"^ ",3)_"-Unp osted EFTs Override "_$$FMTE^X LFDT($$NOW ^XLFDT) M @GLB=TEXT N XMDUZ,XM INSTR,XMSU B,XMTEXT,X MY S XMDUZ =DUZ,XMTEX T=GLB,XMSU B=SBJ,XMY( "I:G.RCDPE AUDIT")=" " S XMINST R("FROM")= "POSTMASTE R" S XMINS TR("FLAGS" )="P" D SE NDMSG^XMXA PI(XMDUZ,X MSUB,XMTEX T,.XMY,.XM INSTR) Q ; CHECK(TYPE ,OVERRIDE) ; determi ne if over ride exist s for toda y's date ; ; input - TYPE = " M" for med ical; "P" for Pharma cy ; OVERR IDE = pass ed by refe rence; arr ay to hold the OVERR IDE data ; output - OVERRIDE = returned array hold ing existi ng OVERRID E data ; I nput: TYPE - "M" for medical, "P" for Ph armacy or "T" for Tr icare ; OV ERRIDE - P assed by r eference; array to h old the OV ERRIDE dat a ; Output : OVERRIDE - Returne d array ho lding exis ting OVERR IDE data | |
262 | K OVERRID E S OVERRI DE(TYPE)=+ $$GET1^DIQ (344.61,1, $S(TYPE="M ":20,1:21) ,"I") ; ge t MEDICAL EFT OVERRI DE (344.61 , 20) or P HARMACY EF T OVERRIDE (344.61, 21) depend ent on typ e of EFTs ; ; Get ME DICAL EFT OVERRIDE ( 344.61, 20 ), PHARMAC Y EFT OVER RIDE (344. 61, 21) or ; TRICARE EFT OVERR IDE (344.6 1, 20) dat e dependen t on type of EFTs S OVERRIDE(T YPE)=+$$GE T1^DIQ(344 .61,1,$S(T YPE="M":20 ,TYPE="P": 21,1:26)," I") | |
263 | I 'OVERRI DE(TYPE) K OVERRIDE( TYPE) S OV ERRIDE=0 Q I $P(OVER RIDE(TYPE) ,".")'=DT K OVERRIDE (TYPE) S O VERRIDE=0 Q ; overr ide does n ot exist f or 'TODAYS ' date, po st prevent ion rules will apply S OVERRID E=1 Q ;NON E ; the sy stem does not have a ny aged, u nposted EF Ts N DIR S DIR(0)="E A" S DIR(" A",1)="The sytem doe s not have any aged, unposted EFTs." S D IR("A",2)= "Therefore , no error condition s to overr ide." S DI R("A",3)=" " S DIR(" A")="Press ENTER to continue: " D ^DIR Q ;NOACTION ; OVERRID E already exists N D IR S DIR(0 )="EA" S D IR("A",1)= "An Overri de for "_$ S(TYPE="P" :"pharmacy ",1:"medi cal ")_"is already i n place." S DIR("A", 1)="An Ove rride for "_$S(TYPE= "P":"pharm acy ",TYPE ="M":"medi cal ",1:"t ricare ") S DIR("A", 1)=DIR("A" ,1)_"is al ready in p lace." | |
264 | S DIR("A", 2)="No act ion needed " S DIR("A ",3)=" " S DIR("A")= "Press ENT ER to cont inue: " D ^DIR Q ;NO ENTRY ; us er is not authorized to use th e option N DIR S DIR (0)="EA" S DIR("A",1 )="You are not autho rized to u se this op tion." S D IR("A",2)= "This opti on is lock ed with RC DPE AGED P MT key." S DIR("A",3 )=" " S DI R("A")="Pr ess ENTER to continu e: " D ^DI R Q ;NOLOC K ; entry at 344.61 cannot be locked N D IR S DIR(0 )="EA" S D IR("A",1)= "Another u ser is edi ting the O verride Pa rameters." S DIR("A" ,2)="Try a gain later ." S DIR(" A",3)=" " S DIR("A") ="Press EN TER to con tinue: " D ^DIR Q ; | |
265 | ||
266 | ||
267 | outines | |
268 | Activities | |
269 | Routine Na me | |
270 | RCDPESP | |
271 | Enhancemen t Category | |
272 | New | |
273 | Modify | |
274 | Delete | |
275 | No Change | |
276 | RTM | |
277 | ||
278 | Related Op tions | |
279 | RCDPE EDI LOCKBOX PA RAMETERS | |
280 | ||
281 | Related Ro utines | |
282 | Routines “ Called By” | |
283 | Routines “ Called” | |
284 | ||
285 | N/A | |
286 | ^DIC | |
287 | $$GET1^DID | |
288 | FILE^DIE | |
289 | UPDATE^DIE | |
290 | $$GET1^DIQ | |
291 | ^DIR | |
292 | $$EDILOCK^ RCMSITE | |
293 | $$SITE^VAS ITE | |
294 | $$FMADD^XL FDT | |
295 | $$FMTE^XLF DT | |
296 | $$NOW^XLFD T | |
297 | SENDMSG^XM XAPI | |
298 | MES^XPDUTL | |
299 | $$PROD^XUP ROD | |
300 | ||
301 | Current Lo gic | |
302 | . | |
303 | . | |
304 | . | |
305 | ; ; code f alls throu gh ;RXPARM S ; branch here from above ;-- ---------- ---------- ---------- ---------- ---- ; Ena ble/disabl e auto-pos ting of ph armacy cla ims ;----- ---------- ---------- ---------- ---------- - N APPC,A PPCT ; APP C=AUTO POS TING OF PH ARMACY CLA IMS ENABLE D ; APPCT= TEMP APMC S APPCT=$$ GET1^DIQ(3 44.61,"1," ,1.01,"I") ,APPC=$S(A PPCT=1:"Ye s",APPCT=0 :"No",1:"" ) K DIR S DIR(0)="YA ",DIR("B") =$S(APPC=" ":"Yes",1: APPC) S DI R("A")=$$G ET1^DID(34 4.61,1.01, ,"TITLE") S DIR("?") =$$GET1^DI D(344.61,1 .01,,"HELP -PROMPT") D ^DIR I $ D(DTOUT)!$ D(DUOUT) G ABORT I A PPCT'=Y D ; user up dated valu e .S FDAED I(344.61," 1,",1.01)= Y D FILE^D IE(,"FDAED I") K FDAE DI .D NOTI FY($S(Y=1: "Yes",Y=0: "No",1:"*m issing*"), 1) .S RCAU DVAL(1)="3 44.61^1.01 ^1^"_Y_U_( 'Y) D AUDI T(.RCAUDVA L) K RCAUD VAL ; ; If yes, set/ Reset paye r exclusio ns for pha rmacy clai ms posting I Y=1 D G:$G(RCQUI T)=1 ABORT . D EXCLL IST(3) ; D isplay the exclusion list . D SETEXCL(3) Q:$G(RCQU IT) ; SET/ RESET excl usions . D EXCLLIST( 3) ; Displ ay the exc lusion lis t . W ! . ; ; ; Show Pharmacy prompt but don't all ow change D:$$GET1^D IQ(344.61, "1,",1.01, "I")=1 G:$ G(RCQUIT)= 1 ABORT . W !,"ENABL E AUTO-DEC REASE OF P HARMACY CL AIMS (Y/N) : NO//" . W !," Dete rmines if auto-decre ase of pha rmacy clai ms are ena bled for t his site." . W !," N OTE: Not e ditable an d set to D isabled un til furthe r notice." ,! . K DIR S DIR(0)= "EA" . S D IR("A")="P ress Enter to contin ue: " . D ^DIR I $D( DTOUT)!$D( DUOUT) S R CQUIT=1 . W ! ; ; se t MEDICAL EFT OVERRI DE ^DD(344 .61,.06,0) = MEDICAL EFT POST PREVENT DA YS N MEO S MEO=$$GET 1^DIQ(344. 61,"1,",.0 6) K DIR S :MEO]"" DI R("B")=MEO S DIR("?" )=$$GET1^D ID(344.61, .06,,"HELP -PROMPT") S DIR(0)=" NA^14:60:0 ",DIR("A") =$$GET1^DI D(344.61,. 06,,"TITLE ") ; PRCA* 4.5*321 Ch ange max f rom 99 to 60 D ^DIR I $D(DTOUT )!$D(DUOUT ) G ABORT I MEO'=Y D ; update and audit .S RCAUDV AL(1)="344 .61^.06^1^ "_Y_U_MEO .S FDAEDI( 344.61,"1, ",.06)=Y D FILE^DIE( ,"FDAEDI") .D AUDIT( .RCAUDVAL) K RCAUDVA L ; ;----- ---------- ---------- ---------- ---------- - ; Set PH ARMACY EFT OVERRIDE ;--------- ---------- ---------- ---------- ------- N PEO S PEO= $$GET1^DIQ (344.61,"1 ,",.07) K DIR S:PEO] "" DIR("B" )=PEO S DI R("?")=$$G ET1^DID(34 4.61,.07,, "HELP-PROM PT") S DIR (0)="NA^21 :365:0",DI R("A")=$$G ET1^DID(34 4.61,.07,, "TITLE") ; PRCA*4.5* 321 Change max from 999 to 365 D ^DIR I $D(DTOUT)! $D(DUOUT) G ABORT I PEO'=Y D ; update a nd audit . S RCAUDVAL (1)="344.6 1^.07^1^"_ Y_U_PEO .S FDAEDI(34 4.61,"1,", .07)=Y D F ILE^DIE(," FDAEDI") . D AUDIT(.R CAUDVAL) K RCAUDVAL ; G EXIT ; | |
306 | . | |
307 | . | |
308 | . | |
309 | ||
310 | Modified L ogic (Chan ges are in bold) | |
311 | . | |
312 | . | |
313 | . | |
314 | ; ; code f alls throu gh ;RXPARM S ; branch here from above ;-- ---------- ---------- ---------- ---------- ---- ; Ena ble/disabl e auto-pos ting of ph armacy cla ims ;----- ---------- ---------- ---------- ---------- - N APPC,A PPCT ; APP C=AUTO POS TING OF PH ARMACY CLA IMS ENABLE D ; APPCT= TEMP APMC S APPCT=$$ GET1^DIQ(3 44.61,"1," ,1.01,"I") ,APPC=$S(A PPCT=1:"Ye s",APPCT=0 :"No",1:"" ) K DIR S DIR(0)="YA ",DIR("B") =$S(APPC=" ":"Yes",1: APPC) S DI R("A")=$$G ET1^DID(34 4.61,1.01, ,"TITLE") S DIR("?") =$$GET1^DI D(344.61,1 .01,,"HELP -PROMPT") D ^DIR I $ D(DTOUT)!$ D(DUOUT) G ABORT I A PPCT'=Y D ; user up dated valu e .S FDAED I(344.61," 1,",1.01)= Y D FILE^D IE(,"FDAED I") K FDAE DI .D NOTI FY($S(Y=1: "Yes",Y=0: "No",1:"*m issing*"), 1) .S RCAU DVAL(1)="3 44.61^1.01 ^1^"_Y_U_( 'Y) D AUDI T(.RCAUDVA L) K RCAUD VAL ; ; If yes, set/ Reset paye r exclusio ns for pha rmacy clai ms posting I Y=1 D G:$G(RCQUI T)=1 ABORT . D EXCLL IST(3) ; D isplay the exclusion list . D SETEXCL(3) Q:$G(RCQU IT) ; SET/ RESET excl usions . D EXCLLIST( 3) ; Displ ay the exc lusion lis t . W ! . ; ; ; Show Pharmacy prompt but don't all ow change D:$$GET1^D IQ(344.61, "1,",1.01, "I")=1 G:$ G(RCQUIT)= 1 ABORT . W !,"ENABL E AUTO-DEC REASE OF P HARMACY CL AIMS (Y/N) : NO//" . W !," Dete rmines if auto-decre ase of pha rmacy clai ms are ena bled for t his site." . W !," N OTE: Not e ditable an d set to D isabled un til furthe r notice." ,! . K DIR S DIR(0)= "EA" . S D IR("A")="P ress Enter to contin ue: " . D ^DIR I $D( DTOUT)!$D( DUOUT) S R CQUIT=1 . W ! ; ; se t MEDICAL EFT OVERRI DE ^DD(344 .61,.06,0) = MEDICAL EFT POST PREVENT DA YS N MEO S MEO=$$GET 1^DIQ(344. 61,"1,",.0 6) K DIR S :MEO]"" DI R("B")=MEO S DIR("?" )=$$GET1^D ID(344.61, .06,,"HELP -PROMPT") S DIR(0)=" NA^14:60:0 ",DIR("A") =$$GET1^DI D(344.61,. 06,,"TITLE ") ; PRCA* 4.5*321 Ch ange max f rom 99 to 60 D ^DIR I $D(DTOUT )!$D(DUOUT ) G ABORT I MEO'=Y D ; update and audit .S RCAUDV AL(1)="344 .61^.06^1^ "_Y_U_MEO .S FDAEDI( 344.61,"1, ",.06)=Y D FILE^DIE( ,"FDAEDI") .D AUDIT( .RCAUDVAL) K RCAUDVA L ; ;----- ---------- ---------- ---------- ---------- - ; Set PH ARMACY EFT OVERRIDE ;--------- ---------- ---------- ---------- ------- N PEO S PEO= $$GET1^DIQ (344.61,"1 ,",.07) K DIR S:PEO] "" DIR("B" )=PEO S DI R("?")=$$G ET1^DID(34 4.61,.07,, "HELP-PROM PT") S DIR (0)="NA^21 :365:0",DI R("A")=$$G ET1^DID(34 4.61,.07,, "TITLE") ; PRCA*4.5* 321 Change max from 999 to 365 D ^DIR I $D(DTOUT)! $D(DUOUT) G ABORT I PEO'=Y D ; update a nd audit . S RCAUDVAL (1)="344.6 1^.07^1^"_ Y_U_PEO .S FDAEDI(34 4.61,"1,", .07)=Y D F ILE^DIE(," FDAEDI") . D AUDIT(.R CAUDVAL) K RCAUDVAL ; ;------- ---------- ---------- ---------- --------- ; Set Tric are EFT OV ERRIDE ;-- ---------- ---------- ---------- ---------- ---- N PEO S PEO=$$G ET1^DIQ(34 4.61,"1,", .13) K DIR S:PEO]"" DIR("B")=P EO S DIR(" ?")=$$GET1 ^DID(344.6 1,.07,,"HE LP-PROMPT" ) S DIR(0) ="NA^21:36 5:0",DIR(" A")=$$GET1 ^DID(344.6 1,.07,,"TI TLE") D ^D IR I $D(DT OUT)!$D(DU OUT) D ABO RT Q I PEO '=Y D ; Update and audit . S RCAUDVAL( 1)="344.61 ^.07^1^"_Y _U_PEO . S FDAEDI(34 4.61,"1,", .07)=Y D F ILE^DIE(," FDAEDI") . D AUDIT(. RCAUDVAL) . K RCAUDV AL | |
315 | G EXIT ; | |
316 | . | |
317 | . | |
318 | . | |
319 | ||
320 | ||
321 | Routines | |
322 | Activities | |
323 | Routine Na me | |
324 | RCDPESP1 | |
325 | Enhancemen t Category | |
326 | New | |
327 | Modify | |
328 | Delete | |
329 | No Change | |
330 | RTM | |
331 | ||
332 | Related Op tions | |
333 | RCDPE SITE PARAMETER REPORT | |
334 | ||
335 | Related Ro utines | |
336 | Routines “ Called By” | |
337 | Routines “ Called” | |
338 | ||
339 | N/A | |
340 | ^%ZIS | |
341 | HOME^%Z IS | |
342 | ^%ZISC | |
343 | ^%ZTLOA D | |
344 | LIST^DI C | |
345 | $$GET1^ DID | |
346 | GETS^DI Q | |
347 | GETCODE S^RCDPCRR | |
348 | $$ENDOR PRT^RCDPEA RL | |
349 | ASK^RCD PEARL | |
350 | $$RTYPE ^RCDPESP2 | |
351 | $$ACT^R CDPRU | |
352 | $$DT^XL FDT | |
353 | $$FMTE^ XLFDT | |
354 | $$NOW^X LFDT | |
355 | ||
356 | Current Lo gic | |
357 | . | |
358 | . | |
359 | . | |
360 | SPRPT ; si te paramet er report entry poin t ; RCNTR - counter ; RCFLD - DD field n umber ; RC HDR - head er informa tion ; RCP ARM - para meters ; R CSTOP - ex it flag N J,RCNTR,RC FLD,RCGLB, RCHDR,RCPA RM,RCSTOP, V,X,Y,RCST RING N RCD ATA,RCCODE ,RCDESC,RC STAT,RCI,R CCARCD,RCC IEN,RCITEM ,RCACTV ; S X="RC" F S X=$O(^ TMP($J,X)) Q:'($E(X, 1,2)="RC") K ^TMP($J ,X) ; clea r out old data ; ; R CGLB - ^TM P global s torage loc ations ; ^ TMP($J,"RC 342") - AR SITE PARA METER file (#342) ; ^TMP($J,"R C344.6") - RCDPE AUT O-PAY EXCL USION file (#344.6) ; ^TMP($J, "RC344.61" ) - RCDPE PARAMETER file (#344 .61) F J=3 42,344.6,3 44.61 S RC GLB(J)=$NA (^TMP($J," RC"_J)) K @RCGLB(J) ; S RCHDR( "RUNDATE") =$$FMTE^XL FDT($$NOW^ XLFDT,"10S ") S RCHDR ("PGNMBR") =0 ; page number ; ; AR SITE P ARAMETER f ile (#342) D GETS^DI Q(342,"1," ,".01;7.02 ;7.03;7.04 ;7.05;7.06 ;7.07;7.08 ;","E",RCG LB(342)) ; add site to header data S RCH DR("SITE") ="Site: "_ @RCGLB(342 )@(342,"1, ",.01,"E") ; F RCFLD =7.02,7.03 ,7.04,7.05 ,7.06,7.07 ,7.08 S RC ITEM=$S(RC FLD>7.04:" TITLE",1:" LABEL") D ; EFT and ERA days unmatched - PRCA*4.5 *321 . I R CTYPE="P", (RCFLD=7.0 5)!(RCFLD= 7.07) Q ; Dont disp lay if onl y showing Pharmacy p arameters - PRCA*4.5 *321 . I R CTYPE="M", (RCFLD=7.0 6)!(RCFLD= 7.08) Q ; Dont disp lay if onl y showing medical pa rameters - PRCA*4.5* 321 . S Y= $$GET1^DID (342,RCFLD ,,RCITEM)_ ": "_@RCGL B(342)@(34 2,"1,",RCF LD,"E") . I RCFLD=7. 05 D AD2RP T(" ") . I (RCFLD=7. 06)&(RCTYP E="P") D A D2RPT(" ") . D AD2RP T(Y) ; D A D2RPT(" ") ; ; Displ ay Medical Parameter s ; RCDPE PARAMETER file (#344 .61) D GET S^DIQ(344. 61,"1,",". 02;.03;.04 ;.05;.06;. 07;.1;.11; .12;1.01;1 .02","E",R CGLB(344.6 1)) ; PRCA *4.5*321/P RCA*4.5*32 6 ; S Y=$$ GET1^DID(3 44.61,.1,, "LABEL")_" : "_@RCGLB (344.61)@( 344.61,"1, ",.1,"E") ; PRCA*4.5 *321 D AD2 RPT(Y) ; P RCA*4.5*32 1 D AD2RPT (" ") ; PR CA*4.5*321 ; ; get a uto-post a nd auto-de crease set tings, sav e zero nod e S X=$G(^ RCY(344.61 ,1,0)),RCP ARM("AUTO- POST")=$P( X,U,2),RCP ARM("AUTO- DECREASE") =$P(X,U,3) ,RCPARM(34 4.61,0)=X S RCPARM(" RX AUTO-PO ST")=$P($G (^RCY(344. 61,1,1)),U ) ; ; RCDP E AUTO-PAY EXCLUSION file (#34 4.6) ; scr eening log ic: ^DD(34 4.6,.06,0) ="EXCLUDE MED CLAIMS POSTING^S ^0:No;1:Ye s;^0;6^Q" D LIST^DIC (344.6,,"@ ;.01;.02;. 06;1","P", ,,,,"I $P( ^(0),U,6)= 1",,RCGLB( 344.6)) ; ; PRCA*4.5 *304 - Pri nt Medical Claim Par ameters I RCTYPE'="P " D .; RCD PE PARAMET ER file (# 344.61), a uto-postin g of medic al claims .S X=$$GET 1^DID(344. 61,.02,,"T ITLE"),V=" (Y/N)" S: X[V X=$P(X ,V)_$P(X,V ,2) ; remo ve yes/no prompt .S Y=X_" "_@R CGLB(344.6 1)@(344.61 ,"1,",.02, "E") .D AD 2RPT(Y) .; .I (RCPAR M("AUTO-PO ST")!RCPAR M("AUTO-DE CREASE")) D ; list auto-post excluded p ayers ..I '$D(@RCGLB (344.6)@(" DILIST",1, 0)) D Q . ..S X=" No payers ex cluded fro m medical auto-posti ng." D AD2 RPT($J(" " ,80-$L(X)\ 2)_X) ..; ..D AD2RPT (" Exclude d Payer Co mment") .. S RCNTR=0 ..F S RCN TR=$O(@RCG LB(344.6)@ ("DILIST", RCNTR)) Q: 'RCNTR D ...S V=@RC GLB(344.6) @("DILIST" ,RCNTR,0), X=$E($P(V, U,2),1,35) ...S Y=" "_X_$J(" " ,36-$L(X)) _$P(V,U,5) ...D AD2R PT($E(Y,1, IOM)) .; . I RCPARM(" AUTO-POST" ) D AD2RPT (" ") ; bl ank line . ; .K @RCGL B(344.6) ; delete ol d data .; RCDPE AUTO -PAY EXCLU SION file (#344.6) . ; screenin g logic: ^ DD(344.6,. 07,0)="EXC LUDE MED C LAIMS DECR EASE^S^0:N o;1:Yes;^0 ;7^Q" .D L IST^DIC(34 4.6,,"@;.0 1;.02;.07; 2","P",,,, ,"I $P(^(0 ),U,7)=1", ,RCGLB(344 .6)) .; .; BEGIN PRC A*4.5*326 .D AD2RPT( " ") ; bla nk line .; Display A uto-Decrea se paramet ers for pa id lines . D AUTOD(1, .RCGBL,RCT YPE) .; Di splay Auto -Decrease parameters for no-pa y lines .D AUTOD(0,. RCGBL,RCTY PE) .D AD2 RPT(" ") ; blank lin e .; END P RCA*4.5*32 6 .I (RCPA RM("AUTO-P OST")!RCPA RM("AUTO-D ECREASE")) D ; list excluded auto-decre ase payers .. Q:'RCP ARM("AUTO- DECREASE") .. D AD2R PT(" All p ayers excl uded from Auto-Posti ng are exc luded from Auto-Decr ease.") .. I '$D(@RC GLB(344.6) @("DILIST" ,1,0)) D Q ... S X= " No addit ional paye rs exclude d from Med ical Auto- Decrease." D AD2RPT( $J(" ",80- $L(X)\2)_X ) ..; .. D AD2RPT(" Additional Excluded Payer Comm ent") .. S RCNTR=0 . . F S RCN TR=$O(@RCG LB(344.6)@ ("DILIST", RCNTR)) Q: 'RCNTR D ... S V=@R CGLB(344.6 )@("DILIST ",RCNTR,0) ,X=$E($P(V ,U,2),1,35 ) ... S Y= " "_X_$J(" ",36-$L(X ))_$P(V,U, 5) ... D A D2RPT($E(Y ,1,IOM)) . ; .D AD2RP T(" ") ; b lank line ; K @RCGLB (344.6) ; delete old data ; RC DPE AUTO-P AY EXCLUSI ON file (# 344.6) ; s creening l ogic: ^DD( 344.6,.06, 0)="EXCLUD E MED CLAI MS POSTING ^S^0:No;1: Yes;^0;6^Q " D LIST^D IC(344.6,, "@;.01;.02 ;.08;3","P ",,,,,"I $ P(^(0),U,8 )=1",,RCGL B(344.6)) ; ; PRCA*4 .5*304 - P rint Pharm acy Claim Parameters I RCTYPE' ="M" D .; RCDPE PARA METER file (#344.61) , auto-pos ting of ph armacy cla ims .S X=$ $GET1^DID( 344.61,1.0 1,,"TITLE" ),V=" (Y/N )" S:X[V X =$P(X,V)_$ P(X,V,2) ; remove ye s/no promp t .S Y=X_" "_@RCGLB( 344.61)@(3 44.61,"1," ,1.01,"E") .D AD2RPT (Y) .; . I RCPARM("R X AUTO-POS T") D ; l ist auto-p ost exclud ed payers .. I '$D(@ RCGLB(344. 6)@("DILIS T",1,0)) D Q ... S X=" No pay ers exclud ed from ph armacy aut o-posting. " D AD2RPT ($J(" ",80 -$L(X)\2)_ X) ..; .. D AD2RPT(" Excluded Payer Comm ent") .. S RCNTR=0 . . F S RCN TR=$O(@RCG LB(344.6)@ ("DILIST", RCNTR)) Q: 'RCNTR D ... S V=@R CGLB(344.6 )@("DILIST ",RCNTR,0) ,X=$E($P(V ,U,2),1,35 ) ... S Y= " "_X_$J(" ",36-$L(X ))_$P(V,U, 5) ... D A D2RPT($E(Y ,1,IOM)) . . S X=$P($ $GET1^DID( 344.61,1.0 2,,"TITLE" )," (",1)_ ": " ; re move yes/n o prompt . . S Y=" "_ X_" "_$S(@ RCGLB(344. 61)@(344.6 1,"1,",1.0 2,"E")="": "No",1:@RC GLB(344.61 )@(344.61, "1,",1.02, "E")) .. D AD2RPT(" "),AD2RPT( Y) .; .I R CPARM("RX AUTO-POST" ) D AD2RPT (" ") ; bl ank line . ; .K @RCGL B(344.6) ; delete ol d data .; .; PRCA*4. 5*304 - Pr int the CA RC Auto-de crease par ameters . I $$CARCCH K(RCTYPE," P") D .. S RCSTRING= $TR($J("", 73)," ","- "),RCI=0 . . D AD2RPT (" CARC De scription Max. Amt") .. D AD2R PT(RCSTRIN G) .. ; .. ; Loop an d print en tries .. F S RCI=$O (^RCY(344. 62,RCI)) Q :'RCI D . . . S RCDA TA=$G(^RCY (344.62,RC I,0)),Y="" .. . Q:RC DATA="" .. . S RCCOD E=$P(RCDAT A,U),RCCIE N=$O(^RC(3 45,"B",RCC ODE,"")) . . . S RCDE SC=$G(^RC( 345,RCCIEN ,1,1,0)) . . . S RCST AT=$P(RCDA TA,U,2) .. . Q:RCSTA T'=1 .. . I $L(RCDES C)>50 S RC DESC=$E(RC DESC,1,50) _" ..." .. . D GETCO DES^RCDPCR R(RCCODE," ","A",$$DT ^XLFDT,"RC CARCD","1^ 70") .. . S Y=" "_$E (RCCODE,1, 4)_" " .. . S Y=Y_$E (RCDESC,1, 55)_$J($P( RCDATA,U,6 ),10,0) .. . I '$$AC T^RCDPRU(3 45,RCCODE, ) S Y=Y_" (I)" ; if inactive, display ( i) .. . D AD2RPT(Y) ; ; RCDPE PARAMETER file (#344 .61) F RCF LD=.06,.07 D . Q:(RC FLD=.06)&( RCTYPE="P" ) ; Dont d isplay if only showi ng Pharmac y paramete rs . Q:(RC FLD=.07)&( RCTYPE="M" ) ; Dont d isplay if only showi ng medical parameter s . S Y=$$ GET1^DID(3 44.61,RCFL D,,"TITLE" )_" "_@RCG LB(344.61) @(344.61," 1,",RCFLD, "E") . D A D2RPT(Y) ; D AD2RPT( " "),AD2RP T($$ENDORP RT^RCDPEAR L) | |
361 | . | |
362 | . | |
363 | . | |
364 | . | |
365 | ||
366 | Modified L ogic (Chan ges are in bold) | |
367 | ||
368 | . | |
369 | . | |
370 | . | |
371 | SPRPT ; si te paramet er report entry poin t ; RCNTR - counter ; RCFLD - DD field n umber ; RC HDR - head er informa tion ; RCP ARM - para meters ; R CSTOP - ex it flag N J,RCNTR,RC FLD,RCGLB, RCHDR,RCPA RM,RCSTOP, V,X,Y,RCST RING N RCD ATA,RCCODE ,RCDESC,RC STAT,RCI,R CCARCD,RCC IEN,RCITEM ,RCACTV ; S X="RC" F S X=$O(^ TMP($J,X)) Q:'($E(X, 1,2)="RC") K ^TMP($J ,X) ; clea r out old data ; ; R CGLB - ^TM P global s torage loc ations ; ^ TMP($J,"RC 342") - AR SITE PARA METER file (#342) ; ^TMP($J,"R C344.6") - RCDPE AUT O-PAY EXCL USION file (#344.6) ; ^TMP($J, "RC344.61" ) - RCDPE PARAMETER file (#344 .61) F J=3 42,344.6,3 44.61 S RC GLB(J)=$NA (^TMP($J," RC"_J)) K @RCGLB(J) ; S RCHDR( "RUNDATE") =$$FMTE^XL FDT($$NOW^ XLFDT,"10S ") S RCHDR ("PGNMBR") =0 ; page number ; ; AR SITE P ARAMETER f ile (#342) D GETS^DI Q(342,"1," ,".01;7.02 ;7.03;7.04 ;7.05;7.06 ;7.07;7.08 ;","E",RCG LB(342)) ; add site to header data S RCH DR("SITE") ="Site: "_ @RCGLB(342 )@(342,"1, ",.01,"E") ; F RCFLD =7.02,7.03 ,7.04,7.05 ,7.06,7.07 ,7.08 S RC ITEM=$S(RC FLD>7.04:" TITLE",1:" LABEL") D ; EFT and ERA days unmatched - PRCA*4.5 *321 . I R CTYPE="P", (RCFLD=7.0 5)!(RCFLD= 7.07) Q ; Dont disp lay if onl y showing Pharmacy p arameters - PRCA*4.5 *321 . I R CTYPE="M", (RCFLD=7.0 6)!(RCFLD= 7.08) Q ; Dont disp lay if onl y showing medical pa rameters - PRCA*4.5* 321 . S Y= $$GET1^DID (342,RCFLD ,,RCITEM)_ ": "_@RCGL B(342)@(34 2,"1,",RCF LD,"E") . I RCFLD=7. 05 D AD2RP T(" ") . I (RCFLD=7. 06)&(RCTYP E="P") D A D2RPT(" ") . D AD2RP T(Y) ; D A D2RPT(" ") ; ; Displ ay Medical Parameter s ; RCDPE PARAMETER file (#344 .61) D GET S^DIQ(344. 61,"1,",". 02;.03;.04 ;.05;.06;. 07;.1;.11; .12;1.01;1 .02","E",R CGLB(344.6 1)) ; PRCA *4.5*321/P RCA*4.5*32 6 ; S Y=$$ GET1^DID(3 44.61,.1,, "LABEL")_" : "_@RCGLB (344.61)@( 344.61,"1, ",.1,"E") ; PRCA*4.5 *321 D AD2 RPT(Y) ; P RCA*4.5*32 1 D AD2RPT (" ") ; PR CA*4.5*321 ; ; get a uto-post a nd auto-de crease set tings, sav e zero nod e S X=$G(^ RCY(344.61 ,1,0)),RCP ARM("AUTO- POST")=$P( X,U,2),RCP ARM("AUTO- DECREASE") =$P(X,U,3) ,RCPARM(34 4.61,0)=X S RCPARM(" RX AUTO-PO ST")=$P($G (^RCY(344. 61,1,1)),U ) ; ; RCDP E AUTO-PAY EXCLUSION file (#34 4.6) ; scr eening log ic: ^DD(34 4.6,.06,0) ="EXCLUDE MED CLAIMS POSTING^S ^0:No;1:Ye s;^0;6^Q" D LIST^DIC (344.6,,"@ ;.01;.02;. 06;1","P", ,,,,"I $P( ^(0),U,6)= 1",,RCGLB( 344.6)) ; ; PRCA*4.5 *304 - Pri nt Medical Claim Par ameters I RCTYPE'="P " D .; RCD PE PARAMET ER file (# 344.61), a uto-postin g of medic al claims .S X=$$GET 1^DID(344. 61,.02,,"T ITLE"),V=" (Y/N)" S: X[V X=$P(X ,V)_$P(X,V ,2) ; remo ve yes/no prompt .S Y=X_" "_@R CGLB(344.6 1)@(344.61 ,"1,",.02, "E") .D AD 2RPT(Y) .; .I (RCPAR M("AUTO-PO ST")!RCPAR M("AUTO-DE CREASE")) D ; list auto-post excluded p ayers ..I '$D(@RCGLB (344.6)@(" DILIST",1, 0)) D Q . ..S X=" No payers ex cluded fro m medical auto-posti ng." D AD2 RPT($J(" " ,80-$L(X)\ 2)_X) ..; ..D AD2RPT (" Exclude d Payer Co mment") .. S RCNTR=0 ..F S RCN TR=$O(@RCG LB(344.6)@ ("DILIST", RCNTR)) Q: 'RCNTR D ...S V=@RC GLB(344.6) @("DILIST" ,RCNTR,0), X=$E($P(V, U,2),1,35) ...S Y=" "_X_$J(" " ,36-$L(X)) _$P(V,U,5) ...D AD2R PT($E(Y,1, IOM)) .; . I RCPARM(" AUTO-POST" ) D AD2RPT (" ") ; bl ank line . ; .K @RCGL B(344.6) ; delete ol d data .; RCDPE AUTO -PAY EXCLU SION file (#344.6) . ; screenin g logic: ^ DD(344.6,. 07,0)="EXC LUDE MED C LAIMS DECR EASE^S^0:N o;1:Yes;^0 ;7^Q" .D L IST^DIC(34 4.6,,"@;.0 1;.02;.07; 2","P",,,, ,"I $P(^(0 ),U,7)=1", ,RCGLB(344 .6)) .; .; BEGIN PRC A*4.5*326 .D AD2RPT( " ") ; bla nk line .; Display A uto-Decrea se paramet ers for pa id lines . D AUTOD(1, .RCGBL,RCT YPE) .; Di splay Auto -Decrease parameters for no-pa y lines .D AUTOD(0,. RCGBL,RCTY PE) .D AD2 RPT(" ") ; blank lin e .; END P RCA*4.5*32 6 .I (RCPA RM("AUTO-P OST")!RCPA RM("AUTO-D ECREASE")) D ; list excluded auto-decre ase payers .. Q:'RCP ARM("AUTO- DECREASE") .. D AD2R PT(" All p ayers excl uded from Auto-Posti ng are exc luded from Auto-Decr ease.") .. I '$D(@RC GLB(344.6) @("DILIST" ,1,0)) D Q ... S X= " No addit ional paye rs exclude d from Med ical Auto- Decrease." D AD2RPT( $J(" ",80- $L(X)\2)_X ) ..; .. D AD2RPT(" Additional Excluded Payer Comm ent") .. S RCNTR=0 . . F S RCN TR=$O(@RCG LB(344.6)@ ("DILIST", RCNTR)) Q: 'RCNTR D ... S V=@R CGLB(344.6 )@("DILIST ",RCNTR,0) ,X=$E($P(V ,U,2),1,35 ) ... S Y= " "_X_$J(" ",36-$L(X ))_$P(V,U, 5) ... D A D2RPT($E(Y ,1,IOM)) . ; .D AD2RP T(" ") ; b lank line ; K @RCGLB (344.6) ; delete old data ; RC DPE AUTO-P AY EXCLUSI ON file (# 344.6) ; s creening l ogic: ^DD( 344.6,.06, 0)="EXCLUD E MED CLAI MS POSTING ^S^0:No;1: Yes;^0;6^Q " D LIST^D IC(344.6,, "@;.01;.02 ;.08;3","P ",,,,,"I $ P(^(0),U,8 )=1",,RCGL B(344.6)) ; ; PRCA*4 .5*304 - P rint Pharm acy Claim Parameters I RCTYPE' ="M" D .; RCDPE PARA METER file (#344.61) , auto-pos ting of ph armacy cla ims .S X=$ $GET1^DID( 344.61,1.0 1,,"TITLE" ),V=" (Y/N )" S:X[V X =$P(X,V)_$ P(X,V,2) ; remove ye s/no promp t .S Y=X_" "_@RCGLB( 344.61)@(3 44.61,"1," ,1.01,"E") .D AD2RPT (Y) .; . I RCPARM("R X AUTO-POS T") D ; l ist auto-p ost exclud ed payers .. I '$D(@ RCGLB(344. 6)@("DILIS T",1,0)) D Q ... S X=" No pay ers exclud ed from ph armacy aut o-posting. " D AD2RPT ($J(" ",80 -$L(X)\2)_ X) ..; .. D AD2RPT(" Excluded Payer Comm ent") .. S RCNTR=0 . . F S RCN TR=$O(@RCG LB(344.6)@ ("DILIST", RCNTR)) Q: 'RCNTR D ... S V=@R CGLB(344.6 )@("DILIST ",RCNTR,0) ,X=$E($P(V ,U,2),1,35 ) ... S Y= " "_X_$J(" ",36-$L(X ))_$P(V,U, 5) ... D A D2RPT($E(Y ,1,IOM)) . . S X=$P($ $GET1^DID( 344.61,1.0 2,,"TITLE" )," (",1)_ ": " ; re move yes/n o prompt . . S Y=" "_ X_" "_$S(@ RCGLB(344. 61)@(344.6 1,"1,",1.0 2,"E")="": "No",1:@RC GLB(344.61 )@(344.61, "1,",1.02, "E")) .. D AD2RPT(" "),AD2RPT( Y) .; .I R CPARM("RX AUTO-POST" ) D AD2RPT (" ") ; bl ank line . ; .K @RCGL B(344.6) ; delete ol d data .; .; PRCA*4. 5*304 - Pr int the CA RC Auto-de crease par ameters . I $$CARCCH K(RCTYPE," P") D .. S RCSTRING= $TR($J("", 73)," ","- "),RCI=0 . . D AD2RPT (" CARC De scription Max. Amt") .. D AD2R PT(RCSTRIN G) .. ; .. ; Loop an d print en tries .. F S RCI=$O (^RCY(344. 62,RCI)) Q :'RCI D . . . S RCDA TA=$G(^RCY (344.62,RC I,0)),Y="" .. . Q:RC DATA="" .. . S RCCOD E=$P(RCDAT A,U),RCCIE N=$O(^RC(3 45,"B",RCC ODE,"")) . . . S RCDE SC=$G(^RC( 345,RCCIEN ,1,1,0)) . . . S RCST AT=$P(RCDA TA,U,2) .. . Q:RCSTA T'=1 .. . I $L(RCDES C)>50 S RC DESC=$E(RC DESC,1,50) _" ..." .. . D GETCO DES^RCDPCR R(RCCODE," ","A",$$DT ^XLFDT,"RC CARCD","1^ 70") .. . S Y=" "_$E (RCCODE,1, 4)_" " .. . S Y=Y_$E (RCDESC,1, 55)_$J($P( RCDATA,U,6 ),10,0) .. . I '$$AC T^RCDPRU(3 45,RCCODE, ) S Y=Y_" (I)" ; if inactive, display ( i) .. . D AD2RPT(Y) ; ; RCDPE PARAMETER file (#344 .61) F RCF LD=.06,.07 ,.13 D . Q :(RCFLD=.0 6)&(RCTYPE ="P") ; Do nt display if only s howing Pha rmacy para meters . Q :(RCFLD=.0 7)&(RCTYPE ="M") ; Do nt display if only s howing med ical param eters . Q: (RCFLD=.13 )&(RCTYPE' ="B") ; Do n't show T ricare EFT Override | |
372 | . S Y=$$G ET1^DID(34 4.61,RCFLD ,,"TITLE") _" "_@RCGL B(344.61)@ (344.61,"1 ,",RCFLD," E") . D AD 2RPT(Y) ; D AD2RPT(" "),AD2RPT ($$ENDORPR T^RCDPEARL ) | |
373 | . | |
374 | . | |
375 | . | |
376 | . | |
377 | ||
378 | ||
379 | ||
380 | ||
381 | ||
382 | ||
383 |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.