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

ONCPST44.m

Go to the documentation of this file.
ONCPST44 ;Hines OIFO/GWB - Post-init for Patch ONC*2.11*44
 ;;2.11;ONCOLOGY;**44**; Mar 07, 1995
 ;
 ;Split LUNG cases into LUNG, NON-SMALL CELL and LUNG, SMALL CELL
 ;
 ;Split RECTUM/ANUS cases into RECTUM and ANUS
 ;
 ;Convert melanoma cases to MELANOMA
 ;
 ;Convert RADIATIION/SURGERY SEQUENCE (165.5,51.3)
 ;
 ;Correct COUNTY DX (165.5,10) and COMORBIDITY/COMPLICATION #1-6
 ;(160,25-25.5) upload problems
 ;
 S CTR=0 F IEN=0:0 S IEN=$O(^ONCO(165.5,IEN)) Q:IEN'>0  D
 .S CTR=CTR+1 I CTR#100=0 W "."
 .S SITE=$$GET1^DIQ(165.5,IEN,.01)
 .S HIST=$P($G(^ONCO(165.5,IEN,2.2)),U,3)
 .S PS=$P($G(^ONCO(165.5,IEN,2)),U,1)
 .I SITE["LUNG" D
 ..I ($E(HIST,1,4)=8041)!($E(HIST,1,4)=8042)!($E(HIST,1,4)=8043)!($E(HIST,1,4)=8044)!($E(HIST,1,4)=8045)!($E(HIST,1,4)=8246) D
 ...S DIE="^ONCO(165.5,",DA=IEN,DR=".01///LUNG SMALL CELL" D ^DIE
 .I $$MELANOMA^ONCOU55(IEN) D
 ..S DIE="^ONCO(165.5,",DA=IEN,DR=".01///MELANOMA" D ^DIE
 .S S=$E($$GET1^DIQ(165.5,IEN,58.6,"E"),1,2)
 .S SATF=$E($$GET1^DIQ(165.5,IEN,58.7,"E"),1,2)
 .S SCP=$P($G(^ONCO(165.5,IEN,3.1)),U,31)
 .S SCPATF=$P($G(^ONCO(165.5,IEN,3.1)),U,32)
 .S SOTH=$P($G(^ONCO(165.5,IEN,3.1)),U,33)
 .S SOTHATF=$P($G(^ONCO(165.5,IEN,3.1)),U,34)
 .I $E(PS,3,4)=21 D
 ..S DIE="^ONCO(165.5,",DA=IEN,DR=".01///ANUS" D ^DIE
 .I ((S="00")!(S=99)!(S=98)!(S=""))&((SATF="00")!(SATF=99)!(SATF=98)!(SATF=""))&((SCP=0)!(SCP="")!(SCP=9))&((SCPATF=0)!(SCPATF="")!(SCPATF=9))&((SOTH=0)!(SOTH=""))&((SOTHATF=0)!(SOTHATF="")) D
 ..I $P($G(^ONCO(165.5,IEN,3)),U,7)'="" S $P(^ONCO(165.5,IEN,3),U,7)=0
 .I $D(^ONCO(165.5,"UPL")) D
 ..S PATPNT=$P($G(^ONCO(165.5,IEN,0)),U,2)
 ..K CC
 ..S CC1=$P($G(^ONCO(160,PATPNT,0)),U,19)
 ..S CC2=$P($G(^ONCO(160,PATPNT,0)),U,20)
 ..S CC3=$P($G(^ONCO(160,PATPNT,0)),U,21)
 ..S CC4=$P($G(^ONCO(160,PATPNT,0)),U,22)
 ..S CC5=$P($G(^ONCO(160,PATPNT,0)),U,23)
 ..S CC6=$P($G(^ONCO(160,PATPNT,0)),U,24)
 ..S:CC1'="" CC(CC1)=""
 ..S:CC2'="" CC(CC2)=""
 ..S:CC3'="" CC(CC3)=""
 ..S:CC4'="" CC(CC4)=""
 ..S:CC5'="" CC(CC5)=""
 ..S:CC6'="" CC(CC6)=""
 ..I '$D(CC) Q
 ..F PIECE=19:1:24 S $P(^ONCO(160,PATPNT,0),U,PIECE)=""
 ..S CCPNT=0 F PIECE=19:1 S CCPNT=$O(CC(CCPNT)) Q:CCPNT=""  S $P(^ONCO(160,PATPNT,0),U,PIECE)=CCPNT
 .
 .S CTDX=$P($G(^ONCO(165.5,IEN,1)),U,3)
 .I CTDX="" Q
 .S STDX=$P($G(^ONCO(165.5,IEN,1)),U,4)
 .I STDX="" Q
 .S CTNAME=$P($G(^VIC(5.1,CTDX,0)),U,1)
 .S CTSTAT=$P($G(^VIC(5.1,CTDX,0)),U,2)
 .I CTSTAT="" Q
 .S CTSTABR=$P($G(^DIC(5,CTSTAT,0)),U,2)
 .I CTSTABR="FG" Q
 .S STSTABR=$P($G(^ONCO(160.15,STDX,0)),U,1)
 .I CTSTABR'=STSTABR D
 ..S VICIEN=0 F  S VICIEN=$O(^VIC(5.1,"B",CTNAME,VICIEN)) Q:VICIEN'>0  S VICSTPT=$P($G(^VIC(5.1,VICIEN,0)),U,2),DICSTABR=$P($G(^DIC(5,VICSTPT,0)),U,2) I DICSTABR=STSTABR S $P(^ONCO(165.5,IEN,1),U,3)=VICIEN Q
 ;
 ;Delete ICDO-1 TOPOGRAPHY (164.22,.02) Data Dictionary and data
 S DIK="^DD(164.22,",DA=.02,DA(1)=164.22 D ^DIK
 F IEN=0:0 S IEN=$O(^ONCO(164.2,IEN)) Q:IEN'>0  D
 .F SUBIEN=0:0 S SUBIEN=$O(^ONCO(164.2,IEN,"T",SUBIEN)) Q:SUBIEN'>0  S TOP=$P(^ONCO(164.2,IEN,"T",SUBIEN,0),U,1) S ^ONCO(164.2,IEN,"T",SUBIEN,0)=TOP
 K ^ONCO(164.2,"G")
 ;
 ;Delete ^ONCO(160.2,5) = WORK-SHEET
 K DA,DIK S DIK="^ONCO(160.2,",DA=5 D ^DIK