SDESGETALLCANCOM ;ALB/BLB - SDES GET ALL CANCEL COMMENTS ;NOV 22, 2022
;;5.3;Scheduling;**837**;Aug 13, 1993;Build 4
;;Per VHA Directive 6402, this routine should not be modified
;
Q
;
N RETURN,COMMENTS
;
D BUILD(.COMMENTS)
M RETURN=COMMENTS D BUILDJSON(.JSONRETURN,.RETURN)
Q
;
BUILD(COMMENTS) ;
N COUNT,COMMENTIEN
;
S COMMENTIEN=0,COUNT=0
F S COMMENTIEN=$O(^SDEC(409.88,COMMENTIEN)) Q:'COMMENTIEN D
.S COUNT=COUNT+1
.S COMMENTS("CancelComments",COUNT,"HashTag")=$$GET1^DIQ(409.88,COMMENTIEN,.01,"E")
.S COMMENTS("CancelComments",COUNT,"Comment")=$$GET1^DIQ(409.88,COMMENTIEN,1,"E")
.S COMMENTS("CancelComments",COUNT,"NationalFlag")=$$GET1^DIQ(409.88,COMMENTIEN,2,"I")
Q
;
BUILDJSON(JSONRETURN,RETURN) ;
D ENCODE^XLFJSON("RETURN","JSONRETURN")
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSDESGETALLCANCOM 830 printed Nov 22, 2024@18:06:27 Page 2
SDESGETALLCANCOM ;ALB/BLB - SDES GET ALL CANCEL COMMENTS ;NOV 22, 2022
+1 ;;5.3;Scheduling;**837**;Aug 13, 1993;Build 4
+2 ;;Per VHA Directive 6402, this routine should not be modified
+3 ;
+4 QUIT
+5 ;
+1 NEW RETURN,COMMENTS
+2 ;
+3 DO BUILD(.COMMENTS)
+4 MERGE RETURN=COMMENTS
DO BUILDJSON(.JSONRETURN,.RETURN)
+5 QUIT
+6 ;
BUILD(COMMENTS) ;
+1 NEW COUNT,COMMENTIEN
+2 ;
+3 SET COMMENTIEN=0
SET COUNT=0
+4 FOR
SET COMMENTIEN=$ORDER(^SDEC(409.88,COMMENTIEN))
if 'COMMENTIEN
QUIT
Begin DoDot:1
+5 SET COUNT=COUNT+1
+6 SET COMMENTS("CancelComments",COUNT,"HashTag")=$$GET1^DIQ(409.88,COMMENTIEN,.01,"E")
+7 SET COMMENTS("CancelComments",COUNT,"Comment")=$$GET1^DIQ(409.88,COMMENTIEN,1,"E")
+8 SET COMMENTS("CancelComments",COUNT,"NationalFlag")=$$GET1^DIQ(409.88,COMMENTIEN,2,"I")
End DoDot:1
+9 QUIT
+10 ;
BUILDJSON(JSONRETURN,RETURN) ;
+1 DO ENCODE^XLFJSON("RETURN","JSONRETURN")
+2 QUIT
+3 ;