VAFHPOST ;ALB/JRP,PKE - VAFH POST INIT DRIVER;04-JUN-1996
;;5.3;Registration;**91**;AUG 14, 1993
;
CHKPTS ;Create check points for post-init
;Input : All variables set by KIDS
;Output : None
;
;Declare variables
N TMP,X,Y,%,%H
;Create check points
;
;Fix server protocol
;;;S TMP=$$NEWCP^XPDUTL("VAFH01","FIXSRVR^VAFHPST1") KIDS CANDO
;Fix client protocol
;;;S TMP=$$NEWCP^XPDUTL("VAFH02","FIXCLNT^VAFHPST1") KIDS CANDO
;
;Set Faciltiy name in VAFH,C PIMS, HL7 APPLICATION - File #771
S TMP=$$NEWCP^XPDUTL("VAFH02","FACILITY^VAFHPST1")
;Set PIVOT
S TMP=$$NEWCP^XPDUTL("VAFH03","PARA^VAFHPST1")
;Recompile templates
S TMP=$$NEWCP^XPDUTL("VAFH04","COMPILE^VAFHPST1")
;Disable old philly application
S TMP=$$NEWCP^XPDUTL("VAFH05","DISABLE^VAFHPST1")
;Done
Q
;setup fields not available in HL7 toolkit.
SETUP W !?3
W "For VAFH entries........"
W !!?3
W "You may change NAME of the VAFHL7 TEMPLATE entry"
W !?3
W "in the HL7 APPLICATION file to the NAME of the Receiving Application,"
W !!?3
W "and the NAME of the VAFH-SEND entry in the HL LOWER LEVEL PROTOCOL PARAMETER "
W !?3
W "file #869.2,"
W !!?3
W "and the NAME of the VAFH-SEND entry in the HL LOGICAL LINK file #870."
W !
;
W !!?3,"Editing HL7 APPLICATION File #771"
S (DIC,DIE)="^HL(771,",DIC("B")="VAFHL7 TEMPLATE",DIC(0)="QEAM" D ^DIC
I Y<0 Q
S DA=+Y,DR=".01//" D ^DIE
;
W !!?3,"Editing HL LOWER LEVEL PROTOCOL PARAMETER File #869.2"
S (DIC,DIE)="^HLCS(869.2,",DIC("B")="VAFH-SEND",DIC(0)="QEAM" D ^DIC
I Y<0 Q
S DA=+Y,DR=".01//" D ^DIE
;
W !!?3,"Editing HL LOGICAL LINK File #870"
S (DIC,DIE)="^HLCS(870,",DIC("B")="VAFH-SEND",DIC(0)="QEAM" D ^DIC
I Y<0 Q
S DA=+Y,DR=".01//" D ^DIE
;
W !!?3,"ok..."
W !
KILL K D0,DIC,DIE,DA,DR,DTOUT,DUOUT,DISYS,%
Q
;setup fields not available in HL7 toolkit.
SETUP23 W !?3
W "For VAFC entries........"
W !!?3
W "You may change NAME of the VAFCHL7TEMPLATE entry"
W !?3
W "in the HL7 APPLICATION file to the NAME of the Receiving Application,"
W !!?3
W "and the NAME of the VAFC-SEND entry in the HL LOWER LEVEL PROTOCOL PARAMETER "
W !?3
W "file #869.2,"
W !!?3
W "and the NAME of the VAFC-SEND entry in the HL LOGICAL LINK file #870."
W !
;
W !!?3,"Editing HL7 APPLICATION File #771"
S (DIC,DIE)="^HL(771,",DIC("B")="VAFCHL7TEMPLATE",DIC(0)="QEAM" D ^DIC
I Y<0 Q
S DA=+Y,DR=".01//" D ^DIE
;
W !!?3,"Editing HL LOWER LEVEL PROTOCOL PARAMETER File #869.2"
S (DIC,DIE)="^HLCS(869.2,",DIC("B")="VAFC-SEND",DIC(0)="QEAM" D ^DIC
I Y<0 Q
S DA=+Y,DR=".01//" D ^DIE
;
W !!?3,"Editing HL LOGICAL LINK File #870"
S (DIC,DIE)="^HLCS(870,",DIC("B")="VAFC-SEND",DIC(0)="QEAM" D ^DIC
I Y<0 Q
S DA=+Y,DR=".01//" D ^DIE
;
W !!?3,"ok..."
W !
D KILL
Q
;
SEND N SET S SET=$$EDIT(1) I SET W !?3,"SEND PIMS HL7 v2.2 MESSAGES is set to SEND" Q
E W !?3,$P(SET,"^",2) Q
;
STOP N SET S SET=$$EDIT(0) I SET W !?3,"SEND PIMS HL7 v2.2 MESSAGES is set to STOP" Q
E W !?3,$P(SET,"^",2) Q
;
EDIT(ON) ;
N DIC,DIE,DR,DA,X,Y
D DT^DICRW
S (DIC,DIE)="^DG(43,",X=1,DIC(0)=""
D ^DIC I Y<1 Q "0^Failed to find MAS Parameter file"
;
S DA=+Y,DR="391.7012///"_ON_";"
L +^DG(43,1):5 I '$T Q "0^MAS Parameters being edited"
D ^DIE
L -^DG(43,1)
Q 1
;
SEND23 N SET S SET=$$EDIT23(1) I SET W !?3,"SEND PIMS HL7 v2.3 MESSAGES is set to SEND" Q
E W !?3,$P(SET,"^",2) Q
;
STOP23 N SET S SET=$$EDIT23(0) I SET W !?3,"SEND PIMS HL7 v2.3 MESSAGES is set to STOP" Q
E W !?3,$P(SET,"^",2) Q
;
EDIT23(ON) ;
N DIC,DIE,DR,DA,X,Y
D DT^DICRW
S (DIC,DIE)="^DG(43,",X=1,DIC(0)=""
D ^DIC I Y<1 Q "0^Failed to find MAS Parameter file"
;
S DA=+Y,DR="391.7013///"_ON_";"
L +^DG(43,1):5 I '$T Q "0^MAS Parameters being edited"
D ^DIE
L -^DG(43,1)
Q 1
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HVAFHPOST 3830 printed Nov 22, 2024@18:13:43 Page 2
VAFHPOST ;ALB/JRP,PKE - VAFH POST INIT DRIVER;04-JUN-1996
+1 ;;5.3;Registration;**91**;AUG 14, 1993
+2 ;
CHKPTS ;Create check points for post-init
+1 ;Input : All variables set by KIDS
+2 ;Output : None
+3 ;
+4 ;Declare variables
+5 NEW TMP,X,Y,%,%H
+6 ;Create check points
+7 ;
+8 ;Fix server protocol
+9 ;;;S TMP=$$NEWCP^XPDUTL("VAFH01","FIXSRVR^VAFHPST1") KIDS CANDO
+10 ;Fix client protocol
+11 ;;;S TMP=$$NEWCP^XPDUTL("VAFH02","FIXCLNT^VAFHPST1") KIDS CANDO
+12 ;
+13 ;Set Faciltiy name in VAFH,C PIMS, HL7 APPLICATION - File #771
+14 SET TMP=$$NEWCP^XPDUTL("VAFH02","FACILITY^VAFHPST1")
+15 ;Set PIVOT
+16 SET TMP=$$NEWCP^XPDUTL("VAFH03","PARA^VAFHPST1")
+17 ;Recompile templates
+18 SET TMP=$$NEWCP^XPDUTL("VAFH04","COMPILE^VAFHPST1")
+19 ;Disable old philly application
+20 SET TMP=$$NEWCP^XPDUTL("VAFH05","DISABLE^VAFHPST1")
+21 ;Done
+22 QUIT
+23 ;setup fields not available in HL7 toolkit.
SETUP WRITE !?3
+1 WRITE "For VAFH entries........"
+2 WRITE !!?3
+3 WRITE "You may change NAME of the VAFHL7 TEMPLATE entry"
+4 WRITE !?3
+5 WRITE "in the HL7 APPLICATION file to the NAME of the Receiving Application,"
+6 WRITE !!?3
+7 WRITE "and the NAME of the VAFH-SEND entry in the HL LOWER LEVEL PROTOCOL PARAMETER "
+8 WRITE !?3
+9 WRITE "file #869.2,"
+10 WRITE !!?3
+11 WRITE "and the NAME of the VAFH-SEND entry in the HL LOGICAL LINK file #870."
+12 WRITE !
+13 ;
+14 WRITE !!?3,"Editing HL7 APPLICATION File #771"
+15 SET (DIC,DIE)="^HL(771,"
SET DIC("B")="VAFHL7 TEMPLATE"
SET DIC(0)="QEAM"
DO ^DIC
+16 IF Y<0
QUIT
+17 SET DA=+Y
SET DR=".01//"
DO ^DIE
+18 ;
+19 WRITE !!?3,"Editing HL LOWER LEVEL PROTOCOL PARAMETER File #869.2"
+20 SET (DIC,DIE)="^HLCS(869.2,"
SET DIC("B")="VAFH-SEND"
SET DIC(0)="QEAM"
DO ^DIC
+21 IF Y<0
QUIT
+22 SET DA=+Y
SET DR=".01//"
DO ^DIE
+23 ;
+24 WRITE !!?3,"Editing HL LOGICAL LINK File #870"
+25 SET (DIC,DIE)="^HLCS(870,"
SET DIC("B")="VAFH-SEND"
SET DIC(0)="QEAM"
DO ^DIC
+26 IF Y<0
QUIT
+27 SET DA=+Y
SET DR=".01//"
DO ^DIE
+28 ;
+29 WRITE !!?3,"ok..."
+30 WRITE !
KILL KILL D0,DIC,DIE,DA,DR,DTOUT,DUOUT,DISYS,%
+1 QUIT
+2 ;setup fields not available in HL7 toolkit.
SETUP23 WRITE !?3
+1 WRITE "For VAFC entries........"
+2 WRITE !!?3
+3 WRITE "You may change NAME of the VAFCHL7TEMPLATE entry"
+4 WRITE !?3
+5 WRITE "in the HL7 APPLICATION file to the NAME of the Receiving Application,"
+6 WRITE !!?3
+7 WRITE "and the NAME of the VAFC-SEND entry in the HL LOWER LEVEL PROTOCOL PARAMETER "
+8 WRITE !?3
+9 WRITE "file #869.2,"
+10 WRITE !!?3
+11 WRITE "and the NAME of the VAFC-SEND entry in the HL LOGICAL LINK file #870."
+12 WRITE !
+13 ;
+14 WRITE !!?3,"Editing HL7 APPLICATION File #771"
+15 SET (DIC,DIE)="^HL(771,"
SET DIC("B")="VAFCHL7TEMPLATE"
SET DIC(0)="QEAM"
DO ^DIC
+16 IF Y<0
QUIT
+17 SET DA=+Y
SET DR=".01//"
DO ^DIE
+18 ;
+19 WRITE !!?3,"Editing HL LOWER LEVEL PROTOCOL PARAMETER File #869.2"
+20 SET (DIC,DIE)="^HLCS(869.2,"
SET DIC("B")="VAFC-SEND"
SET DIC(0)="QEAM"
DO ^DIC
+21 IF Y<0
QUIT
+22 SET DA=+Y
SET DR=".01//"
DO ^DIE
+23 ;
+24 WRITE !!?3,"Editing HL LOGICAL LINK File #870"
+25 SET (DIC,DIE)="^HLCS(870,"
SET DIC("B")="VAFC-SEND"
SET DIC(0)="QEAM"
DO ^DIC
+26 IF Y<0
QUIT
+27 SET DA=+Y
SET DR=".01//"
DO ^DIE
+28 ;
+29 WRITE !!?3,"ok..."
+30 WRITE !
+31 DO KILL
+32 QUIT
+33 ;
SEND NEW SET
SET SET=$$EDIT(1)
IF SET
WRITE !?3,"SEND PIMS HL7 v2.2 MESSAGES is set to SEND"
QUIT
+1 IF '$TEST
WRITE !?3,$PIECE(SET,"^",2)
QUIT
+2 ;
STOP NEW SET
SET SET=$$EDIT(0)
IF SET
WRITE !?3,"SEND PIMS HL7 v2.2 MESSAGES is set to STOP"
QUIT
+1 IF '$TEST
WRITE !?3,$PIECE(SET,"^",2)
QUIT
+2 ;
EDIT(ON) ;
+1 NEW DIC,DIE,DR,DA,X,Y
+2 DO DT^DICRW
+3 SET (DIC,DIE)="^DG(43,"
SET X=1
SET DIC(0)=""
+4 DO ^DIC
IF Y<1
QUIT "0^Failed to find MAS Parameter file"
+5 ;
+6 SET DA=+Y
SET DR="391.7012///"_ON_";"
+7 LOCK +^DG(43,1):5
IF '$TEST
QUIT "0^MAS Parameters being edited"
+8 DO ^DIE
+9 LOCK -^DG(43,1)
+10 QUIT 1
+11 ;
SEND23 NEW SET
SET SET=$$EDIT23(1)
IF SET
WRITE !?3,"SEND PIMS HL7 v2.3 MESSAGES is set to SEND"
QUIT
+1 IF '$TEST
WRITE !?3,$PIECE(SET,"^",2)
QUIT
+2 ;
STOP23 NEW SET
SET SET=$$EDIT23(0)
IF SET
WRITE !?3,"SEND PIMS HL7 v2.3 MESSAGES is set to STOP"
QUIT
+1 IF '$TEST
WRITE !?3,$PIECE(SET,"^",2)
QUIT
+2 ;
EDIT23(ON) ;
+1 NEW DIC,DIE,DR,DA,X,Y
+2 DO DT^DICRW
+3 SET (DIC,DIE)="^DG(43,"
SET X=1
SET DIC(0)=""
+4 DO ^DIC
IF Y<1
QUIT "0^Failed to find MAS Parameter file"
+5 ;
+6 SET DA=+Y
SET DR="391.7013///"_ON_";"
+7 LOCK +^DG(43,1):5
IF '$TEST
QUIT "0^MAS Parameters being edited"
+8 DO ^DIE
+9 LOCK -^DG(43,1)
+10 QUIT 1