Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: SDES2VAL200

SDES2VAL200.m

Go to the documentation of this file.
SDES2VAL200 ;ALB/MGD/BLB - SDES2 NEW PERSON UTILITIES ;July 7, 2023
 ;;5.3;Scheduling;**853,875**;Aug 13, 1993;Build 25
 ;;Per VHA Directive 6402, this routine should not be modified
 ;
 ; Reference to ^VA(200 in #10060
 ; Reference to $$FIND1^DIC in ICR #2051
 ; Reference to $$ACTIVE^XUSER IN ICR #2343
 ; Reference to $$PROVIDER^XUSER IN ICE #2343
 ; Reference to $$ACTIVPRV^PXAPI IN ICR #2349
 ;
 Q
 ;
VALUSERDUZ(SDERRORS,SDUSERDUZ,SDISREQUIRED) ; Validate DUZ
 I SDUSERDUZ="",$G(SDISREQUIRED) D ERRLOG^SDES2JSON(.SDERRORS,441) Q
 I SDUSERDUZ="" Q
 I '$D(^VA(200,SDUSERDUZ,0)) D ERRLOG^SDES2JSON(.SDERRORS,442,""_SDUSERDUZ) Q
 I $$GET1^DIQ(200,SDUSERDUZ,.01,"E")="SDESOITEAS,SRV" Q
 I '$$ACTIVE^XUSER(SDUSERDUZ) D ERRLOG^SDES2JSON(.SDERRORS,458)
 Q
 ;
VALPROVIDER(SDERRORS,SDPROV,SDISREQUIRED) ; Validate Provider
 N SDPROVSTATUS
 I SDPROV="",$G(SDISREQUIRED) D ERRLOG^SDES2JSON(.SDERRORS,53) Q
 I SDPROV="" Q
 I '$D(^VA(200,SDPROV,0)) D ERRLOG^SDES2JSON(.SDERRORS,54) Q
 S SDPROVSTATUS=$$PROVIDER^XUSER(SDPROV)
 I '+SDPROVSTATUS D
 . I $P(SDPROVSTATUS,U,2)="NOT A PROVIDER" D ERRLOG^SDES2JSON(.SDERRORS,52,"User is not a provider."_SDPROV) Q
 . I $P(SDPROVSTATUS,U,2)="TERMINATED" D ERRLOG^SDES2JSON(.SDERRORS,460,SDPROV) Q
 I '$$ACTIVPRV^PXAPI(SDPROV,DT) D ERRLOG^SDES2JSON(.SDERRORS,460) Q  ;DBIA #2349
 Q
 ;
VALACTIVUSER(SDERRORS,SDUSERDUZ) ; Active User
 Q '$$ACTIVE^XUSER(SDUSERDUZ)
 ;
VALSECID(SDERRORS,SDSECID) ;
 I SDSECID="" Q
 I $L(SDSECID)<3!$L(SDSECID)>40 D ERRLOG^SDES2JSON(.SDERRORS,156) Q
 I '$$FIND1^DIC(200,,"X",SDSECID,"ASECID",,"SCERR") D ERRLOG^SDES2JSON(.SDERRORS,156)
 Q