DDSFO ;SFISC/MKO-FORM ONLY FIELDS ;1:52 PM 19 Jun 1998
;;22.0;VA FileMan;;Mar 30, 1999
;Per VHA Directive 10-93-142, this routine should not be modified.
DIR ;Setup input variables to DIR
N I,J
S DIR(0)=$P(DDSO(20),U)_$P(DDSO(20),U,2,3)
S:DIR(0)?1"DD".E DIR(0)=$P(DIR(0),U,2,999)
S:$P(DIR(0),U)'["O" $P(DIR(0),U)=$P(DIR(0),U)_"O"
I $P(DIR(0),U)["P",$P($P(DIR(0),U,2),":",2)'["Z" D
. S I=$P(DIR(0),U,2) Q:$P(I,":",2)["Z"
. S $P(I,":",2)=$P(I,":",2)_"Z"
. S $P(DIR(0),U,2)=I
S:$G(^DIST(.404,DDSBK,40,DDO,22))'?."^" $P(DIR(0),U,3)=^(22)
I $D(^DIST(.404,DDSBK,40,DDO,21)) D
. S (I,J)=0
. F S I=$O(^DIST(.404,DDSBK,40,DDO,21,I)) Q:I="" I $D(^(I,0))#2 S J=J+1,DIR("?",J)=^(0)
. I J>0 S DIR("?")=DIR("?",J) K DIR("?",J)
X:$G(^DIST(.404,DDSBK,40,DDO,24))'?."^" ^(24)
Q
DDSFO ;SFISC/MKO-FORM ONLY FIELDS ;1:52 PM 19 Jun 1998
+1 ;;22.0;VA FileMan;;Mar 30, 1999
+2 ;Per VHA Directive 10-93-142, this routine should not be modified.
DIR ;Setup input variables to DIR
+1 NEW I,J
+2 SET DIR(0)=$PIECE(DDSO(20),U)_$PIECE(DDSO(20),U,2,3)
+3 IF DIR(0)?1"DD".E
SET DIR(0)=$PIECE(DIR(0),U,2,999)
+4 IF $PIECE(DIR(0),U)'["O"
SET $PIECE(DIR(0),U)=$PIECE(DIR(0),U)_"O"
+5 IF $PIECE(DIR(0),U)["P"
IF $PIECE($PIECE(DIR(0),U,2),":",2)'["Z"
Begin DoDot:1
+6 SET I=$PIECE(DIR(0),U,2)
IF $PIECE(I,"
QUIT
+7 SET $PIECE(I,":",2)=$PIECE(I,":",2)_"Z"
+8 SET $PIECE(DIR(0),U,2)=I
End DoDot:1
+9 IF $GET(^DIST(.404,DDSBK,40,DDO,22))'?."^"
SET $PIECE(DIR(0),U,3)=^(22)
+10 IF $DATA(^DIST(.404,DDSBK,40,DDO,21))
Begin DoDot:1
+11 SET (I,J)=0
+12 FOR
SET I=$ORDER(^DIST(.404,DDSBK,40,DDO,21,I))
IF I=""
QUIT
IF $DATA(^(I,0))#2
SET J=J+1
SET DIR("?",J)=^(0)
+13 IF J>0
SET DIR("?")=DIR("?",J)
KILL DIR("?",J)
End DoDot:1
+14 IF $GET(^DIST(.404,DDSBK,40,DDO,24))'?."^"
XECUTE ^(24)
+15 QUIT