source: FOIAVistA/trunk/r/MENTAL_HEALTH-YS-RUCL-YI-YT/YSD4E010.m@ 1800

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

initial load of FOIAVistA 6/30/08 version

File size: 3.8 KB
Line 
1YSD4E010 ;DALISC/MJD - DSM CONVERSION ERROR UTILITY ;3/22/94 [ 04/08/94 11:09 AM ]
2 ;;5.01;MENTAL HEALTH;;Dec 30, 1994
3 ;
4 QUIT
5 ;
6KILL ;KILL all error data stored
7 ;
8 W !!,"Killing global error data ......",!!
9 K ^YSD(627.99,"AS","TE")
10 QUIT
11 ;
12DE ;If data exists in ^YSD(627.99,"AS","TE",0), the value "1" will be
13 ;passed back in the variable YSD4EDE, a "0" if no data exists
14 I '$D(^YSD(627.99,"AS","TE",0)) D QUIT ;->
15 . S YSD4EDE=0
16 S YSD4EDE=1
17 QUIT
18 ;
19PED(YSD4EDT,YSD4ETXT,YSD4EFN,YSD4END,YSD4EIEN,YSD4EMIN,YSD4EQID) ;
20 ;Patient Error Demographics is passed when a DSM conversion error
21 ;is encountered;;;^YSD(627.99,"AS","TE",0) is set the first time entered
22 ;
23 ; Called by YSD40030,31,32,40,41,42,50,51,52
24 ;
25 I '$D(^YSD(627.99,"AS","TE",0)) D
26 . D HDRN
27 . S (YSD4ECTR,YSD4EMR,YSD4EPN,YSD4EDR)=0
28 S YSD4ECTR=$G(YSD4ECTR)+1
29 S ^YSD(627.99,"AS","TE",YSD4ECTR)=$G(YSD4EDT)_U_$G(YSD4ETXT)_U_$G(YSD4EFN)_U_$G(YSD4END)_U_$G(YSD4EIEN)_U_$G(YSD4EMIN)_U_$G(YSD4EQID)
30 ;
31 I $G(YSD4EFN)>0 D
32 . S ^YSD(627.99,"AS","TE")=YSD4ECTR
33 . S:+YSD4EFN=90 YSD4EMR=$G(YSD4EMR)+1,$P(^YSD(627.99,"AS","TE","MR"),U)=YSD4EMR
34 . S:+YSD4EFN=627.8 YSD4EDR=$G(YSD4EDR)+1,$P(^YSD(627.99,"AS","TE","DR"),U)=YSD4EDR
35 . S:+YSD4EFN=121 YSD4EPN=$G(YSD4EPN)+1,$P(^YSD(627.99,"AS","TE","PN"),U)=YSD4EPN
36 QUIT
37 ;
38INITSITE() ; Set YSD4SITE to Name of Institution
39 K DIC S DIC=4,DR=".01;.02",DA=+$G(DUZ(2)),DIQ="YSD4E",DIQ(0)="E" D EN^DIQ1
40 S YSD4ESTE=$P(YSD4E(4,+$G(DUZ(2)),.01,"E"),",")
41 S YSD4SITE=""
42 F YSD4I=1:1:$L(YSD4ESTE," ") D
43 . S YSD4S1=$E($P(YSD4ESTE," ",YSD4I),1)
44 . S YSD4S2=$$LOW^XLFSTR($E($P(YSD4ESTE," ",YSD4I),2,$L($P(YSD4ESTE," ",YSD4I))))
45 . S YSD4STE(YSD4I)=YSD4S1_YSD4S2
46 . S YSD4SITE=YSD4SITE_YSD4STE(YSD4I)_" "
47 I $E(YSD4SITE,$L(YSD4SITE))=" " D
48 . S YSD4SITE=$E(YSD4SITE,1,$L(YSD4SITE)-1)
49 QUIT YSD4SITE
50 ;
51HDRN ;Set ^YSD(627.99,"AS","TE",0)=create date^purge date^description^duz
52 N YSD4E0,YSD4E,YSD4E1
53 S YSD4E0=$H,YSD4E1=$$HADD^XLFDT(YSD4E0,7),^YSD(627.99,"AS","TE",0)=$$HTFM^XLFDT(YSD4E0,1)_U_$$HTFM^XLFDT(YSD4E1,1)_U_"MENTAL HEALTH V. 5.01 DSM CONVERSION ERROR LOG"_U_$P($G(^VA(200,DUZ,0)),U)
54 S ^YSD(627.99,"AS","TE")=0
55 S ^YSD(627.99,"AS","TE","MR")=0_U_90_U_"MEDICAL RECORD"
56 S ^YSD(627.99,"AS","TE","PN")=0_U_121_U_"GENERIC PROGRESS NOTES"
57 S ^YSD(627.99,"AS","TE","DR")=0_U_627.8_U_"DIAGNOSTIC RESULTS"
58 QUIT
59 ;
60REP ;If DSM conversion errors exist the Total number of errors by file will
61 ;be displayed to the screen, user will be prompted to print to a device
62 ;
63 ; Called by YSD4DSM
64 ;
65 S YSD4EABT=0
66 I '$D(^YSD(627.99,"AS","TE",0)) D QUIT ;->
67 . W !!,"No DSM conversion errors to report....",!!
68 D SHDR
69 D SD
70 K DIR S DIR(0)="Y",DIR("A")="Print Errors",DIR("B")="Y"
71 D ^DIR
72 QUIT:+Y'>0 ;->
73 S %ZIS="QM" D ^%ZIS G EXIT:POP
74 I $D(IO("Q")) D QUIT
75 . S ZTRTN="DQ^YSD4E010"
76 . F YSD4E1="YSD4EABT","YSD4ECNT","YSD4ECON","YSD4EL","YSD4EP","YSD4ERD","YSD4ESMD","YSD4ESME","YSD4ESTE" D
77 .. S ZTSAVE(YSD4E1)=""
78 . S ZTDESC="Mental Health V. 5.01 DSM Conversion Error Report"
79 . S ZTIO=ION
80 . D ^%ZTLOAD
81 . D HOME^%ZIS K IO("Q")
82 . W !!,"Your Job has been Queued to "_ION_", job# ",ZTSK,"...",!!
83 ;
84DQ ;
85 U IO
86 D PROC^YSD4E020
87 D ^%ZISC
88 ;
89EXIT ;
90 I $D(ZTQUEUED) S ZTREQ="@" K ZTSK
91 QUIT
92 ;
93SHDR ;Screen header for DSM Conversion Error reporting
94 W @IOF,!,"DSM Conversion Error Totals",?35,$J($$INITSITE,45),!,$$REPEAT^XLFSTR("=",IOM),!!
95 QUIT
96 ;
97SD ;Write error totals to the screen
98 W "Error Summary:",?25,"Medical Record (#90) file errors:",?(IOM-12),$J($P($G(^YSD(627.99,"AS","TE","MR")),U),10)
99 W !,?25,"Generic Progress Notes (#121) file errors:",?(IOM-12),$J($P($G(^YSD(627.99,"AS","TE","PN")),U),10)
100 W !,?25,"Diagnostic Results (#627.8) file errors:",?(IOM-12),$J($P($G(^YSD(627.99,"AS","TE","DR")),U),10),!
101 W ?25,$$REPEAT^XLFSTR("-",55),!
102 W ?25,"Total number of errors:",?(IOM-12),$J($G(^YSD(627.99,"AS","TE")),10),!!!
103 QUIT
104 ;
105EOR ;YSD4E010 - DSM CONVERSION ERROR UTILITY ;3/22/94
Note: See TracBrowser for help on using the repository browser.