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

ACKQPCE3.m

Go to the documentation of this file.
  1. ACKQPCE3 ;HCIOFO/AG - Quasar/PCE Interface; August 1999.
  1. ;;3.0;QUASAR;;Feb 11, 2000
  1. ;;
  1. ;
  1. KILLPCE(ACKVIEN) ; kill a visit from PCE
  1. ; see KILLPCE^ACKQPCE for comments. this routine should not be
  1. ; called directly, only from ^ACKQPCE (this routine assumes that
  1. ; ACKVIEN exists).
  1. N ACKDEAD,ACKLOCK,ACKPCE,ACKE,ACKARR,ACKMSG,ACKRSN
  1. S ACKDEAD=1,ACKLOCK=0
  1. ;
  1. ; get the PCE VISIT IEN from the visit file
  1. S ACKPCE=$$GET1^DIQ(509850.6,ACKVIEN_",",125,"I")
  1. ;
  1. ; if no PCE Visit Ien then nothing to do.
  1. I 'ACKPCE G KILLPCEX
  1. ;
  1. ; lock the visit
  1. L +^ACK(509850.6,ACKVIEN):0 I $T S ACKLOCK=1
  1. ;
  1. ; clear any existing PCE Errors for this visit
  1. D CLEAR^ACKQPCE(ACKVIEN)
  1. ;
  1. ; call PCE to delete the visit
  1. S ACKE=$$DELVFILE^PXAPI("ALL",ACKPCE,"","",0,0,"")
  1. ;
  1. ; if deletion not completed then record error and set flag
  1. I ACKE'=1 D
  1. . K ACKRSN S ACKRSN=0
  1. . S ACKMSG="Unable to Delete PCE Visit (error code="_ACKE_")"
  1. . D ADDRSN^ACKQPCE2("PCE VISIT",ACKPCE,"",ACKMSG,.ACKRSN)
  1. . D FILERSN^ACKQPCE(ACKVIEN,.ACKRSN)
  1. . ; file last edited in Quasar date to create exception entry
  1. . K ACKARR D NOW^%DTC
  1. . S ACKARR(509850.6,ACKVIEN_",",140)=%
  1. . D FILE^DIE("","ACKARR","")
  1. . S ACKDEAD=0
  1. ;
  1. ; if deleted ok then update fields and set flag
  1. I ACKE=1 D
  1. . K ACKARR D NOW^%DTC
  1. . S ACKARR(509850.6,ACKVIEN_",",125)="@" ; remove PCE Visit ien
  1. . S ACKARR(509850.6,ACKVIEN_",",135)=% ; last sent to pce
  1. . D FILE^DIE("","ACKARR","")
  1. . S ACKDEAD=1
  1. ;
  1. KILLPCEX ; exit point from KILLPCE
  1. ;
  1. ; if visit was locked then unlock it
  1. I ACKLOCK L -^ACK(509850.6,ACKVIEN)
  1. ;
  1. ; return whether the PCe visit was killed
  1. Q ACKDEAD
  1. ;