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

RAORDC1.m

Go to the documentation of this file.
  1. RAORDC1 ;HISC/GJC-Continuation of the RAORDC routine. ; Jul 05, 2022@11:08:24
  1. ;;5.0;Radiology/Nuclear Medicine;**192**;Mar 16, 1998;Build 1
  1. ;
  1. EXMCOM ; Called from EXMCOM^RAORDC, for updating request statuses for
  1. ; complete exams.
  1. K RAPRC,RACAT,RAPIFN,RARSH,RASHA,RAMIFN,RAMOD,RAMODA,RAMODD
  1. N RAPRGST S RAPRGST=$P(RAORD0,"^",13)
  1. I $P($G(RAEXM0),"^",25) D D SETU Q
  1. . N %,D,D0,DI,DIC,DIE,DQ,DR,X,Y
  1. . S DIE="^RAO(75.1,",DR="11///Y",DA=RAOIFN D ^DIE
  1. . Q
  1. S:$P(RAEXM0,"^",2)'=$P(RAORD0,"^",2) RAPRC=$P(RAEXM0,"^",2)
  1. S:$P(RAEXM0,"^",4)'=$P(RAORD0,"^",4) RACAT=""""_$P(RAEXM0,"^",4)_""""
  1. S RARSH=$S($P(RAORD0,"^",4)="R"&($P(RAEXM0,"^",4)'="R"):"@",$P(RAEXM0,"^",4)="R"&($D(^RADPT(RADFN,"DT",RADTI,"P",RACNI,"R"))):"^S X="_""""_^("R")_"""",1:"") K:RARSH="" RARSH
  1. S RASHA=$S("CS"[$P(RAORD0,"^",4)&("CS"'[$P(RAEXM0,"^",4)):"@","CS"[$P(RAEXM0,"^",4)&($P(RAEXM0,"^",9)'=""):"^S X="_$P(RAEXM0,"^",9),1:"") K:RASHA="" RASHA
  1. S:$P(RAEXM0,"^",14)'=$P(RAORD0,"^",14)&($P(RAEXM0,"^",14)) RAPIFN=$P(RAEXM0,"^",14)
  1. ; don't del/add modifiers to order file
  1. ; remove most fields from DR string to prevent chang'g them in the order
  1. S DA=RAOIFN,DIE="^RAO(75.1,",DR="11////^S X=""n"""
  1. D ^DIE K DE,DQ,DIE,DR
  1. K RAMOD F I=0:0 S I=$O(^RAO(75.1,RAOIFN,"M","B",I)) Q:'I I $D(^RAMIS(71.2,+I,0)) S RAMOD=$S('$D(RAMOD):$P(^(0),"^"),1:RAMOD_", "_$P(^(0),"^"))
  1. SETU ; above code is skipped if procedure is parent
  1. S $P(RABLNK," ",40)=""
  1. I $$ORVR^RAORDU()=2.5,$D(^RAO(75.1,+RAOIFN,0)),$D(^RAMIS(71,+$P(^(0),"^",2),0)) S (RAPRC,ORETURN("ORTX",1))=$E($P(^(0),"^"),1,40)_"," D
  1. .I $D(RAMOD) S ORETURN("ORTX",2)="Modifiers: "_$E(RAMOD,1,80)_","
  1. .S ORETURN("ORTX",3)="Urgency: "_$S($P(RAORD0,"^",6)=1:"STAT",$P(RAORD0,"^",6)=2:"URGENT",1:"ROUTINE")_","
  1. .I $P(RAORD0,"^",19)]"" S X=$P(RAORD0,"^",19),ORETURN("ORTX",3)=ORETURN("ORTX",3)_" Transport: "_$S(X="a":"AMBULATORY",X="p":"PORTABLE",X="s":"STRETCHER",1:"WHEELCHAIR")_","
  1. .I $P($G(^DPT(+RADFN,0)),"^",2)'="M" S ORETURN("ORTX",3)=ORETURN("ORTX",3)_" Pregnant: "_$S(RAPRGST="n":"NO",RAPRGST="y":"YES",RAPRGST="u":"UNKNOWN",1:"")
  1. .S ORETURN("ORIT")=$P(^RAO(75.1,+RAOIFN,0),"^",2)_";RAMIS(71,"
  1. I '$D(RAF1),('$P(RAEXM0,"^",25)),($$CICHO()=1) D ; if orphan, display text now (p192)
  1. . W !?3,"...will now designate request status as 'COMPLETE'..."
  1. . Q
  1. D ^RAORDU ; Update the request status
  1. I '$D(RAF1),('$P(RAEXM0,"^",25)),($$CICHO()=1) D ; if orphan, display text now (p192)
  1. . W !?10,"...request status successfully updated."
  1. . Q
  1. Q
  1. CICHO() ;quiet - suppress output to screen? p192
  1. ; return: 0 if $D(ZTQUEUED)#2
  1. ; 0 if $G(RAQUIET,0)=1
  1. ; 1 if '$D(ZTQUEUED)#2 & $G(RAQUIET)'=1
  1. ; Note: check if RAQUIET set in EN1^RAHLO
  1. Q:$D(ZTQUEUED)#2 0
  1. Q:$G(RAQUIET,0)=1 0
  1. Q 1 ;don't suppress
  1. ;