awacke1 commited on
Commit
d7c57a2
β€’
1 Parent(s): dfcdb52

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +286 -0
app.py CHANGED
@@ -1,3 +1,289 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  st.markdown("""
2
  #Prompt: Create a streamlit python program that lists the Top 50 assessments below and display using a python dictionary. Feature columns for Assessment name, Assessment Acronym, Top assessment question, Condition name to test for, Clinical Terminology Code Type (ICD-10, LOINC, SNOMED, CPT, HCPCS) and Emoji:
3
  # Top 50 Assessments in Physical and Mental Health
 
1
+ import streamlit as st
2
+
3
+ st.markdown("""
4
+
5
+
6
+
7
+ # Graphs Survey-Assess-Plan-Goals
8
+
9
+ These top 5 graph examples introduce visual ideas to use to survey, assess, plan and reach goals.
10
+
11
+ 1. Graph OMS and LOCUS Standards and Quality Metrics: https://huggingface.co/spaces/awacke1/NLPGraphOMSandLOCUS
12
+ 2. Graph Pain and High Medium Low Confidence: https://huggingface.co/spaces/awacke1/VISNLP-Graph
13
+ 3. Graph Action Mechanics: https://huggingface.co/spaces/awacke1/CardGameActivity-GraphViz
14
+ 4. Graph - OMS, MH, Charts, Maps, DOT lang for Pyvis VisJS: https://huggingface.co/spaces/awacke1/CPVisGraph
15
+ 5. Graph - Plan and Assess: https://huggingface.co/spaces/awacke1/Git-GPG-Git-Actions-01-GraphViz
16
+
17
+
18
+ # ICD10, CPT, LOINC, SNOMED, HCPCS, OMS Codes for Top Health Conditions and Treatment Preferences Assessment
19
+
20
+ Assess Topic| Assess Metric | Code Emoji | Code Topic | Code Type | Code
21
+ ------------|---------------|------------|------------|------------|-----------
22
+ Childhood Immunization| % of children immunized by age two |πŸ§’πŸ’‰ | Clinical Code| ICD10 | Z28.2
23
+ Breast Cancer Screening| % of women with mammogram in past 2 yrs |πŸ©ΊπŸŽ€ | Clinical Code| CPT| 77067
24
+ Colorectal Cancer Screening| % of adults screened for colorectal cancer| πŸ©ΊπŸ’© | Clinical Code| CPT| 82274
25
+ Comprehensive Diabetes Care| % of diabetic patients who had all recommended tests| 🩺🩹 | Clinical Code| LOINC| 4548-4
26
+ Controlling High Blood Pressure| % of patients with controlled blood pressure| πŸ©ΊπŸ’Š | Clinical Code| ICD10|I10
27
+ Medication Management for Asthma| % of asthma patients with proper meds| πŸ’ŠπŸŒ¬οΈ | Clinical Code| SNOMED|195967001
28
+ Follow-up After Mental Illness Hospitalization| % of patients with follow-up care| 🩺πŸ₯ | Clinical Code| HCPCS|G0181
29
+ Prenatal & Postpartum Care| % of pregnant women with proper care |🀰🩺 | Clinical Code| ICD10|Z34
30
+ Comprehensive Eye Exam| % of diabetic patients with eye exam |πŸ©ΊπŸ‘€ | Clinical Code| CPT| 92014
31
+ Childhood Weight Assessment| % of children with BMI assessment |πŸ§’πŸ“ | Clinical Code| ICD10| Z00.121
32
+ Chlamydia Screening in Women| % of sexually active women screened| πŸ©ΊπŸ‘© | Clinical Code| CPT|87491
33
+ Avoidance of Antibiotic Treatment for Acute Bronchitis| % of patients without antibiotics |πŸ©ΊπŸ’Š | Clinical Code| ICD10|J20.9
34
+ Osteoporosis Management in Women|% of women with bone density test |🩺πŸ’ͺ | Clinical Code| CPT|77080
35
+ Use of High-Risk Medications in the Elderly| % of elderly with safe meds |πŸ’ŠπŸ‘΄πŸ‘΅ | Clinical Code| HCPCS |G9612
36
+ Diabetes Screening for Schizophrenia or Bipolar Disorder| % of patients with mental illness screened |🧠🩺 | Clinical Code| SNOMED| 169609005
37
+ All-Cause Readmissions| % of patients readmitted within 30 days |🩺πŸ₯ | Clinical Code| ICD10| Z51.5
38
+ Antidepressant Medication Management| % of depressed patients with proper meds & follow-up |🩺🧠 | Clinical Code| CPT|96127
39
+ Follow-up Care for Children Prescribed ADHD Medication|% of children with follow-up care |πŸ©ΊπŸ§’ | Clinical Code| ICD10|F90
40
+ Imaging Studies for Low Back Pain| % of patients without imaging studies|πŸ©ΊπŸ“Š | Clinical Code| ICD10|M54.5
41
+ Spirometry Testing for COPD|% of COPD patients with spirometry testing |🩺🫁 | Clinical Code|CPT|94010
42
+
43
+
44
+
45
+
46
+ # Assess and Plan AI
47
+
48
+ Assessment and Planning go hand in hand. When we build a model in our brain about how the world works, we use assessment skills we were raised with which is the ability to wonder, and ask questions about what we are interested in, and then using the information we learn to move through our environment and plan or predict what will happen next chronologically.
49
+
50
+ In psychology and social science its been shown that the concept of "mirroring" occurs when we communicate where we learn from eachother what our internal models are doing then synchronize with eachother by acting or performing movements and gestures that match what we see.
51
+
52
+ This allows transfer learning to work due to us assessing ourself and our understanding of the world around us, then begin to act and study the outcomes of our actions which is planning behavior.
53
+
54
+
55
+ ## Tasks used in Assess and Plan AI:
56
+ 1. Feature Extraction: [URL](https://huggingface.co/models?pipeline_tag=feature-extraction&sort=likes)
57
+ 2. Document Question Answering: [URL](https://huggingface.co/models?pipeline_tag=document-question-answering&sort=likes)
58
+ 3. Token/Text/Zero Shot Classification: [URL](https://huggingface.co/models?pipeline_tag=token-classification&sort=likes), [URL](https://huggingface.co/models?pipeline_tag=text-classification&sort=likes), [URL](https://huggingface.co/models?pipeline_tag=zero-shot-classification&sort=likes)
59
+ 4. Text to Text Generation: [URL](https://huggingface.co/models?pipeline_tag=text2text-generation&sort=likes)
60
+ 5. Sentence Similarity: [URL](https://huggingface.co/models?pipeline_tag=sentence-similarity&sort=likes)
61
+ 6. Tabular Classification: [URL](https://huggingface.co/models?pipeline_tag=tabular-classification&sort=likes)
62
+
63
+ The two models below represent schemas we can use for Assessment and Planning.
64
+
65
+ They attempt to describe the knowledge graphs to classify parts of knowledge as a higher order graph which can be used in AGI - artificial generative intelligence, to choose which general patterns to use to understand tasks and text which can align them to other frames of thought so we can use the gained knowledge generally.
66
+
67
+ ## Assessment
68
+
69
+ ![image](https://user-images.githubusercontent.com/30595158/221297144-8d346e60-d8a3-474f-808f-95739dde95fc.png)
70
+
71
+ ## Plan
72
+
73
+ ![image](https://user-images.githubusercontent.com/30595158/221297192-bf6d3d5f-9137-44df-aeec-2c22861b1731.png)
74
+
75
+ ## Omaha System - OMS - What Is It? -- πŸ“ The Omaha System for Nursing Plans of Care
76
+
77
+ The Omaha System is a special plan that nurses use to help them take care of patients. It has different parts to help nurses understand the patient's health problems and how to make them better.
78
+
79
+ ## The three parts include:
80
+ 1. Problem classification which lets you identify a problem area by signs, symptoms or conditions you are facing.
81
+ 2. Next it has an intervention scheme for the problems so we have descriptions of care and potential goals for improvement.
82
+ 3. Last there is a problem outcome scale for measuring improvement and progress of the outcome for value based care.
83
+
84
+ ## πŸ“‹ The Problem Classification Scheme
85
+
86
+ This part of the plan helps nurses figure out what health problems the patient has. It has different levels to help them understand better.
87
+
88
+ There are several parts of a care plan:
89
+ 1. 🌎 Domain
90
+ 2. πŸ₯ Class
91
+ 3. 🎯 Target Problem
92
+
93
+ ## 😷 Problem
94
+ 🌑️ Signs and Symptoms Classification Scheme
95
+
96
+ - This part helps nurses know what signs and symptoms the patient has. It has three different levels to help them understand better.
97
+
98
+ - There are the following environment domain classifications of types of health problems:
99
+ 1. 🌍 Environmental
100
+ 2. 🧠 Health Related Behaviors
101
+ 2. 🧠 Psychosocial
102
+ 3. 🩺 Physiological
103
+
104
+ ## πŸ’‰ Intervention Scheme
105
+ - This part of the plan tells nurses what they can do to help the patient. It also has different levels to help them understand better.
106
+
107
+ Evaluating Interventions and Goals uses these aspects:
108
+ 1. 🌎 Domain
109
+ 2. πŸ₯ Class
110
+ 3. πŸ’Š Intervention
111
+
112
+ ## 🎯 Problem Rating Scale for Outcomes
113
+ - This part helps nurses see how well the patient is doing. It has three levels to help them understand better.
114
+ 1. 🧠 Knowledge
115
+ 2. πŸƒβ€β™‚οΈ Behavior
116
+ 3. πŸ“ˆ Status
117
+
118
+ πŸ’ͺ Problem Topics
119
+ This part helps nurses organize the patient's health problems and make a plan to help them.
120
+ There are 50 different topics to choose from, and they are grouped into seven different categories.
121
+ 1. 🌍 Environmental
122
+ 2. πŸ§ͺ Behavioral
123
+ 3. 🚸 Safety
124
+ 4. πŸ‘ͺ Family
125
+ 5. 🩺 Health-related
126
+ 6. 🧠 Psychosocial
127
+ 7. 🌑️ Physiological
128
+
129
+ The Omaha System is a good way for nurses to take care of their patients. It helps them understand the patient's health problems and make a plan to help them get better.
130
+
131
+ ## Outline for Comparing Types of Machine Learning for Assessment and Planning AI
132
+
133
+ Here's an outline of the key points for comparing and contrasting the different types of machine learning tasks used in Assess and Plan AI:
134
+
135
+ 1. Feature Extraction 🎯
136
+ - Description: Extracting relevant features from raw data for use in training a model.
137
+ - Similarities: Similar to other machine learning tasks in that it involves using a dataset to train a model.
138
+ - Differences: Unique in that it is focused on selecting the most useful features for the model, rather than making predictions.
139
+ - Example Models:
140
+ 1. Google VIT: https://huggingface.co/google/vit-base-patch16-224-in21k
141
+ 2. Facebook BART: https://huggingface.co/facebook/bart-large https://huggingface.co/facebook/bart-base
142
+ 3. Facebook DPR: https://huggingface.co/facebook/dpr-question_encoder-single-nq-base
143
+
144
+ 2. Document Question Answering ❓
145
+ - Description: Building a system that can automatically answer questions based on the content of a document.
146
+ - Similarities: Similar to other natural language processing tasks in that it involves processing and understanding text.
147
+ - Differences: Focused specifically on answering questions, rather than general language understanding.
148
+ - Example Models:
149
+ 1. Impira Doc QA: https://huggingface.co/impira/layoutlm-document-qa
150
+ 2. Naver Clova IX Donut DocVQA: https://huggingface.co/naver-clova-ix/donut-base-finetuned-docvqa
151
+ 3. Impira Invoices: https://huggingface.co/impira/layoutlm-invoices
152
+
153
+ 3. Token/Text/Zero Shot Classification πŸ”
154
+ - Description: Assigning a label to a piece of text based on its content.
155
+ - Similarities: Similar to other classification tasks in that it involves assigning a label to data.
156
+ - Differences: Unique in that it can be performed without any training data, using pre-trained language models.
157
+ - Example Models:
158
+ 1. Text: https://huggingface.co/distilbert-base-uncased-finetuned-sst-2-english
159
+ 2. Tone: https://huggingface.co/yiyanghkust/finbert-tone
160
+ 3. Sentiment: https://huggingface.co/j-hartmann/emotion-english-distilroberta-base
161
+ 4. FinBERT: https://huggingface.co/ProsusAI/finbert
162
+ 5. BERT Base NER: https://huggingface.co/dslim/bert-base-NER
163
+ 6. Camembert NER: https://huggingface.co/Jean-Baptiste/camembert-ner
164
+ 7. Ontonotes NER: https://huggingface.co/flair/ner-english-ontonotes-large
165
+ 8. Roberta: https://huggingface.co/xlm-roberta-large-finetuned-conll03-english
166
+ 9. BERT Large NER: https://huggingface.co/dslim/bert-large-NER
167
+ 10. JB NER: https://huggingface.co/Jean-Baptiste/roberta-large-ner-english
168
+ 11. D4Data Biomedical NER: https://huggingface.co/d4data/biomedical-ner-all
169
+ - Zero Shot Models
170
+ 1. Facebook BART MNLI: https://huggingface.co/facebook/bart-large-mnli
171
+ 2. mDeBERT MNLI XNLI: https://huggingface.co/MoritzLaurer/mDeBERTa-v3-base-mnli-xnli
172
+ 3. XNLI: https://huggingface.co/joeddav/xlm-roberta-large-xnli
173
+ 4. XNLI: https://huggingface.co/MoritzLaurer/mDeBERTa-v3-base-xnli-multilingual-nli-2mil7
174
+ 5. MNLI: https://huggingface.co/valhalla/distilbart-mnli-12-1
175
+ 6. ANLI MNLI: https://huggingface.co/MoritzLaurer/DeBERTa-v3-large-mnli-fever-anli-ling-wanli
176
+ 7. MNLI: https://huggingface.co/typeform/distilbert-base-uncased-mnli
177
+ 8. NLI: https://huggingface.co/cross-encoder/nli-distilroberta-base
178
+ 9. MNLI XNLI: https://huggingface.co/MoritzLaurer/xlm-v-base-mnli-xnli
179
+
180
+ 4. Sentence Similarity πŸ§‘β€πŸ€β€πŸ§‘
181
+ - Description: Determining how similar two sentences are in meaning.
182
+ - Similarities: Similar to other natural language processing tasks in that it involves processing and understanding text.
183
+ - Differences: Focused specifically on comparing the meaning of two pieces of text.
184
+ - Example Models:
185
+ 1.
186
+
187
+ 5. Tabular Classification πŸ—ƒοΈ
188
+ - Description: Assigning a label to a row of data in a table based on its content.
189
+ - Similarities: Similar to other classification tasks in that it involves assigning a label to data.
190
+ - Differences: Unique in that it is performed on structured data in the form of tables, rather than unstructured data like text or images.
191
+ - Example Models:
192
+ 1.
193
+
194
+
195
+ # Superpowers of Using ChatGPT plus HuggingFace for Rapid Development:
196
+
197
+ πŸ’»πŸ€πŸ€– Utilizing HuggingFace and ChatGPT together can superpower ML development
198
+ πŸ‘¨β€πŸ’» Engineers with knowledge of both platforms are force multipliers
199
+ πŸ“ˆ Transforming our stack to capture both aspects could simplify adoption
200
+ πŸ’Ό Business value requires ability to communicate pain points and customer joy in a press release
201
+ 🏭 Building and demoing in production first creates immediate superpowers for all users
202
+
203
+
204
+ ## Building an Asynchronous Real-Time Live Telemedicine System Using AI Pipelines for Smart Communities
205
+
206
+ 1. **Designing the Telemedicine System**
207
+ - Identify the needs and challenges of smart communities and design a telemedicine system that addresses these challenges.
208
+ - Choose a platform that allows for asynchronous real-time communication, such as video conferencing or chat-based messaging, to facilitate remote consultations with healthcare providers.
209
+ - Design the system to incorporate AI pipelines that can analyze patient data and provide decision support for healthcare providers.
210
+
211
+ 2. **Implementing the AI Pipelines**
212
+ - Identify the relevant AI algorithms and techniques that can be used to analyze patient data, such as machine learning or natural language processing.
213
+ - Integrate these AI pipelines into the telemedicine system to provide decision support for healthcare providers during consultations.
214
+ - Ensure that the AI algorithms are accurate and reliable by testing them on a large and diverse set of patient data.
215
+
216
+ 3. **Deploying the Telemedicine System**
217
+ - Deploy the telemedicine system in smart communities, ensuring that it is easily accessible and user-friendly for patients and healthcare providers.
218
+ - Train healthcare providers on how to use the system effectively and provide ongoing support and feedback to optimize its use.
219
+ - Continuously monitor and evaluate the system's performance, making improvements and updates as needed to ensure that it remains effective and efficient in meeting the needs of smart communities.
220
+
221
+ # 2023's Top 7 Breakthroughs in Medical Technology
222
+ 1. __Asynchronous Telemedicine:__ A Solution to Address Provider Shortages by Offering Remote Care Services. ([Wikipedia](https://en.wikipedia.org/wiki/Telemedicine))
223
+ 2. __Ambient and Emotion AI:__ Empowering Patients with Artificial Intelligence That Shows Empathy and Compassion. ([Wikipedia](https://en.wikipedia.org/wiki/Ambient_intelligence))
224
+ 3. __Skin Patch Technology:__ A Convenient Way to Measure Vital Signals such as Blood Pressure and Glucose Levels. ([Wikipedia](https://en.wikipedia.org/wiki/Skin_patch))
225
+ 4. __Affordable Vein Scanner:__ A Revolutionary Tool to View Veins Through the Skin. ([Wikipedia](https://en.wikipedia.org/wiki/Vein_matching))
226
+ 5. __Synthetic Medical Records:__ Creating Reliable Medical Records Using Generative Adversarial Networks. ([Wikipedia](https://en.wikipedia.org/wiki/Synthetic_data))
227
+ 6. __Blood Draw Devices for Clinical Trials:__ Facilitating Remote Participation in Trials with Innovative Technology. ([Wikipedia](https://en.wikipedia.org/wiki/Blood_sampling))
228
+ 7. __Smart TVs for Remote Care:__ Enhancing Remote Care Consultations with Video Chat and Recordings. ([Wikipedia](https://en.wikipedia.org/wiki/Smart_television))
229
+
230
+ Reference: [The Medical Futurist](https://www.youtube.com/watch?v=_9DpLD4S2AY&list=PLHgX2IExbFotoMt32SrT3Xynt5BXTGnEP&index=2)
231
+
232
+
233
+
234
+
235
+ # Clinical Terminology AI using three open CT taxonomies:
236
+ 1. __Omaha System (OMS)__ for Care Needs Determination
237
+ 2. __LOINC Panels and Forms__ for Assessment Questions and Answers
238
+ 3. __LOCUS Review__ for Mental Health Needs Assessment and Level of Care Evaluation.
239
+
240
+ 1. NER + CT to find the Signs, Symptoms, Diagnostics, and Procedures
241
+
242
+ Persona Prompt: "During COVID my construction company could not get work. I subsequently lost my job. Without income I am very sad because I cannot pay our bills and unfortunately medications and an operation I need are too expensive to afford."
243
+
244
+ OMS - Income:
245
+
246
+ ![image](https://user-images.githubusercontent.com/30595158/216600313-3880a0d3-2f27-4828-a0e8-6b0f6192447d.png)
247
+
248
+ Create short text prompt corpus input. Assess with questions and possible answer value types to measure.
249
+
250
+ Persona Prompt: "Had two injuries, one where I was experiencing brain fog and syncope or dizzy spells. I took a spill falling down stairs. I wish someone had warned me one of my meds caused dizziness. I'm looking to afford my medications which are really expensive. After the fall I was experiencing alot of pain. Is there a way to treat my pain and get back to a healthy state?"
251
+
252
+ OMS - Pain:
253
+
254
+ ![image](https://user-images.githubusercontent.com/30595158/216601169-08d036a7-6da2-4354-9cb3-612c6622172e.png)
255
+
256
+ Persona Prompt: "I have been waking up at night around 3am and cant get back to sleep since the accident. I was taking an anti anxiety medication called Zoloft but am wondering if you can recommend a healthy way to get off the medication and treat my pain and anxiety in a way where I can sleep easily again."
257
+
258
+ OMS - Sleep and Rest:
259
+
260
+ ![image](https://user-images.githubusercontent.com/30595158/216601382-21a84124-015d-4394-a044-7cf18e6a409f.png)
261
+
262
+ https://huggingface.co/spaces/awacke1/NLPGraphOMSandLOCUS
263
+
264
+ Persona Prompt: "Great, thanks! I think I have what I need. My plan is take grandma over to Vanderbilt to see a therapist maybe a psychiatrist. I live in Nashville, TN. Can you provide me with a map and information about what mental health professionals I could see affiliated with that hospital and covered under my plan?"
265
+
266
+
267
+
268
+ # Mental Health, Mindfulness, AI/ML and Generative AI
269
+
270
+ Its proven that focusing positively on what your primary concerns in life can dramatically improve your positivity, your success, and how good you feel.
271
+
272
+ A short list of necessities of life is good to order your priorities. Mine for example include in my top ten the following:
273
+
274
+ 1. Health
275
+ 2. Family
276
+ 3. Work - Surrounding myself with people I admire, learn from and want to be like.
277
+ 4. Changing the world
278
+ 5. AI and Machine Learning - Specifically AGI
279
+ 6. Education, teaching and helping others
280
+
281
+
282
+
283
+
284
+
285
+ """)
286
+
287
  st.markdown("""
288
  #Prompt: Create a streamlit python program that lists the Top 50 assessments below and display using a python dictionary. Feature columns for Assessment name, Assessment Acronym, Top assessment question, Condition name to test for, Clinical Terminology Code Type (ICD-10, LOINC, SNOMED, CPT, HCPCS) and Emoji:
289
  # Top 50 Assessments in Physical and Mental Health