source: FOIAVistA/trunk/r/PHARMACY_BENEFITS_MANAGEMENT-PSU/PSUOPAM.m@ 767

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

initial load of FOIAVistA 6/30/08 version

File size: 2.6 KB
Line 
1PSUOPAM ;BIR/DAM - PSU PBM Outpatient AMIS Pharmacy Data Collection; March 2004 ; 1/11/08 11:46am
2 ;;4.0;PHARMACY BENEFITS MANAGEMENT;**13**;MARCH, 2005;Build 3
3 ;
4 ;DBIA's
5 ;Reference to File (#52) supported by DBIA 1878
6 ;
7EN ;entry point to gather additional AMIS data. Called from PSUOP2
8 ;
9 K PSUAM ;Array to hold single dose Medication Instructions
10 K PSUAMMD ;Array to hold multidose medication instructions
11 K PSUMDFLG ;Multidose flag
12 S (PSUPI,PSUCO,PSUEXP,PSUAM,PSUDSG,PSUDIPU,PSUNITS,PSUNOUN)=""
13 S (PSUDUR,PSUCONJ,PSUROUT,PSUSCHED,PSUVERB)=""
14 D CO
15 D EXP
16 D DOSG
17 Q
18 ;
19 ;
20CO ;Copay status: found in file (#52), field (#105)
21 ;
22 ;PSU*4*13 Corrected to show the COPAY.
23 S PSUCO=$P($G(^TMP("PSOR",$J,PSURXIEN,"IB")),U,1)
24 I $G(PSUCO) S PSUCOPAY="Y"
25 I '$G(PSUCO) S PSUCOPAY="N"
26 Q
27 ;
28EXP ;Expanded instructions: found in file (#52), multiple (#113),
29 ;sub-field (#.01)
30 ;
31 S PSUD1=0
32 F S PSUD1=$O(^TMP("PSOR",$J,PSURXIEN,"PI",PSUD1)) Q:PSUD1="" D
33 .I PSUD1=1 S PSUEXP=$E(^TMP("PSOR",$J,PSURXIEN,"PI",PSUD1,0),1,80) D
34 ..S PSUPI=$G(PSUEXP)
35 .I (PSUD1'=1),($L(PSUEXP)<80) D
36 ..S PSUEXP=$E(PSUEXP_" "_^TMP("PSOR",$J,PSURXIEN,"PI",PSUD1,0),1,80)
37 ..S PSUPI=$G(PSUEXP)
38 ;
39 Q
40 ;
41DOSG ;Dosage data: found in file (#52), multiple (#113). There are
42 ;nine sub-fields to be pulled: #.01 through #8
43 ;
44 S PSUD1=0
45 F S PSUD1=$O(^TMP("PSOR",$J,PSURXIEN,"MI",PSUD1)) Q:PSUD1="" D
46 .I PSUD1'=1 S PSUMDFLG="M" ;Multidose flag
47 .I PSUD1=1 D ;Single dose/first Multidose data
48 ..S PSUAM=^TMP("PSOR",$J,PSURXIEN,"MI",PSUD1,0)
49 ..S PSUDSG=$P(PSUAM,U,1) ;Dosage Ordered
50 ..S PSUDISPU=$P(PSUAM,U,2) ;Dispense Units per Dose
51 ..S PSUNITS=$P($P(PSUAM,U,3),";",2) ;Units
52 ..S PSUNOUN=$P(PSUAM,U,4) ;Noun
53 ..S PSUDUR=$P(PSUAM,U,5) ;Duration
54 ..S PSUCONJ=$P(PSUAM,U,6) ;Conjunction
55 ..S PSUROUT=$P($P(PSUAM,U,7),";",2) ;Route
56 ..S PSUSCHED=$P(PSUAM,U,8) ;Schedule
57 ..S PSUVERB=$P(PSUAM,U,9) ;Verb
58 ;
59 Q
60 ;
61MULTI ;Set variables for Multidose Medication Instructions
62 ;Called from PSUOP3
63 ;
64 S (PSUDSGMD,PSUDSPMD,PSUNITMD,PSUNMD)=""
65 S (PSURTMD,PSUSCHMD,PSUVRBMD)=""
66 ;
67 S PSUDSGMD=$P(PSUAMMD,U,1) ;Dosage Ordered
68 S PSUDSPMD=$P(PSUAMMD,U,2) ;Dispense Units per Dose
69 S PSUNITMD=$P($P(PSUAMMD,U,3),";",2) ;Units
70 S PSUNMD=$P(PSUAMMD,U,4) ;Noun
71 S PSUDURMD=$P(PSUAMMD,U,5) ;Duration
72 S PSUCONMD=$P(PSUAMMD,U,6) ;Conjunction
73 S PSURTMD=$P($P(PSUAMMD,U,7),";",2) ;Route
74 S PSUSCHMD=$P(PSUAMMD,U,8) ;Schedule
75 S PSUVRBMD=$P(PSUAMMD,U,9) ;Verb
76 ;
77 Q
Note: See TracBrowser for help on using the repository browser.