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

INTSUT3.m

Go to the documentation of this file.
  1. INTSUT3 ; cmi/flag/maw - JD 13 Apr 96 21:09 INTERACTIVE TESTING II ; [ 05/22/2002 2:54 PM ]
  1. ;;3.01;BHL IHS Interfaces with GIS;**1**;JUL 01, 2001
  1. ;COPYRIGHT 1991-2000 SAIC
  1. ;
  1. Q
  1. MERGE(INREQLST) ;Merge tests into ^UTILITY GLOBAL
  1. ; Input:
  1. ; INREQLST - Array of selected messages
  1. ;Get the next test run number
  1. N INL,INT,TESTNUM
  1. K ^UTILITY("INTHU",DUZ,$J)
  1. S INL="" F S INL=$O(INREQLST(INL)) Q:INL="" D
  1. .S INT=INREQLST(INL)
  1. .M ^UTILITY("INTHU",DUZ,$J,INL,INT,0)=^INTHU(INT,0)
  1. .M ^UTILITY("INTHU",DUZ,$J,INL,INT,3)=^INTHU(INT,3)
  1. .S TESTNUM=$G(^UTILITY("INTHU",DUZ,$J))+1,^UTILITY("INTHU",DUZ,$J)=TESTNUM
  1. Q
  1. MERGE2(INARY) ;Merge tests into ^UTILITY GLOBAL
  1. ; Input:
  1. ; INARY - Array of selected messages
  1. ;Get the next test run number
  1. N INL,INT,TESTNUM,INEXIST
  1. S INEXIST=0
  1. S:$G(INARY)="" INARY="^INTHU"
  1. S INL="" F S INL=$O(INARY("A",INL)) Q:INL="" D
  1. .S INT=INARY("A",INL)
  1. .S:$D(^UTILITY("INTHU",DUZ,$J,INL)) INEXIST=1
  1. .K ^UTILITY("INTHU",DUZ,$J,INL)
  1. .M ^UTILITY("INTHU",DUZ,$J,INL,INT,0)=@(INARY_"(INT,0)")
  1. .M ^UTILITY("INTHU",DUZ,$J,INL,INT,3)=@(INARY_"(INT,3)")
  1. .I 'INEXIST S TESTNUM=$G(^UTILITY("INTHU",DUZ,$J))+1,^UTILITY("INTHU",DUZ,$J)=TESTNUM
  1. Q
  1. UPDAT2FL(INREQLST,INDA) ;Merge to 4001.1 multiple
  1. ; Input:
  1. ; INREQLST - Array of selected messages
  1. ; INDA - ien of 4001.1
  1. ;Get the next test run number
  1. N INL,INT,TESTNUM
  1. K ^DIZ(4001.1,INDA,19,0)
  1. S TESTNUM=""
  1. S INL="" F S INL=$O(INREQLST(INL)) Q:INL="" D
  1. .S INT=INREQLST(INL)
  1. .I $D(^INTHU(INT,0)) D
  1. ..S ^DIZ(4001.1,INDA,19,0)=INT_U_$P(^INTHU(INT,0),U,5)
  1. ..S TESTNUM=TESTNUM+1
  1. S ^DIZ(4001.1,INDA,19,0)="^4001.19PA^"_TESTNUM_U_TESTNUM
  1. Q
  1. UPDTFRUT(INDA) ;Update ^UTILITY to 4001.1 multiple
  1. ; Input:
  1. ; ^UTILITY("DIS",$J - selected messages
  1. ; INDA - ien of 4001.1
  1. ; Output:
  1. ; ^DIZ(4001.1,INDA,19, multiple
  1. ;
  1. N INL,INT,TESTNUM
  1. K ^DIZ(4001.1,INDA,19,0)
  1. S TESTNUM=""
  1. S INL="" F S INL=$O(^UTILITY("INTHU",DUZ,$J,INL)) Q:INL="" D
  1. .S INT=$O(^UTILITY("INTHU",DUZ,$J,INL,""))
  1. .I $D(^INTHU(INT,0)) D
  1. ..D UPSINGMS^INTSUT3(INDA,"LS",INT)
  1. Q
  1. UPDATE(INDA) ;Update INREQLST with test messages
  1. ; Input/Output - INREQLST - Name of Utility with tests
  1. N INL,INT,IND
  1. K ^UTILITY("DIS",$J)
  1. S INL=0,INT="" F S INT=$O(^DIZ(4001.1,INDA,19,INT)) Q:INT="" D
  1. .S IND=+$G(^DIZ(4001.1,INDA,19,INT,0))
  1. .I IND D
  1. ..S INL=INL+1
  1. ..M ^UTILITY("DIS",$J,INL,IND,0)=^INTHU(IND,0)
  1. ..S ^UTILITY("DIS",$J)=INL
  1. Q
  1. UPSINGMS(INDA,IN0,INENT) ;Update a single entry in test message multiple
  1. ; Input:
  1. ; INDA - ien of Test Criteria
  1. ; IN0 - DIC(0)
  1. ; INENT - value to stuff
  1. N DLAYGO,DA,DIE,DIC,X,Y
  1. K DIC S DLAYGO="4001.1",DIC("P")=$P(^DD(4001.1,19,0),U,2)
  1. S DIC="^DIZ(4001.1,"_INDA_",19,",DIC(0)=IN0,DA(1)=INDA,DIE=DIC
  1. S X=INENT
  1. D ^DICN
  1. I Y<0 D DISPLAY^INTSUT1("Unable to update Test Message multiple - "_INENT) Q
  1. Q
  1. UPDTSND(INDA) ;Update ^UTILITY("INTHU" with test messages
  1. ; Input - INDA - ien of Criteria
  1. ; Output - ^UTILITY - Name of Utility with tests
  1. N INL,INT,IND
  1. K ^UTILITY("INTHU",DUZ,$J)
  1. S INL=0,INT="" F S INT=$O(^DIZ(4001.1,INDA,19,INT)) Q:INT="" D
  1. .S IND=+$G(^DIZ(4001.1,INDA,19,INT,0))
  1. .I IND D
  1. ..S INL=INL+1
  1. ..M ^UTILITY("INTHU",DUZ,$J,INL,IND,0)=^INTHU(IND,0)
  1. ..M ^UTILITY("INTHU",DUZ,$J,INL,IND,3)=^INTHU(IND,3)
  1. ..S ^UTILITY("INTHU",$J)=INL
  1. ..;kill activity log from UIF
  1. ..K ^INTHU(IND,1)
  1. Q
  1. FLATNAM(INAME,INTYP) ;Get VMS flat file name
  1. ;Input:
  1. ; INAME - default name
  1. ; INTYP - "S" - save file
  1. ; Returns: INAME - VMS Flat file name
  1. N DONE S DONE=0
  1. I $G(INTYP)="S" S INTYP="Save to"
  1. E S INTYP="Restore from"
  1. F D Q:DONE
  1. .W @IOF,!!
  1. .S INAME=$$READ^%ZTF(1,30,"Enter the VMS flat file to "_INTYP_": ",INAME)
  1. .I INAME="^" S INAME=""
  1. .I INAME="" S DONE=1 Q
  1. .I INAME["?" D Q
  1. ..N $ET
  1. ..S $ZE="",$ZT="ERR^INTSUT3"
  1. ..S INAME=""
  1. ..;I INTYP="Save to" W !,"Enter a flat file name to save Criteria to"
  1. ..;E W $ZC(%SPAWN,"DIR")
  1. ..I $$CR^UTSRD
  1. .S DONE=1
  1. Q INAME
  1. EXISTS(INODE0,INAME) ;Check to see if user defined record exists
  1. ;Input:
  1. ; INODE0 - 0 node of flat saved utility global or 4001.1 0 node
  1. ;Output:
  1. ; INAME - Name of criteria
  1. ;Returns: 0 if does not exist, or ien of existing criteria
  1. ;
  1. N INOPT2,INCTRL
  1. S INCTRL=$S('$L($G(INCTRL)):"U","SUBW"[INCTRL:INCTRL,1:"U")
  1. ; quit if not to be saved
  1. S INAME=$P(INODE0,U,4)
  1. Q:'$L(INAME) ""
  1. ; see if name exists already
  1. S INOPT2("DUZ")=DUZ,INOPT2("TYPE")=$P(INODE0,U,5),INOPT2("APP")=$P(INODE0,U,8),INOPT2("FUNC")=$P(INODE0,U,6),INOPT2("CONTROL")=INCTRL
  1. Q $$LOOKUP^INHUTC1(.INOPT2,INAME)
  1. ERR Q