source: FOIAVistA/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORRHCO.m@ 794

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

initial load of FOIAVistA 6/30/08 version

File size: 2.2 KB
Line 
1ORRHCO ; SLC/KCM - CPRS Query Tools - Orders ; [4/4/02 2:07pm]
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**153,242**;Dec 17, 1997;Build 6
3 ;
4NXT() ; Increment ILST
5 S ILST=ILST+1
6 Q ILST
7 ;
8ORDITM(Y,FROM,DIR,XREF) ; Return a subset of orderable items
9 ; .Return Array, Starting Text, Direction, Cross Reference (B or S.x)
10 ; ^ORD(101.43,"S.xxx",UpperCase,DA)=Mne^MixedCase^InactvDt^.01IfMne
11 ; Y(n)=IEN^.01 Name^.01 Name -or- IEN^Synonym <.01 Name>^.01 Name
12 ; similar to ORDITM^ORWDX but does not screen inactives
13 N I,X,IEN,CNT,SKIP S I=0,CNT=44,SKIP=0
14 F Q:I'<CNT S FROM=$O(^ORD(101.43,XREF,FROM),DIR) Q:FROM="" D
15 . S IEN="" F S IEN=$O(^ORD(101.43,XREF,FROM,IEN),DIR) Q:'IEN D
16 . . I XREF="B" D
17 . . . I $D(^ORD(101.43,XREF,FROM,IEN))=1 S X=FROM
18 . . . E S X=FROM_" <"_$P(^ORD(101.43,IEN,0),U,1)_">"
19 . . . S I=I+1,Y(I)=IEN_U_X
20 . . E D
21 . . . S X=^ORD(101.43,XREF,FROM,IEN)
22 . . . I 'X S X=$P(X,U,2)
23 . . . E S X=$P(X,U,2)_" <"_$P(X,U,4)_">"
24 . . . I (XREF="S.CSLT"),($$UP^XLFSTR(X)["ALL SERVICE") Q
25 . . . E S I=I+1,Y(I)=IEN_U_X
26 Q
27CGRP(ORY) ;Return Consult Display Group
28 S ORY="ALL SERVICES"_U_$O(^ORD(100.98,"B","CSLT",0))
29 Q
30OISETS(LST) ; Return a list of sets for orderable items
31 N DGNM,IEN,SHORT,IDX
32 S LST(1)="^(no limit)",IDX=1
33 S DGNM="" F S DGNM=$O(^ORD(100.98,"B",DGNM)) Q:DGNM="" D
34 . S IEN=0 F S IEN=$O(^ORD(100.98,"B",DGNM,IEN)) Q:'IEN D
35 . . I ^ORD(100.98,"B",DGNM,IEN)=1 Q
36 . . S SHORT=$P(^ORD(100.98,IEN,0),U,3)
37 . . I $D(^ORD(101.43,"S."_SHORT)) S IDX=IDX+1,LST(IDX)=SHORT_U_DGNM
38 Q
39ORDSTS(LST) ; List order statuses
40 N ILST,X,IEN S ILST=0
41 S X="" F S X=$O(^ORD(100.01,"B",X)) Q:X="" D
42 . S IEN=0 F S IEN=$O(^ORD(100.01,"B",X,IEN)) Q:'IEN D
43 . . Q:$$SCREEN^XTID(100.01,,IEN_",") ;inactive VUID
44 . . S LST($$NXT)=IEN_U_X
45 Q
46SIGNSTS(LST) ; List order signature statuses
47 S LST(1)="0^ON CHART w/written orders"
48 S LST(2)="1^ELECTRONIC"
49 S LST(3)="2^NOT SIGNED"
50 S LST(4)="3^NOT REQUIRED"
51 S LST(5)="4^ON CHART w/printed orders"
52 S LST(6)="5^NOT REQUIRED due to cancel"
53 S LST(7)="6^SERVICE CORRECTION to signed order"
54 S LST(8)="7^DIGITALLY SIGNED"
55 Q
56ABSTRT(Y,NIL) ;Return abnormal result start date
57 S Y=$$GET^XPAR("SYS^PKG","ORHEPC ABNORMAL START",1,"I")
58 Q
Note: See TracBrowser for help on using the repository browser.