VistA Analysis » VistA Reference » RPCs » TIU PERSONAL TITLE LIST

TIU PERSONAL TITLE LIST

This Remote Procedure returns the user’s list of preferred titles for agiven class of documents, along with the default title, if specified.

Properties

Property Value
Label PERSLIST
MUMPS Implementation TIUSRVD
Return Type ARRAY

Input Parameters

Name Type Maximum Data Length Required Description
DUZ LITERAL   true This is the user's ID number (Pointer to file 200).
CLASS LITERAL     This is the Class of Documents (Pointer to file 8925.1) from which thetitle is to be selected.
INDEX LITERAL   true This is the array subscript from which to begin incrementing (in the eventthat the preferred list is to be appended to an existing array).

MUMPS Method Description

Property Value
Method PERSLIST^TIUSRVD
Method Comment Get personal list for a user
Input Parameters DUZ, CLASS, TIUC, TIUFLG
Code
 N TIUI,TIUDA,TIUDFLT,INLST
S TIUDA=+$O(^TIU(8925.98,"AC",DUZ,CLASS,0))
Q:+TIUDA'>0
I +$G(TIUFLG) S TIUC=1,TIUY(TIUC)="~SHORT LIST"
S TIUI=0,TIUC=+$G(TIUC)
F S TIUI=$O(^TIU(8925.98,TIUDA,10,TIUI)) Q:+TIUI'>0 D
. N TIUPL,TIUTNM,TIUDTYP,TIUSEQ
. S TIUPL=$G(^TIU(8925.98,TIUDA,10,TIUI,0))
. S TIUDTYP=$P(TIUPL,U)
. I $S(+$$CANENTR^TIULP(TIUDTYP)'>0:1,+$$CANPICK^TIULP(TIUDTYP)'>0:1,1:0) Q
. S TIUTNM=$S($P(TIUPL,U,3)]"":$P(TIUPL,U,3),1:$$PNAME^TIULC1(+TIUDTYP))
. S TIUSEQ=+$P(TIUPL,U,2),TIUC=+$G(TIUC)+1
. S TIUSEQ=$S(+TIUSEQ:$S('$D(TIUY(TIUSEQ)):TIUSEQ,1:(TIUSEQ+1)),1:TIUC)
. S TIUY(TIUSEQ)="i"_TIUDTYP_U_TIUTNM,TIUC=+TIUSEQ
I +$G(TIUFLG) Q
S TIUDFLT=$$PERSDOC^TIULE(DUZ,+CLASS)
S (TIUI,TIUC)=0
F S TIUI=$O(TIUY(TIUI)) Q:+TIUI'>0 D
. S TIUC=TIUI
. I +TIUDFLT,($P($G(TIUY(TIUI)),U)=("i"_+TIUDFLT)) S $P(TIUDFLT,U,2)=$P(TIUY(TIUI),U,2),INLST=TIUI
I +TIUDFLT D
. ;if default isn't in list, append it as an item
. I '$G(INLST) S TIUC=+$G(TIUC)+1,TIUY(TIUC)="i"_TIUDFLT
. ;otherwise, just append as default
. S TIUC=+$G(TIUC)+1,TIUY(TIUC)="d"_TIUDFLT

CPRS

File Type Description
Pascal File rDCSumm.pas
Pascal File rSurgery.pas
Pascal File rTIU.pas
Pascal File Consults/rConsults.pas


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