SCMCHLR4 ;ALB/KCL - PCMM HL7 Reject Processing - Protocols; 10-JAN-2000
;;5.3;Scheduling;**210,272,505**;AUG 13, 1993;Build 20
;
;This routine contains the PCMM Transmission Error processing protocols.
;See EN^SCMCHLR2 for additional documentation on 'system wide' variables
;used in this routine.
;
CS ; Description: Entry point for SCMC LE CHANGE STATUS protocol.
;
; Input:
; SCEPS - Error Processing Status
; 1 -> New
; 2 -> Checked
; 3 -> Both
;
; Output:
; SCEPS - Error Processing Status
; 1 -> New
; 2 -> Checked
; 3 -> Both
; VALMBCK - 'R'=Refresh screen
;
N DIR,DTOUT,DUOUT,Y
;
;Set screen to full scrolling region
D FULL^VALM1
N DIRUT,SCBEG,SCEND,SCEPS,SCSORTBY
;
;Ask user to select error processing status
S DIR(0)="SMO^1:New;2:Checked;3:Both"
S DIR("A")="Select Error Processing Status"
D ^DIR
;
;Process user response
I Y D
.S SCEPS=Y
.;rebuild error list for selected error processing status
.D BUILD^SCMCHLR1
;
;Place custom msg in msg window
;S VALMSG=$$MRKMSG^SCMCHLR1
;
;Refresh screen when returning from action
S VALMBCK="R"
Q
;
;
CD ; Description: Entry point for SCMC LE CHANGE DATE RANGE protocol.
;
; Input:
; SCBEG - Begin date for date range
; SCEND - End date for date range
;
; Output:
; SCBEG - Begin date for date range
; SCEND - End date for date range
; VALMBCK - 'R'=Refresh screen
;
N VALMB,VALMBEG,VALMEND,X,X1,X2
;
;Ask user for date range (default 2 wks prior to today)
S X1=DT,X2=-14
D C^%DTC
S VALMB=X
D RANGE^VALM1
;
;Process user response
I 'VALMBEG!('VALMEND)!((SCBEG=VALMBEG)&(SCEND=VALMEND)) D
.W !!,"Date Range was not changed."
.D PAUSE^VALM1
.S VALMBCK=""
E D
.S SCBEG=VALMBEG,SCEND=VALMEND
.;rebuild error list for selected date range
.D BUILD^SCMCHLR1
.;Refresh screen when returning from action
.S VALMBCK="R"
;
;Place custom msg in msg window
;S VALMSG=$$MRKMSG^SCMCHLR1
;
Q
;
;
SL ; Description: Entry point for SCMC LE SORT LIST protocol.
;
; Input:
; SCSORTBY - Sort by criteria
;
; Output:
; SCSORTBY - Sort by criteria
; VALMBCK - 'R'=Refresh screen
;
N DIR,DTOUT,DUOUT,Y
;
;Sets screen to full scrolling region
D FULL^VALM1
;
;Ask user to select sort by criteria
S DIR(0)="SMO^N:Patient Name;D:Date Error Received;P:Provider;I:Institution"
S DIR("A")="Select Sort By"
D ^DIR
;
;Process user response
I "^N^D^P^I^"[("^"_Y_"^"),SCSORTBY'=Y D
.S SCSORTBY=Y
.;rebuild error list for selected sort criteria
.D BUILD^SCMCHLR1
;
;Place custom msg in msg window
;S VALMSG=$$MRKMSG^SCMCHLR1
;
;Refresh screen when returning from action
S VALMBCK="R"
Q
;
;
CE ; Description: Entry point for SCMC LE CHECK ERROR OFF LIST protocol.
;
; Input: None
;
; Output:
; VALMSG - Custom message
; VALMBCK - 'R'=Refresh screen
;
N NODE,SCLINE,SCNUM,SCTLIEN,SCERIEN,VALMY
;
;Ask user to select transmission errors to check off the list
D EN^VALM2(XQORNOD(0))
D FULL^VALM1
;
;Process user selection
S SCNUM=0
F S SCNUM=$O(VALMY(SCNUM)) Q:'SCNUM D
.;invoke call to check error off list
.I $D(^TMP(SCARY_"IDX",$J,SCNUM)) D
..S NODE=$G(^TMP(SCARY_"IDX",$J,SCNUM))
..S SCLINE=+NODE,SCTLIEN=+$P(NODE,"^",2),SCERIEN=+$P(NODE,"^",3)
..D CHKERR(SCARY,SCLINE,SCTLIEN,SCERIEN)
;
;Place custom msg in msg window
;S VALMSG=$$MRKMSG^SCMCHLR1
;
;Refresh screen when returning from action
S VALMBCK="R"
Q
;
;
RP ; Description: Entry point for SCMC LE RETRANSMIT PATIENT protocol.
;
; Input: None
;
; Output:
; VALMBCK - 'R'=Refresh screen
;
N NODE,SCLINE,SCNUM,SCTLIEN,SCTLOG,VALMY
;
;Ask user to select transmission errors to retransmit patient
D EN^VALM2(XQORNOD(0))
D FULL^VALM1
;
;Process user selections
S SCNUM=0
F S SCNUM=$O(VALMY(SCNUM)) Q:'SCNUM D
.;
.I $D(^TMP(SCARY_"IDX",$J,SCNUM)) D
..S NODE=$G(^TMP(SCARY_"IDX",$J,SCNUM))
..S SCLINE=+NODE,SCTLIEN=+$P(NODE,"^",2),SCERIEN=+$P(NODE,"^",3)
..;get information for PCMM HL7 Transmission Log entry and invoke code
..;to set patient to 'retransmit'.
..I $$GETLOG^SCMCHLA(SCTLIEN,SCERIEN,.SCTLOG) D SETPAT(SCARY,SCLINE,.SCTLOG)
;
;Place custom msg in msg window
;S VALMSG=$$MRKMSG^SCMCHLR1
;
;Refresh screen when returning from action
S VALMBCK="R"
Q
;
;
PE ; Description: Entry point for SCMC LE PRINT ERROR CODES protocol.
;
; Input: None
;
; Output:
; VALMBCK - 'R'=Refresh screen
;
;Sets screen to full scrolling region
D FULL^VALM1
;
;Print PCMM Transmission Error Code Report
D ECRPRT^SCMCHLR7
D PAUSE^VALM1
;
;Place custom msg in msg window
;S VALMSG=$$MRKMSG^SCMCHLR1
;
;Refresh screen when returning from action
S VALMBCK="R"
Q
;
;
RA ; Description: Entry point for SCMC LE RETRANSMIT ALL protocol.
;
; Input: None
;
; Output:
; VALMBCK - 'R'=Refresh screen
;
N DIR,DTOUT,DUOUT,Y
;
;Sets screen to full scrolling region
D FULL^VALM1
;
;Ask user if they want to retransmit all patients
S DIR(0)="Y"
S DIR("A")="Mark all patients for re-transmission"
S DIR("A",1)="This action will allow all patients to be marked for re-transmission."
S DIR("A",2)="The error processing status for all patients will be marked as checked."
S DIR("B")="NO"
D ^DIR
;
;Process user response
I '$D(DIRUT) D
.I +Y D
..;set all patients as re-transmit
..D UPDALL
;
;Place custom msg in msg window
;S VALMSG=$$MRKMSG^SCMCHLR1
;
;Refresh screen when returning from action
S VALMBCK="R"
Q
;
;
CHKERR(SCARY,SCLINE,SCTLIEN,SCERIEN) ;
; Description: Used to check an error off the list.
;
; Input:
; SCARY - Global array subscript
; SCLINE - Line number
; SCTLIEN - PCMM HL7 Transmission Log IEN
; SCERIEN - IEN of record in Error Code (#404.47142) multiple
;
; Output: None
;
N SCERMSG
;
I $$UPDEPS^SCMCHLA(SCTLIEN,SCERIEN,2,.SCERMSG) D
.D FLDTEXT^VALM10(SCLINE,"STATUS","Checked")
.D FLDCTRL^VALM10(SCLINE,"STATUS",IOINHI,IOINORM)
E D
.W !,^TMP(SCARY,$J,SCLINE,0)
.W:$G(SCERMSG)'="" !,"...",$$LOWER^VALM1(SCERMSG)
.W !,"...Unable to check error off list"
.D PAUSE^VALM1
Q
;
;
SETPAT(SCARY,SCLINE,SCTLOG) ; Description: Used to set patient to marked for re-transmit.
;
; Input:
; SCARY - Global array subscript
; SCLINE - Line number
; SCTLOG - Transmission log entry array
;
; Output: None
;
N SCERROR
;
;Set patient to marked for re-transmit
I $$UPDSTAT^SCMCHLA(SCTLIEN,"M",.SCERROR) D
.D UPDPAT(SCARY,$S($G(SCTLOG("DFN")):SCTLOG("DFN"),1:"W"),$S('$G(SCTLOG("DFN")):SCLINE,1:""))
E D
.W !,^TMP(SCARY,$J,SCLINE,0)
.W:$G(SCERMSG)'="" !,"...",$$LOWER^VALM1(SCERROR)
.W !,"...Unable to mark patient for re-transmit"
.D PAUSE^VALM1
Q
;
;
UPDPAT(SCARY,SCDFN,LINE) ; Description: Update all PCMM HL7 Transmission Log
; entries in the list for the patient as 'marked for re-transmit'.
;
; Input:
; SCARY - Global array subscript
; SCDFN - Patient IEN
;
; Output: None
;
N SCLINE,SCTLIEN
S:'$G(LINE) LINE=9999999
;
;Loop thru entries in the list for the patient
S SCLINE=0
I SCDFN="W",LINE'=9999999 S SCLINE=LINE-.01
F S SCLINE=$O(^TMP(SCARY_"IDX",$J,"PT",SCDFN,SCLINE)) Q:(('SCLINE)!(SCLINE>LINE)) S SCTLIEN=+^(SCLINE) D
.;update entry as marked for re-transmit
.D FLDTEXT^VALM10(SCLINE,"RETRANS","*")
.D FLDCTRL^VALM10(SCLINE,"RETRANS",IOINHI,IOINORM)
.;invoke code to check error off the list
.D CHKERR(SCARY,SCLINE,SCTLIEN,SCERIEN)
Q
;
;
UPDALL ; Description: Update all PCMM HL7 Transmission Log
; entries in the list as 'marked for re-transmit'.
;
; Input: None
; Output: None
;
N SCLINE,SCTLIEN,SCDFN
;
;Loop thru entries in the list for all patients
S SCDFN=""
F S SCDFN=$O(^TMP(SCARY_"IDX",$J,"PT",SCDFN)) Q:'SCDFN D
.;Loop thru entries in the list for the patient
.S SCLINE=0
.F S SCLINE=$O(^TMP(SCARY_"IDX",$J,"PT",SCDFN,SCLINE)) Q:'SCLINE D
..S NODE=^TMP(SCARY_"IDX",$J,"PT",SCDFN,SCLINE)
..S SCTLIEN=+NODE,SCERIEN=+$P(NODE,"^",2)
..;
..;get information for PCMM HL7 Transmission Log entry and invoke code
..;to set patient to 'retransmit'.
..I $$GETLOG^SCMCHLA(SCTLIEN,SCERIEN,.SCTLOG) D SETPAT(SCARY,SCLINE,.SCTLOG)
..;
..;update entry as marked for re-transmit
..D FLDTEXT^VALM10(SCLINE,"RETRANS","*")
..D FLDCTRL^VALM10(SCLINE,"RETRANS",IOINHI,IOINORM)
..;invoke code to check error off the list
..D CHKERR(SCARY,SCLINE,SCTLIEN,SCERIEN)
;
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSCMCHLR4 8723 printed Oct 16, 2024@18:41:12 Page 2
SCMCHLR4 ;ALB/KCL - PCMM HL7 Reject Processing - Protocols; 10-JAN-2000
+1 ;;5.3;Scheduling;**210,272,505**;AUG 13, 1993;Build 20
+2 ;
+3 ;This routine contains the PCMM Transmission Error processing protocols.
+4 ;See EN^SCMCHLR2 for additional documentation on 'system wide' variables
+5 ;used in this routine.
+6 ;
CS ; Description: Entry point for SCMC LE CHANGE STATUS protocol.
+1 ;
+2 ; Input:
+3 ; SCEPS - Error Processing Status
+4 ; 1 -> New
+5 ; 2 -> Checked
+6 ; 3 -> Both
+7 ;
+8 ; Output:
+9 ; SCEPS - Error Processing Status
+10 ; 1 -> New
+11 ; 2 -> Checked
+12 ; 3 -> Both
+13 ; VALMBCK - 'R'=Refresh screen
+14 ;
+15 NEW DIR,DTOUT,DUOUT,Y
+16 ;
+17 ;Set screen to full scrolling region
+18 DO FULL^VALM1
+19 NEW DIRUT,SCBEG,SCEND,SCEPS,SCSORTBY
+20 ;
+21 ;Ask user to select error processing status
+22 SET DIR(0)="SMO^1:New;2:Checked;3:Both"
+23 SET DIR("A")="Select Error Processing Status"
+24 DO ^DIR
+25 ;
+26 ;Process user response
+27 IF Y
Begin DoDot:1
+28 SET SCEPS=Y
+29 ;rebuild error list for selected error processing status
+30 DO BUILD^SCMCHLR1
End DoDot:1
+31 ;
+32 ;Place custom msg in msg window
+33 ;S VALMSG=$$MRKMSG^SCMCHLR1
+34 ;
+35 ;Refresh screen when returning from action
+36 SET VALMBCK="R"
+37 QUIT
+38 ;
+39 ;
CD ; Description: Entry point for SCMC LE CHANGE DATE RANGE protocol.
+1 ;
+2 ; Input:
+3 ; SCBEG - Begin date for date range
+4 ; SCEND - End date for date range
+5 ;
+6 ; Output:
+7 ; SCBEG - Begin date for date range
+8 ; SCEND - End date for date range
+9 ; VALMBCK - 'R'=Refresh screen
+10 ;
+11 NEW VALMB,VALMBEG,VALMEND,X,X1,X2
+12 ;
+13 ;Ask user for date range (default 2 wks prior to today)
+14 SET X1=DT
SET X2=-14
+15 DO C^%DTC
+16 SET VALMB=X
+17 DO RANGE^VALM1
+18 ;
+19 ;Process user response
+20 IF 'VALMBEG!('VALMEND)!((SCBEG=VALMBEG)&(SCEND=VALMEND))
Begin DoDot:1
+21 WRITE !!,"Date Range was not changed."
+22 DO PAUSE^VALM1
+23 SET VALMBCK=""
End DoDot:1
+24 IF '$TEST
Begin DoDot:1
+25 SET SCBEG=VALMBEG
SET SCEND=VALMEND
+26 ;rebuild error list for selected date range
+27 DO BUILD^SCMCHLR1
+28 ;Refresh screen when returning from action
+29 SET VALMBCK="R"
End DoDot:1
+30 ;
+31 ;Place custom msg in msg window
+32 ;S VALMSG=$$MRKMSG^SCMCHLR1
+33 ;
+34 QUIT
+35 ;
+36 ;
SL ; Description: Entry point for SCMC LE SORT LIST protocol.
+1 ;
+2 ; Input:
+3 ; SCSORTBY - Sort by criteria
+4 ;
+5 ; Output:
+6 ; SCSORTBY - Sort by criteria
+7 ; VALMBCK - 'R'=Refresh screen
+8 ;
+9 NEW DIR,DTOUT,DUOUT,Y
+10 ;
+11 ;Sets screen to full scrolling region
+12 DO FULL^VALM1
+13 ;
+14 ;Ask user to select sort by criteria
+15 SET DIR(0)="SMO^N:Patient Name;D:Date Error Received;P:Provider;I:Institution"
+16 SET DIR("A")="Select Sort By"
+17 DO ^DIR
+18 ;
+19 ;Process user response
+20 IF "^N^D^P^I^"[("^"_Y_"^")
IF SCSORTBY'=Y
Begin DoDot:1
+21 SET SCSORTBY=Y
+22 ;rebuild error list for selected sort criteria
+23 DO BUILD^SCMCHLR1
End DoDot:1
+24 ;
+25 ;Place custom msg in msg window
+26 ;S VALMSG=$$MRKMSG^SCMCHLR1
+27 ;
+28 ;Refresh screen when returning from action
+29 SET VALMBCK="R"
+30 QUIT
+31 ;
+32 ;
CE ; Description: Entry point for SCMC LE CHECK ERROR OFF LIST protocol.
+1 ;
+2 ; Input: None
+3 ;
+4 ; Output:
+5 ; VALMSG - Custom message
+6 ; VALMBCK - 'R'=Refresh screen
+7 ;
+8 NEW NODE,SCLINE,SCNUM,SCTLIEN,SCERIEN,VALMY
+9 ;
+10 ;Ask user to select transmission errors to check off the list
+11 DO EN^VALM2(XQORNOD(0))
+12 DO FULL^VALM1
+13 ;
+14 ;Process user selection
+15 SET SCNUM=0
+16 FOR
SET SCNUM=$ORDER(VALMY(SCNUM))
if 'SCNUM
QUIT
Begin DoDot:1
+17 ;invoke call to check error off list
+18 IF $DATA(^TMP(SCARY_"IDX",$JOB,SCNUM))
Begin DoDot:2
+19 SET NODE=$GET(^TMP(SCARY_"IDX",$JOB,SCNUM))
+20 SET SCLINE=+NODE
SET SCTLIEN=+$PIECE(NODE,"^",2)
SET SCERIEN=+$PIECE(NODE,"^",3)
+21 DO CHKERR(SCARY,SCLINE,SCTLIEN,SCERIEN)
End DoDot:2
End DoDot:1
+22 ;
+23 ;Place custom msg in msg window
+24 ;S VALMSG=$$MRKMSG^SCMCHLR1
+25 ;
+26 ;Refresh screen when returning from action
+27 SET VALMBCK="R"
+28 QUIT
+29 ;
+30 ;
RP ; Description: Entry point for SCMC LE RETRANSMIT PATIENT protocol.
+1 ;
+2 ; Input: None
+3 ;
+4 ; Output:
+5 ; VALMBCK - 'R'=Refresh screen
+6 ;
+7 NEW NODE,SCLINE,SCNUM,SCTLIEN,SCTLOG,VALMY
+8 ;
+9 ;Ask user to select transmission errors to retransmit patient
+10 DO EN^VALM2(XQORNOD(0))
+11 DO FULL^VALM1
+12 ;
+13 ;Process user selections
+14 SET SCNUM=0
+15 FOR
SET SCNUM=$ORDER(VALMY(SCNUM))
if 'SCNUM
QUIT
Begin DoDot:1
+16 ;
+17 IF $DATA(^TMP(SCARY_"IDX",$JOB,SCNUM))
Begin DoDot:2
+18 SET NODE=$GET(^TMP(SCARY_"IDX",$JOB,SCNUM))
+19 SET SCLINE=+NODE
SET SCTLIEN=+$PIECE(NODE,"^",2)
SET SCERIEN=+$PIECE(NODE,"^",3)
+20 ;get information for PCMM HL7 Transmission Log entry and invoke code
+21 ;to set patient to 'retransmit'.
+22 IF $$GETLOG^SCMCHLA(SCTLIEN,SCERIEN,.SCTLOG)
DO SETPAT(SCARY,SCLINE,.SCTLOG)
End DoDot:2
End DoDot:1
+23 ;
+24 ;Place custom msg in msg window
+25 ;S VALMSG=$$MRKMSG^SCMCHLR1
+26 ;
+27 ;Refresh screen when returning from action
+28 SET VALMBCK="R"
+29 QUIT
+30 ;
+31 ;
PE ; Description: Entry point for SCMC LE PRINT ERROR CODES protocol.
+1 ;
+2 ; Input: None
+3 ;
+4 ; Output:
+5 ; VALMBCK - 'R'=Refresh screen
+6 ;
+7 ;Sets screen to full scrolling region
+8 DO FULL^VALM1
+9 ;
+10 ;Print PCMM Transmission Error Code Report
+11 DO ECRPRT^SCMCHLR7
+12 DO PAUSE^VALM1
+13 ;
+14 ;Place custom msg in msg window
+15 ;S VALMSG=$$MRKMSG^SCMCHLR1
+16 ;
+17 ;Refresh screen when returning from action
+18 SET VALMBCK="R"
+19 QUIT
+20 ;
+21 ;
RA ; Description: Entry point for SCMC LE RETRANSMIT ALL protocol.
+1 ;
+2 ; Input: None
+3 ;
+4 ; Output:
+5 ; VALMBCK - 'R'=Refresh screen
+6 ;
+7 NEW DIR,DTOUT,DUOUT,Y
+8 ;
+9 ;Sets screen to full scrolling region
+10 DO FULL^VALM1
+11 ;
+12 ;Ask user if they want to retransmit all patients
+13 SET DIR(0)="Y"
+14 SET DIR("A")="Mark all patients for re-transmission"
+15 SET DIR("A",1)="This action will allow all patients to be marked for re-transmission."
+16 SET DIR("A",2)="The error processing status for all patients will be marked as checked."
+17 SET DIR("B")="NO"
+18 DO ^DIR
+19 ;
+20 ;Process user response
+21 IF '$DATA(DIRUT)
Begin DoDot:1
+22 IF +Y
Begin DoDot:2
+23 ;set all patients as re-transmit
+24 DO UPDALL
End DoDot:2
End DoDot:1
+25 ;
+26 ;Place custom msg in msg window
+27 ;S VALMSG=$$MRKMSG^SCMCHLR1
+28 ;
+29 ;Refresh screen when returning from action
+30 SET VALMBCK="R"
+31 QUIT
+32 ;
+33 ;
CHKERR(SCARY,SCLINE,SCTLIEN,SCERIEN) ;
+1 ; Description: Used to check an error off the list.
+2 ;
+3 ; Input:
+4 ; SCARY - Global array subscript
+5 ; SCLINE - Line number
+6 ; SCTLIEN - PCMM HL7 Transmission Log IEN
+7 ; SCERIEN - IEN of record in Error Code (#404.47142) multiple
+8 ;
+9 ; Output: None
+10 ;
+11 NEW SCERMSG
+12 ;
+13 IF $$UPDEPS^SCMCHLA(SCTLIEN,SCERIEN,2,.SCERMSG)
Begin DoDot:1
+14 DO FLDTEXT^VALM10(SCLINE,"STATUS","Checked")
+15 DO FLDCTRL^VALM10(SCLINE,"STATUS",IOINHI,IOINORM)
End DoDot:1
+16 IF '$TEST
Begin DoDot:1
+17 WRITE !,^TMP(SCARY,$JOB,SCLINE,0)
+18 if $GET(SCERMSG)'=""
WRITE !,"...",$$LOWER^VALM1(SCERMSG)
+19 WRITE !,"...Unable to check error off list"
+20 DO PAUSE^VALM1
End DoDot:1
+21 QUIT
+22 ;
+23 ;
SETPAT(SCARY,SCLINE,SCTLOG) ; Description: Used to set patient to marked for re-transmit.
+1 ;
+2 ; Input:
+3 ; SCARY - Global array subscript
+4 ; SCLINE - Line number
+5 ; SCTLOG - Transmission log entry array
+6 ;
+7 ; Output: None
+8 ;
+9 NEW SCERROR
+10 ;
+11 ;Set patient to marked for re-transmit
+12 IF $$UPDSTAT^SCMCHLA(SCTLIEN,"M",.SCERROR)
Begin DoDot:1
+13 DO UPDPAT(SCARY,$SELECT($GET(SCTLOG("DFN")):SCTLOG("DFN"),1:"W"),$SELECT('$GET(SCTLOG("DFN")):SCLINE,1:""))
End DoDot:1
+14 IF '$TEST
Begin DoDot:1
+15 WRITE !,^TMP(SCARY,$JOB,SCLINE,0)
+16 if $GET(SCERMSG)'=""
WRITE !,"...",$$LOWER^VALM1(SCERROR)
+17 WRITE !,"...Unable to mark patient for re-transmit"
+18 DO PAUSE^VALM1
End DoDot:1
+19 QUIT
+20 ;
+21 ;
UPDPAT(SCARY,SCDFN,LINE) ; Description: Update all PCMM HL7 Transmission Log
+1 ; entries in the list for the patient as 'marked for re-transmit'.
+2 ;
+3 ; Input:
+4 ; SCARY - Global array subscript
+5 ; SCDFN - Patient IEN
+6 ;
+7 ; Output: None
+8 ;
+9 NEW SCLINE,SCTLIEN
+10 if '$GET(LINE)
SET LINE=9999999
+11 ;
+12 ;Loop thru entries in the list for the patient
+13 SET SCLINE=0
+14 IF SCDFN="W"
IF LINE'=9999999
SET SCLINE=LINE-.01
+15 FOR
SET SCLINE=$ORDER(^TMP(SCARY_"IDX",$JOB,"PT",SCDFN,SCLINE))
if (('SCLINE)!(SCLINE>LINE))
QUIT
SET SCTLIEN=+^(SCLINE)
Begin DoDot:1
+16 ;update entry as marked for re-transmit
+17 DO FLDTEXT^VALM10(SCLINE,"RETRANS","*")
+18 DO FLDCTRL^VALM10(SCLINE,"RETRANS",IOINHI,IOINORM)
+19 ;invoke code to check error off the list
+20 DO CHKERR(SCARY,SCLINE,SCTLIEN,SCERIEN)
End DoDot:1
+21 QUIT
+22 ;
+23 ;
UPDALL ; Description: Update all PCMM HL7 Transmission Log
+1 ; entries in the list as 'marked for re-transmit'.
+2 ;
+3 ; Input: None
+4 ; Output: None
+5 ;
+6 NEW SCLINE,SCTLIEN,SCDFN
+7 ;
+8 ;Loop thru entries in the list for all patients
+9 SET SCDFN=""
+10 FOR
SET SCDFN=$ORDER(^TMP(SCARY_"IDX",$JOB,"PT",SCDFN))
if 'SCDFN
QUIT
Begin DoDot:1
+11 ;Loop thru entries in the list for the patient
+12 SET SCLINE=0
+13 FOR
SET SCLINE=$ORDER(^TMP(SCARY_"IDX",$JOB,"PT",SCDFN,SCLINE))
if 'SCLINE
QUIT
Begin DoDot:2
+14 SET NODE=^TMP(SCARY_"IDX",$JOB,"PT",SCDFN,SCLINE)
+15 SET SCTLIEN=+NODE
SET SCERIEN=+$PIECE(NODE,"^",2)
+16 ;
+17 ;get information for PCMM HL7 Transmission Log entry and invoke code
+18 ;to set patient to 'retransmit'.
+19 IF $$GETLOG^SCMCHLA(SCTLIEN,SCERIEN,.SCTLOG)
DO SETPAT(SCARY,SCLINE,.SCTLOG)
+20 ;
+21 ;update entry as marked for re-transmit
+22 DO FLDTEXT^VALM10(SCLINE,"RETRANS","*")
+23 DO FLDCTRL^VALM10(SCLINE,"RETRANS",IOINHI,IOINORM)
+24 ;invoke code to check error off the list
+25 DO CHKERR(SCARY,SCLINE,SCTLIEN,SCERIEN)
End DoDot:2
End DoDot:1
+26 ;
+27 QUIT