DVBACREM ;ALB/RTW - REMARKS SENT TO CONTRACTORS;05/27/2015
;;2.7;AMIE;**192**;Apr 10, 1995;Build 15
; At WPGET This routine gets remarks sent to contractors,(from global 396.4),for a 2507 Exam Reqiest
; At WPSET This routine sets remarks sent to contractors,(from global 396.4),for a 2507 Exam Request
Q ;no direct entry
;
WPGET(DVBADATA,DVBEIEN) ;
;RPC: DVBA CAPRI GETCONTREMARKS
N DVBCR
K ^TMP("DVBA",$J)
S X=0
S DVBCR=0 F S DVBCR=$O(^DVB(396.4,DVBEIEN,6,DVBCR)) Q:'DVBCR D
. S DVBARMKS=$G(^DVB(396.4,DVBEIEN,6,DVBCR,0))
. S ^TMP("DVBA",$J,DVBCR)=DVBARMKS
S DVBCNT=0,DVBCNA=0 F S DVBCNA=$O(^TMP("DVBA",$J,DVBCNA)) Q:DVBCNA="" D
. S DVBAREM=$G(^TMP("DVBA",$J,DVBCNA))
. S DVBADATA(DVBCNT)=DVBAREM
. S DVBCNT=DVBCNT+1
K DVBCA,DVBCNT,DVBAREM,DVBARMKS,X
S RESULT=$NA(^TMP("DVBA",$J))
Q
;
WPSET(RESULT,DVBRIEN,DVBEIEN,DVBDATA) ;RPC: DVBA CAPRI SETCONTREMARKS
;DVBEIEN exam ien(s) example ** DVBEIEN="12736^12737^12738"
;DVBPEIN is the individual IENs pieced out.
K ^TMP("DVBA",$J)
S DVBPIEN=0 F DVBI=1:1 S DVBPIEN=$P(DVBEIEN,U,DVBI) Q:'DVBPIEN D
. D WPDATA
K DVBI,DVBRIEN,DVBPIEN,DVBCNT,DVBCNA
Q
WPDATA ;
S DVBLINE="",DVBCNT=1 F S DVBLINE=$O(DVBDATA(DVBLINE)) Q:DVBLINE="" D
.S ^TMP("DVBA",$J,"WP",DVBCNT)=$G(DVBDATA(DVBLINE))
.S DVBCNT=DVBCNT+1
S D0=DVBPIEN
D WP^DIE(396.4,DVBPIEN,103,"K","^TMP(""DVBA"",$J,""WP"")")
S RESULT=$NA(^TMP("DVB",$J))
K D0,DVBLINE,DVBCNT
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDVBACREM 1449 printed Nov 22, 2024@16:51:12 Page 2
DVBACREM ;ALB/RTW - REMARKS SENT TO CONTRACTORS;05/27/2015
+1 ;;2.7;AMIE;**192**;Apr 10, 1995;Build 15
+2 ; At WPGET This routine gets remarks sent to contractors,(from global 396.4),for a 2507 Exam Reqiest
+3 ; At WPSET This routine sets remarks sent to contractors,(from global 396.4),for a 2507 Exam Request
+4 ;no direct entry
QUIT
+5 ;
WPGET(DVBADATA,DVBEIEN) ;
+1 ;RPC: DVBA CAPRI GETCONTREMARKS
+2 NEW DVBCR
+3 KILL ^TMP("DVBA",$JOB)
+4 SET X=0
+5 SET DVBCR=0
FOR
SET DVBCR=$ORDER(^DVB(396.4,DVBEIEN,6,DVBCR))
if 'DVBCR
QUIT
Begin DoDot:1
+6 SET DVBARMKS=$GET(^DVB(396.4,DVBEIEN,6,DVBCR,0))
+7 SET ^TMP("DVBA",$JOB,DVBCR)=DVBARMKS
End DoDot:1
+8 SET DVBCNT=0
SET DVBCNA=0
FOR
SET DVBCNA=$ORDER(^TMP("DVBA",$JOB,DVBCNA))
if DVBCNA=""
QUIT
Begin DoDot:1
+9 SET DVBAREM=$GET(^TMP("DVBA",$JOB,DVBCNA))
+10 SET DVBADATA(DVBCNT)=DVBAREM
+11 SET DVBCNT=DVBCNT+1
End DoDot:1
+12 KILL DVBCA,DVBCNT,DVBAREM,DVBARMKS,X
+13 SET RESULT=$NAME(^TMP("DVBA",$JOB))
+14 QUIT
+15 ;
WPSET(RESULT,DVBRIEN,DVBEIEN,DVBDATA) ;RPC: DVBA CAPRI SETCONTREMARKS
+1 ;DVBEIEN exam ien(s) example ** DVBEIEN="12736^12737^12738"
+2 ;DVBPEIN is the individual IENs pieced out.
+3 KILL ^TMP("DVBA",$JOB)
+4 SET DVBPIEN=0
FOR DVBI=1:1
SET DVBPIEN=$PIECE(DVBEIEN,U,DVBI)
if 'DVBPIEN
QUIT
Begin DoDot:1
+5 DO WPDATA
End DoDot:1
+6 KILL DVBI,DVBRIEN,DVBPIEN,DVBCNT,DVBCNA
+7 QUIT
WPDATA ;
+1 SET DVBLINE=""
SET DVBCNT=1
FOR
SET DVBLINE=$ORDER(DVBDATA(DVBLINE))
if DVBLINE=""
QUIT
Begin DoDot:1
+2 SET ^TMP("DVBA",$JOB,"WP",DVBCNT)=$GET(DVBDATA(DVBLINE))
+3 SET DVBCNT=DVBCNT+1
End DoDot:1
+4 SET D0=DVBPIEN
+5 DO WP^DIE(396.4,DVBPIEN,103,"K","^TMP(""DVBA"",$J,""WP"")")
+6 SET RESULT=$NAME(^TMP("DVB",$JOB))
+7 KILL D0,DVBLINE,DVBCNT
+8 QUIT