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

BQI24POS.m

Go to the documentation of this file.
BQI24POS ;GDIT/HS/ALA-Post Installation program ; 20 Aug 2012  4:20 PM
 ;;2.4;ICARE MANAGEMENT SYSTEM;;Apr 01, 2015;Build 41
 ;
 ;
EN ;
 ;Set the version number
 NEW DA
 S DA=$O(^BQI(90508,0))
 S BQIUPD(90508,DA_",",.08)="2.4.0.11"
 S BQIUPD(90508,DA_",",.09)="2.4.0.11"
 D FILE^DIE("","BQIUPD","ERROR")
 K BQIUPD
 ;
 ; Set BTPWRPC and BUSARPC into BQIRPC
 NEW IEN,DA,X,DIC,Y
 S DA(1)=$$FIND1^DIC(19,"","B","BQIRPC","","","ERROR"),DIC="^DIC(19,"_DA(1)_",10,",DIC(0)="LMNZ"
 I $G(^DIC(19,DA(1),10,0))="" S ^DIC(19,DA(1),10,0)="^19.01IP^^"
 S X="BTPWRPC"
 D ^DIC I +Y<1 K DO,DD D FILE^DICN
 NEW IEN,DA,X,DIC,Y
 S DA(1)=$$FIND1^DIC(19,"","B","BQIRPC","","","ERROR"),DIC="^DIC(19,"_DA(1)_",10,",DIC(0)="LMNZ"
 I $G(^DIC(19,DA(1),10,0))="" S ^DIC(19,DA(1),10,0)="^19.01IP^^"
 S X="BUSARPC"
 D ^DIC I +Y<1 K DO,DD D FILE^DICN
 ;
 ; Update treatment prompts in APCHSURV
 D ^BQITRUPD
 ;
 ; Update taxonomies
 D ^BQIY,^BQIXV,^BQIAX
 ;
 ; Update IPC
 D ^BQIIPC5
 ;
 ; Update layout items
 D ^BQILYUPD
 ;
 ; Update panel descriptions
 NEW NDZ,PN
 I $D(^BQICARE(.5)) K ^BQICARE(.5)
 S NDZ=0
 F  S NDZ=$O(^BQICARE(NDZ)) Q:'NDZ  D
 . S PN=0
 . F  S PN=$O(^BQICARE(NDZ,1,PN)) Q:'PN  D
 .. NEW OWNR,PLIEN
 .. S OWNR=NDZ,PLIEN=PN
 .. D DSC^BQIPLFL
 ;
