Ignore:
Timestamp:
Dec 4, 2009, 8:26:01 PM (14 years ago)
Author:
George Lilly
Message:

WorldVistAEHR overlayed on FOIAVistA

Location:
FOIAVistA/tag/r
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • FOIAVistA/tag/r/AUTOMATED_LAB_INSTRUMENTS-LA/LA7VORM1.m

    r628 r636  
    1 LA7VORM1 ;DALOI/DLR - LAB ORM (Order) message builder ; 12-12-96
    2  ;;5.2;AUTOMATED LAB INSTRUMENTS;**27,51,46,61,64**;Sep 27, 1994
     1LA7VORM1 ;DALOI/DLR - LAB ORM (Order) message builder ;1/27/07  12:25
     2 ;;5.2;AUTOMATED LAB INSTRUMENTS;**27,51,46,61,64,73**;Sep 27, 1994;Build 7
     3 ; Modified from FOIA VISTA,
     4 ; Copyright (C) 2007 WorldVistA
     5 ;
     6 ; This program is free software; you can redistribute it and/or modify
     7 ; it under the terms of the GNU General Public License as published by
     8 ; the Free Software Foundation; either version 2 of the License, or
     9 ; (at your option) any later version.
     10 ;
     11 ; This program is distributed in the hope that it will be useful,
     12 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
     13 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     14 ; GNU General Public License for more details.
     15 ;
     16 ; You should have received a copy of the GNU General Public License
     17 ; along with this program; if not, write to the Free Software
     18 ; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    319 ;
    420BUILD(LA7628) ;
     
    622 ;
    723 N LA7101,LA762801,LA7629,LA7NVAF,LA7PIDSN,LA7X,ECNT,GBL,SHP,SHPC,SITE,ORUID,NTST
     24 N LDATE,LDATE2
    825 ;
    926 I $G(LA7628)<1!('$D(^LAHM(62.8,+$G(LA7628),0))) D  Q
     
    1128 . D EXIT
    1229 ;
     30 S LDATE2=$P(^LAHM(62.8,LA7628,0),"-",2)
     31 S LDATE=($E(LDATE2,1,4)-1700)_$E(LDATE2,5,8)
    1332 S GBL="^TMP(""HLS"","_$J_")",ECNT=1
    1433 S LA7628(0)=$G(^LAHM(62.8,LA7628,0))
     
    6483 S (LRDFN,LRI,LA7PIDSN)=0
    6584 F  S LRDFN=$O(^TMP("LA7628",$J,LRDFN)) Q:'LRDFN  D  Q:$G(HL)
    66  . N LA7PID,LA7PV1
     85 . N LA7PID,LA7PV1,ORNUM
    6786 . I LA7SMSG=1 D STARTMSG Q:$G(HL)
    68  . I LA7SMSG<2 D PID,PV1
     87 . I LA7SMSG<2 D PID,PV1,IN1^LA7VORM4
    6988 . S LA7UID=""
    7089 . F  S LA7UID=$O(^TMP("LA7628",$J,LRDFN,LA7UID)) Q:LA7UID=""  D
    71  . . N LA76802,LA7ORC,X
     90 . . N LA76802,LA7ORC,X,ORCCHK,DGCHK
     91 . . S ORCCHK="",DGCHK=""
    7292 . . S X=$Q(^LRO(68,"C",LA7UID))
    7393 . . I $QS(X,3)'=LA7UID Q
     
    7696 . . S I=$O(^LRO(68,LRAA,1,LRAD,1,LRAN,5,0))
    7797 . . S LA76802(5)=$G(^LRO(68,LRAA,1,LRAD,1,LRAN,5,I,0))
    78  . . I LA7SMSG=2 D STARTMSG Q:$G(HL)  D PID,PV1
     98 . . ;check for VOE before inserting insurance
     99 . . I DUZ("AG")="E",LA7SMSG=2 D STARTMSG Q:$G(HL)  D PID,PV1,IN1^LA7VORM4
     100 . . I DUZ("AG")'="E",LA7SMSG=2 D STARTMSG Q:$G(HL)  D PID,PV1
    79101 . . S (LA7OBRSN,LA762801)=0
    80102 . . F  S LA762801=$O(^TMP("LA7628",$J,LRDFN,LA7UID,LA762801)) Q:'LA762801  D
     
    82104 . . . F I=0,.1,1,2,5 S LA762801(I)=$G(^LAHM(62.8,LA7628,10,LA762801,I))
    83105 . . . I $$CHKTST^LA7SMU(LA7628,LA762801)'=0 Q  ;deleted accession
    84  . . . D ORC,OBR^LA7VORM3,OBX^LA7VORM3
     106 . . . ; check for VOE to prepare for Diagnosis codes.
     107 . . . I DUZ("AG")="E" D  ; check for VOE
     108 . . . . S ITEMNUM=0
     109 . . . . F  S ITEMNUM=ITEMNUM+1 Q:ITEMNUM>$P(^LRO(69,LDATE,1,0),"^",4)  D
     110 . . . . . I LRDFN=$P(^LRO(69,LDATE,1,ITEMNUM,0),"^") S ORNUM=$P(^LRO(69,LDATE,1,ITEMNUM,0),"^",11)
     111 . . . . I ORCCHK'=1 D ORC S ORCCHK=1
     112 . . . . D OBR^LA7VORM3,OBX^LA7VORM3
     113 . . . E  D  ; not VOE
     114 . . . . D ORC,OBR^LA7VORM3,OBX^LA7VORM3
     115 . . ; check for VOE before inserting Diagnosis code
     116 . . I DUZ("AG")="E",DGCHK'=1 D DG1^LA7VORM4(ORNUM) S DGCHK=1
    85117 . . I LA7SMSG=2 D BLG,SENDMSG
    86118 . I LA7SMSG<2 D BLG
     
    97129 K LRAA,LRACC,LRAD,LRAN,LRDFN,LRI
    98130 K LTST,NLT,NLTIEN,PCNT,RUID,SNIEN,TIEN,X,Y,LA
     131 K ORCCHK,DGCHK,LDATE,LDATE2
    99132 D KVAR^LRX
    100133 I $D(ZTQUEUED) S ZTREQ="@"
     
    228261 Q
    229262 ;
    230  ;
    231263BLG ; Billing segment
    232264 ;
Note: See TracChangeset for help on using the changeset viewer.