SCMCHLX ;BP/DJB,ALB/ART - PCMM HL7 EVENT File Xref APIs ;12/06/2016
;;5.3;Scheduling;**177,264,272,659**;May 01, 1999;Build 5
;
;Reference routine: SCDXFX01
AACXMIT(IFN,SET,OLDEVPTR) ;Logic for AACXMIT* xrefs on PCMM HL7 EVENT
; file (#404.48).
;
; Input: IFN: Pointer to entry in file
; SET: 1 = Set xref
; 0 = Kill xref
; -1 = Check value of TRANSMISSION REQUIRED field (#.04).
; If "YES"- Set xref
; If "NO" - Kill xref
; OLDEVPTR: Previous value of EVENT POINTER field (#.07).
; Only valid when KILLing xref is due to data in this
; field changing.
;Output: None
;
;Check input
Q:'$G(IFN)
Q:'$D(^SCPT(404.48,IFN))
S:$G(SET)="" SET=-1
S OLDEVPTR=+$G(OLDEVPTR)
;
;Declare variables
NEW EVPTR,EVENT,ND,XMIT
;
;Get data
S ND=$G(^SCPT(404.48,IFN,0)) ;....Get zero node
S XMIT=+$P(ND,"^",3) ;............Transmission Required field
S EVPTR=$P(ND,"^",7) ;............Event Pointer field
I 'SET,OLDEVPTR S EVPTR=OLDEVPTR ;Use old Event Pointer if killing
; due to value changing.
Q:'EVPTR ;.......................Quit if no Event Pointer
;
;Set/Kill logic based on value of TRANSMISSION REQUIRED
I SET=-1 S SET=$S(XMIT=1:1,1:0)
;
;Set/Kill xref
I SET S ^SCPT(404.48,"AACXMIT",EVPTR,IFN)="" ;..Set xref
E KILL ^SCPT(404.48,"AACXMIT",EVPTR,IFN) ;.....Kill xref
Q
;
TXREF(IFN) ;Logic for AEVENT* xrefs on TEAM file. Create entry in
; PCMM HL7 EVENT file.
;
;***THIS CALL NOT USED***
;bp/djb 6/15/99
;No longer sending Primary Care Team data to Austin.
;
D TXREF^SCMCHLX1($G(IFN))
Q
;
PTXREF(IFN,OLDTYPE) ;Logic for AEVENT* xrefs on PATIENT TEAM ASSIGN file.
; Create entry in PCMM HL7 EVENT file.
;
;***THIS CALL NOT USED***
;bp/djb 6/15/99
;No longer sending Primary Care Team data to Austin.
;
D PTXREF^SCMCHLX1($G(IFN),$G(OLDTYPE))
Q
;
PTPXREF(IFN,OLDROLE) ;Logic for AEVENT* xrefs on PATIENT TEAM POSITION
; ASSIGN file. Create entry in PCMM HL7 EVENT file.
QUIT ;disable SD*5.3*659, HL7 no longer used by PCMM
D PTPXREF^SCMCHLX1($G(IFN),$G(OLDROLE))
Q
;
POSHXREF(IFN) ;Logic for AEVENT* xrefs on POSITION ASSIGNMENT HISTORY file.
; Create entry in PCMM HL7 EVENT file.
QUIT ;disable SD*5.3*659, HL7 no longer used by PCMM
D POSHXREF^SCMCHLX1($G(IFN))
Q
;
PREHXREF(IFN) ;Logic for AEVENT* xrefs on PRECEPTOR ASSIGNMENT HISTORY file.
; Create entry in PCMM HL7 EVENT file.
QUIT ;disable SD*5.3*659, HL7 no longer used by PCMM
D PREHXREF^SCMCHLX1($G(IFN))
Q
POSBXREF(IFN,FILE) ;Logic for Bookable Hour Cross reference
;Create entry in PCMM HL7 EVENT file
QUIT ;disable SD*5.3*659, HL7 no longer used by PCMM
D POSBXREF^SCMCHLX1(+$G(IFN),$G(FILE))
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSCMCHLX 2882 printed Dec 13, 2024@02:40:43 Page 2
SCMCHLX ;BP/DJB,ALB/ART - PCMM HL7 EVENT File Xref APIs ;12/06/2016
+1 ;;5.3;Scheduling;**177,264,272,659**;May 01, 1999;Build 5
+2 ;
+3 ;Reference routine: SCDXFX01
AACXMIT(IFN,SET,OLDEVPTR) ;Logic for AACXMIT* xrefs on PCMM HL7 EVENT
+1 ; file (#404.48).
+2 ;
+3 ; Input: IFN: Pointer to entry in file
+4 ; SET: 1 = Set xref
+5 ; 0 = Kill xref
+6 ; -1 = Check value of TRANSMISSION REQUIRED field (#.04).
+7 ; If "YES"- Set xref
+8 ; If "NO" - Kill xref
+9 ; OLDEVPTR: Previous value of EVENT POINTER field (#.07).
+10 ; Only valid when KILLing xref is due to data in this
+11 ; field changing.
+12 ;Output: None
+13 ;
+14 ;Check input
+15 if '$GET(IFN)
QUIT
+16 if '$DATA(^SCPT(404.48,IFN))
QUIT
+17 if $GET(SET)=""
SET SET=-1
+18 SET OLDEVPTR=+$GET(OLDEVPTR)
+19 ;
+20 ;Declare variables
+21 NEW EVPTR,EVENT,ND,XMIT
+22 ;
+23 ;Get data
+24 ;....Get zero node
SET ND=$GET(^SCPT(404.48,IFN,0))
+25 ;............Transmission Required field
SET XMIT=+$PIECE(ND,"^",3)
+26 ;............Event Pointer field
SET EVPTR=$PIECE(ND,"^",7)
+27 ;Use old Event Pointer if killing
IF 'SET
IF OLDEVPTR
SET EVPTR=OLDEVPTR
+28 ; due to value changing.
+29 ;.......................Quit if no Event Pointer
if 'EVPTR
QUIT
+30 ;
+31 ;Set/Kill logic based on value of TRANSMISSION REQUIRED
+32 IF SET=-1
SET SET=$SELECT(XMIT=1:1,1:0)
+33 ;
+34 ;Set/Kill xref
+35 ;..Set xref
IF SET
SET ^SCPT(404.48,"AACXMIT",EVPTR,IFN)=""
+36 ;.....Kill xref
IF '$TEST
KILL ^SCPT(404.48,"AACXMIT",EVPTR,IFN)
+37 QUIT
+38 ;
TXREF(IFN) ;Logic for AEVENT* xrefs on TEAM file. Create entry in
+1 ; PCMM HL7 EVENT file.
+2 ;
+3 ;***THIS CALL NOT USED***
+4 ;bp/djb 6/15/99
+5 ;No longer sending Primary Care Team data to Austin.
+6 ;
+7 DO TXREF^SCMCHLX1($GET(IFN))
+8 QUIT
+9 ;
PTXREF(IFN,OLDTYPE) ;Logic for AEVENT* xrefs on PATIENT TEAM ASSIGN file.
+1 ; Create entry in PCMM HL7 EVENT file.
+2 ;
+3 ;***THIS CALL NOT USED***
+4 ;bp/djb 6/15/99
+5 ;No longer sending Primary Care Team data to Austin.
+6 ;
+7 DO PTXREF^SCMCHLX1($GET(IFN),$GET(OLDTYPE))
+8 QUIT
+9 ;
PTPXREF(IFN,OLDROLE) ;Logic for AEVENT* xrefs on PATIENT TEAM POSITION
+1 ; ASSIGN file. Create entry in PCMM HL7 EVENT file.
+2 ;disable SD*5.3*659, HL7 no longer used by PCMM
QUIT
+3 DO PTPXREF^SCMCHLX1($GET(IFN),$GET(OLDROLE))
+4 QUIT
+5 ;
POSHXREF(IFN) ;Logic for AEVENT* xrefs on POSITION ASSIGNMENT HISTORY file.
+1 ; Create entry in PCMM HL7 EVENT file.
+2 ;disable SD*5.3*659, HL7 no longer used by PCMM
QUIT
+3 DO POSHXREF^SCMCHLX1($GET(IFN))
+4 QUIT
+5 ;
PREHXREF(IFN) ;Logic for AEVENT* xrefs on PRECEPTOR ASSIGNMENT HISTORY file.
+1 ; Create entry in PCMM HL7 EVENT file.
+2 ;disable SD*5.3*659, HL7 no longer used by PCMM
QUIT
+3 DO PREHXREF^SCMCHLX1($GET(IFN))
+4 QUIT
POSBXREF(IFN,FILE) ;Logic for Bookable Hour Cross reference
+1 ;Create entry in PCMM HL7 EVENT file
+2 ;disable SD*5.3*659, HL7 no longer used by PCMM
QUIT
+3 DO POSBXREF^SCMCHLX1(+$GET(IFN),$GET(FILE))
+4 QUIT