- 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
- HLOCVU ;DAOU/ALA-Conversion Utility ; 04 Aug 2005 4:26 PM
- +1 ;;1.6;HEALTH LEVEL SEVEN;**126**;Oct 13, 1995
- +2 ;
- +3 QUIT
- +4 ;
- APAR(HLOEID,APPARMS,WHO,WHOTO) ; Set up APPARMS array from Protocols
- +1 ;
- +2 ; Input Parameter
- +3 ; HLOEID = IEN of the event protocol
- +4 ;
- +5 ; Output
- +6 ; APPARMS array
- +7 ; WHO or WHOTO array
- +8 NEW HLOTEXT,HLARY,FLDS,HLOSID,CT
- +9 SET FLDS="770.1;770.3;770.4;770.8;770.9;770.95"
- +10 DO GETS^DIQ(101,HLOEID,FLDS,"R","HLOTEXT")
- +11 ;
- +12 SET APPARMS("COUNTRY")="USA"
- +13 SET APPARMS("EVENT")=$GET(HLOTEXT(101,HLOEID_",","EVENT TYPE"))
- +14 SET APPARMS("MESSAGE TYPE")=$GET(HLOTEXT(101,HLOEID_",","TRANSACTION MESSAGE TYPE"))
- +15 SET APPARMS("VERSION")=$GET(HLOTEXT(101,HLOEID_",","VERSION ID"))
- +16 SET APPARMS("SENDING APPLICATION")=$GET(HLOTEXT(101,HLOEID_",","SENDING APPLICATION"))
- +17 SET APPARMS("APP ACK TYPE")=$GET(HLOTEXT(101,HLOEID_",","APPLICATION ACK TYPE"))
- +18 SET APPARMS("ACCEPT ACK TYPE")=$GET(HLOTEXT(101,HLOEID_",","ACCEPT ACK CODE"))
- +19 IF $GET(HLFS)'=""
- SET APPARMS("FIELD SEPARATOR")=HLFS
- +20 IF $GET(HLECH)'=""
- SET APPARMS("ENCODING CHARACTERS")=HLECH
- +21 ;
- +22 KILL HLOTEXT,FLDS
- +23 DO ITEM^HLUTIL2(HLOEID,"PTR")
- +24 IF $GET(HLARY(0))>1
- DO MANY
- QUIT
- +25 SET HLOSID=$ORDER(HLARY(0))
- +26 SET FLDS="770.2;770.4;770.7"
- +27 DO GETS^DIQ(101,HLOSID,FLDS,"R","HLOTEXT")
- +28 SET WHO("RECEIVING APPLICATION")=$GET(HLOTEXT(101,HLOSID_",","RECEIVING APPLICATION"))
- +29 SET WHO("FACILITY LINK NAME")=$GET(HLOTEXT(101,HLOSID_",","LOGICAL LINK"))
- +30 QUIT
- +31 ;
- MANY ; If multiple subscribers
- +1 SET HLOSID=0
- SET CT=0
- +2 SET FLDS="770.2;770.4;770.7"
- +3 FOR
- SET HLOSID=$ORDER(HLARY(HLOSID))
- IF 'HLOSID
- QUIT
- Begin DoDot:1
- +4 KILL HLOTEXT
- +5 DO GETS^DIQ(101,HLOSID,FLDS,"R","HLOTEXT")
- +6 SET CT=CT+1
- +7 SET WHOTO(CT,"RECEIVING APPLICATION")=$GET(HLOTEXT(101,HLOSID_",","RECEIVING APPLICATION"))
- +8 SET WHOTO(CT,"FACILITY LINK NAME")=$GET(HLOTEXT(101,HLOSID_",","LOGICAL LINK"))
- End DoDot:1
- +9 ;
- +10 QUIT