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

APSQBEG.m

Go to the documentation of this file.
APSQBEG ;IHS/ASDS/ENM/POC - ROUTINE TO START INIT 
 ;;6.0;IHS PHARMACY MODIFICATIONS;**3**;FEB 20, 2001
 D ^APSQINIT
 D POST^APSQCK
 D RTN
 Q
 S PACKAGE="DFDFDF"
 W !,"DELETING PACKAGE "_PACKAGE
 S X=$O(^DIC(9.4,"B",PACKAGE,""))
 D:$G(X)'=""
 .S DA=X,DIK="^DIK(9.4," D ^DIK K DIK
 K PACKAGE,X
RTN ;
 F II=1:1 S LINE=$P($T(INITD+II),";;",2) Q:LINE="END"  D
 .F JJ=1:1 S RTN=$P(LINE,",",JJ) Q:RTN=""  D
 ..S X=RTN X ^%ZOSF("DEL")
 ..W !,RTN," GONE!"
 K II,JJ,RTN,LINE
 Q
INITD ;RTNS TO DELETE
 ;;APSQI001,APSQI002,APSQI003,APSQI004,APSQI005,APSQI006,APSQI007
 ;;APSQI008,APSQI009,APSQI00A,APSQI00B,APSQI00C,APSQI00D,APSQI00E
 ;;APSQI00F,APSQI00G,APSQI00H,APSQI00I,APSQI00J,APSQI00K,APSQI00L
 ;;APSQI00M,APSQI00N,APSQINI1,APSQINI2,APSQINI3,APSQINI4,APSQINI5
 ;;APSQINIT,APSQI00O,APSQI00P
 ;;END
 Q
 ;
