Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: SCMCHLR5

SCMCHLR5.m

Go to the documentation of this file.
  1. SCMCHLR5 ;ALB/KCL - PCMM HL7 Reject Processing - Protocols con't ; 10-JAN-2000
  1. ;;5.3;Scheduling;**210,272**;AUG 13, 1993
  1. ;
  1. ;This routine contains the PCMM Transmission Error processing protocols.
  1. ;See EN^SCMCHLR2 for additional documentation on 'system wide' variables
  1. ;used in this routine.
  1. ;
  1. UE ; Description: Entry point for SCMC LE UNCHECK ERROR protocol.
  1. ;
  1. ; Input: None
  1. ;
  1. ; Output:
  1. ; VALMBCK - 'R'=Refresh screen
  1. ;
  1. N NODE,SCLINE,SCNUM,SCTLIEN,SCERIEN,VALMY
  1. ;
  1. ;Ask user to select transmission errors to uncheck on the list
  1. D EN^VALM2(XQORNOD(0))
  1. D FULL^VALM1
  1. ;
  1. ;Process user selection
  1. S SCNUM=0
  1. F S SCNUM=$O(VALMY(SCNUM)) Q:'SCNUM D
  1. .;invoke call to mark error as new on list
  1. .I $D(^TMP(SCARY_"IDX",$J,SCNUM)) D
  1. ..S NODE=$G(^TMP(SCARY_"IDX",$J,SCNUM))
  1. ..S SCLINE=+NODE,SCTLIEN=+$P(NODE,"^",2),SCERIEN=+$P(NODE,"^",3)
  1. ..D UNCHKERR(SCARY,SCLINE,SCTLIEN,SCERIEN)
  1. ;
  1. ;
  1. ;Place custom msg in msg window
  1. ;S VALMSG=$$MRKMSG^SCMCHLR1
  1. ;
  1. ;Refresh screen when returning from action
  1. S VALMBCK="R"
  1. Q
  1. ;
  1. ;
  1. DP ; Description: Entry point for SCMC LE DESELECT PATIENT RETRANSMIT protocol.
  1. ;
  1. ; Input: None
  1. ;
  1. ; Output:
  1. ; VALMBCK - 'R'=Refresh screen
  1. ;
  1. N NODE,SCLINE,SCNUM,SCTLIEN,SCTLOG,VALMY
  1. ;
  1. ;Ask user to select transmission errors to deselect
  1. D EN^VALM2(XQORNOD(0))
  1. ;
  1. ;set screen to full scrolling region
  1. D FULL^VALM1
  1. ;
  1. ;Process user selections
  1. S SCNUM=0
  1. F S SCNUM=$O(VALMY(SCNUM)) Q:'SCNUM D
  1. .;
  1. .I $D(^TMP(SCARY_"IDX",$J,SCNUM)) D
  1. ..S NODE=$G(^TMP(SCARY_"IDX",$J,SCNUM))
  1. ..S SCLINE=+NODE,SCTLIEN=+$P(NODE,"^",2),SCERIEN=+$P(NODE,"^",3)
  1. ..;get information for PCMM HL7 Transmission Log entry and invoke code
  1. ..;to set patient to 'retransmit'.
  1. ..I $$GETLOG^SCMCHLA(SCTLIEN,SCERIEN,.SCTLOG) D DESLPAT(SCARY,SCLINE,.SCTLOG)
  1. ;
  1. ;Place custom msg in msg window
  1. ;S VALMSG=$$MRKMSG^SCMCHLR1
  1. ;
  1. ;Refresh screen when returning from action
  1. S VALMBCK="R"
  1. Q
  1. ;
  1. ;
  1. DA ; Description: Entry point for SCMC LE DESELECT ALL protocol.
  1. ;
  1. ; Input: None
  1. ;
  1. ; Output:
  1. ; VALMBCK - 'R'=Refresh screen
  1. ;
  1. N DIR,DTOUT,DUOUT,Y
  1. ;
  1. ;Set screen to full scrolling region
  1. D FULL^VALM1
  1. ;
  1. ;Ask user if they want to deselect all patients for retransmit
  1. S DIR(0)="Y"
  1. S DIR("A")="Deselect all patients"
  1. S DIR("A",1)="This action will allow all patients that are currently"
  1. S DIR("A",2)="marked for re-transmission to be deselected."
  1. S DIR("B")="NO"
  1. D ^DIR
  1. ;
  1. ;Process user response
  1. I '$D(DIRUT) D
  1. .I +Y D
  1. ..;set all patients status to rejected
  1. ..D UPDALL
  1. ;
  1. ;Place custom msg in msg window
  1. ;S VALMSG=$$MRKMSG^SCMCHLR1
  1. ;
  1. ;Refresh screen when returning from action
  1. S VALMBCK="R"
  1. Q
  1. ;
  1. ;
  1. UNCHKERR(SCARY,SCLINE,SCTLIEN,SCERIEN) ;
  1. ; Description: Used to uncheck an error on the list.
  1. ;
  1. ; Input:
  1. ; SCARY - Global array subscript
  1. ; SCLINE - Line number
  1. ; SCTLIEN - PCMM HL7 Transmission Log IEN
  1. ; SCERIEN - IEN of record in Error Code (#404.47142) multiple
  1. ;
  1. ; Output: None
  1. ;
  1. N SCERMSG
  1. ;
  1. ;if status is marked for retransmit error can not be marked as new
  1. I $$STATUS^SCMCHLA(SCTLIEN)="M" D
  1. .W !,^TMP(SCARY,$J,SCLINE,0)
  1. .W:$G(SCERMSG)'="" !,"...",$$LOWER^VALM1(SCERMSG)
  1. .W !,"...Unable to update error processing status"
  1. .W !,"...Patient already marked for re-transmission"
  1. .D PAUSE^VALM1
  1. E D
  1. .I $$UPDEPS^SCMCHLA(SCTLIEN,SCERIEN,1,.SCERMSG) D
  1. ..D FLDTEXT^VALM10(SCLINE,"STATUS","New")
  1. ..D FLDCTRL^VALM10(SCLINE,"STATUS",IOINHI,IOINORM)
  1. Q
  1. ;
  1. ;
  1. DESLPAT(SCARY,SCLINE,SCTLOG) ; Description: Used to set patient to rejected.
  1. ;
  1. ; Input:
  1. ; SCARY - Global array subscript
  1. ; SCLINE - Line number
  1. ; SCTLOG - Transmission log entry array
  1. ;
  1. ; Output: None
  1. ;
  1. N SCERROR
  1. ;
  1. ;Set patient to rejected
  1. I $$UPDSTAT^SCMCHLA(SCTLIEN,"RJ",.SCERROR) D
  1. .D UPDPAT(SCARY,$S($G(SCTLOG("DFN")):SCTLOG("DFN"),1:"W"),$S('$G(SCTLOG("DFN")):SCLINE,1:""))
  1. E D
  1. .W !,^TMP(SCARY,$J,SCLINE,0)
  1. .W:$G(SCERMSG)'="" !,"...",$$LOWER^VALM1(SCERROR)
  1. .W !,"...Unable to deselect patient for re-transmit"
  1. .D PAUSE^VALM1
  1. Q
  1. ;
  1. ;
  1. UPDPAT(SCARY,SCDFN,LINE) ; Description: Update all PCMM HL7 Transmssion Log
  1. ; entries in the list for the patient as 'rejected'.
  1. ;
  1. ; Input:
  1. ; SCARY - Global array subscript
  1. ; SCDFN - Patient IEN
  1. ;
  1. ; Output: None
  1. ;
  1. S:'$G(LINE) LINE=999999
  1. N SCLINE,SCTLIEN
  1. ;
  1. ;Loop thru entries in the list for the patient
  1. S SCLINE=0
  1. I SCDFN="W",LINE'=999999 S SCLINE=LINE-.01
  1. F S SCLINE=$O(^TMP(SCARY_"IDX",$J,"PT",SCDFN,SCLINE)) Q:(('SCLINE)!(SCLINE>LINE)) S SCTLIEN=+^(SCLINE) D
  1. .;update entry that was marked for re-transmit to null
  1. .D FLDTEXT^VALM10(SCLINE,"RETRANS"," ")
  1. Q
  1. ;
  1. ;
  1. UPDALL ; Description: Update all PCMM HL7 Transmssion Log
  1. ; entries in the list as 'marked for re-transmit'.
  1. ;
  1. ; Input: None
  1. ; Output: None
  1. ;
  1. N SCLINE,SCTLIEN,SCDFN
  1. ;
  1. ;Loop thru entries in the list for all patients
  1. S SCDFN=""
  1. F S SCDFN=$O(^TMP(SCARY_"IDX",$J,"PT",SCDFN)) Q:'SCDFN D
  1. .;Loop thru entries in the list for the patient
  1. .S SCLINE=0
  1. .F S SCLINE=$O(^TMP(SCARY_"IDX",$J,"PT",SCDFN,SCLINE)) Q:'SCLINE D
  1. ..S NODE=^TMP(SCARY_"IDX",$J,"PT",SCDFN,SCLINE)
  1. ..S SCTLIEN=+NODE,SCERIEN=+$P(NODE,"^",2)
  1. ..;
  1. ..;get information for PCMM HL7 Transmission Log entry and invoke code
  1. ..;to set patient to 'rejected'.
  1. ..I $$GETLOG^SCMCHLA(SCTLIEN,SCERIEN,.SCTLOG) D DESLPAT(SCARY,SCLINE,.SCTLOG)
  1. ..;
  1. ..;update entry that was marked for re-transmit to null
  1. ..D FLDTEXT^VALM10(SCLINE,"RETRANS"," ")
  1. ;
  1. Q