SCMCHLA1 ;ALB/KCL - PCMM HL7 Trans Log Xref API's ; 15-JAN-2000
;;5.3;Scheduling;**210,272**;AUG 13, 1993
;
ASTSET(SCLOGIEN,STATUS) ;
;Description: Sets the "AST" x-ref on the PCMM HL7 Trans Log file.
;
; Input:
; SCLOGIEN - ien of PCMM HL7 Tans Log file record
; STATUS - internal value of STATUS field
;
;s ^SCPT(404.471,"AST",date/time ack rec'd,status,patient,pcmm trans log ien)
;
N NODE
;
Q:'$G(SCLOGIEN)
Q:$G(STATUS)']""
S NODE=$G(^SCPT(404.471,SCLOGIEN,0))
N DFN S DFN=$S($P(NODE,"^",2):+$P(NODE,"^",2),1:"W")
Q:'+$P(NODE,"^",5)
;
I STATUS="RJ"!(STATUS="M") D
.S ^SCPT(404.471,"AST",$P(NODE,"^",5),STATUS,DFN,SCLOGIEN)=""
;
Q
;
ASTKILL(SCLOGIEN,STATUS) ;
;Description: Kill logic for "AST" x-ref on the PCMM HL7 Trans Log file.
;
; Input:
; SCLOGIEN - ien of PCMM HL7 Tans Log file record
; STATUS - internal value of STATUS field
;
;k ^SCPT(404.471,"AST",date/time ack rec'd,status,patient,pcmm trans log ien)
;
N NODE
;
Q:'$G(SCLOGIEN)
Q:$G(STATUS)']""
S NODE=$G(^SCPT(404.471,SCLOGIEN,0))
N DFN S DFN=$S($P(NODE,"^",2):+$P(NODE,"^",2),1:"W")
Q:'$P(NODE,"^",5)
;
I STATUS="RJ"!(STATUS="M") D
.K ^SCPT(404.471,"AST",+$P(NODE,"^",5),STATUS,DFN,SCLOGIEN)
;
Q
;
;
AST1SET(SCLOGIEN,ACKREC) ;
;Description: Sets the "AST1" x-ref on the PCMM HL7 Trans Log file.
;
; Input:
; SCLOGIEN - ien of PCMM HL7 Tans Log file record
; ACKREC - internal value of ACK RECEIVED DATE/TIME field
;
;s ^SCPT(404.471,"AST",date/time ack rec'd,status,patient,pcmm trans log ien)
;
N NODE
;
Q:'$G(SCLOGIEN)
Q:'$G(ACKREC)
S NODE=$G(^SCPT(404.471,SCLOGIEN,0))
;Q:'+$P(NODE,"^",2)
N DFN S DFN=$S($P(NODE,"^",2):+$P(NODE,"^",2),1:"W")
Q:($P(NODE,"^",4)']"")
;
I $P(NODE,"^",4)="RJ"!($P(NODE,"^",4)="M") D
.S ^SCPT(404.471,"AST",ACKREC,$P(NODE,"^",4),DFN,SCLOGIEN)=""
;
Q
;
AST1KILL(SCLOGIEN,ACKREC) ;
;Description: Kill logic for "AST1" x-ref on the PCMM HL7 Trans Log file.
;
; Input:
; SCLOGIEN - ien of PCMM HL7 Tans Log file record
; ACKREC - internal value of ACK RECEIVED DATE/TIME field
;
;k ^SCPT(404.471,"AST",date/time ack rec'd,status,patient,pcmm trans log ien)
;
N NODE
;
Q:'$G(SCLOGIEN)
Q:'$G(ACKREC)
S NODE=$G(^SCPT(404.471,SCLOGIEN,0))
N DFN S DFN=$S($P(NODE,"^",2):+$P(NODE,"^",2),1:"W")
Q:($P(NODE,"^",4)']"")
;
I $P(NODE,"^",4)="RJ"!($P(NODE,"^",4)="M") D
.K ^SCPT(404.471,"AST",ACKREC,$P(NODE,"^",4),DFN,SCLOGIEN)
;
Q
;
;
AST2SET(SCLOGIEN,PAT) ;
;Description: Sets the "AST2" x-ref on the PCMM HL7 Trans Log file.
;
; Input:
; SCLOGIEN - ien of PCMM HL7 Tans Log file record
; PAT - internal value of PATIENT field
;
;s ^SCPT(404.471,"AST",date/time ack rec'd,status,patient,pcmm trans log ien)
;
N NODE
;
Q:'$G(SCLOGIEN)
Q:'$G(PAT)
S NODE=$G(^SCPT(404.471,SCLOGIEN,0))
Q:($P(NODE,"^",4)']"")
Q:'+$P(NODE,"^",5)
;
I $P(NODE,"^",4)="RJ"!($P(NODE,"^",4)="M") D
.S ^SCPT(404.471,"AST",+$P(NODE,"^",5),$P(NODE,"^",4),PAT,SCLOGIEN)=""
;
Q
;
AST2KILL(SCLOGIEN,PAT) ;
;Description: Kill logic for "AST2" x-ref on the PCMM HL7 Trans Log file.
;
; Input:
; SCLOGIEN - ien of PCMM HL7 Tans Log file record
; PAT - internal value of PATIENT field
;
;k ^SCPT(404.471,"AST",date/time ack rec'd,status,patient,pcmm trans log ien)
;
N NODE
;
Q:'$G(SCLOGIEN)
Q:'$G(PAT)
S NODE=$G(^SCPT(404.471,SCLOGIEN,0))
Q:($P(NODE,"^",4)']"")
Q:'+$P(NODE,"^",5)
;
I $P(NODE,"^",4)="RJ"!($P(NODE,"^",4)="M") D
.K ^SCPT(404.471,"AST",+$P(NODE,"^",5),$P(NODE,"^",4),PAT,SCLOGIEN)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSCMCHLA1 3651 printed Dec 13, 2024@02:40:22 Page 2
SCMCHLA1 ;ALB/KCL - PCMM HL7 Trans Log Xref API's ; 15-JAN-2000
+1 ;;5.3;Scheduling;**210,272**;AUG 13, 1993
+2 ;
ASTSET(SCLOGIEN,STATUS) ;
+1 ;Description: Sets the "AST" x-ref on the PCMM HL7 Trans Log file.
+2 ;
+3 ; Input:
+4 ; SCLOGIEN - ien of PCMM HL7 Tans Log file record
+5 ; STATUS - internal value of STATUS field
+6 ;
+7 ;s ^SCPT(404.471,"AST",date/time ack rec'd,status,patient,pcmm trans log ien)
+8 ;
+9 NEW NODE
+10 ;
+11 if '$GET(SCLOGIEN)
QUIT
+12 if $GET(STATUS)']""
QUIT
+13 SET NODE=$GET(^SCPT(404.471,SCLOGIEN,0))
+14 NEW DFN
SET DFN=$SELECT($PIECE(NODE,"^",2):+$PIECE(NODE,"^",2),1:"W")
+15 if '+$PIECE(NODE,"^",5)
QUIT
+16 ;
+17 IF STATUS="RJ"!(STATUS="M")
Begin DoDot:1
+18 SET ^SCPT(404.471,"AST",$PIECE(NODE,"^",5),STATUS,DFN,SCLOGIEN)=""
End DoDot:1
+19 ;
+20 QUIT
+21 ;
ASTKILL(SCLOGIEN,STATUS) ;
+1 ;Description: Kill logic for "AST" x-ref on the PCMM HL7 Trans Log file.
+2 ;
+3 ; Input:
+4 ; SCLOGIEN - ien of PCMM HL7 Tans Log file record
+5 ; STATUS - internal value of STATUS field
+6 ;
+7 ;k ^SCPT(404.471,"AST",date/time ack rec'd,status,patient,pcmm trans log ien)
+8 ;
+9 NEW NODE
+10 ;
+11 if '$GET(SCLOGIEN)
QUIT
+12 if $GET(STATUS)']""
QUIT
+13 SET NODE=$GET(^SCPT(404.471,SCLOGIEN,0))
+14 NEW DFN
SET DFN=$SELECT($PIECE(NODE,"^",2):+$PIECE(NODE,"^",2),1:"W")
+15 if '$PIECE(NODE,"^",5)
QUIT
+16 ;
+17 IF STATUS="RJ"!(STATUS="M")
Begin DoDot:1
+18 KILL ^SCPT(404.471,"AST",+$PIECE(NODE,"^",5),STATUS,DFN,SCLOGIEN)
End DoDot:1
+19 ;
+20 QUIT
+21 ;
+22 ;
AST1SET(SCLOGIEN,ACKREC) ;
+1 ;Description: Sets the "AST1" x-ref on the PCMM HL7 Trans Log file.
+2 ;
+3 ; Input:
+4 ; SCLOGIEN - ien of PCMM HL7 Tans Log file record
+5 ; ACKREC - internal value of ACK RECEIVED DATE/TIME field
+6 ;
+7 ;s ^SCPT(404.471,"AST",date/time ack rec'd,status,patient,pcmm trans log ien)
+8 ;
+9 NEW NODE
+10 ;
+11 if '$GET(SCLOGIEN)
QUIT
+12 if '$GET(ACKREC)
QUIT
+13 SET NODE=$GET(^SCPT(404.471,SCLOGIEN,0))
+14 ;Q:'+$P(NODE,"^",2)
+15 NEW DFN
SET DFN=$SELECT($PIECE(NODE,"^",2):+$PIECE(NODE,"^",2),1:"W")
+16 if ($PIECE(NODE,"^",4)']"")
QUIT
+17 ;
+18 IF $PIECE(NODE,"^",4)="RJ"!($PIECE(NODE,"^",4)="M")
Begin DoDot:1
+19 SET ^SCPT(404.471,"AST",ACKREC,$PIECE(NODE,"^",4),DFN,SCLOGIEN)=""
End DoDot:1
+20 ;
+21 QUIT
+22 ;
AST1KILL(SCLOGIEN,ACKREC) ;
+1 ;Description: Kill logic for "AST1" x-ref on the PCMM HL7 Trans Log file.
+2 ;
+3 ; Input:
+4 ; SCLOGIEN - ien of PCMM HL7 Tans Log file record
+5 ; ACKREC - internal value of ACK RECEIVED DATE/TIME field
+6 ;
+7 ;k ^SCPT(404.471,"AST",date/time ack rec'd,status,patient,pcmm trans log ien)
+8 ;
+9 NEW NODE
+10 ;
+11 if '$GET(SCLOGIEN)
QUIT
+12 if '$GET(ACKREC)
QUIT
+13 SET NODE=$GET(^SCPT(404.471,SCLOGIEN,0))
+14 NEW DFN
SET DFN=$SELECT($PIECE(NODE,"^",2):+$PIECE(NODE,"^",2),1:"W")
+15 if ($PIECE(NODE,"^",4)']"")
QUIT
+16 ;
+17 IF $PIECE(NODE,"^",4)="RJ"!($PIECE(NODE,"^",4)="M")
Begin DoDot:1
+18 KILL ^SCPT(404.471,"AST",ACKREC,$PIECE(NODE,"^",4),DFN,SCLOGIEN)
End DoDot:1
+19 ;
+20 QUIT
+21 ;
+22 ;
AST2SET(SCLOGIEN,PAT) ;
+1 ;Description: Sets the "AST2" x-ref on the PCMM HL7 Trans Log file.
+2 ;
+3 ; Input:
+4 ; SCLOGIEN - ien of PCMM HL7 Tans Log file record
+5 ; PAT - internal value of PATIENT field
+6 ;
+7 ;s ^SCPT(404.471,"AST",date/time ack rec'd,status,patient,pcmm trans log ien)
+8 ;
+9 NEW NODE
+10 ;
+11 if '$GET(SCLOGIEN)
QUIT
+12 if '$GET(PAT)
QUIT
+13 SET NODE=$GET(^SCPT(404.471,SCLOGIEN,0))
+14 if ($PIECE(NODE,"^",4)']"")
QUIT
+15 if '+$PIECE(NODE,"^",5)
QUIT
+16 ;
+17 IF $PIECE(NODE,"^",4)="RJ"!($PIECE(NODE,"^",4)="M")
Begin DoDot:1
+18 SET ^SCPT(404.471,"AST",+$PIECE(NODE,"^",5),$PIECE(NODE,"^",4),PAT,SCLOGIEN)=""
End DoDot:1
+19 ;
+20 QUIT
+21 ;
AST2KILL(SCLOGIEN,PAT) ;
+1 ;Description: Kill logic for "AST2" x-ref on the PCMM HL7 Trans Log file.
+2 ;
+3 ; Input:
+4 ; SCLOGIEN - ien of PCMM HL7 Tans Log file record
+5 ; PAT - internal value of PATIENT field
+6 ;
+7 ;k ^SCPT(404.471,"AST",date/time ack rec'd,status,patient,pcmm trans log ien)
+8 ;
+9 NEW NODE
+10 ;
+11 if '$GET(SCLOGIEN)
QUIT
+12 if '$GET(PAT)
QUIT
+13 SET NODE=$GET(^SCPT(404.471,SCLOGIEN,0))
+14 if ($PIECE(NODE,"^",4)']"")
QUIT
+15 if '+$PIECE(NODE,"^",5)
QUIT
+16 ;
+17 IF $PIECE(NODE,"^",4)="RJ"!($PIECE(NODE,"^",4)="M")
Begin DoDot:1
+18 KILL ^SCPT(404.471,"AST",+$PIECE(NODE,"^",5),$PIECE(NODE,"^",4),PAT,SCLOGIEN)
End DoDot:1
+19 QUIT