source: FOIAVistA/trunk/r/MENTAL_HEALTH-YS-RUCL-YI-YT/YSD40061.m@ 1446

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

initial load of FOIAVistA 6/30/08 version

File size: 1.9 KB
Line 
1YSD40061 ;DALISC/LJA - Restore Diagnostic Results ; [ 06/20/94 3:45 PM ]
2 ;;5.01;MENTAL HEALTH;;Dec 30, 1994
3 ;;
4 ;
5DR ;
6 ; YSD40,YSD4CIEN -- req
7 ;
8 ; Set needed variables for xrefs...
9 S YSD4REF=$P(YSD40,U) ; B xref
10 ;
11 ; Get DR data and set variables
12 S YSD4DR0=$G(^YSD(627.8,+YSD4REF,0))
13 QUIT:YSD4DR0']"" ;->
14 S YSD4DT=$P(YSD4DR0,U,3),YSD4IDT=9999999-YSD4DT
15 S YSD4DFN=+$P(YSD4DR0,U,2)
16 ;
17 ; Quit if not converted...
18 QUIT:$P(YSD40,U,2)'="C" ;->
19 ;
20 ; Plus for Diag Result's IEN...
21 S YSD4IEN=+YSD40
22 QUIT:YSD4IEN'>0 ;->
23 ;
24 ; Set present value of DX in Diag Result's 1 node...
25 S YSD4NDX=$P($G(^YSD(627.8,+YSD4IEN,1)),U)
26 ;
27 ; Get 1 node...
28 S YSD41=$G(^YSD(627.99,+YSD4CIEN,1))
29 QUIT:YSD41'["DIC(627.5," ;->
30 S YSD4ODX=$P(YSD41,U) ;Original DX
31 ;
32 ; OK. Reset DR data...
33 S $P(^YSD(627.8,+YSD4IEN,1),U)=YSD4ODX
34 ;
35 ; Update xrefs...
36 I YSD4DFN>0,YSD4DT?7N.E,YSD4NDX["YSD(627.7,",YSD4ODX["DIC(627.5,",YSD4NDX["YSD(627.7," D
37 . K ^YSD(627.8,"AE","D",+YSD4DFN,YSD4DT,YSD4NDX,+YSD4IEN)
38 . S ^YSD(627.8,"AE","D",+YSD4DFN,YSD4DT,YSD4ODX,+YSD4IEN)=""
39 . K ^YSD(627.8,"AG","D",+YSD4DFN,YSD4NDX,+YSD4IEN)
40 . S ^YSD(627.8,"AG","D",+YSD4DFN,YSD4ODX,+YSD4IEN)=""
41 I YSD4DFN>0,YSD4IDT?7N.E,YSD4ODX["DIC(627.5,",YSD4NDX["YSD(627.7," D
42 . K ^YSD(627.8,"AF",+YSD4DFN,YSD4IDT,YSD4NDX,+YSD4IEN)
43 . S ^YSD(627.8,"AF",+YSD4DFN,YSD4IDT,YSD4ODX,+YSD4IEN)=""
44 ;
45 ; Delete conversion entry...
46 K ^YSD(627.99,+YSD4CIEN),^YSD(627.99,"B",YSD4REF,+YSD4CIEN)
47 S X=$P(^YSD(627.99,0),U,4)-1,X=$S(X>0:X,1:0),$P(^YSD(627.99,0),U,4)=X
48 ;
49 ; Up counter and dot
50 S ^TMP($J,"DR")=$G(^TMP($J,"DR"))+1
51 S YSD4CT=YSD4CT+1 W:'(YSD4CT#100) "."
52 ;
53 ; If any entries are restored, kill "DR" nodes...
54 K ^YSD(627.99,"AS","DR CONVERSION COMPLETED")
55 K ^YSD(627.99,"AS","DR CONVERSION STARTED")
56 K ^YSD(627.99,"AS","DR LAST STARTED")
57 K ^YSD(627.99,"AS","DR NUMBER CONVERTED")
58 QUIT
59 ;
60EOR ;YSD40061 - Restore Diagnostic Results ; 4/8/94 13:20
Note: See TracBrowser for help on using the repository browser.