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

TIUPNCV6.m

Go to the documentation of this file.
  1. TIUPNCV6 ;SLC/DJP ;PNs ==> TIU cnv rtns ;5-7-97
  1. ;;1.0;TEXT INTEGRATION UTILITIES;;Jun 20, 1997
  1. ;
  1. TLSRCH ;Utility to search ^TIU(8925.1 FOR ^GMR(121.2 titles
  1. K DIR W @IOF W !!?14,"***** TITLE REPORT *****"
  1. W !!?5,"This option will identify TITLES in ^GMR(121.2,"
  1. W !?5,"Generic Progress Note Title File which are NOT"
  1. W !?5,"defined in ^TIU(8925.1, TIU Document Definition File."
  1. W !!?5,"It is important for a successful conversion that"
  1. W !?5,"all Progress Note Titles be defined as Documents"
  1. W !?5,"within ^TIU(8925.1. The exceptions to this rule are"
  1. W !?5,"titles which have been retired or inactivated. They"
  1. W !?5,"do not need to be entered in the file."
  1. W !! K DIR S DIR(0)="Y",DIR("A")="Do you want to continue"
  1. S DIR("B")="YES",DIR("?")="^D HELP8^TIUPNCV6"
  1. D ^DIR K DIR I $D(DIRUT)!(Y=0) Q
  1. D DEVICE
  1. Q
  1. ;
  1. LOOPT ;Loops through ^GMR(121.2
  1. U IO
  1. S CTR=0 F LKUP=0:0 S LKUP=$O(^GMR(121.2,LKUP)) Q:LKUP<1 D SRCH
  1. D HDR,PRINT
  1. K LKUP,GMRPTL,CTR,TIU,PRT,TIULN
  1. K ^TMP("TIUTIL")
  1. Q
  1. ;
  1. SRCH ;Lookup on ^TIU(8925.1, TIU Document Definition File
  1. S TIUFPRIV=1
  1. S GMRPTL=$P(^GMR(121.2,LKUP,0),U,1)
  1. I $P($G(^GMR(121.2,LKUP,0)),U,4)="1" D RETIRED Q
  1. S X=$$UPPER^TIULS(GMRPTL),TYP="DOC"
  1. K DIC S DIC(0)="XZ",DIC="^TIU(8925.1,"
  1. S DIC("S")="I $P($G(^(0)),U,4)=TYP"
  1. D ^DIC K DIC,TYP I Y<1 D NOTR Q
  1. I $P(Y(0),U,4)'="DOC" D NORING
  1. Q
  1. ;
  1. NOTR ;Title not found in ^TIU(8925.1
  1. S CTR=CTR+1
  1. S ^TMP("TIUTIL",$J,CTR)=CTR_". "_GMRPTL_" not found in ^TIU(8925.1."
  1. Q
  1. NORING ;Title found in file but not defined as a DOCUMENT
  1. S CTR=CTR+1
  1. S ^TMP("TIUTIL",$J,CTR)=CTR_". "_GMRPTL_" not defined as a DOCUMENT."
  1. Q
  1. ;
  1. RETIRED ;Title assigned to existing note but RETIRED from further use
  1. S CTR=CTR+1
  1. S ^TMP("TIUTIL",$J,CTR)=CTR_". "_GMRPTL_" RETIRED."
  1. Q
  1. ;
  1. PRINT ;Prints Undefined Title Report
  1. I '$D(^TMP("TIUTIL",$J))
  1. I W !!,?19,"NO DISCREPANCIES FOUND",!?19,"**************",! Q
  1. F PRT=0:0 S PRT=$O(^TMP("TIUTIL",$J,PRT)) Q:PRT<1 W !?5,^TMP("TIUTIL",$J,PRT),! D:PRT=CTR LASTLN Q:$D(TIU("QUIT")) D LNCK Q:$D(TIU("QUIT"))
  1. Q
  1. ;
  1. DEVICE ;prompts for device selection
  1. K IOP S %ZIS="Q" D ^%ZIS I POP K POP Q
  1. I $D(IO("Q")) K IO("Q") D Q
  1. .S ZTSAVE("TIU*")="",ZTSAVE("GMRP*")=""
  1. .S ZTRTN="LOOPT^TIUPNCV6",ZTDESC="TIU/GMRPN TITLE SEARCH" D ^%ZTLOAD
  1. .W !,$S($D(ZTSK):"Request Queued!",1:"Request Cancelled."),!
  1. .K ZTRTN,ZTDESC,ZTSAVE
  1. .D HOME^%ZIS
  1. D LOOPT,^%ZISC
  1. Q
  1. ;
  1. LNCK ;Check current $Y value for paging
  1. I IOST?1"P".E Q:$Y'>(IOSL-9) D HDR Q
  1. I $Y>(IOSL-3) D RETURN I '$D(TIU("QUIT")) D HDR
  1. Q
  1. ;
  1. RETURN ;Issues RETURN prompt
  1. K DIR F TIULN=1:1:(IOSL-$Y-4) W !
  1. S DIR(0)="E" D ^DIR K DIR I $D(DIRUT) S TIU("QUIT")=1 Q
  1. I Y="" W @IOF
  1. Q
  1. ;
  1. HDR ;Header Line for Title Report
  1. W !!?12,"****** UNDEFINED TITLE REPORT ******",!!
  1. Q
  1. ;
  1. LASTLN ;End of report
  1. W !!?12,"****** END OF REPORT ******"
  1. S TIU("QUIT")=1
  1. Q
  1. ;
  1. HELP8 ;Help text for SEARCH prompt
  1. W !!?5,"Press <ret> to continue with compare of the Progress"
  1. W !?5,"Note Title File and the TIU Document Definition File."
  1. W !?5,"Enter NO or ""^"" to stop this option."
  1. Q
  1. ;