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

RAMAGRP2.m

Go to the documentation of this file.
  1. RAMAGRP2 ;HCIOFO/SG - ORDERS/EXAMS API (REMOTE PROCEDURES) ; 2/19/08 3:46pm
  1. ;;5.0;Radiology/Nuclear Medicine;**90**;Mar 16, 1998;Build 20
  1. ;
  1. Q
  1. ;
  1. ;+++++ INDICATES THAT THE PROCEDURE HAS BEEN PERFORMED
  1. ; RPC: [RAMAG EXAMINED]
  1. ;
  1. ; .RARESULT Reference to a local variable where the results
  1. ; are returned to.
  1. ;
  1. ; See the comments preceding the $$EXAMINED^RAMAG07 function for
  1. ; description of other parameters.
  1. ;
  1. ; Return Values:
  1. ;
  1. ; A negative value of the first "^"-piece of the RARESULT(0)
  1. ; indicates an error (see the RPCSTK^RAERR01 procedure for more
  1. ; details).
  1. ;
  1. ; Otherwise, 0 is returned in the RARESULT(0).
  1. ;
  1. EXAMINED(RARESULT,RACASE,RAMSC) ;
  1. N RAERROR,RAMISC,RC
  1. N:'$G(RAPARAMS("DEBUG")) RAPARAMS
  1. K RARESULT S (RARESULT(0),RC)=0
  1. D CLEAR^RAERR(1)
  1. ;--- Debug code
  1. D:$G(RAPARAMS("DEBUG"))>1
  1. . D W^RAMAGU11("RAMAG EXAMINED","!!")
  1. . D VARS^RAMAGU11("RACASE")
  1. . D ZW^RAUTL22("RAMSC")
  1. D
  1. . ;--- Parse miscellaneous parameters
  1. . S RC=$$RPCMISC^RAMAGU01(.RAMSC,.RAMISC) Q:RC<0
  1. . K RAMSC
  1. . ;--- Indicate that the procedure has been performed
  1. . S RC=$$EXAMINED^RAMAG07(.RAPARAMS,.RACASE,.RAMISC)
  1. ;---
  1. D:RC<0 RPCSTK^RAERR01(.RARESULT,RC)
  1. Q
  1. ;
  1. ;+++++ RETURNS EXAM STATUS REQUIREMENTS
  1. ; RPC: [RAMAG EXAM STATUS REQUIREMENTS]
  1. ;
  1. ; .RARESULT Reference to a local variable where the results
  1. ; are returned to.
  1. ;
  1. ; RACTION Action that is going to be performed on an
  1. ; exam/case record (single character):
  1. ;
  1. ; E Examined (procedure has been performed,
  1. ; images have been acquired)
  1. ;
  1. ; C Complete
  1. ;
  1. ; RAIMGTYI Imaging type IEN (file #79.2).
  1. ;
  1. ; [RAPROC] Radiology procedure IEN (file #71). This parameter
  1. ; is required to determine exact nuclear medicine
  1. ; requirements. See the $$EXMSTREQ^RAMAGU06 for more
  1. ; details.
  1. ;
  1. ; Return Values:
  1. ;
  1. ; A negative value of the first "^"-piece of the RARESULT(0)
  1. ; indicates an error (see the RPCSTK^RAERR01 procedure for more
  1. ; details).
  1. ;
  1. ; Otherwise, exam status requirements are returned in the
  1. ; RARESULT(0). See the $$EXMSTREQ^RAMAGU06 for details.
  1. ; Descriptor of the exam status is returned in the RARESULT(1).
  1. ; See the ^RAMAGU06 for details.
  1. ;
  1. EXMSTREQ(RARESULT,RACTION,RAIMGTYI,RAPROC) ;
  1. N EXMST,RAERROR,RC
  1. N:'$G(RAPARAMS("DEBUG")) RAPARAMS
  1. K RARESULT S (EXMST,RARESULT(0),RC)=0
  1. D CLEAR^RAERR(1)
  1. ;=== Debug code
  1. D:$G(RAPARAMS("DEBUG"))>1
  1. . D W^RAMAGU11("RAMAG EXAM STATUS REQUIREMENTS","!!")
  1. . D VARS^RAMAGU11("RACTION,RAIMGTYI")
  1. ;
  1. ;=== Find the exam status record
  1. D
  1. . I RACTION="C" D Q
  1. . . S EXMST=$$EXMSTINF^RAMAGU06("^^9",.RAIMGTYI)
  1. . ;---
  1. . I RACTION="E" D Q
  1. . . S EXMST=$$EXMSTINF^RAMAGU06("^^1",.RAIMGTYI) Q:EXMST<0
  1. . . S EXMST=$$GETEXMND^RAMAGU06(+EXMST)
  1. . ;---
  1. . S EXMST=$$IPVE^RAERR("RACTION")
  1. S:EXMST<0 RC=EXMST
  1. ;
  1. ;=== Get the status requirements
  1. I RC'<0 D
  1. . S (RARESULT(0),RC)=$$EXMSTREQ^RAMAGU06(+EXMST,.RAPROC) Q:RC<0
  1. . S RARESULT(1)=EXMST
  1. D:RC<0 RPCSTK^RAERR01(.RARESULT,RC)
  1. Q