awacke1's picture
Update app.py
0f96a44
raw
history blame
1.89 kB
import pandas as pd
import plotly.express as px
import streamlit as st
import jsonlines
st.markdown("""
| πŸ“ #Definition | πŸ“‹ Data Fields |
| --- | --- |
| 🀝 asking for more help or #treatment | πŸ“„ Patient info, Referral details |
| πŸ’Ό about a patient's health #problem or #limits | πŸ“„ Patient info, Health #problem details |
| πŸ’Š allowing medicine | πŸ“„ Patient info, #Medicine #details |
| πŸ”Ž explaining a #patient's health #problem | πŸ“„ Patient info, Health #problem details |
| πŸš‘ plan for getting better | πŸ“„ Patient info, #Treatment details |
| πŸ₯ patient needs surgery | πŸ“„ Patient info, #Surgery details |
| πŸƒ patient can do activities | πŸ“„ Patient info, #Activity details |
| πŸ“… reminding about appointments | πŸ“„ Patient info, #Appointment details |
| β™Ώ patient's disability | πŸ“„ Patient info, #Disability details |
| 🍎 teaching about health | πŸ“„ Patient info, #Education topic |
""")
# Create a DataFrame with CPT codes, procedures, and expected costs
data = {
'Code Type': ['CPT', 'SNOMED', 'RXNORM', 'DEA', 'LOINC', 'ORI', 'ORU', 'CCD'],
'Code Value': ['99201', 'A-12345', 'R-12345', 'D-12345', 'L-12345', 'O-12345', 'U-12345', 'C-12345'],
'Code Description': ['Office/Outpatient Visit', 'Inpatient Consultation', 'Initial Hospital Care', 'Subsequent Hospital Care', 'Critical Care Services', 'Procedure 6', 'Procedure 7', 'Procedure 8'],
'Expected Cost': [100, 200, 150, 250, 300, 350, 400, 450]
}
df = pd.DataFrame(data)
# Create a heatmap with Plotly Express
fig = px.imshow(df.corr(), color_continuous_scale='RdBu_r')
# Display the heatmap in Streamlit
st.plotly_chart(fig)
# Save DataFrame to JSONL file
with jsonlines.open('output.jsonl', mode='w') as writer:
writer.write(df.to_dict(orient='records'))
# Display a link to download the JSONL file
st.markdown('[Download data as JSONL](output.jsonl)')