Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: RMPRPCEP

RMPRPCEP.m

Go to the documentation of this file.
  1. RMPRPCEP ;HCIOFO/RVD - Prosthetics/PCE DELETE 06/6/01
  1. ;;3.0;PROSTHETICS;**62**;Feb 09, 1996
  1. ;
  1. ; This routine contains the code for deleting a Prosthetic visit in PCE.
  1. ;
  1. ;DBIA #1889-B - this API is used to delete data from the VISIT file
  1. ; (9000010) and V files from PCE module
  1. ;
  1. PCED(RMIE60) ;delete PCE visit.
  1. D NEWVAR
  1. S (RMLOCK,RMERR)=0
  1. S RMSRC="PROSTHETICS DATA"
  1. S RMPKG=$O(^DIC(9.4,"B","PROSTHETICS",0))
  1. I 'RMPKG S RMERR=-1 G DELX
  1. ;
  1. ; get PCE IEn from file #660.
  1. S RMPCE=$P($G(^RMPR(660,RMIE60,10)),U,12)
  1. I 'RMPCE S RMERR=-1 G DELX
  1. ;
  1. ; Remove all workload data from the PCE visit file & related V files.
  1. ; check if the visit is already in PCE and remove workload,
  1. ; (sending RMPKG and RMSRC to ensure that only data that originally
  1. ; came from PROSTHETICS will be removed).
  1. ;
  1. S RMCHK=$$DELVFILE^PXAPI("ALL",.RMPCE,RMPKG,RMSRC,0,0,"")
  1. I RMCHK'=1 W !!,"*** Error in deleting PCE visit !!",! S RMERR=-1
  1. ;
  1. DELX ;exit
  1. Q RMERR
  1. ;
  1. NEWVAR ; new variables
  1. N RMCHK,RMPKG,RMSRC,RMPCE
  1. Q