INHT ;JSH; 25 Mar 93 12:20;Transaction Type routines
;;3.01;BHL IHS Interfaces with GIS;;JUL 01, 2001
;COPYRIGHT 1991-2000 SAIC
;
EDT ;Edit a Transaction Type
K DIC
W !! S DIC="^INRHT(",DIC(0)="QAELM",DIC("A")="Select Transaction Type: " D ^DIC K DIC Q:Y<0
I $P(Y,U,3) S $P(^INRHT(+Y,0),U,5)=1
S DA=+Y,DIE="^INRHT(" D EDIT("INH TRANSACTION TYPE")
G EDT Q
;
POST ;Post-action for In/Out field
N I I $$VAL^DWRA(4000,.08)="O" D Q
. F I=.09,.1,.11 S DWSFLD(I)="",DWSFLD(I,0)=2
. S DWSFLD(.02,0)=0
. F I=.06,.07,.12 S DWSFLD(I,0)=0
I $$VAL^DWRA(4000,.08)="I" D Q
. F I=.09,.1,.11 S DWSFLD(I,0)=0
. F I=.02,.06,.07,.12 S DWSFLD(I,0)=2,DWSFLD(I)=""
Q
;
EDB ;Edit a background process
K DIC
W !! S DIC="^INTHPC(",DIC(0)="QAELM",DIC("A")="Select BACKGROUND PROCESS: ",DIC("S")="I Y>2" D ^DIC Q:Y<0
S DA=+Y,DIE=DIC D EDIT("INH BACKGROUND PROCESS") G EDB
;
EDD ;Edit a destination
K DIC
W !! S DIC="^INRHD(",DIC(0)="QAELM",DIC("A")="Select INTERFACE DESTINATION: " D ^DIC Q:Y<0
S DA=+Y,DIE=DIC D EDIT("INH DESTINATION ENTRY AND EDIT") G EDD
;
EDSITE ;Edit site parameters
N DIC,DIE,DA,DLAYGO,DO
G:$D(^INRHSITE(1,0)) EDSITE1
I '$D(^XMB(1,1,0)) W !!,*7,"KERNEL SITE PARAMETERS must be initialized first." Q
S (DIC,DLAYGO)=4002,DIC(0)="L",X=1 D ^DICN
EDSITE1 S DA=1,DIE=4002 D EDIT("INH SITE PARAMETERS") Q
;
EMR ;Edit Interface Message Replication entries
N DIC,DIE,DA,DLAYGO,DO
W !! S DIC="^INRHR(",DIC(0)="QAELM",DIC("A")="Select transaction type: " D ^DIC Q:Y<0
S DA=+Y,DIE=DIC D EDIT("INH MESSAGE REP ENTER EDIT") G EMR
;
EDIT(%T) ;Perform an edit either using a gallery or input template
;%T = gallery/template name
;Enter with DIE=global reference of file to edit
;DA = entry #
Q:$G(%T)="" Q:'$D(DIE)!('$D(DA))
;Check to determine if this is an IHS system and the form exists
I '$$SC^INHUTIL1,$D(^DIST(.403,"B",%T)) D Q
.N DDSFILE,DDSPAGE
.S DDSFILE=DIE,DR="["_$TR(%T,"[]")_"]",DDSPAGE=1
.D ^DDS
K DWFILE I $$SC^INHUTIL1,'$P($G(^INRHSITE(1,2)),U,5) S DWN=%T D ^DWC Q
S DR="["_$TR(%T,"[]")_"]" D ^DIE S DWFILE="" Q
;
EDOS ;Edit Interface OS file
N DIC,DA,DO
I '$O(^INTHOS(0)) D Q:DA<1
. S ^INTHOS(0)=$P(^INTHOS(0),U,1,2)
. S DIC=.7,DIC(0)="QAEM" D ^DIC K DIC S DA=+Y Q:DA<1
. S (DLAYGO,DIC)=4002.1,DIC(0)="L",X=+Y D ^DICN K DIC
S DA=1,DIE="^INTHOS(" D EDIT("INH OPERATING SYSTEM")
Q
INHT ;JSH; 25 Mar 93 12:20;Transaction Type routines
+1 ;;3.01;BHL IHS Interfaces with GIS;;JUL 01, 2001
+2 ;COPYRIGHT 1991-2000 SAIC
+3 ;
EDT ;Edit a Transaction Type
+1 KILL DIC
+2 WRITE !!
SET DIC="^INRHT("
SET DIC(0)="QAELM"
SET DIC("A")="Select Transaction Type: "
DO ^DIC
KILL DIC
IF Y<0
QUIT
+3 IF $PIECE(Y,U,3)
SET $PIECE(^INRHT(+Y,0),U,5)=1
+4 SET DA=+Y
SET DIE="^INRHT("
DO EDIT("INH TRANSACTION TYPE")
+5 GOTO EDT
QUIT
+6 ;
POST ;Post-action for In/Out field
+1 NEW I
IF $$VAL^DWRA(4000,.08)="O"
Begin DoDot:1
+2 FOR I=.09,.1,.11
SET DWSFLD(I)=""
SET DWSFLD(I,0)=2
+3 SET DWSFLD(.02,0)=0
+4 FOR I=.06,.07,.12
SET DWSFLD(I,0)=0
End DoDot:1
QUIT
+5 IF $$VAL^DWRA(4000,.08)="I"
Begin DoDot:1
+6 FOR I=.09,.1,.11
SET DWSFLD(I,0)=0
+7 FOR I=.02,.06,.07,.12
SET DWSFLD(I,0)=2
SET DWSFLD(I)=""
End DoDot:1
QUIT
+8 QUIT
+9 ;
EDB ;Edit a background process
+1 KILL DIC
+2 WRITE !!
SET DIC="^INTHPC("
SET DIC(0)="QAELM"
SET DIC("A")="Select BACKGROUND PROCESS: "
SET DIC("S")="I Y>2"
DO ^DIC
IF Y<0
QUIT
+3 SET DA=+Y
SET DIE=DIC
DO EDIT("INH BACKGROUND PROCESS")
GOTO EDB
+4 ;
EDD ;Edit a destination
+1 KILL DIC
+2 WRITE !!
SET DIC="^INRHD("
SET DIC(0)="QAELM"
SET DIC("A")="Select INTERFACE DESTINATION: "
DO ^DIC
IF Y<0
QUIT
+3 SET DA=+Y
SET DIE=DIC
DO EDIT("INH DESTINATION ENTRY AND EDIT")
GOTO EDD
+4 ;
EDSITE ;Edit site parameters
+1 NEW DIC,DIE,DA,DLAYGO,DO
+2 IF $DATA(^INRHSITE(1,0))
GOTO EDSITE1
+3 IF '$DATA(^XMB(1,1,0))
WRITE !!,*7,"KERNEL SITE PARAMETERS must be initialized first."
QUIT
+4 SET (DIC,DLAYGO)=4002
SET DIC(0)="L"
SET X=1
DO ^DICN
EDSITE1 SET DA=1
SET DIE=4002
DO EDIT("INH SITE PARAMETERS")
QUIT
+1 ;
EMR ;Edit Interface Message Replication entries
+1 NEW DIC,DIE,DA,DLAYGO,DO
+2 WRITE !!
SET DIC="^INRHR("
SET DIC(0)="QAELM"
SET DIC("A")="Select transaction type: "
DO ^DIC
IF Y<0
QUIT
+3 SET DA=+Y
SET DIE=DIC
DO EDIT("INH MESSAGE REP ENTER EDIT")
GOTO EMR
+4 ;
EDIT(%T) ;Perform an edit either using a gallery or input template
+1 ;%T = gallery/template name
+2 ;Enter with DIE=global reference of file to edit
+3 ;DA = entry #
+4 IF $GET(%T)=""
QUIT
IF '$DATA(DIE)!('$DATA(DA))
QUIT
+5 ;Check to determine if this is an IHS system and the form exists
+6 IF '$$SC^INHUTIL1
IF $DATA(^DIST(.403,"B",%T))
Begin DoDot:1
+7 NEW DDSFILE,DDSPAGE
+8 SET DDSFILE=DIE
SET DR="["_$TRANSLATE(%T,"[]")_"]"
SET DDSPAGE=1
+9 DO ^DDS
End DoDot:1
QUIT
+10 KILL DWFILE
IF $$SC^INHUTIL1
IF '$PIECE($GET(^INRHSITE(1,2)),U,5)
SET DWN=%T
DO ^DWC
QUIT
+11 SET DR="["_$TRANSLATE(%T,"[]")_"]"
DO ^DIE
SET DWFILE=""
QUIT
+12 ;
EDOS ;Edit Interface OS file
+1 NEW DIC,DA,DO
+2 IF '$ORDER(^INTHOS(0))
Begin DoDot:1
+3 SET ^INTHOS(0)=$PIECE(^INTHOS(0),U,1,2)
+4 SET DIC=.7
SET DIC(0)="QAEM"
DO ^DIC
KILL DIC
SET DA=+Y
IF DA<1
QUIT
+5 SET (DLAYGO,DIC)=4002.1
SET DIC(0)="L"
SET X=+Y
DO ^DICN
KILL DIC
End DoDot:1
IF DA<1
QUIT
+6 SET DA=1
SET DIE="^INTHOS("
DO EDIT("INH OPERATING SYSTEM")
+7 QUIT