GMTSSCD ; HIN/JCC,SLC/SBW,KER - Spinal Cord Dysfunction ; 01/31/2002
;;2.7;Health Summary;**13,28,50**;Oct 20, 1995
;
; External References
; DBIA 1517 EN^SPNHS0
;
MAIN ; Control branching
N GMCB,GMCI,GMCOR,GMD0,GMD1,GMDATA,GMDATE,GMDCS,GMDMS,GMDTS,GMDTY
N GMEP,GMET,GMHI,GMIS,GMON,GMPC,GMRS,GMMSST,GMWRT,X
K ^TMP("SPN",$J)
D EN^SPNHS0(DFN,GMTSBEG,GMTSEND,$G(GMTSNDM))
Q:'$D(^TMP("SPN",$J))
D WRT
K ^TMP("SPN",$J)
Q
WRT ; Print data
S GMDATA=^TMP("SPN",$J,0),GMRS=$P(GMDATA,U,1),GMHI=$P(GMDATA,U,2)
S GMIS=$P(GMDATA,U,3),GMCI=$P(GMDATA,U,4),GMEP=$P(GMDATA,U,5)
S GMPC=$P(GMDATA,U,6),GMCOR=$P(GMDATA,U,7),GMMSST=$P(GMDATA,U,8)
D CKP^GMTSUP Q:$D(GMTSQIT)
W "Registration Status:",?29,GMRS,!
D CKP^GMTSUP Q:$D(GMTSQIT)
W "SCI Level:",?29,GMHI,!
D CKP^GMTSUP Q:$D(GMTSQIT)
W "Primary Care Provider:",?29,GMPC,!
D CKP^GMTSUP Q:$D(GMTSQIT)
W "SCI/SCD Coordinator:",?29,GMCOR,!
D CKP^GMTSUP Q:$D(GMTSQIT)
W "Sensory/Motor Loss:",?29,GMCI,!
D CKP^GMTSUP Q:$D(GMTSQIT)
W "Classification of Paralysis:",?29,GMEP,!
D CKP^GMTSUP Q:$D(GMTSQIT)
W:GMMSST'="" "MS Subtype:",?29,GMMSST,!
S GMD0="",GMWRT=1
F S GMD0=$O(^TMP("SPN",$J,154,GMD0)) Q:GMD0=""!$D(GMTSQIT) D
. S GMDATA=^TMP("SPN",$J,154,GMD0)
. S X=$P(GMDATA,U) D REGDTM4^GMTSU S GMON=X
. S GMET=$P(GMDATA,U,2)
. S GMCB=$P(GMDATA,U,3)
. D:GMWRT HDR1
. D CKP^GMTSUP Q:$D(GMTSQIT) D:GMTSNPG HDR1
. W GMON,?18,GMET,?50,$E(GMCB,1,29),!
. S GMWRT=0
S GMD0=0,GMWRT=1
F S GMD0=$O(^TMP("SPN",$J,154.1,GMD0)) Q:GMD0'>0!$D(GMTSQIT) D
. S GMD1=0
. F S GMD1=$O(^TMP("SPN",$J,154.1,GMD0,GMD1)) Q:GMD1'>0!$D(GMTSQIT) D
. . S GMDATA=^TMP("SPN",$J,154.1,GMD0,GMD1)
. . S X=$P(GMDATA,U) D REGDTM4^GMTSU S GMDATE=X
. . S GMDMS=$P(GMDATA,U,2),GMDCS=$P(GMDATA,U,3),GMDTS=$P(GMDATA,U,4),GMDTY=$P(GMDATA,U,5)
. . D:+GMWRT HDR2
. . D CKP^GMTSUP Q:$D(GMTSQIT) D:GMTSNPG HDR2
. . W GMDATE,?18,GMDMS,?32,GMDCS,?50,GMDTS,?64,$E(GMDTY,1,15),!
. . S GMWRT=0
Q
HDR1 ; 1st header
D CKP^GMTSUP Q:$D(GMTSQIT) W:+GMTSNPG'>0 !
D CKP^GMTSUP Q:$D(GMTSQIT) W "Date of Onset ",?16,"Etiology ",?48,"Onset of SCD Caused by Trauma",!
Q
HDR2 ; 2nd header
D CKP^GMTSUP Q:$D(GMTSQIT) W:+GMTSNPG'>0 !
D CKP^GMTSUP Q:$D(GMTSQIT) W "Date Recorded",?16,"Motor Score",?30,"Cognitive Score",?48,"Total Score",?62,"Record Type",!
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HGMTSSCD 2401 printed Nov 22, 2024@17:10:31 Page 2
GMTSSCD ; HIN/JCC,SLC/SBW,KER - Spinal Cord Dysfunction ; 01/31/2002
+1 ;;2.7;Health Summary;**13,28,50**;Oct 20, 1995
+2 ;
+3 ; External References
+4 ; DBIA 1517 EN^SPNHS0
+5 ;
MAIN ; Control branching
+1 NEW GMCB,GMCI,GMCOR,GMD0,GMD1,GMDATA,GMDATE,GMDCS,GMDMS,GMDTS,GMDTY
+2 NEW GMEP,GMET,GMHI,GMIS,GMON,GMPC,GMRS,GMMSST,GMWRT,X
+3 KILL ^TMP("SPN",$JOB)
+4 DO EN^SPNHS0(DFN,GMTSBEG,GMTSEND,$GET(GMTSNDM))
+5 if '$DATA(^TMP("SPN",$JOB))
QUIT
+6 DO WRT
+7 KILL ^TMP("SPN",$JOB)
+8 QUIT
WRT ; Print data
+1 SET GMDATA=^TMP("SPN",$JOB,0)
SET GMRS=$PIECE(GMDATA,U,1)
SET GMHI=$PIECE(GMDATA,U,2)
+2 SET GMIS=$PIECE(GMDATA,U,3)
SET GMCI=$PIECE(GMDATA,U,4)
SET GMEP=$PIECE(GMDATA,U,5)
+3 SET GMPC=$PIECE(GMDATA,U,6)
SET GMCOR=$PIECE(GMDATA,U,7)
SET GMMSST=$PIECE(GMDATA,U,8)
+4 DO CKP^GMTSUP
if $DATA(GMTSQIT)
QUIT
+5 WRITE "Registration Status:",?29,GMRS,!
+6 DO CKP^GMTSUP
if $DATA(GMTSQIT)
QUIT
+7 WRITE "SCI Level:",?29,GMHI,!
+8 DO CKP^GMTSUP
if $DATA(GMTSQIT)
QUIT
+9 WRITE "Primary Care Provider:",?29,GMPC,!
+10 DO CKP^GMTSUP
if $DATA(GMTSQIT)
QUIT
+11 WRITE "SCI/SCD Coordinator:",?29,GMCOR,!
+12 DO CKP^GMTSUP
if $DATA(GMTSQIT)
QUIT
+13 WRITE "Sensory/Motor Loss:",?29,GMCI,!
+14 DO CKP^GMTSUP
if $DATA(GMTSQIT)
QUIT
+15 WRITE "Classification of Paralysis:",?29,GMEP,!
+16 DO CKP^GMTSUP
if $DATA(GMTSQIT)
QUIT
+17 if GMMSST'=""
WRITE "MS Subtype:",?29,GMMSST,!
+18 SET GMD0=""
SET GMWRT=1
+19 FOR
SET GMD0=$ORDER(^TMP("SPN",$JOB,154,GMD0))
if GMD0=""!$DATA(GMTSQIT)
QUIT
Begin DoDot:1
+20 SET GMDATA=^TMP("SPN",$JOB,154,GMD0)
+21 SET X=$PIECE(GMDATA,U)
DO REGDTM4^GMTSU
SET GMON=X
+22 SET GMET=$PIECE(GMDATA,U,2)
+23 SET GMCB=$PIECE(GMDATA,U,3)
+24 if GMWRT
DO HDR1
+25 DO CKP^GMTSUP
if $DATA(GMTSQIT)
QUIT
if GMTSNPG
DO HDR1
+26 WRITE GMON,?18,GMET,?50,$EXTRACT(GMCB,1,29),!
+27 SET GMWRT=0
End DoDot:1
+28 SET GMD0=0
SET GMWRT=1
+29 FOR
SET GMD0=$ORDER(^TMP("SPN",$JOB,154.1,GMD0))
if GMD0'>0!$DATA(GMTSQIT)
QUIT
Begin DoDot:1
+30 SET GMD1=0
+31 FOR
SET GMD1=$ORDER(^TMP("SPN",$JOB,154.1,GMD0,GMD1))
if GMD1'>0!$DATA(GMTSQIT)
QUIT
Begin DoDot:2
+32 SET GMDATA=^TMP("SPN",$JOB,154.1,GMD0,GMD1)
+33 SET X=$PIECE(GMDATA,U)
DO REGDTM4^GMTSU
SET GMDATE=X
+34 SET GMDMS=$PIECE(GMDATA,U,2)
SET GMDCS=$PIECE(GMDATA,U,3)
SET GMDTS=$PIECE(GMDATA,U,4)
SET GMDTY=$PIECE(GMDATA,U,5)
+35 if +GMWRT
DO HDR2
+36 DO CKP^GMTSUP
if $DATA(GMTSQIT)
QUIT
if GMTSNPG
DO HDR2
+37 WRITE GMDATE,?18,GMDMS,?32,GMDCS,?50,GMDTS,?64,$EXTRACT(GMDTY,1,15),!
+38 SET GMWRT=0
End DoDot:2
End DoDot:1
+39 QUIT
HDR1 ; 1st header
+1 DO CKP^GMTSUP
if $DATA(GMTSQIT)
QUIT
if +GMTSNPG'>0
WRITE !
+2 DO CKP^GMTSUP
if $DATA(GMTSQIT)
QUIT
WRITE "Date of Onset ",?16,"Etiology ",?48,"Onset of SCD Caused by Trauma",!
+3 QUIT
HDR2 ; 2nd header
+1 DO CKP^GMTSUP
if $DATA(GMTSQIT)
QUIT
if +GMTSNPG'>0
WRITE !
+2 DO CKP^GMTSUP
if $DATA(GMTSQIT)
QUIT
WRITE "Date Recorded",?16,"Motor Score",?30,"Cognitive Score",?48,"Total Score",?62,"Record Type",!
+3 QUIT