1 | PSNPPIP1 ;BIR/WRT-print a medication instruction sheet Part 2 ; 01/17/03 12:32
|
---|
2 | ;;4.0; NATIONAL DRUG FILE;**62**; 30 Oct 98
|
---|
3 | ; Reference to ^PS(59.7 supported by IA #2613
|
---|
4 | ; Reference to ^PSDRUG supported by IA #221
|
---|
5 | ;
|
---|
6 | BRANDNM ;Common Brand name of the drug the user wants a PMI sheet for
|
---|
7 | ;
|
---|
8 | S PSNBND=""
|
---|
9 | I $D(^PS(PSNFILE2,+PSNENG,"C")) D NAMES,SPACE
|
---|
10 | Q
|
---|
11 | NAMES S ^TMP($J,"W",CNTO)=PSNSP S CNTO=CNTO+1 ;Insert blank line
|
---|
12 | F J=0:0 S J=$O(^PS(PSNFILE2,+PSNENG,"C",J)) Q:'J D LOOP
|
---|
13 | Q
|
---|
14 | LOOP S PSNBND=^PS(PSNFILE2,+PSNENG,"C",J,0)
|
---|
15 | I PSNBND[":" D BREAK
|
---|
16 | I PSNBND'[":" D BREAK1
|
---|
17 | Q
|
---|
18 | SPACE I $D(^PS(PSNFILE2,+PSNENG,"C")) S ^TMP($J,"W",CNTO)=PSNSP S CNTO=CNTO+1 ; Insert Blank Line
|
---|
19 | Q
|
---|
20 | BREAK S ^TMP($J,"W",CNTO)=$G(IOINHI)_$P(PSNBND,":")_$G(IOINORM)_": "_$G(IOINORM)_$P(PSNBND,":",2) S CNTO=CNTO+1
|
---|
21 | Q
|
---|
22 | BREAK1 S ^TMP($J,"W",CNTO)=$G(IOINORM)_$P(PSNBND,":",1) S CNTO=CNTO+1
|
---|
23 | Q
|
---|
24 | ONELN I $P($G(^PS(PSNFILE2,+PSNENG,PSNALPHA,0)),"^",3)=1 S PSNLAST=$P(^PS(PSNFILE2,+PSNENG,PSNALPHA,0),"^",3),LINE=^PS(PSNFILE2,+PSNENG,PSNALPHA,J,0) D BRKIT
|
---|
25 | Q
|
---|
26 | BRKIT S ^TMP($J,"W",CNTO)=" "_$G(IOINHI)_$P(LINE,":")_$G(IOINORM)_":"_$G(IOINORM)_$P(LINE,":",2),CNTO=CNTO+1 Q
|
---|