source: WorldVistAEHR/trunk/r/PROBLEM_LIST-GMPL/GMPLHSPL.m@ 1361

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

initial load of WorldVistAEHR

File size: 1.5 KB
Line 
1GMPLHSPL ; SLC/MKB -- Problem List HS Component Driver (for export) ;11/23/93 10:36
2 ;;2.0;Problem List;;Aug 25, 1994
3GMTSPLST ; SLC/DJP -- Problem List HS Component Driver ;5/27/93 15:35
4 ;;2.5;Health Summary;;
5ACTIVE ;
6 S STATUS="A" D MAIN,KILL Q
7INACT S STATUS="I" D MAIN,KILL Q
8ALL S STATUS="ALL" D MAIN,KILL Q
9MAIN ;Driver
10 D CKP^GMTSUP Q:$D(GMTSQIT) I 'GMTSNPG D BREAK^GMTSUP
11 D ^GMPLHS
12 I '$D(^TMP("GMPLHS",$J)) D NOPROBS Q
13 W ! D SUBHDR
14 D CKP^GMTSUP Q:$D(GMTSQIT) W !
15 D WRT
16 Q
17 ;
18KILL D KILL^GMPLHS
19 Q
20 ;
21NOPROBS ;Indicates problems not on file for patient
22 D CKP^GMTSUP Q:$D(GMTSQIT) W "No data available.",!
23 Q
24SUBHDR ; Subheader for Problem List Component
25 N NUM S NUM=GMPCOUNT S:GMPTOTAL>GMPCOUNT NUM=NUM_" of "_GMPTOTAL
26 S NUM=NUM_$S(STATUS="A":" Active",STATUS="I":" Inactive",1:"")_" Problems"
27 D CKP^GMTSUP Q:$D(GMTSQIT) ;I 'GMTSNPG D BREAK^GMTSUP
28 W ?56,NUM,!
29 D CKP^GMTSUP Q:$D(GMTSQIT) ;I 'GMTSNPG D BREAK^GMTSUP
30 W ?6,"PROBLEM",?46,"LAST MOD",?56,"SERVICE/PROVIDER",!
31 Q
32 ;
33WRT ; Writes Problem List Component
34 S GMPI=0 F GMPI=0:0 S GMPI=$O(^TMP("GMPLHS",$J,STATUS,GMPI)) Q:GMPI'>0 D LINE
35 Q
36 ;
37LINE ;Prints individual line
38 D CKP^GMTSUP Q:$D(GMTSQIT) ;I 'GMTSNPG D BREAK^GMTSUP
39 N PROBLEM,TEXT,I,PROB,MAX
40 S PROBLEM=$G(^TMP("GMPLHS",$J,STATUS,GMPI,0))
41 S PROB=$P(PROBLEM,U,2),MAX=38 D WRAP^GMPLX(PROB,MAX,.TEXT)
42 I STATUS="ALL" W ?3,$P(PROBLEM,"^",1)
43 W ?6,TEXT(1),?46,$P(PROBLEM,"^",3),?56,$P(PROBLEM,"^",4),!
44 I TEXT>1 F I=2:1:TEXT W ?8,TEXT(I),!
45 Q
Note: See TracBrowser for help on using the repository browser.