source: WorldVistAEHR/trunk/r/HEALTH_SUMMARY-GMTS/GMTSPXSK.m@ 1286

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

initial load of WorldVistAEHR

File size: 1.8 KB
Line 
1GMTSPXSK ; SLC/SBW,KER - PCE Skin Test comp ; 08/27/2002
2 ;;2.7;Health Summary;**8,10,28,56**;Oct 20, 1995
3 ;
4 ; External References
5 ; DBIA 1240 SKIN^PXRHS04
6 ; DBIA 10011 ^DIWP
7 ;
8SKIN ; Main Entry Point
9 K ^TMP("PXS",$J) D SKIN^PXRHS04(DFN) Q:'$D(^TMP("PXS",$J))
10 D CKP^GMTSUP Q:$D(GMTSQIT) D HDR
11 N GMSK,GMDT,GMIFN,GMW,GMSITE,GMSKIN,GMN0,GMN1,GMRDG,X,GMTSDAT,GMRES
12 N COMMENT,GMICL,GMRDT,GMTSLN,GMTAB S GMSK=""
13 F S GMSK=$O(^TMP("PXS",$J,GMSK)) Q:GMSK="" D Q:$D(GMTSQIT)
14 . S (GMDT,GMW)=0
15 . F S GMDT=$O(^TMP("PXS",$J,GMSK,GMDT)) Q:GMDT'>0 D Q:$D(GMTSQIT)
16 . . S GMIFN=0
17 . . F S GMIFN=$O(^TMP("PXS",$J,GMSK,GMDT,GMIFN)) Q:GMIFN'>0 D SKINDSP Q:$D(GMTSQIT)
18 K ^TMP("PXS",$J)
19 Q
20HDR ; Display Header
21 W ?38," - Date - ",!
22 W "Skin Test",?15,"Reading",?24,"Results",?37,"Admin.",?45,"Reading",?60,"Facility",!!
23 Q
24SKINDSP ; Display Skin Test Data
25 S GMN0=$G(^TMP("PXS",$J,GMSK,GMDT,GMIFN,0)) Q:GMN0']""
26 S GMN1=$G(^TMP("PXS",$J,GMSK,GMDT,GMIFN,1))
27 S GMSITE=$S($P(GMN1,U,3)]"":$E($P(GMN1,U,3),1,10),$P(GMN1,U,4)]"":$E($P(GMN1,U,4),1,10),1:"No Site")
28 S X=$P(GMN0,U,2) D REGDT4^GMTSU S GMTSDAT=X
29 S GMSKIN=$P(GMN0,U),GMRDG=$P(GMN0,U,5)
30 S X=$P(GMN0,U,6) D REGDT4^GMTSU S GMRDT=X
31 I GMRDG]"" S GMRDG=$J(GMRDG,2)_" mm"
32 S GMRES=$P(GMN0,U,4)
33 I GMRDG']"",GMRES']"" S GMRES="UNREPORTED"
34 D CKP^GMTSUP Q:$D(GMTSQIT) D:GMTSNPG HDR W:GMW'>0!GMTSNPG GMSKIN W ?15,GMRDG,?24,GMRES,?35,GMTSDAT,?47,GMRDT,?62,$E(GMSITE,1,17),!
35 S COMMENT=$P($G(^TMP("PXS",$J,GMSK,GMDT,GMIFN,"COM")),U)
36 I COMMENT]"" S GMICL=15,GMTAB=2 D FORMAT I $D(^UTILITY($J,"W")) D
37 . F GMTSLN=1:1:^UTILITY($J,"W",DIWL) D LINE Q:$D(GMTSQIT)
38 S GMW=1
39 Q
40FORMAT ; Format Line
41 N DIWR,DIWF,X S DIWL=3,DIWR=80-(GMICL+GMTAB) K ^UTILITY($J,"W")
42 S X=COMMENT D ^DIWP
43 Q
44LINE ; Write Line
45 D CKP^GMTSUP Q:$D(GMTSQIT) W ?15,^UTILITY($J,"W",DIWL,GMTSLN,0),!
46 Q
Note: See TracBrowser for help on using the repository browser.