[613] | 1 | GMPLHSPL ; SLC/MKB -- Problem List HS Component Driver (for export) ;11/23/93 10:36
|
---|
| 2 | ;;2.0;Problem List;;Aug 25, 1994
|
---|
| 3 | GMTSPLST ; SLC/DJP -- Problem List HS Component Driver ;5/27/93 15:35
|
---|
| 4 | ;;2.5;Health Summary;;
|
---|
| 5 | ACTIVE ;
|
---|
| 6 | S STATUS="A" D MAIN,KILL Q
|
---|
| 7 | INACT S STATUS="I" D MAIN,KILL Q
|
---|
| 8 | ALL S STATUS="ALL" D MAIN,KILL Q
|
---|
| 9 | MAIN ;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 | ;
|
---|
| 18 | KILL D KILL^GMPLHS
|
---|
| 19 | Q
|
---|
| 20 | ;
|
---|
| 21 | NOPROBS ;Indicates problems not on file for patient
|
---|
| 22 | D CKP^GMTSUP Q:$D(GMTSQIT) W "No data available.",!
|
---|
| 23 | Q
|
---|
| 24 | SUBHDR ; 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 | ;
|
---|
| 33 | WRT ; 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 | ;
|
---|
| 37 | LINE ;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
|
---|