BTIUSTSC ; IHS/MSC/JS - V STROKE SCALE OBJECT ;17-Nov-2014 15:54;DU
;;1.0;TEXT INTEGRATION UTILITIES;**1012,1013**;MAR 20, 2013;Build 33
;
Q
;
STSCALE(DFN,TARGET,VIEN,STCNT) ; EHR p12
; -- get patient visit --
NEW VST
S STCNT=$G(STCNT)
I $G(VIEN)'="" G SCALE
S VST=$$GETVAR^CIAVMEVT("ENCOUNTER.ID.ALTERNATEVISITID",,"CONTEXT.ENCOUNTER")
I VST="" S @TARGET@(1,0)="Invalid visit" Q "~@"_$NA(@TARGET)
I VST<1 Q " "
S VIEN=+$$VSTR2VIS^BEHOENCX(DFN,VST) I VST<1 S @TARGET@(1,0)="Invalid context variables" Q "~@"_$NA(@TARGET)
;S VIEN=$P(VST,";",4)
I $G(VIEN)="" S @TARGET@(1,0)="Invalid visit" Q "~@"_$NA(@TARGET)
;
SCALE ; -- check V STROKE file #9000010.63 for NIH records and not EIE --
NEW STRIEN,CNT,FNUM,VSTRARR,VSTRERR
S STRIEN=""
S CNT=0
F S STRIEN=$O(^AUPNVSTR("AD",VIEN,STRIEN)) Q:STRIEN="" D
.I '$D(^AUPNVSTR(STRIEN)) Q ; broken record
.I '$D(^AUPNVSTR(STRIEN,15)) Q ; NIH not filed
.I $P($G(^AUPNVSTR(STRIEN,5)),U,1) Q ; EIE
.D GETS
Q "~@"_$NA(@TARGET)
;
GETS ; -- check/retrieve file entry --
S FNUM=$$FNUM
I FNUM=0 S @TARGET@(1,0)="Server error: "_$G(FILERR("DIERR",1))_U_$G(FILERR("DIERR",1,"TEXT",1)) K FILERR Q "~@"_$NA(@TARGET)
;K @TARGET <<<<<<<<<<<<<<<<<<<< 10/11/13
K VSTRARR,VSTRERR
D GETS^DIQ(FNUM,STRIEN_",","**","IE","VSTRARR","VSTRERR") ; retrieve file entry data
I $D(VSTRERR) D Q "~@"_$NA(@TARGET)
.S @TARGET@(1,0)="Server error: "_$G(VSTRERR("DIERR",1))_U_$G(VSTRERR("DIERR",1,"TEXT",1))
;
NEW WT
D WEIGHT(VIEN)
;
D PRINT(STRIEN,.STCNT)
I CNT=0 S @TARGET@(1,0)="No V STROKE entry for patient visit"
Q
; -- print the V Stroke entry data --
PRINT(STRIEN,STCNT) ;
NEW SPACE,ARRIVED,PATNAME,HANDED,FIBINIT,VCNT,FIBNOT
S $P(SPACE," ",1)=""
S ARRIVED=$G(VSTRARR(FNUM,STRIEN_",",".01","E")) ;.01 ARRIVAL DATE/TIME (RD), [0;1]
S PATNAME=$G(VSTRARR(FNUM,STRIEN_",",".02","E")) ;.02 PATIENT NAME (RP9000001'I), [0;2]
S HANDED=$G(VSTRARR(FNUM,STRIEN_",",".04","E")) ; .04 HANDEDNESS (F), [0;4]
S FIBINIT=$G(VSTRARR(FNUM,STRIEN_",",".11","E")) ;.11 FIBRINOLYTIC THERAPY INITIATED (D), [0;11]
S FIBNOT=$G(VSTRARR(FNUM,STRIEN_",",".14","E")) ;.14 FIBRINOLYTIC THERAPY NOT INITIATED
S CNT=CNT+1
S @TARGET@(CNT,0)="--- NIH Stroke Score(s) ---"
S CNT=CNT+1
I FIBINIT'="" S @TARGET@(CNT,0)="Fibrinolytic therapy started at: "_$G(FIBINIT)
I FIBNOT'="" S @TARGET@(CNT,0)="Fibrinolytic therapy not intiated at: "_$G(FIBNOT)
S CNT=CNT+1
S @TARGET@(CNT,0)="Handedness: "_$G(HANDED)
S CNT=CNT+1
S @TARGET@(CNT,0)="Weight: "_$G(WT)
S CNT=CNT+1
S @TARGET@(CNT,0)=SPACE
D NIH
Q
;
;NIH STROKE SCALE #9000010.6315 -- NIH STROKE SCALE SUB-FILE FIELD #1500
NIH ;
NEW STRING,NODE,STIME,SSTIME,SPACE,QUIT,BY
S QUIT=0
S STRING="",NODE=""
S $P(SPACE," ",1)=""
F S NODE=$O(VSTRARR(9000010.6315,NODE)) Q:'+NODE!(QUIT=1) D
. I STCNT'="" S STCNT=STCNT-1 I STCNT=0 S QUIT=1
. S STIME=$G(VSTRARR(9000010.6315,NODE,".02","E")) ; >>> .02 EVENT DATE/TIME (D), [0;2]
. S BY=$G(VSTRARR(9000010.6315,NODE,".03","E"))
. S CNT=CNT+1
. S @TARGET@(CNT,0)=""
. S @TARGET@(CNT,0)="NIH Stroke Score at: "_STIME_" by "_BY
. S STRING=$G(VSTRARR(9000010.6315,NODE,".04","E"))
. S CNT=CNT+1
. S @TARGET@(CNT,0)=" Level of Consciousness: "_$G(STRING)
. S STRING=$G(VSTRARR(9000010.6315,NODE,".05","E"))
. S CNT=CNT+1
. S @TARGET@(CNT,0)=" LOC Questions: "_$G(STRING)
. S STRING=$G(VSTRARR(9000010.6315,NODE,".06","E"))
. S CNT=CNT+1
. S @TARGET@(CNT,0)=" LOC Commands: "_$G(STRING)
. S STRING=$G(VSTRARR(9000010.6315,NODE,".07","E"))
. S CNT=CNT+1
. S @TARGET@(CNT,0)=" 2 Best Gaze: "_$G(STRING)
. S STRING=$G(VSTRARR(9000010.6315,NODE,".08","E"))
. S CNT=CNT+1
. S @TARGET@(CNT,0)=" Visual: "_$G(STRING)
. S STRING=$G(VSTRARR(9000010.6315,NODE,".09","E"))
. S CNT=CNT+1
. S @TARGET@(CNT,0)=" Facial Palsy: "_$G(STRING)
. S STRING=$G(VSTRARR(9000010.6315,NODE,".1","E"))
. S CNT=CNT+1
. S @TARGET@(CNT,0)=" Motor Arm Left: "_$G(STRING)
. S STRING=$G(VSTRARR(9000010.6315,NODE,".11","E"))
. S CNT=CNT+1
. S @TARGET@(CNT,0)=" Motor Arm Right: "_$G(STRING)
. S STRING=$G(VSTRARR(9000010.6315,NODE,".12","E"))
. S CNT=CNT+1
. S @TARGET@(CNT,0)=" Motor Left Leg: "_$G(STRING)
. S STRING=$G(VSTRARR(9000010.6315,NODE,".13","E"))
. S CNT=CNT+1
. S @TARGET@(CNT,0)=" Motor Right Leg: "_$G(STRING)
. S STRING=$G(VSTRARR(9000010.6315,NODE,".14","E"))
. S CNT=CNT+1
. S @TARGET@(CNT,0)=" Limb Ataxia: "_$G(STRING)
. S STRING=$G(VSTRARR(9000010.6315,NODE,".15","E"))
. S CNT=CNT+1
. S @TARGET@(CNT,0)=" Sensory: "_$G(STRING)
. S STRING=$G(VSTRARR(9000010.6315,NODE,".16","E"))
. S CNT=CNT+1
. S @TARGET@(CNT,0)=" Best Language: "_$G(STRING)
. S STRING=$G(VSTRARR(9000010.6315,NODE,".17","E"))
. S CNT=CNT+1
. S @TARGET@(CNT,0)=" Dysarthria: "_$G(STRING)
. S STRING=$G(VSTRARR(9000010.6315,NODE,".18","E"))
. S CNT=CNT+1
. S @TARGET@(CNT,0)=" Extinction & Inattention: "_$G(STRING)
. S CNT=CNT+1
. S @TARGET@(CNT,0)=" _______"
. S CNT=CNT+1
. S STRING=$G(VSTRARR(9000010.6315,NODE,".19","E")) ; .19 TOTAL STROKE SCORE (NJ2,0), [0;19]
. S @TARGET@(CNT,0)=" * TOTAL SCORE: "_$G(STRING)
. S CNT=CNT_1
. S @TARGET@(CNT,0)=SPACE
. S STRING=$G(VSTRARR(9000010.6315,NODE,"1.01","E"))
. I $G(STRING)]"" D
.. S CNT=CNT+1
.. S @TARGET@(CNT,0)="Motor arm left comment: "
.. S CNT=CNT+1
.. S @TARGET@(CNT,0)=" "_$G(STRING)
. S STRING=$G(VSTRARR(9000010.6315,NODE,"1.02","E"))
. I $G(STRING)]"" D
.. S CNT=CNT+1
.. S @TARGET@(CNT,0)="Motor arm right comment: "
.. S CNT=CNT+1
.. S @TARGET@(CNT,0)=" "_$G(STRING)
. S STRING=$G(VSTRARR(9000010.6315,NODE,"2.01","E"))
. I $G(STRING)]"" D
.. S CNT=CNT+1
.. S @TARGET@(CNT,0)="Motor leg left comment: "
.. S CNT=CNT+1
.. S @TARGET@(CNT,0)=" "_$G(STRING)
. S STRING=$G(VSTRARR(9000010.6315,NODE,"2.02","E"))
. I $G(STRING)]"" D
.. S CNT=CNT+1
.. S @TARGET@(CNT,0)="Motor leg right comment: "
.. S CNT=CNT+1
.. S @TARGET@(CNT,0)=" "_$G(STRING)
. S STRING=$G(VSTRARR(9000010.6315,NODE,"3.01","E"))
. I $G(STRING)]"" D
.. S CNT=CNT+1
.. S @TARGET@(CNT,0)="Limb ataxia comment: "
.. S CNT=CNT+1
.. S @TARGET@(CNT,0)=" "_$G(STRING)
. S STRING=$G(VSTRARR(9000010.6315,NODE,"3.02","E"))
. I $G(STRING)]"" D
.. S CNT=CNT+1
.. S @TARGET@(CNT,0)="Dysarthia comment: "
.. S CNT=CNT+1
.. S @TARGET@(CNT,0)=" "_$G(STRING)
. S CNT=CNT+1
. S @TARGET@(CNT,0)=SPACE
Q
;
; -- find patient weight from visit or default to last filed weight in V Measurement file --
WEIGHT(VIEN) ; -- from routine BTIULO4 --
NEW MIEN,QUALIF
S WT=0
S MIEN=0 F S MIEN=$O(^AUPNVMSR("AD",VIEN,MIEN)) Q:'MIEN D
. K TIU D ENP^XBDIQ1(9000010.01,MIEN,".01;.04;2;1201","TIU(","I")
. I TIU(.01)="WT" I TIU(2,"I")'=1 ;SKIP ENTERED IN ERROR VITALS
. S QUALIF=$$QUAL^BTIULO7A(MIEN)
. I TIU(.01)="WT" D
. . S TIU(.04)=$J(TIU(.04),5,2)_" ("_$J((TIU(.04)*.454),5,2)_" kg)"
. . I QUALIF="" S WT=$$NAME(TIU(.01,"I"))_": "_TIU(.04)_$$LSTDATE^BTIUPCC1(VIEN,TIU(1201,"I"),1)
. . I QUALIF'="" S WT=$$NAME(TIU(.01,"I"))_": "_TIU(.04)_$$LSTDATE^BTIUPCC1(VIEN,TIU(1201,"I"),1)_" Qualifiers: "_QUALIF
. . Q
. Q
K TIU
S:WT=0 WT=$$LASTMSR^BTIUPCC1(+$G(DFN),"WT",1,1)
Q
;
NAME(X) ;return full name for measurement
Q $$GET1^DIQ(9999999.07,X,.02)
;
; -- V STROKE file number --
FNUM() ; returns 0/invalid file ref number, 9000010.63/valid file ref number
NEW FILEN,ATTRIB,TAROOT,MSGROOT,FILEINFO
S FILEN=9000010.63,ATTRIB="NAME;GLOBAL NAME",TAROOT="FILEINFO",MSGROOT="FILERR"
D FILE^DID(FILEN,,ATTRIB,TAROOT,MSGROOT)
I $D(FILERR) Q 0
Q 9000010.63
BTIUSTSC ; IHS/MSC/JS - V STROKE SCALE OBJECT ;17-Nov-2014 15:54;DU
+1 ;;1.0;TEXT INTEGRATION UTILITIES;**1012,1013**;MAR 20, 2013;Build 33
+2 ;
+3 QUIT
+4 ;
STSCALE(DFN,TARGET,VIEN,STCNT) ; EHR p12
+1 ; -- get patient visit --
+2 NEW VST
+3 SET STCNT=$GET(STCNT)
+4 IF $GET(VIEN)'=""
GOTO SCALE
+5 SET VST=$$GETVAR^CIAVMEVT("ENCOUNTER.ID.ALTERNATEVISITID",,"CONTEXT.ENCOUNTER")
+6 IF VST=""
SET @TARGET@(1,0)="Invalid visit"
QUIT "~@"_$NAME(@TARGET)
+7 IF VST<1
QUIT " "
+8 SET VIEN=+$$VSTR2VIS^BEHOENCX(DFN,VST)
IF VST<1
SET @TARGET@(1,0)="Invalid context variables"
QUIT "~@"_$NAME(@TARGET)
+9 ;S VIEN=$P(VST,";",4)
+10 IF $GET(VIEN)=""
SET @TARGET@(1,0)="Invalid visit"
QUIT "~@"_$NAME(@TARGET)
+11 ;
SCALE ; -- check V STROKE file #9000010.63 for NIH records and not EIE --
+1 NEW STRIEN,CNT,FNUM,VSTRARR,VSTRERR
+2 SET STRIEN=""
+3 SET CNT=0
+4 FOR
SET STRIEN=$ORDER(^AUPNVSTR("AD",VIEN,STRIEN))
IF STRIEN=""
QUIT
Begin DoDot:1
+5 ; broken record
IF '$DATA(^AUPNVSTR(STRIEN))
QUIT
+6 ; NIH not filed
IF '$DATA(^AUPNVSTR(STRIEN,15))
QUIT
+7 ; EIE
IF $PIECE($GET(^AUPNVSTR(STRIEN,5)),U,1)
QUIT
+8 DO GETS
End DoDot:1
+9 QUIT "~@"_$NAME(@TARGET)
+10 ;
GETS ; -- check/retrieve file entry --
+1 SET FNUM=$$FNUM
+2 IF FNUM=0
SET @TARGET@(1,0)="Server error: "_$GET(FILERR("DIERR",1))_U_$GET(FILERR("DIERR",1,"TEXT",1))
KILL FILERR
QUIT "~@"_$NAME(@TARGET)
+3 ;K @TARGET <<<<<<<<<<<<<<<<<<<< 10/11/13
+4 KILL VSTRARR,VSTRERR
+5 ; retrieve file entry data
DO GETS^DIQ(FNUM,STRIEN_",","**","IE","VSTRARR","VSTRERR")
+6 IF $DATA(VSTRERR)
Begin DoDot:1
+7 SET @TARGET@(1,0)="Server error: "_$GET(VSTRERR("DIERR",1))_U_$GET(VSTRERR("DIERR",1,"TEXT",1))
End DoDot:1
QUIT "~@"_$NAME(@TARGET)
+8 ;
+9 NEW WT
+10 DO WEIGHT(VIEN)
+11 ;
+12 DO PRINT(STRIEN,.STCNT)
+13 IF CNT=0
SET @TARGET@(1,0)="No V STROKE entry for patient visit"
+14 QUIT
+15 ; -- print the V Stroke entry data --
PRINT(STRIEN,STCNT) ;
+1 NEW SPACE,ARRIVED,PATNAME,HANDED,FIBINIT,VCNT,FIBNOT
+2 SET $PIECE(SPACE," ",1)=""
+3 ;.01 ARRIVAL DATE/TIME (RD), [0;1]
SET ARRIVED=$GET(VSTRARR(FNUM,STRIEN_",",".01","E"))
+4 ;.02 PATIENT NAME (RP9000001'I), [0;2]
SET PATNAME=$GET(VSTRARR(FNUM,STRIEN_",",".02","E"))
+5 ; .04 HANDEDNESS (F), [0;4]
SET HANDED=$GET(VSTRARR(FNUM,STRIEN_",",".04","E"))
+6 ;.11 FIBRINOLYTIC THERAPY INITIATED (D), [0;11]
SET FIBINIT=$GET(VSTRARR(FNUM,STRIEN_",",".11","E"))
+7 ;.14 FIBRINOLYTIC THERAPY NOT INITIATED
SET FIBNOT=$GET(VSTRARR(FNUM,STRIEN_",",".14","E"))
+8 SET CNT=CNT+1
+9 SET @TARGET@(CNT,0)="--- NIH Stroke Score(s) ---"
+10 SET CNT=CNT+1
+11 IF FIBINIT'=""
SET @TARGET@(CNT,0)="Fibrinolytic therapy started at: "_$GET(FIBINIT)
+12 IF FIBNOT'=""
SET @TARGET@(CNT,0)="Fibrinolytic therapy not intiated at: "_$GET(FIBNOT)
+13 SET CNT=CNT+1
+14 SET @TARGET@(CNT,0)="Handedness: "_$GET(HANDED)
+15 SET CNT=CNT+1
+16 SET @TARGET@(CNT,0)="Weight: "_$GET(WT)
+17 SET CNT=CNT+1
+18 SET @TARGET@(CNT,0)=SPACE
+19 DO NIH
+20 QUIT
+21 ;
+22 ;NIH STROKE SCALE #9000010.6315 -- NIH STROKE SCALE SUB-FILE FIELD #1500
NIH ;
+1 NEW STRING,NODE,STIME,SSTIME,SPACE,QUIT,BY
+2 SET QUIT=0
+3 SET STRING=""
SET NODE=""
+4 SET $PIECE(SPACE," ",1)=""
+5 FOR
SET NODE=$ORDER(VSTRARR(9000010.6315,NODE))
IF '+NODE!(QUIT=1)
QUIT
Begin DoDot:1
+6 IF STCNT'=""
SET STCNT=STCNT-1
IF STCNT=0
SET QUIT=1
+7 ; >>> .02 EVENT DATE/TIME (D), [0;2]
SET STIME=$GET(VSTRARR(9000010.6315,NODE,".02","E"))
+8 SET BY=$GET(VSTRARR(9000010.6315,NODE,".03","E"))
+9 SET CNT=CNT+1
+10 SET @TARGET@(CNT,0)=""
+11 SET @TARGET@(CNT,0)="NIH Stroke Score at: "_STIME_" by "_BY
+12 SET STRING=$GET(VSTRARR(9000010.6315,NODE,".04","E"))
+13 SET CNT=CNT+1
+14 SET @TARGET@(CNT,0)=" Level of Consciousness: "_$GET(STRING)
+15 SET STRING=$GET(VSTRARR(9000010.6315,NODE,".05","E"))
+16 SET CNT=CNT+1
+17 SET @TARGET@(CNT,0)=" LOC Questions: "_$GET(STRING)
+18 SET STRING=$GET(VSTRARR(9000010.6315,NODE,".06","E"))
+19 SET CNT=CNT+1
+20 SET @TARGET@(CNT,0)=" LOC Commands: "_$GET(STRING)
+21 SET STRING=$GET(VSTRARR(9000010.6315,NODE,".07","E"))
+22 SET CNT=CNT+1
+23 SET @TARGET@(CNT,0)=" 2 Best Gaze: "_$GET(STRING)
+24 SET STRING=$GET(VSTRARR(9000010.6315,NODE,".08","E"))
+25 SET CNT=CNT+1
+26 SET @TARGET@(CNT,0)=" Visual: "_$GET(STRING)
+27 SET STRING=$GET(VSTRARR(9000010.6315,NODE,".09","E"))
+28 SET CNT=CNT+1
+29 SET @TARGET@(CNT,0)=" Facial Palsy: "_$GET(STRING)
+30 SET STRING=$GET(VSTRARR(9000010.6315,NODE,".1","E"))
+31 SET CNT=CNT+1
+32 SET @TARGET@(CNT,0)=" Motor Arm Left: "_$GET(STRING)
+33 SET STRING=$GET(VSTRARR(9000010.6315,NODE,".11","E"))
+34 SET CNT=CNT+1
+35 SET @TARGET@(CNT,0)=" Motor Arm Right: "_$GET(STRING)
+36 SET STRING=$GET(VSTRARR(9000010.6315,NODE,".12","E"))
+37 SET CNT=CNT+1
+38 SET @TARGET@(CNT,0)=" Motor Left Leg: "_$GET(STRING)
+39 SET STRING=$GET(VSTRARR(9000010.6315,NODE,".13","E"))
+40 SET CNT=CNT+1
+41 SET @TARGET@(CNT,0)=" Motor Right Leg: "_$GET(STRING)
+42 SET STRING=$GET(VSTRARR(9000010.6315,NODE,".14","E"))
+43 SET CNT=CNT+1
+44 SET @TARGET@(CNT,0)=" Limb Ataxia: "_$GET(STRING)
+45 SET STRING=$GET(VSTRARR(9000010.6315,NODE,".15","E"))
+46 SET CNT=CNT+1
+47 SET @TARGET@(CNT,0)=" Sensory: "_$GET(STRING)
+48 SET STRING=$GET(VSTRARR(9000010.6315,NODE,".16","E"))
+49 SET CNT=CNT+1
+50 SET @TARGET@(CNT,0)=" Best Language: "_$GET(STRING)
+51 SET STRING=$GET(VSTRARR(9000010.6315,NODE,".17","E"))
+52 SET CNT=CNT+1
+53 SET @TARGET@(CNT,0)=" Dysarthria: "_$GET(STRING)
+54 SET STRING=$GET(VSTRARR(9000010.6315,NODE,".18","E"))
+55 SET CNT=CNT+1
+56 SET @TARGET@(CNT,0)=" Extinction & Inattention: "_$GET(STRING)
+57 SET CNT=CNT+1
+58 SET @TARGET@(CNT,0)=" _______"
+59 SET CNT=CNT+1
+60 ; .19 TOTAL STROKE SCORE (NJ2,0), [0;19]
SET STRING=$GET(VSTRARR(9000010.6315,NODE,".19","E"))
+61 SET @TARGET@(CNT,0)=" * TOTAL SCORE: "_$GET(STRING)
+62 SET CNT=CNT_1
+63 SET @TARGET@(CNT,0)=SPACE
+64 SET STRING=$GET(VSTRARR(9000010.6315,NODE,"1.01","E"))
+65 IF $GET(STRING)]""
Begin DoDot:2
+66 SET CNT=CNT+1
+67 SET @TARGET@(CNT,0)="Motor arm left comment: "
+68 SET CNT=CNT+1
+69 SET @TARGET@(CNT,0)=" "_$GET(STRING)
End DoDot:2
+70 SET STRING=$GET(VSTRARR(9000010.6315,NODE,"1.02","E"))
+71 IF $GET(STRING)]""
Begin DoDot:2
+72 SET CNT=CNT+1
+73 SET @TARGET@(CNT,0)="Motor arm right comment: "
+74 SET CNT=CNT+1
+75 SET @TARGET@(CNT,0)=" "_$GET(STRING)
End DoDot:2
+76 SET STRING=$GET(VSTRARR(9000010.6315,NODE,"2.01","E"))
+77 IF $GET(STRING)]""
Begin DoDot:2
+78 SET CNT=CNT+1
+79 SET @TARGET@(CNT,0)="Motor leg left comment: "
+80 SET CNT=CNT+1
+81 SET @TARGET@(CNT,0)=" "_$GET(STRING)
End DoDot:2
+82 SET STRING=$GET(VSTRARR(9000010.6315,NODE,"2.02","E"))
+83 IF $GET(STRING)]""
Begin DoDot:2
+84 SET CNT=CNT+1
+85 SET @TARGET@(CNT,0)="Motor leg right comment: "
+86 SET CNT=CNT+1
+87 SET @TARGET@(CNT,0)=" "_$GET(STRING)
End DoDot:2
+88 SET STRING=$GET(VSTRARR(9000010.6315,NODE,"3.01","E"))
+89 IF $GET(STRING)]""
Begin DoDot:2
+90 SET CNT=CNT+1
+91 SET @TARGET@(CNT,0)="Limb ataxia comment: "
+92 SET CNT=CNT+1
+93 SET @TARGET@(CNT,0)=" "_$GET(STRING)
End DoDot:2
+94 SET STRING=$GET(VSTRARR(9000010.6315,NODE,"3.02","E"))
+95 IF $GET(STRING)]""
Begin DoDot:2
+96 SET CNT=CNT+1
+97 SET @TARGET@(CNT,0)="Dysarthia comment: "
+98 SET CNT=CNT+1
+99 SET @TARGET@(CNT,0)=" "_$GET(STRING)
End DoDot:2
+100 SET CNT=CNT+1
+101 SET @TARGET@(CNT,0)=SPACE
End DoDot:1
+102 QUIT
+103 ;
+104 ; -- find patient weight from visit or default to last filed weight in V Measurement file --
WEIGHT(VIEN) ; -- from routine BTIULO4 --
+1 NEW MIEN,QUALIF
+2 SET WT=0
+3 SET MIEN=0
FOR
SET MIEN=$ORDER(^AUPNVMSR("AD",VIEN,MIEN))
IF 'MIEN
QUIT
Begin DoDot:1
+4 KILL TIU
DO ENP^XBDIQ1(9000010.01,MIEN,".01;.04;2;1201","TIU(","I")
+5 ;SKIP ENTERED IN ERROR VITALS
IF TIU(.01)="WT"
IF TIU(2,"I")'=1
+6 SET QUALIF=$$QUAL^BTIULO7A(MIEN)
+7 IF TIU(.01)="WT"
Begin DoDot:2
+8 SET TIU(.04)=$JUSTIFY(TIU(.04),5,2)_" ("_$JUSTIFY((TIU(.04)*.454),5,2)_" kg)"
+9 IF QUALIF=""
SET WT=$$NAME(TIU(.01,"I"))_": "_TIU(.04)_$$LSTDATE^BTIUPCC1(VIEN,TIU(1201,"I"),1)
+10 IF QUALIF'=""
SET WT=$$NAME(TIU(.01,"I"))_": "_TIU(.04)_$$LSTDATE^BTIUPCC1(VIEN,TIU(1201,"I"),1)_" Qualifiers: "_QUALIF
+11 QUIT
End DoDot:2
+12 QUIT
End DoDot:1
+13 KILL TIU
+14 IF WT=0
SET WT=$$LASTMSR^BTIUPCC1(+$GET(DFN),"WT",1,1)
+15 QUIT
+16 ;
NAME(X) ;return full name for measurement
+1 QUIT $$GET1^DIQ(9999999.07,X,.02)
+2 ;
+3 ; -- V STROKE file number --
FNUM() ; returns 0/invalid file ref number, 9000010.63/valid file ref number
+1 NEW FILEN,ATTRIB,TAROOT,MSGROOT,FILEINFO
+2 SET FILEN=9000010.63
SET ATTRIB="NAME;GLOBAL NAME"
SET TAROOT="FILEINFO"
SET MSGROOT="FILERR"
+3 DO FILE^DID(FILEN,,ATTRIB,TAROOT,MSGROOT)
+4 IF $DATA(FILERR)
QUIT 0
+5 QUIT 9000010.63