MBAAMAPI ;OIT-PD/VSL - APPOINTMENT API UTILS ;02/10/2016
;;1.0;Scheduling Calendar View;**1**;Aug 27, 2014;Build 85
;
;Associated ICRs
; ICR#
; 10103 XLFDT
;
BLDLST(RETURN,LST,FLDS) ; Build simple list. MBAA RPC: MBAA CANCEL APPOINTMENT, MBAA LIST CANCELLATION REASONS, MBAA APPOINTMENT MAKE
N DL,IN,FLD
S RETURN=0
Q:'$D(LST)
S RETURN(0)=LST("DILIST",0)
S DL="DILIST"
F IN=1:1:$P(RETURN(0),U,1) D
. S RETURN(IN)=""
. S RETURN(IN,"ID")=LST(DL,2,IN)
. I $O(LST(DL,"ID",IN,".01",""))'="" D
. . S RETURN(IN,"NAME")=$G(LST(DL,"ID",IN,".01","I"))_"^"_LST(DL,"ID",IN,".01","E")
. E S RETURN(IN,"NAME")=LST(DL,"ID",IN,".01")
. I $D(FLDS) D
. . F FLD=0:0 S FLD=$O(FLDS(FLD)) Q:FLD="" D
. . . I $O(LST(DL,"ID",IN,FLD,""))'="" D
. . . . S RETURN(IN,FLDS(FLD))=$G(LST(DL,"ID",IN,FLD,"I"))_"^"_LST(DL,"ID",IN,FLD,"E")
. . . E S RETURN(IN,FLDS(FLD))=LST(DL,"ID",IN,FLD)
S RETURN=1
Q
;
DTS(SD) ; Return formated date (07/16/2012) Called by RPC MBAA APPOINTMENT MAKE
Q $TR($$FMTE^XLFDT(SD,"5DF")," ","0") ;ICR#: 10103 XLFDT
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMBAAMAPI 1072 printed Oct 16, 2024@18:15:35 Page 2
MBAAMAPI ;OIT-PD/VSL - APPOINTMENT API UTILS ;02/10/2016
+1 ;;1.0;Scheduling Calendar View;**1**;Aug 27, 2014;Build 85
+2 ;
+3 ;Associated ICRs
+4 ; ICR#
+5 ; 10103 XLFDT
+6 ;
BLDLST(RETURN,LST,FLDS) ; Build simple list. MBAA RPC: MBAA CANCEL APPOINTMENT, MBAA LIST CANCELLATION REASONS, MBAA APPOINTMENT MAKE
+1 NEW DL,IN,FLD
+2 SET RETURN=0
+3 if '$DATA(LST)
QUIT
+4 SET RETURN(0)=LST("DILIST",0)
+5 SET DL="DILIST"
+6 FOR IN=1:1:$PIECE(RETURN(0),U,1)
Begin DoDot:1
+7 SET RETURN(IN)=""
+8 SET RETURN(IN,"ID")=LST(DL,2,IN)
+9 IF $ORDER(LST(DL,"ID",IN,".01",""))'=""
Begin DoDot:2
+10 SET RETURN(IN,"NAME")=$GET(LST(DL,"ID",IN,".01","I"))_"^"_LST(DL,"ID",IN,".01","E")
End DoDot:2
+11 IF '$TEST
SET RETURN(IN,"NAME")=LST(DL,"ID",IN,".01")
+12 IF $DATA(FLDS)
Begin DoDot:2
+13 FOR FLD=0:0
SET FLD=$ORDER(FLDS(FLD))
if FLD=""
QUIT
Begin DoDot:3
+14 IF $ORDER(LST(DL,"ID",IN,FLD,""))'=""
Begin DoDot:4
+15 SET RETURN(IN,FLDS(FLD))=$GET(LST(DL,"ID",IN,FLD,"I"))_"^"_LST(DL,"ID",IN,FLD,"E")
End DoDot:4
+16 IF '$TEST
SET RETURN(IN,FLDS(FLD))=LST(DL,"ID",IN,FLD)
End DoDot:3
End DoDot:2
End DoDot:1
+17 SET RETURN=1
+18 QUIT
+19 ;
DTS(SD) ; Return formated date (07/16/2012) Called by RPC MBAA APPOINTMENT MAKE
+1 ;ICR#: 10103 XLFDT
QUIT $TRANSLATE($$FMTE^XLFDT(SD,"5DF")," ","0")
+2 ;