Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: ORWDGX

ORWDGX.m

Go to the documentation of this file.
  1. ORWDGX ; SLC/KCM - Generic Orders calls for Windows Dialogs [ 08/05/96 8:21 AM ]
  1. ;;3.0;ORDER ENTRY/RESULTS REPORTING;**243**;Dec 17, 1997;Build 242
  1. ;
  1. ACT() N X,RSLT S X=^(0),RSLT=1
  1. I "DQ"'[$P(X,U,4) S RSLT=0
  1. S X1=$O(^ORD(100.98,"B","ACTIVITY",0))
  1. S X2=$O(^ORD(100.98,"B","NURSING",0))
  1. I "DQ"'[$P(X,U,4) S RSLT=0
  1. I RSLT,((U_X1_U_X2_U)'[(U_$P(X,U,5)_U)) S RSLT=0
  1. Q RSLT
  1. NURS() N X,RSLT S X=^(0),RSLT=1
  1. I "DQ"'[$P(X,U,4) S RSLT=0
  1. I RSLT,($P(X,U,5)'=$O(^ORD(100.98,"B","NURSING",0))) S RSLT=0
  1. Q RSLT
  1. OITEXT(Y,DLG) ; Return Orderable Item Text given dialog or quick order
  1. S Y=$P(^ORD(101.41,DLG,0),U,2)
  1. Q
  1. LOAD(LST,PAR) ; Load a list of activity orders
  1. N I,ILST,DLG,NAM,TLST
  1. D GETLST^XPAR(.TLST,"ALL",PAR)
  1. S I=0,ILST=0 F S I=$O(TLST(I)) Q:'I D
  1. . S DLG=$P(TLST(I),U,2),NAM=$P(^ORD(101.41,+DLG,0),U,2)
  1. . S ILST=ILST+1,LST(ILST)=DLG_U_NAM
  1. Q
  1. ;
  1. N DLGTYP,OIDLG,FTDLG,OITYP,I,IFN
  1. S DLGTYP=$P(^ORD(101.41,DLG,0),U,4)
  1. S OIDLG=$O(^ORD(101.41,"B","OR GTX ORDERABLE ITEM",0))
  1. S FTDLG=$O(^ORD(101.41,"B","OR GTX FREE TEXT OI",0))
  1. I DLGTYP="D" D
  1. . S I=0,IFN=0 F S I=$O(^ORD(101.41,DLG,10,I)) S X=^(I,0) D Q:IFN
  1. . . I $P(X,U,2)=OIDLG S IFN=I,OITYP="O"
  1. . . I $P(X,U,2)=FTDLG S IFN=I,OITYP="F"
  1. . S Y="" I $L($G(^ORD(101.41,DLG,10,IFN,7))) X ^(7)
  1. . I OITYP="O" S Y=$P(^ORD(101.43,+Y,0),U,1)
  1. Q
  1. VMDEF(LST) ; Return dialog definition for vitals/measurements
  1. N ILST S ILST=0
  1. S LST($$NXT)="~Measurements" D MEASURE
  1. S LST($$NXT)="~Schedules" D VMSCHED
  1. Q
  1. MEASURE ; Get measurements available
  1. S X="" F S X=$O(^ORD(101.43,"S.V/M",X)) Q:X="" D
  1. . S I=$O(^ORD(101.43,"S.V/M",X,0)),LST($$NXT)="i"_I_U_X
  1. S LST($$NXT)="dTPR B/P" ; ** do this with a parameter
  1. Q
  1. VMSCHED ; Get vitals/measurements schedules
  1. K ^TMP($J,"ORWDGX APGMRV")
  1. D AP^PSS51P1("GMRV",,,,"ORWDGX APGMRV")
  1. S X="" F S X=$O(^TMP($J,"ORWDGX APGMRV","APGMRV",X)) Q:X="" D
  1. . S I=$O(^TMP($J,"ORWDGX APGMRV","APGMRV",X,0)),LST($$NXT)="i"_I_U_X
  1. K ^TMP($J,"ORWDGX APGMRV")
  1. Q
  1. NXT() ; Increment index into LST
  1. S ILST=ILST+1
  1. Q ILST