APSPCP ; IHS/DSD/ENM - CHRONIC MED PROFILE INPUT TRANS ; [ 09/03/97 1:30 PM ]
;;6.0;IHS PHARMACY MODIFICATIONS;;09/03/97
;This routine was created in place of an input transform for the
;'SIG' field in file 52.
EP ;
S APSPZW=$S($D(%APSITE):$P(%APSITE,U,4),$D(^APSPCTRL(PSOSITE,0)):$P(^(0),U,4),1:31),APSPZW=APSPZW-5 D:$D(X) ZZ1 K APSPZW ;IHS/DSD/ENM 08/01/96
Q
ZZ1 S SIG="" F Z0=1:1 Q:$P(X," ",Z0,99)="" S Z1=$P(X," ",Z0) K:$L(Z1)>APSPZW X W:$L(Z1)>APSPZW !,?5,"MAX OF ",APSPZW," CHARACTERS ALLOWED BETWEEN SPACES." Q:$L(Z1)>APSPZW D:Z1]"" ZZ2 S SIG=SIG_$E(" ",Z0>1)_Z1
Q
ZZ2 S Y=$O(^PS(51,"B",Z1,0)) Q:Y="" S Z1=$P(^PS(51,Y,0),U,2) Q:'$D(^(9)) S Y=$P(X," ",Z0-1),Y=$E(Y,$L(Y)) S:Y>1 Z1=^(9)
Q
APSPCP ; IHS/DSD/ENM - CHRONIC MED PROFILE INPUT TRANS ; [ 09/03/97 1:30 PM ]
+1 ;;6.0;IHS PHARMACY MODIFICATIONS;;09/03/97
+2 ;This routine was created in place of an input transform for the
+3 ;'SIG' field in file 52.
EP ;
+1 ;IHS/DSD/ENM 08/01/96
SET APSPZW=$SELECT($DATA(%APSITE):$PIECE(%APSITE,U,4),$DATA(^APSPCTRL(PSOSITE,0)):$PIECE(^(0),U,4),1:31)
SET APSPZW=APSPZW-5
IF $DATA(X)
DO ZZ1
KILL APSPZW
+2 QUIT
ZZ1 SET SIG=""
FOR Z0=1:1
IF $PIECE(X," ",Z0,99)=""
QUIT
SET Z1=$PIECE(X," ",Z0)
IF $LENGTH(Z1)>APSPZW
KILL X
IF $LENGTH(Z1)>APSPZW
WRITE !,?5,"MAX OF ",APSPZW," CHARACTERS ALLOWED BETWEEN SPACES."
IF $LENGTH(Z1)>APSPZW
QUIT
IF Z1]""
DO ZZ2
SET SIG=SIG_$EXTRACT(" ",Z0>1)_Z1
+1 QUIT
ZZ2 SET Y=$ORDER(^PS(51,"B",Z1,0))
IF Y=""
QUIT
SET Z1=$PIECE(^PS(51,Y,0),U,2)
IF '$DATA(^(9))
QUIT
SET Y=$PIECE(X," ",Z0-1)
SET Y=$EXTRACT(Y,$LENGTH(Y))
IF Y>1
SET Z1=^(9)
+1 QUIT