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

HLOCVU.m

Go to the documentation of this file.
HLOCVU ;DAOU/ALA-Conversion Utility ; 04 Aug 2005  4:26 PM
 ;;1.6;HEALTH LEVEL SEVEN;**126**;Oct 13, 1995
 ;
 Q
 ;
APAR(HLOEID,APPARMS,WHO,WHOTO) ;  Set up APPARMS array from Protocols
 ;
 ;  Input Parameter
 ;   HLOEID = IEN of the event protocol
 ;
 ;  Output
 ;    APPARMS array
 ;    WHO or WHOTO array
 NEW HLOTEXT,HLARY,FLDS,HLOSID,CT
 S FLDS="770.1;770.3;770.4;770.8;770.9;770.95"
 D GETS^DIQ(101,HLOEID,FLDS,"R","HLOTEXT")
 ;
 S APPARMS("COUNTRY")="USA"
 S APPARMS("EVENT")=$G(HLOTEXT(101,HLOEID_",","EVENT TYPE"))
 S APPARMS("MESSAGE TYPE")=$G(HLOTEXT(101,HLOEID_",","TRANSACTION MESSAGE TYPE"))
 S APPARMS("VERSION")=$G(HLOTEXT(101,HLOEID_",","VERSION ID"))
 S APPARMS("SENDING APPLICATION")=$G(HLOTEXT(101,HLOEID_",","SENDING APPLICATION"))
 S APPARMS("APP ACK TYPE")=$G(HLOTEXT(101,HLOEID_",","APPLICATION ACK TYPE"))
 S APPARMS("ACCEPT ACK TYPE")=$G(HLOTEXT(101,HLOEID_",","ACCEPT ACK CODE"))
 I $G(HLFS)'="" S APPARMS("FIELD SEPARATOR")=HLFS
 I $G(HLECH)'="" S APPARMS("ENCODING CHARACTERS")=HLECH
 ;
 K HLOTEXT,FLDS
 D ITEM^HLUTIL2(HLOEID,"PTR")
 I $G(HLARY(0))>1 D MANY Q
 S HLOSID=$O(HLARY(0))
 S FLDS="770.2;770.4;770.7"
 D GETS^DIQ(101,HLOSID,FLDS,"R","HLOTEXT")
 S WHO("RECEIVING APPLICATION")=$G(HLOTEXT(101,HLOSID_",","RECEIVING APPLICATION"))
 S WHO("FACILITY LINK NAME")=$G(HLOTEXT(101,HLOSID_",","LOGICAL LINK"))
 Q
 ;
MANY ;  If multiple subscribers
 S HLOSID=0,CT=0
 S FLDS="770.2;770.4;770.7"
 F  S HLOSID=$O(HLARY(HLOSID)) Q:'HLOSID  D
 . K HLOTEXT
 . D GETS^DIQ(101,HLOSID,FLDS,"R","HLOTEXT")
 . S CT=CT+1
 . S WHOTO(CT,"RECEIVING APPLICATION")=$G(HLOTEXT(101,HLOSID_",","RECEIVING APPLICATION"))
 . S WHOTO(CT,"FACILITY LINK NAME")=$G(HLOTEXT(101,HLOSID_",","LOGICAL LINK"))
 ;
 Q