source: FOIAVistA/trunk/r/INPATIENT_MEDICATIONS-PSJ-PSIV-PSG--PSGW/PSJDGAL.m@ 1754

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

initial load of FOIAVistA 6/30/08 version

File size: 1.4 KB
Line 
1PSJDGAL ;BIR/LC-DRUG/ALLERGY REACTION CHECKING ;21 AUG 97 / 8:51 AM
2 ;;5.0; INPATIENT MEDICATIONS ;;16 DEC 97
3CHK(DFN,TYP,PTR) ;
4 N APTR
5 K ^TMP("PSJDAI",$J) S PSJACK=$$ORCHK^GMRAOR(DFN,TYP,PTR) D:$G(PSJACK)=1
6 .;Q:$D(^XUSEC("PSJRPH",DUZ))
7 .S ^TMP("PSJDAI",$J,0)=1
8 .S I=0 F S I=$O(GMRAING(I)) Q:'I S ^TMP("PSJDAI",$J,I,0)=GMRAING(I)
9 D:$G(PSJACK)=1 DSPLY
10 K PSJACK,GMRAING,I
11 Q
12CHK1(DFN) ;
13 K ^TMP("PSJDAI",$J)
14 S GMRA="0^0^001" D EN1^GMRADPT F LP=0:0 S LP=$O(GMRAL(LP)) Q:'LP!($G(PSJACK)) D
15 .S:'$D(PSJACK) APTR=$P(^GMR(120.8,LP,0),"^",3)
16 .I $P(APTR,";",2)="PSDRUG(",$P(APTR,";")=PSJDRUG("IEN") S PSJACK=1
17 .;Q:$D(^XUSEC("PSJRPH",DUZ))
18 .S ^TMP("PSODAI",$J,0)=1
19 D:$G(PSJACK)=1 DSPLY
20 K GMRA,GMRAL,LP,PSOACK
21 Q
22DSPLY ;
23 W $C(7),!,"A Drug-Allergy Reaction exists for this medication!",!
24 ;I $D(^XUSEC("PSJRPH",DUZ)) D
25 D
26 .W $C(7),!,"***SIGNIFICANT*** Allergy Reaction"
27 .W !,"Drug: "_PSJDRUG("NAME") I $O(GMRAING(0)) W !,?6,"Ingredients: "
28 .S DIR("?",1)="Answer 'YES' if you DO want to enter a reaction for this medication,"
29 .S DIR("?")=" 'NO' if you DON'T want to enter a reaction for this medication,"
30 .W ?19 S I=0 F S I=$O(GMRAING(I)) Q:'I W:$X+$L($G(GMRAING(I)))+2>IOM !?19 W $G(GMRAING(I))_", "
31 .S DIR(0)="SA^1:YES;0:NO",DIR("A")="Do you want to Intervene? ",DIR("B")="Y" W ! D ^DIR
32 .I 'Y K DIR,DTOUT,DIRUT,DIROUT,DUOUT,Y Q
33 .I Y D ^PSJRXI
34 K DIR,DTOUT,DIRUT,DIROUT,DUOUT,Y
35 Q
Note: See TracBrowser for help on using the repository browser.