awacke1 commited on
Commit
7552c7b
·
1 Parent(s): eb39f38

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -0
app.py CHANGED
@@ -11,6 +11,13 @@ def MatchLOINC(name):
11
  swith = data[data['COMPONENT'].str.match(name)]
12
  return swith
13
 
 
 
 
 
 
 
 
14
  def MatchSNOMED(name):
15
  import pandas as pd
16
  basedir = os.path.dirname(__file__)
@@ -27,9 +34,17 @@ with gr.Blocks() as demo:
27
  name = gr.Textbox(label="Name")
28
  output1 = gr.Textbox(label="Output Match LOINC")
29
  output2 = gr.Textbox(label="Output Match SNOMED")
 
 
30
  button1 = gr.Button("Match LOINC Clinical Terminology")
31
  button1.click(fn=MatchLOINC, inputs=name, outputs=output1)
 
32
  button2 = gr.Button("Match SNOMED Clinical Terminology")
33
  button2.click(fn=MatchSNOMED, inputs=name, outputs=output2)
 
 
 
 
 
34
 
35
  demo.launch(debug=True)
 
11
  swith = data[data['COMPONENT'].str.match(name)]
12
  return swith
13
 
14
+ def MatchLOINCPanelsandForms(name):
15
+ import pandas as pd
16
+ basedir = os.path.dirname(__file__)
17
+ data = pd.read_csv(f'PanelsAndForms.csv') # LOINC Download https://loinc.org/downloads/
18
+ swith = data[data['ParentName'].str.match(name)]
19
+ return swith
20
+
21
  def MatchSNOMED(name):
22
  import pandas as pd
23
  basedir = os.path.dirname(__file__)
 
34
  name = gr.Textbox(label="Name")
35
  output1 = gr.Textbox(label="Output Match LOINC")
36
  output2 = gr.Textbox(label="Output Match SNOMED")
37
+ output3 = gr.Textbox(label="Output Match LOINC Panels and Forms")
38
+
39
  button1 = gr.Button("Match LOINC Clinical Terminology")
40
  button1.click(fn=MatchLOINC, inputs=name, outputs=output1)
41
+
42
  button2 = gr.Button("Match SNOMED Clinical Terminology")
43
  button2.click(fn=MatchSNOMED, inputs=name, outputs=output2)
44
+
45
+ button3 = gr.Button("Match LOINC Panels and Forms")
46
+ button3.click(fn=MatchLOINCPanelsandForms, inputs=name, outputs=output3)
47
+
48
+
49
 
50
  demo.launch(debug=True)