74 lines
4.5 KiB
Mathematica
74 lines
4.5 KiB
Mathematica
|
PSS50TMP ;BIR/TSS - CONTINUATION OF API FOR INFORMATION FROM FILE 50; 5 Sep 03
|
||
|
;;1.0;PHARMACY DATA MANAGEMENT;**112**;9/30/97;Build 30
|
||
|
;Reference to ^PSNDF(50.68 is supported by DBIA 3735
|
||
|
;Reference to ^PSNDF(50.6 is supported by DBIA 2079
|
||
|
;Reference to ^PSNDF(50.605 is supported by DBIA 2138
|
||
|
;Reference to ^PSNDF(50.606 is supported by DBIA 2174
|
||
|
;Reference to ^PSNDF(50.3 is supported by DBIA 2612
|
||
|
DIRREAD ; PERFORMS ALL NON-MULTIPLE DIRECT READING FOR PSS50DAT
|
||
|
N PSSZTMP
|
||
|
S ^TMP($J,LIST,PSSIEN2,.01)=$P($G(^PSDRUG(PSSIEN2,0)),U,1)
|
||
|
S ^TMP($J,LIST,PSSIEN2,2)=$P($G(^PSDRUG(PSSIEN2,0)),U,2)
|
||
|
I $P($G(^PSDRUG(PSSIEN2,2)),U,1)'="" D
|
||
|
.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)
|
||
|
.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)
|
||
|
ELSE S ^TMP($J,LIST,PSSIEN2,2.1)=""
|
||
|
S PSSZTMP=$G(^PSDRUG(PSSIEN2,0))
|
||
|
S ^TMP($J,LIST,PSSIEN2,3)=$P($G(PSSZTMP),U,3)
|
||
|
S ^TMP($J,LIST,PSSIEN2,4)=$P($G(PSSZTMP),U,4)
|
||
|
S ^TMP($J,LIST,PSSIEN2,5)=$P($G(PSSZTMP),U,5)
|
||
|
S ^TMP($J,LIST,PSSIEN2,6)=$P($G(PSSZTMP),U,6)
|
||
|
S ^TMP($J,LIST,PSSIEN2,8)=$P($G(PSSZTMP),U,8)
|
||
|
I $P($G(^PSDRUG(PSSIEN2,660)),U,2)'="" D
|
||
|
. 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)
|
||
|
ELSE S ^TMP($J,LIST,PSSIEN2,12)=""
|
||
|
S PSSZTMP=$G(^PSDRUG(PSSIEN2,660))
|
||
|
S ^TMP($J,LIST,PSSIEN2,13)=$P($G(PSSZTMP),U,3)
|
||
|
S ^TMP($J,LIST,PSSIEN2,14.5)=$P($G(PSSZTMP),U,8)
|
||
|
S ^TMP($J,LIST,PSSIEN2,15)=$P($G(PSSZTMP),U,5)
|
||
|
S ^TMP($J,LIST,PSSIEN2,16)=$P($G(PSSZTMP),U,6)
|
||
|
S ^TMP($J,LIST,PSSIEN2,21)=$P($G(PSSZTMP),U,2)
|
||
|
I $P($G(^PSDRUG(PSSIEN2,"ND")),U,1)'="" D
|
||
|
.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)
|
||
|
ELSE S ^TMP($J,LIST,PSSIEN2,20)=""
|
||
|
I $P($G(^PSDRUG(PSSIEN2,"ND")),U,3)'="" D
|
||
|
.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)
|
||
|
ELSE S ^TMP($J,LIST,PSSIEN2,22)=""
|
||
|
I $P($G(^PSDRUG(PSSIEN2,"ND")),U,6)'="" D
|
||
|
. 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)
|
||
|
ELSE S ^TMP($J,LIST,PSSIEN2,25)=""
|
||
|
S ^TMP($J,LIST,PSSIEN2,27)=$P($G(^PSDRUG(PSSIEN2,"ND")),U,10)
|
||
|
S ^TMP($J,LIST,PSSIEN2,31)=$P($G(^PSDRUG(PSSIEN2,2)),U,4)
|
||
|
S ^TMP($J,LIST,PSSIEN2,40)=$P($G(^PSDRUG(PSSIEN2,"PSO")),U,1)
|
||
|
I $P($G(^PSDRUG(PSSIEN2,0)),U,9) D
|
||
|
.S ^TMP($J,LIST,PSSIEN2,51)=$P($G(^PSDRUG(PSSIEN2,0)),U,9)
|
||
|
.I ^TMP($J,LIST,PSSIEN2,51)="1" S ^TMP($J,LIST,PSSIEN2,51)=^TMP($J,LIST,PSSIEN2,51)_U_"N/F" Q
|
||
|
.I ^TMP($J,LIST,PSSIEN2,51)="" S ^TMP($J,LIST,PSSIEN2,51)=^TMP($J,LIST,PSSIEN2,51)_U Q
|
||
|
ELSE S ^TMP($J,LIST,PSSIEN2,51)=""
|
||
|
I $P($G(^PSDRUG(PSSIEN2,0)),U,11) D
|
||
|
.S ^TMP($J,LIST,PSSIEN2,52)=$P($G(^PSDRUG(PSSIEN2,0)),U,11)
|
||
|
.I ^TMP($J,LIST,PSSIEN2,52)="1" S ^TMP($J,LIST,PSSIEN2,52)=^TMP($J,LIST,PSSIEN2,52)_U_"V-N/F" Q
|
||
|
.I ^TMP($J,LIST,PSSIEN2,52)="" S ^TMP($J,LIST,PSSIEN2,52)=^TMP($J,LIST,PSSIEN2,52)_U Q
|
||
|
ELSE S ^TMP($J,LIST,PSSIEN2,52)=""
|
||
|
S ^TMP($J,LIST,PSSIEN2,63)=$P($G(^PSDRUG(PSSIEN2,2)),U,3)
|
||
|
I $P($G(^PSDRUG(PSSIEN2,2)),U,6)'="" D
|
||
|
.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)
|
||
|
ELSE S ^TMP($J,LIST,PSSIEN2,64)=""
|
||
|
I $P($G(^PSDRUG(PSSIEN2,"I")),U,1) D
|
||
|
.N Y S Y=$P($G(^PSDRUG(PSSIEN2,"I")),U,1) X ^DD("DD")
|
||
|
.S ^TMP($J,LIST,PSSIEN2,100)=$P($G(^PSDRUG(PSSIEN2,"I")),U,1)_U_$G(Y)
|
||
|
ELSE S ^TMP($J,LIST,PSSIEN2,100)=""
|
||
|
S ^TMP($J,LIST,PSSIEN2,101)=$P($G(^PSDRUG(PSSIEN2,0)),U,10)
|
||
|
S ^TMP($J,LIST,PSSIEN2,102)=$P($G(^PSDRUG(PSSIEN2,2)),U,2)
|
||
|
I $P($G(^PSDRUG(PSSIEN2,"PSG")),U,2) D
|
||
|
.S ^TMP($J,LIST,PSSIEN2,301)=$P($G(^PSDRUG(PSSIEN2,"PSG")),U,2)
|
||
|
.S PSSZTMP=^TMP($J,LIST,PSSIEN2,301)
|
||
|
.I ^TMP($J,LIST,PSSIEN2,301)="0" S ^TMP($J,LIST,PSSIEN2,301)=PSSZTMP_U_"Field 03 or 04 - Doses by Type" Q
|
||
|
.I ^TMP($J,LIST,PSSIEN2,301)="1" S ^TMP($J,LIST,PSSIEN2,301)=PSSZTMP_U_"Field 06 or 07 - Units of Issue" Q
|
||
|
.I ^TMP($J,LIST,PSSIEN2,301)="2" S ^TMP($J,LIST,PSSIEN2,301)=PSSZTMP_U_"Field 17 - Fluids and Admin Sets" Q
|
||
|
.I ^TMP($J,LIST,PSSIEN2,301)="3" S ^TMP($J,LIST,PSSIEN2,301)=PSSZTMP_U_"Field 22 - Blood Products" Q
|
||
|
ELSE S ^TMP($J,LIST,PSSIEN2,301)=""
|
||
|
S ^TMP($J,LIST,PSSIEN2,302)=$P($G(^PSDRUG(PSSIEN2,"PSG")),U,3)
|
||
|
S ^TMP($J,LIST,PSSIEN2,400)=$P($G(^PSDRUG(PSSIEN2,"PFS")),U,1)
|
||
|
Q
|