1 | DVBAPST3 ;ALB/JLU;post init to set up hl7 files ;05/03/93
|
---|
2 | ;;2.7;AMIE;;Apr 10, 1995
|
---|
3 | EN ;main entry point
|
---|
4 | 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
|
---|
5 | ;check for DVBA AMIE entry in file 771
|
---|
6 | K DIC,X,Y
|
---|
7 | S DIC="^HL(771,",X="DVBA AMIE",DIC(0)="MO" D ^DIC
|
---|
8 | 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
|
---|
9 | K DO,DD
|
---|
10 | S DIC="^HL(771,",DIC(0)="AELMQ",DIC("DR")="2///ACTIVE",X="DVBA AMIE"
|
---|
11 | W !!,"."
|
---|
12 | W !,"Setting up the entry in the HL7 DHCP Application Parameter file (771)."
|
---|
13 | S DLAYGO=771
|
---|
14 | D FILE^DICN
|
---|
15 | K DLAYGO
|
---|
16 | 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."
|
---|
17 | I Y>0 D ENTRY1
|
---|
18 | ;
|
---|
19 | EN1 K DIC,DIE,DD,DO
|
---|
20 | ;check for AMIE entry in file 770
|
---|
21 | K DIC,X,Y
|
---|
22 | S DIC="^HL(770,",X="AMIE",DIC(0)="MO" D ^DIC
|
---|
23 | 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
|
---|
24 | S DIC="^HL(770,",DIC(0)="AELMQ",X="AMIE"
|
---|
25 | S DIC("DR")="3///KURZWEIL;4///245;5///3;7///2.1;8///DVBA AMIE;9///30;14///P"
|
---|
26 | W !!,"Now setting up the entry in the HL7 Non-DHCP Application Parameter file (770).",!!
|
---|
27 | S DLAYGO=770
|
---|
28 | D FILE^DICN
|
---|
29 | K DLAYGO
|
---|
30 | ;
|
---|
31 | 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
|
---|
32 | ;
|
---|
33 | ;ask for Station Number and HL7 Device (site specific fields in 770)
|
---|
34 | K DA,DIE,DR
|
---|
35 | S DA=$P(Y,"^"),DIE="^HL(770,",DR="2;6"
|
---|
36 | D ^DIE
|
---|
37 | ;
|
---|
38 | WR1 W !!!,"The post init has finished!"
|
---|
39 | ;
|
---|
40 | EXIT K DIC,DIE,DVBA,DVBVAR,DR,DA,Y,X
|
---|
41 | Q
|
---|
42 | ;
|
---|
43 | ENTRY1 K DIC,DIE,DR
|
---|
44 | S DIC(0)="LMQ"
|
---|
45 | S DA=+Y
|
---|
46 | S DIE="^HL(771,"
|
---|
47 | S DR="5///QRD"
|
---|
48 | S DR(2,771.05)=".01///QRD;2///1"
|
---|
49 | S DLAYGO=771
|
---|
50 | D ^DIE K DLAYGO
|
---|
51 | I '$D(DA) D WR Q
|
---|
52 | S DIC(0)="LMQ",DIE="^HL(771,"
|
---|
53 | F DVBA=1:1:6 D SET,^DIE K DLAYGO I '$D(DA) D WR Q
|
---|
54 | Q
|
---|
55 | ;
|
---|
56 | WR W !,*7,"An error has occurred entering the message or segment types into file 771. Please check"
|
---|
57 | W !,"this file to make sure all the necessary file entries exists."
|
---|
58 | Q
|
---|
59 | ;
|
---|
60 | TYPE ;these are the hl7 message types and routines
|
---|
61 | ;;ORU^DVBCHLR
|
---|
62 | ;;ORM^DVBCHLOR
|
---|
63 | ;;QRY^DVBCHLQ
|
---|
64 | ;;ORR^NONE
|
---|
65 | ;;ORF^NONE
|
---|
66 | ;;ACK^NONE
|
---|
67 | Q
|
---|
68 | ;
|
---|
69 | SET ;
|
---|
70 | K DR
|
---|
71 | S DVBVAR=$E($T(TYPE+DVBA),4,99)
|
---|
72 | S DR="6///"_$P(DVBVAR,U,1)
|
---|
73 | S DR(2,771.06)=".01///"_$P(DVBVAR,U,1)_";1///"_$P(DVBVAR,U,2)
|
---|
74 | S DLAYGO=771
|
---|
75 | Q
|
---|