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

SDESGETDISPREASN.m

Go to the documentation of this file.
  1. SDESGETDISPREASN ;ALB/TJB - SDES GET DISPOSITION REASON ;JUNE 5, 2023
  1. ;;5.3;Scheduling;**846**;Aug 13, 1993;Build 12
  1. ;;Per VHA Directive 6402, this routine should not be modified
  1. ;
  1. Q
  1. DISPOSITIONREAS(JSONRETURN,SDCONTEXT) ;
  1. ; Any information in SDCONTEXT ARRAY is currently ignored. All entries
  1. ; in file 409.853 ui returned
  1. N DATA,INDEX,DCNT,SDARRAY,PACKDATA
  1. K DATA D LIST^DIC(409.853,,,"P",,,,,,,"DATA")
  1. S (INDEX,DCNT)=0
  1. F S INDEX=$O(DATA("DILIST",INDEX)) Q:+INDEX'>0 D
  1. . S DCNT=DCNT+1
  1. . S PACKDATA=$G(DATA("DILIST",INDEX,0)),SDARRAY("Disposition Reasons",DCNT,"IEN")=$P(PACKDATA,U)
  1. . S SDARRAY("Disposition Reasons",DCNT,"Name")=$P(PACKDATA,U,2)
  1. . Q
  1. I '$D(SDARRAY) S SDARRAY("Disposition Reasons",1)=""
  1. D BUILDJSON^SDESBUILDJSON(.JSONRETURN,.SDARRAY)
  1. Q