source: FOIAVistA/trunk/r/SURGERY-SR/SROAPRE1.m@ 1166

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

initial load of FOIAVistA 6/30/08 version

File size: 2.6 KB
Line 
1SROAPRE1 ;BIR/MAM - EDIT PAGE 1 PREOP ;11/26/07
2 ;;3.0; Surgery ;**38,47,125,135,141,166**;24 Jun 93;Build 6
3 K DA D @EMILY Q
41 ; edit general information
5 W ! K DIR S X=$P(SRAO(1),"^") I X'="" S DIR("B")=X
6 S DIR(0)="130,402",DIR("A")="GENERAL" D ^DIR K DIR I $D(DUOUT) S SRSOUT=1 Q
7 I X="@" S SRCAT="General" D SURE Q:SRSOUT G:'SRYN 1 S (SRAX,X)="",$P(^SRF(SRTN,200),"^")="" D NOGEN Q
8 S SRAX=Y,$P(^SRF(SRTN,200),"^")=SRAX I Y["N" D NOGEN Q
9 I Y["Y" D GEN
10 Q
112 ; edit pulmonary information
12 W ! K DIR S X=$P(SRAO(2),"^") I X'="" S DIR("B")=X
13 S DIR(0)="130,241",DIR("A")="PULMONARY" D ^DIR K DIR I $D(DUOUT) S SRSOUT=1 Q
14 I X="@" S SRCAT="Pulmonary" D SURE Q:SRSOUT G:'SRYN 2 S (SRAX,X)="",$P(^SRF(SRTN,200),"^",9)="" D NOPULM Q
15 S SRAX=Y,$P(^SRF(SRTN,200),"^",9)=SRAX I Y["N" D NOPULM Q
16 I Y["Y" D PULM
17 Q
183 ; edit hepatobiliary information
19 W ! K DIR S X=$P(SRAO(3),"^") I X'="" S DIR("B")=X
20 S DIR(0)="130,244",DIR("A")="HEPATOBILIARY" D ^DIR K DIR I $D(DUOUT) S SRSOUT=1 Q
21 I X="@" S SRCAT="Hepatobiliary" D SURE Q:SRSOUT G:'SRYN 3 S (SRAX,X)="",$P(^SRF(SRTN,200),"^",13)="" D NOHEP Q
22 S SRAX=Y,$P(^SRF(SRTN,200),"^",13)=SRAX I Y["N" D NOHEP Q
23 I Y["Y" D HEP
24 Q
25GEN ; general
26 N SRUP S SRUP=""
27 W ! K DR,DIE S DA=SRTN,DIE=130,DR="236T;237T;346T;202T;246T;325T;238T" D ^DIE K DIE,DR I $D(Y) Q
28 K DIR S DA=SRTN,DIR(0)="130,492",DIR("A")="Functional Health Status at Evaluation for Surgery" D ^DIR K DIR D
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 S SRACLR=0
33 Q
34NOGEN ; no general problems
35 S $P(^SRF(SRTN,200),"^",6)=$S(X="":"",1:1) F I=2,3,4,7 S $P(^SRF(SRTN,200),"^",I)=SRAX
36 S $P(^SRF(SRTN,200.1),"^",2)=$S(X="":"",X="NS":"NS",1:1)
37 Q
38PULM ; pulmonary
39 W ! K DR,DIE S DA=SRTN,DIE=130,DR="204T;203T;326T" D ^DIE K DR
40 S SRACLR=0
41 Q
42NOPULM ; no pulmonary problems
43 F I=10:1:12 S $P(^SRF(SRTN,200),"^",I)=SRAX
44 Q
45HEP ; hepatobiliary
46 K DR,DIE S DIE=130,DA=SRTN,DR="212////Y" D ^DIE K DR
47 S SRACLR=0
48 Q
49NOHEP ; no hepatobiliary problems
50 S $P(^SRF(SRTN,200),"^",15)=SRAX
51 Q
52RET W !! K DIR S DIR(0)="E" D ^DIR I $D(DTOUT)!$D(DUOUT) S SRSOUT=1
53 Q
54SURE W ! K DIR S DIR("A")=" Sure you want to delete all "_SRCAT_" information ? ",DIR("B")="NO",DIR(0)="YA" D ^DIR K DIR S SRYN=Y I $D(DTOUT)!$D(DUOUT) S SRSOUT=1
55 Q
56NO2ALL ; set all fields to NO
57 S SRAX="N",$P(^SRF(SRTN,200),"^")=SRAX D NOGEN
58 S $P(^SRF(SRTN,200),"^",9)=SRAX D NOPULM
59 S $P(^SRF(SRTN,200),"^",13)=SRAX D NOHEP
60 S $P(^SRF(SRTN,200.1),"^")=SRAX D NOGAST^SROAPR1A
61 S $P(^SRF(SRTN,200),"^",30)=SRAX D NOCARD^SROAPR1A
62 S $P(^SRF(SRTN,200),"^",40)=SRAX D NOVAS^SROAPR1A
63 Q
Note: See TracBrowser for help on using the repository browser.