VistA Analysis » VistA Reference » RPCs » ORQQPL AUDIT HIST

ORQQPL AUDIT HIST

RETURN PROBLEM AUDIT HISTORY

Properties

Property Value
Label HIST
MUMPS Implementation ORQQPL2
Return Type ARRAY

Input Parameters

Name Type Maximum Data Length Required Description
GMPIFN LITERAL     INTERNAL FILE NUMBER FOR PROBLEM

MUMPS Method Description

Property Value
Method HIST^ORQQPL2
Method Comment GET AUDIT HISTORY
Input Parameters GMPIFN
First Comment
 taken from EN^GMPLDISP
Code
 N IDT,AIFN,S,ORDT,TXT,I,L,GMPDT,LCNT
S LCNT=0
I +$O(^GMPL(125.8,"AD",GMPIFN,0))'>0 D Q ;BAIL OUT - NO CHANGES
. S RETURN(0)="NONE"
S IDT=""
F S IDT=$O(^GMPL(125.8,"AD",GMPIFN,IDT)) Q:IDT'>0 D
. S AIFN=""
. F S AIFN=$O(^GMPL(125.8,"AD",GMPIFN,IDT,AIFN)) Q:AIFN'>0 D
.. N FLD,GMPL0 S GMPL0=^GMPL(125.8,AIFN,0),FLD=$P(GMPL0,U,2)
.. Q:(FLD=80201)!(FLD=80202)!(FLD=80002)
.. D DT^GMPLHIST
S S="",I=0,TXT=""
F S S=$O(GMPDT(S)) Q:S="" D
. S L=GMPDT(S,0)
. I $L(L,": ")>1 D Q ; does line begin with date? (hope ": " can't be part of text)
.. D FLUSH(.RETURN,.I,$G(ORDT),$G(TXT))
.. S ORDT=$P(L,": ") ; get new date
.. S TXT=$$STRIP($P(L,": ",2,999)) ; start new text string
. S TXT=TXT_" "_$$STRIP(L) ; line does not begin with date, so add to existing text line
I '$D(RETURN(0)) S RETURN(0)=I
D FLUSH(.RETURN,.I,$G(ORDT),$G(TXT))

CPRS

File Type Description
Pascal File rProbs.pas


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