ADLN ;ADD LINES TO ROUTINES PSODRG,PSON52,PSORN52,PSORXDL,PSORXI
 ;DO NOT ADD ENTRY TO INTERVENTION FILE FOR NON FORMULARY ITEM-ALREAY 10
 S DIC="^DIC(9.4,",X="PSO",DIC(0)="MX"
 D ^DIC K DIC
 I Y<1 W !,"WHERE IS PACKAGE PACKAGE-SOMETHING WRONG" D END Q
 S X=+$G(^DIC(9.4,+Y,"VERSION"))
 I X'[6.0 W !,"NOT THE RIGHT VERSION?" D END Q
 F X="PSODRG","PSON52","PSORN52","PSORXDL","PSORXI" D
 .S RTN=X
 .X ^%ZOSF("TEST") I '$T W !,"ROUTINE ",X," DOES NOT EXIST-??" Q
 .K ^UTILITY("SCRATCH",$J),QUIT
 .;LOAD PORTION TO A UTILITY GLOBAL
 .S XCNP=0,DIF="^UTILITY(""SCRATCH"",$J,"
 .X ^%ZOSF("LOAD")
 .;NOW CHECK
 .S STOP=0
 .;S CHECKIEN="" F  S CHECKIEN=$O(^UTILITY("SCRATCH",$J,CHECKIEN)) Q:CHECKIEN=""  S CHECK=^(CHECKIEN,0) I CHECK["S X=""APSQCK""" W !,"ROUTINE ",RTN," ALREADY CONTAINS A REFERENCE TO 'APSQCK'" S STOP=1 Q
 .;
 .S CHECKIEN="" F  S CHECKIEN=$O(^UTILITY("SCRATCH",$J,CHECKIEN)) Q:CHECKIEN=""  S CHECK=^(CHECKIEN,0) I CHECK[$S(RTN="PSORXI":"$G(PSORX(""INTERVENE""))=4",1:"S X=""APSQCK""") W !,"ROUTINE ",RTN," ALREADY CONTAINS A REF TO 'APSQCK'" S STOP=1 Q
 .I STOP D END Q
 .;
 .F KK=1:1 S TEXTCH=$P($T(TEXTCH+KK),";;",2) Q:TEXTCH="END"  I $P(TEXTCH,"~",1)=RTN S CHECKIT=$P(TEXTCH,"~",2) Q
 .I $G(CHECKIT)']"" D END Q
 .S CHECKIEN="" F  S CHECKIEN=$O(^UTILITY("SCRATCH",$J,CHECKIEN)) Q:CHECKIEN=""  S CHECK=^(CHECKIEN,0) I CHECK[CHECKIT S CHECKPUT=$O(^UTILITY("SCRATCH",$J,CHECKIEN),-1) Q
 .I $G(CHECKPUT)']"" D END Q
 .F JJ=1:1 S TEXT=$P($T(TEXT+JJ),";;",2) Q:TEXT="END"  D
 ..Q:$P(TEXT,"~",1)'=RTN
 ..S ^UTILITY("SCRATCH",$J,CHECKPUT_$P(TEXT,"~",2),0)=$P(TEXT,"~",3)
 .;SAVE BACK AS ROUTINE
 .S X=RTN,XCN=0,DIE="^UTILITY(""SCRATCH"",$J,"
 .X ^%ZOSF("SAVE")
 .K ^UTILITY("SCRATCH",$J)
 .K CHECKIT,CHECK,CHECKIEN,STOP,CHECKPUT
 .W !,"ROUTINE ",RTN," HAS BEEN MODIFIED!!"
 .Q
 ;Q
 ;
END ;
 K ^UTILITY("SCRATCH",$J)
 K CHECKIT,CHECK,CHECKIEN,STOP,CHECKPUT,TEXT,TEXTCH,%,%N,XCNP,RTN,DIF
 K DIC,DA,JJ,KK,DIE,STOP,X,Y
 Q
 ;
TEXT ;;
 ;;PSODRG~.1~ D POSTX ;IHS/OKCAO/POC 9/28/98
 ;;PSODRG~.2~ S X="APSQCK" X ^%ZOSF("TEST") I $T D RX^APSQCK D:$G(PSORX("INTERVENE"))]"" ^PSORXI G:PSORX("DFLG") POSTX ;IHS/OKCAO/POC 9/28/98
 ;;PSODRG~.3~ D POSTX ;IHS/OKCAO/POC 9/28/98
 ;;PSON52~.1~ S X="APSQCK" X ^%ZOSF("TEST") I $T S NFRXIEN=PSOX("IRXN") D RXSET^APSQCK ;IHS/OKCAO/POC 9/28/98
 ;;PSORN52~.1~ S X="APSQCK" X ^%ZOSF("TEST") I $T S NFRXIEN=PSOX("IRXN") D RXSET^APSQCK ;IHS/OKCAO/POC 9/28/98
 ;;PSORXDL~.1~ S X="APSQCK" X ^%ZOSF("TEST") I $T S NFRXIEN=DA D RXSETK^APSQCK ;IHS/OKCAO/POC 928/98 DELETE PRESCRIPTION FIELD IN FILE NON FORMULARY REQUEST
 ;;PSORXI~.1~ S DIC("DR")=DIC("DR")_$S($G(PSORX("INTERVENE"))=1:";.07////"_APSPCRI,$G(PSORX("INTERVENE"))=2:";.07////"_APSPSIG,$G(PSORX("INTERVENE"))=3:";.07////6",$G(PSORX("INTERVENE"))=4:";.07////10",1:"")_";.14////0"_";.16////"_$S($G(PSOSITE)]"":PSOSITE,1:"") ;IHS/DSD ENM POC 05/08/98 IHS/OKCAO/POC 928/98 ADDED NON FORMULARY REQUEST
 ;;END
 ;
TEXTCH ;;
 ;;PSODRG~D:$P($G(^PSDRUG(PSODRUG("IEN"),"CLOZ1")),"^")]""
 ;;PSON52~D EOJ
 ;;PSORN52~D EOJ
 ;;PSORXDL~I $G(^PSRX(DA,"H"))]"" K ^PSRX("AH",
 ;;PSORXI~D FILE^DICN K DIC,DR,DA
 ;;END