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

RTTR.m

Go to the documentation of this file.
  1. RTTR ;ISC-ALBANY/PKE;Record Transfer Option ; ; 9/10/90 14:24 ;
  1. ;;v 2.0;Record Tracking;;10/22/91
  1. D DT^DICRW S X=$T(+1),DIK="^DOPT("""_$P(X," ;",1)_"""," G:$D(^DOPT($P(X," ;"),10)) A S ^DOPT($P(X," ;"),0)=$P(X,";",3)_"^1N^" F I=1:1 S Y=$T(@I) Q:Y="" S ^DOPT($P(X," ;"),I,0)=$P(Y,";",3,99)
  1. D IXALL^DIK
  1. A D OVERALL^RTPSET Q:$D(XQUIT) W !! S DIC="^DOPT("""_$P($T(+1)," ;")_""",",DIC(0)="IQEAMZ" D ^DIC Q:Y<0 D @+Y G A
  1. ;
  1. 1 ;;Transfer a Record to another Institution
  1. ; include reply
  1. W ! K RTB,RTJST S X="TRANSFER TO" D LK I RTINACFL D TFR^RTSYS I Y>0 S RTKEY=1,RTB=+Y D DR^RTDPA3,CO^RTT I $D(RTPAST),RTPAST'<DT,'$D(RTJST) D A^RTTR2
  1. Q K RTKEY,RTFIN,RTINACFL,RTB,RTPAST,RTJST
  1. K ^TMP($J,"RT"),RTAR,RTV,J,DA,DIE,DIC,DR Q
  1. ;
  1. 2 ;;Return transferred Record from another Institution
  1. W ! K RTB S X="TRANSFER BACK" D LK I 'RTINACFL D CI^RTT
  1. G Q
  1. ;
  1. 3 ;;Create Record/volume from another Institution
  1. G TRAN^RTDPA1
  1. ;
  1. 4 ;;Request Transfer from another Institution
  1. G 4^RTTR1
  1. Q
  1. LK S DIC="^DIC(195.3,",DIC(0)="IEMQEZ",DIC("S")="I $P(^(0),U,3)=+RTAPL" D ^DIC K DIC Q:Y<0 S RTMV=+Y,RTMV0=Y(0),RTINACFL=$P(Y(0),"^")["TRANSFER TO"
  1. Q
  1. DAT ;to allow backdating of record transfers to institutions
  1. ;RTPAST used in rt charge template
  1. S DIR(0)="D^:NOW:AETX",DIR("A")="Enter the date of Transfer",DIR("B")="NOW" D ^DIR K DIR Q:$D(DUOUT)!($D(DTOUT)) S RTPAST=Y Q
  1. ;
  1. INST S A=+RTAPL D DIC^RTDPA31 S DIC="^RTV(195.9,",DIC("A")="Select Institution: "
  1. S DIC(0)="IAEMQ",DIC("S")="S Z0=^(0),Z=$P($P(Z0,U),"";"",2) I Z=""DIC(4,"",$P(Z0,U,3)="_+RTAPL_" D DICS1^RTDPA31"
  1. Q
  1. SM ;site manager instituition/borrower setup
  1. D DIP W !!,"Remote Institution Parameters:",!,"-----------------------------"
  1. RE D INST,^DIC I Y'<0 S DA=+Y,DIE="^RTV(195.9,",DR="[RT FILE ROOM/REMOTE]" D ^DIE K DQ,DE G RE
  1. K RTREMOTE,DIC,DA,D0,DR,DIE Q
  1. Q
  1. DIP W !!?5,"...compiling Remote/Institution profile for ",$P($P(RTAPL,"^",1),";",2),!
  1. S DIC="^RTV(195.9,",(BY,FLDS)="[RT FILE ROOM/REMOTE]",L=0,(FR,TO)="",DIS(0)="I $P(^RTV(195.9,D0,0),U,3)=+RTAPL" K DTOUT D EN1^DIP K DIC,FLDS,BY,L,TO,FR,IOP Q