237. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 11/9/2018 12:34:10 AM Central 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.

237.1 Files compared

# Location File Last Modified
1 CPEE_Build9_Sprint27.zip\HAC_CPE_CH CHMX278.m Mon Nov 5 16:39:42 2018 UTC
2 CPEE_Build9_Sprint27.zip\HAC_CPE_CH CHMX278.m Fri Nov 9 03:27:52 2018 UTC

237.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 2 662
Changed 1 6
Inserted 0 0
Removed 0 0

237.3 Comparison options

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

237.4 Active regular expressions

No regular expressions were active.

237.5 Comparison detail

  1   CHMX278 ;M I/JS;278 C ODE FILE G ENERATION; 07/07/2011  15:55
  2    ;;1.0;CHA MPVA SYSTE M;;JULY 4,  1990;
  3    ;
  4    ;  This r outine is  used to cr eate the 2 78 Code Fi le which c ontains th e default  action
  5    ;  code f or each di agnosis an d procedur e code.  T here are t wo main en try points  in this
  6    ;  routin e:
  7    ;
  8    ;      FI LE    crea te the 278  Code File  manually
  9    ;      TA SK    Task Man entry  point for  automated  creation o f the file
  10    ;  
  11    ;
  12    ;*     Cr eated:         Jorma  Sinnamo                     07-J ul-2011 15 :55
  13    ;*     Mo dified:        Jorma  Sinnamo                     04-A ug-2011 07 :23
  14    ;*  Modif ied:   Mor gan Jeppso n/Harris/I CD-10    0 2-May-2012  15:20
  15    ;*  Modif ied:   Mor gan Jeppso n/Harris/I CD-10    3 0-Apr-2013  10:30 ski p sub-divi ded codes
  16    ;
  17    ;
  18    q
  19    ;
  20    ;
  21   FILE ;  Ma nually cre ate the "2 78 Code Fi le", aka A uthorizati on Flat Fi le (AFF).
  22    ;
  23    n
  24    d file,st at,kill
  25    q
  26    ;
  27    ;
  28   TASK ;  TA SKMAN entr y to creat e the "278  Code File ".
  29    ;
  30    n
  31    d file,ki ll
  32    q
  33    ;
  34    ;
  35   file ;  Cr eate the " 278 Code F ile", aka  Authorizat ion Flat F ile (AFF).
  36    ;
  37    d init
  38    d icdx,se rv,create: ecount=0,l ogfile,ema il:ecount
  39    ;
  40    q
  41    ;
  42    ;
  43   icdx ;  Pr ocess all  ICD-9 DX c odes from  ^CHMICDX.
  44    ;
  45    ;
  46    s index=0 ,type="ICD 9_DX"
  47    f  s inde x=$o(^CHMI CDX(index) ) q:+index =0  d
  48    . ;
  49    . ; lines  below mod ified for  ICD-10 ;;M BJ/Harris  05/02/2012
  50    . s x0=^( index,0),c ode=$p(x0, U,2)
  51    . ; modif ied 4/30/1 3 to skip  sub-divide d codes ;  MBJ/Harris
  52    . s subfl g=$p(x0,U, 16) i subf lg=1 q
  53    . ; end 4 /30/13 mod
  54    . s type= "ICD9_DX"  i $p(x0,U, 24) s type ="ICD10_DX "
  55    . i $tr(c ode," ")=" " d error( 10,type,co de) q
  56    . i $$isa ctdx(index )=0 q  ;d  error(12,t ype,code)  q             ; Just  skip inact ive ones
  57    . ; end I CD-10 modi fications
  58    . ;
  59    . i $d(^C acheTemp.A FX($j,type ,code)) d  error(2,ty pe,code) q
  60    . ;
  61    . ;  Loop  thru all  the VA HAC  programs  related to  this ICD- 9 DX code  and determ ine
  62    . ;  the  278 action  code for  each of th em.
  63    . ;
  64    . f prog= 1,6,7 d:$d (^CHMICDX( index,102, prog))
  65    .. s test =$p(^(prog ,0),U,2),x prog=vapro g(prog) q: test="" ;  quit added  for ICD-1 0 testing
  66    .. ; modi fied 4/30/ 13 for sub -divided c odes - pre vious code  skipped w henever ac tn missing , new crea tes error
  67    .. ;s act n=$$action (xprog,tes t) q:actn= ""
  68    .. s actn =$$action( xprog,test ) i actn=" " d error( 3,type,cod e) q
  69    .. ; end  4/30/13 mo d
  70    .. ;
  71    .. ;  Rec ord the ac tion code  for later  processing  and updat e counter.
  72    .. ;
  73    .. s ^Cac heTemp.AFX ($j,type,c ode,prog)= actn
  74    .. s x=$i (^CacheTem p.AFF($j,t ype,prog))
  75    ;
  76    q
  77    ;
  78    ;
  79   serv ;  Pr ocess all  procedure  codes from  ^CHMSERV.
  80    ;
  81    s index=0
  82    f  s inde x=$o(^CHMS ERV(index) ) q:+index =0  d
  83    . s x0=^( index,0),c ode=$p(x0, U),type=$p (x0,U,5)
  84    . ; added  4/30/13 t o skip sub -divided c odes ;;MBJ /Harris
  85    . s subfl g=$p(x0,U, 9) i subfl g=1 q
  86    . ; end 4 /30/13 mod
  87    . i $tr(c ode," ")=" " d error( 10,type,co de) q
  88    . i type= "" d error (11,type,c ode) q
  89    . ;
  90    . ; line  below modi fied for I CD-10 ;; M BJ/Harris
  91    . ;s type =$s(type=" CPT":"CPT4 ",type="IC D-9":"ICD9 _PX",1:typ e)
  92    . s type= $s(type="C PT":"CPT4" ,type="ICD -9":"ICD9_ PX",type=" ICD-10":"I CD10_PX",1 :type)
  93    . ;
  94    . i $$isa ct(index)= 0 q  ;d er ror(12,typ e,code) q                ; Just  skip inact ive ones
  95    . i $d(^C acheTemp.A FX($j,type ,code)) d  error(2,ty pe,code) q
  96    . ;
  97    . ;  Loop  thru all  the VA HAC  programs  related to  this proc edure code  and deter mine
  98    . ;  the  278 action  code for  each of th em.
  99    . ;
  100    . f prog= 1,6,7 d:$d (^CHMSERV( index,102, prog))
  101    .. s test =$p(^(prog ,0),U,2),x prog=vapro g(prog)
  102    .. ; modi fied - fix  related t o sub-divi ded codes,  put error  back in ; ; MBJ/Harr is 4/30/13
  103    .. ;s act n=$$action (xprog,tes t) q:actn= ""
  104    .. s actn =$$action( xprog,test ) i actn=" " d error( 3,type,cod e) q
  105    .. ; end  4/30/13 mo ds
  106    .. ;
  107    .. ;  Rec ord the ac tion code  for later  processing  and updat e counter.
  108    .. ;
  109    .. s ^Cac heTemp.AFX ($j,type,c ode,prog)= actn
  110    .. s x=$i (^CacheTem p.AFF($j,t ype,prog))
  111    ;
  112    q
  113    ;
  114    ;
  115   action(pro g,test) ;   Determine  the appro priate 278  action co de based o n the prog ram's AI t est.
  116    ;
  117    ;  This r outine ret urns a sin gle 278 ac tion code  (NA/CT/A3)  based on  the given  AI
  118    ;  test.   The proce ssing logi c is as fo llows:
  119    ;
  120    ;    - if  the test  number is  missing (n ull), issu e a warnin g and skip  that prog ram
  121    ;    - if  the test  does not e xist, issu e a warnin g and skip  that prog ram
  122    ;    - if  the test  is marked  inactive,  then skip  that progr am (not ch ecked any  more!)
  123    ;    - if  a test do es not hav e an actio n code ass igned, iss ue an erro r
  124    ;    - if  the actio n code ass igned to a  test is n ot a valid  one, issu e a warmin g & skip
  125    ;
  126    ;  In an  ideal case , all the  programs p oint to th e same tes t, or at l east to te sts that
  127    ;  all ha ve the sam e action c ode. In th is case th at action  code is re turned as  the value
  128    ;  of thi s function . If multi ple action  codes are  determine d, then .. .
  129    ;
  130    ;  Note:  some local  variables  from the  calling le vel are us ed here!
  131    ;
  132    n actn,da te,xtest,x ,x0
  133    ;
  134    i test=""  d error(3 ,type,code ,prog) q " "
  135    i $d(^DIC (741100,te st))=0 d e rror(4,typ e,code,$lb (prog,test )) q ""
  136    s x0=^(te st,0),xtes t=$p(x0,U) ,date=$p(x 0,U,11),ac tn=$p(x0,U ,12)
  137    ;i +date, date<today  d error(5 ,type,code ,$lb(xprog ,xtest,$$d ate(date)) ) q ""
  138    i actn=""  d error(- 6,type,cod e,$lb(prog ,xtest)) q  ""
  139    i $d(vali d(actn))=0  d error(9 ,type,code ,$lb(prog, xtest,actn )) q ""
  140    ;
  141    ;  All ed it checks  pass, retu rn the ass ociated 27 8 Action C ode.
  142    ;
  143    q actn
  144    ;
  145    ;
  146   create ;   Create the  output fi le.
  147    ;
  148    ;  First  create the  278 code  file.
  149    ;
  150    s file=pa th_now_"_V AHAC.278"
  151    o file:(" WNS"):1 e   w "Failed  to create  output fi le ",file, ! s ecount =ecount+1  q
  152    u file
  153    ;
  154    s (type,c ode,prog)= ""
  155    f  s type =$o(^Cache Temp.AFX($ j,type)) q :type=""   d
  156    . f  s co de=$o(^Cac heTemp.AFX ($j,type,c ode)) q:co de=""  d
  157    .. f  s p rog=$o(^Ca cheTemp.AF X($j,type, code,prog) ) q:prog=" "  d
  158    ... s xpr og=$s(prog =1:"CVA",p rog=6:"SB" ,prog=7:"C WVV"),coun t=count+1
  159    ... ;s xp rog=$s(pro g=1:"CHAMP VA",prog=6 :"SB",prog =7:"CWVV") ,count=cou nt+1
  160    ... w typ e,U,code,U ,xprog,U,^ (prog),!
  161    ;
  162    c file u  $p
  163    q
  164    ;
  165    ;
  166   logfile ;   Create th e error &  warning lo g file.
  167    ;
  168    s lfile=p ath_now_"_ VAHAC.LOG"
  169    o lfile:( "WNS"):1 e   w "Faile d to creat e log file  ",lfile,!  s ecount= ecount+1 q
  170    u lfile
  171    ;
  172    d stat
  173    ;
  174    d:ecount= 0
  175    . w !,"Re cord count s by type  and progra m:",!!
  176    . w ?16,$ j("CVA",8) ,$j("SB",8 ),$j("CWVV ",8),!?4,$ e(ruler,1, 36),!
  177    . ;w ?16, $j("CHAMPV A",8),$j(" SB",8),$j( "CWVV",8), !?4,$e(rul er,1,36),!
  178    . s (type ,prog)=""
  179    . f  s ty pe=$o(^Cac heTemp.AFF ($j,type))  q:type=""   d
  180    .. w ?4,t ype,":",?1 6
  181    .. ;f pro g=1,6,7 w  $j(^CacheT emp.AFF($j ,type,prog ),8)
  182    .. f prog =1,6,7 w $ j($g(^Cach eTemp.AFF( $j,type,pr og)),8)
  183    .. w !
  184    ;
  185    i (ecount +wcount)>0  d
  186    . s n1=0, n2=n1+10,n 3=n2+12,n4 =n3+10
  187    . w !!,?n 1,"Type",? n2,"Code", ?n3,"Statu s",?n4,"De scription" ,!,ruler,!
  188    . s i=""
  189    . f  s i= $o(^CacheT emp.AFE($j ,i)) q:i=" "  d
  190    .. f j=1: 1:^CacheTe mp.AFE($j, i,0) d
  191    ... s x=^ (j),index= $li(x),typ e=$li(x,2) ,code=$li( x,3),x=$lg (x,4)
  192    ... s ix= $s(i<0:i*- 1,1:i),des c="Status  code "_i
  193    ... s:ix= 1 desc="No  VA HAC pr ogram asso ciated wit h this DX/ PX code"
  194    ... s:ix= 2 desc="Du plicate DX /PX code"
  195    ... s:ix= 3 desc="No  AI test a ssigned to  this code  in progra m "_x
  196    ... s:ix= 4 desc="Un known test  (internal  id "_$li( x,2)_") as signed to  this code  in program  "_$li(x)
  197    ... s:ix= 5 desc="In active tes t '"_$li(x ,2)_"', ex pired "_$l i(x,3)_",  assigned t o this cod e in progr am "_$li(x )
  198    ... s:ix= 6 desc="No  action co de assigne d to test  '"_$li(x,2 )_"' assoc iated with  this code  in progra m "_$li(x)
  199    ... s:ix= 7 desc="No  valid act ion codes  found for  this code  in any pro gram"
  200    ... s:ix= 8 desc="Am biguous ac tion codes  ("_$lts($ li(x,2))_" ) associat ed with th is code (" _$li(x)_"  used)"
  201    ... s:ix= 9 desc="In valid 278  action cod e "_$li(x, 3)_" assig ned to tes t '"_$li(x ,2)_"' ass ociated wi th this co de in prog ram "_$li( x)
  202    ... s:ix= 10 desc="C ode name i s a blank  or null st ring"
  203    ... s:ix= 11 desc="C ode type i s a null s tring"
  204    ... s:ix= 12 desc="P rocedure c ode is mar ked as ina ctive"
  205    ... s sta t=$s(i<0:" Error",1:" Warning")
  206    ... w ?n1 ,type,?n2, code,?n3,s tat,?n4,de sc,!
  207    ;
  208    c lfile u  $p
  209    ;
  210    q
  211    ;
  212    ;
  213   email ;  S end mail a bout file  creation e rrors to t he selecte d distribu tion lists .
  214    ;
  215    ;  First,  message b ody.
  216    ;
  217    s XMTEXT= "^UTILITY( $J,""AFF"" ,"
  218    k ^UTILIT Y($j,"AFF" )
  219    s ^UTILIT Y($j,"AFF" ,1,0)="Fai led to cre ate the 27 8 Code Fil e."
  220    s ^UTILIT Y($j,"AFF" ,2,0)="Ple ase see lo g file "_l file_" for  details."
  221    ;
  222    ;  Then,  subject an d recepien ts.
  223    ;
  224    s XMDUZ=. 5,XMSUB="C ache - 278  Code File  creation  error"
  225    s XMY("
P II                    ")=""
  226    s XMY(" PII                   ")=""
  227    ;s XMY("P II ")=""
  228    ;
  229    ;  Finall y, just se nd it.
  230    ;
  231    d ^XMD
  232    q
  233    ;
  234    ;
  235   error(id,t ype,code,o pt) ;
  236    ;
  237    ;  Error/ warning co des used:
  238    ;
  239    ;    1 no  VA progra ms found f or a DX/PX  code
  240    ;    2 du plicate DX /PX code
  241    ;    3 no  test numb er assigne d to a cod e (in a pr ogram)
  242    ;    4 un known test  number as signed to  a code
  243    ;    5 in active tes t assigned  to a code
  244    ;    6 no  action co de assigne d to a tes t associat ed with a  code
  245    ;    7 no  valid act ion codes  found for  a code (in  any progr am)
  246    ;    8 am biguous ac tion codes  associate d with a c ode (hiera rchy used)
  247    ;    9 in valid 278  action cod e assigned  to a test
  248    ;   10 nu ll code na me
  249    ;   11 co de type is  a null st ring
  250    ;   12 pr ocedure co de is mark ed as inac tive
  251    ;
  252    ;  Note:  the FileMa n file loo p index fr om the cal ling level  is used h ere!
  253    ;
  254    ;
  255    i (id<0)  s ecount=e count+1
  256    e  s wcou nt=wcount+ 1
  257    ;
  258    s ^($i(^C acheTemp.A FE($j,id,0 )))=$lb(in dex,type,c ode,opt)
  259    q
  260    ;
  261    ;
  262   stat ;  Pr int out st atistics.
  263    ;
  264    i ecount+ wcount=0 w  "No error s or warni ngs detect ed.",!
  265    e  i ecou nt=0 w "No  errors, b ut ",wcoun t," warnin g",$s(wcou nt=1:"",1: "s")," enc ountered", !
  266    e  w "Tot al ",ecoun t," error" ,$s(ecount =1:"",1:"s ")," and " ,wcount,"  warning",$ s(wcount=1 :"",1:"s") ," encount ered",!
  267    ;
  268    i ecount  w "No outp ut file cr eated due  to errors  encountere d",!
  269    e  w "Fil e ",file,"  created w ith ",coun t," record s",!
  270    ;
  271    q
  272    ;
  273    ;
  274   init ;  Co mmon local  initializ ations.
  275    ;
  276    s U="^",t ab=$c(9)                         ; Delimite rs
  277    ;s U="^", CSV=",",ta b=$c(9)               ; Delimite rs
  278    s (count, ecount,wco unt)=0                ; Counters
  279    s $p(rule r,"-",133) =""                   ; Ruler fo r log file  use
  280    ;
  281    ;  Output  file dire ctory (not e test env ironment s etup).
  282    ;
  283    s path="H AC_HFS$:[K ERMIT.278] " ; Target  directory
  284    i $zu(110 )="CACHEDE V" s path= "D:\Share\ Xfer\278\"
  285    ;
  286    ;  Date v alues for  the run da te.
  287    ;
  288    s now=$zd ($h,8),tod ay=$e(now, 1,2)-17_$e (now,3,*)
  289    ;
  290    ;  Initia lize local  arrays wi th valid 2 78 Action  Codes & VA  HAC progr ams.
  291    ;
  292    f x="A3", "CT","NA"  s valid(x) =""
  293    s vaprog( 1)="CVA"
  294    ;s vaprog (1)="CHAMP VA"
  295    s vaprog( 6)="SB"
  296    s vaprog( 7)="CWVV"
  297    ;
  298    ;  Tempor ary global s used:
  299    ;
  300    ;      ^C acheTemp.A FF($j)       counters  for DX/PX  code freq uency per  program
  301    ;      ^C acheTemp.A FX($j)       codes to  be writte n out to t he flat fi le
  302    ;      ^C acheTemp.A FE($j)       errors a nd warning s detected
  303    ;
  304   kill k ^Ca cheTemp.AF F($j),^Cac heTemp.AFX ($j),^Cach eTemp.AFE( $j)
  305    ;
  306    q
  307    ;
  308    ;
  309   isact(code ) ;  Check  whether a  procedure  code is a ctive or n ot.
  310    ;
  311    n x,date
  312    ; note -  ICD-10 inc rement 7 t esting fou nd bug in  line below , logged a s bug I7-2 4.  fixed  4/18/14 by  MBJ/Harri s
  313    ; s x=$o( ^CHMSERV(c ode,1,""))  q:x="" 0   ; changed  to "" fro m 0 per ro utine merg e 12/2013
  314    s x=$o(^C HMSERV(cod e,1,0)) q: x="" 0  ;  changed to  "" from 0  per routi ne merge 1 2/2013
  315    ; end bug  I7-24 fix
  316    s date=+$ g(^CHMSERV (code,1,x, 0)) q:date =0 1
  317    q $s(date <today:0,1 :1)
  318    ;
  319    ;
  320   isactdx(co de) ;  Che ck whether  a diagnos is code is  active or  not.
  321    ; this su broutine a dded for I CD-10
  322    ;
  323    n x,date
  324    s x=^CHMI CDX(code,0 ) q:x="" 0
  325    s date=+$ p(x,U,23)  q:date=0 1
  326    q $s(date <today:0,1 :1)
  327    ;
  328    ;
  329   date(d) ;   Convert F ileMan dat e into ext ernal form at.
  330    ;
  331    n c,y,m
  332    s c=$e(d) ,y=$e(d,2, 3),m=$e(d, 4,5),d=$e( d,6,7)
  333    s y=17+c* 100+y
  334    q m_"/"_d _"/"_y