source: FOIAVistA/trunk/r/SURGERY-SR/SROTHER.m@ 1582

Last change on this file since 1582 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 2.7 KB
Line 
1SROTHER ;BIR/MAM - OTHER PROCEDURES ;05/14/99 12:14 PM
2 ;;3.0; Surgery ;**38,88,142**;24 Jun 93
3 S SRSOUT=0 I '$D(SRTN) W @IOF,!!,"A surgical case must be selected prior to using this option.",!!,"Press RETURN to continue " R X:DTIME S SRSOUT=1 G END
4 D ^SROAUTL S SR(0)=^SRF(SRTN,0),Y=$P(SR(0),"^",9),SRDATE=$E(Y,4,5)_"/"_$E(Y,6,7)_"/"_$E(Y,2,3),SRLINE="" F I=0:1:79 S SRLINE=SRLINE_"-"
5START D HDR K SROTHER S (OTH,CNT)=0 F S OTH=$O(^SRF(SRTN,13,OTH)) Q:'OTH!($D(SROTHER)) Q:SRSOUT S CNT=CNT+1 D LIST I CNT=13 W !!,SRLINE D SEL
6 I SRSOUT Q
7 I $D(SROTHER) D EDIT G START
8 I CNT W !!,SRLINE
9 I CNT=0 D ASK G:'SRSOUT START S SRSOUT=0 Q
10OPT W !!,"Enter "_$S(CNT=1:1,1:"(1-"_CNT_")")_" to edit an existing procedure, or 'NEW' to",!,"enter another operative procedure: " R X:DTIME I '$T!("^"[X) Q
11 I $E(X)="N" D NEW G START
12 I '$D(OTHER(X)) W !!,"Select the number corresponding to the procedure you want to edit, or 'NEW' to",!,"enter an additional operative procedure." G OPT
13 S SROTHER=$P(OTHER(X),"^",3) D EDIT G START
14 Q
15END I 'SRSOUT W !!,"Press RETURN to continue " R X:DTIME
16 D ^SRSKILL W @IOF
17 Q
18LIST ; list existing procedures
19 S X=^SRF(SRTN,13,OTH,0),CPT=$P($G(^SRF(SRTN,13,OTH,2)),"^") I CPT S Y=$P($$CPT^ICPTCOD(CPT),"^",2),SRDA=OTH D SSOTH^SROCPT S CPT=Y
20 I CPT="" S CPT="NOT ENTERED"
21 S OTHER(CNT)=$P(X,"^")_"^"_CPT_"^"_OTH
22 W !,$S(CNT<10:" ",1:"")_CNT_". "_$P(OTHER(CNT),"^")_$S('$D(SRSUPCPT):" (CPT: "_$P(OTHER(CNT),"^",2)_")",1:"")
23 Q
24SEL ; select procedure
25 W !!,"Select (1-"_CNT_") to edit an existing procedure, or RETURN to continue: " R X:DTIME I '$T!(X["^") S SRSOUT=1 Q
26 I X="" S CNT=0 K OTHER D HDR Q
27 I '$D(OTHER(X)) W !!,"Enter the number corresponding to the procedure you want to edit, or RETURN",!,"to continue listing procedures." G SEL
28 S SROTHER=$P(OTHER(X),"^",3)
29 Q
30HDR ; print screen header
31 S SRPAGE="OTHER OPERATIVE PROCEDURES" D HDR^SROAUTL
32 Q
33EDIT ; edit one procedure
34 D HDR W ! S DA=SROTHER,DIE="^SRF("_SRTN_",13,",DA(1)=SRTN,DR=".01T"_$S('$D(SRSUPCPT):";3T",1:"")
35 D ^DIE K DR,DIE
36 Q
37ASK W !!,"There are no additional procedures entered for this case. Do you want to add",!,"a new procedure ? YES// " R SRYN:DTIME I '$T!(SRYN["^") S SRYN="N"
38 S:SRYN="" SRYN="Y"
39 S SRYN=$E(SRYN) I "YyNn"'[SRYN W !!,"Enter 'YES' to add another operative procedure, or 'NO' to return to the",!,"previous screen." G ASK
40 I "Nn"[SRYN S SRSOUT=1 Q
41NEW D HDR W ! K DIR,DA S DIR(0)="130.16,.01",DIR("A")="Other Operative Procedure" D ^DIR I Y=""!$D(DTOUT)!$D(DUOUT) Q
42 I '$D(^SRF(SRTN,13,0)) S ^SRF(SRTN,13,0)="^130.16A^^"
43 K DA,DIC,DD,DO,DINUM S DA(1)=SRTN,X=Y,DIC="^SRF("_SRTN_",13,",DIC(0)="L" D FILE^DICN K DA,DIC,DD,DO,DINUM
44 I '$D(SRSUPCPT) K DR,DIE S DA=+Y,DA(1)=SRTN,DR="3T",DIE="^SRF("_SRTN_",13," D ^DIE K DR
45 Q
Note: See TracBrowser for help on using the repository browser.