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

LA81PRE.m

Go to the documentation of this file.
  1. LA81PRE ;VMP/RB-PURGE ALL INVALID VITEK NODES ^LRO(68,12,1,DATE,1,ACC#,1,4,WKLD CD,0) 1/7/2013
  1. ;;5.2;AUTOMATED LAB INSTRUMENTS;**81**;Sep 27, 1994;Build 2
  1. ;;
  1. ; Pre install routine in patch LA*5.2*81 that will purge erroneous
  1. ; entries in file# 68 that were caused by an incorrect node set
  1. ; when the results were set into file #68 for VITEK.
  1. ;
  1. ;Kill example: ^LRO(68,12,1,2980000,1,1596,1,4,1142,0)="^^52;1;3"
  1. ;Also, will check correct node ^LRO(68,12,1,2980000,1,1596,4,1142,0)
  1. ;to insure piece 3 is set. If not, will move erroneous node piece 3 to correct node:
  1. ;ex. ^LRO(68,12,1,2980000,1,1596,4,1142,0)="1142^9^^1315^2980224^^1^7087"
  1. ;;
  1. Q
  1. START N LRSTART,IEN68,LREND,LRAA,LRAD,LRAN,LRTEST,LRBAD,LRGOOD,TOT,TOT1,TOT2,TOT3,DATA
  1. I $D(^XTMP("LA81PRE")) Q
  1. D NOW^%DTC S LRSTART=%
  1. S ^XTMP("LA81PRE","START COMPILE")=LRSTART
  1. S ^XTMP("LA81PRE","END COMPILE")="RUNNING"
  1. S ^XTMP("LA81PRE",0)=$$FMADD^XLFDT(LRSTART,120)_"^"_LRSTART
  1. S U="^",LRAA=0,(TOT,TOT1,TOT2,TOT3)=0
  1. 1 S LRAA=$O(^LRO(68,LRAA)),LRAD=0 G EXIT:+LRAA=0
  1. 2 S LRAD=$O(^LRO(68,LRAA,1,LRAD)),LRAN=0 G 1:'LRAD
  1. 3 S LRAN=$O(^LRO(68,LRAA,1,LRAD,1,LRAN)),LRTEST=0 G 2:'LRAN
  1. S TOT=TOT+1
  1. I '$D(^LRO(68,LRAA,1,LRAD,1,LRAN,1,4)) G 3
  1. 4 S LRTEST=$O(^LRO(68,LRAA,1,LRAD,1,LRAN,1,4,LRTEST)) G 3:'LRTEST
  1. S TOT1=TOT1+1
  1. S LRBAD=$G(^LRO(68,LRAA,1,LRAD,1,LRAN,1,4,LRTEST,0)) G 3:LRBAD=""
  1. S LRGOOD=$G(^LRO(68,LRAA,1,LRAD,1,LRAN,4,LRTEST,0))
  1. I LRGOOD'="" D
  1. . I $P(LRGOOD,U,3)'="" Q
  1. . S DATA=$P(LRBAD,U,3)
  1. . S DA=LRTEST,DR="2///^S X=DATA"
  1. . S DIE="^LRO(68,LRAA,1,LRAD,1,LRAN,4," D ^DIE K DIE,DA,DR
  1. . S ^XTMP("LA81PRE",68,LRAA,1,LRAD,1,LRAN,1,4,LRTEST,1)=^LRO(68,LRAA,1,LRAD,1,LRAN,4,LRTEST,0)
  1. . S TOT2=TOT2+1
  1. S ^XTMP("LA81PRE",68,LRAA,1,LRAD,1,LRAN,1,4,LRTEST,0)=^LRO(68,LRAA,1,LRAD,1,LRAN,1,4,LRTEST,0)
  1. K ^LRO(68,LRAA,1,LRAD,1,LRAN,1,4,LRTEST,0)
  1. S TOT3=TOT3+1
  1. G 4
  1. EXIT ;
  1. D NOW^%DTC S LREND=%
  1. S ^XTMP("LA81PRE","TOTALS")=TOT_U_TOT1_U_TOT3
  1. S ^XTMP("LA81PRE","END COMPILE")=LREND
  1. W !!,"Number of File #68 accessions reviewed: ",TOT
  1. W !!,"Number of erroneous nodes found: ",TOT1
  1. W !!,"Number of good node 4 recs updated with DELETED rec field LOAD LIST ENTRY: ",TOT2
  1. W !!,"Number of erroneous nodes killed: ",TOT3
  1. K %
  1. Q