source: WorldVistAEHR/trunk/r/PHARMACY_BENEFITS_MANAGEMENT-PSU/PSUOPAM.m@ 701

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

revised back to 6/30/08 version

File size: 2.5 KB
RevLine 
[623]1PSUOPAM ;BIR/DAM - PSU PBM Outpatient AMIS Pharmacy Data Collection; March 2004
2 ;;4.0;PHARMACY BENEFITS MANAGEMENT;;MARCH, 2005
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 S PSUCO=$P($G(^TMP("PSOR",$J,PSURXIEN,"IB",0)),U,1)
23 I $G(PSUCO) S PSUCOPAY="Y"
24 I '$G(PSUCO) S PSUCOPAY="N"
25 Q
26 ;
27EXP ;Expanded instructions: found in file (#52), multiple (#113),
28 ;sub-field (#.01)
29 ;
30 S PSUD1=0
31 F S PSUD1=$O(^TMP("PSOR",$J,PSURXIEN,"PI",PSUD1)) Q:PSUD1="" D
32 .I PSUD1=1 S PSUEXP=$E(^TMP("PSOR",$J,PSURXIEN,"PI",PSUD1,0),1,80) D
33 ..S PSUPI=$G(PSUEXP)
34 .I (PSUD1'=1),($L(PSUEXP)<80) D
35 ..S PSUEXP=$E(PSUEXP_" "_^TMP("PSOR",$J,PSURXIEN,"PI",PSUD1,0),1,80)
36 ..S PSUPI=$G(PSUEXP)
37 ;
38 Q
39 ;
40DOSG ;Dosage data: found in file (#52), multiple (#113). There are
41 ;nine sub-fields to be pulled: #.01 through #8
42 ;
43 S PSUD1=0
44 F S PSUD1=$O(^TMP("PSOR",$J,PSURXIEN,"MI",PSUD1)) Q:PSUD1="" D
45 .I PSUD1'=1 S PSUMDFLG="M" ;Multidose flag
46 .I PSUD1=1 D ;Single dose/first Multidose data
47 ..S PSUAM=^TMP("PSOR",$J,PSURXIEN,"MI",PSUD1,0)
48 ..S PSUDSG=$P(PSUAM,U,1) ;Dosage Ordered
49 ..S PSUDISPU=$P(PSUAM,U,2) ;Dispense Units per Dose
50 ..S PSUNITS=$P($P(PSUAM,U,3),";",2) ;Units
51 ..S PSUNOUN=$P(PSUAM,U,4) ;Noun
52 ..S PSUDUR=$P(PSUAM,U,5) ;Duration
53 ..S PSUCONJ=$P(PSUAM,U,6) ;Conjunction
54 ..S PSUROUT=$P($P(PSUAM,U,7),";",2) ;Route
55 ..S PSUSCHED=$P(PSUAM,U,8) ;Schedule
56 ..S PSUVERB=$P(PSUAM,U,9) ;Verb
57 ;
58 Q
59 ;
60MULTI ;Set variables for Multidose Medication Instructions
61 ;Called from PSUOP3
62 ;
63 S (PSUDSGMD,PSUDSPMD,PSUNITMD,PSUNMD)=""
64 S (PSURTMD,PSUSCHMD,PSUVRBMD)=""
65 ;
66 S PSUDSGMD=$P(PSUAMMD,U,1) ;Dosage Ordered
67 S PSUDSPMD=$P(PSUAMMD,U,2) ;Dispense Units per Dose
68 S PSUNITMD=$P($P(PSUAMMD,U,3),";",2) ;Units
69 S PSUNMD=$P(PSUAMMD,U,4) ;Noun
70 S PSUDURMD=$P(PSUAMMD,U,5) ;Duration
71 S PSUCONMD=$P(PSUAMMD,U,6) ;Conjunction
72 S PSURTMD=$P($P(PSUAMMD,U,7),";",2) ;Route
73 S PSUSCHMD=$P(PSUAMMD,U,8) ;Schedule
74 S PSUVRBMD=$P(PSUAMMD,U,9) ;Verb
75 ;
76 Q
Note: See TracBrowser for help on using the repository browser.