awacke1 commited on
Commit
29d7058
β€’
1 Parent(s): c4d9073

Create backupapp.py

Browse files
Files changed (1) hide show
  1. backupapp.py +71 -0
backupapp.py ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import plotly.graph_objects as go
3
+
4
+ # List of top six prior auth conditions
5
+ conditions = [
6
+ {
7
+ "diagnosis": "Diagnosis 1",
8
+ "observations": "Observations 1",
9
+ "CCD": "CCD 1",
10
+ "CCD_procedures": "CCD Procedures 1"
11
+ },
12
+ # Add more conditions here
13
+ ]
14
+
15
+ # MSK hip and knee surgery list dictionary
16
+ surgery_data = [
17
+ {
18
+ "CPTCode": "CPT Code 1",
19
+ "CPTDescription": "MSK Hip Surgery",
20
+ "ICD10Code": "ICD10 Code 1",
21
+ "ICD10Description": "ICD10 Description 1",
22
+ "Emoji": "πŸ’‰",
23
+ "Description": "Hip Surgery",
24
+ "Cost": 10
25
+ },
26
+ {
27
+ "CPTCode": "CPT Code 2",
28
+ "CPTDescription": "MSK Knee Surgery",
29
+ "ICD10Code": "ICD10 Code 2",
30
+ "ICD10Description": "ICD10 Description 2",
31
+ "Emoji": "πŸ’Š",
32
+ "Description": "Knee Surgery",
33
+ "Cost": 15
34
+ }
35
+ ]
36
+
37
+ # Sort the surgery data by descending cost
38
+ surgery_data.sort(key=lambda x: x["Cost"], reverse=True)
39
+
40
+ # Function to create heatmap circle plot
41
+ def create_heatmap_circle_plot(surgery_data):
42
+ fig = go.Figure()
43
+
44
+ for surgery in surgery_data:
45
+ fig.add_trace(go.Scatter(
46
+ x=[surgery["CPTCode"]],
47
+ y=[surgery["Cost"]],
48
+ mode='markers',
49
+ marker=dict(
50
+ size=20,
51
+ color=[surgery["Cost"]],
52
+ colorscale='Viridis',
53
+ showscale=True
54
+ ),
55
+ text=surgery["CPTDescription"],
56
+ hovertemplate='<b>%{text}</b><br><i>CPT Code</i>: %{x}<br><i>Cost</i>: %{y}'))
57
+
58
+ fig.update_layout(title='Heatmap Circle Plot of Surgery Types',
59
+ xaxis_title='CPT Codes',
60
+ yaxis_title='Cost (in billions)')
61
+
62
+ return fig
63
+
64
+ # Streamlit app
65
+ st.title("Top Prior Auth Conditions")
66
+ st.header("MSK Hip and Knee Surgery")
67
+ st.write(surgery_data)
68
+
69
+ st.header("Heatmap Circle Plot")
70
+ fig = create_heatmap_circle_plot(surgery_data)
71
+ st.plotly_chart(fig)