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

RANPROU.m

Go to the documentation of this file.
  1. RANPROU ;BPFO/CLT - NEW RADIOLOGY PROCEDURES UTILITIES ;22 Mar 2018 10:24 AM
  1. ;;5.0;Radiology/Nuclear Medicine;**127,124**;Mar 16, 1998;Build 4
  1. ;
  1. CPT(DA,RAX) ;Ask for CPT Code when the 'Procedure Enter/Edit' option
  1. ;is exercised. Called from input template: W RADIOLOGY PROCEDURE
  1. ;Input: DA=ien of new record being edited & RAX=procedure name
  1. N DIR,DIROUT,DIRUT,DTOUT,DUOUT,RAFDA,RAYN,X,Y S RAYN=0
  1. F D Q:+RAYN!($D(DIRUT)#2)
  1. .K X,Y S DIR(0)="71.11,9" D ^DIR Q:$D(DIRUT)#2
  1. .;Y=N^S where N=record ien & S=.01 value of the record
  1. .W !!,"Note: If an erroneous CPT Code is accepted it cannot be changed; the",!,"procedure must be inactivated."
  1. . I $G(RA7111DA)="" S RA7111DA=$G(^TMP("RA7111DA",$J))
  1. . S RAX=$P($G(^RAMRPF(71.11,RA7111DA,0)),U,1) W !!,"Are you adding '"_$P(Y,U,2)_"' as the CPT Code for the new Rad/Nuc Med Procedure",!,"'"_RAX_"'? NO// "
  1. .;S RAX=$P($G(^RAMRPF(71.11,1,0)),U,1) W !!,"Are you adding '"_$P(Y,U,2)_"' as the CPT Code for the new Rad/Nuc Med Procedure",!,"'"_RAX_"'? NO// "
  1. .R RAYN:DTIME
  1. .I '$T!(RAYN["^") S RAYN=-1 Q
  1. .S RAYN=$E(RAYN) S:RAYN="" RAYN="N"
  1. .I "YyNn"'[RAYN W !?3,"Enter 'Y' to accept the CPT Code, or 'N' to reject the CPT Code or '^' to",!?3,"exit without selecting a CPT Code."
  1. .I W !?5,"Note: If an erroneous CPT Code is accepted it cannot be changed; the",!?5,"procedure must be inactivated."
  1. .S:"Yy"[RAYN RAYN="1^Y"
  1. .S:"Nn"[RAYN RAYN=0
  1. .Q
  1. I $P(RAYN,U,2)="Y" S RAFDA(71.11,DA_",",9)=$P(Y,U) D FILE^DIE("","RAFDA")
  1. Q
  1. ;
  1. CHKSTAT() ;Check the status of the study. If the
  1. ; exam status of the study is complete bypass the
  1. ; editing of the PROCEDURE (70.03 ; 2) field. This
  1. ; function is called from [RA EXAM EDIT] grzeis P124
  1. ;
  1. ; Variables
  1. ; ---------
  1. ; Input : none
  1. ; Return: -1 if missing exam status,
  1. ; 0 if exam COMPLETE, else 1.
  1. ;
  1. ; The following variables must exist: RAY (0 node 70.03) &
  1. ; the RA0 array RA0(1...18) where the subscript indicates
  1. ; the piece of the parsed zero node: Ex: RA0(3) = EXAM STATUS pointer
  1. ; RAX(3) is the ORDER value of the record in file 72.
  1. ;
  1. I RA0(3)="" W !?3,"MISSING EXAM STATUS, EXIT CASE EDIT!",! Q -1
  1. N RAX S RAX=$G(^RA(72,RA0(3),0)),RAX(3)=$P(RAX,U,3)
  1. Q $S(RAX(3)=9:0,1:1)
  1. ;