source: WorldVistAEHR/trunk/r/TEXT_INTEGRATION_UTILITIES-GMRP-TIU/TIUPNCV6.m@ 1489

Last change on this file since 1489 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 3.0 KB
Line 
1TIUPNCV6 ;SLC/DJP ;PNs ==> TIU cnv rtns ;5-7-97
2 ;;1.0;TEXT INTEGRATION UTILITIES;;Jun 20, 1997
3 ;
4TLSRCH ;Utility to search ^TIU(8925.1 FOR ^GMR(121.2 titles
5 K DIR W @IOF W !!?14,"***** TITLE REPORT *****"
6 W !!?5,"This option will identify TITLES in ^GMR(121.2,"
7 W !?5,"Generic Progress Note Title File which are NOT"
8 W !?5,"defined in ^TIU(8925.1, TIU Document Definition File."
9 W !!?5,"It is important for a successful conversion that"
10 W !?5,"all Progress Note Titles be defined as Documents"
11 W !?5,"within ^TIU(8925.1. The exceptions to this rule are"
12 W !?5,"titles which have been retired or inactivated. They"
13 W !?5,"do not need to be entered in the file."
14 W !! K DIR S DIR(0)="Y",DIR("A")="Do you want to continue"
15 S DIR("B")="YES",DIR("?")="^D HELP8^TIUPNCV6"
16 D ^DIR K DIR I $D(DIRUT)!(Y=0) Q
17 D DEVICE
18 Q
19 ;
20LOOPT ;Loops through ^GMR(121.2
21 U IO
22 S CTR=0 F LKUP=0:0 S LKUP=$O(^GMR(121.2,LKUP)) Q:LKUP<1 D SRCH
23 D HDR,PRINT
24 K LKUP,GMRPTL,CTR,TIU,PRT,TIULN
25 K ^TMP("TIUTIL")
26 Q
27 ;
28SRCH ;Lookup on ^TIU(8925.1, TIU Document Definition File
29 S TIUFPRIV=1
30 S GMRPTL=$P(^GMR(121.2,LKUP,0),U,1)
31 I $P($G(^GMR(121.2,LKUP,0)),U,4)="1" D RETIRED Q
32 S X=$$UPPER^TIULS(GMRPTL),TYP="DOC"
33 K DIC S DIC(0)="XZ",DIC="^TIU(8925.1,"
34 S DIC("S")="I $P($G(^(0)),U,4)=TYP"
35 D ^DIC K DIC,TYP I Y<1 D NOTR Q
36 I $P(Y(0),U,4)'="DOC" D NORING
37 Q
38 ;
39NOTR ;Title not found in ^TIU(8925.1
40 S CTR=CTR+1
41 S ^TMP("TIUTIL",$J,CTR)=CTR_". "_GMRPTL_" not found in ^TIU(8925.1."
42 Q
43NORING ;Title found in file but not defined as a DOCUMENT
44 S CTR=CTR+1
45 S ^TMP("TIUTIL",$J,CTR)=CTR_". "_GMRPTL_" not defined as a DOCUMENT."
46 Q
47 ;
48RETIRED ;Title assigned to existing note but RETIRED from further use
49 S CTR=CTR+1
50 S ^TMP("TIUTIL",$J,CTR)=CTR_". "_GMRPTL_" RETIRED."
51 Q
52 ;
53PRINT ;Prints Undefined Title Report
54 I '$D(^TMP("TIUTIL",$J))
55 I W !!,?19,"NO DISCREPANCIES FOUND",!?19,"**************",! Q
56 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"))
57 Q
58 ;
59DEVICE ;prompts for device selection
60 K IOP S %ZIS="Q" D ^%ZIS I POP K POP Q
61 I $D(IO("Q")) K IO("Q") D Q
62 .S ZTSAVE("TIU*")="",ZTSAVE("GMRP*")=""
63 .S ZTRTN="LOOPT^TIUPNCV6",ZTDESC="TIU/GMRPN TITLE SEARCH" D ^%ZTLOAD
64 .W !,$S($D(ZTSK):"Request Queued!",1:"Request Cancelled."),!
65 .K ZTRTN,ZTDESC,ZTSAVE
66 .D HOME^%ZIS
67 D LOOPT,^%ZISC
68 Q
69 ;
70LNCK ;Check current $Y value for paging
71 I IOST?1"P".E Q:$Y'>(IOSL-9) D HDR Q
72 I $Y>(IOSL-3) D RETURN I '$D(TIU("QUIT")) D HDR
73 Q
74 ;
75RETURN ;Issues RETURN prompt
76 K DIR F TIULN=1:1:(IOSL-$Y-4) W !
77 S DIR(0)="E" D ^DIR K DIR I $D(DIRUT) S TIU("QUIT")=1 Q
78 I Y="" W @IOF
79 Q
80 ;
81HDR ;Header Line for Title Report
82 W !!?12,"****** UNDEFINED TITLE REPORT ******",!!
83 Q
84 ;
85LASTLN ;End of report
86 W !!?12,"****** END OF REPORT ******"
87 S TIU("QUIT")=1
88 Q
89 ;
90HELP8 ;Help text for SEARCH prompt
91 W !!?5,"Press <ret> to continue with compare of the Progress"
92 W !?5,"Note Title File and the TIU Document Definition File."
93 W !?5,"Enter NO or ""^"" to stop this option."
94 Q
95 ;
Note: See TracBrowser for help on using the repository browser.