[613] | 1 | PSJORDA ;BIR/LC BUILD DETAILED ALLERGY LIST- ;16 DEC 97 / 1:42 PM
|
---|
| 2 | ;;5.0; INPATIENT MEDICATIONS ;;16 DEC 97
|
---|
| 3 | BEG ;
|
---|
| 4 | NEW PSJINPT S PSJINPT=1 D BEG^PSOORDA(DFN)
|
---|
| 5 | Q
|
---|
| 6 | SEL ;select allergy for detail display
|
---|
| 7 | N ORD,ORN,IEN,VALMCNT I '$G(PSJALL) S VALMSG="This patient has no Allergies!" S VALMBCK="" Q
|
---|
| 8 | K DIR,DUOUT,DIRUT S DIR("A")="Select Allergies by number",DIR(0)="LO^1:"_PSJALL D ^DIR I $D(DTOUT)!($D(DUOUT)) K DIR,DIRUT,DTOUT,DUOUT S VALMBCK="" Q
|
---|
| 9 | K DIR,DIRUT,DTOUT,DTOUT I +Y D FULL^VALM1 S ALST=Y D
|
---|
| 10 | .F ORD=1:1:$L(ALST,",") Q:$P(ALST,",",ORD)']"" S ORN=$P(ALST,",",ORD) D DSPLY
|
---|
| 11 | E S VALMBCK=""
|
---|
| 12 | K ALST
|
---|
| 13 | Q
|
---|
| 14 | DSPLY ;build detailed allergy display
|
---|
| 15 | NEW PSJINPT S PSJINPT=1 D DSPLY^PSOORDA(DFN),EN^PSJLMAL
|
---|
| 16 | Q
|
---|
| 17 | EXT K AGNL,CG,CLS,CPT,IG,ING,IPT,NB,OD,ODT,OG,ORC,ORT,SG,SNM,SYM,Y
|
---|
| 18 | Q
|
---|
| 19 | NEWSEL ;
|
---|
| 20 | N ORD,ORN,IEN,VALMCNT I '$G(PSJALL) S VALMSG="This patient has no Allergies!" S VALMBCK="" Q
|
---|
| 21 | S ALST=$P(XQORNOD(0),"=",2)
|
---|
| 22 | I '$O(AGN(0)) S VALMQUIT=1 Q
|
---|
| 23 | I $D(ALST) D FULL^VALM1 D
|
---|
| 24 | .F ORD=1:1:$L(ALST,",") Q:$P(ALST,",",ORD)']"" S ORN=$P(ALST,",",ORD) D DSPLY
|
---|
| 25 | E S VALMBCK=""
|
---|
| 26 | K ALST
|
---|
| 27 | G EXT
|
---|
| 28 | Q
|
---|