source: FOIAVistA/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORWDPS5.m@ 1803

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

initial load of FOIAVistA 6/30/08 version

File size: 1.8 KB
Line 
1ORWDPS5 ;SLC/JLI - CPRS Orders Utility ; 8/15/2002 11AM
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**149,190**;Dec 17, 1997
3LESGRP(ORY,ORLES) ;Return all of the orders' display groups LES checked
4 ;LES will check the orders belonging to the following display group
5 ; 1. LAB/LABORATORY ORDERS
6 ; 2. BLOOD BANK ORDERS
7 ; 3. CHEMISTRY ORDERS
8 N LABID,BLDBKID,CHMID
9 S (LABID,BLDBKID,CHMID,ORY)=0
10 S:$D(^ORD(100.98,"B","LAB")) LABID=$O(^ORD(100.98,"B","LAB",0))
11 I 'LABID S:$D(^ORD(100.98,"B","LABORATORY")) LABID=$O(^ORD(100.98,"B","LABORATORY",0))
12 S:$D(^ORD(100.98,"B","BLOOD BANK")) BLDBKID=$O(^ORD(100.98,"B","BLOOD BANK",0))
13 S:$D(^ORD(100.98,"B","CHEMISTRY")) CHMID=$O(^ORD(100.98,"B","CHEMISTRY",0))
14 I ('LABID)!('BLDBKID!('CHMID)) Q
15 S ORY=LABID_U_BLDBKID_U_CHMID
16 Q
17 ;
18LESAPI(ORY,FLDS) ;Call LES Api from inside CPRS for validating changed lab order
19 ; FLDS = DFN^TEST^ORL^ORNP^ORDT
20 ; DFN: Patient DFN (pointer to #2)
21 ; TEST: Lab Test IFN (pointer to #101.43)
22 ; ORL: Patient Location (pointer to #44)
23 ; ORNP: Provider IEN (pointer to #200)
24 ; ORDT: Collection date/time (fileman format)
25 N DFNL,TESTL,ORLOCL,ORNPL,ORDTL,HAVELES
26 S (DFNL,TESTL,ORLOCL,ORNPL,ORDTL,HAVELES)=""
27 S DFNL=$P(FLDS,U,1)
28 S TESTL=$P(FLDS,U,2)
29 S ORLOCL=$P(FLDS,U,3)
30 S ORNPL=$P(FLDS,U,4)
31 S ORDTL=$P(FLDS,U,5)
32 S HAVELES=$TEXT(COM^AVJLES)
33 I $L(HAVELES) D COM^AVJLES(.ORY,DFNL,TESTL,ORLOCL,ORNPL,ORDTL)
34 S ORY(1)=""
35 Q
36 ;
37ISVTP(ORY,ODIEN) ;True: is verbal or telephoned or policy order
38 S ORY=0
39 Q:'$D(^OR(100,+ODIEN,0))
40 N VERB,TEL,POL,LSTACT,NATR
41 S (VERB,TEL,POL,LSTACT)=0,NATR=""
42 S VERB=$O(^ORD(100.02,"B","VERBAL",0))
43 S TEL=$O(^ORD(100.02,"B","TELEPHONED",0))
44 S POL=$O(^ORD(100.02,"B","POLICY",0))
45 S LSTACT=$O(^OR(100,+ODIEN,8,"?"),-1)
46 S NATR=$P(^OR(100,+ODIEN,8,LSTACT,0),U,12)
47 I (NATR=VERB)!(NATR=TEL)!(NATR=POL) S ORY=1
48 Q
Note: See TracBrowser for help on using the repository browser.