Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: DVBAPST3

DVBAPST3.m

Go to the documentation of this file.
  1. DVBAPST3 ;ALB/JLU;post init to set up hl7 files ;05/03/93
  1. ;;2.7;AMIE;;Apr 10, 1995
  1. EN ;main entry point
  1. 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
  1. ;check for DVBA AMIE entry in file 771
  1. K DIC,X,Y
  1. S DIC="^HL(771,",X="DVBA AMIE",DIC(0)="MO" D ^DIC
  1. 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
  1. K DO,DD
  1. S DIC="^HL(771,",DIC(0)="AELMQ",DIC("DR")="2///ACTIVE",X="DVBA AMIE"
  1. W !!,"."
  1. W !,"Setting up the entry in the HL7 DHCP Application Parameter file (771)."
  1. S DLAYGO=771
  1. D FILE^DICN
  1. K DLAYGO
  1. 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."
  1. I Y>0 D ENTRY1
  1. ;
  1. EN1 K DIC,DIE,DD,DO
  1. ;check for AMIE entry in file 770
  1. K DIC,X,Y
  1. S DIC="^HL(770,",X="AMIE",DIC(0)="MO" D ^DIC
  1. 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
  1. S DIC="^HL(770,",DIC(0)="AELMQ",X="AMIE"
  1. S DIC("DR")="3///KURZWEIL;4///245;5///3;7///2.1;8///DVBA AMIE;9///30;14///P"
  1. W !!,"Now setting up the entry in the HL7 Non-DHCP Application Parameter file (770).",!!
  1. S DLAYGO=770
  1. D FILE^DICN
  1. K DLAYGO
  1. ;
  1. 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
  1. ;
  1. ;ask for Station Number and HL7 Device (site specific fields in 770)
  1. K DA,DIE,DR
  1. S DA=$P(Y,"^"),DIE="^HL(770,",DR="2;6"
  1. D ^DIE
  1. ;
  1. WR1 W !!!,"The post init has finished!"
  1. ;
  1. EXIT K DIC,DIE,DVBA,DVBVAR,DR,DA,Y,X
  1. Q
  1. ;
  1. ENTRY1 K DIC,DIE,DR
  1. S DIC(0)="LMQ"
  1. S DA=+Y
  1. S DIE="^HL(771,"
  1. S DR="5///QRD"
  1. S DR(2,771.05)=".01///QRD;2///1"
  1. S DLAYGO=771
  1. D ^DIE K DLAYGO
  1. I '$D(DA) D WR Q
  1. S DIC(0)="LMQ",DIE="^HL(771,"
  1. F DVBA=1:1:6 D SET,^DIE K DLAYGO I '$D(DA) D WR Q
  1. Q
  1. ;
  1. WR W !,*7,"An error has occurred entering the message or segment types into file 771. Please check"
  1. W !,"this file to make sure all the necessary file entries exists."
  1. Q
  1. ;
  1. TYPE ;these are the hl7 message types and routines
  1. ;;ORU^DVBCHLR
  1. ;;ORM^DVBCHLOR
  1. ;;QRY^DVBCHLQ
  1. ;;ORR^NONE
  1. ;;ORF^NONE
  1. ;;ACK^NONE
  1. Q
  1. ;
  1. SET ;
  1. K DR
  1. S DVBVAR=$E($T(TYPE+DVBA),4,99)
  1. S DR="6///"_$P(DVBVAR,U,1)
  1. S DR(2,771.06)=".01///"_$P(DVBVAR,U,1)_";1///"_$P(DVBVAR,U,2)
  1. S DLAYGO=771
  1. Q