GMTSPXSK ; SLC/SBW,KER - PCE Skin Test comp ; 05/04/2009
;;2.7;Health Summary;**8,10,28,56,89**;Oct 20, 1995;Build 61
;
; External References
; DBIA 1240 SKIN^PXRHS04
; DBIA 10011 ^DIWP
;
SKIN ; Main Entry Point
K ^TMP("PXS",$J) D SKIN^PXRHS04(DFN) Q:'$D(^TMP("PXS",$J))
D CKP^GMTSUP Q:$D(GMTSQIT) D HDR
N GMSK,GMDT,GMIFN,GMW,GMSITE,GMSKIN,GMN0,GMN1,GMRDG,X,GMTSDAT,GMRES
N COMMENT,GMICL,GMRDT,GMTSLN,GMTAB S GMSK=""
F S GMSK=$O(^TMP("PXS",$J,GMSK)) Q:GMSK="" D Q:$D(GMTSQIT)
. S (GMDT,GMW)=0
. F S GMDT=$O(^TMP("PXS",$J,GMSK,GMDT)) Q:GMDT'>0 D Q:$D(GMTSQIT)
. . S GMIFN=0
. . F S GMIFN=$O(^TMP("PXS",$J,GMSK,GMDT,GMIFN)) Q:GMIFN'>0 D SKINDSP Q:$D(GMTSQIT)
K ^TMP("PXS",$J)
Q
HDR ; Display Header
W ?36," - Date - ",!
W "Skin Test",?12,"Reading",?21,"Results",?33,"Admin.",?45,"Reading",?57,"Facility",!!
Q
SKINDSP ; Display Skin Test Data
S GMN0=$G(^TMP("PXS",$J,GMSK,GMDT,GMIFN,0)) Q:GMN0']""
S GMN1=$G(^TMP("PXS",$J,GMSK,GMDT,GMIFN,1))
S GMSITE=$S($P(GMN1,U,3)]"":$P(GMN1,U,3),$P(GMN1,U,4)]"":$P(GMN1,U,4),1:"No Site")
;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")
S X=$P(GMN0,U,2) D REGDT4^GMTSU S GMTSDAT=X
S GMSKIN=$P(GMN0,U),GMRDG=$P(GMN0,U,5)
S X=$P(GMN0,U,6) D REGDT4^GMTSU S GMRDT=X
I GMRDG]"" S GMRDG=$J(GMRDG,2)_" mm"
S GMRES=$P(GMN0,U,4)
I GMRDG']"",GMRES']"" S GMRES="UNREPORTED"
;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),!
D CKP^GMTSUP Q:$D(GMTSQIT) D:GMTSNPG HDR
W:GMW'>0!GMTSNPG GMSKIN
W ?12,GMRDG,?21,GMRES,?33,GMTSDAT,?45,GMRDT,?57,$S($L(GMSITE)>16:$E(GMSITE,1,16)_"*",1:GMSITE),!
S COMMENT=$P($G(^TMP("PXS",$J,GMSK,GMDT,GMIFN,"COM")),U)
I COMMENT]"" S GMICL=5,GMTAB=2 D FORMAT I $D(^UTILITY($J,"W")) D
. F GMTSLN=1:1:^UTILITY($J,"W",DIWL) D LINE Q:$D(GMTSQIT)
S GMW=1
Q
FORMAT ; Format Line
N DIWR,DIWF,X S DIWL=3,DIWR=80-(GMICL+GMTAB) K ^UTILITY($J,"W")
S X="Comments: "_COMMENT D ^DIWP
Q
LINE ; Write Line
D CKP^GMTSUP Q:$D(GMTSQIT) W ?5,^UTILITY($J,"W",DIWL,GMTSLN,0),!
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HGMTSPXSK 2176 printed Dec 13, 2024@01:59:52 Page 2
GMTSPXSK ; SLC/SBW,KER - PCE Skin Test comp ; 05/04/2009
+1 ;;2.7;Health Summary;**8,10,28,56,89**;Oct 20, 1995;Build 61
+2 ;
+3 ; External References
+4 ; DBIA 1240 SKIN^PXRHS04
+5 ; DBIA 10011 ^DIWP
+6 ;
SKIN ; Main Entry Point
+1 KILL ^TMP("PXS",$JOB)
DO SKIN^PXRHS04(DFN)
if '$DATA(^TMP("PXS",$JOB))
QUIT
+2 DO CKP^GMTSUP
if $DATA(GMTSQIT)
QUIT
DO HDR
+3 NEW GMSK,GMDT,GMIFN,GMW,GMSITE,GMSKIN,GMN0,GMN1,GMRDG,X,GMTSDAT,GMRES
+4 NEW COMMENT,GMICL,GMRDT,GMTSLN,GMTAB
SET GMSK=""
+5 FOR
SET GMSK=$ORDER(^TMP("PXS",$JOB,GMSK))
if GMSK=""
QUIT
Begin DoDot:1
+6 SET (GMDT,GMW)=0
+7 FOR
SET GMDT=$ORDER(^TMP("PXS",$JOB,GMSK,GMDT))
if GMDT'>0
QUIT
Begin DoDot:2
+8 SET GMIFN=0
+9 FOR
SET GMIFN=$ORDER(^TMP("PXS",$JOB,GMSK,GMDT,GMIFN))
if GMIFN'>0
QUIT
DO SKINDSP
if $DATA(GMTSQIT)
QUIT
End DoDot:2
if $DATA(GMTSQIT)
QUIT
End DoDot:1
if $DATA(GMTSQIT)
QUIT
+10 KILL ^TMP("PXS",$JOB)
+11 QUIT
HDR ; Display Header
+1 WRITE ?36," - Date - ",!
+2 WRITE "Skin Test",?12,"Reading",?21,"Results",?33,"Admin.",?45,"Reading",?57,"Facility",!!
+3 QUIT
SKINDSP ; Display Skin Test Data
+1 SET GMN0=$GET(^TMP("PXS",$JOB,GMSK,GMDT,GMIFN,0))
if GMN0']""
QUIT
+2 SET GMN1=$GET(^TMP("PXS",$JOB,GMSK,GMDT,GMIFN,1))
+3 SET GMSITE=$SELECT($PIECE(GMN1,U,3)]"":$PIECE(GMN1,U,3),$PIECE(GMN1,U,4)]"":$PIECE(GMN1,U,4),1:"No Site")
+4 ;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")
+5 SET X=$PIECE(GMN0,U,2)
DO REGDT4^GMTSU
SET GMTSDAT=X
+6 SET GMSKIN=$PIECE(GMN0,U)
SET GMRDG=$PIECE(GMN0,U,5)
+7 SET X=$PIECE(GMN0,U,6)
DO REGDT4^GMTSU
SET GMRDT=X
+8 IF GMRDG]""
SET GMRDG=$JUSTIFY(GMRDG,2)_" mm"
+9 SET GMRES=$PIECE(GMN0,U,4)
+10 IF GMRDG']""
IF GMRES']""
SET GMRES="UNREPORTED"
+11 ;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),!
+12 DO CKP^GMTSUP
if $DATA(GMTSQIT)
QUIT
if GMTSNPG
DO HDR
+13 if GMW'>0!GMTSNPG
WRITE GMSKIN
+14 WRITE ?12,GMRDG,?21,GMRES,?33,GMTSDAT,?45,GMRDT,?57,$SELECT($LENGTH(GMSITE)>16:$EXTRACT(GMSITE,1,16)_"*",1:GMSITE),!
+15 SET COMMENT=$PIECE($GET(^TMP("PXS",$JOB,GMSK,GMDT,GMIFN,"COM")),U)
+16 IF COMMENT]""
SET GMICL=5
SET GMTAB=2
DO FORMAT
IF $DATA(^UTILITY($JOB,"W"))
Begin DoDot:1
+17 FOR GMTSLN=1:1:^UTILITY($JOB,"W",DIWL)
DO LINE
if $DATA(GMTSQIT)
QUIT
End DoDot:1
+18 SET GMW=1
+19 QUIT
FORMAT ; Format Line
+1 NEW DIWR,DIWF,X
SET DIWL=3
SET DIWR=80-(GMICL+GMTAB)
KILL ^UTILITY($JOB,"W")
+2 SET X="Comments: "_COMMENT
DO ^DIWP
+3 QUIT
LINE ; Write Line
+1 DO CKP^GMTSUP
if $DATA(GMTSQIT)
QUIT
WRITE ?5,^UTILITY($JOB,"W",DIWL,GMTSLN,0),!
+2 QUIT