VistA Analysis » VistA Reference » RPCs » TIU GET PRF ACTIONS

TIU GET PRF ACTIONS

This RPC gets the Patient Record Flag History Assignments/Actions for a Patient/Title Combination.

Properties

Property Value
Label GETACTS
MUMPS Implementation TIUPRF2
Return Type ARRAY

Input Parameters

Name Type Maximum Data Length Required Description
TIUTTL LITERAL   true TIU DOCUMENT DEFINITION (TITLE) IEN
DFN LITERAL   true Patient Pointer (file 2 IEN)

MUMPS Method Description

Property Value
Method GETACTS^TIUPRF2
Method Comment RPC Gets PRF Action info
Input Parameters TIUTTL, DFN
First Comment
"Action" is shorthand for Assignment History entry
Returns data in the following format for each Action:
TIUY(ACTID) =
FLAGNAME^ASSGNIEN^ACTIONNAME^ACTIONIEN^ACTIONDATEI^ACTIONDATEE^TIUIEN
where Integer ACTID = subscript after "HISTORY" in array returned
by GETHTIU^DGPFAPI1
Returns linkable actions (whether linked or not) for Patient DFN
and flag assoc w/ TIUTTL.
Excludes UNLINKABLE actions = Entered in Error actions (EIE) or
actions taken prior to an EIE action.
Erroneous and EIE actions may be for the wrong patient, etc.
Code
 N TIUDG,ACTID,TIUFLAG,UNLINKBL,ARRAYNM
S TIUY=1,ARRAYNM="^TMP(""TIUPRFH"",$J)"
S TIUDG=$$GETHTIU^DGPFAPI1(DFN,TIUTTL,ARRAYNM)
I 'TIUDG S TIUY="0^"_$P(TIUDG,U,2) G GETACTX
I '$$AVAILACT^TIUPRFL("^TMP(""TIUPRFH"",$J)",,.UNLINKBL) S TIUY="0^All linkable Flag actions are already linked"
S TIUFLAG=$P(^TMP("TIUPRFH",$J,"FLAG"),U,2)_U_$P(^TMP("TIUPRFH",$J,"ASSIGNIEN"),U)
S ACTID=0
F S ACTID=$O(^TMP("TIUPRFH",$J,"HISTORY",ACTID)) Q:'+ACTID D
. Q:$G(UNLINKBL(ACTID))
. S TIUY(ACTID)=TIUFLAG
. S TIUY(ACTID)=TIUY(ACTID)_U_$P(^TMP("TIUPRFH",$J,"HISTORY",ACTID,"ACTION"),U,2)
. S TIUY(ACTID)=TIUY(ACTID)_U_$P(^TMP("TIUPRFH",$J,"HISTORY",ACTID,"HISTIEN"),U,1)
. S TIUY(ACTID)=TIUY(ACTID)_U_$P(^TMP("TIUPRFH",$J,"HISTORY",ACTID,"DATETIME"),U,1)
. S TIUY(ACTID)=TIUY(ACTID)_U_$P(^TMP("TIUPRFH",$J,"HISTORY",ACTID,"DATETIME"),U,2)
. S TIUY(ACTID)=TIUY(ACTID)_U_$P(^TMP("TIUPRFH",$J,"HISTORY",ACTID,"TIUIEN"),U,1)

CPRS

File Type Description
Pascal File fNoteProps.pas


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