source: FOIAVistA/trunk/r/TEXT_INTEGRATION_UTILITIES-GMRP-TIU/TIUPNCVU.m@ 1713

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

initial load of FOIAVistA 6/30/08 version

File size: 3.2 KB
Line 
1TIUPNCVU ;SLC/DAN - Final pass through ^GMR(121 for conversion ;4/22/98@14:08:17
2 ;;1.0;TEXT INTEGRATION UTILITIES;**9**;Jun 20, 1997
3EN ; Entry Point
4 I +$$VERSION^XPDUTL("TIU")'>0 W !,"YOU MUST INSTALL TIU BEFORE RUNNING THIS OPTION!",$C(7) Q ;Make sure TIU is installed first.
5WHY F TIUWN=1:1 S TIULINE=$P($T(@("EXPLAIN+"_TIUWN)),";;",2) Q:TIULINE="STOP" W !,TIULINE
6 S TIURUN=$$READ^TIUU("Y","Are you sure you want to run this","NO")
7 I '+TIURUN W !,"Ok, come back when you're sure." D CLEAN Q
8 ;Agreed to run it, now check to see if PN conversion is currently running.
9 I $P(^TIU(8925.97,1,0),U,3)="" W !!,"It appears as though the Progress Notes conversion is running.",!,"Please run this after the conversion finishes." D CLEAN Q
10 W !! S TIUECS=$$ASKCOS I 'TIUECS D CLEAN Q
11 ;
12DEVICE ;Allows user to queue this option
13 S %ZIS="Q" D ^%ZIS I POP D CLEAN Q
14 I $D(IO("Q")) S ZTDESC="Final conversion pass",ZTRTN="DQ^TIUPNCVU",ZTIO=ION,ZTSAVE("TIUECS")="" D ^%ZTLOAD W !,"Request ",$S($D(ZTSK):"Queued",1:"Cancelled"),! D ^%ZISC,CLEAN,HOME^%ZIS Q
15 ;
16DQ ;Move through ^GMR(121 and convert any remaining notes
17 W:$E(IOST,1,2)="C-" !,"Working..." S (TIUATC,TIUCVTED)=0
18 S GMRIEN=0 F S GMRIEN=$O(^GMR(121,GMRIEN)) Q:'+GMRIEN D:'$D(^GMR(121,"CNV",GMRIEN)) CONVERT(GMRIEN) W:$E(IOST,1,2)="C-"&'(GMRIEN#1000) "." ;Convert if not already done.
19 W !!,"CONVERSION IS COMPLETE!"
20 W !!,"Total entries processed: ",$P(^GMR(121,0),"^",4),!,"Attempted to convert: ",TIUATC,!,"Converted: ",TIUCVTED
21 ;
22CLEAN ;KILL VARIABLES
23 K TIUWN,TIULINE,TIURUN,TIUECS,%ZIS,POP,IO("Q"),ZTRTN,ZTDESC,ZTIO,ZTSAVE,GMRIEN,TIU,EMER,Y,TIUATC,TIUCVTED,DIR,ZTSK
24 Q
25 ;
26CONVERT(Y) ;Sets needed variables and calls the convert individual note process
27 N DPTIEN S EMER=1 S DPTIEN=$P(^GMR(121,Y,0),"^",2) I DPTIEN,$E($P(^DPT(DPTIEN,0),"^",9),1,4)'="0000" S TIUATC=TIUATC+1
28 D EMERG^TIUPNCV4
29 I $D(^GMR(121,"CNV",GMRIEN)) S TIUCVTED=TIUCVTED+1
30 S:GMRIEN>$P(^TIU(8925.97,1,0),"^",5) $P(^TIU(8925.97,1,0),"^",5)=GMRIEN ;Update PN last entry processed
31 Q
32 ;
33ASKCOS() ;Ask for cosigner to be used for notes that are signed but uncosigned and req cosignature
34 W !,"For notes that are signed but are uncosigned, an expected",!,"cosigner must be identified before notes can be moved to TIU."
35 W !!,"Please identify a user who will become the expected cosigner for",!,"these notes. The clinical coordinator is recommended.",!
36 W !,"Once these are moved to TIU the above named cosigner can edit the notes",!,"and put in the correct expected cosigner.",!
37 N DIR,Y S DIR(0)="P^200:AEMQ",DIR("A")="Enter EXPECTED COSIGNER" D ^DIR
38 Q +Y
39 ;
40EXPLAIN ;Explain what this option does
41 ;;This option will process all remaining unconverted progress notes.
42 ;;Notes that cannot be converted will be identified, along with the
43 ;;the reason they could not be converted, as the process runs.
44 ;;It is HIGHLY RECOMMENDED that you queue this option to a printer
45 ;;so you can review the notes that did not convert.
46 ;;
47 ;;This option should be run after you have completed the final progress notes
48 ;;conversion pass. This will move all remaining notes (including
49 ;;unsigned and uncosigned) to TIU.
50 ;;
51 ;;Notes that are reported as not converting, that you subsequently
52 ;;fix, should be moved using the SINGLE PROGRES NOTES CONVERSION option.
53 ;;
54 ;;STOP
Note: See TracBrowser for help on using the repository browser.