VistA Analysis » VistA Reference » RPCs » ORWD SIGN

ORWD SIGN

Changes signature status on a list of orders and optionally releases theorders to their respective services.

Properties

Property Value
Label SIGN
MUMPS Implementation ORWD
Return Type ARRAY

MUMPS Method Description

Property Value
Method SIGN^ORWD
Method Comment procedure
Input Parameters DFN, ORNP, LOC, ORWSIGN
First Comment
 Sign orders (ORIFN;ACT^RELSTS^SIGSTS^NATR)
Code
 N ORVP,ORL,IDX,ANERROR,ERRCNT
S ORVP=DFN_";DPT(",ORL(2)=LOC_";SC(",ORL=ORL(2),ERRCNT=0
I '$D(^XUSEC("ORES",DUZ)) S ERRLST(1)=0_U_"Must have ORES key." Q
S IDX=0 F S IDX=$O(ORWSIGN(IDX)) Q:'IDX S X=ORWSIGN(IDX) D
. ; ** change NATR when GUI changed to pass Nature in 4th piece
. S ORIFN=$P(X,U),RELSTS=$P(X,U,2),SIGSTS=$P(X,U,3),NATR="E" ;$P(X,U,4)
. I SIGSTS=2 D NOTIF^ORCSIGN S ANERROR=""
. I SIGSTS'=2 D EN^ORCSEND(ORIFN,"",SIGSTS,RELSTS,NATR,"",.ANERROR)
. I $L(ANERROR) D Q ; don't print if an error occurred
. . S ERRCNT=ERRCNT+1,ERRLST(ERRCNT)=$P(ORWSIGN(IDX),U)_U_ANERROR
. . K ORWSIGN(IDX)
. I RELSTS=0 K ORWSIGN(IDX) Q ; don't print if unreleased
. S ORWSIGN(IDX)=$P(ORWSIGN(IDX),U)
D PRINTS^ORWD1(.ORWSIGN,LOC)

CPRS

File Type Description
NOT OSEHRA CPRS  


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