DGPFLMT1 ;ALB/RBS - PRF TRANSMISSION ERRORS BUILD LIST AREA ; 6/10/05 11:38am
;;5.3;Registration;**650,1015**;Aug 13, 1993;Build 21
;
;no direct entry
QUIT
;
;
EN(DGARY,DGSRTBY,DGCNT) ;Entry point to build list area
;
;The following input variables are 'system wide variables' in the
;DGPF TRANSMISSION ERRORS List Manager screen:
;
; Input:
; DGARY - subscript name for temp global
; DGSRTBY - list sort by criteria
; "N" = Patient Name
; "D" = Date/Time Error Received
; Output:
; DGCNT - number of lines in the list
; DGARY - ^TMP(DGARY,$J) - display list
; - ^TMP("DGPFSORT",$J) - used to create final DGARY list
;
;display wait msg
D WAIT^DICD
;
;retrieve and sort
D GET(DGSRTBY)
;
;build list
D BLD(DGARY,DGSRTBY,.DGCNT)
;
;if no entries in list, display message
I 'DGCNT D
. D SET(DGARY,1,"",1,,,.DGCNT)
. D SET(DGARY,2,"There are no transmission error messages on file.",3,$G(IOINHI),$G(IOINORM),.DGCNT)
;
Q
;
;
GET(DGSRTBY) ;Get "RJ" status entries.
;
; Input:
; DGSRTBY - list sort by value
;
; Output:
; ^TMP("DGPFSORT",$J,0,<assignment ien>,<site ien>,<HL7 log ien>)=""
;
;The 0 node is created to group each patient's PRF Assignment record
;with each Site Transmitted To that is rejecting the update with all
;of the pointed to HL7 transmission log records.
;Only the most recent transmission log entry will be displayed.
;
N DGAIEN ;assignment ien
N DGDAT ;original transmission date
N DGLIEN ;HL7 log record ien
N DGPFA ;assignment array
N DGPFAH ;assignment history data array
N DGPFL ;HL7 transmission log data array
N DGPFPAT ;patient data array
N DGSITE ;site transmitted to ien
N DGSSN ;patient ssn
;
;loop through ASTAT index of transmission date/times
S DGDAT=0
F S DGDAT=$O(^DGPF(26.17,"ASTAT",DGDAT)) Q:'DGDAT D
. Q:'$D(^DGPF(26.17,"ASTAT",DGDAT,"RJ"))
. S DGLIEN=0
. F S DGLIEN=$O(^DGPF(26.17,"ASTAT",DGDAT,"RJ",DGLIEN)) Q:'DGLIEN D
. . K DGPFL,DGPFAH
. . ;- retrieve HL7 log data
. . Q:'$$GETLOG^DGPFHLL(DGLIEN,.DGPFL)
. . Q:'+DGPFL("ASGNHIST")
. . S DGSITE=$P($G(DGPFL("SITE")),U,1)
. . Q:DGSITE']""
. . ;- retrieve assignment history data to get PRF Assignment ien
. . Q:'$$GETHIST^DGPFAAH(+DGPFL("ASGNHIST"),.DGPFAH)
. . S DGAIEN=$P($G(DGPFAH("ASSIGN")),U,1)
. . Q:'DGAIEN
. . ;
. . ;- create 0 node by patient assignment, site ien and log ien
. . S ^TMP("DGPFSORT",$J,0,DGAIEN,DGSITE,DGLIEN)=""
;
Q:'$O(^TMP("DGPFSORT",$J,0,"")) ;quit if nothing setup
;
;- now loop the sorted 0 node and only use the most recent HL7 error
; record to create the List Manager display temp file.
;
S DGAIEN=0
F S DGAIEN=$O(^TMP("DGPFSORT",$J,0,DGAIEN)) Q:DGAIEN="" D
. S DGSITE=0
. F S DGSITE=$O(^TMP("DGPFSORT",$J,0,DGAIEN,DGSITE)) Q:DGSITE="" D
. . K DGPFL,DGPFAH,DGPFA,DGPFPAT
. . S DGLIEN=0 ;- get most recent record ien
. . S DGLIEN=$O(^TMP("DGPFSORT",$J,0,DGAIEN,DGSITE,""),-1)
. . Q:DGLIEN=""
. . ;- retrieve HL7 log data
. . Q:'$$GETLOG^DGPFHLL(DGLIEN,.DGPFL)
. . ;- retrieve assignment file data to get Owner Site
. . Q:'$$GETASGN^DGPFAA(DGAIEN,.DGPFA)
. . ;- retrive patient data to get ssn
. . Q:'$$GETPAT^DGPFUT2(+DGPFA("DFN"),.DGPFPAT)
. . S DGSSN=$G(DGPFPAT("SSN")) S:'DGSSN DGSSN="UNKNOWN"
. . ;- add ssn to existing array
. . S DGPFA("SSN")=DGSSN
. . ;- retrieve assignment history data
. . Q:'$$GETHIST^DGPFAAH(+DGPFL("ASGNHIST"),.DGPFAH)
. . ;
. . ;- setup output array
. . D SORT(DGLIEN,DGSRTBY,.DGPFA,.DGPFAH,.DGPFL)
;
Q
;
;
SORT(DGLIEN,DGSRTBY,DGPFA,DGPFAH,DGPFL) ;Setup output global
;
; Input:
; DGLIEN - ien of HL7 log record
; DGSRTBY - list sort value
; DGPFA - assignment array
; DGPFAH - assignment history array
; DGPFL - HL7 log array
;
; Output:
; ^TMP("DGPFSORT",$J,1,<>,<>,<>,<>) = data string values
; Subscript's (,<>,) are as follows for each sort by:
;
; - SORT="N" - list by <patient name>:
; ,1,<patient name>,<assignment ien>,<site ien>,<HL7 log ien>)
;
; - SORT="D" - list by <ack received d/t>:
; ,1,<ack received d/t>,<assignment ien>,<site ien>,<HL7 log ien>)
;
; - The 6 data string values are as follows: (^ - up-arrow delimited)
; <patient dfn>^<patient name>^<ssn>^<ack received d/t>^<site transmitted to>^<owner site>
;
N DGACKDT ;d/t error msg received
N DGAIEN ;assignment ien
N DGPNAME ;patient name
N DGSITE ;site transmitted to ien
N DGSTRING ;detail line
N DGSUB ;subscript var
;
;- subscript setup
S DGACKDT=$P($G(DGPFL("ACKDT")),U,1)
S:DGACKDT="" DGACKDT="UNKNOWN"
S DGAIEN=$P($G(DGPFAH("ASSIGN")),U,1)
S:DGAIEN="" DGAIEN="UNKNOWN"
S DGPNAME=$P($G(DGPFA("DFN")),U,2)
S:DGPNAME="" DGPNAME="UNKNOWN"
S DGSITE=$P($G(DGPFL("SITE")),U,1)
;
;- data string setup -
S DGSTRING=$P($G(DGPFA("DFN")),U,1)_U_DGPNAME_U_$P($G(DGPFA("SSN")),U,1)_U_DGACKDT_U_$P($G(DGPFL("SITE")),U,2)_U_$P($G(DGPFA("OWNER")),U,2)
;
;- patient name sort
I DGSRTBY="N" S DGSUB=DGPNAME
;- date/time error received type sort
I DGSRTBY="D" S DGSUB=DGACKDT
;
S ^TMP("DGPFSORT",$J,1,DGSUB,DGAIEN,DGSITE,DGLIEN)=DGSTRING
Q
;
;
BLD(DGARY,DGSRTBY,DGCNT) ;Build list area
;
; Input:
; DGARY - subscript name for temp global
; DGSRTBY - list sort by value
;
; Output:
; DGCNT - number of lines in the list
; DGARY - display list - ^TMP(DGARY,$J)
;
N DGACKDT ;d/t error msg received
N DGAIEN ;assignment ien
N DGLIEN ;log record ien
N DGLINE ;line counter
N DGOWNER ;owner of assignment
N DGPNAME ;patient name
N DGSIEN ;site ien
N DGSITE ;site transmitted to name
N DGSSN ;patient ssn
N DGSTRING ;detail line
N DGSUB ;loop var
N DGTEMP ;sort array root
;
S DGTEMP=$NA(^TMP("DGPFSORT",$J,1))
S DGSUB="",DGLINE=0
;
F S DGSUB=$O(@DGTEMP@(DGSUB)) Q:DGSUB="" D
. S DGAIEN=0
. F S DGAIEN=$O(@DGTEMP@(DGSUB,DGAIEN)) Q:'DGAIEN D
. . S DGSIEN=0
. . F S DGSIEN=$O(@DGTEMP@(DGSUB,DGAIEN,DGSIEN)) Q:'DGSIEN D
. . . S DGLIEN=0
. . . F S DGLIEN=$O(@DGTEMP@(DGSUB,DGAIEN,DGSIEN,DGLIEN)) Q:'DGLIEN D
. . . . ;- get data fields
. . . . S DGSTRING=$G(@DGTEMP@(DGSUB,DGAIEN,DGSIEN,DGLIEN))
. . . . S DGPNAME=$E($P(DGSTRING,U,2),1,27)
. . . . S DGSSN=$E($P(DGSTRING,U,3),6,9)
. . . . S DGACKDT=$E($$FDTTM^VALM1($P(DGSTRING,U,4)),1,8)
. . . . S DGSITE=$E($P(DGSTRING,U,5),1,14)
. . . . S DGOWNER=$E($P(DGSTRING,U,6),1,14)
. . . . ;- increment line counter
. . . . S DGLINE=DGLINE+1
. . . . ;- set line into list area
. . . . D SET(DGARY,DGLINE,DGLINE,1,,,.DGCNT)
. . . . D SET(DGARY,DGLINE,DGPNAME,6,,,.DGCNT)
. . . . D SET(DGARY,DGLINE,DGSSN,35,,,.DGCNT)
. . . . D SET(DGARY,DGLINE,DGACKDT,41,,,.DGCNT)
. . . . D SET(DGARY,DGLINE,DGSITE,51,,,.DGCNT)
. . . . D SET(DGARY,DGLINE,DGOWNER,67,,,.DGCNT)
. . . . ;
. . . . ;- associate "IDX" list item entry with the pointer's
. . . . ; back to ^TMP("DGPFSORT",$J,0,DGAIEN,DGSITE,DGLIEN) global:
. . . . ; <asignment ien>^<site ien>^<HL7 log ien>^<patient dfn>^pat name^site name
. . . . S ^TMP(DGARY,$J,"IDX",DGLINE,DGLINE)=DGAIEN_U_DGSIEN_U_DGLIEN_U_$P(DGSTRING,U,1)_U_DGPNAME_U_$P(DGSTRING,U,5)
;
;cleanup temp sort global
K @DGTEMP
Q
;
;
SET(DGARY,DGLINE,DGTEXT,DGCOL,DGON,DGOFF,DGCNT) ;Setup display detail lines
;
; Input:
; DGARY - subscript name for temp global
; DGLINE - line number
; DGTEXT - text
; DGCOL - starting column
; DGON - highlighting on
; DGOFF - highlighting off
;
; Output:
; DGARY - temp global array of LM detail lines
; DGCNT - number of lines in the list
;
N DGX ;string to insert new text into
;
S DGX=$S($D(^TMP(DGARY,$J,DGLINE,0)):^(0),1:"")
S DGCNT=DGLINE
;
S ^TMP(DGARY,$J,DGLINE,0)=$$SETSTR^VALM1(DGTEXT,DGX,DGCOL,$L(DGTEXT))
;
D:$G(DGON)]""!($G(DGOFF)]"") CNTRL^VALM10(DGLINE,DGCOL,$L(DGTEXT),$G(DGON),$G(DGOFF))
;
Q
DGPFLMT1 ;ALB/RBS - PRF TRANSMISSION ERRORS BUILD LIST AREA ; 6/10/05 11:38am
+1 ;;5.3;Registration;**650,1015**;Aug 13, 1993;Build 21
+2 ;
+3 ;no direct entry
+4 QUIT
+5 ;
+6 ;
EN(DGARY,DGSRTBY,DGCNT) ;Entry point to build list area
+1 ;
+2 ;The following input variables are 'system wide variables' in the
+3 ;DGPF TRANSMISSION ERRORS List Manager screen:
+4 ;
+5 ; Input:
+6 ; DGARY - subscript name for temp global
+7 ; DGSRTBY - list sort by criteria
+8 ; "N" = Patient Name
+9 ; "D" = Date/Time Error Received
+10 ; Output:
+11 ; DGCNT - number of lines in the list
+12 ; DGARY - ^TMP(DGARY,$J) - display list
+13 ; - ^TMP("DGPFSORT",$J) - used to create final DGARY list
+14 ;
+15 ;display wait msg
+16 DO WAIT^DICD
+17 ;
+18 ;retrieve and sort
+19 DO GET(DGSRTBY)
+20 ;
+21 ;build list
+22 DO BLD(DGARY,DGSRTBY,.DGCNT)
+23 ;
+24 ;if no entries in list, display message
+25 IF 'DGCNT
Begin DoDot:1
+26 DO SET(DGARY,1,"",1,,,.DGCNT)
+27 DO SET(DGARY,2,"There are no transmission error messages on file.",3,$GET">GET(IOINHI),$GET">GET(IOINORM),.DGCNT)
End DoDot:1
+28 ;
+29 QUIT
+30 ;
+31 ;
GET(DGSRTBY) ;Get "RJ" status entries.
+1 ;
+2 ; Input:
+3 ; DGSRTBY - list sort by value
+4 ;
+5 ; Output:
+6 ; ^TMP("DGPFSORT",$J,0,<assignment ien>,<site ien>,<HL7 log ien>)=""
+7 ;
+8 ;The 0 node is created to group each patient's PRF Assignment record
+9 ;with each Site Transmitted To that is rejecting the update with all
+10 ;of the pointed to HL7 transmission log records.
+11 ;Only the most recent transmission log entry will be displayed.
+12 ;
+13 ;assignment ien
NEW DGAIEN
+14 ;original transmission date
NEW DGDAT
+15 ;HL7 log record ien
NEW DGLIEN
+16 ;assignment array
NEW DGPFA
+17 ;assignment history data array
NEW DGPFAH
+18 ;HL7 transmission log data array
NEW DGPFL
+19 ;patient data array
NEW DGPFPAT
+20 ;site transmitted to ien
NEW DGSITE
+21 ;patient ssn
NEW DGSSN
+22 ;
+23 ;loop through ASTAT index of transmission date/times
+24 SET DGDAT=0
+25 FOR
SET DGDAT=$ORDER(^DGPF(26.17,"ASTAT",DGDAT))
IF 'DGDAT
QUIT
Begin DoDot:1
+26 IF '$DATA(^DGPF(26.17,"ASTAT",DGDAT,"RJ"))
QUIT
+27 SET DGLIEN=0
+28 FOR
SET DGLIEN=$ORDER(^DGPF(26.17,"ASTAT",DGDAT,"RJ",DGLIEN))
IF 'DGLIEN
QUIT
Begin DoDot:2
+29 KILL DGPFL,DGPFAH
+30 ;- retrieve HL7 log data
+31 IF '$$GETLOG^DGPFHLL(DGLIEN,.DGPFL)
QUIT
+32 IF '+DGPFL("ASGNHIST")
QUIT
+33 SET DGSITE=$PIECE($GET(DGPFL("SITE")),U,1)
+34 IF DGSITE']""
QUIT
+35 ;- retrieve assignment history data to get PRF Assignment ien
+36 IF '$$GETHIST^DGPFAAH(+DGPFL("ASGNHIST"),.DGPFAH)
QUIT
+37 SET DGAIEN=$PIECE($GET(DGPFAH("ASSIGN")),U,1)
+38 IF 'DGAIEN
QUIT
+39 ;
+40 ;- create 0 node by patient assignment, site ien and log ien
+41 SET ^TMP("DGPFSORT",$JOB,0,DGAIEN,DGSITE,DGLIEN)=""
End DoDot:2
End DoDot:1
+42 ;
+43 ;quit if nothing setup
IF '$ORDER(^TMP("DGPFSORT",$JOB,0,""))
QUIT
+44 ;
+45 ;- now loop the sorted 0 node and only use the most recent HL7 error
+46 ; record to create the List Manager display temp file.
+47 ;
+48 SET DGAIEN=0
+49 FOR
SET DGAIEN=$ORDER(^TMP("DGPFSORT",$JOB,0,DGAIEN))
IF DGAIEN=""
QUIT
Begin DoDot:1
+50 SET DGSITE=0
+51 FOR
SET DGSITE=$ORDER(^TMP("DGPFSORT",$JOB,0,DGAIEN,DGSITE))
IF DGSITE=""
QUIT
Begin DoDot:2
+52 KILL DGPFL,DGPFAH,DGPFA,DGPFPAT
+53 ;- get most recent record ien
SET DGLIEN=0
+54 SET DGLIEN=$ORDER(^TMP("DGPFSORT",$JOB,0,DGAIEN,DGSITE,""),-1)
+55 IF DGLIEN=""
QUIT
+56 ;- retrieve HL7 log data
+57 IF '$$GETLOG^DGPFHLL(DGLIEN,.DGPFL)
QUIT
+58 ;- retrieve assignment file data to get Owner Site
+59 IF '$$GETASGN^DGPFAA(DGAIEN,.DGPFA)
QUIT
+60 ;- retrive patient data to get ssn
+61 IF '$$GETPAT^DGPFUT2(+DGPFA("DFN"),.DGPFPAT)
QUIT
+62 SET DGSSN=$GET(DGPFPAT("SSN"))
IF 'DGSSN
SET DGSSN="UNKNOWN"
+63 ;- add ssn to existing array
+64 SET DGPFA("SSN")=DGSSN
+65 ;- retrieve assignment history data
+66 IF '$$GETHIST^DGPFAAH(+DGPFL("ASGNHIST"),.DGPFAH)
QUIT
+67 ;
+68 ;- setup output array
+69 DO SORT(DGLIEN,DGSRTBY,.DGPFA,.DGPFAH,.DGPFL)
End DoDot:2
End DoDot:1
+70 ;
+71 QUIT
+72 ;
+73 ;
SORT(DGLIEN,DGSRTBY,DGPFA,DGPFAH,DGPFL) ;Setup output global
+1 ;
+2 ; Input:
+3 ; DGLIEN - ien of HL7 log record
+4 ; DGSRTBY - list sort value
+5 ; DGPFA - assignment array
+6 ; DGPFAH - assignment history array
+7 ; DGPFL - HL7 log array
+8 ;
+9 ; Output:
+10 ; ^TMP("DGPFSORT",$J,1,<>,<>,<>,<>) = data string values
+11 ; Subscript's (,<>,) are as follows for each sort by:
+12 ;
+13 ; - SORT="N" - list by <patient name>:
+14 ; ,1,<patient name>,<assignment ien>,<site ien>,<HL7 log ien>)
+15 ;
+16 ; - SORT="D" - list by <ack received d/t>:
+17 ; ,1,<ack received d/t>,<assignment ien>,<site ien>,<HL7 log ien>)
+18 ;
+19 ; - The 6 data string values are as follows: (^ - up-arrow delimited)
+20 ; <patient dfn>^<patient name>^<ssn>^<ack received d/t>^<site transmitted to>^<owner site>
+21 ;
+22 ;d/t error msg received
NEW DGACKDT
+23 ;assignment ien
NEW DGAIEN
+24 ;patient name
NEW DGPNAME
+25 ;site transmitted to ien
NEW DGSITE
+26 ;detail line
NEW DGSTRING
+27 ;subscript var
NEW DGSUB
+28 ;
+29 ;- subscript setup
+30 SET DGACKDT=$PIECE($GET(DGPFL("ACKDT")),U,1)
+31 IF DGACKDT=""
SET DGACKDT="UNKNOWN"
+32 SET DGAIEN=$PIECE($GET(DGPFAH("ASSIGN")),U,1)
+33 IF DGAIEN=""
SET DGAIEN="UNKNOWN"
+34 SET DGPNAME=$PIECE($GET(DGPFA("DFN")),U,2)
+35 IF DGPNAME=""
SET DGPNAME="UNKNOWN"
+36 SET DGSITE=$PIECE($GET(DGPFL("SITE")),U,1)
+37 ;
+38 ;- data string setup -
+39 SET DGSTRING=$PIECE($GET">GET">GET">GET">GET">GET">GET">GET(DGPFA("DFN")),U,1)_U_DGPNAME_U_$PIECE($GET">GET">GET">GET">GET">GET">GET">GET(DGPFA("SSN")),U,1)_U_DGACKDT_U_$PIECE($GET">GET">GET">GET">GET">GET">GET">GET(DGPFL("SITE")),U,2)_U_$PIECE($GET">GET">GET">GET">GET">GET">GET">GET(DGPFA("OWNER")),U,2)
+40 ;
+41 ;- patient name sort
+42 IF DGSRTBY="N"
SET DGSUB=DGPNAME
+43 ;- date/time error received type sort
+44 IF DGSRTBY="D"
SET DGSUB=DGACKDT
+45 ;
+46 SET ^TMP("DGPFSORT",$JOB,1,DGSUB,DGAIEN,DGSITE,DGLIEN)=DGSTRING
+47 QUIT
+48 ;
+49 ;
BLD(DGARY,DGSRTBY,DGCNT) ;Build list area
+1 ;
+2 ; Input:
+3 ; DGARY - subscript name for temp global
+4 ; DGSRTBY - list sort by value
+5 ;
+6 ; Output:
+7 ; DGCNT - number of lines in the list
+8 ; DGARY - display list - ^TMP(DGARY,$J)
+9 ;
+10 ;d/t error msg received
NEW DGACKDT
+11 ;assignment ien
NEW DGAIEN
+12 ;log record ien
NEW DGLIEN
+13 ;line counter
NEW DGLINE
+14 ;owner of assignment
NEW DGOWNER
+15 ;patient name
NEW DGPNAME
+16 ;site ien
NEW DGSIEN
+17 ;site transmitted to name
NEW DGSITE
+18 ;patient ssn
NEW DGSSN
+19 ;detail line
NEW DGSTRING
+20 ;loop var
NEW DGSUB
+21 ;sort array root
NEW DGTEMP
+22 ;
+23 SET DGTEMP=$NAME(^TMP("DGPFSORT",$JOB,1))
+24 SET DGSUB=""
SET DGLINE=0
+25 ;
+26 FOR
SET DGSUB=$ORDER(@DGTEMP@(DGSUB))
IF DGSUB=""
QUIT
Begin DoDot:1
+27 SET DGAIEN=0
+28 FOR
SET DGAIEN=$ORDER(@DGTEMP@(DGSUB,DGAIEN))
IF 'DGAIEN
QUIT
Begin DoDot:2
+29 SET DGSIEN=0
+30 FOR
SET DGSIEN=$ORDER(@DGTEMP@(DGSUB,DGAIEN,DGSIEN))
IF 'DGSIEN
QUIT
Begin DoDot:3
+31 SET DGLIEN=0
+32 FOR
SET DGLIEN=$ORDER(@DGTEMP@(DGSUB,DGAIEN,DGSIEN,DGLIEN))
IF 'DGLIEN
QUIT
Begin DoDot:4
+33 ;- get data fields
+34 SET DGSTRING=$GET(@DGTEMP@(DGSUB,DGAIEN,DGSIEN,DGLIEN))
+35 SET DGPNAME=$EXTRACT($PIECE(DGSTRING,U,2),1,27)
+36 SET DGSSN=$EXTRACT($PIECE(DGSTRING,U,3),6,9)
+37 SET DGACKDT=$EXTRACT($$FDTTM^VALM1($PIECE(DGSTRING,U,4)),1,8)
+38 SET DGSITE=$EXTRACT($PIECE(DGSTRING,U,5),1,14)
+39 SET DGOWNER=$EXTRACT($PIECE(DGSTRING,U,6),1,14)
+40 ;- increment line counter
+41 SET DGLINE=DGLINE+1
+42 ;- set line into list area
+43 DO SET(DGARY,DGLINE,DGLINE,1,,,.DGCNT)
+44 DO SET(DGARY,DGLINE,DGPNAME,6,,,.DGCNT)
+45 DO SET(DGARY,DGLINE,DGSSN,35,,,.DGCNT)
+46 DO SET(DGARY,DGLINE,DGACKDT,41,,,.DGCNT)
+47 DO SET(DGARY,DGLINE,DGSITE,51,,,.DGCNT)
+48 DO SET(DGARY,DGLINE,DGOWNER,67,,,.DGCNT)
+49 ;
+50 ;- associate "IDX" list item entry with the pointer's
+51 ; back to ^TMP("DGPFSORT",$J,0,DGAIEN,DGSITE,DGLIEN) global:
+52 ; <asignment ien>^<site ien>^<HL7 log ien>^<patient dfn>^pat name^site name
+53 SET ^TMP(DGARY,$JOB,"IDX",DGLINE,DGLINE)=DGAIEN_U_DGSIEN_U_DGLIEN_U_$PIECE(DGSTRING,U,1)_U_DGPNAME_U_$PIECE(DGSTRING,U,5)
End DoDot:4
End DoDot:3
End DoDot:2
End DoDot:1
+54 ;
+55 ;cleanup temp sort global
+56 KILL @DGTEMP
+57 QUIT
+58 ;
+59 ;
SET(DGARY,DGLINE,DGTEXT,DGCOL,DGON,DGOFF,DGCNT) ;Setup display detail lines
+1 ;
+2 ; Input:
+3 ; DGARY - subscript name for temp global
+4 ; DGLINE - line number
+5 ; DGTEXT - text
+6 ; DGCOL - starting column
+7 ; DGON - highlighting on
+8 ; DGOFF - highlighting off
+9 ;
+10 ; Output:
+11 ; DGARY - temp global array of LM detail lines
+12 ; DGCNT - number of lines in the list
+13 ;
+14 ;string to insert new text into
NEW DGX
+15 ;
+16 SET DGX=$SELECT($DATA(^TMP(DGARY,$JOB,DGLINE,0)):^(0),1:"")
+17 SET DGCNT=DGLINE
+18 ;
+19 SET ^TMP(DGARY,$JOB,DGLINE,0)=$$SETSTR^VALM1(DGTEXT,DGX,DGCOL,$LENGTH(DGTEXT))
+20 ;
+21 IF $GET">GET(DGON)]""!($GET">GET(DGOFF)]"")
DO CNTRL^VALM10(DGLINE,DGCOL,$LENGTH(DGTEXT),$GET">GET(DGON),$GET">GET(DGOFF))
+22 ;
+23 QUIT