source: FOIAVistA/trunk/r/PROBLEM_LIST-GMPL/GMPLUTL3.m@ 812

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

initial load of FOIAVistA 6/30/08 version

File size: 1.9 KB
Line 
1GMPLUTL3 ; SLC/JST/JVS -- PL Utilities (CIRN) ; 04/15/2002
2 ;;2.0;Problem List;**14,15,19,25,26**;Aug 25, 1994
3 ;
4 ; External References
5 ; None
6 ;
7 ; This routine is primarily called by CIRN for use
8 ; in HL7 (RGHOPL), and Historical Load (RGHOPLB),
9 ; record creation.
10 ;
11 ; NOTE: This routine DOES NOT NEW the variables
12 ; that are set below.
13 ;
14CALL0(GMPLZ) ; Call 0 - Get Node 0
15 N GMPLCOND I $P($G(^AUPNPROB(GMPLZ,1)),"^",2)="H" S GMPLCOND="H" D CLEAR Q
16 I '$D(^AUPNPROB(GMPLZ,0)) D CLEAR Q
17 D NODE0
18 Q
19 ;
20CALL1(GMPLZ) ; Call 1 - Get Node 1
21 N GMPLCOND I $P($G(^AUPNPROB(GMPLZ,1)),"^",2)="H" S GMPLCOND="H" D CLEAR Q
22 I '$D(^AUPNPROB(GMPLZ,0)) D CLEAR Q
23 D NODE1
24 Q
25 ;
26CALL2(GMPLZ) ; Call 2 - Get both Node 0 and Node 1
27 I $P($G(^AUPNPROB(GMPLZ,1)),"^",2)="H" S GMPLCOND="H" D CLEAR Q
28 I '$D(^AUPNPROB(GMPLZ,0)) D CLEAR Q
29 D NODE0,NODE1
30 Q
31 ;
32NODE0 ; Set Node 0 data variables
33 N GMPLZ0
34 S GMPLZ0=$G(^AUPNPROB(GMPLZ,0))
35 ; Diagnosis
36 S GMPLICD=$P(GMPLZ0,U)
37 ; Patient Name
38 S GMPLPNAM=$P(GMPLZ0,U,2)
39 ; Date Last Modifed
40 S GMPLDLM=$P(GMPLZ0,U,3)
41 ; Provider Narrative
42 S GMPLTXT=$P(GMPLZ0,U,5)
43 ; Status
44 S GMPLSTAT=$P(GMPLZ0,U,12)
45 ; Date of Onset
46 S GMPLODAT=$P(GMPLZ0,U,13)
47 ; Date Entered
48 S:'GMPLODAT GMPLODAT=$P(GMPLZ0,U,8)
49 Q
50 ;
51NODE1 ; Set Node 1 data variables
52 N GMPLZ1
53 S GMPLZ1=$G(^AUPNPROB(GMPLZ,1))
54 ; Problem
55 S GMPLLEX=$P(GMPLZ1,U)
56 ; Condition
57 S GMPLCOND=$P(GMPLZ1,U,2)
58 ; Recording Provider
59 S GMPLPRV=$P(GMPLZ1,U,4)
60 ; Responsible Provider
61 S:'GMPLPRV GMPLPRV=$P(GMPLZ1,U,5)
62 ; Date Resolved
63 S GMPLXDAT=$P(GMPLZ1,U,7)
64 ; Priority
65 S GMPLPRIO=$P(GMPLZ1,U,14)
66 Q
67 ;
68CLEAR ; Set Variables Equal to Null
69 S (GMPLZ0,GMPLICD,GMPLPNAM,GMPLDLM,GMPLTXT,GMPLSTAT,GMPLODAT)=""
70 S (GMPLZ1,GMPLLEX,GMPLPRV,GMPLXDAT,GMPLPRIO,GMPLCOND)=""
71 Q
72MOD(DFN) ; Return the Date the Patients Problem List was Last Modified
73 Q +$O(^AUPNPROB("MODIFIED",DFN,0))
Note: See TracBrowser for help on using the repository browser.