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

ONC2PR20.m

Go to the documentation of this file.
  1. ONC2PR20 ;HINES OIFO/RTK - Pre-Install Routine for Patch ONC*2.2*20 ;05/01/24
  1. ;;2.2;ONCOLOGY;**20**;Jul 31, 2013;Build 5
  1. ;
  1. ; ICRs:
  1. ; #1157 XPDMENU
  1. ; #10141 XPDUTL
  1. ; #10060 FILE 200 fields
  1. Q
  1. START ;start pre-init changes
  1. K ^ONCO(160.16) ;delete 160.16 and bring back in patch 20 build
  1. K ^ONCO(164.33) ;delete 164.33 and bring back in patch 20 build
  1. K ^ONCO(164.44) ;delete 164.44 and bring back in patch 20 build
  1. K ^ONCO(165.8) ;delete 165.8 and bring back in patch 20 build
  1. K ^ONCO(165.9) ;delete 165.9 and bring back in patch 20 build
  1. D CASEFIND
  1. D INITIALS
  1. D ABSTATUS
  1. D GEOCODE
  1. D REMOPT1,REMOPT2,REMOPT3
  1. D USERV
  1. Q
  1. ;
  1. GEOCODE ;fix NEW ENGLAND AND NEW JERSEY entry in File #165.2
  1. ;FILE 165.2 - GEOCODES
  1. Q:+$$PATCH^XPDUTL("ONC*2.2*20") ;already done
  1. N ONCDA,ONCIEN,ONCIEN1,ONCIENS
  1. S (ONCDA,ONCIEN,ONCIEN1)=0
  1. D BMES^XPDUTL("Fixing the 'New England and New Jersey' entry in GEOCODES file (#165.2)")
  1. F S ONCDA=$O(^ONCO(165.2,ONCDA)) Q:'ONCDA!(ONCIEN>0) D
  1. .I $P(^ONCO(165.2,ONCDA,0),U,1)="New England and New Jersey" S ONCIEN=ONCDA
  1. I ONCIEN'>0 D Q
  1. .D BMES^XPDUTL("Cannot find the entry in FILE #165.2.")
  1. .D BMES^XPDUTL("Please log a ticket.")
  1. K ONCFDA,ONCMSG
  1. S ONCIENS=ONCIEN_","
  1. S ONCFDA(165.2,ONCIENS,1.1)="US" ;edit USPS STATE CODE
  1. D FILE^DIE(,"ONCFDA","ONCMSG")
  1. S ONCDA=0
  1. F S ONCDA=$O(^ONCO(165.2,ONCIEN,1,ONCDA)) Q:'ONCDA!(ONCIEN1>0) D
  1. .I $P(^ONCO(165.2,ONCIEN,1,ONCDA,0),U,1)="NEW JERSEY" S ONCIEN1=ONCDA
  1. K ONCIENS,ONCFDA,ONCMSG
  1. S ONCIENS=ONCIEN1_","_ONCIEN_","
  1. S ONCFDA(165.21,ONCIENS,.01)="@" ;delete XREF field value
  1. D FILE^DIE(,"ONCFDA","ONCMSG")
  1. D BMES^XPDUTL("GEOCODES FILE (#165.2) entry changed.")
  1. Q
  1. REMOPT1 ;Remove ONCO UTIL-DELETE PATIENT option from it's menu
  1. Q:+$$PATCH^XPDUTL("ONC*2.2*20") ;already done
  1. N ONCY
  1. S ONCY=$$DELETE^XPDMENU("ONCO UTIL MENU","ONCO UTIL-DELETE PATIENT")
  1. I ONCY'=1 D Q
  1. .D BMES^XPDUTL("Could not remove the 'ONCO UTIL-DELETE PATIENT' option from it's menu.")
  1. .D BMES^XPDUTL("Please log a ticket.")
  1. Q
  1. REMOPT2 ;Remove ONCO RQRS EXTRACT option from it's menu
  1. Q:+$$PATCH^XPDUTL("ONC*2.2*20") ;already done
  1. N ONCY
  1. S ONCY=$$DELETE^XPDMENU("ONCO UTIL MENU","ONCO RQRS EXTRACT")
  1. I ONCY'=1 D Q
  1. .D BMES^XPDUTL("Could not remove the 'ONCO RQRS EXTRACT' option from it's menu.")
  1. .D BMES^XPDUTL("Please log a ticket.")
  1. Q
  1. REMOPT3 ;Remove ONCO FOLL-PAT FOLLOWUP REPORT option from it's menu
  1. Q:+$$PATCH^XPDUTL("ONC*2.2*20") ;already done
  1. N ONCY
  1. S ONCY=$$DELETE^XPDMENU("ONCO FOLL PROCEDURE MENU","ONCO FOLL-PAT FOLLOWUP REPORT")
  1. I ONCY'=1 D Q
  1. .D BMES^XPDUTL("Could not remove the 'ONCO FOLL-PAT FOLLOWUP REPORT' option from it's menu.")
  1. .D BMES^XPDUTL("Please log a ticket.")
  1. Q
  1. ABSTATUS ;Check ABSTRACT STATUS (#91) field for all 2023 cases and later.
  1. ;If value=3 (Complete), then change to 2 (Partial).
  1. ;FILE 165.5 - ONCOLOGY PRIMARY
  1. ;ADX x-ref on DATE DX (#3) field
  1. D BMES^XPDUTL("Checking ABSTATUS (#91) values in ONCOLOGY SITE PARAMETERS file (#165.2)")
  1. N ONCDATE,ONCIEN,ONCNODE,ONCFDA,ONCMSG,ONCIENS
  1. S ONCDATE=3221231.999999
  1. F S ONCDATE=$O(^ONCO(165.5,"ADX",ONCDATE)) Q:'ONCDATE D
  1. .S ONCIEN=0
  1. .F S ONCIEN=$O(^ONCO(165.5,"ADX",ONCDATE,ONCIEN)) Q:'ONCIEN D
  1. ..S ONCNODE=$G(^ONCO(165.5,ONCIEN,7))
  1. ..Q:$P(ONCNODE,U,2)'=3 ;quit if ABSTRACT STATUS (#91) is not "Complete"
  1. ..K ONCFDA,ONCMSG
  1. ..S ONCIENS=ONCIEN_","
  1. ..S ONCFDA(165.5,ONCIENS,91)=2 ;set to "Partial"
  1. ..D FILE^DIE(,"ONCFDA","ONCMSG")
  1. .. D BMES^XPDUTL("Changed ABSTRACT STATUS value for entry "_ONCIEN_".")
  1. Q
  1. INITIALS ;Check if Oncology Registrar has initials in FILE 200
  1. ;FILE 165.5 - ONCOLOGY PRIMARY
  1. ;FILE 200 - NEW PERSON
  1. D BMES^XPDUTL("Checking if Oncology Registrar has INITIALS in the NEW PERSON file (#200)")
  1. N ONCDUZ,ONCIEN,ONCINITIALS,ONCNODE,ONCUSER,ONCWARNING
  1. S ONCIEN=0
  1. F S ONCIEN=$O(^ONCO(165.5,ONCIEN)) Q:'ONCIEN D
  1. .S ONCNODE=$G(^ONCO(165.5,ONCIEN,7))
  1. .S ONCDUZ=$P(ONCNODE,U,3) ;(#92) ABSTRACTED BY - pointer to FILE 200
  1. .Q:ONCDUZ="" ;field can be null if the case is not "Completed"
  1. .S ONCINITIALS=$$GET1^DIQ(200,ONCDUZ_",",1,,,"ONCMSG")
  1. .Q:ONCINITIALS'="" ;there are user initials
  1. .S ONCUSER=$$GET1^DIQ(200,ONCDUZ_",",.01,,,"ONCMSG")
  1. .S ONCWARNING=ONCUSER_" does not have INITIALS (#1) in the NEW PERSON (#200) file"
  1. .D BMES^XPDUTL(ONCWARNING)
  1. Q
  1. CASEFIND ;Changes to CASEFINDING SOURCE (#166) file
  1. ;change DEFINITION (#1) value for codes 20, 24 and 26
  1. Q:+$$PATCH^XPDUTL("ONC*2.2*20") ;already done
  1. N ONCIEN,ONCFDA,ONCMSG
  1. S ONCIEN=$O(^ONCO(166,"B",20,0))
  1. S ONCFDA(166,ONCIEN_",",1)="Pathology Department Review (surgical pathology reports, autopsies, or cytology reports)"
  1. D FILE^DIE(,"ONCFDA","ONCMSG")
  1. K ONCFDA,ONCMSG
  1. S ONCIEN=$O(^ONCO(166,"B",24,0))
  1. S ONCFDA(166,ONCIEN_",",1)="Laboratory Reports (other than pathology reports, code 20)"
  1. D FILE^DIE(,"ONCFDA","ONCMSG")
  1. K ONCFDA,ONCMSG
  1. S ONCIEN=$O(^ONCO(166,"B",26,0))
  1. S ONCFDA(166,ONCIEN_",",1)="Diagnostic Imaging/Radiology (other than radiation therapy, codes 23; includes nuclear medicine)"
  1. D FILE^DIE(,"ONCFDA","ONCMSG")
  1. K ONCFDA,ONCMSG
  1. S ONCIEN=$O(^ONCO(166,"B",28,0)) ;this change merely corrects a misspelling that existed
  1. S ONCFDA(166,ONCIEN_",",1)="Hospital Rehabilitation Service or Clinic"
  1. D FILE^DIE(,"ONCFDA","ONCMSG")
  1. Q
  1. USERV ;Update url to Production or Development server
  1. N ONCSYS
  1. S ONCSYS=$$PROD^XUPROD()
  1. S DA=$O(^XOB(18.12,"B","ONCO WEB SERVER",""))
  1. ;production url
  1. I ONCSYS D
  1. .S DIE="^XOB(18.12,",DR=".04///^S X=""va-reg-prod-apim.reg.vaec.domain.ext""" D ^DIE
  1. .W !,"Oncology Web Server is updated to Production url...",!
  1. ;development url
  1. I 'ONCSYS D
  1. .S DIE="^XOB(18.12,",DR=".04///^S X=""va-reg-preprod-apim.reg.vaec.domain.ext""" D ^DIE
  1. .W !,"Oncology Web Server is updated to Development url...",!
  1. Q