source: FOIAVistA/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORWDGX.m@ 1611

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

initial load of FOIAVistA 6/30/08 version

File size: 1.8 KB
Line 
1ORWDGX ; SLC/KCM - Generic Orders calls for Windows Dialogs [ 08/05/96 8:21 AM ]
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;;Dec 17, 1997
3 ;
4ACT() N X,RSLT S X=^(0),RSLT=1
5 I "DQ"'[$P(X,U,4) S RSLT=0
6 S X1=$O(^ORD(100.98,"B","ACTIVITY",0))
7 S X2=$O(^ORD(100.98,"B","NURSING",0))
8 I "DQ"'[$P(X,U,4) S RSLT=0
9 I RSLT,((U_X1_U_X2_U)'[(U_$P(X,U,5)_U)) S RSLT=0
10 Q RSLT
11NURS() N X,RSLT S X=^(0),RSLT=1
12 I "DQ"'[$P(X,U,4) S RSLT=0
13 I RSLT,($P(X,U,5)'=$O(^ORD(100.98,"B","NURSING",0))) S RSLT=0
14 Q RSLT
15OITEXT(Y,DLG) ; Return Orderable Item Text given dialog or quick order
16 S Y=$P(^ORD(101.41,DLG,0),U,2)
17 Q
18LOAD(LST,PAR) ; Load a list of activity orders
19 N I,ILST,DLG,NAM,TLST
20 D GETLST^XPAR(.TLST,"ALL",PAR)
21 S I=0,ILST=0 F S I=$O(TLST(I)) Q:'I D
22 . S DLG=$P(TLST(I),U,2),NAM=$P(^ORD(101.41,+DLG,0),U,2)
23 . S ILST=ILST+1,LST(ILST)=DLG_U_NAM
24 Q
25 ;
26 N DLGTYP,OIDLG,FTDLG,OITYP,I,IFN
27 S DLGTYP=$P(^ORD(101.41,DLG,0),U,4)
28 S OIDLG=$O(^ORD(101.41,"B","OR GTX ORDERABLE ITEM",0))
29 S FTDLG=$O(^ORD(101.41,"B","OR GTX FREE TEXT OI",0))
30 I DLGTYP="D" D
31 . S I=0,IFN=0 F S I=$O(^ORD(101.41,DLG,10,I)) S X=^(I,0) D Q:IFN
32 . . I $P(X,U,2)=OIDLG S IFN=I,OITYP="O"
33 . . I $P(X,U,2)=FTDLG S IFN=I,OITYP="F"
34 . S Y="" I $L($G(^ORD(101.41,DLG,10,IFN,7))) X ^(7)
35 . I OITYP="O" S Y=$P(^ORD(101.43,+Y,0),U,1)
36 Q
37VMDEF(LST) ; Return dialog definition for vitals/measurements
38 N ILST S ILST=0
39 S LST($$NXT)="~Measurements" D MEASURE
40 S LST($$NXT)="~Schedules" D VMSCHED
41 Q
42MEASURE ; Get measurements available
43 S X="" F S X=$O(^ORD(101.43,"S.V/M",X)) Q:X="" D
44 . S I=$O(^ORD(101.43,"S.V/M",X,0)),LST($$NXT)="i"_I_U_X
45 S LST($$NXT)="dTPR B/P" ; ** do this with a parameter
46 Q
47VMSCHED ; Get vitals/measurements schedules
48 S X="" F S X=$O(^PS(51.1,"APGMRV",X)) Q:X="" D
49 . S I=$O(^PS(51.1,"APGMRV",X,0)),LST($$NXT)="i"_I_U_X
50 Q
51NXT() ; Increment index into LST
52 S ILST=ILST+1
53 Q ILST
Note: See TracBrowser for help on using the repository browser.