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

SDECDUZ.m

Go to the documentation of this file.
  1. SDECDUZ ;ALB/TAW - Return DUZ data ;Jan 7, 2022
  1. ;;5.3;Scheduling;**803,804,805**;Aug 13, 1993;Build 9
  1. ;;Per VHA Directive 6402, this routine should not be modified
  1. ;
  1. ; ICR
  1. ; Reference to ^DIC(4, in #2251
  1. ; Reference to ^XTV(8989.3,1,XUS in #1518
  1. Q
  1. DUZSTATIONID(RETURN) ;
  1. N STATIONID,DATA
  1. ;#804 change from DUZ(2) to station ID for the default institution
  1. S STATIONID=$$DEFAULTSTATION()
  1. I STATIONID'="" S DATA("Station_ID")=STATIONID
  1. E S DATA("Error",1)="Default Institution not defined"
  1. D ENCODE^SDESJSON(.DATA,.RETURN)
  1. Q
  1. DEFAULTSTATION() ;
  1. N INST,STATION
  1. S STATION=""
  1. S INST=$$GET1^DIQ(8989.3,1,217,"I") ;default inst
  1. I INST'="" S STATION=$$GET1^DIQ(4,INST,99,"I") ;station num
  1. Q STATION