BQI25PU1 ;GDIT/HS/ALA-Update Source ; 08 Jan 2015 12:00 PM
;;2.5;ICARE MANAGEMENT SYSTEM;**1**;May 24, 2016;Build 17
;
;
SRC ;EP - Add a source
NEW BI,BJ,BK,BN,BQIUPD,ERROR,IEN,ND,NDATA,TEXT,VAL,TTEXT,BJJ
F BI=1:1 S TEXT=$T(NUM+BI) Q:TEXT=" Q" D
. S CIEN=$P(TEXT,";;",2)
. S TEXT=$P($T(ARR+BI),";;",2) Q:TEXT=""
. F BJ=1:1:$L(TEXT,"~") D
.. S NDATA=$P(TEXT,"~",BJ) I NDATA="" Q
.. S ND=$P(NDATA,"|",1),VAL=$P(NDATA,"|",2)
.. S ^BQI(90506.5,CIEN,ND)=VAL
. ;
. ; Re-Index File
. S DIK="^BQI(90506.5,"
. S DA=CIEN D IX1^DIK
;
; Do multiple fields (categories, clinical groups, layout items and tooltips)
NEW CAT,LAY,REC,CIEN,DATA,CLIN,TEXT,TN,TIP,NDATA
F BI=1:1 S CAT=$T(CAT+BI) Q:CAT=" Q" D
. S TEXT=$P(CAT,";;",2)
. S REC=$P(TEXT,"\",1),DATA=$P(TEXT,"\",2)
. S CIEN=$P(REC,":",1),TN=$P(REC,":",2)
. S ^BQI(90506.5,CIEN,5,0)="^90506.55^"_TN_"^"_TN
. S ^BQI(90506.5,CIEN,5,TN,0)=DATA
F BI=1:1 S CLIN=$T(CLIN+BI) Q:CLIN=" Q" D
. S TEXT=$P(CLIN,";;",2)
. S REC=$P(TEXT,"\",1),DATA=$P(TEXT,"\",2)
. S CIEN=$P(REC,":",1),TN=$P(REC,":",2)
. S ^BQI(90506.5,CIEN,6,0)="^90506.65^"_TN_"^"_TN
. S ^BQI(90506.5,CIEN,6,TN,0)=DATA
F BI=1:1 S LAY=$T(LAY+BI) Q:LAY=" Q" D
. S TEXT=$P(LAY,";;",2)
. S REC=$P(TEXT,"\",1),DATA=$P(TEXT,"\",2)
. S CIEN=$P(REC,":",1),TN=$P(REC,":",2)
. S ^BQI(90506.5,CIEN,10,0)="^90506.51I^"_TN_"^"_TN
. F BJ=1:1:$L(DATA,"~") D
.. S NDATA=$P(DATA,"~",BJ)
.. S ND=$P(NDATA,"|",1),VAL=$P(NDATA,"|",2)
.. S ^BQI(90506.5,CIEN,10,TN,ND)=VAL
F BI=1:1 S TIP=$T(TIP+BI) Q:TIP=" Q" D
. S TEXT=$P(TIP,";;",2)
. S REC=$P(TEXT,"\",1),DATA=$P(TEXT,"\",2)
. S CIEN=$P(REC,":",1),TN=$P(REC,":",2)
. F BJ=1:1:$L(DATA,"~") D
.. S NDATA=$P(DATA,"~",BJ)
.. S ^BQI(90506.5,CIEN,10,TN,4,0)="^^"_BJ_"^"_BJ_"^"_DT
.. S ^BQI(90506.5,CIEN,10,TN,4,BJ,0)=NDATA
;
Q
;
NUM ;EP - Number of new sources
;;38
;;42
;;41
;;9
Q
;
ARR ;EP - Array
;;0|Hep C^HC^^1^^^^^Hep C Default^^^^^1^^1~1|~2|Hep C^Care Mgmt - Hep C^^90505.1231^90505.3231~3|BQI GET CARE MGMT LIST~Patient"" + (char)29 + ""Hep C"~4|BQI GET CARE MGMT VIEW~~~Hep C
;;0|Register^RG^4^^^^^^Register Default^1^^^^^1^^REG
;;0|Men's Health^MH^^^^^^^^1
;;0|Pediatric^P^^^^^^^^1
Q
;
CAT ;EP - Any Categories
Q
;
CLIN ;EP - Any Clinical Groups
Q
;
LAY ;EP - Any layout items
Q
;
TIP ;EP - Tooltips
Q
BQI25PU1 ;GDIT/HS/ALA-Update Source ; 08 Jan 2015 12:00 PM
+1 ;;2.5;ICARE MANAGEMENT SYSTEM;**1**;May 24, 2016;Build 17
+2 ;
+3 ;
SRC ;EP - Add a source
+1 NEW BI,BJ,BK,BN,BQIUPD,ERROR,IEN,ND,NDATA,TEXT,VAL,TTEXT,BJJ
+2 FOR BI=1:1
SET TEXT=$TEXT(NUM+BI)
IF TEXT=" Q"
QUIT
Begin DoDot:1
+3 SET CIEN=$PIECE(TEXT,";;",2)
+4 SET TEXT=$PIECE($TEXT(ARR+BI),";;",2)
IF TEXT=""
QUIT
+5 FOR BJ=1:1:$LENGTH(TEXT,"~")
Begin DoDot:2
+6 SET NDATA=$PIECE(TEXT,"~",BJ)
IF NDATA=""
QUIT
+7 SET ND=$PIECE(NDATA,"|",1)
SET VAL=$PIECE(NDATA,"|",2)
+8 SET ^BQI(90506.5,CIEN,ND)=VAL
End DoDot:2
+9 ;
+10 ; Re-Index File
+11 SET DIK="^BQI(90506.5,"
+12 SET DA=CIEN
DO IX1^DIK
End DoDot:1
+13 ;
+14 ; Do multiple fields (categories, clinical groups, layout items and tooltips)
+15 NEW CAT,LAY,REC,CIEN,DATA,CLIN,TEXT,TN,TIP,NDATA
+16 FOR BI=1:1
SET CAT=$TEXT(CAT+BI)
IF CAT=" Q"
QUIT
Begin DoDot:1
+17 SET TEXT=$PIECE(CAT,";;",2)
+18 SET REC=$PIECE(TEXT,"\",1)
SET DATA=$PIECE(TEXT,"\",2)
+19 SET CIEN=$PIECE(REC,":",1)
SET TN=$PIECE(REC,":",2)
+20 SET ^BQI(90506.5,CIEN,5,0)="^90506.55^"_TN_"^"_TN
+21 SET ^BQI(90506.5,CIEN,5,TN,0)=DATA
End DoDot:1
+22 FOR BI=1:1
SET CLIN=$TEXT(CLIN+BI)
IF CLIN=" Q"
QUIT
Begin DoDot:1
+23 SET TEXT=$PIECE(CLIN,";;",2)
+24 SET REC=$PIECE(TEXT,"\",1)
SET DATA=$PIECE(TEXT,"\",2)
+25 SET CIEN=$PIECE(REC,":",1)
SET TN=$PIECE(REC,":",2)
+26 SET ^BQI(90506.5,CIEN,6,0)="^90506.65^"_TN_"^"_TN
+27 SET ^BQI(90506.5,CIEN,6,TN,0)=DATA
End DoDot:1
+28 FOR BI=1:1
SET LAY=$TEXT(LAY+BI)
IF LAY=" Q"
QUIT
Begin DoDot:1
+29 SET TEXT=$PIECE(LAY,";;",2)
+30 SET REC=$PIECE(TEXT,"\",1)
SET DATA=$PIECE(TEXT,"\",2)
+31 SET CIEN=$PIECE(REC,":",1)
SET TN=$PIECE(REC,":",2)
+32 SET ^BQI(90506.5,CIEN,10,0)="^90506.51I^"_TN_"^"_TN
+33 FOR BJ=1:1:$LENGTH(DATA,"~")
Begin DoDot:2
+34 SET NDATA=$PIECE(DATA,"~",BJ)
+35 SET ND=$PIECE(NDATA,"|",1)
SET VAL=$PIECE(NDATA,"|",2)
+36 SET ^BQI(90506.5,CIEN,10,TN,ND)=VAL
End DoDot:2
End DoDot:1
+37 FOR BI=1:1
SET TIP=$TEXT(TIP+BI)
IF TIP=" Q"
QUIT
Begin DoDot:1
+38 SET TEXT=$PIECE(TIP,";;",2)
+39 SET REC=$PIECE(TEXT,"\",1)
SET DATA=$PIECE(TEXT,"\",2)
+40 SET CIEN=$PIECE(REC,":",1)
SET TN=$PIECE(REC,":",2)
+41 FOR BJ=1:1:$LENGTH(DATA,"~")
Begin DoDot:2
+42 SET NDATA=$PIECE(DATA,"~",BJ)
+43 SET ^BQI(90506.5,CIEN,10,TN,4,0)="^^"_BJ_"^"_BJ_"^"_DT
+44 SET ^BQI(90506.5,CIEN,10,TN,4,BJ,0)=NDATA
End DoDot:2
End DoDot:1
+45 ;
+46 QUIT
+47 ;
NUM ;EP - Number of new sources
+1 ;;38
+2 ;;42
+3 ;;41
+4 ;;9
+5 QUIT
+6 ;
ARR ;EP - Array
+1 ;;0|Hep C^HC^^1^^^^^Hep C Default^^^^^1^^1~1|~2|Hep C^Care Mgmt - Hep C^^90505.1231^90505.3231~3|BQI GET CARE MGMT LIST~Patient"" + (char)29 + ""Hep C"~4|BQI GET CARE MGMT VIEW~~~Hep C
+2 ;;0|Register^RG^4^^^^^^Register Default^1^^^^^1^^REG
+3 ;;0|Men's Health^MH^^^^^^^^1
+4 ;;0|Pediatric^P^^^^^^^^1
+5 QUIT
+6 ;
CAT ;EP - Any Categories
+1 QUIT
+2 ;
CLIN ;EP - Any Clinical Groups
+1 QUIT
+2 ;
LAY ;EP - Any layout items
+1 QUIT
+2 ;
TIP ;EP - Tooltips
+1 QUIT