SDESGETAPPTTYPE ;ALB/BLB,TJB - SDES GET APPT TYPE RPC ;Oct 05, 2023
;;5.3;Scheduling;**842,864**;Aug 13, 1993;Build 15
;;Per VHA Directive 6402, this routine should not be modified
Q
;
GETTYPES(JSONRETURN) ;
N RETURN,APPTTYPES
;
D BUILD(.APPTTYPES)
M RETURN=APPTTYPES D BUILDJSON(.JSONRETURN,.RETURN)
Q
;
BUILD(APPTTYPES) ;
N COUNT,APPTTYPEIEN
;
S APPTTYPEIEN=0,COUNT=0
F S APPTTYPEIEN=$O(^SD(409.1,APPTTYPEIEN)) Q:'APPTTYPEIEN D
. Q:$$GET1^DIQ(409.1,APPTTYPEIEN,3,"I")
. S COUNT=COUNT+1
. S APPTTYPES("AppointmentTypes",COUNT)=$$GET1^DIQ(409.1,APPTTYPEIEN,.01,"E")
Q
;
BUILDJSON(JSONRETURN,RETURN) ;
D ENCODE^XLFJSON("RETURN","JSONRETURN")
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSDESGETAPPTTYPE 695 printed Nov 22, 2024@18:06:32 Page 2
SDESGETAPPTTYPE ;ALB/BLB,TJB - SDES GET APPT TYPE RPC ;Oct 05, 2023
+1 ;;5.3;Scheduling;**842,864**;Aug 13, 1993;Build 15
+2 ;;Per VHA Directive 6402, this routine should not be modified
+3 QUIT
+4 ;
GETTYPES(JSONRETURN) ;
+1 NEW RETURN,APPTTYPES
+2 ;
+3 DO BUILD(.APPTTYPES)
+4 MERGE RETURN=APPTTYPES
DO BUILDJSON(.JSONRETURN,.RETURN)
+5 QUIT
+6 ;
BUILD(APPTTYPES) ;
+1 NEW COUNT,APPTTYPEIEN
+2 ;
+3 SET APPTTYPEIEN=0
SET COUNT=0
+4 FOR
SET APPTTYPEIEN=$ORDER(^SD(409.1,APPTTYPEIEN))
if 'APPTTYPEIEN
QUIT
Begin DoDot:1
+5 if $$GET1^DIQ(409.1,APPTTYPEIEN,3,"I")
QUIT
+6 SET COUNT=COUNT+1
+7 SET APPTTYPES("AppointmentTypes",COUNT)=$$GET1^DIQ(409.1,APPTTYPEIEN,.01,"E")
End DoDot:1
+8 QUIT
+9 ;
BUILDJSON(JSONRETURN,RETURN) ;
+1 DO ENCODE^XLFJSON("RETURN","JSONRETURN")
+2 QUIT
+3 ;