source: FOIAVistA/trunk/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DGRPU1.m@ 1607

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

initial load of FOIAVistA 6/30/08 version

File size: 2.2 KB
Line 
1DGRPU1 ;ALB/REW CUSTOM LOAD/EDIT SCREEN UTILITIES ;9-FEB-92
2 ;;5.3;Registration;**139,169,415,527,508**;Aug 13, 1993
3 ;
4QUES(DFN,DGQCODE) ; EDIT SPECIFIC PORTIONS OF REGISTRATION DATA
5 ;
6 ; INPUT:
7 ; DFN
8 ; DGQCODE = Code for question(s) to be asked
9 ; OUTPUT:
10 ; DGERR = ERROR VARIABLE
11 ; DGCHANGE= 1 IF DATA MODIFIED 0 O/W
12 ; USED:
13 ; DGPTND = Prior value(s) of Patient File node(s) [array]
14 ; DGQNODES= Node(s) used above
15 ; DGNODE = Single node
16 ; DGDR = edit=screen*10+item #
17 ; DGRPS = Screen #
18 ; DGCODE = CODE used by ^DGRPE
19 ; DGQ = String of ^DGCODE^DGCODE etc.
20 ; DGPC = Piece Number
21 ; DGX = Line Tag offset
22 ;
23 N D,D0,DI,DIC,DGCODE,DGDR,DGNODE,DGQNODES,DGPC,DGPTND,DGRPS,DGQ,DGX
24 N DQ,N,X,Y,%Y,DGPTNDM
25 S (DGERR,DGRPS,DGCHANGE)=0
26 I '($G(DFN)&$D(DGQCODE)) G QTE
27 F DGX=1:1 S DGQ=$T(QDES+DGX) Q:DGQ[(U_DGQCODE_U)!(DGQ']"")
28 F DGPC=2:1 S DGCODE=$P(DGQ,U,DGPC) Q:(DGCODE']"")!(DGCODE=DGQCODE)
29 G:DGCODE']"" QTE
30 S DGDR=$P($T(QNUM+DGX),U,DGPC)
31 S DGRPS=DGDR\100
32 S DGQNODES=$P($T(QNODE+DGX),U,DGPC)
33 F N=1:1 S DGNODE=$P(DGQNODES,"~",N) Q:DGNODE']"" S DGPTND(DGNODE)=$G(^DPT(DFN,DGNODE))
34 S DGQNODES=$P($T(MNODE+DGX),U,DGPC)
35 F N=1:1 S DGNODE=$P(DGQNODES,"~",N) Q:DGNODE']"" M DGPTNDM(DGNODE)=^DPT(DFN,DGNODE) S DGPTNDM(DGNODE)=""
36 D ^DGRPE
37 F DGNODE=0:0 S DGNODE=$O(DGPTND(DGNODE)) Q:DGNODE']"" S:$G(^DPT(DFN,DGNODE))'=(DGPTND(DGNODE)) DGCHANGE=1
38 S DGNODE="" F S DGNODE=$O(DGPTNDM(DGNODE)) Q:DGNODE']"" D Q:DGCHANGE
39 .S X=0 F S X=$O(DGPTNDM(DGNODE,X)) Q:'X D Q:DGCHANGE
40 ..S Y="" F S Y=$O(DGPTNDM(DGNODE,X,Y)) Q:Y']"" D Q:DGCHANGE
41 ...I $G(^DPT(DFN,DGNODE,X,Y))'=DGPTNDM(DGNODE,X,Y) S DGCHANGE=1
42 .Q:DGCHANGE
43 .S X=0 F S X=$O(^DPT(DGNODE,X)) Q:'X D Q:DGCHANGE
44 ..S Y="" F S Y=$O(^DPT(DGNODE,X,Y)) Q:Y']"" D Q:DGCHANGE
45 ...I $G(^DPT(DFN,DGNODE,X,Y))'=DGPTNDM(DGNODE,X,Y) S DGCHANGE=1
46QTE I 'DGRPS S DGERR=1
47QTQ Q
48QDES ;MNEMONIC - DGQCODE should match with one of these
49 ;;^ADD1^ADD2^ADD^ADD3^ADD4^
50QNUM ;REFERENCE NUMBERS USED TO SET DGDR FOR USE BY ^DGRPE
51 ;;^104^105^109,105^109,105,111^111^
52 ;;
53QNODE ;;NODES OF THE PATIENT FILE
54 ;;^.11~.13^.121^.11~.121~.13^.11~.121~.13~.141^.141^
55 ;;
56MNODE ;;MULTIPLES OF THE PATIENT FILE
57 ;;^^^.02~.06^.02~.06~.14^.14^
Note: See TracBrowser for help on using the repository browser.