DVBLIBGN ;ALB/NGC - CAPRI Reusable Library - General ; 9/22/25 1:00pm
;;2.7;AMIE;**255**;Apr 10, 1995;Build 21
;Per VHA Directive 6402 this routine should not be modified
; Reference to OWNSKEY^XUSRB in ICR #3277
; Reference to ^%DT in ICR #3277
; Reference to File 19.2 in ICR #4086
; Reference to File 38.1 in ICR #767
; Reference to REPLACE^XLFSTR in ICR #10104
; Reference to routine XLFDT in ICR #10103
; Reference to routine ^XMD in ICR #10070
; Reference to FIND1^DIC in ICR #10006
; Reference to UPDATE^DIE in ICR #2053
;
Q ;no direct entry
;
;
CSV(DVBVALUE) ;CAPRI-12377:NGC - return a CSV formatted version of a data point. i.e. escape any ( " ) characters
;RFC-4180
N DVBNEWVALUE,DVBSPEC
S DVBSPEC($C(34))=$C(34,34)
S DVBNEWVALUE=$$REPLACE^XLFSTR(DVBVALUE,.DVBSPEC)
S:(DVBNEWVALUE[",")&($A(DVBNEWVALUE)'=34) DVBNEWVALUE=""""_DVBNEWVALUE_""""
Q DVBNEWVALUE
;
;
ISSENSITIVE(DVBDFN) ;CAPRI-12377:NGC - return true/false if patient is 'sensitive'
Q ($P($G(^DGSL(38.1,DVBDFN,0)),U,2)=1)
;
;
USERHASKEY(DVBKEYNAME) ;CAPRI-12375:NGC - return boolean 1|0 for if user has a given key
;Parameters - DVBKEYNAME : name of the security key
;Returns - boolean 1-user has key, 0-user not has key
N DVBRET
D OWNSKEY^XUSRB(.DVBRET,DVBKEYNAME) ;Security key check
Q $G(DVBRET(0))
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDVBLIBGN 1366 printed Mar 25, 2026@15:23:50 Page 2
DVBLIBGN ;ALB/NGC - CAPRI Reusable Library - General ; 9/22/25 1:00pm
+1 ;;2.7;AMIE;**255**;Apr 10, 1995;Build 21
+2 ;Per VHA Directive 6402 this routine should not be modified
+3 ; Reference to OWNSKEY^XUSRB in ICR #3277
+4 ; Reference to ^%DT in ICR #3277
+5 ; Reference to File 19.2 in ICR #4086
+6 ; Reference to File 38.1 in ICR #767
+7 ; Reference to REPLACE^XLFSTR in ICR #10104
+8 ; Reference to routine XLFDT in ICR #10103
+9 ; Reference to routine ^XMD in ICR #10070
+10 ; Reference to FIND1^DIC in ICR #10006
+11 ; Reference to UPDATE^DIE in ICR #2053
+12 ;
+13 ;no direct entry
QUIT
+14 ;
+15 ;
CSV(DVBVALUE) ;CAPRI-12377:NGC - return a CSV formatted version of a data point. i.e. escape any ( " ) characters
+1 ;RFC-4180
+2 NEW DVBNEWVALUE,DVBSPEC
+3 SET DVBSPEC($CHAR(34))=$CHAR(34,34)
+4 SET DVBNEWVALUE=$$REPLACE^XLFSTR(DVBVALUE,.DVBSPEC)
+5 if (DVBNEWVALUE[",")&($ASCII(DVBNEWVALUE)'=34)
SET DVBNEWVALUE=""""_DVBNEWVALUE_""""
+6 QUIT DVBNEWVALUE
+7 ;
+8 ;
ISSENSITIVE(DVBDFN) ;CAPRI-12377:NGC - return true/false if patient is 'sensitive'
+1 QUIT ($PIECE($GET(^DGSL(38.1,DVBDFN,0)),U,2)=1)
+2 ;
+3 ;
USERHASKEY(DVBKEYNAME) ;CAPRI-12375:NGC - return boolean 1|0 for if user has a given key
+1 ;Parameters - DVBKEYNAME : name of the security key
+2 ;Returns - boolean 1-user has key, 0-user not has key
+3 NEW DVBRET
+4 ;Security key check
DO OWNSKEY^XUSRB(.DVBRET,DVBKEYNAME)
+5 QUIT $GET(DVBRET(0))
+6 ;