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

INHPSAL.m

Go to the documentation of this file.
  1. INHPSAL ;KN ; 11 Jul 96 00:44; MFN Loader Activates Software Application Control Utility - Main
  1. ;;3.01;BHL IHS Interfaces with GIS;;JUL 01, 2001
  1. ;COPYRIGHT 1991-2000 SAIC
  1. ;
  1. Q
  1. ;
  1. EN ;Main entry point to interactively process interfaces
  1. D:'$G(DUZ) ENV^UTIL Q:'$G(DUZ)
  1. ;Get user parameters
  1. Q:'$$PARM(.INPAR)
  1. ;Process user actions
  1. D PROC(.INPAR)
  1. ;
  1. Q
  1. ;
  1. PROC(INPAR) ;Process selected actions
  1. ;
  1. ;Run control routine for interface(s) selected
  1. S ININT="" F S ININT=$O(INPAR("APSEL",ININT)) Q:'$L(ININT) D
  1. . ;Run application program
  1. . S %=$$PROCINT^INHPSAL1(ININT,.INPAR)
  1. ;
  1. Q
  1. ;
  1. PARM(INPAR) ;Obtain user parameters
  1. ;OUTPUT:
  1. ; INPAR - array of parameters (pbr)
  1. ; ("APPL", x ) = interface application data
  1. ; name ^
  1. ; x = inteface application identifier
  1. ; => MDIS, CLIN, MHC, AP, BB
  1. ; => CIW, TEST, PROTO
  1. ; ("APCO" , x ) = interface name ^ control routine
  1. ; ("APSEL", x ) = interface application selected
  1. ; ("DESTSEL", x ) = destination selected
  1. ; ("DEST", x ) = destination data
  1. ;
  1. ;
  1. ;Create array of interface applications and control parameters
  1. D APPLAR
  1. ;Select an interface
  1. Q:'$$INTSEL^INHPSAM(.INPAR) 0
  1. ;Ask for specific destination
  1. Q:'$$DESTSEL(.INPAR) 0
  1. ;Ask if OK to continue
  1. W !!,"WARNING: The MFN Loader can have dramatic effects."
  1. W ! Q:'$$YN^UTSRD("Are you sure you wish to continue ;0") 0
  1. W ! Q:'$$YN^UTSRD("Are you absolutely positive you wish to continue ;0") 0
  1. ;
  1. Q 1
  1. ;
  1. DESTSEL(INPAR) ;Select a destination
  1. ;
  1. N INEX
  1. W !!,"Select a destination: ",!
  1. ;INEX = external system name that user selects, ex AP, BB, TSC
  1. S INEX=$O(INPAR("APSEL",0))
  1. ;get the destination string for ext sys name, ex: if BB get HL BLOOD BAN
  1. S (XYZ)=$P($T(@INEX+1),";;",2,99)
  1. ;set up and call DIC
  1. S DIC="^INRHD(",DIC(0)="AEQZ"
  1. S DIC("S")="I $P(^(0),U)[XYZ"
  1. D ^DIC
  1. ;quit if look up fails
  1. Q:Y=-1 0
  1. ;+Y contains the ien number.
  1. S INPAR("DESTIEN")=+Y
  1. Q 1
  1. ;
  1. APPLAR ;Create array of interface applications
  1. ;
  1. K INPAR N L,L2,NA
  1. F LC=1:1 S L=$P($T(DATA+LC),";;",2,99) Q:'$L(L) D
  1. . ;S L2=$P($T(DATA+(LC+1)),";;",2,99),NA=$P(L,U,2)
  1. . S NA=$P(L,U,2),L2="Q"
  1. . ;Quit if no routine or no identifier
  1. . Q:'$L(L2)!'$L(NA)
  1. . S INPAR("APPL",NA)=L
  1. . S INPAR("APCO",NA)=L2
  1. Q
  1. ;
  1. DATACOM ;Description of DATA tag
  1. ;; format - ;; interface application name ^ appl indentifier
  1. DATA ;Data
  1. ;;Anatomic Pathology^AP
  1. ;;DBSS^BB
  1. ;;Clinical Integrated Workstation^CIW
  1. ;;TRICARE Support Contractor^TSC
  1. ;;
  1. AP ;;DESTINATION: ANATOMIC PATHOLOGY
  1. ;;ANATOMIC PATHOLOGY
  1. ;
  1. BB ;; DESTINATION: HL BLOOD BANK
  1. ;;HL DBS
  1. ;
  1. CIW ;; DESTINATION: HL CIW - OUT
  1. ;;HL CIW
  1. ;
  1. TSC ;; DESTINATION: HL TSC
  1. ;;HL TSC
  1. ;