source: WorldVistAEHR/trunk/r/NATIONAL_DRUG_FILE-PSN/PSNPPIP1.m@ 975

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

initial load of WorldVistAEHR

File size: 1.1 KB
Line 
1PSNPPIP1 ;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 ;
6BRANDNM ;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
11NAMES 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
14LOOP S PSNBND=^PS(PSNFILE2,+PSNENG,"C",J,0)
15 I PSNBND[":" D BREAK
16 I PSNBND'[":" D BREAK1
17 Q
18SPACE I $D(^PS(PSNFILE2,+PSNENG,"C")) S ^TMP($J,"W",CNTO)=PSNSP S CNTO=CNTO+1 ; Insert Blank Line
19 Q
20BREAK S ^TMP($J,"W",CNTO)=$G(IOINHI)_$P(PSNBND,":")_$G(IOINORM)_": "_$G(IOINORM)_$P(PSNBND,":",2) S CNTO=CNTO+1
21 Q
22BREAK1 S ^TMP($J,"W",CNTO)=$G(IOINORM)_$P(PSNBND,":",1) S CNTO=CNTO+1
23 Q
24ONELN 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
26BRKIT S ^TMP($J,"W",CNTO)=" "_$G(IOINHI)_$P(LINE,":")_$G(IOINORM)_":"_$G(IOINORM)_$P(LINE,":",2),CNTO=CNTO+1 Q
Note: See TracBrowser for help on using the repository browser.