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

SROASSN.m

Go to the documentation of this file.
  1. SROASSN ;B'HAM ISC/MAM - SELECT ASSESSMENT ; [ 07/03/03 08:44 AM ]
  1. ;;3.0; Surgery ;**121**;24 Jun 93
  1. ;
  1. W !! S (SRDT,CNT)=0 F I=0:0 S SRDT=$O(^SRF("ADT",DFN,SRDT)) Q:'SRDT!(SRSOUT) S SRASS=0 F I=0:0 S SRASS=$O(^SRF("ADT",DFN,SRDT,SRASS)) Q:'SRASS!($D(SRTN))!(SRSOUT) I SRASS=SROP D LIST
  1. I '$D(SRCASE(1)) D Q
  1. .W @IOF,!,?1,SRANM
  1. .W !!,$E(SRSDATE,4,5)_"-"_$E(SRSDATE,6,7)_"-"_$E(SRSDATE,2,3),?14,SROPER_" ("_STATUS_")"
  1. .W !!,$S($P($G(^SRF(SROP,"NON")),"^")="Y":"Case #"_SROP_" is not an O.R. surgical procedure.",1:"There is no Surgery Risk Assessment entered for Case #"_SROP_".")
  1. .W !!,"Press <RET> to continue.",! R X:DTIME S:'$T SRSOUT=1 S SRBACK=1
  1. S SRTN=+SRCASE(1)
  1. Q
  1. LIST ; list assessments
  1. S CNT=CNT+1,SRSDATE=$P(^SRF(SRASS,0),"^",9)
  1. DISP S SROPER=$P(^SRF(SRASS,"OP"),"^") I $O(^SRF(SRASS,13,0)) S SROTHER=0 F I=0:0 S SROTHER=$O(^SRF(SRASS,13,SROTHER)) Q:'SROTHER D OTHER
  1. S SR("RA")=$G(^SRF(SRASS,"RA")),Z=$P(SR("RA"),"^"),STATUS=$S(Z="I":"INCOMPLETE",Z="C":"COMPLETED",Z="T":"TRANSMITTED",1:"INCOMPLETE")
  1. I "N"[$P(SR("RA"),"^",2),"N"[$P(SR("RA"),"^",6) S CNT=CNT-1 Q
  1. I $P(SR("RA"),"^",2)="C" S SROPER="* "_SROPER
  1. S SROPER=SROPER_" ("_STATUS_")"
  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. ;I '$D(SRTN) W CNT_". "
  1. CASE ;W $E(SRSDATE,4,5)_"-"_$E(SRSDATE,6,7)_"-"_$E(SRSDATE,2,3),?14,SROPS(1) I $D(SROPS(2)) W !,?14,SROPS(2) I $D(SROPS(3)) W !,?14,SROPS(3)
  1. ;I $D(SROPS(4)) W !,?14,SROPS(4)
  1. I $D(SRTN) Q
  1. W !! S SRCASE(CNT)=SRASS_"^"_SRDT
  1. Q
  1. OTHER ; other operations
  1. S SRLONG=1 I $L(SROPER)+$L($P(^SRF(SRASS,13,SROTHER,0),"^"))>235 S SRLONG=0,SROTHER=999,SROPERS=" ..."
  1. I SRLONG S SROPERS=$P(^SRF(SRASS,13,SROTHER,0),"^")
  1. S SROPER=SROPER_$S(SROPERS'=" ...":", "_SROPERS,1:SROPERS)
  1. Q
  1. LOOP ; break procedures
  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