Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: ONCASCI

ONCASCI.m

Go to the documentation of this file.
ONCASCI ;Hines OIFO/GWB - Search TEXT fields for illegal ASCII characters ;02/09/11
 ;;2.2;ONCOLOGY;**1**;Jul 31, 2013;Build 8
 ;
 N IEN,NSFLAG,TEXTIEN,TEXTLINE,TEXTNAME,TEXTNODE,TEXTNUM,Y,Z,ZZ
 S DIC="^ONCO(165.5,",DIC(0)="AEQZM"
 S DIC("A")=" Select primary or patient name: "
 D ^DIC K DIC Q:Y<0
 S NSFLAG=""
 S IEN=+Y
 F TEXTNODE=9:1:22 D
 .S TEXTNUM=$S(TEXTNODE=9:103,TEXTNODE=10:104,TEXTNODE=11:105,TEXTNODE=12:106,TEXTNODE=13:107,TEXTNODE=14:108,TEXTNODE=15:109,TEXTNODE=16:110,TEXTNODE=17:111,TEXTNODE=18:112,TEXTNODE=19:113,TEXTNODE=20:114,TEXTNODE=21:115,TEXTNODE=22:116,1:"")
 .S TEXTNAME=$P(^DD(165.5,TEXTNUM,0),U,1)
 .S TEXTIEN=0
 .F  S TEXTIEN=$O(^ONCO(165.5,IEN,TEXTNODE,TEXTIEN)) Q:TEXTIEN'>0  D
 ..S TEXTLINE=^ONCO(165.5,IEN,TEXTNODE,TEXTIEN,0)
 ..F Z=1:1:$L(TEXTLINE) S ZZ=$E(TEXTLINE,Z) I ($A(ZZ)<32)!($A(ZZ)>126) D
 ...W !!,TEXTNAME
 ...W !,"TEXT line: ",TEXTLINE
 ...W !,"Non-standard character: ",ZZ
 ...S NSFLAG="Yes"
 ;
EX ;Exit
 I NSFLAG="" W !!," No non-standard characters found."
 W ! K DIR S DIR(0)="E" D ^DIR
 Q