BQIDCDF ;PRXM/HC/ALA-Predefined Panel Definition ; 24 Oct 2005 6:21 PM
;;2.3;ICARE MANAGEMENT SYSTEM;**3,4**;Apr 18, 2012;Build 66
;
Q
;
GET(DATA,PPIEN) ;EP -- **not called by any RPC at this time**
;
;Description
; Get the definition of a predefined panel
;Input
; PPIEN - Internal entry number of a predefined panel
;Output
; DATA - Global reference to store data
;
NEW UID,JJ,IEN,GLOBREF
S UID=$S($G(ZTSK):"Z"_ZTSK,1:$J)
S DATA=$NA(^TMP("BQIDCDF",UID))
K @DATA
;
S JJ=0
;
NEW $ESTACK,$ETRAP S $ETRAP="D ERR^BQIDCDF D UNWIND^%ZTER" ; SAC 2006 2.2.3.3.2
;
S JJ=JJ+1,@DATA@(JJ)="I00010PREPANEL_IEN^T00030PANEL_NAME^T00250DESCRIPTION"_$C(30)
S JJ=JJ+1
S @DATA@(JJ)=PPIEN_"^"_$$GET1^DIQ(90506,PPIEN_",",.01,"E")
S @DATA@(JJ)=@DATA@(JJ)_"^"_$$GET1^DIQ(90506,PPIEN_",",1,"E")_$C(30)
;
S JJ=JJ+1,@DATA@(JJ)=$C(31)
Q
;
ERR ;
D ^%ZTER
NEW Y,ERRDTM
S Y=$$NOW^XLFDT() X ^DD("DD") S ERRDTM=Y
S BMXSEC="Recording that an error occurred at "_ERRDTM
S JJ=JJ+1,@DATA@(JJ)=$C(31)
Q
;
PP(SOURCE) ;EP - Get the IEN of a predefined panel
;
;Input
; SOURCE - Predefined panel name
;
NEW X,Y,DIC
S DIC(0)="NZ",X=SOURCE,DIC="^BQI(90506,"
D ^DIC
Q +Y
;
PTYP(SOURCE,PNAME) ;EP - Return the parameter type
;
;Input
; SOURCE - Predefined panel name
; PNAME - Parameter name
;
NEW PPIEN,DA,IENS,BQN
S PPIEN=$$PP(SOURCE)
S BQN=$O(^BQI(90506,PPIEN,3,"B",PNAME,""))
I BQN="" Q ""
S DA(1)=PPIEN,DA=BQN,IENS=$$IENS^DILF(.DA)
I $$GET1^DIQ(90506.03,IENS,.13,"I")=1 Q ""
Q $$GET1^DIQ(90506.03,IENS,.02,"I")
;
PEXE(SOURCE,PNAME) ;EP - Return the parameter executable
;
;Input
; SOURCE - Predefined panel name
; PNAME - Parameter name
;
NEW PPIEN,DA,IENS,BQN
S PPIEN=$$PP(SOURCE)
S BQN=$O(^BQI(90506,PPIEN,3,"B",PNAME,""))
I BQN="" Q ""
S DA(1)=PPIEN,DA=BQN,IENS=$$IENS^DILF(.DA)
I $$GET1^DIQ(90506.03,IENS,.13,"I")=1 Q ""
Q $$GET1^DIQ(90506.03,IENS,2,"I")
;
PORD(SOURCE,PNAME) ;EP - Return the parameter DESCRIPTION ORDER
;
;Input
; SOURCE - Predefined panel name
; PNAME - Parameter name
;
NEW PPIEN,DA,IENS,BQN
S PPIEN=$$PP(SOURCE)
S BQN=$O(^BQI(90506,PPIEN,3,"B",PNAME,""))
I BQN="" Q ""
S DA(1)=PPIEN,DA=BQN,IENS=$$IENS^DILF(.DA)
I $$GET1^DIQ(90506.03,IENS,.13,"I")=1 Q ""
Q $$GET1^DIQ(90506.03,IENS,.1,"I")
;
PMAP(SOURCE,PNAME) ;EP - Return the parameter MAP parameter
;
;Input
; SOURCE - Predefined panel name
; PNAME - Parameter name
;
NEW PPIEN,DA,IENS,BQN
S PPIEN=$$PP(SOURCE)
S BQN=$O(^BQI(90506,PPIEN,3,"B",PNAME,""))
I BQN="" Q ""
S DA(1)=PPIEN,DA=BQN,IENS=$$IENS^DILF(.DA)
I $$GET1^DIQ(90506.03,IENS,.13,"I")=1 Q ""
I $$GET1^DIQ(90506.03,IENS,.11,"I")'=1 Q ""
Q $$GET1^DIQ(90506.03,IENS,.12,"I")
;
;
FILN(SOURCE,PNAME) ;EP - Return the filenumber
;
;Input
; SOURCE - Predefined panel name
; PNAME - Parameter name
;
NEW PPIEN,DA,IENS,BQN
S PPIEN=$$PP(SOURCE)
S BQN=$O(^BQI(90506,PPIEN,3,"B",PNAME,""))
I BQN="" Q ""
S DA(1)=PPIEN,DA=BQN,IENS=$$IENS^DILF(.DA)
Q $$GET1^DIQ(90506.03,IENS,.08,"I")
;
MPF(SOURCE,PNAME) ; EP - Return mapping flag
;Input
; SOURCE - Predefined panel name
; PNAME - Parameter name
;
NEW PPIEN,DA,IENS,BQN
S PPIEN=$$PP(SOURCE)
S BQN=$O(^BQI(90506,PPIEN,3,"B",PNAME,""))
I BQN="" Q ""
S DA(1)=PPIEN,DA=BQN,IENS=$$IENS^DILF(.DA)
Q $$GET1^DIQ(90506.03,IENS,.11,"I")
;
MPN(SOURCE,PNAME) ; EP - Return map parameter name
;Input
; SOURCE - Predefined panel name
; PNAME - Parameter name
;
NEW PPIEN,DA,IENS,BQN
S PPIEN=$$PP(SOURCE)
S BQN=$O(^BQI(90506,PPIEN,3,"B",PNAME,""))
I BQN="" Q ""
S DA(1)=PPIEN,DA=BQN,IENS=$$IENS^DILF(.DA)
Q $$GET1^DIQ(90506.03,IENS,.12,"E")
BQIDCDF ;PRXM/HC/ALA-Predefined Panel Definition ; 24 Oct 2005 6:21 PM
+1 ;;2.3;ICARE MANAGEMENT SYSTEM;**3,4**;Apr 18, 2012;Build 66
+2 ;
+3 QUIT
+4 ;
GET(DATA,PPIEN) ;EP -- **not called by any RPC at this time**
+1 ;
+2 ;Description
+3 ; Get the definition of a predefined panel
+4 ;Input
+5 ; PPIEN - Internal entry number of a predefined panel
+6 ;Output
+7 ; DATA - Global reference to store data
+8 ;
+9 NEW UID,JJ,IEN,GLOBREF
+10 SET UID=$SELECT($GET(ZTSK):"Z"_ZTSK,1:$JOB)
+11 SET DATA=$NAME(^TMP("BQIDCDF",UID))
+12 KILL @DATA
+13 ;
+14 SET JJ=0
+15 ;
+16 ; SAC 2006 2.2.3.3.2
NEW $ESTACK,$ETRAP
SET $ETRAP="D ERR^BQIDCDF D UNWIND^%ZTER"
+17 ;
+18 SET JJ=JJ+1
SET @DATA@(JJ)="I00010PREPANEL_IEN^T00030PANEL_NAME^T00250DESCRIPTION"_$CHAR(30)
+19 SET JJ=JJ+1
+20 SET @DATA@(JJ)=PPIEN_"^"_$$GET1^DIQ(90506,PPIEN_",",.01,"E")
+21 SET @DATA@(JJ)=@DATA@(JJ)_"^"_$$GET1^DIQ(90506,PPIEN_",",1,"E")_$CHAR(30)
+22 ;
+23 SET JJ=JJ+1
SET @DATA@(JJ)=$CHAR(31)
+24 QUIT
+25 ;
ERR ;
+1 DO ^%ZTER
+2 NEW Y,ERRDTM
+3 SET Y=$$NOW^XLFDT()
XECUTE ^DD("DD")
SET ERRDTM=Y
+4 SET BMXSEC="Recording that an error occurred at "_ERRDTM
+5 SET JJ=JJ+1
SET @DATA@(JJ)=$CHAR(31)
+6 QUIT
+7 ;
PP(SOURCE) ;EP - Get the IEN of a predefined panel
+1 ;
+2 ;Input
+3 ; SOURCE - Predefined panel name
+4 ;
+5 NEW X,Y,DIC
+6 SET DIC(0)="NZ"
SET X=SOURCE
SET DIC="^BQI(90506,"
+7 DO ^DIC
+8 QUIT +Y
+9 ;
PTYP(SOURCE,PNAME) ;EP - Return the parameter type
+1 ;
+2 ;Input
+3 ; SOURCE - Predefined panel name
+4 ; PNAME - Parameter name
+5 ;
+6 NEW PPIEN,DA,IENS,BQN
+7 SET PPIEN=$$PP(SOURCE)
+8 SET BQN=$ORDER(^BQI(90506,PPIEN,3,"B",PNAME,""))
+9 IF BQN=""
QUIT ""
+10 SET DA(1)=PPIEN
SET DA=BQN
SET IENS=$$IENS^DILF(.DA)
+11 IF $$GET1^DIQ(90506.03,IENS,.13,"I")=1
QUIT ""
+12 QUIT $$GET1^DIQ(90506.03,IENS,.02,"I")
+13 ;
PEXE(SOURCE,PNAME) ;EP - Return the parameter executable
+1 ;
+2 ;Input
+3 ; SOURCE - Predefined panel name
+4 ; PNAME - Parameter name
+5 ;
+6 NEW PPIEN,DA,IENS,BQN
+7 SET PPIEN=$$PP(SOURCE)
+8 SET BQN=$ORDER(^BQI(90506,PPIEN,3,"B",PNAME,""))
+9 IF BQN=""
QUIT ""
+10 SET DA(1)=PPIEN
SET DA=BQN
SET IENS=$$IENS^DILF(.DA)
+11 IF $$GET1^DIQ(90506.03,IENS,.13,"I")=1
QUIT ""
+12 QUIT $$GET1^DIQ(90506.03,IENS,2,"I")
+13 ;
PORD(SOURCE,PNAME) ;EP - Return the parameter DESCRIPTION ORDER
+1 ;
+2 ;Input
+3 ; SOURCE - Predefined panel name
+4 ; PNAME - Parameter name
+5 ;
+6 NEW PPIEN,DA,IENS,BQN
+7 SET PPIEN=$$PP(SOURCE)
+8 SET BQN=$ORDER(^BQI(90506,PPIEN,3,"B",PNAME,""))
+9 IF BQN=""
QUIT ""
+10 SET DA(1)=PPIEN
SET DA=BQN
SET IENS=$$IENS^DILF(.DA)
+11 IF $$GET1^DIQ(90506.03,IENS,.13,"I")=1
QUIT ""
+12 QUIT $$GET1^DIQ(90506.03,IENS,.1,"I")
+13 ;
PMAP(SOURCE,PNAME) ;EP - Return the parameter MAP parameter
+1 ;
+2 ;Input
+3 ; SOURCE - Predefined panel name
+4 ; PNAME - Parameter name
+5 ;
+6 NEW PPIEN,DA,IENS,BQN
+7 SET PPIEN=$$PP(SOURCE)
+8 SET BQN=$ORDER(^BQI(90506,PPIEN,3,"B",PNAME,""))
+9 IF BQN=""
QUIT ""
+10 SET DA(1)=PPIEN
SET DA=BQN
SET IENS=$$IENS^DILF(.DA)
+11 IF $$GET1^DIQ(90506.03,IENS,.13,"I")=1
QUIT ""
+12 IF $$GET1^DIQ(90506.03,IENS,.11,"I")'=1
QUIT ""
+13 QUIT $$GET1^DIQ(90506.03,IENS,.12,"I")
+14 ;
+15 ;
FILN(SOURCE,PNAME) ;EP - Return the filenumber
+1 ;
+2 ;Input
+3 ; SOURCE - Predefined panel name
+4 ; PNAME - Parameter name
+5 ;
+6 NEW PPIEN,DA,IENS,BQN
+7 SET PPIEN=$$PP(SOURCE)
+8 SET BQN=$ORDER(^BQI(90506,PPIEN,3,"B",PNAME,""))
+9 IF BQN=""
QUIT ""
+10 SET DA(1)=PPIEN
SET DA=BQN
SET IENS=$$IENS^DILF(.DA)
+11 QUIT $$GET1^DIQ(90506.03,IENS,.08,"I")
+12 ;
MPF(SOURCE,PNAME) ; EP - Return mapping flag
+1 ;Input
+2 ; SOURCE - Predefined panel name
+3 ; PNAME - Parameter name
+4 ;
+5 NEW PPIEN,DA,IENS,BQN
+6 SET PPIEN=$$PP(SOURCE)
+7 SET BQN=$ORDER(^BQI(90506,PPIEN,3,"B",PNAME,""))
+8 IF BQN=""
QUIT ""
+9 SET DA(1)=PPIEN
SET DA=BQN
SET IENS=$$IENS^DILF(.DA)
+10 QUIT $$GET1^DIQ(90506.03,IENS,.11,"I")
+11 ;
MPN(SOURCE,PNAME) ; EP - Return map parameter name
+1 ;Input
+2 ; SOURCE - Predefined panel name
+3 ; PNAME - Parameter name
+4 ;
+5 NEW PPIEN,DA,IENS,BQN
+6 SET PPIEN=$$PP(SOURCE)
+7 SET BQN=$ORDER(^BQI(90506,PPIEN,3,"B",PNAME,""))
+8 IF BQN=""
QUIT ""
+9 SET DA(1)=PPIEN
SET DA=BQN
SET IENS=$$IENS^DILF(.DA)
+10 QUIT $$GET1^DIQ(90506.03,IENS,.12,"E")