MDRPCOTA ; HOIFO/NCA - Object RPCs (TMDTransaction) Continued 2;10/29/04 12:20 ;3/12/08 09:18
;;1.0;CLINICAL PROCEDURES;**20**;Apr 01, 2004;Build 9
; Integration Agreements:
; IA# 3468 [Subscription] GMRCCP API.
;
GETCS(MDNP1) ; [Function] Return the next procedure request.
N MDNLL,MDNFG,MDNNOD,MDNR,MDNX K ^TMP("MDNREQ",$J) S (MDNFG,MDNR)=0
S MDNNOD=$G(^MDD(702,+MDNP1,0)) Q:MDNNOD="" 0
D CPLIST^GMRCCP(+MDNNOD,+$P(MDNNOD,"^",4),$NA(^TMP("MDNREQ",$J)))
S MDNLL="" F S MDNLL=$O(^TMP("MDNREQ",$J,MDNLL),-1) Q:MDNLL<1!(+MDNFG) S MDNX=$G(^(MDNLL)) D
.I "saprc"[$P(MDNX,U,4) S MDNFG=1,MDNR=$P(MDNX,U,5) Q
.Q
Q MDNR
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMDRPCOTA 640 printed Nov 22, 2024@16:54:21 Page 2
MDRPCOTA ; HOIFO/NCA - Object RPCs (TMDTransaction) Continued 2;10/29/04 12:20 ;3/12/08 09:18
+1 ;;1.0;CLINICAL PROCEDURES;**20**;Apr 01, 2004;Build 9
+2 ; Integration Agreements:
+3 ; IA# 3468 [Subscription] GMRCCP API.
+4 ;
GETCS(MDNP1) ; [Function] Return the next procedure request.
+1 NEW MDNLL,MDNFG,MDNNOD,MDNR,MDNX
KILL ^TMP("MDNREQ",$JOB)
SET (MDNFG,MDNR)=0
+2 SET MDNNOD=$GET(^MDD(702,+MDNP1,0))
if MDNNOD=""
QUIT 0
+3 DO CPLIST^GMRCCP(+MDNNOD,+$PIECE(MDNNOD,"^",4),$NAME(^TMP("MDNREQ",$JOB)))
+4 SET MDNLL=""
FOR
SET MDNLL=$ORDER(^TMP("MDNREQ",$JOB,MDNLL),-1)
if MDNLL<1!(+MDNFG)
QUIT
SET MDNX=$GET(^(MDNLL))
Begin DoDot:1
+5 IF "saprc"[$PIECE(MDNX,U,4)
SET MDNFG=1
SET MDNR=$PIECE(MDNX,U,5)
QUIT
+6 QUIT
End DoDot:1
+7 QUIT MDNR