source:
FOIAVistA/trunk/r/ZZOTHER/MUSMCR3.m@
1397
Last change on this file since 1397 was 628, checked in by , 15 years ago | |
---|---|
File size: 426 bytes |
Line | |
---|---|
1 | MUSMCR3 ;ROSE'S DRUG SEARCH |
2 | Q |
3 | BEG ; |
4 | S NAME=$P(^DPT(DFN,0),"^",1) |
5 | S DPT01=$P(^DPT(DFN,0),U),DPT01=$P(DPT01,",",2)_" _$P(DPT01,",",1) |
6 | S ADD=$S($D(^DPT(DFN,.11)):^(.11),1:"") |
7 | S AD1=$P(ADD,U,1),AD2=$P(ADD,U,2),CTY=$P(ADD,U,4) |
8 | S SN=$P(ADD,U,5),ZIP=$P(ADD,U,6) |
9 | S ST=$S($D(^DIC(5,+SN,0)):$P(^(0), U,2),1:SN) |
10 | W !?5,DPT01 |
11 | W !?5,AD1 |
12 | I AD2]"" W !?5,AD2 W !?5,CTY," ",ST," ",ZIP |
13 | I "Pp"[$E(LET,1) W !?5,^MUSMCRM(D) |
14 | W @IOF Q |
Note:
See TracBrowser
for help on using the repository browser.