source: FOIAVistA/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORIMO.m

Last change on this file was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 1.1 KB
Line 
1ORIMO ;SLC/JDL - Inpatient medication on outpatient. ; 07/07/2005
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**187,190,195,215**;Dec 17, 1997
3IMOLOC(ORY,ORLOC,ORDFN) ;ORY>=0: LOC is an IMO authorized location
4 S ORY=-1
5 N PACH
6 S PACH=$$PATCH^XPDUTL("PSJ*5.0*111")
7 Q:'PACH
8 I $L($TEXT(SDIMO^SDAMA203)) D
9 . ;I $P($G(^SC(ORLOC,0)),U,3)'="C" Q
10 . ;I $D(^SC("AE",1,ORLOC))=1 S ORY=1
11 . ;#DBIA 4133
12 . S ORY=$$SDIMO^SDAMA203(ORLOC,ORDFN)
13 . K SDIMO(1)
14 Q
15 ;
16IMOOD(ORY,ORDERID) ;Is it an IMO order?
17 Q:'$D(^OR(100,+ORDERID,0))
18 N PIMO,DGRP,IMOGRP,ISIMO
19 S (PIMO,DGRP,ISIMO)=0
20 I $P($G(^OR(100,+ORDERID,0)),U,18)>0 S PIMO=1
21 S DGRP=$P($G(^OR(100,+ORDERID,0)),U,11)
22 S IMOGRP=$O(^ORD(100.98,"B","CLINIC ORDERS",""))
23 I DGRP=IMOGRP S ISIMO=1
24 I PIMO,ISIMO S ORY=1
25 Q
26 ;
27ISCLOC(ORY,ALOC) ;Is it a clinical location
28 S ORY=0
29 Q:'$D(^SC(+ALOC,0))
30 I $P(^SC(+ALOC,0),U,3)="C" S ORY=1
31 Q
32ISIVQO(ORY,DLGID) ;Is it an IV quick order
33 S ORY=0
34 Q:'$D(^ORD(101.41,DLGID,0))
35 N IVGRP,DLGTYP,DLGGRP
36 S IVGRP=$O(^ORD(100.98,"B","IV RX",0))
37 S DLGTYP=$P($G(^ORD(101.41,DLGID,0)),U,4)
38 S DLGGRP=$P($G(^ORD(101.41,DLGID,0)),U,5)
39 I (DLGTYP="Q"),(DLGGRP=IVGRP) S ORY=1
40 Q
Note: See TracBrowser for help on using the repository browser.