HDISVF03 ;BPFO/JRP - FILE UTILITIES/API;12/20/2004
;;1.0;HEALTH DATA & INFORMATICS;;Feb 22, 2005
;
;---------- Begin HDIS PARAMETER file (#7118.29) APIs ----------
;
GETSDIS(SYSPTR) ;Get value of DISABLE STATUS UPDATES field (#31)
; Input : SYSPTR - Pointer to HDIS System file
; (default to current system)
;Output : Internal Value ^ External Value
; Notes : If no value found, values for OFF are returned
N FAC,ARR,NTRNL,XTRNL
S FAC=$$GETPTR^HDISVF10($G(SYSPTR))
I 'FAC Q "0^OFF"
S XTRNL=$$GET^HDISVF02(7118.29,31,(FAC_","),"B",.ARR)
I XTRNL="" Q "0^NO"
Q ARR("I")_"^"_XTRNL
;
SETSDIS(VALUE,SYSPTR) ;Set value of DISABLE STATUS UPDATES field (#31)
; Input : VALUE - New value (internal or external)
; : SYSPTR - Pointer to HDIS System file
; (default to current system)
;Output : None
N FAC,X
S FAC=$$GETPTR^HDISVF10($G(SYSPTR))
I 'FAC Q
S X=$$SET^HDISVF02(7118.29,31,(FAC_","),$G(VALUE),1)
Q
;
GETSLOC(SYSPTR) ;Get value of STATUS SERVER LOCATION field (#32)
; Input : SYSPTR - Pointer to HDIS System file
; (default to current system)
;Output : Value of field
; Notes : If no value found, domain for FORUM returned
N FAC,XTRNL
S FAC=$$GETPTR^HDISVF10($G(SYSPTR))
I 'FAC Q "DOMAIN.EXT"
S XTRNL=$$GET^HDISVF02(7118.29,32,(FAC_","),"E")
I XTRNL="" Q "DOMAIN.EXT"
Q XTRNL
;
SETSLOC(VALUE,SYSPTR) ;Set value of STATUS SERVER LOCATION field (#32)
; Input : VALUE - New value (internal or external)
; : SYSPTR - Pointer to HDIS System file
; (default to current system)
;Output : None
N FAC,X
S FAC=$$GETPTR^HDISVF10($G(SYSPTR))
I 'FAC Q
S X=$$SET^HDISVF02(7118.29,32,(FAC_","),$G(VALUE),1)
Q
;
GETSCON(SYSPTR) ;Get value of STATUS SERVER CONNECTION TYPE field (#33)
; Input : SYSPTR - Pointer to HDIS System file
; (default to current system)
;Output : Internal Value ^ External Value
; Notes : If no value found, values for MailMan connection returned
N FAC,ARR,NTRNL,XTRNL
S FAC=$$GETPTR^HDISVF10($G(SYSPTR))
I 'FAC Q "1^MAILMAN"
S XTRNL=$$GET^HDISVF02(7118.29,33,(FAC_","),"B",.ARR)
I XTRNL="" Q "1^MAILMAN"
Q ARR("I")_"^"_XTRNL
;
SETSCON(VALUE,SYSPTR) ;Set value of STATUS SERVER CONNECTION TYPE field (#33)
; Input : VALUE - New value (internal or external)
; : SYSPTR - Pointer to HDIS System file
; (default to current system)
;Output : None
N FAC,X
S FAC=$$GETPTR^HDISVF10($G(SYSPTR))
I 'FAC Q
S X=$$SET^HDISVF02(7118.29,33,(FAC_","),$G(VALUE),1)
Q
;
GETSSRV(SYSPTR) ;Get value of STATUS SERVER OPTION field (#41)
; Input : SYSPTR - Pointer to HDIS System file
; (default to current system)
;Output : Value of field
; Notes : If no value found, HDIS-STATUS-UPDATE-SERVER returned
N FAC,XTRNL
S FAC=$$GETPTR^HDISVF10($G(SYSPTR))
I 'FAC Q "HDIS-STATUS-UPDATE-SERVER"
S XTRNL=$$GET^HDISVF02(7118.29,41,(FAC_","),"E")
I XTRNL="" Q "HDIS-STATUS-UPDATE-SERVER"
Q XTRNL
;
SETSSRV(VALUE,SYSPTR) ;Set value of STATUS SERVER OPTION field (#41)
; Input : VALUE - New value (internal or external)
; : SYSPTR - Pointer to HDIS System file
; (default to current system)
;Output : None
N FAC,X
S FAC=$$GETPTR^HDISVF10($G(SYSPTR))
I 'FAC Q
S X=$$SET^HDISVF02(7118.29,41,(FAC_","),$G(VALUE),1)
Q
;
GETNSVL(SYSPTR) ;Get value of LAST NON-STANDARD VUID field (#51)
; Input : SYSPTR - Pointer to HDIS System file
; (default to current system)
;Output : Value of field
; Notes : If no value found, null ("") returned
N FAC,XTRNL
S FAC=$$GETPTR^HDISVF10($G(SYSPTR))
I 'FAC Q ""
S XTRNL=$$GET^HDISVF02(7118.29,51,(FAC_","),"E")
Q XTRNL
;
GETNSVE(SYSPTR) ;Get value of ENDING NON-STANDARD VUID field (#52)
; Input : SYSPTR - Pointer to HDIS System file
; (default to current system)
;Output : Value of field
; Notes : If no value found, null ("") returned
N FAC,XTRNL
S FAC=$$GETPTR^HDISVF10($G(SYSPTR))
I 'FAC Q ""
S XTRNL=$$GET^HDISVF02(7118.29,52,(FAC_","),"E")
Q XTRNL
;
CALCNSV(SYSPTR) ;Calculate next non-standard VUID
; Input : SYSPTR - Pointer to HDIS System file
; (default to current system)
;Output : Next non-standard VUID centralized VUID server should
; use when assigning non-standard VUIDs.
; Notes : LAST NON-STANDARD VUID field (#51) updated with
; calculated value
; : Locking implemented to prevent simultaneous calculations
; : Null ("") returned on error OR if calculated value exceeds
; allowed ending value (ENDING NON-STANDARD VUID field, #52)
N FAC,CVUID,NVUID,EVUID,OK,X
S FAC=$$GETPTR^HDISVF10($G(SYSPTR))
I 'FAC Q ""
S OK=0
F X=1:1:10 Q:OK L +^HDISF(7118.29,"CALCULATE NEXT VUID"):1 S:$T OK=1 I 'OK H 1
I 'OK Q ""
S CVUID=$$GETNSVL($G(SYSPTR))
S EVUID=$$GETNSVE($G(SYSPTR))
I (CVUID="")!(EVUID="") L -^HDISF(7118.29,"CALCULATE NEXT VUID") Q ""
S NVUID=CVUID+1
I NVUID>EVUID L -^HDISF(7118.29,"CALCULATE NEXT VUID") Q ""
S X=$$SET^HDISVF02(7118.29,51,(FAC_","),NVUID,1)
L -^HDISF(7118.29,"CALCULATE NEXT VUID")
Q NVUID
;
;---------- End HDIS PARAMETER file APIs ----------
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HHDISVF03 5309 printed Oct 16, 2024@17:57:36 Page 2
HDISVF03 ;BPFO/JRP - FILE UTILITIES/API;12/20/2004
+1 ;;1.0;HEALTH DATA & INFORMATICS;;Feb 22, 2005
+2 ;
+3 ;---------- Begin HDIS PARAMETER file (#7118.29) APIs ----------
+4 ;
GETSDIS(SYSPTR) ;Get value of DISABLE STATUS UPDATES field (#31)
+1 ; Input : SYSPTR - Pointer to HDIS System file
+2 ; (default to current system)
+3 ;Output : Internal Value ^ External Value
+4 ; Notes : If no value found, values for OFF are returned
+5 NEW FAC,ARR,NTRNL,XTRNL
+6 SET FAC=$$GETPTR^HDISVF10($GET(SYSPTR))
+7 IF 'FAC
QUIT "0^OFF"
+8 SET XTRNL=$$GET^HDISVF02(7118.29,31,(FAC_","),"B",.ARR)
+9 IF XTRNL=""
QUIT "0^NO"
+10 QUIT ARR("I")_"^"_XTRNL
+11 ;
SETSDIS(VALUE,SYSPTR) ;Set value of DISABLE STATUS UPDATES field (#31)
+1 ; Input : VALUE - New value (internal or external)
+2 ; : SYSPTR - Pointer to HDIS System file
+3 ; (default to current system)
+4 ;Output : None
+5 NEW FAC,X
+6 SET FAC=$$GETPTR^HDISVF10($GET(SYSPTR))
+7 IF 'FAC
QUIT
+8 SET X=$$SET^HDISVF02(7118.29,31,(FAC_","),$GET(VALUE),1)
+9 QUIT
+10 ;
GETSLOC(SYSPTR) ;Get value of STATUS SERVER LOCATION field (#32)
+1 ; Input : SYSPTR - Pointer to HDIS System file
+2 ; (default to current system)
+3 ;Output : Value of field
+4 ; Notes : If no value found, domain for FORUM returned
+5 NEW FAC,XTRNL
+6 SET FAC=$$GETPTR^HDISVF10($GET(SYSPTR))
+7 IF 'FAC
QUIT "DOMAIN.EXT"
+8 SET XTRNL=$$GET^HDISVF02(7118.29,32,(FAC_","),"E")
+9 IF XTRNL=""
QUIT "DOMAIN.EXT"
+10 QUIT XTRNL
+11 ;
SETSLOC(VALUE,SYSPTR) ;Set value of STATUS SERVER LOCATION field (#32)
+1 ; Input : VALUE - New value (internal or external)
+2 ; : SYSPTR - Pointer to HDIS System file
+3 ; (default to current system)
+4 ;Output : None
+5 NEW FAC,X
+6 SET FAC=$$GETPTR^HDISVF10($GET(SYSPTR))
+7 IF 'FAC
QUIT
+8 SET X=$$SET^HDISVF02(7118.29,32,(FAC_","),$GET(VALUE),1)
+9 QUIT
+10 ;
GETSCON(SYSPTR) ;Get value of STATUS SERVER CONNECTION TYPE field (#33)
+1 ; Input : SYSPTR - Pointer to HDIS System file
+2 ; (default to current system)
+3 ;Output : Internal Value ^ External Value
+4 ; Notes : If no value found, values for MailMan connection returned
+5 NEW FAC,ARR,NTRNL,XTRNL
+6 SET FAC=$$GETPTR^HDISVF10($GET(SYSPTR))
+7 IF 'FAC
QUIT "1^MAILMAN"
+8 SET XTRNL=$$GET^HDISVF02(7118.29,33,(FAC_","),"B",.ARR)
+9 IF XTRNL=""
QUIT "1^MAILMAN"
+10 QUIT ARR("I")_"^"_XTRNL
+11 ;
SETSCON(VALUE,SYSPTR) ;Set value of STATUS SERVER CONNECTION TYPE field (#33)
+1 ; Input : VALUE - New value (internal or external)
+2 ; : SYSPTR - Pointer to HDIS System file
+3 ; (default to current system)
+4 ;Output : None
+5 NEW FAC,X
+6 SET FAC=$$GETPTR^HDISVF10($GET(SYSPTR))
+7 IF 'FAC
QUIT
+8 SET X=$$SET^HDISVF02(7118.29,33,(FAC_","),$GET(VALUE),1)
+9 QUIT
+10 ;
GETSSRV(SYSPTR) ;Get value of STATUS SERVER OPTION field (#41)
+1 ; Input : SYSPTR - Pointer to HDIS System file
+2 ; (default to current system)
+3 ;Output : Value of field
+4 ; Notes : If no value found, HDIS-STATUS-UPDATE-SERVER returned
+5 NEW FAC,XTRNL
+6 SET FAC=$$GETPTR^HDISVF10($GET(SYSPTR))
+7 IF 'FAC
QUIT "HDIS-STATUS-UPDATE-SERVER"
+8 SET XTRNL=$$GET^HDISVF02(7118.29,41,(FAC_","),"E")
+9 IF XTRNL=""
QUIT "HDIS-STATUS-UPDATE-SERVER"
+10 QUIT XTRNL
+11 ;
SETSSRV(VALUE,SYSPTR) ;Set value of STATUS SERVER OPTION field (#41)
+1 ; Input : VALUE - New value (internal or external)
+2 ; : SYSPTR - Pointer to HDIS System file
+3 ; (default to current system)
+4 ;Output : None
+5 NEW FAC,X
+6 SET FAC=$$GETPTR^HDISVF10($GET(SYSPTR))
+7 IF 'FAC
QUIT
+8 SET X=$$SET^HDISVF02(7118.29,41,(FAC_","),$GET(VALUE),1)
+9 QUIT
+10 ;
GETNSVL(SYSPTR) ;Get value of LAST NON-STANDARD VUID field (#51)
+1 ; Input : SYSPTR - Pointer to HDIS System file
+2 ; (default to current system)
+3 ;Output : Value of field
+4 ; Notes : If no value found, null ("") returned
+5 NEW FAC,XTRNL
+6 SET FAC=$$GETPTR^HDISVF10($GET(SYSPTR))
+7 IF 'FAC
QUIT ""
+8 SET XTRNL=$$GET^HDISVF02(7118.29,51,(FAC_","),"E")
+9 QUIT XTRNL
+10 ;
GETNSVE(SYSPTR) ;Get value of ENDING NON-STANDARD VUID field (#52)
+1 ; Input : SYSPTR - Pointer to HDIS System file
+2 ; (default to current system)
+3 ;Output : Value of field
+4 ; Notes : If no value found, null ("") returned
+5 NEW FAC,XTRNL
+6 SET FAC=$$GETPTR^HDISVF10($GET(SYSPTR))
+7 IF 'FAC
QUIT ""
+8 SET XTRNL=$$GET^HDISVF02(7118.29,52,(FAC_","),"E")
+9 QUIT XTRNL
+10 ;
CALCNSV(SYSPTR) ;Calculate next non-standard VUID
+1 ; Input : SYSPTR - Pointer to HDIS System file
+2 ; (default to current system)
+3 ;Output : Next non-standard VUID centralized VUID server should
+4 ; use when assigning non-standard VUIDs.
+5 ; Notes : LAST NON-STANDARD VUID field (#51) updated with
+6 ; calculated value
+7 ; : Locking implemented to prevent simultaneous calculations
+8 ; : Null ("") returned on error OR if calculated value exceeds
+9 ; allowed ending value (ENDING NON-STANDARD VUID field, #52)
+10 NEW FAC,CVUID,NVUID,EVUID,OK,X
+11 SET FAC=$$GETPTR^HDISVF10($GET(SYSPTR))
+12 IF 'FAC
QUIT ""
+13 SET OK=0
+14 FOR X=1:1:10
if OK
QUIT
LOCK +^HDISF(7118.29,"CALCULATE NEXT VUID"):1
if $TEST
SET OK=1
IF 'OK
HANG 1
+15 IF 'OK
QUIT ""
+16 SET CVUID=$$GETNSVL($GET(SYSPTR))
+17 SET EVUID=$$GETNSVE($GET(SYSPTR))
+18 IF (CVUID="")!(EVUID="")
LOCK -^HDISF(7118.29,"CALCULATE NEXT VUID")
QUIT ""
+19 SET NVUID=CVUID+1
+20 IF NVUID>EVUID
LOCK -^HDISF(7118.29,"CALCULATE NEXT VUID")
QUIT ""
+21 SET X=$$SET^HDISVF02(7118.29,51,(FAC_","),NVUID,1)
+22 LOCK -^HDISF(7118.29,"CALCULATE NEXT VUID")
+23 QUIT NVUID
+24 ;
+25 ;---------- End HDIS PARAMETER file APIs ----------