IBCE837N ;EDE/JWS - RPC TO RETURN EXTERNAL CLAIM NUMBER FOR IEN
;;2.0;INTEGRATED BILLING;**718**;23-MAY-18;Build 73
;;Per VA Directive 6402, this routine should not be modified.
;
GET(RESULT,ARG) ; return external claim # from internal number (IEN)
;
N RES,DILOCKTM,DISYS,DT,DTIME,IO,IBIEN,SITE,IBCLM
K RESULT
D DTNOLF^DICRW
S IBIEN=ARG("IEN399")
;;I IBIEN="" S RES("status")="No Claim IEN value passed" G RET
S SITE=$P($$SITE^VASITE(),"^",3)
I IBIEN'="" D
. S IBCLM=$$GET1^DIQ(399,IBIEN_",",.01)
. ;;I X="" S RES("status")="Claim IEN "_IBIEN_" does not exist on Site "_SITE G RET
. ;;I X="" S RES("ien")=IBIEN, RES("claim")="undefined", RES("site")=SITE G RET
. ;;S RES("status")="Claim IEN "_IBIEN_" is for Claim# "_X_" on Site "_SITE
S RES("ien")=$S(IBIEN:IBIEN,1:0)
S RES("site")=SITE
S RES("claim")=$S($G(IBCLM)'="":IBCLM,1:"undefined")
;
RET ; setup return JSON
; create JSON structured message
D ENCODE^XLFJSONE("RES","RESULT")
D FINISH^IBCE837I
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIBCE837N 1008 printed Dec 13, 2024@02:09:32 Page 2
IBCE837N ;EDE/JWS - RPC TO RETURN EXTERNAL CLAIM NUMBER FOR IEN
+1 ;;2.0;INTEGRATED BILLING;**718**;23-MAY-18;Build 73
+2 ;;Per VA Directive 6402, this routine should not be modified.
+3 ;
GET(RESULT,ARG) ; return external claim # from internal number (IEN)
+1 ;
+2 NEW RES,DILOCKTM,DISYS,DT,DTIME,IO,IBIEN,SITE,IBCLM
+3 KILL RESULT
+4 DO DTNOLF^DICRW
+5 SET IBIEN=ARG("IEN399")
+6 ;;I IBIEN="" S RES("status")="No Claim IEN value passed" G RET
+7 SET SITE=$PIECE($$SITE^VASITE(),"^",3)
+8 IF IBIEN'=""
Begin DoDot:1
+9 SET IBCLM=$$GET1^DIQ(399,IBIEN_",",.01)
+10 ;;I X="" S RES("status")="Claim IEN "_IBIEN_" does not exist on Site "_SITE G RET
+11 ;;I X="" S RES("ien")=IBIEN, RES("claim")="undefined", RES("site")=SITE G RET
+12 ;;S RES("status")="Claim IEN "_IBIEN_" is for Claim# "_X_" on Site "_SITE
End DoDot:1
+13 SET RES("ien")=$SELECT(IBIEN:IBIEN,1:0)
+14 SET RES("site")=SITE
+15 SET RES("claim")=$SELECT($GET(IBCLM)'="":IBCLM,1:"undefined")
+16 ;
RET ; setup return JSON
+1 ; create JSON structured message
+2 DO ENCODE^XLFJSONE("RES","RESULT")
+3 DO FINISH^IBCE837I
+4 QUIT
+5 ;