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

ONC2PS4A.m

Go to the documentation of this file.
ONC2PS4A ;Hines OIFO/RTK - Post-Install Continued for Patch ONC*2.2*4 ;02/5/15
 ;;2.2;ONCOLOGY;**4**;Jul 31, 2013;Build 5
 ;
NAA15 ;Conversion for Appendix B of the NAACCR 2015 Implementation Guidelines
 N CTR,DTDX,GRADE,HIST,IEN,NVAL,PRIMSITE,PRSTCD
 S CTR=0
 D BMES^XPDUTL("HEME Conversions for 2015.  Step 1: Histology conversions...")
 F DTDX=3099999:0 S DTDX=$O(^ONCO(165.5,"ADX",DTDX)) Q:DTDX'>0  D
 .F IEN=0:0 S IEN=$O(^ONCO(165.5,"ADX",DTDX,IEN)) Q:IEN'>0  D
 ..S CTR=CTR+1 I CTR#150=0 D BMES^XPDUTL(".")
 ..S HIST=$P($G(^ONCO(165.5,IEN,2.2)),U,3)
 ..S PRSTCD=$$GET1^DIQ(165.5,IEN,20.1)
 ..S PRIMSITE=$P($G(^ONCO(165.5,IEN,2)),U,1)
 ..;Part 1
 ..I HIST=96543 D
 ...S $P(^ONCO(165.5,IEN,2.2),U,3)=96533
 ...S $P(^ONCO(165.5,IEN,8),U,2)="HODGKIN LYMPHOMA, LYMPHOCYTE DEPLETION, NOS"
 ..I HIST=96613!(HIST=96623) D
 ...S $P(^ONCO(165.5,IEN,2.2),U,3)=96503
 ...S $P(^ONCO(165.5,IEN,8),U,2)="HODGKIN LYMPHOMA, NOS"
 ..I HIST=96643!(HIST=96653)!(HIST=96673) D
 ...S $P(^ONCO(165.5,IEN,2.2),U,3)=96633
 ...S $P(^ONCO(165.5,IEN,8),U,2)="HODGKIN LYMPHOMA, NODULAR SCLEROSIS, NOS"
 ..I HIST=96753 D
 ...S $P(^ONCO(165.5,IEN,2.2),U,3)=96903
 ...S $P(^ONCO(165.5,IEN,8),U,2)="FOLLICULAR LYMPHOMA, NOS"
 ..I HIST=96843 D
 ...S $P(^ONCO(165.5,IEN,2.2),U,3)=96803
 ...S $P(^ONCO(165.5,IEN,8),U,2)="MALIGNANT LYMPHOMA, LRGE B-CELL, DIFFUSE, NOS"
 ..I HIST=97503!(HIST=97543) D
 ...S $P(^ONCO(165.5,IEN,2.2),U,3)=97513
 ...S $P(^ONCO(165.5,IEN,8),U,2)="LANGERHANS CELL HISTIOCYTOSIS, NOS"
 ..I HIST=97603!(HIST=97643) D
 ...S $P(^ONCO(165.5,IEN,2.2),U,3)=97623
 ...S $P(^ONCO(165.5,IEN,8),U,2)="HEAVY CHAIN DISEASE, NOS"
 ..I HIST=98053 D
 ...S $P(^ONCO(165.5,IEN,2.2),U,3)=98093
 ...S $P(^ONCO(165.5,IEN,8),U,2)="MIXED PHENOTYPE ACUTE LEUKEMIA, T/MYELOID, NOS"
 ..I HIST=99603 D
 ...S $P(^ONCO(165.5,IEN,2.2),U,3)=99753
 ...S $P(^ONCO(165.5,IEN,8),U,2)="MYELODYSPLASTIC/MYELOPROLIFERATIVE NEOPLASM, UNCLASSIFIABLE"
 ..I HIST=99843 D
 ...S $P(^ONCO(165.5,IEN,2.2),U,3)=99833
 ...S $P(^ONCO(165.5,IEN,8),U,2)="REFRACTORY ANEMIA WITH EXCESS BLASTS"
 ..I HIST=99873 D
 ...S $P(^ONCO(165.5,IEN,2.2),U,3)=99203
 ...S $P(^ONCO(165.5,IEN,8),U,2)="THERAPY-RELATED ACUTE MYELOID LEUKEMIA, NOS"
 ..;Part 2
 ..I HIST=96703,((PRSTCD'="C42.0")&(PRSTCD'="C42.1")&(PRSTCD'="C42.3")&(PRSTCD'="C42.4")) D
 ...S $P(^ONCO(165.5,IEN,2.2),U,3)=98233
 ...S $P(^ONCO(165.5,IEN,8),U,2)="B-CELL CHRON LYMPHOCYTIC LEUK/SMALL LYMPHOMA"
 ..I HIST=97283,((PRSTCD'="C42.0")&(PRSTCD'="C42.1")&(PRSTCD'="C42.3")&(PRSTCD'="C42.4")) D
 ...S $P(^ONCO(165.5,IEN,2.2),U,3)=98113
 ...S $P(^ONCO(165.5,IEN,8),U,2)="B LYMPHOBLASTIC LEUKEMIA/LYMPHOMA, NOS"
 ..I HIST=97293,((PRSTCD'="C42.0")&(PRSTCD'="C42.1")&(PRSTCD'="C42.3")&(PRSTCD'="C42.4")) D
 ...S $P(^ONCO(165.5,IEN,2.2),U,3)=98373
 ...S $P(^ONCO(165.5,IEN,8),U,2)="T LYMPHOBLASTIC LEUKEMIA/LYMPHOMA"
 ..I ((HIST=98353)!(HIST=98363)),((PRSTCD'="C42.1")&(PRSTCD'="C44.1")&(PRSTCD'="C69.0")&(PRSTCD'="C69.5")&(PRSTCD'="C69.6")) D
 ...S $P(^ONCO(165.5,IEN,2.2),U,3)=98113
 ...S $P(^ONCO(165.5,IEN,8),U,2)="B LYMPHOBLASTIC LEUKEMIA/LYMPHOMA, NOS"
 ...S $P(^ONCO(165.5,IEN,2),U,1)=67421
 ..I ((HIST=98353)!(HIST=98363)),PRSTCD="C42.1" D
 ...S $P(^ONCO(165.5,IEN,2.2),U,3)=98113
 ...S $P(^ONCO(165.5,IEN,8),U,2)="B LYMPHOBLASTIC LEUKEMIA/LYMPHOMA, NOS"
 ..;Part 3
 ..I HIST=96703,((PRSTCD="C42.0")!(PRSTCD="C42.1")!(PRSTCD="C42.3")!(PRSTCD="C42.4")) D
 ...S $P(^ONCO(165.5,IEN,2.2),U,3)=98233
 ...S $P(^ONCO(165.5,IEN,8),U,2)="B-CELL CHRON LYMPHOCYTIC LEUK/SMALL LYMPHOMA"
 ...S $P(^ONCO(165.5,IEN,2),U,1)=67421
 ...S $P(^ONCO(165.5,IEN,"CS"),U,11)=800
 ...S $P(^ONCO(165.5,IEN,"CS"),U,5)=999
 ...S $P(^ONCO(165.5,IEN,"CS"),U,6)=988,$P(^ONCO(165.5,IEN,"CS"),U,7)=988
 ...S $P(^ONCO(165.5,IEN,"CS"),U,8)=988,$P(^ONCO(165.5,IEN,"CS"),U,9)=988
 ...S $P(^ONCO(165.5,IEN,"CS"),U,10)=988
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,1)=988
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,2)=988
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,3)=988
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,4)=988
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,5)=988
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,6)=988
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,7)=988
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,8)=988
 ..I HIST=97283,((PRSTCD="C42.0")!(PRSTCD="C42.1")!(PRSTCD="C42.3")!(PRSTCD="C42.4")) D
 ...S $P(^ONCO(165.5,IEN,2.2),U,3)=98113
 ...S $P(^ONCO(165.5,IEN,8),U,2)="B LYMPHOBLASTIC LEUKEMIA/LYMPHOMA, NOS"
 ...S $P(^ONCO(165.5,IEN,2),U,1)=67421
 ...S $P(^ONCO(165.5,IEN,"CS"),U,11)=800
 ...S $P(^ONCO(165.5,IEN,"CS"),U,5)=999
 ...S $P(^ONCO(165.5,IEN,"CS"),U,6)=988,$P(^ONCO(165.5,IEN,"CS"),U,7)=988
 ...S $P(^ONCO(165.5,IEN,"CS"),U,8)=988,$P(^ONCO(165.5,IEN,"CS"),U,9)=988
 ...S $P(^ONCO(165.5,IEN,"CS"),U,10)=988
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,1)=988
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,2)=988
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,3)=988
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,4)=988
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,5)=988
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,6)=988
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,7)=988
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,8)=988
 ..I HIST=97293,((PRSTCD="C42.0")!(PRSTCD="C42.1")!(PRSTCD="C42.3")!(PRSTCD="C42.4")) D
 ...S $P(^ONCO(165.5,IEN,2.2),U,3)=98373
 ...S $P(^ONCO(165.5,IEN,8),U,2)="T LYMPHOBLASTIC LEUKEMIA/LYMPHOMA"
 ...S $P(^ONCO(165.5,IEN,2),U,1)=67421
 ...S $P(^ONCO(165.5,IEN,"CS"),U,11)=800
 ...S $P(^ONCO(165.5,IEN,"CS"),U,5)=999
 ...S $P(^ONCO(165.5,IEN,"CS"),U,6)=988,$P(^ONCO(165.5,IEN,"CS"),U,7)=988
 ...S $P(^ONCO(165.5,IEN,"CS"),U,8)=988,$P(^ONCO(165.5,IEN,"CS"),U,9)=988
 ...S $P(^ONCO(165.5,IEN,"CS"),U,10)=988
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,1)=988
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,2)=988
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,3)=988
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,4)=988
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,5)=988
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,6)=988
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,7)=988
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,8)=988
 ..I ((HIST=98353)!(HIST=98363)),((PRSTCD="C44.1")!(PRSTCD="C69.0")!(PRSTCD="C69.5")!(PRSTCD="C69.6")) D
 ...S $P(^ONCO(165.5,IEN,2.2),U,3)=98113
 ...S $P(^ONCO(165.5,IEN,8),U,2)="B LYMPHOBLASTIC LEUKEMIA/LYMPHOMA, NOS"
 ...S $P(^ONCO(165.5,IEN,2),U,1)=67421
 ...S $P(^ONCO(165.5,IEN,"CS"),U,11)=800
 ...S $P(^ONCO(165.5,IEN,"CS"),U,3)=98
 ...S $P(^ONCO(165.5,IEN,"CS"),U,12)=988
 ...S $P(^ONCO(165.5,IEN,"CS"),U,5)=999
 ...S $P(^ONCO(165.5,IEN,"CS"),U,6)=988,$P(^ONCO(165.5,IEN,"CS"),U,7)=988
 ...S $P(^ONCO(165.5,IEN,"CS"),U,8)=988,$P(^ONCO(165.5,IEN,"CS"),U,9)=988
 ...S $P(^ONCO(165.5,IEN,"CS"),U,10)=988
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,1)=988
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,2)=988
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,3)=988
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,4)=988
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,5)=988
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,6)=988
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,7)=988
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,8)=988
 ..I HIST=97333 D
 ...S $P(^ONCO(165.5,IEN,2.2),U,3)=97323
 ...S $P(^ONCO(165.5,IEN,8),U,2)="MULTIPLE MYELOMA"
 ...S $P(^ONCO(165.5,IEN,2),U,1)=67421
 ...S $P(^ONCO(165.5,IEN,"CS"),U,11)=810
 ...I PRSTCD'="C42.1" S $P(^ONCO(165.5,IEN,"CS"),U,3)=98
 ...I PRSTCD="C42.1" S $P(^ONCO(165.5,IEN,"CS"),U,3)=""
 ...S $P(^ONCO(165.5,IEN,"CS"),U,3)=98
 ...S $P(^ONCO(165.5,IEN,"CS"),U,12)=987
 ...S $P(^ONCO(165.5,IEN,"CS"),U,5)=988
 ...S $P(^ONCO(165.5,IEN,"CS"),U,6)=999,$P(^ONCO(165.5,IEN,"CS"),U,7)=999
 ...S NVAL=988 I PRSTCD="C42.1" S NVAL=""
 ...S $P(^ONCO(165.5,IEN,"CS"),U,8)=NVAL,$P(^ONCO(165.5,IEN,"CS"),U,9)=NVAL
 ...S $P(^ONCO(165.5,IEN,"CS"),U,10)=NVAL
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,1)=NVAL
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,2)=NVAL
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,3)=NVAL
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,4)=NVAL
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,5)=NVAL
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,6)=NVAL
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,7)=NVAL
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,8)=NVAL
 ..;Part 4
 ..I ((HIST=98203)!(HIST=98263)!(HIST=98313)!(HIST=98323)!(HIST=98333)!(HIST=98343)),((PRSTCD="C44.1")!(PRSTCD="C69.0")!(PRSTCD="C69.5")!(PRSTCD="C69.6")) D
 ...S $P(^ONCO(165.5,IEN,2),U,1)=67421
 ...S $P(^ONCO(165.5,IEN,"CS"),U,11)=800
 ...S $P(^ONCO(165.5,IEN,"CS"),U,3)=98
 ...S $P(^ONCO(165.5,IEN,"CS"),U,12)=988
 ...S $P(^ONCO(165.5,IEN,"CS"),U,5)=999
 ...S $P(^ONCO(165.5,IEN,"CS"),U,6)=988,$P(^ONCO(165.5,IEN,"CS"),U,7)=988
 ...S $P(^ONCO(165.5,IEN,"CS"),U,8)=988,$P(^ONCO(165.5,IEN,"CS"),U,9)=988
 ...S $P(^ONCO(165.5,IEN,"CS"),U,10)=988
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,1)=988
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,2)=988
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,3)=988
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,4)=988
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,5)=988
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,6)=988
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,7)=988
 ...S $P(^ONCO(165.5,IEN,"CS2"),U,8)=988
 ..I ((HIST=98113)!(HIST=98123)!(HIST=98133)!(HIST=98143)!(HIST=98153)!(HIST=98163)!(HIST=98173)!(HIST=98183)!(HIST=98233)!(HIST=98273)!(HIST=98373)),(PRSTCD="C42.3") D
 ...S $P(^ONCO(165.5,IEN,2),U,1)=67421
 ...S $P(^ONCO(165.5,IEN,"CS"),U,11)=800
 ...S $P(^ONCO(165.5,IEN,"CS"),U,5)=999
 ...S $P(^ONCO(165.5,IEN,"CS"),U,6)=988,$P(^ONCO(165.5,IEN,"CS"),U,7)=988
 ...S $P(^ONCO(165.5,IEN,"CS"),U,8)=988,$P(^ONCO(165.5,IEN,"CS"),U,9)=988
 ..Q
 .Q
 S CTR=0
 D BMES^XPDUTL("...Step 2: Grade conversions...")
 F DTDX=3099999:0 S DTDX=$O(^ONCO(165.5,"ADX",DTDX)) Q:DTDX'>0  D
 .F IEN=0:0 S IEN=$O(^ONCO(165.5,"ADX",DTDX,IEN)) Q:IEN'>0  D
 ..S CTR=CTR+1 I CTR#150=0 D BMES^XPDUTL(".")
 ..S HIST=$P($G(^ONCO(165.5,IEN,2.2)),U,3)
 ..S PRSTCD=$$GET1^DIQ(165.5,IEN,20.1)
 ..S PRIMSITE=$P($G(^ONCO(165.5,IEN,2)),U,1)
 ..S GRADE=$P($G(^ONCO(165.5,IEN,2)),U,5)
 ..;
 ..I HIST=95903!(HIST=96503)!(HIST=96513)!(HIST=96523)!(HIST=96533)!(HIST=96553)!(HIST=96633)!(HIST=97273)!(HIST=97353)!(HIST=98003)!(HIST=98203) D
 ...I GRADE=1!(GRADE=2)!(GRADE=3)!(GRADE=4) S $P(^ONCO(165.5,IEN,2),U,5)=9
 ..I HIST=98323!(HIST=98403)!(HIST=98603)!(HIST=98613)!(HIST=98633)!(HIST=98653)!(HIST=98663)!(HIST=98673)!(HIST=98693)!(HIST=98703)!(HIST=98713) D
 ...I GRADE=1!(GRADE=2)!(GRADE=3)!(GRADE=4) S $P(^ONCO(165.5,IEN,2),U,5)=9
 ..I HIST=98723!(HIST=98733)!(HIST=98743)!(HIST=98913)!(HIST=98953)!(HIST=98963)!(HIST=98973)!(HIST=98983)!(HIST=99103)!(HIST=99113)!(HIST=99203) D
 ...I GRADE=1!(GRADE=2)!(GRADE=3)!(GRADE=4) S $P(^ONCO(165.5,IEN,2),U,5)=9
 ..I HIST=99303!(HIST=99313)!(HIST=99653)!(HIST=99663)!(HIST=99673)!(HIST=99713) D
 ...I GRADE=1!(GRADE=2)!(GRADE=3)!(GRADE=4) S $P(^ONCO(165.5,IEN,2),U,5)=9
 ..;
 ..I HIST=95913!(HIST=95963)!(HIST=95973)!(HIST=96593)!(HIST=96713)!(HIST=96733)!(HIST=96783)!(HIST=96793)!(HIST=96803)!(HIST=96873)!(HIST=96883)!(HIST=96893) D
 ...S $P(^ONCO(165.5,IEN,2),U,5)=6
 ..I HIST=96903!(HIST=96913)!(HIST=96953)!(HIST=96983)!(HIST=96993)!(HIST=97123)!(HIST=97313)!(HIST=97323)!(HIST=97343)!(HIST=97373)!(HIST=97383)!(HIST=97613) D
 ...S $P(^ONCO(165.5,IEN,2),U,5)=6
 ..I HIST=97623!(HIST=98113)!(HIST=98123)!(HIST=98133)!(HIST=98143)!(HIST=98153)!(HIST=98163)!(HIST=98173)!(HIST=98183)!(HIST=98233)!(HIST=98263)!(HIST=98333)!(HIST=99403) D
 ...S $P(^ONCO(165.5,IEN,2),U,5)=6
 ..;
 ..I HIST=97003!(HIST=97013)!(HIST=97023)!(HIST=97053)!(HIST=97083)!(HIST=97093)!(HIST=97163)!(HIST=97173)!(HIST=97183)!(HIST=97243)!(HIST=97253)!(HIST=97263)!(HIST=98273)!(HIST=98343)!(HIST=98373) D
 ...S $P(^ONCO(165.5,IEN,2),U,5)=5
 ..;
 ..I HIST=97143,GRADE'=6 D
 ...S $P(^ONCO(165.5,IEN,2),U,5)=5
 ..;
 ..I HIST=97193!(HIST=99483) D
 ...S $P(^ONCO(165.5,IEN,2),U,5)=8
 ..;
 ..I HIST=97403!(HIST=97413)!(HIST=97423)!(HIST=97513)!(HIST=97553)!(HIST=97563)!(HIST=97573)!(HIST=97583)!(HIST=97593)!(HIST=98013)!(HIST=98063)!(HIST=98073)!(HIST=98083)!(HIST=98093)!(HIST=98753) D
 ...S $P(^ONCO(165.5,IEN,2),U,5)=9
 ..I HIST=98763!(HIST=99453)!(HIST=99463)!(HIST=99503)!(HIST=99613)!(HIST=99623)!(HIST=99633)!(HIST=99643)!(HIST=99753)!(HIST=99803)!(HIST=99823)!(HIST=99833)!(HIST=99853)!(HIST=99863)!(HIST=99893)!(HIST=99913)!(HIST=99923) D
 ...S $P(^ONCO(165.5,IEN,2),U,5)=9
 ..;
 ..I HIST=98313,GRADE'=5,GRADE'=8 D
 ...S $P(^ONCO(165.5,IEN,2),U,5)=9
 ..Q
 .Q
 S CTR=0
 D BMES^XPDUTL("...Step 3-Primary Site conversions...")
 F DTDX=3099999:0 S DTDX=$O(^ONCO(165.5,"ADX",DTDX)) Q:DTDX'>0  D
 .F IEN=0:0 S IEN=$O(^ONCO(165.5,"ADX",DTDX,IEN)) Q:IEN'>0  D
 ..S CTR=CTR+1 I CTR#150=0 D BMES^XPDUTL(".")
 ..S HIST=$P($G(^ONCO(165.5,IEN,2.2)),U,3)
 ..S PRSTCD=$$GET1^DIQ(165.5,IEN,20.1)
 ..S PRIMSITE=$P($G(^ONCO(165.5,IEN,2)),U,1)
 ..;Table 1
 ..I HIST=97323!(HIST=97413)!(HIST=97423) D
 ...I PRIMSITE'=67421 S $P(^ONCO(165.5,IEN,2),U,1)=67421
 ..I HIST=97613 D
 ...I PRIMSITE'=67420 S $P(^ONCO(165.5,IEN,2),U,1)=67420
 ..I HIST=98003!(HIST=98013)!(HIST=98063)!(HIST=98073)!(HIST=98083)!(HIST=98093)!(HIST=98203)!(HIST=98263)!(HIST=98313)!(HIST=98323)!(HIST=98333)!(HIST=98343) D
 ...I PRIMSITE'=67421 S $P(^ONCO(165.5,IEN,2),U,1)=67421
 ..I HIST=98403!(HIST=98603)!(HIST=98613)!(HIST=98633)!(HIST=98653)!(HIST=98663)!(HIST=98673)!(HIST=98693)!(HIST=98703)!(HIST=98713)!(HIST=98723)!(HIST=98733)!(HIST=98743) D
 ...I PRIMSITE'=67421 S $P(^ONCO(165.5,IEN,2),U,1)=67421
 ..I HIST=98753!(HIST=98763)!(HIST=98913)!(HIST=98953)!(HIST=98963)!(HIST=98973)!(HIST=98983)!(HIST=99103)!(HIST=99113)!(HIST=99203)!(HIST=99313)!(HIST=99403)!(HIST=99453) D
 ...I PRIMSITE'=67421 S $P(^ONCO(165.5,IEN,2),U,1)=67421
 ..I HIST=99463!(HIST=99483)!(HIST=99503)!(HIST=99613)!(HIST=99623)!(HIST=99633)!(HIST=99643)!(HIST=99653)!(HIST=99663)!(HIST=99673)!(HIST=99753)!(HIST=99803)!(HIST=99823) D
 ...I PRIMSITE'=67421 S $P(^ONCO(165.5,IEN,2),U,1)=67421
 ..I HIST=99833!(HIST=99853)!(HIST=99863)!(HIST=99893)!(HIST=99913)!(HIST=99923) D
 ...I PRIMSITE'=67421 S $P(^ONCO(165.5,IEN,2),U,1)=67421
 ..;Table 2
 ..I HIST=98113!(HIST=98123)!(HIST=98133)!(HIST=98143)!(HIST=98153)!(HIST=98163)!(HIST=98173)!(HIST=98183)!(HIST=98233)!(HIST=98273)!(HIST=98373) D
 ...I PRIMSITE=67420!(PRIMSITE=67424) S $P(^ONCO(165.5,IEN,2),U,1)=67421
 ..I HIST=97623 D
 ...I PRIMSITE=67420!(PRIMSITE=67423)!(PRIMSITE=67424) S $P(^ONCO(165.5,IEN,2),U,1)=67421
 ..;Table 3 & Table 4 (for manual review only, no code change)
 ..Q
 .Q
 D BMES^XPDUTL("...Conversions complete!")
 Q