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

AUPNPOST.m

Go to the documentation of this file.
  1. AUPNPOST ; IHS/CMI/LAB - FIX INCOMPLETE V FILE ENTRIES CAUSED BY DICR BUG 24-MAY-1993 ;
  1. ;;99.1;IHS DICTIONARIES (PATIENT);;MAR 09, 1999
  1. INFORM ;
  1. W:$D(IOF) @IOF
  1. W !!,"This is the post init to the AUPN package. It will do the following:",!
  1. W !,"1. Move the .07 field of V DIAGNOSTIC PROCEDURE to field 1208."
  1. W !,"2. Move the .07 field of V Medication to 1202."
  1. W !,"3. Move the .09 field of V Lab to 1202."
  1. W !,"4. Reindex the AA xref on V CPT"
  1. W !,"5. Check to see if you are running MAS 5.0"
  1. VHOSP ;
  1. ;if running mas 5 do ^AUP1INIT
  1. S APCD("VERSION")="",APCD("VERSION")=$O(^DIC(9.4,"C","DG",APCD("VERSION"))) I APCD("VERSION")]"" S APCD("VERSION")=^DIC(9.4,APCD("VERSION"),"VERSION")
  1. I APCD("VERSION")>4.999 D
  1. .W !! F L=1:1:4 W *7,"*** ATTENTION ***" H 1 W:L'=4 *13,$J("",79),*13
  1. .W !!,$C(7),$C(7),$C(7),"YOU ARE RUNNING VERSION 5 OR GREATER OF ADT. PLEASE RUN ^AUP1INIT",!!
  1. CONT ;
  1. W !!,"If you are an alpha or beta site and this post-init was run successfully",!,"during a previous install, it does not have to run again. Answer YES"
  1. W !,"to the next question.",!
  1. S DIR(0)="Y",DIR("A")="Has this post-init been run to completion once before",DIR("B")="N" KILL DA D ^DIR KILL DIR
  1. I $D(DIRUT) W !!,"Please answer the question!" G CONT
  1. I Y G XIT
  1. QUEUE ;
  1. K ZTSK
  1. W !! S DIR(0)="Y",DIR("A")="Do you want to QUEUE this to run in the background",DIR("B")="N" D ^DIR K DIR S:$D(DUOUT) DIRUT=1
  1. I Y=1 D TSKMN Q
  1. PROCESS ;
  1. S AUPNBT=$H
  1. VDXP ;
  1. W:'$D(ZTQUEUED) !,"Moving .07 of V DIAGNOSTIC PROCEDURE to 1208..."
  1. S X=0 F S X=$O(^AUPNVDXP(X)) Q:X'=+X I $P(^AUPNVDXP(X,0),U,7)]"" S $P(^AUPNVDXP(X,12),U,8)=$P(^AUPNVDXP(X,0),U,7),$P(^AUPNVDXP(X,0),U,7)=""
  1. W:'$D(ZTQUEUED) " Done"
  1. VPRV ;move provider fields
  1. I '$D(ZTQUEUED) W !,"The obsolete .07 in VLAB and the .09 in V MEDICATION are being moved to the",!,"1202 field. Please wait, a dot will print for every 5000 entries.",!,"This will take awhile."
  1. ;MOVE V MED .09 TO 1202
  1. W:'$D(ZTQUEUED) !,"Processing V MEDICATION"
  1. S (X,C)=0 F S X=$O(^AUPNVMED(X)) Q:X'=+X I $P($G(^AUPNVMED(X,12)),U,2)="",$P($G(^AUPNVMED(X,0)),U,9) S $P(^AUPNVMED(X,12),U,2)=$P(^AUPNVMED(X,0),U,9),$P(^AUPNVMED(X,0),U,9)="",C=C+1 I '$D(ZTQUEUED),'(C#5000) W "."
  1. W:'$D(ZTQUEUED) " Done"
  1. W:'$D(ZTQUEUED) !,"Processing V LAB"
  1. S (X,C)=0 F S X=$O(^AUPNVLAB(X)) Q:X'=+X I $P($G(^AUPNVLAB(X,12)),U,2)="",$P($G(^AUPNVLAB(X,0)),U,7) S $P(^AUPNVLAB(X,12),U,2)=$P(^AUPNVLAB(X,0),U,7),$P(^AUPNVLAB(X,0),U,7)="",C=C+1 I '$D(ZTQUEUED),'(C#5000) W "."
  1. CPT ;reindex AA on V CPT
  1. W:'$D(ZTQUEUED) !!,"Reindexing AA on V CPT",!
  1. K ^AUPNVCPT("AA")
  1. S DIK="^AUPNVCPT(",DIK(1)=".03^AA" D ENALL^DIK
  1. MSG ;send mail message when done
  1. W:'$D(ZTQUEUED) !!,"ALL DONE!!!"
  1. S AUPNET=$H D DONE
  1. ;SEND MESSAGE
  1. S XMDUZ=.5
  1. S AUPNPOST(1,0)="The AUPN package post init successfully completed on "_$$HTE^XLFDT($H,2),XMTEXT="AUPNPOST("
  1. S XMSUB="AUPN POST INIT COMPLETION"
  1. S X=DUZ,XMY(X)=""
  1. D ^XMD K XMY,XMTEXT
  1. D XIT
  1. Q
  1. TSKMN ;
  1. S ZTIO="",ZTRTN="PROCESS^AUPNPOST",ZTDTH="",ZTDESC="AUPN PACKAGE POST-INIT" D ^%ZTLOAD D XIT K ZTSK Q
  1. XIT ;
  1. K X,Y,DIE,DIU,DIV,DR,DA,XMTEXT,AUPNPOST,AUPNBT,AUPNET,DIC,C,DIK,XMDUZ,XMZ,AUPN
  1. Q
  1. DONE ;ENTRY POINT - END OF REPORT TIME DISPLAY
  1. I $D(AUPNET) S AUPNTS=(86400*($P(AUPNET,",")-$P(AUPNBT,",")))+($P(AUPNET,",",2)-$P(AUPNBT,",",2)),AUPNH=$P(AUPNTS/3600,".") S:AUPNH="" AUPNH=0 D
  1. .S AUPNTS=AUPNTS-(AUPNH*3600),AUPNM=$P(AUPNTS/60,".") S:AUPNM="" AUPNM=0 S AUPNTS=AUPNTS-(AUPNM*60),AUPNS=AUPNTS S AUPNPOST(2,0)="",AUPNPOST(3,0)="RUN TIME (H.M.S): "_AUPNH_"."_AUPNM_"."_AUPNS
  1. K AUPNTS,AUPNS,AUPNH,AUPNM,AUPNET
  1. Q