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

AUMPRE33.m

Go to the documentation of this file.
  1. AUMPRE33 ;IHS/OIT/CLS - AUM 9.1 patch 3 pre-init ;
  1. ;;9.1;AUM SCB UPDATE;**3**;NOV 11, 2008
  1. ;
  1. ; This is the pre-init for AUM*9.1*3. It strips the semicolons
  1. ; out of the ^AUTTEDT global prior to the install of the patch.
  1. ;
  1. ; Based on routine 2008 04 18-20 created by Rick Marshall
  1. ;
  1. QUIT ; This routine should not be called at the top or anywhere
  1. ; else. It is only to be called at START by AUMPRE31 as the pre-init
  1. ; for AUM*9.1*3.
  1. ;
  1. START ; AUM*9.1*3 PRE-INIT ; Resets .01 nodes of entries with semicolons
  1. ;
  1. D CHECK,CLEANUP
  1. Q
  1. ;
  1. CHECK ; troubleshooting entry point
  1. ;
  1. N AUMCNTC S AUMCNTC=0 ; how many nodes had semicolons
  1. N AUMDA ; DA equivalent
  1. ;
  1. S AUMDA=0
  1. F S AUMDA=$O(^AUTTEDT(AUMDA)) Q:'AUMDA I $P(^AUTTEDT(AUMDA,0),"^")[";" D
  1. . ;
  1. . S AUMCNTC=AUMCNTC+1 ; add to our count of instances
  1. . W "=",AUMDA,"=" ; note presence of semicolon
  1. . W !,$P(^AUTTEDT(AUMDA,0),"^"),! ; write node
  1. ;
  1. W !!,"Number of nodes with semicolons: ",AUMCNTC
  1. QUIT ; end of CHECK
  1. ;
  1. CLEANUP ; replace entries with "CODE-PCC DATA ENTRY EDUC TOPIC"
  1. ;
  1. N AUMCNTC S AUMCNTC=0 ; how many nodes with semicolons are processed
  1. N AUMDA ; DA equivalent
  1. N AUM2P ; mnemonic from second piece of zero node
  1. N AUMCD ; ICD or CPT code from second piece
  1. N AUMMN ; PCC DATA ENTRY EDUC TOPIC mnemonic
  1. N AUMNN ; IEN, .01, finally new name for EDUCATION TOPIC file entry
  1. ;
  1. S AUMDA=0
  1. F S AUMDA=$O(^AUTTEDT(AUMDA)) Q:'AUMDA I $P(^AUTTEDT(AUMDA,0),"^")[";" D
  1. . ;
  1. . S AUMCNTC=AUMCNTC+1 ; add to our count of instances
  1. . S AUM2P=$P(^AUTTEDT(AUMDA,0),"^",2) ; get mnemonic from primary file #9999999.09
  1. . S AUMCD=$P(AUM2P,"-") ; get ICD/CPT code
  1. . S AUMMN=$P(AUM2P,"-",2) ; get mnemonic from secondary file #9001002.5
  1. . S AUMNN=$O(^APCDEDCV("C",AUMMN,0)) ; get ien of entry in secondary file
  1. . S AUMNN=$P(^APCDEDCV(AUMNN,0),"^") ; get .01 of entry in secondary file
  1. . S AUMNN=AUMCD_"-"_AUMNN ; create new .01 for primary file
  1. . S $P(^AUTTEDT(AUMDA,0),"^",1)=AUMNN ; set replacement for .01 in primary file
  1. . W "=",AUMDA,"=" ; note presence of semicolon - corrected
  1. . W !,$P(^AUTTEDT(AUMDA,0),"^"),! ; write new node
  1. ;
  1. W !!,"Number of nodes with semicolons that were cleaned up: ",AUMCNTC
  1. QUIT ; end of CHECK
  1. ;
  1. ; end of routine AUMPRE33