awacke1 commited on
Commit
234299f
·
1 Parent(s): a6870be

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -7
app.py CHANGED
@@ -16,19 +16,21 @@ def MatchLOINC(name):
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)]
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[data['term'].str.match(name)]
 
26
  return swith
27
 
28
  def MatchOMS(name):
29
  basedir = os.path.dirname(__file__)
30
  data = pd.read_csv(f'SnomedOMS.csv')
31
- swith = data[data['SNOMED CT'].str.match(name)]
 
32
  return swith
33
 
34
 
@@ -36,11 +38,15 @@ def MatchOMS(name):
36
  with gr.Blocks() as demo:
37
  name = gr.Textbox(label="Name")
38
 
39
- output1 = gr.DataFrame(label="Output Match LOINC")
 
 
 
 
40
  #output1 = gr.TextArea(label="Output Match LOINC", max_lines=10, interactive=True, )
41
- output2 = gr.TextArea(label="Output Match LOINC Panels and Forms", max_lines=10, interactive=True,)
42
- output3 = gr.TextArea(label="Output Match SNOMED", max_lines=10, interactive=True,)
43
- output4 = gr.TextArea(label="Output Match SNOMED", max_lines=10, interactive=True,)
44
 
45
  button1 = gr.Button("Match LOINC Clinical Terminology")
46
  button1.click(fn=MatchLOINC, inputs=name, outputs=output1)
 
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
 
 
38
  with gr.Blocks() as demo:
39
  name = gr.Textbox(label="Name")
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)