LA7VSTP1 ;VA/DALOI/JMC - CONT. from LA7VSTP ;JUL 06, 2010 3:14 PM
;;5.2;AUTOMATED LAB INSTRUMENTS;**27,46,64,1027**;NOV 01, 1997
;
HOST ; Hosts setup for Remote site
; changing remote site to collection site but not in File 771 (1-15 char)
;
N LAREMOTE,LA7VAI
S LAREMOTE="LA7V COLLECTION "_PRIMARY
;
W !,"Updating LA7 MESSAGE PARAMETER file (#62.48) for the HOST Lab "_SITE_"."
W !,?5,"Adding "_$P(LAHOST,"^")
;
K DIC
S X=$P(LAHOST,"^"),DLAYGO=62.48,DIC="^LAHM(62.48,",DIC(0)="LQ"
D ^DIC K DA
I Y>0 D
. S DIE=DIC,DA=+Y,DR="1///HL7;2///ACTIVE;4///ON;11///LEDI"
. D ^DIE
. S (LA7VAI,DA(1))=DA,DIC="^LAHM(62.48,"_DA(1)_",90,",DLAYGO=62.483,DIC(0)="QEML",DIC("P")=$P(^DD(62.48,90,0),U,2)
. S X=$P(LAHOST,"^")_LRI_"LA7V REMOTE "_PRIMARY_PRIMARY
. D ^DIC
. S:$P(^LAHM(62.48,LA7VAI,0),U)=$P(LAHOST,"^") ^(1)="D QUE^LA7VIN"
. D F629(+$P(HOST(LA7A),"^",4),LA7VAI)
K DIC,DIE,DA,DR,DLAYGO
;
;
HF624 ;
K LA7VAI
W !,"Updating LAB AUTO INSTRUMENT file (#62.4) for HOST Lab "_SITE_"."
W !,?5,"Adding "_$P(LAHOST,"^")
K DIC
S X=$P(LAHOST,"^"),DIC="^LAB(62.4,",DIC(0)="L",DLAYGO=62.4
S DIC("DR")="5///LOG;6///ID;8///"_$P(LAHOST,"^")_";18///1" D ^DIC
S LA7VAI=+Y
K DIC,DA,DO,DLAYGO
Q
;
;
REMOTE ;Remote setup for Host site
RF6248 ;
;changing remote site to collection site but not in File 771 (1-15 char)
;
N DIC,DIE,DA,DR,DLAYGO,LAREMOTE,LA7VAI
S LAREMOTE="LA7V COLLECTION "_LRI
;
W !,"Updating LA7 MESSAGE PARAMETER file (#62.48) for the REMOTE Lab "_SITE_"."
W !,?5,"Adding "_LAREMOTE
;
S X=LAREMOTE,DIC="^LAHM(62.48,",DIC(0)="LQ",DLAYGO=62.48
D ^DIC
I Y>0 D
. S DIE=DIC,DA=+Y,DR="1///HL7;2///ACTIVE;4///ON;11///LEDI"
. D ^DIE
. S (LA7VAI,DA(1))=DA,DIC="^LAHM(62.48,"_DA(1)_",90,",DIC(0)="QEML",DLAYGO=62.483,DIC("P")=$P(^DD(62.48,90,0),U,2)
. S X="LA7V REMOTE "_LRI_LRI_LAHOST_PRIMARY
. D ^DIC
. S:$P(^LAHM(62.48,LA7VAI,0),U)=LAREMOTE ^(1)="D QUE^LA7VIN"
;
Q
;
;
F629(LA74,LA76248) ; Update entries in #62.9 that use this message configuration (#62.48).
; Check each shipping configuration that has this site as a host site's computer system.
; Call with LA74 = ien of entry in INSTITUTION file (#4)
; LA76248 = ien of entry in LA7 MESSAGE PARAMETER (#62.48)
;
N FDA,LA7629,LA7DIE
;
S LA7629=0
F S LA7629=$O(^LAHM(62.9,"E",LA74,LA7629)) Q:'LA7629 D
. K FDA,LA7DIE
. S FDA(2,62.9,LA7629_",",.07)=LA76248
. D FILE^DIE("","FDA(2)","LA7DIE(2)")
Q
LA7VSTP1 ;VA/DALOI/JMC - CONT. from LA7VSTP ;JUL 06, 2010 3:14 PM
+1 ;;5.2;AUTOMATED LAB INSTRUMENTS;**27,46,64,1027**;NOV 01, 1997
+2 ;
HOST ; Hosts setup for Remote site
+1 ; changing remote site to collection site but not in File 771 (1-15 char)
+2 ;
+3 NEW LAREMOTE,LA7VAI
+4 SET LAREMOTE="LA7V COLLECTION "_PRIMARY
+5 ;
+6 WRITE !,"Updating LA7 MESSAGE PARAMETER file (#62.48) for the HOST Lab "_SITE_"."
+7 WRITE !,?5,"Adding "_$PIECE(LAHOST,"^")
+8 ;
+9 KILL DIC
+10 SET X=$PIECE(LAHOST,"^")
SET DLAYGO=62.48
SET DIC="^LAHM(62.48,"
SET DIC(0)="LQ"
+11 DO ^DIC
KILL DA
+12 IF Y>0
Begin DoDot:1
+13 SET DIE=DIC
SET DA=+Y
SET DR="1///HL7;2///ACTIVE;4///ON;11///LEDI"
+14 DO ^DIE
+15 SET (LA7VAI,DA(1))=DA
SET DIC="^LAHM(62.48,"_DA(1)_",90,"
SET DLAYGO=62.483
SET DIC(0)="QEML"
SET DIC("P")=$PIECE(^DD(62.48,90,0),U,2)
+16 SET X=$PIECE(LAHOST,"^")_LRI_"LA7V REMOTE "_PRIMARY_PRIMARY
+17 DO ^DIC
+18 IF $PIECE(^LAHM(62.48,LA7VAI,0),U)=$PIECE(LAHOST,"^")
SET ^(1)="D QUE^LA7VIN"
+19 DO F629(+$PIECE(HOST(LA7A),"^",4),LA7VAI)
End DoDot:1
+20 KILL DIC,DIE,DA,DR,DLAYGO
+21 ;
+22 ;
HF624 ;
+1 KILL LA7VAI
+2 WRITE !,"Updating LAB AUTO INSTRUMENT file (#62.4) for HOST Lab "_SITE_"."
+3 WRITE !,?5,"Adding "_$PIECE(LAHOST,"^")
+4 KILL DIC
+5 SET X=$PIECE(LAHOST,"^")
SET DIC="^LAB(62.4,"
SET DIC(0)="L"
SET DLAYGO=62.4
+6 SET DIC("DR")="5///LOG;6///ID;8///"_$PIECE(LAHOST,"^")_";18///1"
DO ^DIC
+7 SET LA7VAI=+Y
+8 KILL DIC,DA,DO,DLAYGO
+9 QUIT
+10 ;
+11 ;
REMOTE ;Remote setup for Host site
RF6248 ;
+1 ;changing remote site to collection site but not in File 771 (1-15 char)
+2 ;
+3 NEW DIC,DIE,DA,DR,DLAYGO,LAREMOTE,LA7VAI
+4 SET LAREMOTE="LA7V COLLECTION "_LRI
+5 ;
+6 WRITE !,"Updating LA7 MESSAGE PARAMETER file (#62.48) for the REMOTE Lab "_SITE_"."
+7 WRITE !,?5,"Adding "_LAREMOTE
+8 ;
+9 SET X=LAREMOTE
SET DIC="^LAHM(62.48,"
SET DIC(0)="LQ"
SET DLAYGO=62.48
+10 DO ^DIC
+11 IF Y>0
Begin DoDot:1
+12 SET DIE=DIC
SET DA=+Y
SET DR="1///HL7;2///ACTIVE;4///ON;11///LEDI"
+13 DO ^DIE
+14 SET (LA7VAI,DA(1))=DA
SET DIC="^LAHM(62.48,"_DA(1)_",90,"
SET DIC(0)="QEML"
SET DLAYGO=62.483
SET DIC("P")=$PIECE(^DD(62.48,90,0),U,2)
+15 SET X="LA7V REMOTE "_LRI_LRI_LAHOST_PRIMARY
+16 DO ^DIC
+17 IF $PIECE(^LAHM(62.48,LA7VAI,0),U)=LAREMOTE
SET ^(1)="D QUE^LA7VIN"
End DoDot:1
+18 ;
+19 QUIT
+20 ;
+21 ;
F629(LA74,LA76248) ; Update entries in #62.9 that use this message configuration (#62.48).
+1 ; Check each shipping configuration that has this site as a host site's computer system.
+2 ; Call with LA74 = ien of entry in INSTITUTION file (#4)
+3 ; LA76248 = ien of entry in LA7 MESSAGE PARAMETER (#62.48)
+4 ;
+5 NEW FDA,LA7629,LA7DIE
+6 ;
+7 SET LA7629=0
+8 FOR
SET LA7629=$ORDER(^LAHM(62.9,"E",LA74,LA7629))
IF 'LA7629
QUIT
Begin DoDot:1
+9 KILL FDA,LA7DIE
+10 SET FDA(2,62.9,LA7629_",",.07)=LA76248
+11 DO FILE^DIE("","FDA(2)","LA7DIE(2)")
End DoDot:1
+12 QUIT