forked from lewisschmidt/CCL
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathOrders_Oncology
121 lines (105 loc) · 2.97 KB
/
Orders_Oncology
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
/*Oncology Orders based on Therapeutic_Category */
SELECT Distinct
OrderCatalog_mnemonic_name =ocs.mnemonic_key_cap
, Order_type = uar_get_code_display(ocs.mnemonic_type_cd)
, OrderCatalog_Therapeutic_Category = A.LONG_DESCRIPTION
; , ocs.virtual_view
, Multum_Therapeutic_Category = M.CATEGORY_NAME
; , oef.oe_format_name
FROM
ALT_SEL_CAT A
, alt_sel_list ASL
, order_catalog_synonym OCS
, person P
, order_catalog oc
, MLTM_DRUG_CATEGORIES M
, MLTM_CATEGORY_DRUG_XREF MC
Plan A
where A.AHFS_IND = 1
and A.Long_Description in (
;ORDERCATALOG_THERAPEUTIC_CATEGORY
"5-alpha-reductase inhibitors"
,"alkylating agents"
,"anti-PD-1 monoclonal antibodies"
,"antiandrogens"
,"antigonadotropic agents"
,"antimetabolites"
,"antineoplastic antibiotics"
,"antineoplastic combinations"
,"antineoplastic detoxifying agents"
,"antineoplastic hormones"
,"antineoplastic interferons"
,"antineoplastic interferons"
,"antineoplastic monoclonal antibodies"
,"antineoplastics"
,"antiviral interferons"
,"aromatase inhibitors"
,"BCR-ABL tyrosine kinase inhibitors"
,"bisphosphonates"
,"CD20 monoclonal antibodies"
,"CD30 monoclonal antibodies"
,"CD33 monoclonal antibodies"
,"CD38 monoclonal antibodies"
,"CD52 monoclonal antibodies"
,"CDK 4/6 inhibitors"
,"estrogen receptor antagonists"
,"estrogens"
,"gonadotropin-releasing hormone antagonists"
,"gonadotropin-releasing hormone and analogs"
,"hedgehog pathway inhibitors"
,"HER2 inhibitors"
,"histone deacetylase inhibitors"
,"integrase strand transfer inhibitor"
,"interferons"
,"interleukin inhibitors"
,"interleukins"
,"miscellaneous antineoplastics"
,"mitotic inhibitors"
,"mTOR inhibitors"
,"mTOR kinase inhibitors"
,"multikinase inhibitors"
,"PI3K inhibitors"
,"progesterone receptor modulators"
,"radiopharmaceuticals"
,"selective estrogen receptor modulators"
,"therapeutic radiopharmaceuticals"
,"topical antineoplastics"
,"TNF alpha inhibitors"
,"VEGF/VEGFR inhibitors"
)
Join ASL
where asl.alt_sel_category_id = a.alt_sel_category_id
Join ocs
where asl.synonym_id = ocs.synonym_id
and ocs.active_ind =1
and ocs.catalog_type_cd = 2516.00
and ocs.mnemonic != "zz"
and ocs.mnemonic != "ZZ"
and ocs.mnemonic_type_cd in (
; CODE_VALUE DISPLAY
2580.00; Brand Name
,2581.00; Direct Care Provider
,614542.00; C - Dispensable Drug Names
,2582.00; Generic Name
,614548.00; Y - Generic Products
,614544.00; M - Generic Miscellaneous Products
,614543.00; E - IV Fluids and Nicknames
,2583.00; Primary
,614549.00; Z - Trade Products
,614545.00; N - Trade Miscellaneous Products
)
Join P
where p.person_id = ocs.updt_id
Join OC
where oc.catalog_cd = ocs.catalog_cd
and oc.active_ind = 1
and oc.primary_mnemonic != "zz*"
and oc.primary_mnemonic != "ZZ"
JOIN MC
WHERE substring(9,15,(OC.cki)) = MC.drug_identifier
JOIN M
WHERE MC.MULTUM_CATEGORY_ID = M.MULTUM_CATEGORY_ID ; therapeutic Class
ORDER BY
; OC.Description
OCS.mnemonic_key_cap
WITH SEPARATOR=" ", FORMAT, time = 1