RAMAG ;HCIOFO/SG - ORDERS/EXAMS API (README) ; 2/27/08 1:31pm
 ;;5.0;Radiology/Nuclear Medicine;**90**;Mar 16, 1998;Build 20
 ;
 ; RAMISC -------------- MISCELLANEOUS PARAMETERS
 ;
 ; RAMISC(
 ;   Name1)              Value(s)
 ;   Name2,Seq#)         Value(s)
 ;   Name3,Seq#,Name4)   Value(s)
 ;
 ; See the MSCPRMS^RAMAGU01 for the complete list of parameter
 ; definitions.
 ;
 ; If a parameter is required and there is no default value, a non-
 ; empty value must be assigned to the corresponding array node
 ; before the call.
 ;
 ; If a parameter is required but there is a default value, then the
 ; latter will be assigned internally to the corresponding array node 
 ; if it is not defined or empty. If the default value is empty, then 
 ; an error will be returned.
 ;
 ; If a parameter is not required, then its default value (if
 ; indicated), will be internally assigned to the corresponding array 
 ; node only if it has no value ($DATA(...)#10=0). If an empty string 
 ; is assigned to such node, the corresponding field will not have the
 ; default value; it will be empty!
 ;
 ; If you want to clear a multiple that already has a value, assign
 ; "@" or empty string to the parameter itself and do not set any
 ; subscripts. For example, the following construction will clear
 ; the CONTRAST MEDIA multiple: S RAMISC("CONTMEDIA")="@".
 ;
 ; NOTE: The RAMISC parameter can be modified by the functions:
 ;       default values are assigned to some parameters.
 ;
 ; Control Flags - RAMISC("FLAGS")
 ; -------------------------------
 ;
 ; A  If this flag is provided, then the registration entry point
 ;    adds the new case to the existing ones with the same date/time
 ;    instead of returning the error code -28.
 ;
 ;    If the existing date/time record stores an exam set and the
 ;    "D" flag is not provided, then the error code -54 is returned.
 ;
 ; D  If there is an existing case with the same date/time, then the
 ;    time of the new case is incremented by 1 minute until an unused 
 ;    date/time is found.
 ;
 ;    If the "A" flag is also provided, then time increments also
 ;    stop when a non-examset date/time record is found.
 ;
 ;    If the date is also changed during the time modification, then
 ;    the case is not registered and the error code -29 is returned.
 ;
 ; F  Try to enforce the new status even if some required fields are
 ;    not populated.
 ;
 ;    NOTE: If such case is later edited by a regular Radiology
 ;          option, the status may be reverted.
 ;
 ; S  Do not send HL7 message to speech recognition (dictation)
 ;    systems.
 ;
 ; RAMSPSDEFS ---------- DATA FOR MISCELLANEOUS PARAMETERS VALIDATION
 ;
 ; RAMSPSDEFS(
 ;
 ;   "F",
 ;     File#,Name)       ""
 ;
 ;   "N",
 ;     Name)             Parameter descriptor
 ;                         ^01: (Sub)file number
 ;                         ^02: Field number
 ;                         ^03: Field type that requires special
 ;                              processing:
 ;                                D - Date/time, M - Multiple,
 ;                                P - Pointer,   W - Word processing,
 ;                                * - Add this parameter to the "F"
 ;                                    index (see the VEXAMND^RAMAGU14 
 ;                                    for details).
 ;                         ^04: Number of the "^"-piece of the value
 ;                              returned by the $$EXMSTREQ^RAMAGU06.
 ;                              It determines if a non-empty field
 ;                              value is required.
 ;
 ;   "R")                Exam status requirements (value returned by
 ;                       the $$EXMSTREQ^RAMAGU06 function).
 ;
 ; NAMESPACE ----------- DESCRIPTION
 ;
 ; RAMAGHL*              HL7 utilities
 ; RAMAGRP*              Remote procedures
 ; RAMAGU*               Utilities
 ;
 ; API ENTRY POINT ----- DESCRIPTION
 ;
 ;    $$ORDER^RAMAG02    Orders/requests an exam
 ; $$REGISTER^RAMAG03    Registers the exam
 ;  $$ORDCANC^RAMAG04    Cancels the order
 ; $$EXAMCANC^RAMAG05    Cancels the exam
 ; $$COMPLETE^RAMAG06    Completes the exam
 ; $$EXAMINED^RAMAG07    Indicates that procedure has been performed
 ;
 ; UTILITY ------------- DESCRIPTION
 ;
 ; $$LDMSPRMS^RAMAGU01   Loads definitions of miscellaneous parameters
 ;  $$RPCMISC^RAMAGU01   Parses miscellaneous RPC parameters
 ;
 ;  $$ORDSTAT^RAMAGU02   Returns current order status
 ; $$UPDORDST^RAMAGU02   Updates order status
 ;
 ;  $$CHKPROC^RAMAGU03   Checks Radiology procedure and modifiers
 ; $$DESCPLST^RAMAGU03   Translates parent procedure into descendents
 ;
 ;   $$ACCNUM^RAMAGU04   Constructs the site accession number
 ; $$CHKEXMID^RAMAGU04   Checks examination identifiers
 ;  $$DAYCASE^RAMAGU04   Constructs the day-case exam identifier
 ; $$EXAMIENS^RAMAGU04   Converts exam identifiers into the exam IENS
 ; $$EXAMNODE^RAMAGU04   Returns the exam global node
 ;   $$INVDTE^RAMAGU04   Calculates 'inverted' date/time
 ;  $$RAPTREG^RAMAGU04   Registers the patient in the file #70
 ; $$UPDEXMPR^RAMAGU04   Updates exam procedure and modifiers
 ;
 ;  $$EXMSTAT^RAMAGU05   Returns current exam status
 ; $$UPDEXMAL^RAMAGU05   Updates exam activity log
 ; $$UPDEXMST^RAMAGU05   Updates exam status
 ;
 ; $$EXMSTINF^RAMAGU06   Returns descriptor of the exam status
 ; $$EXMSTREQ^RAMAGU06   Returns exam status requirements
 ; $$GETEXMND^RAMAGU06   Searches for "EXAMINED" status
 ; $$NXTEXMST^RAMAGU06   Returns the following exam status
 ;
 ;    $$RAINP^RAMAGU07   Returns service, ward, and bedsection
 ;    $$VADEM^RAMAGU07   Wrapper for the DEM^VADPT
 ;    $$VAIN5^RAMAGU07   Wrapper for the IN5^VADPT
 ;
 ;    $$VAL70^RAMAGU08   Validates RAMISC params related to file #70
 ;    $$VAL74^RAMAGU10   Validates RAMISC params related to file #74
 ;
 ;       VARS^RAMAGU11   Writes variables and their values
 ;          W^RAMAGU11   Writes a long string
 ;
 ;  $$RPTSTUB^RAMAGU12   Creates a report stub record
 ;  $$RPTSTAT^RAMAGU12   Returns report status
 ; $$UPDRPTAL^RAMAGU12   Updates report activity log
 ; $$UPDRPTST^RAMAGU12   Updates report status
 ;
 ; $$NMEDSTUB^RAMAGU13   Creates a nuclear medicine stub record
 ; $$RARSNIEN^RAMAGU13   Searches for reason synonym
 ;  $$UPDMULT^RAMAGU13   Updates values of the multiple(s)
 ;
 ; REMOTE PROCEDURE ---- DESCRIPTION
 ;
 ; RAMAG EXAM CANCEL     Cancels the exam
 ; RAMAG EXAM COMPLETE   Completes the exam
 ; RAMAG EXAM ORDER      Orders/requests an exam
 ; RAMAG EXAM REGISTER   Registers the exam
 ; RAMAG EXAMINED        Procedure has been performed
 ; RAMAG ORDER CANCEL    Cancels the order
 ;
 Q
 
