Changeset 434 for ccr/trunk/p/LA7VOBX1.m


Ignore:
Timestamp:
Apr 14, 2009, 10:57:24 AM (15 years ago)
Author:
George Lilly
Message:

rollback of Lab for RPMS code

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, 2009
    2  ;;5.2;AUTOMATED LAB INSTRUMENTS;**46,61,63,64,71**;Sep 27, 1994
     1LA7VOBX1 ;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
    33 ; JMC - mods to check for IHS V LAB file
    44 ;
     
    66 ; Called by LA7VOBX
    77 ;
    8  N LA76304,LA7ALT,LA7DIV,LA7I,LA7RS,LA7X,LA7Y,X
     8 N LA76304,LA7ALT,LA7DIV,LA7I,LA7X,LA7Y,X
    99 ;
    1010 ; "CH" subscript requires a dataname
     
    1313 ; get result node from LR global.
    1414 S LA76304(0)=$G(^LR(LRDFN,LRSS,LRIDT,0))
    15  S LA7RS=$P(LRSB,"^",2),LRSB=$P(LRSB,"^")
    1615 S LA7VAL=$G(^LR(LRDFN,LRSS,LRIDT,LRSB))
    17  ; If previous results have been corrected then send corrected status
    18  I LA7RS="",$P(LA7VAL,"^",10)=2 S LA7RS="C"
    1916 ;
    2017 ; Check if test is OK to send - (O)utput or (B)oth
    2118 S LA7X=$P(LA7VAL,"^",12)
    2219 I LA7X]"","BO"'[LA7X Q
    23  I LA7X="",'$$OKTOSND^LA7VHLU1(LRSS,LRSB,+$P($P(LA7VAL,"^",3),"!",7)) Q
     20 I LA7X="",'$$OKTOSND^LA7VHLU1(LRSS,LRSB,+$P($P(LA7VAL,"^",3),"!",5)) Q
    2421 ;
    2522 ; If no result NLT or LOINC try to determine from file #60
    2623 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        ;
    3127 I $P(LA7X,"!",2)=""!($P(LA7X,"!",3)="") S $P(LA7VAL,"^",3)=$$DEFCODE^LA7VHLU5(LRSS,LRSB,LA7X,$P(LA76304(0),"^",5))
    3228 ; No result NLT code - log error
     
    7167 ;
    7268 ; 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)
    7770 ;
    7871 ; Observation identifer
     
    8376 ;
    8477 ; 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)
    9279 ;
    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"," ")
    9582 S LA7OBX(6)=$$OBX6^LA7VOBX($P(LA7X,"!",7),"",LA7FS,LA7ECH)
    9683 ;
     
    9986 ;
    10087 ; Abnormal flags
    101  S LA7OBX(8)=$$OBX8^LA7VOBX($P(LA7VAL,"^",2))
     88 S LA7OBX(8)=$$OBX8^LA7VOBX($P(LA7VAL,U,2))
    10289 ;
    10390 ; "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"))
    10792 ;
    10893 ; Observation date/time - collection date/time per HL7 standard
Note: See TracChangeset for help on using the changeset viewer.