- Timestamp:
- Dec 4, 2009, 12:11:15 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WorldVistAEHR/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORWDGX.m
r613 r623 1 ORWDGX ; SLC/KCM - Generic Orders calls for Windows Dialogs [ 08/05/96 8:21 AM ] 2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**243**;Dec 17, 1997;Build 242 3 ; 4 ACT() 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 11 NURS() 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 15 OITEXT(Y,DLG) ; Return Orderable Item Text given dialog or quick order 16 S Y=$P(^ORD(101.41,DLG,0),U,2) 17 Q 18 LOAD(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 37 VMDEF(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 42 MEASURE ; 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 47 VMSCHED ; Get vitals/measurements schedules 48 K ^TMP($J,"ORWDGX APGMRV") 49 D AP^PSS51P1("GMRV",,,,"ORWDGX APGMRV") 50 S X="" F S X=$O(^TMP($J,"ORWDGX APGMRV","APGMRV",X)) Q:X="" D 51 . S I=$O(^TMP($J,"ORWDGX APGMRV","APGMRV",X,0)),LST($$NXT)="i"_I_U_X 52 K ^TMP($J,"ORWDGX APGMRV") 53 Q 54 NXT() ; Increment index into LST 55 S ILST=ILST+1 56 Q ILST 1 ORWDGX ; 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 ; 4 ACT() 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 11 NURS() 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 15 OITEXT(Y,DLG) ; Return Orderable Item Text given dialog or quick order 16 S Y=$P(^ORD(101.41,DLG,0),U,2) 17 Q 18 LOAD(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 37 VMDEF(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 42 MEASURE ; 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 47 VMSCHED ; 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 51 NXT() ; Increment index into LST 52 S ILST=ILST+1 53 Q ILST
Note:
See TracChangeset
for help on using the changeset viewer.