source: FOIAVistA/trunk/r/MENTAL_HEALTH-YS-RUCL-YI-YT/YSCEN41.m@ 1655

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

initial load of FOIAVistA 6/30/08 version

File size: 2.4 KB
Line 
1YSCEN41 ;ALB/ASF-TEST LOOKUP CONT ;4/3/90 10:31 ;
2 ;;5.01;MENTAL HEALTH;**37**;Dec 30, 1994
3EN ;
4 W !?5 I '$D(^YTD(601.2,YSDFN,1,"B")) W " NO PSYCHOLOGICAL TESTS OR INTERVIEWS HAVE BEEN COMPLETED",! Q
5TLST ;
6 D TESTS,N,REC2 K YSDOT,F1,F2,F5,I,J,K,M,N,YSNT,YSTLST,YSTY,X,Y Q
7N ;
8 S A="" F S A=$O(YSTLST(A)) Q:A'?3ANP.E W:$X+7>IOM ! W $J(A,5)," ",YSTLST(A)
9 K YSTLST W ! Q
10YSDOT ;
11 W $$FMTE^XLFDT(YSDOT,"5ZD")," "
12 Q
13DTS ;
14 S YSDOT=0
15DT0 ;
16 S YSDOT=$O(^MR(YSDFN,M,"B",YSDOT)) I YSDOT D YSDOT G DT0
17 Q
18TESTS ;
19 K YSTLST S ZZ=0 F S ZZ=$O(^YTD(601.2,YSDFN,1,ZZ)) Q:'ZZ S J=0 F S J=$O(^YTD(601.2,YSDFN,1,ZZ,1,J)) Q:'J I $D(^(J,1)) S A=$P($G(^YTT(601,ZZ,0)),U) S:A]"" YSTLST(A)=$$FMTE^XLFDT(J,"5ZD")
20 Q
21 ;
22REC ;
23 S X="T-45" D ^%DT S YSRD=Y F YSTY="YT","YI" D TESTS
24 W !?9,"RECENT TESTS: " S (F2,F1)=0
25 S F5="" F S F5=$O(YSTLST(F5)) Q:F5'?3ANP.E S F1=0 D REC1
26 W:'F2 " NONE " D REC2 Q
27REC1 ;
28 F K=1:1 S X=$P(YSTLST(F5)," ",K) Q:X="" D ^%DT IF YSRD<Y W:'F1 F5 S F1=1,F2=1 W " ",X," " W:$X>69 !?11
29 Q
30REC2 ;
31 I $D(^PTX(YSDFN,"HX"))>1 W "LAST Hx " S YSDOT=$O(^PTX(YSDFN,"HX",0)) I YSDOT S YSDOT=9999999-YSDOT D YSDOT
32 I $D(^MR(YSDFN,"PE","B"))>1 W "PHYSICAL " S M="PE" D DTS
33 I $D(^PTX(YSDFN,"PN"))>1 W "LAST P. NOTE " I $D(^("PN",0))#2 S YSDOT=$O(^PTX(YSDFN,"PN",0)) I YSDOT S YSDOT=9999999-YSDOT D YSDOT
34 Q
35INS ;
36 W @IOF,! F ZZ=0:1 S X=$T(Z+ZZ) Q:X="" W !,$P(X,";;",2)
37 G CH^YSCEN4
38Z ;; INPATIENT TEST LOOK UP OPTIONS
39 ;;
40 ;; This option searches all patients on a ward by team.
41 ;;If ALL TESTS are selected all administrations are displayed.
42 ;;If RECENT TESTS are selected only administrations within the past 45 days
43 ;; are displayed.
44 ;;
45 ;;If either CUSTOM or STANDARD batteries are selected, the names and a running
46 ;;count of these patients are displayed. Test NAMES are printed
47 ;;out (whether there was an actual test administration or not). An XXXXXXXX
48 ;;indicates no completion was found. You may enter as many
49 ;;tests or interviews as you like. Enter test one at a time without
50 ;;punctuation.
51 ;;
52 ;;Administration dates are also displayed. If only the last date is selected
53 ;;(optional) the last administration date is displayed along with a letter.
54 ;;This letter denotes the number of times a particular test was completed
55 ;;by the patient. An 'a' indicates only one test completion was found
56 ;;while an 'e' indicates 5 test completions.
57 ;;If all dates are selected the date of each administration will be shown.
58 ;;
Note: See TracBrowser for help on using the repository browser.