--- Routine Detail   --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HRAMAG   6786     printed  Sep 23, 2025@20:12:50                                                                                                                                                                                                       Page 2
RAMAG     ;HCIOFO/SG - ORDERS/EXAMS API (README) ; 2/27/08 1:31pm
 +1       ;;5.0;Radiology/Nuclear Medicine;**90**;Mar 16, 1998;Build 20
 +2       ;
 +3       ; RAMISC -------------- MISCELLANEOUS PARAMETERS
 +4       ;
 +5       ; RAMISC(
 +6       ;   Name1)              Value(s)
 +7       ;   Name2,Seq#)         Value(s)
 +8       ;   Name3,Seq#,Name4)   Value(s)
 +9       ;
 +10      ; See the MSCPRMS^RAMAGU01 for the complete list of parameter
 +11      ; definitions.
 +12      ;
 +13      ; If a parameter is required and there is no default value, a non-
 +14      ; empty value must be assigned to the corresponding array node
 +15      ; before the call.
 +16      ;
 +17      ; If a parameter is required but there is a default value, then the
 +18      ; latter will be assigned internally to the corresponding array node 
 +19      ; if it is not defined or empty. If the default value is empty, then 
 +20      ; an error will be returned.
 +21      ;
 +22      ; If a parameter is not required, then its default value (if
 +23      ; indicated), will be internally assigned to the corresponding array 
 +24      ; node only if it has no value ($DATA(...)#10=0). If an empty string 
 +25      ; is assigned to such node, the corresponding field will not have the
 +26      ; default value; it will be empty!
 +27      ;
 +28      ; If you want to clear a multiple that already has a value, assign
 +29      ; "@" or empty string to the parameter itself and do not set any
 +30      ; subscripts. For example, the following construction will clear
 +31      ; the CONTRAST MEDIA multiple: S RAMISC("CONTMEDIA")="@".
 +32      ;
 +33      ; NOTE: The RAMISC parameter can be modified by the functions:
 +34      ;       default values are assigned to some parameters.
 +35      ;
 +36      ; Control Flags - RAMISC("FLAGS")
 +37      ; -------------------------------
 +38      ;
 +39      ; A  If this flag is provided, then the registration entry point
 +40      ;    adds the new case to the existing ones with the same date/time
 +41      ;    instead of returning the error code -28.
 +42      ;
 +43      ;    If the existing date/time record stores an exam set and the
 +44      ;    "D" flag is not provided, then the error code -54 is returned.
 +45      ;
 +46      ; D  If there is an existing case with the same date/time, then the
 +47      ;    time of the new case is incremented by 1 minute until an unused 
 +48      ;    date/time is found.
 +49      ;
 +50      ;    If the "A" flag is also provided, then time increments also
 +51      ;    stop when a non-examset date/time record is found.
 +52      ;
 +53      ;    If the date is also changed during the time modification, then
 +54      ;    the case is not registered and the error code -29 is returned.
 +55      ;
 +56      ; F  Try to enforce the new status even if some required fields are
 +57      ;    not populated.
 +58      ;
 +59      ;    NOTE: If such case is later edited by a regular Radiology
 +60      ;          option, the status may be reverted.
 +61      ;
 +62      ; S  Do not send HL7 message to speech recognition (dictation)
 +63      ;    systems.
 +64      ;
 +65      ; RAMSPSDEFS ---------- DATA FOR MISCELLANEOUS PARAMETERS VALIDATION
 +66      ;
 +67      ; RAMSPSDEFS(
 +68      ;
 +69      ;   "F",
 +70      ;     File#,Name)       ""
 +71      ;
 +72      ;   "N",
 +73      ;     Name)             Parameter descriptor
 +74      ;                         ^01: (Sub)file number
 +75      ;                         ^02: Field number
 +76      ;                         ^03: Field type that requires special
 +77      ;                              processing:
 +78      ;                                D - Date/time, M - Multiple,
 +79      ;                                P - Pointer,   W - Word processing,
 +80      ;                                * - Add this parameter to the "F"
 +81      ;                                    index (see the VEXAMND^RAMAGU14 
 +82      ;                                    for details).
 +83      ;                         ^04: Number of the "^"-piece of the value
 +84      ;                              returned by the $$EXMSTREQ^RAMAGU06.
 +85      ;                              It determines if a non-empty field
 +86      ;                              value is required.
 +87      ;
 +88      ;   "R")                Exam status requirements (value returned by
 +89      ;                       the $$EXMSTREQ^RAMAGU06 function).
 +90      ;
 +91      ; NAMESPACE ----------- DESCRIPTION
 +92      ;
 +93      ; RAMAGHL*              HL7 utilities
 +94      ; RAMAGRP*              Remote procedures
 +95      ; RAMAGU*               Utilities
 +96      ;
 +97      ; API ENTRY POINT ----- DESCRIPTION
 +98      ;
 +99      ;    $$ORDER^RAMAG02    Orders/requests an exam
 +100     ; $$REGISTER^RAMAG03    Registers the exam
 +101     ;  $$ORDCANC^RAMAG04    Cancels the order
 +102     ; $$EXAMCANC^RAMAG05    Cancels the exam
 +103     ; $$COMPLETE^RAMAG06    Completes the exam
 +104     ; $$EXAMINED^RAMAG07    Indicates that procedure has been performed
 +105     ;
 +106     ; UTILITY ------------- DESCRIPTION
 +107     ;
 +108     ; $$LDMSPRMS^RAMAGU01   Loads definitions of miscellaneous parameters
 +109     ;  $$RPCMISC^RAMAGU01   Parses miscellaneous RPC parameters
 +110     ;
 +111     ;  $$ORDSTAT^RAMAGU02   Returns current order status
 +112     ; $$UPDORDST^RAMAGU02   Updates order status
 +113     ;
 +114     ;  $$CHKPROC^RAMAGU03   Checks Radiology procedure and modifiers
 +115     ; $$DESCPLST^RAMAGU03   Translates parent procedure into descendents
 +116     ;
 +117     ;   $$ACCNUM^RAMAGU04   Constructs the site accession number
 +118     ; $$CHKEXMID^RAMAGU04   Checks examination identifiers
 +119     ;  $$DAYCASE^RAMAGU04   Constructs the day-case exam identifier
 +120     ; $$EXAMIENS^RAMAGU04   Converts exam identifiers into the exam IENS
 +121     ; $$EXAMNODE^RAMAGU04   Returns the exam global node
 +122     ;   $$INVDTE^RAMAGU04   Calculates 'inverted' date/time
 +123     ;  $$RAPTREG^RAMAGU04   Registers the patient in the file #70
 +124     ; $$UPDEXMPR^RAMAGU04   Updates exam procedure and modifiers
 +125     ;
 +126     ;  $$EXMSTAT^RAMAGU05   Returns current exam status
 +127     ; $$UPDEXMAL^RAMAGU05   Updates exam activity log
 +128     ; $$UPDEXMST^RAMAGU05   Updates exam status
 +129     ;
 +130     ; $$EXMSTINF^RAMAGU06   Returns descriptor of the exam status
 +131     ; $$EXMSTREQ^RAMAGU06   Returns exam status requirements
 +132     ; $$GETEXMND^RAMAGU06   Searches for "EXAMINED" status
 +133     ; $$NXTEXMST^RAMAGU06   Returns the following exam status
 +134     ;
 +135     ;    $$RAINP^RAMAGU07   Returns service, ward, and bedsection
 +136     ;    $$VADEM^RAMAGU07   Wrapper for the DEM^VADPT
 +137     ;    $$VAIN5^RAMAGU07   Wrapper for the IN5^VADPT
 +138     ;
 +139     ;    $$VAL70^RAMAGU08   Validates RAMISC params related to file #70
 +140     ;    $$VAL74^RAMAGU10   Validates RAMISC params related to file #74
 +141     ;
 +142     ;       VARS^RAMAGU11   Writes variables and their values
 +143     ;          W^RAMAGU11   Writes a long string
 +144     ;
 +145     ;  $$RPTSTUB^RAMAGU12   Creates a report stub record
 +146     ;  $$RPTSTAT^RAMAGU12   Returns report status
 +147     ; $$UPDRPTAL^RAMAGU12   Updates report activity log
 +148     ; $$UPDRPTST^RAMAGU12   Updates report status
 +149     ;
 +150     ; $$NMEDSTUB^RAMAGU13   Creates a nuclear medicine stub record
 +151     ; $$RARSNIEN^RAMAGU13   Searches for reason synonym
 +152     ;  $$UPDMULT^RAMAGU13   Updates values of the multiple(s)
 +153     ;
 +154     ; REMOTE PROCEDURE ---- DESCRIPTION
 +155     ;
 +156     ; RAMAG EXAM CANCEL     Cancels the exam
 +157     ; RAMAG EXAM COMPLETE   Completes the exam
 +158     ; RAMAG EXAM ORDER      Orders/requests an exam
 +159     ; RAMAG EXAM REGISTER   Registers the exam
 +160     ; RAMAG EXAMINED        Procedure has been performed
 +161     ; RAMAG ORDER CANCEL    Cancels the order
 +162     ;
 +163      QUIT