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

INHVCRAB.m

Go to the documentation of this file.
  1. INHVCRAB ;JKB ; 8 Jul 95 15:57; BCC-specific ApS Code
  1. ;;3.01;BHL IHS Interfaces with GIS;;JUL 01, 2001
  1. ;COPYRIGHT 1991-2000 SAIC
  1. ;
  1. Q ;no top entry
  1. ;
  1. ; This routine contains Application Server (ApS) code specific for the
  1. ; BCC application interface.
  1. ;
  1. DEST ; determine destination for an inbound BCC message
  1. ; Note : this code is eXec'd from IN^INHUSEN where the context
  1. ; includes the input vars & expects the output vars doc'd below
  1. ; Input : ING (req) = var name for inbound data array
  1. ; INTYP (req) = msg type
  1. ; INEVN (req) = event type
  1. ; INMSH (req) = MSH segment
  1. ; INDELIM (req) = segment delimeter
  1. ; Output: void
  1. ; INDST = INTERFACE DESTINATION Name
  1. ; INDSTP = INTERFACE DESTINATION ptr (undef if no destination)
  1. ; INDEST = array of valid inbound destinations
  1. ; Local : INORTYP = ORDER TYPE (ZOR:1)
  1. ; INRECV = receiving app (MSH:5)
  1. ; INSEND = sending app (MSH:3)
  1. K INDSTP
  1. N I,INORTYP,INRECV,INSEND,X
  1. S INSEND=$P(INMSH,INDELIM,3),INRECV=$P(INMSH,INDELIM,5),INORTYP=""
  1. ; build INDEST() if not done so for BCC
  1. I $G(INDEST)'="BCC" S INDEST="BCC" F I=1:1 S X=$P($T(DESTTXT+I),";;",2) Q:'$L(X) S INDEST($TR($P(X,U,1,3),U,""))=$P(X,U,4)
  1. I INTYP="ORM" F I=1:1 S X=$G(@ING@(I)) Q:'$L(X) I $P(X,INDELIM)="ZOR" S INORTYP=$P(X,INDELIM,2) Q
  1. S X=INTYP_$S(INTYP="ZPW":"*",1:INEVN)_INORTYP
  1. D LOG^INHVCRA1("msg type is "_X,5)
  1. I $D(INDEST(X)) S INDST=INDEST(X) I $D(^INRHD("B",INDST)) S INDSTP=$O(^(INDST,0))
  1. Q
  1. ;
  1. DESTTXT ; the following lines are used by DEST to build INDEST() for BCC
  1. ;;ZIL^Z02^^HL INH APPLICATION SERVER LOGON
  1. ;;ZIL^Z03^^HL INH APPLICATION SERVER LOGOFF
  1. ;;ZPW^*^^HL ORPW PATIENT SELECT
  1. ;;ORM^O01^4^HL ORPW LAB ORDER IN
  1. ;;ORM^O01^5^HL ORPW RAD ORDER - IN
  1. ;;ORM^O01^9^HL ORPW RX ORDER - IN
  1. ;;QRY^A19^^HL ORPW PATIENT LOOKUP - IN