YTQAPI5A ;DXC/ART - Save MH Administration Record API ;10/23/2017
;;5.01;MENTAL HEALTH;**132,221**;Dec 30, 1994;Build 11
;
QUIT
;
SAVEADM(YSDATA,YS) ; Create a new or update an existing administration
; RPC: YTQ SAVE ADMIN, replaces call to YTQ SAVE which is too open ended
;Input: YS("IEN")= the internal number of the record to edit.
; Leave blank if creating a new record. If creating a new record you must
; send .01^NEW in YS(1).
; YS(1)=FIELD #^Value^[3rd piece]
; YS(x)=FIELD #^Value^[3rd piece]
; [3rd piece] = 1 to bypass validation
; Data values must be external format - or `IEN
;Output: YSDATA(1)=[DATA] or [ERROR]
;
SET YS("FILEN")=601.84 ; force to MH ADMINISTRATION
N I S I=0
F S I=$O(YS(I)) Q:'I I $P(YS(I),U)="15" S YS(I)="15^`"_$$SRC^YTQAPI1($P(YS(I),U,2))
DO EDAD^YTQAPI1(.YSDATA,.YS) ; then call previous entry point
QUIT
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HYTQAPI5A 960 printed Nov 22, 2024@17:28:23 Page 2
YTQAPI5A ;DXC/ART - Save MH Administration Record API ;10/23/2017
+1 ;;5.01;MENTAL HEALTH;**132,221**;Dec 30, 1994;Build 11
+2 ;
+3 QUIT
+4 ;
SAVEADM(YSDATA,YS) ; Create a new or update an existing administration
+1 ; RPC: YTQ SAVE ADMIN, replaces call to YTQ SAVE which is too open ended
+2 ;Input: YS("IEN")= the internal number of the record to edit.
+3 ; Leave blank if creating a new record. If creating a new record you must
+4 ; send .01^NEW in YS(1).
+5 ; YS(1)=FIELD #^Value^[3rd piece]
+6 ; YS(x)=FIELD #^Value^[3rd piece]
+7 ; [3rd piece] = 1 to bypass validation
+8 ; Data values must be external format - or `IEN
+9 ;Output: YSDATA(1)=[DATA] or [ERROR]
+10 ;
+11 ; force to MH ADMINISTRATION
SET YS("FILEN")=601.84
+12 NEW I
SET I=0
+13 FOR
SET I=$ORDER(YS(I))
if 'I
QUIT
IF $PIECE(YS(I),U)="15"
SET YS(I)="15^`"_$$SRC^YTQAPI1($PIECE(YS(I),U,2))
+14 ; then call previous entry point
DO EDAD^YTQAPI1(.YSDATA,.YS)
+15 QUIT