SDES2SPACEBAR ;ALB/ANU - VISTA SCHEDULING RPC SDES2 GET VIDEO VISIT PROV ;JAN 22, 2024@17:00
;;5.3;Scheduling;**871**;;Build 13
;;Per VHA Directive 6402, this routine should not be modified
;
; Reference to ^XTV(8989.3.1,XUS in ICR #1518
Q
;
; INPUT
;
; SDCONTEXT("ACHERON AUDIT ID") = Up to 40 Character unique ID number. Ex: 11d9dcc6-c6a2-4785-8031-8261576fca37
; SDCONTEXT("USER DUZ") = The DUZ of the user taking action in the calling application.
; SDCONTEXT("USER SECID") = The SECID of the user taking action in the calling application.
; SDCONTEXT("PATIENT DFN") = The DFN/IEN of the target patient from the calling application.
; SDCONTEXT("PATIENT ICN") = The ICN of the target patient from the calling application.
;
GETSPACEBARPRO(JSON,SDCONTEXT,SDINPUT) ;return Video Visit Provider
N ERRORS,SDRETURN,PARAMETERS,FDA,SDCHECKIN,IEN,ENTRY,SDUSER
;
; Validate SDCONTEXT
;
D VALCONTEXT^SDES2VALCONTEXT(.ERRORS,.SDCONTEXT)
I $D(ERRORS) S ERRORS("VVSProvider",1)="" D BUILDJSON^SDES2JSON(.JSON,.ERRORS) Q
;
S SDUSER=$S(+$G(SDCONTEXT("USER DUZ")):+SDCONTEXT("USER DUZ"),1:$G(DUZ))
D GETSPACEBAR(.SDRETURN,SDUSER)
I '$D(SDRETURN) S SDRETURN("VVSProvider",1)=""
D BUILDJSON^SDES2JSON(.JSON,.SDRETURN)
Q
;
GETSPACEBAR(SDRETURN,SDUSER) ;return Video Visit Provider
N RETURN,ERRORS,HASFIELDS,RETURN,ELGFIELDSARRARY
N PROVIDERIEN,VVSPRORETURN
I $D(^DISV(SDUSER,"^VA(200,")) D
.S PROVIDERIEN=^DISV(SDUSER,"^VA(200,")
.D GETPROINFO(.VVSPRORETURN,PROVIDERIEN,SDUSER)
I '$D(^DISV(SDUSER,"^VA(200,")),$D(^TMP(SDUSER,"SDECPROIEN")) D
.S PROVIDERIEN=^TMP(SDUSER,"SDECPROIEN")
.D GETPROINFO(.VVSPRORETURN,PROVIDERIEN,SDUSER)
S VVSPRORETURN=$G(VVSPRORETURN)
I VVSPRORETURN'="" D
.S SDRETURN("VVSProvider","ProviderIEN")=$P(VVSPRORETURN,"^",1)
.S SDRETURN("VVSProvider","ProviderName")=$P(VVSPRORETURN,"^",2)
.S SDRETURN("VVSProvider","ProviderEmail")=$P(VVSPRORETURN,"^",3)
.S SDRETURN("VVSProvider","ProviderCell")=$P(VVSPRORETURN,"^",4)
.S SDRETURN("VVSProvider","ProviderTitle")=$P(VVSPRORETURN,"^",5)
.S SDRETURN("VVSProvider","ProviderClass")=$P(VVSPRORETURN,"^",6)
Q
;
GETPROINFO(RETURN,PROVIDERIEN,SDUSER) ;GET PROVIDER INFO REQUIRED TO MAKE VIDEO VISIT SERVICE (VVS) CALL
Q:PROVIDERIEN=""
N NAME,EMAIL,CELL,TITLE,PROVCLASS
S NAME=$$GET1^DIQ(200,PROVIDERIEN,.01)
S EMAIL=$$GET1^DIQ(200,PROVIDERIEN,.151)
S CELL=$$GET1^DIQ(200,PROVIDERIEN,.133)
S TITLE=$$GET1^DIQ(200,PROVIDERIEN,8,"E")
S PROVCLASS=$$GET1^DIQ(200,PROVIDERIEN,53.5,"E")
S RETURN=PROVIDERIEN_"^"_NAME_"^"_EMAIL_"^"_CELL_"^"_TITLE_"^"_PROVCLASS
S ^TMP(SDUSER,"SDECPROIEN")=PROVIDERIEN
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSDES2SPACEBAR 2665 printed Nov 22, 2024@18:04:35 Page 2
SDES2SPACEBAR ;ALB/ANU - VISTA SCHEDULING RPC SDES2 GET VIDEO VISIT PROV ;JAN 22, 2024@17:00
+1 ;;5.3;Scheduling;**871**;;Build 13
+2 ;;Per VHA Directive 6402, this routine should not be modified
+3 ;
+4 ; Reference to ^XTV(8989.3.1,XUS in ICR #1518
+5 QUIT
+6 ;
+7 ; INPUT
+8 ;
+9 ; SDCONTEXT("ACHERON AUDIT ID") = Up to 40 Character unique ID number. Ex: 11d9dcc6-c6a2-4785-8031-8261576fca37
+10 ; SDCONTEXT("USER DUZ") = The DUZ of the user taking action in the calling application.
+11 ; SDCONTEXT("USER SECID") = The SECID of the user taking action in the calling application.
+12 ; SDCONTEXT("PATIENT DFN") = The DFN/IEN of the target patient from the calling application.
+13 ; SDCONTEXT("PATIENT ICN") = The ICN of the target patient from the calling application.
+14 ;
GETSPACEBARPRO(JSON,SDCONTEXT,SDINPUT) ;return Video Visit Provider
+1 NEW ERRORS,SDRETURN,PARAMETERS,FDA,SDCHECKIN,IEN,ENTRY,SDUSER
+2 ;
+3 ; Validate SDCONTEXT
+4 ;
+5 DO VALCONTEXT^SDES2VALCONTEXT(.ERRORS,.SDCONTEXT)
+6 IF $DATA(ERRORS)
SET ERRORS("VVSProvider",1)=""
DO BUILDJSON^SDES2JSON(.JSON,.ERRORS)
QUIT
+7 ;
+8 SET SDUSER=$SELECT(+$GET(SDCONTEXT("USER DUZ")):+SDCONTEXT("USER DUZ"),1:$GET(DUZ))
+9 DO GETSPACEBAR(.SDRETURN,SDUSER)
+10 IF '$DATA(SDRETURN)
SET SDRETURN("VVSProvider",1)=""
+11 DO BUILDJSON^SDES2JSON(.JSON,.SDRETURN)
+12 QUIT
+13 ;
GETSPACEBAR(SDRETURN,SDUSER) ;return Video Visit Provider
+1 NEW RETURN,ERRORS,HASFIELDS,RETURN,ELGFIELDSARRARY
+2 NEW PROVIDERIEN,VVSPRORETURN
+3 IF $DATA(^DISV(SDUSER,"^VA(200,"))
Begin DoDot:1
+4 SET PROVIDERIEN=^DISV(SDUSER,"^VA(200,")
+5 DO GETPROINFO(.VVSPRORETURN,PROVIDERIEN,SDUSER)
End DoDot:1
+6 IF '$DATA(^DISV(SDUSER,"^VA(200,"))
IF $DATA(^TMP(SDUSER,"SDECPROIEN"))
Begin DoDot:1
+7 SET PROVIDERIEN=^TMP(SDUSER,"SDECPROIEN")
+8 DO GETPROINFO(.VVSPRORETURN,PROVIDERIEN,SDUSER)
End DoDot:1
+9 SET VVSPRORETURN=$GET(VVSPRORETURN)
+10 IF VVSPRORETURN'=""
Begin DoDot:1
+11 SET SDRETURN("VVSProvider","ProviderIEN")=$PIECE(VVSPRORETURN,"^",1)
+12 SET SDRETURN("VVSProvider","ProviderName")=$PIECE(VVSPRORETURN,"^",2)
+13 SET SDRETURN("VVSProvider","ProviderEmail")=$PIECE(VVSPRORETURN,"^",3)
+14 SET SDRETURN("VVSProvider","ProviderCell")=$PIECE(VVSPRORETURN,"^",4)
+15 SET SDRETURN("VVSProvider","ProviderTitle")=$PIECE(VVSPRORETURN,"^",5)
+16 SET SDRETURN("VVSProvider","ProviderClass")=$PIECE(VVSPRORETURN,"^",6)
End DoDot:1
+17 QUIT
+18 ;
GETPROINFO(RETURN,PROVIDERIEN,SDUSER) ;GET PROVIDER INFO REQUIRED TO MAKE VIDEO VISIT SERVICE (VVS) CALL
+1 if PROVIDERIEN=""
QUIT
+2 NEW NAME,EMAIL,CELL,TITLE,PROVCLASS
+3 SET NAME=$$GET1^DIQ(200,PROVIDERIEN,.01)
+4 SET EMAIL=$$GET1^DIQ(200,PROVIDERIEN,.151)
+5 SET CELL=$$GET1^DIQ(200,PROVIDERIEN,.133)
+6 SET TITLE=$$GET1^DIQ(200,PROVIDERIEN,8,"E")
+7 SET PROVCLASS=$$GET1^DIQ(200,PROVIDERIEN,53.5,"E")
+8 SET RETURN=PROVIDERIEN_"^"_NAME_"^"_EMAIL_"^"_CELL_"^"_TITLE_"^"_PROVCLASS
+9 SET ^TMP(SDUSER,"SDECPROIEN")=PROVIDERIEN
+10 QUIT
+11 ;