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

INHMSR22.m

Go to the documentation of this file.
  1. INHMSR22 ;KN; 31 Oct 95 07:27; Statistical Report-Utility
  1. ;;3.01;BHL IHS Interfaces with GIS;;JUL 01, 2001
  1. ;COPYRIGHT 1991-2000 SAIC
  1. ;
  1. ; MODULE NAME: Statistical Report Display Module (INHMSR22).
  1. ;
  1. ; DESCRIPTION: The purpose of the INHMSR22 is used to contain
  1. ; the functions and support for INHMSR2, INHMSR20,
  1. ; and INHMSR21.
  1. ;
  1. ;
  1. HDCON(INFL,INFD,INVAL) ; conversion for header
  1. ;
  1. ; Description: Convert to external format to use in header
  1. ; Return: External value
  1. ; Parameters:
  1. ; INFL = File ien
  1. ; INFD = Field ien
  1. ; INVAL= Internal value
  1. ;
  1. ; Code begins:
  1. N A,INT,STMP
  1. ; Get piece 2 and piece 3
  1. S INT=$$GPC2^INHMSR10(INFL,INFD),STMP=$$GPC3^INHMSR10(INFL,INFD)
  1. ; If piece 2 is a pointer reference to a file
  1. I INT["P" S A="^"_$E(STMP,1,$L(STMP)-1) Q $P(@A@(INVAL,0),U)
  1. ;Convert for set of code
  1. I INT["S" S C=$P(^DD(INFL,INFD,0),U,2),Y=INVAL D Y^DIQ Q Y
  1. ;Convert for date
  1. I INT["D" S Y=INVAL D DD^%DT Q Y
  1. ;If free text, leave it alone
  1. Q INVAL
  1. ;
  1. INXMVG(INFL,INFD,INVAL) ; Internal to external, move variable into global
  1. ;
  1. ; Description: Check if see INVAL before, convert and store in
  1. ; INAP array if neccessary for look up later. If
  1. ; INAP is too large, then move it to global.
  1. ; Return: External value
  1. ; : Null
  1. ; Parameters:
  1. ; INFL = File ien
  1. ; INFD = Field ien
  1. ; INVAL= Internal value
  1. ;
  1. ; Code begins:
  1. ; Merge over to ^UTILITY when the space is full
  1. I $S<20000 K ^UTILITY("INAP",$J) M ^UTILITY("INAP",$J)=INAP K INAP S INAP="^UTILITY(""INAP"",$J)"
  1. ; If see internal before, get external value
  1. I $D(INAP(INFL,INFD,INVAL)) Q $G(INAP(INFL,INFD,INVAL))
  1. ; If not see internal before, convert to external then store in INAP array
  1. I '$D(INAP(INFL,INFD,INVAL)) S C=$P(^DD(INFL,INFD,0),U,2),Y=INVAL D Y^DIQ S INAP(INFL,INFD,INVAL)=Y Q Y