BGOIN011 ; IHS/MSC/PLS - BGO*1.1*11 ;09-Apr-2013 21:33;DKM
;;1.1;BGO COMPONENTS;**11**;Mar 20, 2007
EC Q
; Preinit
PRE ;
N USES,FDA,PID,IEN,X,MSOCX
S MSOCX=$$FIND1^DIC(19930.2,,,"FILE:MSCOMCT2.OCX")
Q:'MSOCX
S FDA(19930.2,MSOCX_",",13)=1
F USES=0:1 S X=$P($T(USES+USES),";;",2) Q:'$L(X) D
.S PID=$$PRGID^CIAVMCFG($P(X,";"))
.D:PID
..; Find IEN of entry in USES multiple
..S IEN=$O(^CIAVOBJ(19930.2,PID,9,"B",MSOCX,0)) Q:'IEN D
...S FDA(19930.221,IEN_","_PID_",",.01)="@"
D:$D(FDA) FILE^DIE(,"FDA")
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
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
;
UPDCHM ;EP-
N CHM,PID,C
S C=1
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
;
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(CNT+1,0)=VAL
.S IENS=PID_","
.S FDA(19930.2,IENS,10)="ARY"
.D FILE^DIE(,"FDA")
Q
;
VER ;;IHSBGOPATIENTED.BGOPATED;1.2.0.206;DE57D6308C04609C974F21632CDE4504
;;IHSBGOHEALTHFACTORS.BGOHF;1.2.0.5;B10B281D348B61E5176A086767D935FD
;;IHSBGOEXAMS.BGOEXAMS;1.1.0.361;BA9B9CA3BF126F0A6316E8B46F82766E
;;IHSBGOIMMUNIZATION.BGOIMM;1.2.0.133;789E19E30B71E17E03A1C3EC904A3A4F
;;IHSBGOSKINTEST.IHSBGOSK;1.2.0.119;BC59D745C20BDE054D27C9F4F6663BD5
;;IHSBGOREPHISTORY.IHSBGOREPHISTCTRL;1.2.0.56;73475BCE102DB619D6D9F5FB2F43BB2B
;;IHSBGOVPOV.BGOVPOV;1.2.0.33;E601C4EA046F062A5FEEE4B09325F951
;;IHSBGOVCPT.BGOVCPT;1.2.0.66;9E9F2A292F3CE43813BFD5DC111CB026
;;IHSBGOPROCEDURESVIEWER.BGOPROCVIEW;1.2.0.94;6D695B0E35395736A22F6DADCA8E44ED
;;IHSBGOASTHMAZONES.BGOASTHMAZONES;1.1.0.9;91AE18B30EDA5F86ADC7308A378F158B
;;IHSBGOREPFACTORS.IHSBGOREPFACTORSCTRL;1.2.0.183;106F23EF0D07BAF24E9CAAC61A2B32A8
;;
USES ;;IHSBGOIMMUNIZATION.BGOIMM
;;IHSBGOREPHISTORY.IHSBGOREPHISTCTRL
;;IHSBGOVCPT.BGOVCPT
;;IHSBGOFAMHX.BGOFAMHX
;;IHSBGOPROBLEM.BGOPROBLEM
;;IHSBGOACTIVITYTIME.IHSBGOACTTIMECTRL
;;IHSBGOITEMS.BGOITEMS
;;IHSBGOSKINTEST.IHSBGOSK
;;IHSBGOICDPICKLIST.ICDPICKLIST
;;
CHM ;;IHSBGOPATIENTED.BGOPATED;IhsBgoPatientEd.chm;2012.9.6.125130;362E72C7AD5F5F26A3FE7FF89F0F88A8
;;IHSBGOITEMS.BGOITEMS;IhsBgoItems.chm;2012.9.5.200842;EBB6BB9E27DA3C6444E3A4A62650C8EE
;;IHSBGOEXAMS.BGOEXAMS;IhsBgoExams.chm;2012.10.5.172126;57F4B87DAF5061E69AAE4BE67D57B851
;;IHSBGOEM.BGOEMCTRL;IhsBgoE&M.chm;2012.10.29.153418;A32447DF078A4D485BF38E55F9ADD077
;;IHSBGOFAMHX.BGOFAMHX;IhsBgoFamHX.chm;2012.9.5.181536;30119BED22FE4FBF4C291BBBDEAF69F7
;;IHSBGOCHIEFCOMPLAINT.BGOCC;IhsBgoChiefComplaint.chm;2012.10.24.172244;37C28A2E3CCDACDD642D6B74EEC7E83B
;;IHSBGOHEALTHFACTORS.BGOHF;IhsBgoHealthFactors.chm;2012.10.8.164830;0A8968E4A3CB0641689167397AEBED38
;;IHSBGOACTIVITYTIME.IHSBGOACTTIMECTRL;IhsBgoActivityTime.chm;2012.8.29.125300;9C8AB3201B01AE4F00526D68C0903BEF
;;IHSBGOICDPICKLIST.ICDPICKLIST;IhsBgoIcdPickList.chm;2012.10.9.145344;F2051A8FB8459DE7084905BB1F96BB54
;;IHSBGOIMMUNIZATION.BGOIMM;IhsBgoImmunization.chm;2012.10.11.115734;244A3555AA57F426D86037C1A5473715
;;IHSBGOASTHMAZONES.BGOASTHMAZONES;IhsBgoAsthmaZones.chm;2012.9.5.123458;112B60A180F60CCE07B6D3E5752BD402
;;IHSBGOPOVHISTORY.BGOPOVHISTORY;IhsBgoPovHistory.chm;2012.10.31.140544;6EC54AF18961A76AD709EBEFB0D3AD59
;;IHSBGOPROBLEM.BGOPROBLEM;IhsBgoProblem.chm;2012.10.31.154810;31148D0AD867CB261668608216D160E8
;;IHSBGOPROCEDURESVIEWER.BGOPROCVIEW;IhsBgoProceduresViewer.chm;2012.9.6.151608;BB0BB0F543158AA0FC4162800693DBDA
;;IHSBGOVCPT.BGOVCPT;IhsBgoVCPT.chm;2012.10.18.161610;C64C35FB134DA5E9427A1719658CE54C
;;IHSBGOVPOV.BGOVPOV;IhsBgoVPOV.chm;2012.10.31.181924;90F60BC4B08E236291FF82DD5C05DA75
;;IHSBGOINFANTFEED.IHSBGOINFANTFEEDCTRL;IhsBgoInfantFeed.chm;2012.9.6.194402;0E67F85E7900E51DBE82461AE59FA690
;;IHSBGOREPFACTORS.IHSBGOREPFACTORSCTRL;IhsBgoRepFactors.chm;2012.9.7.191600;40CB61371E948C341E9CB2D2E6943F8A
;;IHSBGOREPHISTORY.IHSBGOREPHISTCTRL;IhsBgoRepHist.chm;2012.9.7.150800;ACE760171F152E11228066189F88EEDA
;;IHSBGOSKINTEST.IHSBGOSK;IhsBgoSkinTest.chm;2012.9.7.173700;531D818F2F55F1E2F24A95A6C6711F77
;;IHSBGOTRIAGESUMMARY.BGOTRIAGESUMMARY;IhsBgoTriageSummary.chm;2012.9.7.110700;CE934A9085ED8BED724BB9B5100C19EA
;;IHSBGOPATIENTED.BGOPATED;IhsBgoPatientEd.chm;2012.10.17.120734;2DFA6EDDBF6CA36F5603427219A04D3F
;;
BGOIN011 ; IHS/MSC/PLS - BGO*1.1*11 ;09-Apr-2013 21:33;DKM
+1 ;;1.1;BGO COMPONENTS;**11**;Mar 20, 2007
EC QUIT
+1 ; Preinit
PRE ;
+1 NEW USES,FDA,PID,IEN,X,MSOCX
+2 SET MSOCX=$$FIND1^DIC(19930.2,,,"FILE:MSCOMCT2.OCX")
+3 IF 'MSOCX
QUIT
+4 SET FDA(19930.2,MSOCX_",",13)=1
+5 FOR USES=0:1
SET X=$PIECE($TEXT(USES+USES),";;",2)
IF '$LENGTH(X)
QUIT
Begin DoDot:1
+6 SET PID=$$PRGID^CIAVMCFG($PIECE(X,";"))
+7 IF PID
Begin DoDot:2
+8 ; Find IEN of entry in USES multiple
+9 SET IEN=$ORDER(^CIAVOBJ(19930.2,PID,9,"B",MSOCX,0))
IF 'IEN
QUIT
Begin DoDot:3
+10 SET FDA(19930.221,IEN_","_PID_",",.01)="@"
End DoDot:3
End DoDot:2
End DoDot:1
+11 IF $DATA(FDA)
DO FILE^DIE(,"FDA")
+12 QUIT
+13 ; 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 QUIT
+14 ;
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
+24 ;
UPDCHM ;EP-
+1 NEW CHM,PID,C
+2 SET C=1
+3 FOR CHM=0:1
SET X=$PIECE($TEXT(CHM+CHM),";;",2)
IF '$LENGTH(X)
QUIT
Begin DoDot:1
+4 SET PID=$$PRGID^CIAVMCFG($PIECE(X,";"))
+5 DO AECHM(PID,$PIECE(X,";",2,99))
End DoDot:1
+6 WRITE !!
+7 QUIT
+8 ;
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(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 ;
VER ;;IHSBGOPATIENTED.BGOPATED;1.2.0.206;DE57D6308C04609C974F21632CDE4504
+1 ;;IHSBGOHEALTHFACTORS.BGOHF;1.2.0.5;B10B281D348B61E5176A086767D935FD
+2 ;;IHSBGOEXAMS.BGOEXAMS;1.1.0.361;BA9B9CA3BF126F0A6316E8B46F82766E
+3 ;;IHSBGOIMMUNIZATION.BGOIMM;1.2.0.133;789E19E30B71E17E03A1C3EC904A3A4F
+4 ;;IHSBGOSKINTEST.IHSBGOSK;1.2.0.119;BC59D745C20BDE054D27C9F4F6663BD5
+5 ;;IHSBGOREPHISTORY.IHSBGOREPHISTCTRL;1.2.0.56;73475BCE102DB619D6D9F5FB2F43BB2B
+6 ;;IHSBGOVPOV.BGOVPOV;1.2.0.33;E601C4EA046F062A5FEEE4B09325F951
+7 ;;IHSBGOVCPT.BGOVCPT;1.2.0.66;9E9F2A292F3CE43813BFD5DC111CB026
+8 ;;IHSBGOPROCEDURESVIEWER.BGOPROCVIEW;1.2.0.94;6D695B0E35395736A22F6DADCA8E44ED
+9 ;;IHSBGOASTHMAZONES.BGOASTHMAZONES;1.1.0.9;91AE18B30EDA5F86ADC7308A378F158B
+10 ;;IHSBGOREPFACTORS.IHSBGOREPFACTORSCTRL;1.2.0.183;106F23EF0D07BAF24E9CAAC61A2B32A8
+11 ;;
USES ;;IHSBGOIMMUNIZATION.BGOIMM
+1 ;;IHSBGOREPHISTORY.IHSBGOREPHISTCTRL
+2 ;;IHSBGOVCPT.BGOVCPT
+3 ;;IHSBGOFAMHX.BGOFAMHX
+4 ;;IHSBGOPROBLEM.BGOPROBLEM
+5 ;;IHSBGOACTIVITYTIME.IHSBGOACTTIMECTRL
+6 ;;IHSBGOITEMS.BGOITEMS
+7 ;;IHSBGOSKINTEST.IHSBGOSK
+8 ;;IHSBGOICDPICKLIST.ICDPICKLIST
+9 ;;
CHM ;;IHSBGOPATIENTED.BGOPATED;IhsBgoPatientEd.chm;2012.9.6.125130;362E72C7AD5F5F26A3FE7FF89F0F88A8
+1 ;;IHSBGOITEMS.BGOITEMS;IhsBgoItems.chm;2012.9.5.200842;EBB6BB9E27DA3C6444E3A4A62650C8EE
+2 ;;IHSBGOEXAMS.BGOEXAMS;IhsBgoExams.chm;2012.10.5.172126;57F4B87DAF5061E69AAE4BE67D57B851
+3 ;;IHSBGOEM.BGOEMCTRL;IhsBgoE&M.chm;2012.10.29.153418;A32447DF078A4D485BF38E55F9ADD077
+4 ;;IHSBGOFAMHX.BGOFAMHX;IhsBgoFamHX.chm;2012.9.5.181536;30119BED22FE4FBF4C291BBBDEAF69F7
+5 ;;IHSBGOCHIEFCOMPLAINT.BGOCC;IhsBgoChiefComplaint.chm;2012.10.24.172244;37C28A2E3CCDACDD642D6B74EEC7E83B
+6 ;;IHSBGOHEALTHFACTORS.BGOHF;IhsBgoHealthFactors.chm;2012.10.8.164830;0A8968E4A3CB0641689167397AEBED38
+7 ;;IHSBGOACTIVITYTIME.IHSBGOACTTIMECTRL;IhsBgoActivityTime.chm;2012.8.29.125300;9C8AB3201B01AE4F00526D68C0903BEF
+8 ;;IHSBGOICDPICKLIST.ICDPICKLIST;IhsBgoIcdPickList.chm;2012.10.9.145344;F2051A8FB8459DE7084905BB1F96BB54
+9 ;;IHSBGOIMMUNIZATION.BGOIMM;IhsBgoImmunization.chm;2012.10.11.115734;244A3555AA57F426D86037C1A5473715
+10 ;;IHSBGOASTHMAZONES.BGOASTHMAZONES;IhsBgoAsthmaZones.chm;2012.9.5.123458;112B60A180F60CCE07B6D3E5752BD402
+11 ;;IHSBGOPOVHISTORY.BGOPOVHISTORY;IhsBgoPovHistory.chm;2012.10.31.140544;6EC54AF18961A76AD709EBEFB0D3AD59
+12 ;;IHSBGOPROBLEM.BGOPROBLEM;IhsBgoProblem.chm;2012.10.31.154810;31148D0AD867CB261668608216D160E8
+13 ;;IHSBGOPROCEDURESVIEWER.BGOPROCVIEW;IhsBgoProceduresViewer.chm;2012.9.6.151608;BB0BB0F543158AA0FC4162800693DBDA
+14 ;;IHSBGOVCPT.BGOVCPT;IhsBgoVCPT.chm;2012.10.18.161610;C64C35FB134DA5E9427A1719658CE54C
+15 ;;IHSBGOVPOV.BGOVPOV;IhsBgoVPOV.chm;2012.10.31.181924;90F60BC4B08E236291FF82DD5C05DA75
+16 ;;IHSBGOINFANTFEED.IHSBGOINFANTFEEDCTRL;IhsBgoInfantFeed.chm;2012.9.6.194402;0E67F85E7900E51DBE82461AE59FA690
+17 ;;IHSBGOREPFACTORS.IHSBGOREPFACTORSCTRL;IhsBgoRepFactors.chm;2012.9.7.191600;40CB61371E948C341E9CB2D2E6943F8A
+18 ;;IHSBGOREPHISTORY.IHSBGOREPHISTCTRL;IhsBgoRepHist.chm;2012.9.7.150800;ACE760171F152E11228066189F88EEDA
+19 ;;IHSBGOSKINTEST.IHSBGOSK;IhsBgoSkinTest.chm;2012.9.7.173700;531D818F2F55F1E2F24A95A6C6711F77
+20 ;;IHSBGOTRIAGESUMMARY.BGOTRIAGESUMMARY;IhsBgoTriageSummary.chm;2012.9.7.110700;CE934A9085ED8BED724BB9B5100C19EA
+21 ;;IHSBGOPATIENTED.BGOPATED;IhsBgoPatientEd.chm;2012.10.17.120734;2DFA6EDDBF6CA36F5603427219A04D3F
+22 ;;