awacke1 commited on
Commit
f3e47dd
1 Parent(s): bb30aca

Upload 5 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
SnomedOMS.csv ADDED
The diff for this file is too large to render. See raw diff
 
app.py ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ with gr.Row():
40
+ name = gr.Textbox(label="Enter a term or word to match and find LOINC, SNOMED and OMS clinical terminologies.")
41
+
42
+
43
+ with gr.Row():
44
+ button1 = gr.Button("LOINC Terminology")
45
+ button2 = gr.Button("LOINC Panels and Forms")
46
+ button3 = gr.Button("SNOMED Clinical Terminology")
47
+ button4 = gr.Button("SNOMED and OMS Clinical Terminology")
48
+
49
+ with gr.Row():
50
+ output1 = gr.DataFrame(label="LOINC Terminology")
51
+ with gr.Row():
52
+ output2 = gr.DataFrame(label="LOINC Assessment Panels")
53
+ with gr.Row():
54
+ output3 = gr.DataFrame(label="SNOMED Terminology")
55
+ with gr.Row():
56
+ output4 = gr.DataFrame(label="SNOMED and OMS Terminology")
57
+
58
+ button1.click(fn=MatchLOINC, inputs=name, outputs=output1)
59
+ button2.click(fn=MatchLOINCPanelsandForms, inputs=name, outputs=output2)
60
+ button3.click(fn=MatchSNOMED, inputs=name, outputs=output3)
61
+ button4.click(fn=MatchOMS, inputs=name, outputs=output4)
62
+
63
+ 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