source: WorldVistAEHR/trunk/r/SURGERY-SR/SROAUTLC.m@ 1211

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

revised back to 6/30/08 version

File size: 4.0 KB
RevLine 
[623]1SROAUTLC ;BIR/ADM - CARDIAC RISK ASSESSMENT UTILITY ;08/23/07
2 ;;3.0; Surgery ;**38,71,90,88,95,97,102,96,125,153,163,164**;24 Jun 93;Build 2
3 ;
4 ; Reference to ^DIC(45.3 supported by DBIA #218
5 ;
6SITE ; determine if site is a cardiac facility
7 I $$CARD Q
8 W @IOF,!,"The SURGERY SITE PARAMETERS file indicates this site/division does not use ",!,"the Cardiac Risk Assessment module. Therefore, this option is not available",!,"for use.",!
9 S XQUIT="" W !!,"Press RETURN to continue " R X:DTIME W @IOF
10 Q
11CARD() ; extrinsic call to determine if site is cardiac facility
12 N CARD S CARD=0 Q:'$G(SRSITE) CARD
13 I $P($G(^SRO(133,SRSITE,0)),"^",5)="Y" S CARD=1
14 Q CARD
15NOW ; update date/time of surgical priority entry
16 N X I $$CARD,$P($G(^SRF(DA,208)),"^",12)'="" D NOW^%DTC S $P(^SRF(DA,208),"^",13)=$E(%,1,12)
17 Q
18KNOW ; delete date/time of surgical priority entry
19 I $D(^SRF(DA,208)) S $P(^SRF(DA,208),"^",13)=""
20 Q
21EM ; input transform logic on Case Schedule Type field (.035)
22 Q:'$$CARD N DIR,SREM,SRNOT,SRQ,SRSP
23 I X'="EM" S:X="U" $P(^SRF(DA,208),"^",12)=2 S:X'="U" $P(^SRF(DA,208),"^",12)=1 D NOW Q
24 S SRQ=0,SRSP=$P(^DIC(45.3,$P(^SRO(137.45,$P(^SRF(DA,0),"^",4),0),"^",2),0),"^") Q:SRSP'=48&(SRSP'=58) D:SRSP=58 YN Q:SRQ
25 D CAT
26 Q
27CAT N X K DIR S DIR("A",1)="",DIR("A",2)=" Enter category of emergency.",DIR("A",3)=" 1. Emergent (ongoing ischemia)",DIR("A",4)=" 2. Emergent (hemodynamic compromise)",DIR("A",5)=" 3. Emergent (arrest with CPR)"
28 S DIR("A",6)="",DIR("A")=" Enter number (1, 2 or 3): ",DIR(0)="NA^1:3",DIR("?")="^D HELP^SROAUTLC" D ^DIR I $D(DTOUT)!$D(DUOUT) Q
29 S SREM=Y,$P(^SRF(DA,208),"^",12)=SREM+2 D NOW
30 Q
31YN N X K DIR S DIR("A",1)="",DIR("A",2)=" Is this emergency case a cardiac procedure requiring cardiopulmonary",DIR("A")=" bypass (Y/N)? ",DIR(0)="YA" D ^DIR I $D(DTOUT)!$D(DUOUT) S SRQ=1 Q
32 I 'Y S SRQ=1
33 Q
34HELP K SRHLP S SRHLP(1)="This is the category of emergency reflecting the patient's cardiovascular",SRHLP(2)="condition at the time of transport to the operating room:",SRHLP(3)=""
35 S SRHLP(4)="1. Emergent (ongoing ischemia) - Clinical condition mandates immediate",SRHLP(5)="surgery usually on day of catheterization because of ischemia despite"
36 S SRHLP(6)="medical therapy, such as intravenous nitroglycerine. Ischemia should",SRHLP(7)="be manifested as chest pain and/or ST-segment depression."
37 S SRHLP(8)="",SRHLP(9)="2. Emergent (hemodynamic compromise) - Persistent hypotension (arterial",SRHLP(10)="systolic pressure < 80 mm Hg) and/or low cardiac output (cardiac index"
38 S SRHLP(11)="< 2.0 L/min/MxM) despite iontropic and/or mechanical circulatory",SRHLP(12)="support mandates immediates surgery within hours of the cardiac",SRHLP(13)="catheterization."
39 S SRHLP(14)="",SRHLP(15)="3. Emergent (arrest with CPR) - Patient is taken to the operating room in",SRHLP(16)="full cardiac arrest with the circulation supported by cardiopulmonary"
40 S SRHLP(17)="resuscitation (excludes patients being adequately perfused by a",SRHLP(18)="cardiopulmonary support system).",SRHLP(19)=""
41 S SRHLP(20)="Enter the appropriate number to designate the category of emergency.",SRHLP(21)="",SRHLP(22)="" D EN^DDIOL(.SRHLP) K SRHLP
42 N DIR S DIR(0)="FOA",DIR("A")="Enter RETURN to continue: " D ^DIR I $D(DTOUT)!$D(DUOUT) S SRQ=1 Q
43 Q
44CHK ; check for missing cardiac assessment information
45 K SRX F SRC="CLIN","COC","CP","CLR" K DA,DIC,DIQ,DR,SRY S DIC="^SRF(",DA=SRTN,DIQ="SRY",DIQ(0)="I" D @SRC D EN^DIQ1 D ^SROAUTL4
46 Q
47CLIN S DR="236;237;475;203;347;209;348;510;223;290;219;239;225;292;349;350;240;351;205;352;485;265;264;267;207;353;354;355;463;474"
48 Q
49COC S DR="476;477;357;358;359;360;361;362.1;362.2;362.3;363;415;474;364;364.1;1.13;414;414.1;384;.22;.23;472;478;479;480"
50 Q
51CP S DR="365;366;464;465;416;367;368;369;370;371;372;505;450;451;373;376;380;377;381;378;382;379;468;469;.205;.232;470;471;418;419;440;481;512;483;502;513"
52 I $P($G(^SRF(SRTN,209)),"^",13)="Y"!($P($G(^SRF(SRTN,209)),"^",13)="") S DR=DR_";484"
53 Q
54CLR S DR="457;457.1;458;458.1;459;459.1;460;460.1;461;461.1;462;462.1;504;504.1"
55 Q
Note: See TracBrowser for help on using the repository browser.