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

INHMGD9.m

Go to the documentation of this file.
  1. INHMGD9 ;CAR; 15 May 97 14:57;HL7 MESSAGING - PRINT LOOKUP ERRORS
  1. ;;3.01;BHL IHS Interfaces with GIS;;JUL 01, 2001
  1. ;COPYRIGHT 1991-2000 SAIC
  1. ;
  1. ; MODULE NAME:
  1. ; HL7 Messaging - Print Lookup Errors (INHMGD9).
  1. ;
  1. ; PURPOSE:
  1. ; Module INHMGD9 is used to print a listing of the lookup errors
  1. ; encountered while building the ^UTILITY("INHMGD",$J,"A") table
  1. ; for Sensitivity Analysis
  1. ;
  1. INPERR ;Print the Lookup Errors
  1. ;Print list of lookup errors from ^UTILITY("INHMGD",$J,"E")
  1. ;Inputs:
  1. ; INPERR takes no inputs. When started, it goes to
  1. ; ^UTILITY("INHMGD",$J,"E") and lists all of the errors found.
  1. ;
  1. S INPAGE="" K INHDR
  1. ;quit if no errors
  1. I '$D(^UTILITY("INHMGD",$J,"E")) Q
  1. ;
  1. N IN7F,IN7FT,IN7FET,IN7M,IN7MT,IN7S,IN7ST,IN7SET
  1. N INAM,IND,INF,INFIL,INFLD,INHP,INT,INT0,INTEXT,INX
  1. ;
  1. ;begin printing Lookup Error Report
  1. ;All of the errors which are logged, are handled in roughly the same
  1. ;way. An entry is made under ^UTILITY("INHMGD",$J,"E",I1,I2,I3)=data
  1. ;where I1=Message IEN, I2=Segment IEN and I3 (if available)=Field IEN.
  1. ;Where I3 is not available, an incrementing counter is used.
  1. ;"data" is composed of File#_^_Field#_error_message.
  1. ;
  1. S INHP=0 ;flag: page header not setup
  1. S INT=$S(IOM>80:48,1:40)
  1. S INQ="^UTILITY(""INHMGD"","_$J_",""E"")"
  1. F S INQ=$Q(@INQ) Q:$QS(INQ,3)'["E"!$G(DUOUT) D
  1. .I 'INHP D
  1. ..D SETHDR(.INHDR) S INHP=1 ;setup header
  1. ..D PHEADER^INHMGD8(4,.INHDR) ;print a header (full header if page="")
  1. .;now, handle errors
  1. .;extract Message, Segment and Field numbers.
  1. .S IN7M=$QS(INQ,4),IN7S=$QS(INQ,5),IN7F=$QS(INQ,6)
  1. .;get data: Root File# | Field "C" data.
  1. .S IN7FET=@INQ,INAM=+IN7FET,INFC=$P(IN7FET,U,2)
  1. .;message name
  1. .S IN7MT=""
  1. .I IN7M,$D(^INTHL7M(IN7M,0)) D Q:$E(IN7MT,1,2)'="HL"
  1. ..S IN7MT=$P($G(^INTHL7M(IN7M,0)),U)
  1. .;segment name
  1. .S IN7ST=""
  1. .I IN7S,$D(^INTHL7S(IN7S,0)) S IN7ST=$P($G(^INTHL7S(IN7S,0)),U)
  1. .;field name
  1. .S IN7FT="",INT0=INT
  1. .I IN7F<1 S IN7F="Field N/A",INT0=15
  1. .I IN7F,$D(^INTHL7F(IN7F,0)) S IN7FT=$P($G(^INTHL7F(IN7F,0)),U)
  1. .;
  1. .S INDATA="IN7M_"" ""_IN7MT,?INT,IN7S_"" "",?INT,IN7ST"
  1. .D INW^INHMGD8(1)
  1. .S INDATA="?3,IN7F_"" "",IN7FT,?INT0,INAM_"" ""_INFC,!"
  1. .D INW^INHMGD8(0)
  1. ;
  1. ;print *****End of Report*****, and pause to read.
  1. S INHDR(4)="$C(32)" F INJ=1:1:3 D INW^INHMGD8(INJ=2)
  1. S INDATA="$$DASH^INHMGD1(IOM-$L(INEOR)\2,"" "")_INEOR" D INW^INHMGD8(0)
  1. I $E(IOST)="C",'$D(IO("Q")),IO=IO(0) S DUOUT=$$CR^UTSRD
  1. Q
  1. ;
  1. SETHDR(INHDR) ;Setup header lines
  1. ; Input & Output:
  1. ; INHDR =header text array
  1. ;
  1. S INHDR(99)="HL7 Messaging Data Sources - Lookup Errors"
  1. S INHDR(1)="INHDR(99),?(IOM-30),INDT,?(IOM-10),""PAGE: "",INPAGE"
  1. S INHDR(4)="""IEN/Message Name"",?INT,""IEN/Segment Name"""
  1. S INHDR(5)=""" IEN/Field Name"",?INT,""Root/DATA LOCATION or Error"""
  1. S INHDR(10)="$$DASH^INHMGD1(IOM-3)"
  1. Q
  1. ;