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

SDESVALUTIL.m

Go to the documentation of this file.
SDESVALUTIL ;ALB/BWF - VISTA SCHEDULING VALIDATION UTILITIES ;SEP 22, 2022
 ;;5.3;Scheduling;**826,835**;Aug 13, 1993;Build 4
 ;;Per VHA Directive 6402, this routine should not be modified
 ;
 Q
 ; validate appointment ID/IEN
VALAPPTIEN(ERRORS,APPTIEN) ;
 I '$L(APPTIEN) D ERRLOG^SDESJSON(.ERRORS,14) Q
 I 'APPTIEN D ERRLOG^SDESJSON(.ERRORS,15) Q
 I APPTIEN,'$D(^SDEC(409.84,APPTIEN)) D ERRLOG^SDESJSON(.ERRORS,15)
 Q
 ; validate ISO date - generic missing/invalid message
VALDATE(ERRORS,DATE,CLINIC) ;
 N FMSDATE
 I DATE="" D ERRLOG^SDESJSON(.ERRORS,45) Q ""
 S FMSDATE=$$ISOTFM^SDAMUTDT(DATE,$G(CLINIC))
 I FMSDATE<1 D ERRLOG^SDESJSON(.ERRORS,46) Q ""
 Q FMSDATE
 ; validate a date using specific error codes from 409.93
VALDATE2(ERRORS,DATE,CLINIC,MISSINGERRID,INVALIDERRID) ;
 N FMSDATE,MISSINGID,INVALIDID
 S MISSINGID=$S($G(MISSINGERRID):MISSINGERRID,1:45)
 S INVALIDID=$S($G(INVALIDERRID):INVALIDERRID,1:46)
 I DATE="" D ERRLOG^SDESJSON(.ERRORS,MISSINGID) Q ""
 S FMSDATE=$$ISOTFM^SDAMUTDT(DATE,$G(CLINIC))
 I FMSDATE<1 D ERRLOG^SDESJSON(.ERRORS,INVALIDID) Q ""
 Q FMSDATE
 ; validate SD SUPERVISOR key
VALKEY(ERRORS,DUZ) ;
 I '$$KCHK^XUSRB("SD SUPERVISOR",DUZ) D ERRLOG^SDESJSON(.ERRORS,316)
 Q