VistA Analysis » VistA Reference » RPCs » ORWPCE DELETE

ORWPCE DELETE

Delete PCE information related to a note being deleted.

Properties

Property Value
Label DELETE
MUMPS Implementation ORWPCE
Return Type SINGLE VALUE

MUMPS Method Description

Property Value
Method DELETE^ORWPCE
Method Comment delete PCE info when deleting a note
Input Parameters VSTR, DFN
Code
 N VISIT,ORCOUNT,ORDTE,ORLOC
N ZTIO,ZTRTN,ZTDTH,ZTSAVE,ZTDESC,ZTSYNC,ZTSK
S ORLOC=$P(VSTR,";"),ORDTE=$P(VSTR,";",2)
I '$D(^TMP("ORWPCE",$J,VSTR))&('$$GETENC^PXAPI(DFN,ORDTE,ORLOC)) S VAL=0 Q ; no PCE data saved yet
I $P(VSTR,";",3)="H" S VAL=0 Q ; leave inpatient alone
I $L($T(DOCCNT^TIUSRVLV))=0 S VAL=0 Q ; leave if no tiu entry point
D DOCCNT^TIUSRVLV(.ORCOUNT,DFN,VSTR) ; Do not delete if another
I ORCOUNT>0 S VAL=0 Q ; title points to visit
S ZTIO="ORW/PXAPI RESOURCE",ZTRTN="DQDEL^ORWPCE1",ZTDTH=$H
S (ZTSAVE("VSTR"),ZTSAVE("DFN"))="",ZTDESC="CPRS Delete Note/PCE"
S ZTSYNC="ORW"_VSTR
D ^%ZTLOAD I '$D(ZTSK) D DQDEL^ORWPCE1

CPRS

File Type Description
Pascal File Encounter/rPCE.pas


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