source: WorldVistAEHR/trunk/r/AUTOMATED_LAB_INSTRUMENTS-LA/LA7VORU2.m@ 1240

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

initial load of WorldVistAEHR

File size: 2.2 KB
Line 
1LA7VORU2 ;DALOI/JMC - LAB ORU (Result) message builder cont'd ; 11-21-986
2 ;;5.2;AUTOMATED LAB INSTRUMENTS;**46,64**;Sep 27, 1994
3 ;
4AP ; Observation/Result segment for Lab AP Results
5 ;
6 N LA7DATA,LA7IDT,LRSB,LRSS
7 ;
8 S LRDFN=LA("LRDFN"),LRSS=LA("SUB"),(LA7IDT,LRIDT)=LA("LRIDT")
9 ;
10 S (LA7NLT,LA("NLT"))=$P($$DEFCODE^LA7VHLU5(LRSS,.012,"",""),"!")
11 D OBR^LA7VORU
12 D NTE^LA7VORU
13 ;
14APORM ; Entry point when building OBX segments for ORM message
15 S LA7OBXSN=0
16 ;
17 ; Surgical pathology (SP) subscript reports
18 I LRSS="SP" D SP
19 ;
20 ; Cytology (CY) subscript reports
21 I LRSS="CY" F LRSB=.012,.013,.014,.015,.016,1,1.1,1.2,1.4 D OBX^LA7VORU1
22 ;
23 ; Cytology (EM) subscript reports
24 I LRSS="EM" F LRSB=.012,.013,.014,.015,.016,1.1,1.2,1.4 D OBX^LA7VORU1
25 ;
26 Q
27 ;
28 ;
29SP ; Process "SP" subscript
30 N LA7ORG,LA7P,LA7SR,LA7SS
31 ;
32 ; Process main report
33 I LA7NVAF'=1 F LRSB=.012,.013,.014,.015,.016,1,1.1,1.3,1.4 D OBX^LA7VORU1
34 I LA7NVAF=1 D SPDOD
35 ;
36 ; Process supplementary reports
37 S LRSB=1.2,LA7SR=0
38 F S LA7SR=$O(^LR(LRDFN,LRSS,LRIDT,1.2,LA7SR)) Q:'LA7SR D
39 . N LA7IDT
40 . ; If don't release this report then skip.
41 . I $P($G(^LR(LRDFN,LRSS,LRIDT,1.2,LA7SR,0)),"^",2)'=1 Q
42 . S LA7IDT=LRIDT_","_LA7SR D OBX^LA7VORU1
43 ;
44 ; Process organ/tissue subfile
45 S LA7ORG=0
46 F S LA7ORG=$O(^LR(LRDFN,LRSS,LRIDT,2,LA7ORG)) Q:'LA7ORG D
47 . N LA7IDT
48 . S LRSB=10,LA7IDT=LRIDT_","_LA7ORG D OBX^LA7VORU1
49 . S LRSB="10,2",LA7IDT=LRIDT_","_LA7ORG D OBX^LA7VORU1
50 . ; Procedures
51 . S LA7P=0,LRSB="10,1.5"
52 . F S LA7P=$O(^LR(LRDFN,LRSS,LRIDT,2,LA7ORG,4,LA7P)) Q:'LA7P D
53 . . S LA7IDT=LRIDT_","_LA7ORG_","_LA7P D OBX^LA7VORU1
54 . ; Special studies
55 . S LA7SS=0,LRSB="10,5"
56 . F S LA7SS=$O(^LR(LRDFN,LRSS,LRIDT,2,LA7ORG,5,LA7SS)) Q:'LA7SS D
57 . . S LA7IDT=LRIDT_","_LA7ORG_","_LA7SS D OBX^LA7VORU1
58 ;
59 Q
60 ;
61 ;
62SPDOD ; Build OBX segment's to special DoD specifications.
63 ;
64 N LA7DA
65 ;
66 S LRSB=.012 D OBX^LA7VORU1
67 ;
68 ; Send word-processing fields as series of OBX's for DoD.
69 ; DoD cannot handle formatted text (FT) data type.
70 F LRSB=.012,.013,.014,.015,.016,1,1.1,1.3,1.4 D
71 . N LA7IDT,LA7SB
72 . S LA7DA=0,LA7SB=$S(LRSB=.013:.2,LRSB=.014:.3,LRSB=.015:.4,LRSB=.016:.5,1:LRSB)
73 . F S LA7DA=$O(^LR(LRDFN,LRSS,LRIDT,LA7SB,LA7DA)) Q:'LA7DA D
74 . . S LA7IDT=LRIDT_","_LA7DA D OBX^LA7VORU1
75 ;
76 Q
Note: See TracBrowser for help on using the repository browser.