source: WorldVistAEHR/trunk/r/PHARMACY_DATA_MANAGEMENT-PSS/PSS50TMP.m@ 1556

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

initial load of WorldVistAEHR

File size: 4.5 KB
Line 
1PSS50TMP ;BIR/TSS - CONTINUATION OF API FOR INFORMATION FROM FILE 50; 5 Sep 03
2 ;;1.0;PHARMACY DATA MANAGEMENT;**112**;9/30/97;Build 30
3 ;Reference to ^PSNDF(50.68 is supported by DBIA 3735
4 ;Reference to ^PSNDF(50.6 is supported by DBIA 2079
5 ;Reference to ^PSNDF(50.605 is supported by DBIA 2138
6 ;Reference to ^PSNDF(50.606 is supported by DBIA 2174
7 ;Reference to ^PSNDF(50.3 is supported by DBIA 2612
8DIRREAD ; PERFORMS ALL NON-MULTIPLE DIRECT READING FOR PSS50DAT
9 N PSSZTMP
10 S ^TMP($J,LIST,PSSIEN2,.01)=$P($G(^PSDRUG(PSSIEN2,0)),U,1)
11 S ^TMP($J,LIST,PSSIEN2,2)=$P($G(^PSDRUG(PSSIEN2,0)),U,2)
12 I $P($G(^PSDRUG(PSSIEN2,2)),U,1)'="" D
13 .S ^TMP($J,LIST,PSSIEN2,2.1)=$P($G(^PSDRUG(PSSIEN2,2)),U,1)_U_$P($G(^PS(50.7,$P($G(^PSDRUG(PSSIEN2,2)),U,1),0)),U,1)_U_$P($G(^PS(50.7,$P($G(^PSDRUG(PSSIEN2,2)),U,1),0)),U,2)
14 .S ^TMP($J,LIST,PSSIEN2,2.1)=^TMP($J,LIST,PSSIEN2,2.1)_U_$P($G(^PS(50.606,$P($G(^PS(50.7,$P($G(^PSDRUG(PSSIEN2,2)),U,1),0)),U,2),0)),U,1)
15 ELSE S ^TMP($J,LIST,PSSIEN2,2.1)=""
16 S PSSZTMP=$G(^PSDRUG(PSSIEN2,0))
17 S ^TMP($J,LIST,PSSIEN2,3)=$P($G(PSSZTMP),U,3)
18 S ^TMP($J,LIST,PSSIEN2,4)=$P($G(PSSZTMP),U,4)
19 S ^TMP($J,LIST,PSSIEN2,5)=$P($G(PSSZTMP),U,5)
20 S ^TMP($J,LIST,PSSIEN2,6)=$P($G(PSSZTMP),U,6)
21 S ^TMP($J,LIST,PSSIEN2,8)=$P($G(PSSZTMP),U,8)
22 I $P($G(^PSDRUG(PSSIEN2,660)),U,2)'="" D
23 . S ^TMP($J,LIST,PSSIEN2,12)=$P($G(^PSDRUG(PSSIEN2,660)),U,2)_U_$P($G(^DIC(51.5,$P($G(^PSDRUG(PSSIEN2,660)),U,2),0)),U,1)_U_$P($G(^DIC(51.5,$P($G(^PSDRUG(PSSIEN2,660)),U,2),0)),U,2)
24 ELSE S ^TMP($J,LIST,PSSIEN2,12)=""
25 S PSSZTMP=$G(^PSDRUG(PSSIEN2,660))
26 S ^TMP($J,LIST,PSSIEN2,13)=$P($G(PSSZTMP),U,3)
27 S ^TMP($J,LIST,PSSIEN2,14.5)=$P($G(PSSZTMP),U,8)
28 S ^TMP($J,LIST,PSSIEN2,15)=$P($G(PSSZTMP),U,5)
29 S ^TMP($J,LIST,PSSIEN2,16)=$P($G(PSSZTMP),U,6)
30 S ^TMP($J,LIST,PSSIEN2,21)=$P($G(PSSZTMP),U,2)
31 I $P($G(^PSDRUG(PSSIEN2,"ND")),U,1)'="" D
32 .S ^TMP($J,LIST,PSSIEN2,20)=$P($G(^PSDRUG(PSSIEN2,"ND")),U,1)_U_$P($G(^PSNDF(50.6,$P($G(^PSDRUG(PSSIEN2,"ND")),U,1),0)),U,1)
33 ELSE S ^TMP($J,LIST,PSSIEN2,20)=""
34 I $P($G(^PSDRUG(PSSIEN2,"ND")),U,3)'="" D
35 .S ^TMP($J,LIST,PSSIEN2,22)=$P($G(^PSDRUG(PSSIEN2,"ND")),U,3)_U_$P($G(^PSNDF(50.68,$P($G(^PSDRUG(PSSIEN2,"ND")),U,3),0)),U,1)
36 ELSE S ^TMP($J,LIST,PSSIEN2,22)=""
37 I $P($G(^PSDRUG(PSSIEN2,"ND")),U,6)'="" D
38 . S ^TMP($J,LIST,PSSIEN2,25)=$P($G(^PSDRUG(PSSIEN2,"ND")),U,6)_U_$P($G(^PS(50.605,$P($G(^PSDRUG(PSSIEN2,"ND")),U,6),0)),U,1)_U_$P($G(^PS(50.605,$P($G(^PSDRUG(PSSIEN2,"ND")),U,6),0)),U,2)
39 ELSE S ^TMP($J,LIST,PSSIEN2,25)=""
40 S ^TMP($J,LIST,PSSIEN2,27)=$P($G(^PSDRUG(PSSIEN2,"ND")),U,10)
41 S ^TMP($J,LIST,PSSIEN2,31)=$P($G(^PSDRUG(PSSIEN2,2)),U,4)
42 S ^TMP($J,LIST,PSSIEN2,40)=$P($G(^PSDRUG(PSSIEN2,"PSO")),U,1)
43 I $P($G(^PSDRUG(PSSIEN2,0)),U,9) D
44 .S ^TMP($J,LIST,PSSIEN2,51)=$P($G(^PSDRUG(PSSIEN2,0)),U,9)
45 .I ^TMP($J,LIST,PSSIEN2,51)="1" S ^TMP($J,LIST,PSSIEN2,51)=^TMP($J,LIST,PSSIEN2,51)_U_"N/F" Q
46 .I ^TMP($J,LIST,PSSIEN2,51)="" S ^TMP($J,LIST,PSSIEN2,51)=^TMP($J,LIST,PSSIEN2,51)_U Q
47 ELSE S ^TMP($J,LIST,PSSIEN2,51)=""
48 I $P($G(^PSDRUG(PSSIEN2,0)),U,11) D
49 .S ^TMP($J,LIST,PSSIEN2,52)=$P($G(^PSDRUG(PSSIEN2,0)),U,11)
50 .I ^TMP($J,LIST,PSSIEN2,52)="1" S ^TMP($J,LIST,PSSIEN2,52)=^TMP($J,LIST,PSSIEN2,52)_U_"V-N/F" Q
51 .I ^TMP($J,LIST,PSSIEN2,52)="" S ^TMP($J,LIST,PSSIEN2,52)=^TMP($J,LIST,PSSIEN2,52)_U Q
52 ELSE S ^TMP($J,LIST,PSSIEN2,52)=""
53 S ^TMP($J,LIST,PSSIEN2,63)=$P($G(^PSDRUG(PSSIEN2,2)),U,3)
54 I $P($G(^PSDRUG(PSSIEN2,2)),U,6)'="" D
55 .S ^TMP($J,LIST,PSSIEN2,64)=$P($G(^PSDRUG(PSSIEN2,2)),U,6)_U_$P($G(^PS(50.3,$P($G(^PSDRUG(PSSIEN2,2)),U,6),0)),U,1)
56 ELSE S ^TMP($J,LIST,PSSIEN2,64)=""
57 I $P($G(^PSDRUG(PSSIEN2,"I")),U,1) D
58 .N Y S Y=$P($G(^PSDRUG(PSSIEN2,"I")),U,1) X ^DD("DD")
59 .S ^TMP($J,LIST,PSSIEN2,100)=$P($G(^PSDRUG(PSSIEN2,"I")),U,1)_U_$G(Y)
60 ELSE S ^TMP($J,LIST,PSSIEN2,100)=""
61 S ^TMP($J,LIST,PSSIEN2,101)=$P($G(^PSDRUG(PSSIEN2,0)),U,10)
62 S ^TMP($J,LIST,PSSIEN2,102)=$P($G(^PSDRUG(PSSIEN2,2)),U,2)
63 I $P($G(^PSDRUG(PSSIEN2,"PSG")),U,2) D
64 .S ^TMP($J,LIST,PSSIEN2,301)=$P($G(^PSDRUG(PSSIEN2,"PSG")),U,2)
65 .S PSSZTMP=^TMP($J,LIST,PSSIEN2,301)
66 .I ^TMP($J,LIST,PSSIEN2,301)="0" S ^TMP($J,LIST,PSSIEN2,301)=PSSZTMP_U_"Field 03 or 04 - Doses by Type" Q
67 .I ^TMP($J,LIST,PSSIEN2,301)="1" S ^TMP($J,LIST,PSSIEN2,301)=PSSZTMP_U_"Field 06 or 07 - Units of Issue" Q
68 .I ^TMP($J,LIST,PSSIEN2,301)="2" S ^TMP($J,LIST,PSSIEN2,301)=PSSZTMP_U_"Field 17 - Fluids and Admin Sets" Q
69 .I ^TMP($J,LIST,PSSIEN2,301)="3" S ^TMP($J,LIST,PSSIEN2,301)=PSSZTMP_U_"Field 22 - Blood Products" Q
70 ELSE S ^TMP($J,LIST,PSSIEN2,301)=""
71 S ^TMP($J,LIST,PSSIEN2,302)=$P($G(^PSDRUG(PSSIEN2,"PSG")),U,3)
72 S ^TMP($J,LIST,PSSIEN2,400)=$P($G(^PSDRUG(PSSIEN2,"PFS")),U,1)
73 Q
Note: See TracBrowser for help on using the repository browser.