Robo2000 commited on
Commit
1a69612
·
1 Parent(s): 6d3e692

Upload 6 files

Browse files
.gitattributes CHANGED
@@ -32,3 +32,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
32
  *.zip filter=lfs diff=lfs merge=lfs -text
33
  *.zst filter=lfs diff=lfs merge=lfs -text
34
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
32
  *.zip filter=lfs diff=lfs merge=lfs -text
33
  *.zst filter=lfs diff=lfs merge=lfs -text
34
  *tfevents* filter=lfs diff=lfs merge=lfs -text
35
+ LoincTableCore.csv filter=lfs diff=lfs merge=lfs -text
36
+ PanelsAndForms.csv filter=lfs diff=lfs merge=lfs -text
LoincTableCore.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0ebc67fe7ec52a031d2157f2938e01ee4c68a75331fa95b01ad13b2338df009c
3
+ size 23786041
PanelsAndForms.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a5c70a92806a63c42d8af98200601102c4e27361179a368611e3ff0dfc43beb1
3
+ size 27840189
README.md CHANGED
@@ -1,10 +1,10 @@
1
  ---
2
- title: ClinicalTermAISearch GR
3
- emoji: 📉
4
- colorFrom: purple
5
- colorTo: gray
6
  sdk: gradio
7
- sdk_version: 3.13.0
8
  app_file: app.py
9
  pinned: false
10
  ---
 
1
  ---
2
+ title: ClinicalTerminologyAISearch
3
+ emoji: 🐠
4
+ colorFrom: red
5
+ colorTo: yellow
6
  sdk: gradio
7
+ sdk_version: 3.9.1
8
  app_file: app.py
9
  pinned: false
10
  ---
SnomedOMS.csv ADDED
The diff for this file is too large to render. See raw diff
 
app.py ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import pandas as pd
3
+ import gradio as gr
4
+ # SNOMEDCT Download https://www.nlm.nih.gov/healthit/snomedct/us_edition.html
5
+ # LOINC Download https://loinc.org/downloads/
6
+ # ECQM for Value Set Measures and Quality Reporting: https://vsac.nlm.nih.gov/download/ecqm?rel=20220505&res=eh_only.unique_vs.20220505.txt
7
+ # SNOMED Nurse Subset https://www.nlm.nih.gov/healthit/snomedct/index.html?_gl=1*36x5pi*_ga*MTI0ODMyNjkxOS4xNjY1NTY3Mjcz*_ga_P1FPTH9PL4*MTY2Nzk4OTI1My41LjEuMTY2Nzk4OTY5Ni4wLjAuMA..
8
+
9
+ def MatchLOINC(name):
10
+ basedir = os.path.dirname(__file__)
11
+ pd.set_option("display.max_rows", None)
12
+ data = pd.read_csv(f'LoincTableCore.csv')
13
+ swith=data.loc[data['COMPONENT'].str.contains(name, case=False, na=False)]
14
+ return swith
15
+
16
+ def MatchLOINCPanelsandForms(name):
17
+ basedir = os.path.dirname(__file__)
18
+ data = pd.read_csv(f'PanelsAndForms.csv')
19
+ swith=data.loc[data['ParentName'].str.contains(name, case=False, na=False)]
20
+ return swith
21
+
22
+ def MatchSNOMED(name):
23
+ basedir = os.path.dirname(__file__)
24
+ data = pd.read_csv(f'sct2_TextDefinition_Full-en_US1000124_20220901.txt',sep='\t')
25
+ swith=data.loc[data['term'].str.contains(name, case=False, na=False)]
26
+ #swith = data[data['term'].str.match(name)]
27
+ return swith
28
+
29
+ def MatchOMS(name):
30
+ basedir = os.path.dirname(__file__)
31
+ data = pd.read_csv(f'SnomedOMS.csv')
32
+ swith=data.loc[data['SNOMED CT'].str.contains(name, case=False, na=False)]
33
+ #swith = data[data['SNOMED CT'].str.match(name)]
34
+ return swith
35
+
36
+
37
+
38
+ with gr.Blocks() as demo:
39
+ name = gr.Textbox(label="Enter a term or word to match and find LOINC, SNOMED and OMS clinical terminologies.")
40
+
41
+ output1 = gr.DataFrame(label="LOINC Terminology")
42
+ output2 = gr.DataFrame(label="LOINC Assessment Panels")
43
+ output3 = gr.DataFrame(label="SNOMED Terminology")
44
+ output4 = gr.DataFrame(label="SNOMED and OMS Terminology")
45
+
46
+ #output1 = gr.TextArea(label="Output Match LOINC", max_lines=10, interactive=True, )
47
+ #output2 = gr.TextArea(label="Output Match LOINC Panels and Forms", max_lines=10, interactive=True,)
48
+ #output3 = gr.TextArea(label="Output Match SNOMED", max_lines=10, interactive=True,)
49
+ #output4 = gr.TextArea(label="Output Match SNOMED", max_lines=10, interactive=True,)
50
+
51
+ button1 = gr.Button("Match LOINC Clinical Terminology")
52
+ button1.click(fn=MatchLOINC, inputs=name, outputs=output1)
53
+
54
+ button2 = gr.Button("Match LOINC Panels and Forms")
55
+ button2.click(fn=MatchLOINCPanelsandForms, inputs=name, outputs=output2)
56
+
57
+ button3 = gr.Button("Match SNOMED Clinical Terminology")
58
+ button3.click(fn=MatchSNOMED, inputs=name, outputs=output3)
59
+
60
+ button3 = gr.Button("Match SNOMED and OMS Clinical Terminology")
61
+ button3.click(fn=MatchOMS, inputs=name, outputs=output4)
62
+
63
+
64
+
65
+ demo.launch(debug=True)
sct2_TextDefinition_Full-en_US1000124_20220901.txt ADDED
The diff for this file is too large to render. See raw diff