IBXEX1 ; ;10/25/02
S X=DG(DQ),DIC=DIE
S ^IBA(354.1,"AA",$E(X,1,30),DA)=""
S X=DG(DQ),DIC=DIE
N IBX S IBX=^IBA(354.1,DA,0) I +X,$P(IBX,U,2),$P(IBX,U,3),$P(IBX,U,4)'="" S ^IBA(354.1,"AIVDT",+$P(IBX,U,3),+$P(IBX,U,2),-($P(IBX,U)),DA)=""
S X=DG(DQ),DIC=DIE
I X,+$P(^IBA(354.1,DA,0),U,2),+$P(^(0),U,3),+^(0) S ^IBA(354.1,"ACY",+$P(^(0),U,3),+$P(^(0),U,2),+$E($P(^(0),U),1,3),DA)=""
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIBXEX1 390 printed Nov 22, 2024@17:39:37 Page 2
IBXEX1 ; ;10/25/02
+1 SET X=DG(DQ)
SET DIC=DIE
+2 SET ^IBA(354.1,"AA",$EXTRACT(X,1,30),DA)=""
+3 SET X=DG(DQ)
SET DIC=DIE
+4 NEW IBX
SET IBX=^IBA(354.1,DA,0)
IF +X
IF $PIECE(IBX,U,2)
IF $PIECE(IBX,U,3)
IF $PIECE(IBX,U,4)'=""
SET ^IBA(354.1,"AIVDT",+$PIECE(IBX,U,3),+$PIECE(IBX,U,2),-($PIECE(IBX,U)),DA)=""
+5 SET X=DG(DQ)
SET DIC=DIE
+6 IF X
IF +$PIECE(^IBA(354.1,DA,0),U,2)
IF +$PIECE(^(0),U,3)
IF +^(0)
SET ^IBA(354.1,"ACY",+$PIECE(^(0),U,3),+$PIECE(^(0),U,2),+$EXTRACT($PIECE(^(0),U),1,3),DA)=""