source: WorldVistAEHR/trunk/r/TEXT_INTEGRATION_UTILITIES-GMRP-TIU/TIUPNCV5.m@ 901

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

initial load of WorldVistAEHR

File size: 3.2 KB
Line 
1TIUPNCV5 ;SLC/DJP ;PNs ==> TIU cnv rtns ;5-7-97
2 ;;1.0;TEXT INTEGRATION UTILITIES;;Jun 20, 1997
3 ;
4INTRO ;Introduction text
5 K DIR W @IOF W !!?16,"**** PROGRESS NOTE CONVERSION ****"
6 I $P($G(^GMR(121.99,1,"TITLE")),U,4)'="FINISHED" D MOREWK Q
7 D CANRUN Q:$G(TIU("QUIT"))
8 W !!?5,"This option will copy the data from the Generic Progress Note"
9 W !?5,"package (File #121) into the Text Integration Utility (TIU)"
10 W !?5,"package (File #8925). Entries missing required data fields"
11 W !?5,"are ignored during processing but annotated on an error list."
12 ;
13 W !!?5,"The Generic Progress Note (^GMR 121) global will NOT be"
14 W !?5,"automatically deleted during this process. It is recommended"
15 W !?5,"that the file be archived and purged as soon as possible after"
16 W !?5,"the conversion has been verified as complete."
17 ;
18 W !!?5,"A mail message documenting all discrepancies encountered during"
19 W !?5,"processing will be sent to you upon completion or halt of the"
20 W " conversion.",!
21 W !?5,"During conversion, a cross-reference is set in the"
22 W !?5,"GENERIC PROGRESS NOTE file (#121)- which contains"
23 W !?5,"the IEN of the progress note and the corresponding"
24 W !?5,"IEN in the TIU DOCUMENT file (#8925).",!
25 W !?5,"FORMAT: ^GMR(121,""CNV"",IEN)=TIU IEN",!!
26 S DIR(0)="E" D ^DIR I $D(DIRUT) S TIU("QUIT")=1 Q
27 K DIR
28 D PNIEN Q:$G(TIU("QUIT"))
29 D MAIL Q:$G(TIU("QUIT"))
30 Q
31 ;
32MOREWK ;Must run GMRP*2.5*44 before installing & implementing TIU
33 S TIU("QUIT")=1
34 K DIR
35 W !!?5,"You MUST install and implement the patch, GMRP*2.5*44, prior"
36 W !?5,"to converting data from the Generic Progress Note files to the"
37 W !?5,"Text Integration Utility files. This is a MUST DO action.",!
38 W !?5,"Additional information concerning this patch may be found in the"
39 W !?5,"TIU Implementation Guide."
40 H 2
41 Q
42 ;
43MAIL ;Mail Prompt
44 S TIUMAIL=$P(^VA(200,TIU("DUZ"),0),U,1)
45 W ! K DIR S DIR(0)="P^200:EMZ"
46 S DIR("A")="Please enter person to receive the completion message"
47 S DIR("B")=TIUMAIL,DIR("?")="^D HELP6^TIUPNCV5"
48 D ^DIR K DIR I $D(DIRUT)!(Y<0) S TIU("QUIT")=1 Q
49 S TIUUSER=$P(Y,U,1)
50 Q
51 ;
52PNIEN ;GMRPN IEN Prompt
53 N GMRPDA
54 S GMRPDA="A"
55 S GMRPDA=$O(^GMR(121,GMRPDA),-1)
56 W ! K DIR S DIR(0)="NA^0:99999999"
57 S DIR("A")="Enter IEN of last Progress Note in ^GMR(121 : "
58 S DIR("B")=GMRPDA,DIR("?")="^D HELP10^TIUPNCV7" D ^DIR K DIR
59 I $D(DIRUT)!(Y<0) S TIU("QUIT")=1 Q
60 S TIUPNIEN=+Y
61 Q
62 ;
63HELP6 ;Help text for MAIL prompt
64 W !!?5,"At the completion of the conversion a bulletin will sent"
65 W !?5,"to this individual indicating completion status."
66 Q
67 ;
68CANRUN ; If Progress Note Conversion is currently running or the
69 ; Discharge Summary conversion is running, you CANNOT restart or
70 ; begin to run the Progress Note Conversion
71 S TIU2=$P($G(^TIU(8925.97,1,0)),U,2) ;start date
72 S TIU5=$P($G(^TIU(8925.97,1,0)),U,3) ;completed date
73 S TIU3=$P($G(^TIU(8925.97,1,0)),U,5) ;processing ien
74 I +$G(TIU2),+$G(TIU5),'+$G(TIU3) D Q
75 . S TIU("QUIT")=1
76 . W !!?5,"Progress Note Conversion now running.",!
77 . W !?5,"DO NOT RUN CONVERSION",!
78 . K TIU2,TIU5,TIU3
79 . H 5
80 I +$G(^GMR(128,"CNV","T0")),'+$G(^GMR(128,"CNV","T1")) D Q
81 . S TIU("QUIT")=1
82 . W !!?5,"Discharge Summary Conversion now running.",!
83 . W !?5,"Do not run Progress Note Conversion concurrently.",!
84 . H 5
85 Q
86 ;
Note: See TracBrowser for help on using the repository browser.