Changeset 434 for ccr/trunk/p/LA7VOBX1.m
- Timestamp:
- Apr 14, 2009, 10:57:24 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ccr/trunk/p/LA7VOBX1.m
r433 r434 1 LA7VOBX1 ;DALOI/JMC - LAB OBX Segment message builder (CH subscript) cont'd ;Apr 8, 20092 ;;5.2;AUTOMATED LAB INSTRUMENTS;**46,61,63 ,64,71**;Sep 27, 19941 LA7VOBX1 ;DALOI/JMC - LAB OBX Segment message builder (CH subscript) cont'd; 04/13/09 2 ;;5.2;AUTOMATED LAB INSTRUMENTS;**46,61,63**;Sep 27, 1994 3 3 ; JMC - mods to check for IHS V LAB file 4 4 ; … … 6 6 ; Called by LA7VOBX 7 7 ; 8 N LA76304,LA7ALT,LA7DIV,LA7I,LA7 RS,LA7X,LA7Y,X8 N LA76304,LA7ALT,LA7DIV,LA7I,LA7X,LA7Y,X 9 9 ; 10 10 ; "CH" subscript requires a dataname … … 13 13 ; get result node from LR global. 14 14 S LA76304(0)=$G(^LR(LRDFN,LRSS,LRIDT,0)) 15 S LA7RS=$P(LRSB,"^",2),LRSB=$P(LRSB,"^")16 15 S LA7VAL=$G(^LR(LRDFN,LRSS,LRIDT,LRSB)) 17 ; If previous results have been corrected then send corrected status18 I LA7RS="",$P(LA7VAL,"^",10)=2 S LA7RS="C"19 16 ; 20 17 ; Check if test is OK to send - (O)utput or (B)oth 21 18 S LA7X=$P(LA7VAL,"^",12) 22 19 I LA7X]"","BO"'[LA7X Q 23 I LA7X="",'$$OKTOSND^LA7VHLU1(LRSS,LRSB,+$P($P(LA7VAL,"^",3),"!", 7)) Q20 I LA7X="",'$$OKTOSND^LA7VHLU1(LRSS,LRSB,+$P($P(LA7VAL,"^",3),"!",5)) Q 24 21 ; 25 22 ; If no result NLT or LOINC try to determine from file #60 26 23 S LA7X=$P(LA7VAL,"^",3) 27 ; 28 ; Check for no LOINC in 63 and LOINC found in V LAB file. 29 I $P(LA7X,"!",3)="",$D(^TMP("C0C-VLAB",$J,2,LRDFN,LRSS,LRIDT,LRSB)) S $P(LA7X,"!",3)=$P(^TMP("C0C-VLAB",$J,2,LRDFN,LRSS,LRIDT,LRSB),"^") 30 ; 24 ; Check for no LOINC in 63 and LOINC found in V LAB file. 25 I $P(LA7X,"!",3)="",$D(^TMP("LA7-VLAB",$J,2,LRDFN,LRSS,LRIDT,LRSB)) S $P(LA7X,"!",3)=$P(^TMP("LA7-VLAB",$J,2,LRDFN,LRSS,LRIDT,LRSB),"^") 26 ; 31 27 I $P(LA7X,"!",2)=""!($P(LA7X,"!",3)="") S $P(LA7VAL,"^",3)=$$DEFCODE^LA7VHLU5(LRSS,LRSB,LA7X,$P(LA76304(0),"^",5)) 32 28 ; No result NLT code - log error … … 71 67 ; 72 68 ; Value type 73 ; If result is "cancel" or "comment" then data type is ST - string data 74 S LA7X=$S("canccomment"[$P(LA7VAL,"^"):1,1:0) 75 I LA7X S LA7OBX(2)="ST" 76 E S LA7OBX(2)=$$OBX2^LA7VOBX(63.04,LRSB) 69 S LA7OBX(2)=$$OBX2^LA7VOBX(63.04,LRSB) 77 70 ; 78 71 ; Observation identifer … … 83 76 ; 84 77 ; Test value 85 ; If DoD and "canc" then report "PL Cancelled" per Lab Interop ICD. 86 S LA7X=$P(LA7VAL,"^") 87 I LA7X'="canc",$$GET1^DID(63.04,LRSB,"","TYPE","","LA7ERR")="SET" D 88 . S LA7X=$$EXTERNAL^DILFD(63.04,LRSB,"",LA7X) 89 . I LA7X="" S LA7X=$P(LA7VAL,"^") 90 I $G(LA7NVAF)=1,LA7X="canc" S LA7X="PL Cancelled" 91 S LA7OBX(5)=$$OBX5^LA7VOBX(LA7X,LA7OBX(2),LA7FS,LA7ECH) 78 S LA7OBX(5)=$$OBX5^LA7VOBX($P(LA7VAL,"^"),LA7OBX(2),LA7FS,LA7ECH) 92 79 ; 93 ; Units 94 S LA7X=$P(LA7VAL,"^",5) 80 ; Units - remove leading and trailing spaces 81 S LA7X=$P(LA7VAL,"^",5),LA7X=$$TRIM^XLFSTR(LA7X,"LR"," ") 95 82 S LA7OBX(6)=$$OBX6^LA7VOBX($P(LA7X,"!",7),"",LA7FS,LA7ECH) 96 83 ; … … 99 86 ; 100 87 ; Abnormal flags 101 S LA7OBX(8)=$$OBX8^LA7VOBX($P(LA7VAL, "^",2))88 S LA7OBX(8)=$$OBX8^LA7VOBX($P(LA7VAL,U,2)) 102 89 ; 103 90 ; "P"artial or "F"inal results 104 S LA7X=$S("canccommentpending"[$P(LA7VAL,"^"):$P(LA7VAL,"^"),1:"F") 105 I LA7RS="C" S LA7X=LA7RS 106 S LA7OBX(11)=$$OBX11^LA7VOBX(LA7X) 91 S LA7OBX(11)=$$OBX11^LA7VOBX($S("canccommentpending"[$P(LA7VAL,"^"):$P(LA7VAL,"^"),1:"F")) 107 92 ; 108 93 ; Observation date/time - collection date/time per HL7 standard
Note:
See TracChangeset
for help on using the changeset viewer.