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