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

SRO1L.m

Go to the documentation of this file.
  1. SRO1L ;BIR/ADM - Update 1-Liner Cases ; [ 07/7/03 9:05 AM ]
  1. ;;3.0; Surgery ;**86,88,107,121,125**;24 Jun 93
  1. ST I '$D(SRSITE) D ^SROVAR
  1. EN2 S SRSOUT=0 K SRTN D SROPS G:'$D(SRTN) END
  1. D ^SRO1L1 S SROERR=SRTN D ^SROERR0
  1. W @IOF G EN2
  1. END D ^SRSKILL K SRTN W @IOF
  1. Q
  1. SROPS ; select patient and case
  1. N SRSEL S (CNT,SRDT)=0 D ^SROPSEL G:SRSOUT END D HDR
  1. I SRSEL=2 K SRCASE D LIST I '$D(SRCASE(1)) W !!,"Case #"_SROP_" is not a valid 1-liner case.",!!,"Press RETURN to continue " R X:DTIME G ST
  1. I SRSEL=2 S SRTN=+SRCASE(1) Q
  1. ;
  1. ADT S (SRDT,CNT,SRBACK)=0 F S SRDT=$O(^SRF("ADT",DFN,SRDT)) Q:'SRDT!SRSOUT!$D(SRTN)!SRBACK S SROP=0 F S SROP=$O(^SRF("ADT",DFN,SRDT,SROP)) Q:'SROP!$D(SRTN)!SRSOUT!SRBACK D LIST
  1. G:SRBACK ADT Q:$D(SRTN)
  1. I '$D(SRCASE(1)) W !!,"There are no cases entered for "_VADM(1)_".",!!,"Press RETURN to continue " R X:DTIME G END
  1. OPT S SRSOUT=0 W !!,"Select Case: " R X:DTIME I '$T!("^"[X) S SRSOUT=1 G END
  1. I '$D(SRCASE(X)) W !!,"Enter the number of the operation you want to edit." G OPT
  1. S SRTN=+SRCASE(X)
  1. Q
  1. LIST ; list cases
  1. N SRA S SRA=$G(^SRF(SROP,"RA")) I $P(SRA,"^",2)="N",$P(SRA,"^",6)="Y" Q
  1. I $P($G(^SRF(SROP,0)),"^",9)<2961001 Q
  1. I '$P($G(^SRF(SROP,.2)),"^",12) Q
  1. I $P($G(^SRF(SROP,30)),"^")!$P($G(^SRF(SROP,31)),"^",8) Q
  1. I $P($G(^SRF(SROP,"NON")),"^")="Y" Q
  1. I $P($G(^SRF(SROP,37)),"^") Q
  1. I $Y+5>IOSL S SRBACK=0 D SEL Q:$D(SRTN)!(SRSOUT) D HDR Q:SRBACK
  1. S CNT=CNT+1,SRSDATE=$P(^SRF(SROP,0),"^",9) W !,CNT_". "
  1. CASE W $E(SRSDATE,4,5)_"-"_$E(SRSDATE,6,7)_"-"_$E(SRSDATE,2,3)
  1. S SROPER=$P(^SRF(SROP,"OP"),"^") I $O(^SRF(SROP,13,0)) S SROTHER=0 F I=0:0 S SROTHER=$O(^SRF(SROP,13,SROTHER)) Q:'SROTHER D OTHER
  1. D ^SROP1 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. W ?14,SROPS(1) I $D(SROPS(2)) W !,?14,SROPS(2) I $D(SROPS(3)) W !,?14,SROPS(3) W:$D(SROPS(4)) !,?14,SROPS(4)
  1. W ! S SRCASE(CNT)=SROP_"^"_SRDT
  1. Q
  1. SEL ; select case
  1. W ! K DIR S DIR("A")="Select case or enter RETURN to continue listing cases: ",DIR(0)="FOA" D ^DIR K DIR I $D(DTOUT)!$D(DUOUT) S SRSOUT=1 Q
  1. I X="" Q
  1. I '$D(SRCASE(X)) W ! S DIR("A",1)="Please enter the number corresponding to the case you want to edit.",DIR("A",2)="If the case desired does not appear, enter RETURN to continue listing",DIR("A",3)="additional cases."
  1. I '$D(SRCASE(X)) S DIR("A",4)="",DIR("A")="Press RETURN to continue " D ^DIR K DIR S:$D(DTOUT)!$D(DUOUT) SRSOUT=1 S SRBACK=1 Q
  1. S SRTN=+SRCASE(X)
  1. Q
  1. OTHER ; other operations
  1. S SRLONG=1 I $L(SROPER)+$L($P(^SRF(SROP,13,SROTHER,0),"^"))>235 S SRLONG=0,SROTHER=999,SROPERS=" ..."
  1. I SRLONG S SROPERS=$P(^SRF(SROP,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
  1. HDR ; print heading
  1. W @IOF,!,?1,VADM(1)_" "_VA("PID") S X=$P($G(VADM(6)),"^") W:X " * DIED "_$E(X,4,5)_"/"_$E(X,6,7)_"/"_$E(X,2,3)_" *" W !
  1. Q