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

ORWPS1.m

Go to the documentation of this file.
  1. ORWPS1 ; SLC/Staff - Meds Tab;17-Jun-2009 16:26;PLS
  1. ;;3.0;ORDER ENTRY/RESULTS REPORTING;**10,1003,1004**;Dec 17, 1997
  1. ;IHS/MSC/DKM - Modified to accept dialog type:
  1. ; i=inpatient; o=outpatient; h=outside meds
  1. NEWDLG(Y,DTP) ; Return order dialog info for New Medication
  1. N DGRP,ID,IEN,TXT,TYP,X,X0,X5
  1. S:DTP=+DTP DTP=$S(DTP:"i",1:"o") ; For backward compatibility
  1. S X=$$GET^XPAR("ALL","ORWDX NEW MED",DTP,"I")
  1. S IEN=+X,X0=$G(^ORD(101.41,IEN,0)),X5=$G(^(5))
  1. S TYP=$P(X0,U,4),DGRP=+$P(X0,U,5),ID=+$P(X5,U,5),TXT=$P(X5,U,4)
  1. S Y=IEN_";"_ID_";"_DGRP_";"_TYP_U_TXT
  1. Q
  1. PICKUP(Y) ; Return default for refill location
  1. I $D(^PSX(550,"C")) S Y="M"
  1. E S Y="W"
  1. Q
  1. REFILL(Y,ORDERID,REFLOC,ORVP,ORNP,ORL) ; Refill Request
  1. S ORVP=ORVP_";DPT(",ORL(2)=ORL_";SC(",ORL=ORL(2)
  1. D REF^ORMBLDPS(ORDERID,REFLOC)
  1. S Y=""
  1. Q