source: WorldVistAEHR/trunk/r/CONTROLLED_SUBSTANCES-PSD/PSDORN0.m@ 1421

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

initial load of WorldVistAEHR

File size: 1002 bytes
RevLine 
[613]1PSDORN0 ;BIR/JPW,LTL-Nurse CS Order Request Entry (continued); 16 Feb 95
2 ;;3.0; CONTROLLED SUBSTANCES ;;13 Feb 97
3DIE ;create the order request
4 S:$G(ORD)<2 PSDEM=1
5 S:'$D(^PSD(58.8,NAOU,1,PSDR,3,0)) ^(0)="^58.800118A^^"
6 S PSDA=$P(^PSD(58.8,NAOU,1,PSDR,3,0),"^",3)+1 I $D(^PSD(58.8,NAOU,1,PSDR,3,PSDA)) S $P(^PSD(58.8,NAOU,1,PSDR,3,0),"^",3)=$P(^PSD(58.8,NAOU,1,PSDR,3,0),"^",3)+1 G DIE
7 K DA,DIC,DIE,DD,DR,DO S DIC(0)="L",(DIC,DIE)="^PSD(58.8,"_NAOU_",1,"_PSDR_",3,",DA(2)=NAOU,DA(1)=PSDR,(X,DINUM)=PSDA D FILE^DICN K DIC
8 D NOW^%DTC S PSDT=+$E(%,1,12) W ?10,!!,"processing now..."
9 I $G(PAT),$G(PSD(2)),$O(^PSD(58.81,PSD(2),2,0)),'$G(PSD(4)) S ^PSD(58.8,NAOU,1,PSDR,3,PSDA,1,0)=^PSD(58.81,PSD(2),2,0) D
10 .F WORD=0:0 S WORD=$O(^PSD(58.81,PSD(2),2,WORD)) Q:'WORD S ^PSD(58.8,NAOU,1,PSDR,3,PSDA,1,WORD,0)=^PSD(58.81,PSD(2),2,WORD,0)
11 S DA=PSDA,DA(1)=PSDR,DA(2)=NAOU,DR="1////"_PSDT_";2////"_+PSDS_";3////"_PSDUZ_";10////1;5////"_PSDQTY_";24////"_$G(PSDEM)_";13//"_$G(PSDR(1)) D ^DIE K DIE,DR,WORD
12 Q
Note: See TracBrowser for help on using the repository browser.