BGOIN013 ; IHS/MSC/PLS - BGO*1.1*13 ;11-Sep-2014 14:35;PLS
;;1.1;BGO COMPONENTS;**13**;Mar 20, 2007
EC Q
; Preinit
PRE ;
Q
; Postinit
POST ;
; Clean up menu items
;D CLNMNU
; Register RPCs
D REGNMSP^CIAURPC("BGO","CIAV VUECENTRIC")
; Update BGO component versions
N VER,FDA,PID,IEN,X
D BMES^XPDUTL("Updating version numbers...")
F VER=0:1 S X=$P($T(VER+VER),";;",2) Q:'$L(X) D
.S PID=$$PRGID^CIAVMCFG($P(X,";"))
.S:PID FDA(19930.2,PID_",",2)=$P(X,";",2),FDA(19930.2,PID_",",7)=$P(X,";",3)
D:$D(FDA) FILE^DIE(,"FDA")
D UPDCHM
D PARS
;D PICK
D DISABLED("IHSBGOICDPICKLIST.ICDPICKLIST",1)
D DISABLED("IHSBGOPROBLEM.BGOPROBLEM",1)
Q
;
UPDCHM ;EP-
N CHM,PID
F CHM=0:1 S X=$P($T(CHM+CHM),";;",2) Q:'$L(X) D
.S PID=$$PRGID^CIAVMCFG($P(X,";"))
.D AECHM(PID,$P(X,";",2,99))
W !!
Q
PARS ;Store system levels of new parameter
D EN^XPAR("SYS","BGO PROBLEM EDUCATION",1,"DISEASE PROCESS")
D EN^XPAR("SYS","BGO PROBLEM EDUCATION",2,"NUTRITION")
D EN^XPAR("SYS","BGO PROBLEM EDUCATION",3,"EXERCISE")
D EN^XPAR("SYS","BGO PROBLEM EDUCATION",4,"LIFESTYLE ADAPTATION")
D EN^XPAR("SYS","BGO PROBLEM EDUCATION",5,"MEDICATIONS")
D EN^XPAR("SYS","BGO PROBLEM EDUCATION",6,"PREVENTION")
Q
; Set DISABLED field of OBJ to VAL
DISABLED(OBJ,VAL) ;
N PID,FDA
S VAL=$G(VAL,0)
S PID=$$PRGID^CIAVMCFG($G(OBJ))
Q:'PID
S FDA(19930.2,PID_",",13)=VAL
D FILE^DIE(,"FDA")
Q
PICK ;Install the national pick lists
D UPDATE^BGOSNLK
Q
N LP,NAME,SNO,BSTS,RET
F LP=0:1 S NAME=$P($T(LIST+LP),";;",2) Q:'$L(NAME) D
.S BSTS=$P(NAME,"^",1)
.S SNO=$P(NAME,"^",2)
.D IMPORT^BGOSNLK(.RET,BSTS,SNO)
Q
;National pick lists
LIST ;;PICK ABNORMAL FINDINGS^ABNORMAL FINDINGS
;;PICK CQM Problems^CQM PROBLEMS
;;PICK Case Management^CASE MANAGEMENT
;;PICK Diabetic Retinopathy^DIABETIC RETINOPATHY
;;PICK Eye General^EYE GENERAL
;;PICK Immunizations^IMMUNIZATIONS
;;PICK NIST Problems^NIST PROBLEMS
;;PICK Nutrition^NUTRITION
;;PICK Prenatal - Care^PRENATAL CARE
;;PICK Prenatal - Problem Fetus^PRENATAL PROBLEM FETUS
;;PICK Prenatal - Problem Pregnancy^PRENATAL PROBLEM PREGNANCY
;;PICK Prenatal - Risk^PRENATAL RISK
;;PICK Public Health Nursing^PUBLIC HEALTH NURSING
;;PICK Womens Health^WOMENS HEALTH
;;
AECHM(PID,VAL) ;EP-
N LN,FN,IDX,TXT,ARY,CNT,IENS
S FN=$P(VAL,";"),CNT=0
S LN=0 F S LN=$O(^CIAVOBJ(19930.2,PID,6,LN)) Q:'LN D Q:$G(IDX)
.S TXT=^CIAVOBJ(19930.2,PID,6,LN,0)
.S ARY(LN,0)=TXT,CNT=CNT+1
.I $$UP^XLFSTR(TXT)[$$UP^XLFSTR($P(VAL,";")) S IDX=LN
I $G(IDX) D
.S ^CIAVOBJ(19930.2,PID,6,IDX,0)=VAL
E D
.S ARY($S('CNT:1,1:CNT+1),0)=VAL
.S IENS=PID_","
.S FDA(19930.2,IENS,10)="ARY"
.D FILE^DIE(,"FDA")
Q
;
CLNMNU ;
; Remove option from menu
N OPTION,MENU,DA,DIK,PAR,ERR,X
S (OPTION,MENU)=""
S OPTION="BGO IMM STOP ADDING CPT CODES"
S MENU="BGOIMM MAIN"
S X=$$DELETE^XPDMENU(MENU,OPTION)
Q:'+X
;Inactivate the option
D OUT^XPDMENU(OPTION,"No longer used")
;Clean out the parameter
S PAR=""
S PAR=$O(^XTV(8989.51,"B","BGO IMM STOP ADDING CPT CODES",PAR))
Q:'+PAR
S ERR=0
D NDEL^XPAR("USR",PAR,.ERR)
Q:ERR>0
D NDEL^XPAR("DIV",PAR,.ERR)
Q:ERR>0
D NDEL^XPAR("PKG",PAR,.ERR)
Q:ERR>0
;Delete the parameter
S DA=PAR,DIK="^XTV(8989.51," D ^DIK
Q
VER ;;IHSBGOVPOV.BGOVPOV;1.2.0.51;D9DE38C51ADD00906ED4A712C37C6B7E
;;IHSBGOPOVHISTORY.BGOPOVHISTORY;1.2.0.50;ABC8135B600B4ABA79D43ED52D334E99
;;IHSBGOFAMHX.BGOFAMHX;1.0.0.684;5286CC5DD0E9438CCA152B03BC08931D
;;IHSBGOINFANTFEED.IHSBGOINFANTFEEDCTRL;1.2.0.218;0C13F7AFF3AA9DF355B7AAF53280CCA2
;;IHSBGOIMMUNIZATION.BGOIMM;1.2.0.193;3DE766E5F0BA0C0F5B696285CBDF6F6E
;;IHSBGOEXAMS.BGOEXAMS;1.1.0.376;8059564758DA048EB15715A453B0C411
;;IHSBGOPATIENTED.BGOPATED;1.2.0.256;A746A8DD1A439F55AD6C4AF4BA7E46F0
;;BEHANTICOAG.BEHANTICOAG;1.1.4955.23154;071A4D6C7FCADB2166DEE2EAFD928474
;;IHSBGOSKINTEST.IHSBGOSK;1.2.0.140;2A7B0F7D878074DFB2FE5E414DA2E5FB
;;IHSBGOREPHISTORY.IHSBGOREPHISTCTRL;1.2.0.83;F3B8149F2CF2D056A44FC8A37D0569FA
;;IHSBGOVCPT.BGOVCPT;1.2.0.73;1C2C9E56C07F298C2B6D90FF90FEAF18
;;
CHM ;;IHSBGOEXAMS.BGOEXAMS;IhsBgoExams.chm;2014.4.9.143926;98722792DA449372E772F61E41F21972
;;IHSBGOSKINTEST.IHSBGOSK;IhsBgoSkinTest.chm;2013.8.13.150038;9C6915D22D846B9BF2D1F9EE33BAEB6B
;;IHSBGOINFANTFEED.IHSBGOINFANTFEEDCTRL;IhsBgoInfantFeed.chm;2013.8.16.121312;D85018E3711D36CB8B3B849AB670D2B0
;;IHSBGOIMMUNIZATION.BGOIMM;IhsBgoImmunization.chm;2014.3.27.132512;C16E2A7498B2F5B3152E95AD7E8FEE32
;;IHSBGOFAMHX.BGOFAMHX;IhsBgoFamHX.chm;2014.4.9.170406;A46A9C25CDC09FA30BDB8BE6E0396D1F
;;IHSBGOPOVHISTORY.BGOPOVHISTORY;IhsBgoPovHistory.chm;2014.3.19.154200;A013DE7A0E5577167B9869406134322C
;;IHSBGOVPOV.BGOVPOV;IhsBgoVPOV.chm;2014.3.19.142500;70A656C7B585E0731B95E1174BD4DEF1
;;IHSBGOREPHISTORY.IHSBGOREPHISTCTRL;IhsBgoRepHist.chm;2013.9.12.121402;81E2B2A162A366C83D9A557F18F116E5
;;IHSBGOPATIENTED.BGOPATED;IhsBgoPatientEd.chm;2014.3.27.153232;3B5C5BFC9B512C6A3352D7FA637FBA0D
;;IHSBGOHEALTHFACTORS.BGOHF;IhsBgoHealthFactors.chm;2014.1.27.164100;3C7A459C207B5E24CE0D7C23AF2F44F0
;;
BGOIN013 ; IHS/MSC/PLS - BGO*1.1*13 ;11-Sep-2014 14:35;PLS
+1 ;;1.1;BGO COMPONENTS;**13**;Mar 20, 2007
EC QUIT
+1 ; Preinit
PRE ;
+1 QUIT
+2 ; Postinit
POST ;
+1 ; Clean up menu items
+2 ;D CLNMNU
+3 ; Register RPCs
+4 DO REGNMSP^CIAURPC("BGO","CIAV VUECENTRIC")
+5 ; Update BGO component versions
+6 NEW VER,FDA,PID,IEN,X
+7 DO BMES^XPDUTL("Updating version numbers...")
+8 FOR VER=0:1
SET X=$PIECE($TEXT(VER+VER),";;",2)
IF '$LENGTH(X)
QUIT
Begin DoDot:1
+9 SET PID=$$PRGID^CIAVMCFG($PIECE(X,";"))
+10 IF PID
SET FDA(19930.2,PID_",",2)=$PIECE(X,";",2)
SET FDA(19930.2,PID_",",7)=$PIECE(X,";",3)
End DoDot:1
+11 IF $DATA(FDA)
DO FILE^DIE(,"FDA")
+12 DO UPDCHM
+13 DO PARS
+14 ;D PICK
+15 DO DISABLED("IHSBGOICDPICKLIST.ICDPICKLIST",1)
+16 DO DISABLED("IHSBGOPROBLEM.BGOPROBLEM",1)
+17 QUIT
+18 ;
UPDCHM ;EP-
+1 NEW CHM,PID
+2 FOR CHM=0:1
SET X=$PIECE($TEXT(CHM+CHM),";;",2)
IF '$LENGTH(X)
QUIT
Begin DoDot:1
+3 SET PID=$$PRGID^CIAVMCFG($PIECE(X,";"))
+4 DO AECHM(PID,$PIECE(X,";",2,99))
End DoDot:1
+5 WRITE !!
+6 QUIT
PARS ;Store system levels of new parameter
+1 DO EN^XPAR("SYS","BGO PROBLEM EDUCATION",1,"DISEASE PROCESS")
+2 DO EN^XPAR("SYS","BGO PROBLEM EDUCATION",2,"NUTRITION")
+3 DO EN^XPAR("SYS","BGO PROBLEM EDUCATION",3,"EXERCISE")
+4 DO EN^XPAR("SYS","BGO PROBLEM EDUCATION",4,"LIFESTYLE ADAPTATION")
+5 DO EN^XPAR("SYS","BGO PROBLEM EDUCATION",5,"MEDICATIONS")
+6 DO EN^XPAR("SYS","BGO PROBLEM EDUCATION",6,"PREVENTION")
+7 QUIT
+8 ; Set DISABLED field of OBJ to VAL
DISABLED(OBJ,VAL) ;
+1 NEW PID,FDA
+2 SET VAL=$GET(VAL,0)
+3 SET PID=$$PRGID^CIAVMCFG($GET(OBJ))
+4 IF 'PID
QUIT
+5 SET FDA(19930.2,PID_",",13)=VAL
+6 DO FILE^DIE(,"FDA")
+7 QUIT
PICK ;Install the national pick lists
+1 DO UPDATE^BGOSNLK
+2 QUIT
+3 NEW LP,NAME,SNO,BSTS,RET
+4 FOR LP=0:1
SET NAME=$PIECE($TEXT(LIST+LP),";;",2)
IF '$LENGTH(NAME)
QUIT
Begin DoDot:1
+5 SET BSTS=$PIECE(NAME,"^",1)
+6 SET SNO=$PIECE(NAME,"^",2)
+7 DO IMPORT^BGOSNLK(.RET,BSTS,SNO)
End DoDot:1
+8 QUIT
+9 ;National pick lists
LIST ;;PICK ABNORMAL FINDINGS^ABNORMAL FINDINGS
+1 ;;PICK CQM Problems^CQM PROBLEMS
+2 ;;PICK Case Management^CASE MANAGEMENT
+3 ;;PICK Diabetic Retinopathy^DIABETIC RETINOPATHY
+4 ;;PICK Eye General^EYE GENERAL
+5 ;;PICK Immunizations^IMMUNIZATIONS
+6 ;;PICK NIST Problems^NIST PROBLEMS
+7 ;;PICK Nutrition^NUTRITION
+8 ;;PICK Prenatal - Care^PRENATAL CARE
+9 ;;PICK Prenatal - Problem Fetus^PRENATAL PROBLEM FETUS
+10 ;;PICK Prenatal - Problem Pregnancy^PRENATAL PROBLEM PREGNANCY
+11 ;;PICK Prenatal - Risk^PRENATAL RISK
+12 ;;PICK Public Health Nursing^PUBLIC HEALTH NURSING
+13 ;;PICK Womens Health^WOMENS HEALTH
+14 ;;
AECHM(PID,VAL) ;EP-
+1 NEW LN,FN,IDX,TXT,ARY,CNT,IENS
+2 SET FN=$PIECE(VAL,";")
SET CNT=0
+3 SET LN=0
FOR
SET LN=$ORDER(^CIAVOBJ(19930.2,PID,6,LN))
IF 'LN
QUIT
Begin DoDot:1
+4 SET TXT=^CIAVOBJ(19930.2,PID,6,LN,0)
+5 SET ARY(LN,0)=TXT
SET CNT=CNT+1
+6 IF $$UP^XLFSTR(TXT)[$$UP^XLFSTR($PIECE(VAL,";"))
SET IDX=LN
End DoDot:1
IF $GET(IDX)
QUIT
+7 IF $GET(IDX)
Begin DoDot:1
+8 SET ^CIAVOBJ(19930.2,PID,6,IDX,0)=VAL
End DoDot:1
+9 IF '$TEST
Begin DoDot:1
+10 SET ARY($SELECT('CNT:1,1:CNT+1),0)=VAL
+11 SET IENS=PID_","
+12 SET FDA(19930.2,IENS,10)="ARY"
+13 DO FILE^DIE(,"FDA")
End DoDot:1
+14 QUIT
+15 ;
CLNMNU ;
+1 ; Remove option from menu
+2 NEW OPTION,MENU,DA,DIK,PAR,ERR,X
+3 SET (OPTION,MENU)=""
+4 SET OPTION="BGO IMM STOP ADDING CPT CODES"
+5 SET MENU="BGOIMM MAIN"
+6 SET X=$$DELETE^XPDMENU(MENU,OPTION)
+7 IF '+X
QUIT
+8 ;Inactivate the option
+9 DO OUT^XPDMENU(OPTION,"No longer used")
+10 ;Clean out the parameter
+11 SET PAR=""
+12 SET PAR=$ORDER(^XTV(8989.51,"B","BGO IMM STOP ADDING CPT CODES",PAR))
+13 IF '+PAR
QUIT
+14 SET ERR=0
+15 DO NDEL^XPAR("USR",PAR,.ERR)
+16 IF ERR>0
QUIT
+17 DO NDEL^XPAR("DIV",PAR,.ERR)
+18 IF ERR>0
QUIT
+19 DO NDEL^XPAR("PKG",PAR,.ERR)
+20 IF ERR>0
QUIT
+21 ;Delete the parameter
+22 SET DA=PAR
SET DIK="^XTV(8989.51,"
DO ^DIK
+23 QUIT
VER ;;IHSBGOVPOV.BGOVPOV;1.2.0.51;D9DE38C51ADD00906ED4A712C37C6B7E
+1 ;;IHSBGOPOVHISTORY.BGOPOVHISTORY;1.2.0.50;ABC8135B600B4ABA79D43ED52D334E99
+2 ;;IHSBGOFAMHX.BGOFAMHX;1.0.0.684;5286CC5DD0E9438CCA152B03BC08931D
+3 ;;IHSBGOINFANTFEED.IHSBGOINFANTFEEDCTRL;1.2.0.218;0C13F7AFF3AA9DF355B7AAF53280CCA2
+4 ;;IHSBGOIMMUNIZATION.BGOIMM;1.2.0.193;3DE766E5F0BA0C0F5B696285CBDF6F6E
+5 ;;IHSBGOEXAMS.BGOEXAMS;1.1.0.376;8059564758DA048EB15715A453B0C411
+6 ;;IHSBGOPATIENTED.BGOPATED;1.2.0.256;A746A8DD1A439F55AD6C4AF4BA7E46F0
+7 ;;BEHANTICOAG.BEHANTICOAG;1.1.4955.23154;071A4D6C7FCADB2166DEE2EAFD928474
+8 ;;IHSBGOSKINTEST.IHSBGOSK;1.2.0.140;2A7B0F7D878074DFB2FE5E414DA2E5FB
+9 ;;IHSBGOREPHISTORY.IHSBGOREPHISTCTRL;1.2.0.83;F3B8149F2CF2D056A44FC8A37D0569FA
+10 ;;IHSBGOVCPT.BGOVCPT;1.2.0.73;1C2C9E56C07F298C2B6D90FF90FEAF18
+11 ;;
CHM ;;IHSBGOEXAMS.BGOEXAMS;IhsBgoExams.chm;2014.4.9.143926;98722792DA449372E772F61E41F21972
+1 ;;IHSBGOSKINTEST.IHSBGOSK;IhsBgoSkinTest.chm;2013.8.13.150038;9C6915D22D846B9BF2D1F9EE33BAEB6B
+2 ;;IHSBGOINFANTFEED.IHSBGOINFANTFEEDCTRL;IhsBgoInfantFeed.chm;2013.8.16.121312;D85018E3711D36CB8B3B849AB670D2B0
+3 ;;IHSBGOIMMUNIZATION.BGOIMM;IhsBgoImmunization.chm;2014.3.27.132512;C16E2A7498B2F5B3152E95AD7E8FEE32
+4 ;;IHSBGOFAMHX.BGOFAMHX;IhsBgoFamHX.chm;2014.4.9.170406;A46A9C25CDC09FA30BDB8BE6E0396D1F
+5 ;;IHSBGOPOVHISTORY.BGOPOVHISTORY;IhsBgoPovHistory.chm;2014.3.19.154200;A013DE7A0E5577167B9869406134322C
+6 ;;IHSBGOVPOV.BGOVPOV;IhsBgoVPOV.chm;2014.3.19.142500;70A656C7B585E0731B95E1174BD4DEF1
+7 ;;IHSBGOREPHISTORY.IHSBGOREPHISTCTRL;IhsBgoRepHist.chm;2013.9.12.121402;81E2B2A162A366C83D9A557F18F116E5
+8 ;;IHSBGOPATIENTED.BGOPATED;IhsBgoPatientEd.chm;2014.3.27.153232;3B5C5BFC9B512C6A3352D7FA637FBA0D
+9 ;;IHSBGOHEALTHFACTORS.BGOHF;IhsBgoHealthFactors.chm;2014.1.27.164100;3C7A459C207B5E24CE0D7C23AF2F44F0
+10 ;;