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

ACHSREV.m

Go to the documentation of this file.
  1. ACHSREV ; IHS/ITSC/PMF - STANDALONE TO CLEAN AUTTREVN CROSS-REFERENCES ; [ 10/16/2001 8:16 AM ]
  1. ;;3.1;CONTRACT HEALTH MGMT SYSTEM;;JUN 11, 2001
  1. ;
  1. ;NOTE: Currently, the diag lines are in effect
  1. ;It is recommended that this routine be run with diag lines in effect
  1. ;
  1. ;When it is determined that the nodes that display on the screen are
  1. ;the correct nodes to be killed, disable the 3 diag lines and then run
  1. ;
  1. ;EP
  1. D REV,ADA,CPT
  1. Q
  1. REV S (REV,TOT)=0
  1. F S REV=$O(^AUTTREVN(REV)) Q:'REV D
  1. .S TMP=$G(^AUTTREVN(REV,0))
  1. .D CK
  1. Q
  1. CK ; Find unknown description in 0 node and kill X-references
  1. ; Leave 0 node in case of pointers in other files
  1. ; REVN=The real revenue code in the .01 field
  1. ; REV will be the bogus code set by chs
  1. Q:TMP'["unknown"
  1. DIAG ;
  1. W !,REV,?10,TMP S TOT=TOT+1 Q
  1. S REVN=$P(TMP,"^",1),DESC=$P(TMP,"^",2)
  1. K ^AUTTREVN("B",REVN,REV)
  1. K ^AUTTREVN("C",DESC,REV)
  1. K ^AUTTREVN("E",DESC,REV)
  1. S TOT=TOT+1
  1. Q
  1. ADA S (ADA,TOT)=0
  1. F S ADA=$O(^AUTTADA(ADA)) Q:'ADA D
  1. .S TMP=$G(^AUTTADA(ADA,0))
  1. .D CK2
  1. Q
  1. CK2 ; Find unknown description in 0 node and kill X-references
  1. Q:$P(TMP,"^",2)'="unknown"
  1. DIAG2 ;
  1. W !,ADA,?10,TMP S TOT=TOT+1 Q
  1. S ADAN=$P(TMP,"^",1),DESC=$P(TMP,"^",2)
  1. K ^AUTTADA("B",ADAN,ADA)
  1. K ^AUTTADA("C",DESC,ADA)
  1. S TOT=TOT+1
  1. Q
  1. CPT ;
  1. S (CPT,TOT)=0
  1. F S CPT=$O(^ICPT(CPT)) Q:'CPT D
  1. .S TMP=$G(^ICPT(CPT,0))
  1. .D CK3
  1. Q
  1. CK3 ; Find unknown description in 0 node and kill X-references
  1. ; Leave 0 node in case of pointers in other files
  1. ; CPTN=The real revenue code in the .01 field
  1. ; CPT will be the bogus code set by chs
  1. Q:TMP'["unknown"
  1. DIAG3 ;
  1. W !,CPT,?10,TMP S TOT=TOT+1 Q
  1. S CPTN=$P(TMP,"^",1),DESC=$P(TMP,"^",2)
  1. K ^ICPT("B",CPTN,CPT)
  1. K ^ICPT("C",DESC,CPT)
  1. K ^ICPT("E",DESC,CPT)
  1. S TOT=TOT+1
  1. Q