Changeset 623 for WorldVistAEHR/trunk/r/SURGERY-SR/SROAPRE.m
- Timestamp:
- Dec 4, 2009, 12:11:15 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WorldVistAEHR/trunk/r/SURGERY-SR/SROAPRE.m
r613 r623 1 SROAPRE ;BIR/MAM - PREOPERATIVE INFO ;11/26/07 2 ;;3.0; Surgery ;**38,47,55,88,100,125,142,166**;24 Jun 93;Build 7 3 I '$D(SRTN) W !!,"A Surgery Risk Assessment must be selected prior to using this option.",!!,"Press <RET> to continue " R X:DTIME G END 4 S (SRSOUT,SRACLR)=0,SRSUPCPT=1 D ^SROAUTL,DUP^SROAUTL G:SRSOUT END 5 START D:SRACLR RET G:SRSOUT END S SRACLR=0 K SRA,SRAO D ^SROAPS1 6 ASK W !,"Select Preoperative Information to Edit: " R X:DTIME I '$T!(X["^") D CONCC G END 7 S:X="" X="+1" S:X="a" X="A" S:X="n" X="N" 8 I $L(X)=2,'$D(SRAO(X)),X?1N1A S Z=$E(X,2),Z=$TR(Z,"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ") I $D(SRAO($E(X)_Z)) S X=$E(X)_Z 9 I '$D(SRAO(X)),(X'?.N1":".N),(X'="A"),(X'="N"),(X'="+1") D HELP G:SRSOUT END G START 10 I X="+1" D CONCC,^SROAPR2 G START 11 I X="A" S X="1:6" 12 I X?.N1":".N S Y=$E(X),Z=$P(X,":",2) I Y<1!(Z>6)!(Y>Z) D HELP G:SRSOUT END G START 13 I X="N" D G:SRSOUT END G START 14 .W ! K DIR S DIR(0)="Y",DIR("B")="NO",DIR("A")="Are you sure you want to set all fields on this page to NO" 15 .D ^DIR I $D(DTOUT)!$D(DUOUT) S SRSOUT=1 Q 16 .I Y D NO2ALL^SROAPRE1 17 S SRPAGE="" D HDR^SROAUTL 18 I X?.N1":".N D RANGE G START 19 I $D(SRAO(X)),+X=X S EMILY=X D G START 20 .I $$LOCK^SROUTL(SRTN) W ! D:EMILY<4 ^SROAPRE1 D:EMILY>3 ^SROAPR1A D UNLOCK^SROUTL(SRTN) 21 I $D(SRAO(X)),$$LOCK^SROUTL(SRTN) D D UNLOCK^SROUTL(SRTN) 22 .I X="1H" D FUNCTH Q 23 .S SRX=X W ! K DR,DIE S DA=SRTN,DR=$P(SRAO(X),"^",2)_"T",DIE=130 D ^DIE K DR 24 G START 25 END I '$D(SREQST) W @IOF D ^SRSKILL 26 Q 27 FUNCTH N X K DA,DIR S DA=SRTN,DIR(0)="130,492",DIR("A")="Functional Health Status at Evaluation for Surgery" D ^DIR K DIR D Q 28 .I $D(DTOUT)!$D(DUOUT) Q 29 .I X="@" K DIE,DR S DIE=130,DR="492///@" D ^DIE K DA,DIE,DR Q 30 .K DIE,DR S DIE=130,DR="492////"_Y D ^DIE K DA,DIE,DR 31 Q 32 HELP W @IOF,!!!!,"Enter the number, number/letter combination, or range of numbers you want to",!,"edit. Examples of proper responses are listed below." 33 W !!,"1. Enter 'A' to update all information.",!!,"2. Enter 'N' to set all fields on this page to NO." 34 W !!,"3. Enter a number (1-6) to update the information in that group. (For",!," example, enter '5' to update all cardiac information)" 35 W !!,"4. Enter a number/letter combination to update a specific occurrence. (To ",!," update Current Pneumonia, enter '2C'.)" 36 W !!,"5. Enter a range of numbers (1-6) separated by a ':' to enter a range of",!," occurrences. (For example, enter '2:4' to enter all pulmonary,",!," hepatobiliary, and gastrointestinal information)" 37 W !!,"6. Press <RET> to continue to page 2 of this option." 38 W !!,"Press <RET> to continue, or '^' to quit " R X:DTIME I '$T!(X["^") S SRSOUT=1 39 Q 40 RANGE ; range of numbers 41 I $$LOCK^SROUTL(SRTN) D D UNLOCK^SROUTL(SRTN) 42 .S SHEMP=$P(X,":"),CURLEY=$P(X,":",2) W:SHEMP<9 ! F EMILY=SHEMP:1:CURLEY Q:SRSOUT D:EMILY<4 ^SROAPRE1 D:EMILY>3 ^SROAPR1A 43 Q 44 RET Q:SRSOUT W !!,"Press <RET> to continue, or '^' to quit " R X:DTIME I '$T!(X["^") S SRSOUT=1 Q 45 Q 46 CONCC ; check for concurrent case and update if one exists 47 S SRCON=$P($G(^SRF(SRTN,"CON")),"^") Q:'SRCON 48 Q:$P($G(^SRF(SRCON,"RA")),"^",2)="C" 49 S SRI="" F S SRI=$O(SRAO(SRI)) Q:SRI="" S SRZ=$P(SRAO(SRI),"^",2) K DA,DIC,DIQ,DR,SRY D 50 .S DA=SRTN,DR=SRZ,DIC="^SRF(",DIQ="SRY",DIQ(0)="I" D EN^DIQ1 S SRX=SRY(130,SRTN,SRZ,"I") S:SRX="" SRX="@" 51 .I $$LOCK^SROUTL(SRTN) K DA,DIE,DR S DA=SRCON,DIE=130,DR=SRZ_"////"_SRX D ^DIE K DR D UNLOCK^SROUTL(SRTN) 52 Q 1 SROAPRE ;BIR/MAM - PREOPERATIVE INFO ;06/03/05 2 ;;3.0; Surgery ;**38,47,55,88,100,125,142**;24 Jun 93 3 I '$D(SRTN) W !!,"A Surgery Risk Assessment must be selected prior to using this option.",!!,"Press <RET> to continue " R X:DTIME G END 4 S (SRSOUT,SRACLR)=0,SRSUPCPT=1 D ^SROAUTL,DUP^SROAUTL G:SRSOUT END 5 START D:SRACLR RET G:SRSOUT END S SRACLR=0 K SRA,SRAO D ^SROAPS1 6 ASK W !,"Select Preoperative Information to Edit: " R X:DTIME I '$T!(X["^") D CONCC G END 7 S:X="" X="+1" S:X="a" X="A" S:X="n" X="N" 8 I $L(X)=2,'$D(SRAO(X)),X?1N1A S Z=$E(X,2),Z=$TR(Z,"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ") I $D(SRAO($E(X)_Z)) S X=$E(X)_Z 9 I '$D(SRAO(X)),(X'?.N1":".N),(X'="A"),(X'="N"),(X'="+1") D HELP G:SRSOUT END G START 10 I X="+1" D CONCC,^SROAPR2 G START 11 I X="A" S X="1:6" 12 I X?.N1":".N S Y=$E(X),Z=$P(X,":",2) I Y<1!(Z>6)!(Y>Z) D HELP G:SRSOUT END G START 13 I X="N" D G:SRSOUT END G START 14 .W ! K DIR S DIR(0)="Y",DIR("B")="NO",DIR("A")="Are you sure you want to set all fields on this page to NO" 15 .D ^DIR I $D(DTOUT)!$D(DUOUT) S SRSOUT=1 Q 16 .I Y D NO2ALL^SROAPRE1 17 S SRPAGE="" D HDR^SROAUTL 18 I X?.N1":".N D RANGE G START 19 I $D(SRAO(X)),+X=X S EMILY=X D G START 20 .I $$LOCK^SROUTL(SRTN) W ! D:EMILY<4 ^SROAPRE1 D:EMILY>3 ^SROAPR1A D UNLOCK^SROUTL(SRTN) 21 I $D(SRAO(X)),$$LOCK^SROUTL(SRTN) D D UNLOCK^SROUTL(SRTN) 22 .I X="1J" D FUNCTI Q 23 .I X="1I" D FUNCTJ Q 24 .S SRX=X W ! K DR,DIE S DA=SRTN,DR=$P(SRAO(X),"^",2)_"T",DIE=130 D ^DIE K DR 25 G START 26 END I '$D(SREQST) W @IOF D ^SRSKILL 27 Q 28 FUNCTI N X K DA,DIR S DA=SRTN,DIR(0)="130,492",DIR("A")="Functional Health Status at Evaluation for Surgery" D ^DIR K DIR D Q 29 .I $D(DTOUT)!$D(DUOUT) Q 30 .I X="@" K DIE,DR S DIE=130,DR="492///@" D ^DIE K DA,DIE,DR Q 31 .K DIE,DR S DIE=130,DR="492////"_Y D ^DIE K DA,DIE,DR 32 Q 33 FUNCTJ N X K DA,DIR S DA=SRTN,DIR(0)="130,240",DIR("A")="Functional Health Status Prior to Current Illness" D ^DIR K DIR D Q 34 .I $D(DTOUT)!$D(DUOUT) Q 35 .I X="@" K DIE,DR S DIE=130,DR="240///@" D ^DIE K DA,DIE,DR Q 36 .K DIE,DR S DIE=130,DR="240////"_Y D ^DIE K DA,DIE,DR 37 Q 38 HELP W @IOF,!!!!,"Enter the number, number/letter combination, or range of numbers you want to",!,"edit. Examples of proper responses are listed below." 39 W !!,"1. Enter 'A' to update all information.",!!,"2. Enter 'N' to set all fields on this page to NO." 40 W !!,"3. Enter a number (1-6) to update the information in that group. (For",!," example, enter '5' to update all cardiac information)" 41 W !!,"4. Enter a number/letter combination to update a specific occurrence. (To ",!," update Current Pneumonia, enter '2C'.)" 42 W !!,"5. Enter a range of numbers (1-6) separated by a ':' to enter a range of",!," occurrences. (For example, enter '2:4' to enter all pulmonary,",!," hepatobiliary, and gastrointestinal information)" 43 W !!,"6. Press <RET> to continue to page 2 of this option." 44 W !!,"Press <RET> to continue, or '^' to quit " R X:DTIME I '$T!(X["^") S SRSOUT=1 45 Q 46 RANGE ; range of numbers 47 I $$LOCK^SROUTL(SRTN) D D UNLOCK^SROUTL(SRTN) 48 .S SHEMP=$P(X,":"),CURLEY=$P(X,":",2) W:SHEMP<9 ! F EMILY=SHEMP:1:CURLEY Q:SRSOUT D:EMILY<4 ^SROAPRE1 D:EMILY>3 ^SROAPR1A 49 Q 50 RET Q:SRSOUT W !!,"Press <RET> to continue, or '^' to quit " R X:DTIME I '$T!(X["^") S SRSOUT=1 Q 51 Q 52 CONCC ; check for concurrent case and update if one exists 53 S SRCON=$P($G(^SRF(SRTN,"CON")),"^") Q:'SRCON 54 Q:$P($G(^SRF(SRCON,"RA")),"^",2)="C" 55 S SRI="" F S SRI=$O(SRAO(SRI)) Q:SRI="" S SRZ=$P(SRAO(SRI),"^",2) K DA,DIC,DIQ,DR,SRY D 56 .S DA=SRTN,DR=SRZ,DIC="^SRF(",DIQ="SRY",DIQ(0)="I" D EN^DIQ1 S SRX=SRY(130,SRTN,SRZ,"I") S:SRX="" SRX="@" 57 .I $$LOCK^SROUTL(SRTN) K DA,DIE,DR S DA=SRCON,DIE=130,DR=SRZ_"////"_SRX D ^DIE K DR D UNLOCK^SROUTL(SRTN) 58 Q
Note:
See TracChangeset
for help on using the changeset viewer.