source: FOIAVistA/trunk/r/MENTAL_HEALTH-YS-RUCL-YI-YT/YSDX0002.m@ 1274

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

initial load of FOIAVistA 6/30/08 version

File size: 2.0 KB
Line 
1YSDX0002 ;DALISC/LJA - Diagnosis Miscellaneous Code ;12/17/93 11:03
2 ;;5.01;MENTAL HEALTH;;Dec 30, 1994
3 ; Various non-YSDX*-namespaced routines contained code directly
4 ; accessing ^MR or ^YSD(627.8 DSM data. As much as possible,
5 ; direct access of DSM data should be done in YSDX*-namespaced
6 ; routine. So, in these instances, code was lifted from
7 ; the non-YSDX* routine locations, moved here, and called from their
8 ; original locations...
9 ;
10 QUIT ;->
11 ;
12DIAGQ2 ; Created 11/18/93 to hold code originally stored in DIAGQ2^YSCEN3
13 ;D RECORD^YSDX0001("DIAGQ2^YSDX0002") ;Used for testing. Inactivated in YSDX0001...
14 W:'$D(^YSD(627.8,"AC",+YSDFN)) !,?7,"No diagnosis on file..."
15 W ! K YSCENN
16 QUIT
17 ;-------------------------------------------------------------------
18PDX ; Created 11/18/93 to hold code originally stored in PDX^YSCEN6
19 ; Called from routines YSCEN23, YSCEN32, YSCEN35
20 ;D RECORD^YSDX0001("PDX^YSDX0002") ;Used for testing. Inactivated in YSDX0001...
21 K YSPDX S YSPDX=0
22 QUIT:'$D(^YSD(627.8,"AD",YSDFN)) ;->
23 S (V,V1)=0
24 ;
25 ; V=Inverse date
26 S V=+$O(^YSD(627.8,"AD",YSDFN,V))
27 ;
28 ; V1,YSPDX=IEN
29 S (YSPDX,V1)=+$O(^YSD(627.8,"AD",YSDFN,V,V1))
30 ;
31 ; V2=Diagnosis variable pointer... #;YSD(627.5 or #;ICD9(
32 S V2=$P(^YSD(627.8,+V1,1),U)
33 ;
34 ; YSPDX(2)=Date/time Diagnosis
35 S YSPDX(2)=$P(^YSD(627.8,+V1,0),U,3)
36 ;
37 ; V3=Global Ref V4=IEN V5=Valid Global ref
38 S V3=$P(V2,";",2),V4=$P(V2,";"),V5="^"_V3_V4_","_0_")"
39 ;
40 ; V50=Valid (V5) global reference's 0 node
41 S V50=@V5 ;0 node of pointed to file... DSM or ICD9
42 ;
43 ; If reference to ^ICD9( ... ICD DIAGNOSIS
44 I V3["ICD" D
45 . S YSPDX(1)=$P(V50,U,3) ; Diagnosis (free text)
46 . S YSPDX(3)=$P(V50,U) ; Code#
47 . S YSPDX(4)="ICD"
48 ;
49 ; If reference to ^YSD(627.7 ... DSM
50 I V3["YSD" D
51 . S YSPDX(1)=$P(V50,U,15) ; Short title
52 . S YSPDX(3)=$P(V50,U) ; Code#
53 . S YSPDX(4)="DSM"
54 ;
55 K V1,V2,V3,V4,V5,V50
56 QUIT
57 ;
58EOR ;YSDX0002 - Diagnosis Miscellaneous Code ;11/17/93 14:01
Note: See TracBrowser for help on using the repository browser.