source: FOIAVistA/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORWRP2.m@ 949

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

initial load of FOIAVistA 6/30/08 version

File size: 3.0 KB
Line 
1ORWRP2 ; dcm/slc - Health Summary adhoc RPC's
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**10,109**;Dec 17, 1997
3COMP(ORY) ;Get ADHOC sub components (FILE 142.1)
4 ;RPC => ORWRP2 HS COMPONENTS
5 ;Y(i)=(1)I;IFN^(2)Component Name [Abb]^(3)Occ Limit^(4)Time Limit^(5)Header Name^
6 ; (6)Hosp Loc Disp^(7)ICD Text Disp^(8)Prov Narr Disp^(9)Summary Order
7 D COMP^GMTSADH5(.ORY)
8 Q
9 ;
10COMPABV(ORY) ;Get ADHOD sub components listed by Abbreviation
11 N I,X,X1,X2,X3
12 D COMP^GMTSADH5(.ORY)
13 S I=0
14 F S I=$O(ORY(I)) Q:'I S X=ORY(I) D
15 . S X1=$P($P(X,"^",2),"["),X1=$E(X1,1,$L(X1)-1),X2=$P($P(X,"^",2),"[",2),X2=$E(X2,1,$L(X2)-1)
16 . ;S X3=X2_" - "_X1_" ",$P(ORY(I),"^",2)=X3
17 . S X3=X2_" - "_$P(X,"^",5)_" ",$P(ORY(I),"^",2)=X3
18 Q
19COMPDISP(ORY) ;Get ADHOD sub components listed by Display Name
20 N I,X,X1,X2,X3
21 D COMP^GMTSADH5(.ORY)
22 S I=0
23 F S I=$O(ORY(I)) Q:'I S X=ORY(I) D
24 . S X1=$P($P(X,"^",2),"["),X1=$E(X1,1,$L(X1)-1),X2=$P($P(X,"^",2),"[",2),X2=$E(X2,1,$L(X2)-1)
25 . S X3=$P(X,"^",5)_" ["_X2_"]",$P(ORY(I),"^",2)=X3
26 Q
27COMPSUB(ORY,ORSUB) ;Get subitems from a predefined Adhoc component
28 I '$L($T(COMPSUB^GMTSADH5)) Q
29 D COMPSUB^GMTSADH5(.ORY,ORSUB)
30 Q
31 ;
32SAVLKUP(OK,VAL) ;save Adhoc lookup selection
33 N ORERR
34 S OK=""
35 D EN^XPAR(DUZ_";VA(200,","ORWRP ADHOC LOOKUP",1,VAL,.ORERR)
36 I ORERR S OK=VAL_":"_ORERR
37 Q
38GETLKUP(ORY) ;Get Adhoc lookup selection
39 S ORY=$$GET^XPAR("ALL","ORWRP ADHOC LOOKUP",1,"I")
40 Q
41FILES(ORY,ORCOMP) ;Get Files to select from for a component
42 ;RPC => ORWRP2 HS COMP FILES
43 D FILES^GMTSADH5(.ORY,ORCOMP)
44 Q
45 ;
46FILESEL(OROOT,ORFILE,ORFROM,ORDIR) ;Get file entries for Combobox
47 ;RPC => ORWRP2 HS FILE LOOKUP
48 D FILESEL^GMTSADH5(.OROOT,ORFILE,ORFROM,ORDIR)
49 Q
50 ;
51REPORT(OROOT,ORCOMPS,ORDFN) ;Build Report from array of Components passed in COMPS
52 ;RPC => ORWRP2 HS REPORT TEXT
53 ;ORCOMPS(i)=array of subcomponents chosen, value is pointer at ^GMT(142,DA(1),1,DA)
54 Q:'$G(ORDFN)
55 N GMTSEGC,GMTSEG,ORGMTSEG,ORSEGC,ORSEGI
56 K ^TMP("ORDATA",$J)
57 D REPORT^GMTSADH5(.ORGMTSEG,.ORSEGC,.ORSEGI,.ORCOMPS,.ORDFN)
58 Q:'$O(ORGMTSEG(0))
59 D START^ORWRP(80,"REPORT1^ORWRP2(.ORGMTSEG,.ORSEGC,.ORSEGI,ORDFN)")
60 S OROOT=$NA(^TMP("ORDATA",$J,1))
61 Q
62REPORT1(GMTSEG,GMTSEGC,GMTSEGI,DFN) ;
63 N GMTS,GMTS1,GMTS2,GMTSAGE,GMTSDOB,GMTSDTM,GMTSLO,GMTSLPG,GMTSPHDR,GMTSPNM,GMTSRB,GMTSSN,GMTSWRD
64 N CNT,INC,ORVP,ROOT,SEX,VADM,VAERR,VAIN
65 S ORVP=DFN
66 D ADHOC^ORPRS13
67 Q
68 ;
69SUBITEM(ORY,ORTEST) ;Get Subitems for a Test Panel
70 ;RPC => ORWRP2 HS SUBITEMS
71 D SUBITEM^GMTSADH5(.ORY,ORTEST)
72 Q
73PREPORT(OROOT,ORCOMPS,ORDFN) ;Build Report & Print
74 ;Called from File|Print on Reports Tab after selecting ADHOC Health Summary
75 ;COMPS(i)=array of subcomponents chosen, value is pointer at ^GMT(142,DA(1),1,DA)
76 Q:'$G(ORDFN)
77 N GMTSEGC,GMTSEG,ORGMTSEG,ORSEGC,ORSEGI
78 D REPORT^GMTSADH5(.ORGMTSEG,.ORSEGC,.ORSEGI,.ORCOMPS,.ORDFN)
79 Q:'$O(ORGMTSEG(0))
80 M GMTSEG=ORGMTSEG,GMTSEGC=ORSEGC,GMTSEGI=ORSEGI
81 N GMTS,GMTS1,GMTS2,GMTSAGE,GMTSDOB,GMTSDTM,GMTSLO,GMTSLPG,GMTSPHDR,GMTSPNM,GMTSRB,GMTSSN,GMTSWRD
82 N CNT,INC,ORVP,ROOT,SEX,VADM,VAERR,VAIN
83 S ORVP=ORDFN
84 D ADHOC^ORPRS13
85 Q
Note: See TracBrowser for help on using the repository browser.