PSXBLD2 ;BIR/EJW-New warning label Data for Transmission ;10/26/04
;;2.0;CMOP;**54,71**;11 Apr 97;Build 1
;
;Reference to ^PS(55, supported by DBIA #2228
;Reference to WTEXT^PSSWRNA supported by DBIA #4444
;
NEWWARN ;Send All New warnings to CMOP in NTE11 & NTE11A
; First 220 characters will be placed into the NTE11 segment, any
; text > 220 will be placed into a continuation segment of NTE11A,
; but only up to an additional max of 220 characters.
;
N J,TEXT,W,TXT1,TXT2
;send English warnings
F J=1:1:$L(WARN,",") S W=$P(WARN,",",J) Q:W="" D
.S TEXT=$$WTEXT^PSSWRNA(W)
.Q:TEXT=""
.S TXT1=$E(TEXT,1,220),TXT2=$E($E(TEXT,221,$L(TEXT)),1,220)
.S MSG=MSG+1,PSXORD(MSG)="NTE|11|"_$P(RXY,"^")_"|ENG|"_W_"|"_TXT1
.S:TXT2]"" MSG=MSG+1,PSXORD(MSG)="NTE|11A|"_$P(RXY,"^")_"|ENG|"_W_"|"_TXT2
;
;quit if Patient Not Language Spanish
I $P($G(^PS(55,DFN,"LAN")),"^",2)'=2 Q
;quit also, if Patient Other Language Not Yes
I '$P($G(^PS(55,DFN,"LAN")),"^") Q
;
;send Spanish warnings also
F J=1:1:$L(WARN,",") S W=$P(WARN,",",J) Q:W="" D
.S TEXT=$$WTEXT^PSSWRNA(W,2)
.Q:TEXT=""
.S TXT1=$E(TEXT,1,220),TXT2=$E($E(TEXT,221,$L(TEXT)),1,220)
.S MSG=MSG+1,PSXORD(MSG)="NTE|11|"_$P(RXY,"^")_"|SPA|"_W_"|"_TXT1
.S:TXT2]"" MSG=MSG+1,PSXORD(MSG)="NTE|11A|"_$P(RXY,"^")_"|SPA|"_W_"|"_TXT2
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPSXBLD2 1341 printed Oct 16, 2024@17:44:21 Page 2
PSXBLD2 ;BIR/EJW-New warning label Data for Transmission ;10/26/04
+1 ;;2.0;CMOP;**54,71**;11 Apr 97;Build 1
+2 ;
+3 ;Reference to ^PS(55, supported by DBIA #2228
+4 ;Reference to WTEXT^PSSWRNA supported by DBIA #4444
+5 ;
NEWWARN ;Send All New warnings to CMOP in NTE11 & NTE11A
+1 ; First 220 characters will be placed into the NTE11 segment, any
+2 ; text > 220 will be placed into a continuation segment of NTE11A,
+3 ; but only up to an additional max of 220 characters.
+4 ;
+5 NEW J,TEXT,W,TXT1,TXT2
+6 ;send English warnings
+7 FOR J=1:1:$LENGTH(WARN,",")
SET W=$PIECE(WARN,",",J)
if W=""
QUIT
Begin DoDot:1
+8 SET TEXT=$$WTEXT^PSSWRNA(W)
+9 if TEXT=""
QUIT
+10 SET TXT1=$EXTRACT(TEXT,1,220)
SET TXT2=$EXTRACT($EXTRACT(TEXT,221,$LENGTH(TEXT)),1,220)
+11 SET MSG=MSG+1
SET PSXORD(MSG)="NTE|11|"_$PIECE(RXY,"^")_"|ENG|"_W_"|"_TXT1
+12 if TXT2]""
SET MSG=MSG+1
SET PSXORD(MSG)="NTE|11A|"_$PIECE(RXY,"^")_"|ENG|"_W_"|"_TXT2
End DoDot:1
+13 ;
+14 ;quit if Patient Not Language Spanish
+15 IF $PIECE($GET(^PS(55,DFN,"LAN")),"^",2)'=2
QUIT
+16 ;quit also, if Patient Other Language Not Yes
+17 IF '$PIECE($GET(^PS(55,DFN,"LAN")),"^")
QUIT
+18 ;
+19 ;send Spanish warnings also
+20 FOR J=1:1:$LENGTH(WARN,",")
SET W=$PIECE(WARN,",",J)
if W=""
QUIT
Begin DoDot:1
+21 SET TEXT=$$WTEXT^PSSWRNA(W,2)
+22 if TEXT=""
QUIT
+23 SET TXT1=$EXTRACT(TEXT,1,220)
SET TXT2=$EXTRACT($EXTRACT(TEXT,221,$LENGTH(TEXT)),1,220)
+24 SET MSG=MSG+1
SET PSXORD(MSG)="NTE|11|"_$PIECE(RXY,"^")_"|SPA|"_W_"|"_TXT1
+25 if TXT2]""
SET MSG=MSG+1
SET PSXORD(MSG)="NTE|11A|"_$PIECE(RXY,"^")_"|SPA|"_W_"|"_TXT2
End DoDot:1
+26 QUIT