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

AUPNVDXP.m

Go to the documentation of this file.
AUPNVDXP ; IHS/CMI/LAB - CHECKS VALUES FOR AUPNVDXP (DIAGNOSTIC PROCEDURE RESULTS 9000010.21) 24-MAY-1993 ;
 ;;2.0;IHS PCC SUITE;;MAY 14, 2009
 N %
 S AUPNDXR=+^AUPNVDXP(DA,0) I 'AUPNDXR K X G EXIT
 S %=$G(^AUTTDXPR(AUPNDXR,0)),AUPNDXTP=$P(%,U,2),AUPNDXPM=$P(%,U,3)
 I AUPNDXTP="" K X G EXIT
 I $G(AUPNDXQF)="S" D AQ^AUPNVDXQ G EXIT
 I $G(AUPNDXQF)="K" D AQKILL^AUPNVDXQ G EXIT
 I $G(AUPNDXQF)="S1" D AQ1^AUPNVDXQ G EXIT
 I $G(AUPNDXQF)="K1" D AQKILL1^AUPNVDXQ G EXIT
 I $D(AUPNDXTF) N AUPNDXVV,AUPNDXPP D PTR D:$D(AUPNDXTF) @("TR"_AUPNDXTP) G EXIT
 ; I $D(AUPNDXTP) D TP G EXIT
 D @("IT"_AUPNDXTP)
EXIT K AUPNDXR,AUPNDXTP,AUPNDXPM,AUPNDXQF,AUPNDXTF,AUPNDXTP
 Q
 ;
ITS ; CKECKS SET OF CODES
ITG ; CHECKS GROUP
 I $G(AUPNDXPM)="" K X Q
 N A S A=";"_AUPNDXPM
 I A[(";"_X_":") Q
 ;I A[":"_X_";" S X=$P($P(A,":"_X),";",2) Q
 ;I A[(":"_X_";") S X=$P($P(A,":",X),";",2) Q
 I A[(":"_X) D  Q
 .S X=$P(A,X,1)
 .N L S L=$L(X,";")
 .S X=$P(X,";",L)
 .S X=$P(X,":",1)
 K X
 Q
 ;
ITL ; CHECKS POINTER
 Q
 ;
ITN ; CHECKS NUMBERS
 N A,B,C
 I AUPNDXPM="" K X Q
 S A=$P(AUPNDXPM,";"),B=$P(AUPNDXPM,";",2),C=$P(AUPNDXPM,";",3)
 I (A'=+A)!(B'=+B) K X Q
 I X>A!(X<B) K X
 I $L($P(X,".",2))>C K X Q
 Q
 ;
HELP ;EP - HELP MESSAGE GENERATOR
 N AUPNDXDA S AUPNDXDA=DA
 N DIC,DIJ,DP,B,X,Y,P,DIA,DA
 N D,DC,DE,DG,DH,DI,DIP,DIE,DIEL,DIFLD,DK,DL,DM,DP,DQ,DR,DSC,DV,DU,DW,DXS,DZ,L
 S IOP=0,DIC="^AUTTDXPR(",FLDS=3,BY="@NUMBER",(FR,TO)=+^AUPNVDXP(AUPNDXDA,0),DHD="@"
 D EN1^DIP
 Q
 ;
TRG ;
TRL ;
TRS ; TRIGGERS SET OF CODE RESULTS
 S X=""
 Q
 ;
TRN ; TRIGGERS NUMBERS
 N A,B,C,D,% S %=AUPNDXPP
 S A=$P(%,";"),B=$P(%,";",2),C=$P(%,";",3),D=$P(%,";",4)
 I (A'=+A)!(B'=+B)!(C'=+C)!(D'=+D) S X="" Q
 S %=AUPNDXVV,X=$S(%>C:"H*",%<D:"L*",%>A:"H",%<B:"L",1:"")
 Q
 ;
TP ; TRIGGER PARAMS INTO PARAMS FIELD
 N Z,% S %=$P($G(APCDTRQ),"~",2,9),Z=$G(AUPNDXPM)
 I Z=""!(%="") S X="" Q
 S X=$TR(%,"~",";")_";"_$P(AUPNDXPM,";",4)
 Q
 ;
PTR S X="" N %
 I '$G(DA) Q
 S %=$G(^AUPNVDXP(DA,0))
 S AUPNDXVV=$P(%,U,4),AUPNDXPP=$P(%,U,6)
 I AUPNDXVV=""!(AUPNDXPP)="" K AUPNDXTF Q