RAMAG EXAM CANCEL (2739)    REMOTE PROCEDURE (8994)

Name Value
NAME RAMAG EXAM CANCEL
TAG EXAMCANC
ROUTINE RAMAGRP1
RETURN VALUE TYPE ARRAY
AVAILABILITY AGREEMENT
WORD WRAP ON TRUE
DESCRIPTION
The RAMAG EXAM CANCEL remote procedure cancels the Radiology exam(s) and
sends all required notifications.
 
If all exams that reference the same order/request are canceled, this  
function can also cancel/hold the order (if the appropriate parameters are
provided).
INPUT PARAMETER
  • RAEXAM
    PARAMETER TYPE:   LITERAL
    REQUIRED:   YES
    SEQUENCE NUMBER:   1
    DESCRIPTION:   
    String of exam/case identifiers separated by '^':
      ^01: IEN of the patient in the RAD/NUC MED PATIENT file (#70)
      ^02: IEN in the REGISTERED EXAMS multiple (sub-file #70.02)
      ^03: IEN in the EXAMINATIONS multiple (sub-file #70.03)
    
  • RAREASON
    PARAMETER TYPE:   LITERAL
    REQUIRED:   YES
    SEQUENCE NUMBER:   2
    DESCRIPTION:   
    Reason for cancelation: either IEN of a record of the RAD/NUC MED REASON
    file (#75.2) or a valid synonym (see SYNONYM field (3) of the file #75.2).
    The referenced record must have the 'CANCEL REQUEST' or 'GENERAL REQUEST'
    type (see TYPE OF REASON field (2) of the file #75.2).
    
  • RAMSC
    PARAMETER TYPE:   LIST
    SEQUENCE NUMBER:   4
    DESCRIPTION:   
    Items of this list define miscellaneous/optional parameters. Each record
    The following parameters are supported by this remote procedure:
      
      HOLDESC^{Seq#}^{Line of hold description}
        Text for the HOLD DESCRIPTION field (25)
        of the file #75.1.
     
      ORDRSN^^{Cancel/hold reason for related order}
        Either IEN of a record of the RAD/NUC MED
        REASON file (#75.2) or a valid synonym 
        (see SYNONYM field (3) of that file).
    has 3 or more pieces separated by '^':
     
        If this parameter is not defined or empty,
        the value of the RAREASON parameter is
        assumed.
     
    Records can be added to the list in any order. See the comments preceding
    the $$EXAMCANC^RAMAG05 for more details.
     
    If the RAFLAGS parameter contains the 'O' flag, the 'ORDRSN' and 'HOLDESC'
    parameters determine whether the related order is canceled or put on hold.
     
    Otherwise, they are ignored.
     
     * If the reason record referenced by the 'ORDRSN'
       has the CANCEL REQUEST (1) type, then the 'HOLDESC'
       is ignored and the order is canceled.
     
     * If the record referenced by the 'ORDRSN' is of
       the HOLD REQUEST (3) type, then the order is put
       on hold. If the 'HOLDESC' is defined, the text is
       stored into the HOLD DESCRIPTION field.
      ^01: Parameter name
     
     * If the record referenced by the 'ORDRSN' is of
       the GENERAL REQUEST type (9), then the action
       performed on the order is determined by the
       'HOLDESC'. If it is defined, then the order is
       put hold; otherwise, the order is canceled.
     
    Examples:
     
      with RPCBroker.Param[2] do
      ^02: Index (for multiples and word-processing values)
        begin
          PType := list;
          Mult[1] := 'ORDRSN^^OHR';
          Mult[2] := 'HOLDESC^1^Hold description line #1';
          Mult[3] := 'HOLDESC^2^Hold description line #2';
        end;
      ^03: Value1
      ^04: Value2
      ...
     
    
  • RAFLAGS
    PARAMETER TYPE:   LITERAL
    SEQUENCE NUMBER:   3
    DESCRIPTION:   
    Flags that control execution (can be combined):
         if there are no more active cases associated
         with it.
     
         Otherwise, the error code -42 will be returned.
         Use the "A" flag to cancel all related exams
         and guarantee the order cancelation.
     
      A  Cancel all related exams/cases (those that
         reference the same order).
     
      O  Cancel/hold the related order after successful
         exam cancelation.
     
         The order will be canceled or put on hold only
    
RETURN PARAMETER DESCRIPTION
A negative value of the first '^'-piece of the Results[0] indicates that
  Results[i]            Error descriptor
                          ^01: Error code
                          ^02: Message
                          ^03: Error location
                          ^04: Error type
  
  Results[j]            Line of the additional info
                          ^01: "" (empty)
                          ^02: Text
 
an error occurred during the execution of the remote procedure. In this
Error descriptors are returned in reverse chronological order (most recent
first).
 
Otherwise, 0 is returned in the Results[0].
case, the second piece of the Results[0] will contain number of the error
descriptors returned in the subsequent nodes of the Results array.
 
  Results[0]            Result descriptor
                          ^01: The last error code
                          ^02: Number of error descriptors