GLS ;EP Update glossary
 NEW GN,GNM,GSN,BQIUPD
 S GN=0
 F  S GN=$O(^BQI(90509.9,GN)) Q:'GN  D
 . S GNM=$P(^BQI(90509.9,GN,0),U,1)
 . S GSN=$O(^BQI(90508.2,"B",GNM,"")) Q:GSN=""
 . S BQIUPD(90508.2,GSN_",",1)="@"
 . D FILE^DIE("","BQIUPD","ERROR")
 . M ^BQI(90508.2,GSN,1)=^BQI(90509.9,GN,1)
 ;
 ;Repoint taxonomies in 90507.8
 NEW ALRT,TXN,TAX,ATXN,TYP
 S ALRT=0
 F  S ALRT=$O(^BQI(90507.8,ALRT)) Q:'ALRT  D
 . S TXN=0
 . F  S TXN=$O(^BQI(90507.8,ALRT,11,TXN)) Q:'TXN  D
 .. S TAX=$P(^BQI(90507.8,ALRT,11,TXN,0),U,1),TYP=$P(^(0),U,5)
 .. I TYP'=5 D
 ... S ATXN=$O(^ATXAX("B",TAX,""))
 ... I ATXN'="" S $P(^BQI(90507.8,ALRT,11,TXN,0),U,2)=ATXN_";ATXAX("
 .. I TYP=5 D
 ... S ATXN=$O(^ATXLAB("B",TAX,""))
 ... I ATXN'="" S $P(^BQI(90507.8,ALRT,11,TXN,0),U,2)=ATXN_";ATXLAB(" Q
 ... S ATXN=$O(^ATXAX("B",TAX,""))
 ... S $P(^BQI(90507.8,ALRT,11,TXN,0),U,2)=ATXN_";ATXAX("
 ;
 ;Repoint taxonomies in 90507
 NEW RGN,TXN,TAX,VALUE,ATXN,GLO,RPN
 S RGN=0
 F  S RGN=$O(^BQI(90507,RGN)) Q:'RGN  D
 . S TXN=0
 . F  S TXN=$O(^BQI(90507,RGN,10,TXN)) Q:'TXN  D
 .. S TAX=$P(^BQI(90507,RGN,10,TXN,0),U,1),VALUE=$P(^(0),U,2)
 .. I VALUE["ATXAX" S ATXN=$O(^ATXAX("B",TAX,"")),GLO=";ATXAX("
 .. I VALUE["ATXLAB" S ATXN=$O(^ATXLAB("B",TAX,"")),GLO=";ATXLAB("
 .. I ATXN="" Q
 .. S $P(^BQI(90507,RGN,10,TXN,0),U,2)=ATXN_GLO
 . S RPN=0
 . F  S RPN=$O(^BQI(90507,RGN,20,RPN)) Q:'RPN  D
 .. S TXN=0
 .. F  S TXN=$O(^BQI(90507,RGN,20,RPN,10,TXN)) Q:'TXN  D
 ... S TAX=$P(^BQI(90507,RGN,20,RPN,10,TXN,0),U,1),VALUE=$P(^(0),U,2)
 ... I VALUE["ATXAX" S ATXN=$O(^ATXAX("B",TAX,"")),GLO=";ATXAX("
 ... I VALUE["ATXLAB" S ATXN=$O(^ATXLAB("B",TAX,"")),GLO=";ATXLAB("
 ... I ATXN="" Q
 ... S $P(^BQI(90507,RGN,20,RPN,10,TXN,0),U,2)=ATXN_GLO
 ;
 ;Repoint taxonomies in 90508
 NEW BQIDA,TXN,TAX,VALUE,ATXN,GLO
 S BQIDA=1,TXN=0
 F  S TXN=$O(^BQI(90508,BQIDA,10,TXN)) Q:'TXN  D
 . S TAX=$P(^BQI(90508,BQIDA,10,TXN,0),U,1),TYP=$P(^(0),U,3)
 . I TYP'=5 D
 .. S ATXN=$O(^ATXAX("B",TAX,""))
 .. I ATXN'="" S $P(^BQI(90508,BQIDA,10,TXN,0),U,2)=ATXN_";ATXAX("
 . I TYP=5 D
 .. S ATXN=$O(^ATXLAB("B",TAX,""))
 .. I ATXN'="" S $P(^BQI(90508,BQIDA,10,TXN,0),U,2)=ATXN_";ATXLAB(" Q
 .. S ATXN=$O(^ATXAX("B",TAX,""))
 .. S $P(^BQI(90508,BQIDA,10,TXN,0),U,2)=ATXN_";ATXAX("
 ;
LTAX ;EP  Add Lab Taxonomies to ^ATXLAB
 NEW X,DIC,DLAYGO,DA,DR,DIE,Y,LTAX,D0,DINUM,TAXX,ATXN
 S DIC="^ATXLAB(",DIC(0)="L",DLAYGO=9002228
 ; Loop through the Taxonomies
 D LDLAB(.LTAX)
 F BJ=1:1 Q:'$D(LTAX(BJ))  S X=LTAX(BJ) D
 . I $D(^ATXLAB("B",X)) Q  ; Skip pre-existing Lab taxonomies
 . D ^DIC S DA=+Y
 . I DA<1 Q
 . S BQTXUP(9002228,DA_",",.02)=$P(X," ",2,999)
 . S BQTXUP(9002228,DA_",",.05)=DUZ
 . S BQTXUP(9002228,DA_",",.06)=DT
 . S BQTXUP(9002228,DA_",",.09)=60
 . D FILE^DIE("I","BQTXUP")
 . S BQTXUP(9002228,DA_",",.08)="B"
 . D FILE^DIE("E","BQTXUP")
 ;
 F BJ=1:1 Q:'$D(LTAX(BJ))  S TAXX=LTAX(BJ) D
 . S TXN=$O(^BQI(90508,BQIDA,10,"B",TAXX,"")) I TXN'="" Q
 . NEW DA,DIC,DLAYGO,IENS
 . S DA(1)=BQIDA,DIC(0)="L",DLAYGO=90508.03,DIC="^BQI(90508,"_DA(1)_",10,",X=TAXX
 . D ^DIC
 . S DA=+Y I DA=-1 Q
 . S IENS=$$IENS^DILF(.DA)
 . S BQIUPD(90508.03,IENS,.03)=5,BQIUPD(90508.03,IENS,.04)="Y",BQIUPD(90508.03,IENS,.05)="T"
 . D FILE^DIE("","BQIUPD","ERROR")
 . S ATXN=$O(^ATXLAB("B",TAXX,""))
 . I ATXN'="" S $P(^BQI(90508,DA(1),10,DA,0),U,2)=ATXN_";ATXLAB(" Q
 K DA,BJ,BQTXUP,DIC,DLAYGO,DINUM,D0,DR,X,Y
 ;
 Q
 ;
LDLAB(ARRAY) ;EP;Load site-populated Lab tests
 NEW I,TEXT
 F I=1:1 S TEXT=$P($T(LAB+I),";;",2) Q:TEXT=""  S ARRAY(I)=TEXT
 Q
 ;
LAB ;EP;LAB TESTS (SITE-POPULATED)
 ;;BQI PRENATAL TAX
 ;;BQI C.TRACH DNA QUANT TAX
 ;;BQI C.TRACH NON-SPECIFIC TAX
 ;;BQI C.TRACH SPECIFIC TAX
 ;;BQI HEP A TESTS TAX
 ;;BQI HEP B CORE TESTS TAX
 ;;BQI HEP B QUAL TEST TAX
 ;;BQI HEP B QUANT TEST TAX
 ;;BQI HEP C QUAL TEST TAX
 ;;BQI HEP C QUANT TEST TAX
 ;;BQI HIB CULTURE TEST TAX
 ;;BQI HIB QUAL TEST TAX
 ;;BQI HIB QUANT TEST TAX
 ;;BQI HIV AB QUAL SCREEN TAX
 ;;BQI HIV AB QUANT SCREEN TAX
 ;;BQI HIV ID SPEC CONFIRM TAX
 ;;BQI HIV QUAL ANTIGEN TAX
 ;;BQI HIV QUAL CONFIRM TAX
 ;;BQI HIV QUAL NUC ACID TAX
 ;;BQI HIV QUANT ANTIGEN TAX
 ;;BQI HIV QUANT CONFIRM TAX
 ;;BQI HIV QUANT NUC ACID TAX
 ;;BQI HIV VIROLOGIC TEST TAX
 ;;BQI MEASLES ID SPEC TEST TAX
 ;;BQI MEASLES QUAL TEST TAX
 ;;BQI MEASLES QUAN TEST TAX
 ;;BQI MENINGITIS GRAM STAIN TAX
 ;;BQI MENINGITIS ID SPEC TAX
 ;;BQI MENINGITIS QUAL TEST TAX
 ;;BQI MENINGITIS QUAN TAX
 ;;BQI MYCOBACT TB CULT TAX
 ;;BQI PPD DIAMETER TAX
 ;;BQI S PNEUM CULTURE TEST TAX
 ;;BQI S PNEUM SUSCEPT TEST TAX
 ;;BQI SYPHILIS REAGIN TEST TAX
 ;;BQI SYPHILIS TP-AB TEST TAX
 ;;BQI TB GAMMA REL QUAL TEST TAX
 ;;BQI TB GAMMA REL QUANT TEST TX
 ;;BQI TB NONSPEC AFB TEST TAX
 ;;BQI TB RNA DNA QUAL TEST TAX
 ;;BQI TB RNA DNA QUANT TEST TAX
 ;;BQI TB SPECIFIC AFB TEST TAX
 ;;BGP GPRA ESTIMATED GFR TAX
 ;;BKM CMV TEST TAX
 ;;BKM COCCI ANTIBODY TAX
 ;;BKM FTA-ABS TEST TAX
 ;;BKM GONORRHEA TEST TAX
 ;;BKM HEP A TAX
 ;;BKM HEP B TAX
 ;;BKM HEP C CONFIRMATORY TAX
 ;;BKM HEP C SCREENING TAX
 ;;BKM HEPATITIS PANEL TAX
 ;;BKM PPD TAX
 ;;BKM RPR TAX
 ;;BKM TOXOPLASMOSIS TESTS TAX
 ;;BKMV CD4 ABS TESTS TAX
 ;;BKMV HIV GENOTYPE TESTS TAX
 ;;BKMV HIV PHENOTYPE TESTS TAX
 ;;BTPW HPV DNA SCREEN TAX
 ;;BTPW PREGNANCY TEST TAX
 ;
 Q