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

SROCON.m

Go to the documentation of this file.
  1. SROCON ;BIR/MAM - STUFF ENTRY IN CONCURRENT CASE ;06/28/10
  1. ;;3.0;Surgery;**78,119,161,174**;24 Jun 93;Build 8
  1. I $D(SRNOCON),SRNOCON=1 Q
  1. I $D(SRFLAG) S SRCON=$P(^SRF(DA(1),"CON"),"^")
  1. I '$D(SRFLAG) S SRCON=$P(^SRF(DA,"CON"),"^")
  1. N SRX S SRX=X
  1. ASK N DIR,X,Y S DIR("A",1)="",DIR("A")="Do you want to store this information in the concurrent case ",DIR(0)="YO",DIR("B")="YES"
  1. S DIR("?")="^D HELP^SROCON" D ^DIR I Y=0 Q
  1. STUFF ; concatonate field to SRODR
  1. D EN^DDIOL(" ","","!")
  1. I $G(SRFLAG)=1 S SRODR(130.213,DA(2)_","_SRCON_",",SRFLD)=SRX K SRFLAG Q
  1. S SRODR(130,SRCON_",",SRFLD)=SRX
  1. Q
  1. HELP ;
  1. N SRMX S SRMX=X W @IOF S DFN=$P(^SRF(SRTN,0),"^") D DEM^VADPT S X=SRMX ;; < RJS *161 >
  1. D EN^DDIOL("There is a concurrent surgical case associated with this procedure. A brief","","!!")
  1. D EN^DDIOL("description of that case is listed below.","","!")
  1. S SROPER=$P(^SRF(SRCON,"OP"),"^") I $O(^SRF(SRCON,13,0)) S SROTHER=0 F I=0:0 S SROTHER=$O(^SRF(SRCON,13,SROTHER)) Q:'SROTHER D OTHER
  1. K SROPS,MM,MMM S:$L(SROPER)<65 SROPS(1)=SROPER I $L(SROPER)>64 S SROPER=SROPER_" " F M=1:1 D LOOP Q:MMM=""
  1. S SRSUR=$S($D(^SRF(SRCON,.1)):$P(^(.1),"^",4),1:"") S:'SRSUR SRSUR="NOT ENTERED" S:SRSUR SRSUR=$P(^VA(200,SRSUR,0),"^")
  1. S SRSS=$P(^SRF(SRCON,0),"^",4) S:'SRSS SRSS="NOT ENTERED" S:SRSS SRSS=$P(^SRO(137.45,SRSS,0),"^")
  1. D EN^DDIOL("Surgeon: "_SRSUR,"","!!") D EN^DDIOL("Surgical Specialty: "_SRSS,"","!")
  1. D EN^DDIOL("Procedure: "_SROPS(1),"","!!")
  1. I $D(SROPS(2)) D EN^DDIOL(SROPS(2),"","!,?11")
  1. I $D(SROPS(3)) D EN^DDIOL(SROPS(3),"","!,?11")
  1. I $D(SROPS(4)) D EN^DDIOL(SROPS(4),"","!,?11")
  1. N SRW S SRW(1)="",SRW(2)="If you answer 'YES', the information you entered for this field will also"
  1. S SRW(3)="be stored for the concurrent case. If this information is not pertinent for"
  1. S SRW(4)="the concurrent case, enter 'NO'.",SRW(5)=""
  1. D EN^DDIOL(.SRW)
  1. Q
  1. OTHER ; other operations
  1. S SRLONG=1 I $L(SROPER)+$L($P(^SRF(SRCON,13,SROTHER,0),"^"))>235 S SRLONG=0,SROTHER=999,SROPERS=" ..."
  1. I SRLONG S SROPERS=$P(^SRF(SRCON,13,SROTHER,0),"^")
  1. S SROPER=SROPER_$S(SROPERS=" ...":SROPERS,1:", "_SROPERS)
  1. Q
  1. LOOP ; break procedure
  1. S SROPS(M)="" F LOOP=1:1 S MM=$P(SROPER," "),MMM=$P(SROPER," ",2,200) Q:MMM="" Q:$L(SROPS(M))+$L(MM)'<65 S SROPS(M)=SROPS(M)_MM_" ",SROPER=MMM
  1. Q