source: WorldVistAEHR/trunk/r/PCE_PATIENT_CARE_ENCOUNTER-AUTN-EFDP-PX-VSIT--PXRM/PXAIPL.m@ 1000

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

initial load of WorldVistAEHR

File size: 1.8 KB
Line 
1PXAIPL ;ISL/JVS - PROBLEM LIST ;2/4/05 5:15pm
2 ;;1.0;PCE PATIENT CARE ENCOUNTER;**69,124**;Aug 12, 1996
3 ;
4 ;
5 Q
6PL ;--ENTRY POINT TO EDIT PROBLEMS
7 ;
8 ;
9 Q:'$L($T(^GMPLUTL))
10 ;
11 N PXARRAY,RESULT
12DECIDE ;--DECIDE IF A PROBLEM
13 I $G(PXAA("PL ADD"))=1 G SET
14 I $G(PXAA("PL IEN"))>0 G SET
15 I $G(PXAA("PL ACTIVE"))]"" G SET
16 I $G(PXAA("PL ONSET DATE"))>0 G SET
17 I $G(PXAA("PL RESOLVED DATE"))>0 G SET
18 ;PX*1.0*124
19 ;I $G(PXAA("PL SC"))]"" G SET
20 ;I $G(PXAA("PL AO"))]"" G SET
21 ;I $G(PXAA("PL IR"))]"" G SET
22 ;I $G(PXAA("PL EC"))]"" G SET
23 ;I $G(PXAA("PL MST"))]"" G SET
24 ;I $G(PXAA("PL HNC"))]"" G SET
25 ;I $G(PXAA("PL CV"))]"" G SET
26 Q
27 ;
28 ;
29SET ;--REQUIRED
30 S PXARRAY("PATIENT")=$G(PATIENT)
31 S PXARRAY("NARRATIVE")=$G(PXAA("NARRATIVE"))
32 S PXARRAY("PROVIDER")=$G(PXAA("ENC PROVIDER"))
33 ;--OPTIONAL
34 S PXARRAY("DIAGNOSIS")=$G(PXAA("DIAGNOSIS"))
35 S PXARRAY("LEXICON")=$G(PXAA("LEXICON TERM"))
36 S PXARRAY("STATUS")=$G(PXAA("PL ACTIVE"))
37 S PXARRAY("ONSET")=$G(PXAA("PL ONSET DATE"))
38 I '$G(PXAA("PL IEN")) S PXARRAY("RECORDED")=$G(PXAA("EVENT D/T"))
39 S PXARRAY("RESOLVED")=$G(PXAA("PL RESOLVED DATE"))
40 S PXARRAY("COMMENT")=$G(PXAA("COMMENT"))
41 I $G(PXARRAY("COMMENT"))="@" S PXARRAY("COMMENT")=""
42 ;--LOCATION
43 S PXARRAY("LOCATION")=$P($G(^AUPNVSIT(PXAVISIT,0)),"^",22)
44 ;--SERVICE CONNECTEDNESS
45 S PXARRAY("SC")=$P(AFTER800,"^",1)
46 S PXARRAY("AO")=$P(AFTER800,"^",2)
47 S PXARRAY("IR")=$P(AFTER800,"^",3)
48 S PXARRAY("EC")=$P(AFTER800,"^",4)
49 S PXARRAY("MST")=$P(AFTER800,"^",5)
50 S PXARRAY("HNC")=$P(AFTER800,"^",6)
51 S PXARRAY("CV")=$P(AFTER800,"^",7)
52 ;---MISC
53 S PXARRAY("PROBLEM")=$G(PXAA("PL IEN"))
54 ;
55 ;
56 ;
57RUN ;
58 D UPDATE^GMPLUTL(.PXARRAY,.RESULT)
59 I RESULT(0)="" S $P(AFTER0,"^",16)=RESULT
60 ;--**SET ERROR INTO DIALOG
61 I RESULT(0)]"" D
62 .S PXAERR("PL1")=$G(RESULT(0))
63 .S PXAERRF=1
64 .S PXADI("DIALOG")=8390001.004
65 Q
Note: See TracBrowser for help on using the repository browser.