VistA Analysis » VistA Reference » RPCs » ORWU DEFAULT DIVISION

ORWU DEFAULT DIVISION

Returns True or False for a user depending on default division information.

Properties

Property Value
Label DEFDIV
MUMPS Implementation ORWU1
Return Type SINGLE VALUE

MUMPS Method Description

Property Value
Method DEFDIV^ORWU1
Method Comment Return user's default division, if specified.
First Comment

Variables used:
ORDD = Default division.
ORDIV = Division holder variable.
ORGOOD = Flag for successful default division found.
ORIEN = IEN of user.
ORZ = Memory array storage variable.
ORZERR = Error storage for LIST^DIC call.
Y = Returned value.
Code
 N ORDD,ORDIV,ORGOOD,ORIEN,ORZ,ORZERR
S ORIEN=DUZ,ORDIV=""
S Y=0,(ORDD,ORGOOD)=0 ; Initialize variables.
D LIST^DIC(200.02,","_ORIEN_",","@;.01;1","QP","","","","","","","ORZ","ORZERR")
I $P(ORZ("DILIST",0),U)=0 Q ; No Divisions listed.
F S ORDD=$O(ORZ("DILIST",ORDD)) Q:+ORDD=0!'($L(ORDD)) D Q:ORGOOD
.;
.; See if current entry being processed is "Default" (done if so):
.I $P(ORZ("DILIST",ORDD,0),U,3)["Y" S ORDIV=$P(ORZ("DILIST",ORDD,0),U,2),ORGOOD=1 ; Division text.
.;
I (ORDIV="") Q ; Punt if no default division.
I $$UP^XLFSTR(ORDIV)="SALT LAKE CITY OIFO" S Y=1

CPRS

File Type Description
Pascal File fFrame.pas


Document generated on August 31st 2022, 2:55:43 pm