source: WorldVistAEHR/trunk/r/SURGERY-SR/SROCODE.m@ 1582

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

revised back to 6/30/08 version

File size: 1.9 KB
Line 
1SROCODE ;B'HAM ISC/MAM - SET UP FLAG FOR ANESTHESIA AGENTS ; [ 05/06/98 7:14 AM ]
2 ;;3.0; Surgery ;**72,41,114,151**;24 Jun 93
3 ;
4 ; Reference to ENS^PSSGIU supported by DBIA #895
5 ; Reference to ^PSS50 supported by DBIA #4533
6 ;
71 W !! K DIR S DIR(0)="P^50:QEAM",DIR("A")="Enter the name of the drug you wish to flag" D ^DIR G:Y<1 DONE S SROIUDA=+Y,SROIRX=$P(Y,"^",2),SROIUX="S^SURGERY" D SROIU
8 G 1
9SROIU Q:'$D(SROIUDA)!'$D(SROIUX) Q:SROIUX'?1E1"^"1.E
10 N SRRX D DATA^PSS50(SROIUDA,,,,,"SRRX") S SRRX=$G(^TMP($J,"SRRX",SROIUDA,63)) D
11 .S SROIUY=$S($D(SRRX):SRRX,1:""),SROIUT=$P(SROIUX,"^",2),SROIUT=$E("N","AEIOU"[$E(SROIUT))_" "_SROIUT K ^TMP($J,"SRRX",SROIUDA)
12 I SROIUY["S" W !!,"This drug is already flagged for SURGERY." K DIR S DIR("A")="Do you want to remove the flag (Y/N)",DIR(0)="Y" D ^DIR D:Y OFF D DONE Q
13 W !! K DIR S DIR("A")="Do you want to flag this drug for SURGERY (Y/N)",DIR(0)="Y" D ^DIR D:Y FLAG
14DONE W @IOF K SROIRX D ^SRSKILL
15 Q
16FLAG S PSIUDA=SROIUDA,PSIUX=SROIUX_"^1"
17 S X="PSSGIU" X ^%ZOSF("TEST") I $T D ENS^PSSGIU
18 ;HL7 master file update (addition) to anesthesia agent list
19 N SRTBL,SRENT,FEC,REC S SRTBL="ANESTHESIA AGENT^50^.01",FEC="UPD",REC="MAD",SRENT=SROIUDA_U_SROIRX D MSG^SRHLMFN(SRTBL,FEC,REC,SRENT)
20 ;A call to PDM to possibly generate an HL7 outgoing drug message
21 S X="PSSHUIDG" X ^%ZOSF("TEST") I $T D DRG^PSSHUIDG(PSIUDA)
22 K PSIUDA,PSIUX
23 Q
24OFF S PSIUDA=SROIUDA,PSIUX=SROIUX_"^1"
25 S X="PSSGIU" X ^%ZOSF("TEST") I $T D END^PSSGIU
26 ;HL7 master file update (deletion) to anesthesia agent list
27 N SRTBL,SRENT,FEC,REC S SRTBL="ANESTHESIA AGENT^50^.01",FEC="UPD",REC="MDL" D DATA^PSS50(SROIUDA,,,,,"SRRX")
28 S SRENT=SROIUDA_U_$P($G(^TMP($J,"SRRX",SROIUDA,.01)),"^") K ^TMP($J,"SRRX",SROIUDA) D MSG^SRHLMFN(SRTBL,FEC,REC,SRENT)
29 ;A call to PDM to possibly generate an HL7 outgoing drug message
30 S X="PSSHUIDG" X ^%ZOSF("TEST") I $T D DRG^PSSHUIDG(PSIUDA)
31 K PSIUDA,PSIUX
32 Q
Note: See TracBrowser for help on using the repository browser.