DVBAPST3 ;ALB/JLU;post init to set up hl7 files ;05/03/93
;;2.7;AMIE;;Apr 10, 1995
EN ;main entry point
I +$$VERSION^XPDUTL("HL")<1.5 W !,"HL7 Version 1.5 not installed, I will not attempt to set up the AMIE/Kurzweil entries." Q
;check for DVBA AMIE entry in file 771
K DIC,X,Y
S DIC="^HL(771,",X="DVBA AMIE",DIC(0)="MO" D ^DIC
I Y>0 W *7,!!,"The HL7 DHCP Application Parameter file (771) already ",!,"has a DVBA AMIE entry! No updating of this file." K DIC,X,Y G EN1
K DO,DD
S DIC="^HL(771,",DIC(0)="AELMQ",DIC("DR")="2///ACTIVE",X="DVBA AMIE"
W !!,"."
W !,"Setting up the entry in the HL7 DHCP Application Parameter file (771)."
S DLAYGO=771
D FILE^DICN
K DLAYGO
I Y<0 W !!,*7,"An error has occurred entering the entry into file 771. This file must be checked and set up properly. Continuing on to 770."
I Y>0 D ENTRY1
;
EN1 K DIC,DIE,DD,DO
;check for AMIE entry in file 770
K DIC,X,Y
S DIC="^HL(770,",X="AMIE",DIC(0)="MO" D ^DIC
I Y>0 W *7,!!,"The HL7 Non-DHCP Application Parameter file (770) already",!,"has an AMIE entry. No updating of this file." K DIC,X,Y Q
S DIC="^HL(770,",DIC(0)="AELMQ",X="AMIE"
S DIC("DR")="3///KURZWEIL;4///245;5///3;7///2.1;8///DVBA AMIE;9///30;14///P"
W !!,"Now setting up the entry in the HL7 Non-DHCP Application Parameter file (770).",!!
S DLAYGO=770
D FILE^DICN
K DLAYGO
;
I Y<0 W !!,*7,"An error has occurred entering the necessary entry in file 770. This entry must be set up before use." Q
;
;ask for Station Number and HL7 Device (site specific fields in 770)
K DA,DIE,DR
S DA=$P(Y,"^"),DIE="^HL(770,",DR="2;6"
D ^DIE
;
WR1 W !!!,"The post init has finished!"
;
EXIT K DIC,DIE,DVBA,DVBVAR,DR,DA,Y,X
Q
;
ENTRY1 K DIC,DIE,DR
S DIC(0)="LMQ"
S DA=+Y
S DIE="^HL(771,"
S DR="5///QRD"
S DR(2,771.05)=".01///QRD;2///1"
S DLAYGO=771
D ^DIE K DLAYGO
I '$D(DA) D WR Q
S DIC(0)="LMQ",DIE="^HL(771,"
F DVBA=1:1:6 D SET,^DIE K DLAYGO I '$D(DA) D WR Q
Q
;
WR W !,*7,"An error has occurred entering the message or segment types into file 771. Please check"
W !,"this file to make sure all the necessary file entries exists."
Q
;
TYPE ;these are the hl7 message types and routines
;;ORU^DVBCHLR
;;ORM^DVBCHLOR
;;QRY^DVBCHLQ
;;ORR^NONE
;;ORF^NONE
;;ACK^NONE
Q
;
SET ;
K DR
S DVBVAR=$E($T(TYPE+DVBA),4,99)
S DR="6///"_$P(DVBVAR,U,1)
S DR(2,771.06)=".01///"_$P(DVBVAR,U,1)_";1///"_$P(DVBVAR,U,2)
S DLAYGO=771
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDVBAPST3 2481 printed Nov 22, 2024@16:52:05 Page 2
DVBAPST3 ;ALB/JLU;post init to set up hl7 files ;05/03/93
+1 ;;2.7;AMIE;;Apr 10, 1995
EN ;main entry point
+1 IF +$$VERSION^XPDUTL("HL")<1.5
WRITE !,"HL7 Version 1.5 not installed, I will not attempt to set up the AMIE/Kurzweil entries."
QUIT
+2 ;check for DVBA AMIE entry in file 771
+3 KILL DIC,X,Y
+4 SET DIC="^HL(771,"
SET X="DVBA AMIE"
SET DIC(0)="MO"
DO ^DIC
+5 IF Y>0
WRITE *7,!!,"The HL7 DHCP Application Parameter file (771) already ",!,"has a DVBA AMIE entry! No updating of this file."
KILL DIC,X,Y
GOTO EN1
+6 KILL DO,DD
+7 SET DIC="^HL(771,"
SET DIC(0)="AELMQ"
SET DIC("DR")="2///ACTIVE"
SET X="DVBA AMIE"
+8 WRITE !!,"."
+9 WRITE !,"Setting up the entry in the HL7 DHCP Application Parameter file (771)."
+10 SET DLAYGO=771
+11 DO FILE^DICN
+12 KILL DLAYGO
+13 IF Y<0
WRITE !!,*7,"An error has occurred entering the entry into file 771. This file must be checked and set up properly. Continuing on to 770."
+14 IF Y>0
DO ENTRY1
+15 ;
EN1 KILL DIC,DIE,DD,DO
+1 ;check for AMIE entry in file 770
+2 KILL DIC,X,Y
+3 SET DIC="^HL(770,"
SET X="AMIE"
SET DIC(0)="MO"
DO ^DIC
+4 IF Y>0
WRITE *7,!!,"The HL7 Non-DHCP Application Parameter file (770) already",!,"has an AMIE entry. No updating of this file."
KILL DIC,X,Y
QUIT
+5 SET DIC="^HL(770,"
SET DIC(0)="AELMQ"
SET X="AMIE"
+6 SET DIC("DR")="3///KURZWEIL;4///245;5///3;7///2.1;8///DVBA AMIE;9///30;14///P"
+7 WRITE !!,"Now setting up the entry in the HL7 Non-DHCP Application Parameter file (770).",!!
+8 SET DLAYGO=770
+9 DO FILE^DICN
+10 KILL DLAYGO
+11 ;
+12 IF Y<0
WRITE !!,*7,"An error has occurred entering the necessary entry in file 770. This entry must be set up before use."
QUIT
+13 ;
+14 ;ask for Station Number and HL7 Device (site specific fields in 770)
+15 KILL DA,DIE,DR
+16 SET DA=$PIECE(Y,"^")
SET DIE="^HL(770,"
SET DR="2;6"
+17 DO ^DIE
+18 ;
WR1 WRITE !!!,"The post init has finished!"
+1 ;
EXIT KILL DIC,DIE,DVBA,DVBVAR,DR,DA,Y,X
+1 QUIT
+2 ;
ENTRY1 KILL DIC,DIE,DR
+1 SET DIC(0)="LMQ"
+2 SET DA=+Y
+3 SET DIE="^HL(771,"
+4 SET DR="5///QRD"
+5 SET DR(2,771.05)=".01///QRD;2///1"
+6 SET DLAYGO=771
+7 DO ^DIE
KILL DLAYGO
+8 IF '$DATA(DA)
DO WR
QUIT
+9 SET DIC(0)="LMQ"
SET DIE="^HL(771,"
+10 FOR DVBA=1:1:6
DO SET
DO ^DIE
KILL DLAYGO
IF '$DATA(DA)
DO WR
QUIT
+11 QUIT
+12 ;
WR WRITE !,*7,"An error has occurred entering the message or segment types into file 771. Please check"
+1 WRITE !,"this file to make sure all the necessary file entries exists."
+2 QUIT
+3 ;
TYPE ;these are the hl7 message types and routines
+1 ;;ORU^DVBCHLR
+2 ;;ORM^DVBCHLOR
+3 ;;QRY^DVBCHLQ
+4 ;;ORR^NONE
+5 ;;ORF^NONE
+6 ;;ACK^NONE
+7 QUIT
+8 ;
SET ;
+1 KILL DR
+2 SET DVBVAR=$EXTRACT($TEXT(TYPE+DVBA),4,99)
+3 SET DR="6///"_$PIECE(DVBVAR,U,1)
+4 SET DR(2,771.06)=".01///"_$PIECE(DVBVAR,U,1)_";1///"_$PIECE(DVBVAR,U,2)
+5 SET DLAYGO=771
+6 QUIT