ONCOIT ;Hines OIFO/GWB - Miscellaneous Input Transforms ;7/10/96
;;2.2;ONCOLOGY;**1**;Jul 31, 2013;Build 8
;
NP ;NO PUNCTUATION
;PATIENT ADDRESS AT DX (165.5,8)
;CITY/TOWN AT DX (165.5,8.1)
;POSTAL CODE AT DX (165.5,9)
S X1=$$STRIP^XLFSTR(X,"!""""#$%&'()*+,-./:;<=>?[>]^_\{|}~`")
I X'=X1 K X W " Punctuation not allowed" K X1 Q
S X1=$TR(X,"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ")
I X'=X1 K X W " Lowercase text not allowed" K X1 Q
Q
;
RNEIT ;REGIONAL NODES EXAMINED (165.5,33)
I (X=91)!(X=92)!(X=93)!(X=94) K X Q
S DXDT=$P($G(^ONCO(165.5,D0,0)),U,16)
I DXDT<2980000 D
.I X=0 W " No nodes examined" Q
.I X=97 W " 97 or more nodes examined" Q
.I X=98 W " Nodes examined, # not specified" Q
.I X=99 W " Unknown if nodes examined, NA" Q
I DXDT>2971231 D
.I X=0 W " No nodes examined" Q
.I X=90 W " 90 or more nodes examined" Q
.I X=95 W " No nodes removed, aspiration performed" Q
.I X=96 W " Node removal as sampling, # unknown" Q
.I X=97 W " Node removal as dissection, # unknown" Q
.I X=98 W " Nodes surgically removed, # unknown" Q
.I X=99 W " Unknown, NA or -, not stated" Q
Q
;
RNPIT ;REGIONAL LYMPH NODES POSITIVE (165.5,32)
I (X=91)!(X=92)!(X=93)!(X=94)!(X=96) W " Invalid value" K X Q
I X=0 W " All nodes examined are negative" Q
I X=90 W " 90 or more nodes are positive" Q
I X=95 W " Positive aspiration was performed" Q
I X=97 W " Positive nodes, # not specified" Q
I X=98 W " No nodes were examined" Q
I X=99 W " Unknown if nodes +, NA, not stated" Q
Q
;
BP ;BIOPSY PROCEDURE (165.5,141)
S XCODE=X
D BPGUCHK^ONCOTNE
I BPSITE="" K X Q
S FOUND=0
F XBP=0:0 S XBP=$O(^ONCO(164,BPSITE,"BP5",XBP)) Q:XBP'>0!(FOUND=1) D
.I $P(^ONCO(164,BPSITE,"BP5",XBP,0),U,2)=X S X=XBP,FOUND=1 Q
I FOUND=0 K X Q
D EN^DDIOL($P(^ONCO(164,BPSITE,"BP5",X,0),U,1))
K FOUND,XBP Q
;
RDIT ;REGIONAL DOSE:cGy (165.5,442)
I X'?1.5N K X Q
D NUMIT
I +X=0 W " No radiation administered"
I +X=88888 W " NA, brachytherapy/radioisotopes administered"
I X=99999 W " Dose unknown/unknown if administered"
Q
;
;1998 Prostate Cancer Study
;
PSA ;Item 14. Results of Most Recent Pre-Treatment Prostate Specific
; Antigen (PSA) Test
;RESULTS OF PSA TEST (PR98) (165.5,684)
I X'?1.3N&(X'?0.3N1"."1N) K X Q
I X'["." S X=X_".0"
I $P(X,".",1)="" S X="000"_X
I $L($P(X,".",1))=1 S X="00"_X
I $L($P(X,".",1))=2 S X="0"_X
Q
;
LP25 ;Item 25. Gleason's Score for Biopsy, Local Resection, or Simple
; Prostatectomy
;LESSER PATTERN (02-40) (165.5,623.2)
I +X'=X!(X=6)!(X=7)!(X=8)!($L(X)>1)!(X<0)!(X?.E1"."1N.N) K X Q
S PP=$P($G(^ONCO(165.5,D0,"PRO2")),U,43)
I PP>0,PP<6,(X=0)!(X=9) K X
K PP
Q
;
LP26 ;Item 26. Gleason's Score for Radical Prostatectomy
;LESSER PATTERN (50-70) (165.5,623.5)
I +X'=X!(X=6)!(X=7)!(X=8)!($L(X)>1)!(X<0)!(X?.E1"."1N.N) K X Q
S PP=$P($G(^ONCO(165.5,D0,"PRO2")),U,46)
I PP>0,PP<6,(X=0)!(X=9) K X
K PP
Q
;
;2001 Gastric Cancers PCE Study
;
AC ;Item 3. Alcohol Consumption
;GAS ALCOHOL COMSUMPTION (165.5,1501)
D NUMIT
I +X=0 W " Never consumed alcohol"
I X=97 W " 97 or more drinks per week"
I X=98 W " Yes, number of drinks unknown"
I X=99 W " Not documented"
Q
;
LS ;Item 16. Laboratory Studies
;GAS LDH (IU/L) (165.5,1540)
;GAS CEA (ng/ml) (165.5,1541)
;GAS CA125 (U/ml) (165.5,1542)
;GAS BETA2 MICROGLOBULIN (165.5,1543)
;GAS URINARY 5-HIAA (mg/24hr) (165.5,1544)
D FRACIT
I +X=0 W " Test not administered"
I X=8888.8 W " Test administered but results unknown"
I X=9999.9 W " Not documented"
Q
;
IRTD ;Item 40. Intra-operative Radiation Therapy, Dose (cCy)
;GAS INTRA-OPERATIVE RADIATION (165.5,1567)
D NUMIT
I +X=0 W " Not administered"
I X=88888 W " Administered, dose not documented"
I X=99999 W " Not documented"
Q
;
;2001 Lung (NSCLC) Cancers PCE Study
;
PFT ;Item 7. Pulmonary Function Tests
;LNG FVC (165.5,1407
;LNG FEV (165.5,1407.1)
I $L($P(X,".",1))>ONCL K X Q
D FRACIT
I X="0.00" W " Test not done" Q
I X=9.98 W " Test done, results not documented" Q
I X=9.99 W " Not documented if test performed" Q
Q
;
RE ;Item 9. Radiological Evaluation
;LNG TUMOR SIZE (BONE SCAN) (165.5,1409.4)
;LNG NUM OF TUMORS (BONE SCAN) (165.5,1409.5)
;LNG TUMOR SIZE (CHEST CT) (165.5,1410.4)
;LNG NUM OF TUMORS (CHEST CT) (165.5,1410.5)
;LNG TUMOR SIZE (BRAIN CT) (165.5,1411.4)
;LNG NUM OF TUMORS (BRAIN CT) (165.5,1411.5)
;LNG TUMOR SIZE (CHEST MRI) (165.5,1412.4)
;LNG NUM OF TUMORS (CHEST MRI) (165.5,1412.5)
;LNG TUMOR SIZE (BRAIN MRI) (165.5,1413.4)
;LNG NUM OF TUMORS (BRAIN MRI) (165.5,1413.5)
;LNG TUMOR SIZE (PET SCAN) (165.5,1414.4)
;LNG NUM OF TUMORS (PET SCAN) (165.5,1414.5)
;LNG TUMOR SIZE (CHEST XRAY) (165.5,1415.4)
;LNG NUM OF TUMORS (CHEST XRAY) (165.5,1415.5)
D NUMIT
I +X=0 W " Test not performed"
I X=999!(X=99) W " Test performed, not documented"
Q
;
TPBR ;Item 17. Total Peri-Operative Blood Replacement
;LNG PERI-OPERATIVE BLOOD REP (165.5,1420)
D NUMIT
I +X=0 W " No transfusion performed"
I X=98 W " Transfusion performed, units not documented"
I X=99 W " Not recorded if transfusion done"
Q
;
;2001 Lung (NSCLC) Cancers PCE Study
;2001 Gastric Cancers PCE Study
;
DTU ;Item 2. Duration of Tobacco Use
;LNG DURATION OF TOBACCO USE (165.5,1401)
;Item 4. Duration of Tobacco Use
;GAS DURATION OF TOBACCO USE (165.5,1572)
D NUMIT
I +X=0 W " Never used tobacco"
I X=99 W " Not documented"
Q
;
GYGR ;YEAR OF GASTRIC RESECTION I.T.
I +X=0 W " No prior gastric resection"
I X=9999 W " Not documented"
Q
GTOBR ;GASTRIC TOTAL OPERATIVE BLOOD REPLACEMENT I.T.
I X="00" W " No transfusion"
I X="98" W " Transfusion, # of units not documented"
I X="99" W " Not recorded if transfusion done"
Q
HVBT ;Item 16. Hct (Hematocrit) Values Before Transfusion
;LNG HCT VAL BEFORE TRANSFUSION (165.5,1430)
;Item 33. Hct (Hematocrit) Values Before Transfusion
;GAS HCT VAL BEFORE TRANSFUSION (165.5,1562)
D FRACIT
I +X=0 W " No transfusion"
I X=99.9 W " Not documented"
Q
;
BD ;Item 23. Boost Dose (cCy)
;LNG BOOST DOSE (cGy) (165.5,1422)
;Item 39. Boost Dose (cCy)
;GAS BOOST DOSE (cGy) (165.5,1575)
D NUMIT
I +X=0 W " Not administered"
I X=99999 W " Not documented"
Q
;
DMCM ;Item 12. Distance in Millimeters to Closest Margin
;LNG PROXIMAL MARGIN (165.5,1429)
;LNG DISTAL MARGIN (165.5,1429.1)
D NUMIT
I +X=0 W " No free margins"
I X=998 W " NA, no surgery of primary site"
I X=999 W " Unknown, not documented"
Q
;
EFM ;Item 30. Extent of Free Margin
;GAS PROXIMAL MARGIN (165.5,1558)
;GAS DISTAL MARGIN (165.5,1558.1)
D NUMIT
I +X=0 W " No free margins"
I X=999 W " Not documented"
Q
;
NUMIT ;Pad with leading zeros
S ONCZZZ="000000000",ONCXLEN=$L(X) I ONCL=ONCXLEN Q
S ONCPNUM=ONCL-ONCXLEN,ONCPAD=$E(ONCZZZ,1,ONCPNUM),X=ONCPAD_X
K ONCZZZ,ONCXLEN,ONCPNUM,ONCPAD
Q
;
FRACIT ;Pad with leading zeros, 1 decimal place
I X[".",$P(X,".",2)="" S X=+X
S ONCZZZ="000000000",ONCNUM=$P(X,".",1),ONCFRAC=$P(X,".",2)
S ONCNLEN=$L(ONCNUM),ONCFLEN=$L(ONCFRAC)
S ONCNPD=ONCL-ONCNLEN,ONCFPD=ONCF-ONCFLEN
S ONCPADN=$E(ONCZZZ,1,ONCNPD),ONCPADF=$E(ONCZZZ,1,ONCFPD)
I ONCFRAC="" S ONCPADF="."_ONCPADF
S X=ONCPADN_X_ONCPADF
K ONCZZZ,ONCNUM,ONCFRAC,ONCNLEN,ONCFLEN,ONCNPD,ONCFPD,ONCPADN,ONCPADF
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HONCOIT 7592 printed Dec 13, 2024@02:25:09 Page 2
ONCOIT ;Hines OIFO/GWB - Miscellaneous Input Transforms ;7/10/96
+1 ;;2.2;ONCOLOGY;**1**;Jul 31, 2013;Build 8
+2 ;
NP ;NO PUNCTUATION
+1 ;PATIENT ADDRESS AT DX (165.5,8)
+2 ;CITY/TOWN AT DX (165.5,8.1)
+3 ;POSTAL CODE AT DX (165.5,9)
+4 SET X1=$$STRIP^XLFSTR(X,"!""""#$%&'()*+,-./:;<=>?[>]^_\{|}~`")
+5 IF X'=X1
KILL X
WRITE " Punctuation not allowed"
KILL X1
QUIT
+6 SET X1=$TRANSLATE(X,"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ")
+7 IF X'=X1
KILL X
WRITE " Lowercase text not allowed"
KILL X1
QUIT
+8 QUIT
+9 ;
RNEIT ;REGIONAL NODES EXAMINED (165.5,33)
+1 IF (X=91)!(X=92)!(X=93)!(X=94)
KILL X
QUIT
+2 SET DXDT=$PIECE($GET(^ONCO(165.5,D0,0)),U,16)
+3 IF DXDT<2980000
Begin DoDot:1
+4 IF X=0
WRITE " No nodes examined"
QUIT
+5 IF X=97
WRITE " 97 or more nodes examined"
QUIT
+6 IF X=98
WRITE " Nodes examined, # not specified"
QUIT
+7 IF X=99
WRITE " Unknown if nodes examined, NA"
QUIT
End DoDot:1
+8 IF DXDT>2971231
Begin DoDot:1
+9 IF X=0
WRITE " No nodes examined"
QUIT
+10 IF X=90
WRITE " 90 or more nodes examined"
QUIT
+11 IF X=95
WRITE " No nodes removed, aspiration performed"
QUIT
+12 IF X=96
WRITE " Node removal as sampling, # unknown"
QUIT
+13 IF X=97
WRITE " Node removal as dissection, # unknown"
QUIT
+14 IF X=98
WRITE " Nodes surgically removed, # unknown"
QUIT
+15 IF X=99
WRITE " Unknown, NA or -, not stated"
QUIT
End DoDot:1
+16 QUIT
+17 ;
RNPIT ;REGIONAL LYMPH NODES POSITIVE (165.5,32)
+1 IF (X=91)!(X=92)!(X=93)!(X=94)!(X=96)
WRITE " Invalid value"
KILL X
QUIT
+2 IF X=0
WRITE " All nodes examined are negative"
QUIT
+3 IF X=90
WRITE " 90 or more nodes are positive"
QUIT
+4 IF X=95
WRITE " Positive aspiration was performed"
QUIT
+5 IF X=97
WRITE " Positive nodes, # not specified"
QUIT
+6 IF X=98
WRITE " No nodes were examined"
QUIT
+7 IF X=99
WRITE " Unknown if nodes +, NA, not stated"
QUIT
+8 QUIT
+9 ;
BP ;BIOPSY PROCEDURE (165.5,141)
+1 SET XCODE=X
+2 DO BPGUCHK^ONCOTNE
+3 IF BPSITE=""
KILL X
QUIT
+4 SET FOUND=0
+5 FOR XBP=0:0
SET XBP=$ORDER(^ONCO(164,BPSITE,"BP5",XBP))
if XBP'>0!(FOUND=1)
QUIT
Begin DoDot:1
+6 IF $PIECE(^ONCO(164,BPSITE,"BP5",XBP,0),U,2)=X
SET X=XBP
SET FOUND=1
QUIT
End DoDot:1
+7 IF FOUND=0
KILL X
QUIT
+8 DO EN^DDIOL($PIECE(^ONCO(164,BPSITE,"BP5",X,0),U,1))
+9 KILL FOUND,XBP
QUIT
+10 ;
RDIT ;REGIONAL DOSE:cGy (165.5,442)
+1 IF X'?1.5N
KILL X
QUIT
+2 DO NUMIT
+3 IF +X=0
WRITE " No radiation administered"
+4 IF +X=88888
WRITE " NA, brachytherapy/radioisotopes administered"
+5 IF X=99999
WRITE " Dose unknown/unknown if administered"
+6 QUIT
+7 ;
+8 ;1998 Prostate Cancer Study
+9 ;
PSA ;Item 14. Results of Most Recent Pre-Treatment Prostate Specific
+1 ; Antigen (PSA) Test
+2 ;RESULTS OF PSA TEST (PR98) (165.5,684)
+3 IF X'?1.3N&(X'?0.3N1"."1N)
KILL X
QUIT
+4 IF X'["."
SET X=X_".0"
+5 IF $PIECE(X,".",1)=""
SET X="000"_X
+6 IF $LENGTH($PIECE(X,".",1))=1
SET X="00"_X
+7 IF $LENGTH($PIECE(X,".",1))=2
SET X="0"_X
+8 QUIT
+9 ;
LP25 ;Item 25. Gleason's Score for Biopsy, Local Resection, or Simple
+1 ; Prostatectomy
+2 ;LESSER PATTERN (02-40) (165.5,623.2)
+3 IF +X'=X!(X=6)!(X=7)!(X=8)!($LENGTH(X)>1)!(X<0)!(X?.E1"."1N.N)
KILL X
QUIT
+4 SET PP=$PIECE($GET(^ONCO(165.5,D0,"PRO2")),U,43)
+5 IF PP>0
IF PP<6
IF (X=0)!(X=9)
KILL X
+6 KILL PP
+7 QUIT
+8 ;
LP26 ;Item 26. Gleason's Score for Radical Prostatectomy
+1 ;LESSER PATTERN (50-70) (165.5,623.5)
+2 IF +X'=X!(X=6)!(X=7)!(X=8)!($LENGTH(X)>1)!(X<0)!(X?.E1"."1N.N)
KILL X
QUIT
+3 SET PP=$PIECE($GET(^ONCO(165.5,D0,"PRO2")),U,46)
+4 IF PP>0
IF PP<6
IF (X=0)!(X=9)
KILL X
+5 KILL PP
+6 QUIT
+7 ;
+8 ;2001 Gastric Cancers PCE Study
+9 ;
AC ;Item 3. Alcohol Consumption
+1 ;GAS ALCOHOL COMSUMPTION (165.5,1501)
+2 DO NUMIT
+3 IF +X=0
WRITE " Never consumed alcohol"
+4 IF X=97
WRITE " 97 or more drinks per week"
+5 IF X=98
WRITE " Yes, number of drinks unknown"
+6 IF X=99
WRITE " Not documented"
+7 QUIT
+8 ;
LS ;Item 16. Laboratory Studies
+1 ;GAS LDH (IU/L) (165.5,1540)
+2 ;GAS CEA (ng/ml) (165.5,1541)
+3 ;GAS CA125 (U/ml) (165.5,1542)
+4 ;GAS BETA2 MICROGLOBULIN (165.5,1543)
+5 ;GAS URINARY 5-HIAA (mg/24hr) (165.5,1544)
+6 DO FRACIT
+7 IF +X=0
WRITE " Test not administered"
+8 IF X=8888.8
WRITE " Test administered but results unknown"
+9 IF X=9999.9
WRITE " Not documented"
+10 QUIT
+11 ;
IRTD ;Item 40. Intra-operative Radiation Therapy, Dose (cCy)
+1 ;GAS INTRA-OPERATIVE RADIATION (165.5,1567)
+2 DO NUMIT
+3 IF +X=0
WRITE " Not administered"
+4 IF X=88888
WRITE " Administered, dose not documented"
+5 IF X=99999
WRITE " Not documented"
+6 QUIT
+7 ;
+8 ;2001 Lung (NSCLC) Cancers PCE Study
+9 ;
PFT ;Item 7. Pulmonary Function Tests
+1 ;LNG FVC (165.5,1407
+2 ;LNG FEV (165.5,1407.1)
+3 IF $LENGTH($PIECE(X,".",1))>ONCL
KILL X
QUIT
+4 DO FRACIT
+5 IF X="0.00"
WRITE " Test not done"
QUIT
+6 IF X=9.98
WRITE " Test done, results not documented"
QUIT
+7 IF X=9.99
WRITE " Not documented if test performed"
QUIT
+8 QUIT
+9 ;
RE ;Item 9. Radiological Evaluation
+1 ;LNG TUMOR SIZE (BONE SCAN) (165.5,1409.4)
+2 ;LNG NUM OF TUMORS (BONE SCAN) (165.5,1409.5)
+3 ;LNG TUMOR SIZE (CHEST CT) (165.5,1410.4)
+4 ;LNG NUM OF TUMORS (CHEST CT) (165.5,1410.5)
+5 ;LNG TUMOR SIZE (BRAIN CT) (165.5,1411.4)
+6 ;LNG NUM OF TUMORS (BRAIN CT) (165.5,1411.5)
+7 ;LNG TUMOR SIZE (CHEST MRI) (165.5,1412.4)
+8 ;LNG NUM OF TUMORS (CHEST MRI) (165.5,1412.5)
+9 ;LNG TUMOR SIZE (BRAIN MRI) (165.5,1413.4)
+10 ;LNG NUM OF TUMORS (BRAIN MRI) (165.5,1413.5)
+11 ;LNG TUMOR SIZE (PET SCAN) (165.5,1414.4)
+12 ;LNG NUM OF TUMORS (PET SCAN) (165.5,1414.5)
+13 ;LNG TUMOR SIZE (CHEST XRAY) (165.5,1415.4)
+14 ;LNG NUM OF TUMORS (CHEST XRAY) (165.5,1415.5)
+15 DO NUMIT
+16 IF +X=0
WRITE " Test not performed"
+17 IF X=999!(X=99)
WRITE " Test performed, not documented"
+18 QUIT
+19 ;
TPBR ;Item 17. Total Peri-Operative Blood Replacement
+1 ;LNG PERI-OPERATIVE BLOOD REP (165.5,1420)
+2 DO NUMIT
+3 IF +X=0
WRITE " No transfusion performed"
+4 IF X=98
WRITE " Transfusion performed, units not documented"
+5 IF X=99
WRITE " Not recorded if transfusion done"
+6 QUIT
+7 ;
+8 ;2001 Lung (NSCLC) Cancers PCE Study
+9 ;2001 Gastric Cancers PCE Study
+10 ;
DTU ;Item 2. Duration of Tobacco Use
+1 ;LNG DURATION OF TOBACCO USE (165.5,1401)
+2 ;Item 4. Duration of Tobacco Use
+3 ;GAS DURATION OF TOBACCO USE (165.5,1572)
+4 DO NUMIT
+5 IF +X=0
WRITE " Never used tobacco"
+6 IF X=99
WRITE " Not documented"
+7 QUIT
+8 ;
GYGR ;YEAR OF GASTRIC RESECTION I.T.
+1 IF +X=0
WRITE " No prior gastric resection"
+2 IF X=9999
WRITE " Not documented"
+3 QUIT
GTOBR ;GASTRIC TOTAL OPERATIVE BLOOD REPLACEMENT I.T.
+1 IF X="00"
WRITE " No transfusion"
+2 IF X="98"
WRITE " Transfusion, # of units not documented"
+3 IF X="99"
WRITE " Not recorded if transfusion done"
+4 QUIT
HVBT ;Item 16. Hct (Hematocrit) Values Before Transfusion
+1 ;LNG HCT VAL BEFORE TRANSFUSION (165.5,1430)
+2 ;Item 33. Hct (Hematocrit) Values Before Transfusion
+3 ;GAS HCT VAL BEFORE TRANSFUSION (165.5,1562)
+4 DO FRACIT
+5 IF +X=0
WRITE " No transfusion"
+6 IF X=99.9
WRITE " Not documented"
+7 QUIT
+8 ;
BD ;Item 23. Boost Dose (cCy)
+1 ;LNG BOOST DOSE (cGy) (165.5,1422)
+2 ;Item 39. Boost Dose (cCy)
+3 ;GAS BOOST DOSE (cGy) (165.5,1575)
+4 DO NUMIT
+5 IF +X=0
WRITE " Not administered"
+6 IF X=99999
WRITE " Not documented"
+7 QUIT
+8 ;
DMCM ;Item 12. Distance in Millimeters to Closest Margin
+1 ;LNG PROXIMAL MARGIN (165.5,1429)
+2 ;LNG DISTAL MARGIN (165.5,1429.1)
+3 DO NUMIT
+4 IF +X=0
WRITE " No free margins"
+5 IF X=998
WRITE " NA, no surgery of primary site"
+6 IF X=999
WRITE " Unknown, not documented"
+7 QUIT
+8 ;
EFM ;Item 30. Extent of Free Margin
+1 ;GAS PROXIMAL MARGIN (165.5,1558)
+2 ;GAS DISTAL MARGIN (165.5,1558.1)
+3 DO NUMIT
+4 IF +X=0
WRITE " No free margins"
+5 IF X=999
WRITE " Not documented"
+6 QUIT
+7 ;
NUMIT ;Pad with leading zeros
+1 SET ONCZZZ="000000000"
SET ONCXLEN=$LENGTH(X)
IF ONCL=ONCXLEN
QUIT
+2 SET ONCPNUM=ONCL-ONCXLEN
SET ONCPAD=$EXTRACT(ONCZZZ,1,ONCPNUM)
SET X=ONCPAD_X
+3 KILL ONCZZZ,ONCXLEN,ONCPNUM,ONCPAD
+4 QUIT
+5 ;
FRACIT ;Pad with leading zeros, 1 decimal place
+1 IF X["."
IF $PIECE(X,".",2)=""
SET X=+X
+2 SET ONCZZZ="000000000"
SET ONCNUM=$PIECE(X,".",1)
SET ONCFRAC=$PIECE(X,".",2)
+3 SET ONCNLEN=$LENGTH(ONCNUM)
SET ONCFLEN=$LENGTH(ONCFRAC)
+4 SET ONCNPD=ONCL-ONCNLEN
SET ONCFPD=ONCF-ONCFLEN
+5 SET ONCPADN=$EXTRACT(ONCZZZ,1,ONCNPD)
SET ONCPADF=$EXTRACT(ONCZZZ,1,ONCFPD)
+6 IF ONCFRAC=""
SET ONCPADF="."_ONCPADF
+7 SET X=ONCPADN_X_ONCPADF
+8 KILL ONCZZZ,ONCNUM,ONCFRAC,ONCNLEN,ONCFLEN,ONCNPD,ONCFPD,ONCPADN,ONCPADF
+9 QUIT