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

RORP017.m

Go to the documentation of this file.
  1. RORP017 ;BPOIFO/CLR POST INSTALL PATCH 17 ; 8/29/11 1:26pm
  1. ;;1.5;CLINICAL CASE REGISTRIES;**17**;Feb 17, 2006;Build 33
  1. ;******************************************************************************
  1. ; This routine uses the following IAs:
  1. ;
  1. ; #10006 ^DIC (supported)
  1. ; #2053 FILE^DIE (supported)
  1. ; #10013 ^DIK (supported)
  1. ; #2054 CLEAN^DILF (supported)
  1. ; #2056 GETS^DIQ (supported)
  1. ; #2263 ADD^XPAR (supported)
  1. ; #2263 DEL^XPAR (supported)
  1. ; #10141 BMES^XPDUTL (supported)
  1. ;
  1. ;******************************************************************************
  1. POST ;
  1. D BMES^XPDUTL("Adding PTSD common template...")
  1. D PTSD
  1. D BMES^XPDUTL("Adding new reports to HepC registry...")
  1. D RPT
  1. D BMES^XPDUTL("Checking VA GENERIC drug file...")
  1. D GENDRG
  1. Q
  1. ;******************************************************************************
  1. ;Add new ICD9 entry/group "PTSD" to the PARAMETERS file #8989.5
  1. ;ADD^XPAR(entity,parameter[,instance],value[,.error])
  1. ;DBIA 2263
  1. ;******************************************************************************
  1. PTSD ;
  1. N RORVALUE,RORERR,RORENTITY,RORPARAMETER,RORINSTANCE
  1. S RORENTITY="PKG.CLINICAL CASE REGISTRIES"
  1. S RORPARAMETER="ROR REPORT PARAMS TEMPLATE"
  1. S RORINSTANCE="13::PTSD"
  1. ;delete it first (in case it already exists)
  1. D DEL^XPAR(RORENTITY,RORPARAMETER,RORINSTANCE,.RORERR)
  1. S RORVALUE="CCR Predefined Report Template"
  1. S RORVALUE(1,0)="<?xml version="_"""1.0"""_" encoding="_"""UTF-8"""_"?>"
  1. S RORVALUE(2,0)="<PARAMS>"
  1. S RORVALUE(3,0)="<ICD9LST>"
  1. S RORVALUE(4,0)="<GROUP ID="_"""PTSD"""_">"
  1. S RORVALUE(5,0)="<ICD9 ID="_"""309.81"""_">POSTTRAUMATIC STRESS DIS</ICD9>"
  1. S RORVALUE(6,0)="</GROUP>"
  1. S RORVALUE(7,0)="</ICD9LST>"
  1. S RORVALUE(8,0)="<PANELS>"
  1. S RORVALUE(9,0)="<PANEL ID="_"""160"""_"/>"
  1. S RORVALUE(10,0)="</PANELS>"
  1. S RORVALUE(11,0)="</PARAMS>"
  1. ;add it
  1. D ADD^XPAR(RORENTITY,RORPARAMETER,RORINSTANCE,.RORVALUE,.RORERR)
  1. Q
  1. ;
  1. ;
  1. ;******************************************************************************
  1. ;Add reports 21-22 to the list of available reports for the VA HEPC entry in the
  1. ; ROR REGISTRY PARAMETERS file. Field #27: AVAILABLE REPORTS
  1. ;******************************************************************************
  1. RPT ;
  1. N REGNAME,REGIEN,RORERR,RORDATA,OLDLIST,NEWLIST S REGNAME="VA HEPC"
  1. S REGIEN=$O(^ROR(798.1,"B",REGNAME,0))
  1. Q:$G(REGIEN)=""
  1. K RORDATA,RORERR D GETS^DIQ(798.1,REGIEN_",",27,"I","RORDATA","RORERR")
  1. Q:$D(RORERR("DIERR"))
  1. S OLDLIST=$G(RORDATA(798.1,REGIEN_",",27,"I"))
  1. Q:$G(OLDLIST)=""
  1. I OLDLIST[",18,19,20,21,22" Q
  1. ;update AVAILABLE REPORTS with the 3 additional reports
  1. S NEWLIST=OLDLIST_",18,19,20,21,22"
  1. N FLAG,FDA,IENS,FIELD S IENS=REGIEN_",",FIELD=27,FLAG="E"
  1. S FDA(798.1,IENS,FIELD)=NEWLIST
  1. K RORERR D FILE^DIE(FLAG,"FDA","RORERR")
  1. D CLEAN^DILF
  1. Q
  1. ;
  1. ;*******************************************************************
  1. ;
  1. ;Delete entry in ROR GENERIC DRUG with unresolved pointers
  1. ;
  1. ;********************************************************************
  1. ;clean up 799.51 if pointers are bad
  1. GENDRG ;
  1. N DIC,X,DIK,DA,RORNAME,Y
  1. S DIC=799.51,DIC(0)="MNZ"
  1. F RORNAME="EMTRICI./RILPIVIRINE/TENOFOVIR" D
  1. .S X=RORNAME D ^DIC Q:+Y<0
  1. .Q:+$P(Y(0),U,4)>0
  1. .S DA=+Y,DIK="^ROR(799.51," D ^DIK
  1. .D BMES^XPDUTL("WARNING*** Missing entry in VA GENERIC file.")
  1. Q