source: WorldVistAEHR/trunk/r/SCHEDULING-SD-SC/SCMCHLA1.m@ 1078

Last change on this file since 1078 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 3.4 KB
Line 
1SCMCHLA1 ;ALB/KCL - PCMM HL7 Trans Log Xref API's ; 15-JAN-2000
2 ;;5.3;Scheduling;**210,272**;AUG 13, 1993
3 ;
4ASTSET(SCLOGIEN,STATUS) ;
5 ;Description: Sets the "AST" x-ref on the PCMM HL7 Trans Log file.
6 ;
7 ; Input:
8 ; SCLOGIEN - ien of PCMM HL7 Tans Log file record
9 ; STATUS - internal value of STATUS field
10 ;
11 ;s ^SCPT(404.471,"AST",date/time ack rec'd,status,patient,pcmm trans log ien)
12 ;
13 N NODE
14 ;
15 Q:'$G(SCLOGIEN)
16 Q:$G(STATUS)']""
17 S NODE=$G(^SCPT(404.471,SCLOGIEN,0))
18 N DFN S DFN=$S($P(NODE,"^",2):+$P(NODE,"^",2),1:"W")
19 Q:'+$P(NODE,"^",5)
20 ;
21 I STATUS="RJ"!(STATUS="M") D
22 .S ^SCPT(404.471,"AST",$P(NODE,"^",5),STATUS,DFN,SCLOGIEN)=""
23 ;
24 Q
25 ;
26ASTKILL(SCLOGIEN,STATUS) ;
27 ;Description: Kill logic for "AST" x-ref on the PCMM HL7 Trans Log file.
28 ;
29 ; Input:
30 ; SCLOGIEN - ien of PCMM HL7 Tans Log file record
31 ; STATUS - internal value of STATUS field
32 ;
33 ;k ^SCPT(404.471,"AST",date/time ack rec'd,status,patient,pcmm trans log ien)
34 ;
35 N NODE
36 ;
37 Q:'$G(SCLOGIEN)
38 Q:$G(STATUS)']""
39 S NODE=$G(^SCPT(404.471,SCLOGIEN,0))
40 N DFN S DFN=$S($P(NODE,"^",2):+$P(NODE,"^",2),1:"W")
41 Q:'$P(NODE,"^",5)
42 ;
43 I STATUS="RJ"!(STATUS="M") D
44 .K ^SCPT(404.471,"AST",+$P(NODE,"^",5),STATUS,DFN,SCLOGIEN)
45 ;
46 Q
47 ;
48 ;
49AST1SET(SCLOGIEN,ACKREC) ;
50 ;Description: Sets the "AST1" x-ref on the PCMM HL7 Trans Log file.
51 ;
52 ; Input:
53 ; SCLOGIEN - ien of PCMM HL7 Tans Log file record
54 ; ACKREC - internal value of ACK RECEIVED DATE/TIME field
55 ;
56 ;s ^SCPT(404.471,"AST",date/time ack rec'd,status,patient,pcmm trans log ien)
57 ;
58 N NODE
59 ;
60 Q:'$G(SCLOGIEN)
61 Q:'$G(ACKREC)
62 S NODE=$G(^SCPT(404.471,SCLOGIEN,0))
63 ;Q:'+$P(NODE,"^",2)
64 N DFN S DFN=$S($P(NODE,"^",2):+$P(NODE,"^",2),1:"W")
65 Q:($P(NODE,"^",4)']"")
66 ;
67 I $P(NODE,"^",4)="RJ"!($P(NODE,"^",4)="M") D
68 .S ^SCPT(404.471,"AST",ACKREC,$P(NODE,"^",4),DFN,SCLOGIEN)=""
69 ;
70 Q
71 ;
72AST1KILL(SCLOGIEN,ACKREC) ;
73 ;Description: Kill logic for "AST1" x-ref on the PCMM HL7 Trans Log file.
74 ;
75 ; Input:
76 ; SCLOGIEN - ien of PCMM HL7 Tans Log file record
77 ; ACKREC - internal value of ACK RECEIVED DATE/TIME field
78 ;
79 ;k ^SCPT(404.471,"AST",date/time ack rec'd,status,patient,pcmm trans log ien)
80 ;
81 N NODE
82 ;
83 Q:'$G(SCLOGIEN)
84 Q:'$G(ACKREC)
85 S NODE=$G(^SCPT(404.471,SCLOGIEN,0))
86 N DFN S DFN=$S($P(NODE,"^",2):+$P(NODE,"^",2),1:"W")
87 Q:($P(NODE,"^",4)']"")
88 ;
89 I $P(NODE,"^",4)="RJ"!($P(NODE,"^",4)="M") D
90 .K ^SCPT(404.471,"AST",ACKREC,$P(NODE,"^",4),DFN,SCLOGIEN)
91 ;
92 Q
93 ;
94 ;
95AST2SET(SCLOGIEN,PAT) ;
96 ;Description: Sets the "AST2" x-ref on the PCMM HL7 Trans Log file.
97 ;
98 ; Input:
99 ; SCLOGIEN - ien of PCMM HL7 Tans Log file record
100 ; PAT - internal value of PATIENT field
101 ;
102 ;s ^SCPT(404.471,"AST",date/time ack rec'd,status,patient,pcmm trans log ien)
103 ;
104 N NODE
105 ;
106 Q:'$G(SCLOGIEN)
107 Q:'$G(PAT)
108 S NODE=$G(^SCPT(404.471,SCLOGIEN,0))
109 Q:($P(NODE,"^",4)']"")
110 Q:'+$P(NODE,"^",5)
111 ;
112 I $P(NODE,"^",4)="RJ"!($P(NODE,"^",4)="M") D
113 .S ^SCPT(404.471,"AST",+$P(NODE,"^",5),$P(NODE,"^",4),PAT,SCLOGIEN)=""
114 ;
115 Q
116 ;
117AST2KILL(SCLOGIEN,PAT) ;
118 ;Description: Kill logic for "AST2" x-ref on the PCMM HL7 Trans Log file.
119 ;
120 ; Input:
121 ; SCLOGIEN - ien of PCMM HL7 Tans Log file record
122 ; PAT - internal value of PATIENT field
123 ;
124 ;k ^SCPT(404.471,"AST",date/time ack rec'd,status,patient,pcmm trans log ien)
125 ;
126 N NODE
127 ;
128 Q:'$G(SCLOGIEN)
129 Q:'$G(PAT)
130 S NODE=$G(^SCPT(404.471,SCLOGIEN,0))
131 Q:($P(NODE,"^",4)']"")
132 Q:'+$P(NODE,"^",5)
133 ;
134 I $P(NODE,"^",4)="RJ"!($P(NODE,"^",4)="M") D
135 .K ^SCPT(404.471,"AST",+$P(NODE,"^",5),$P(NODE,"^",4),PAT,SCLOGIEN)
136 Q
Note: See TracBrowser for help on using the repository browser.