awacke1 commited on
Commit
1269fa4
·
1 Parent(s): 8533981

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -0
app.py CHANGED
@@ -1,6 +1,7 @@
1
  import streamlit as st
2
  from fhirclient import client
3
  from fhirclient.models import *
 
4
 
5
  # Define the FHIR client
6
  settings = {
@@ -9,6 +10,9 @@ settings = {
9
  }
10
  smart = client.FHIRClient(settings=settings)
11
 
 
 
 
12
  # Define the Streamlit app
13
  def app():
14
  # Create a text area for the HL7 message input
@@ -33,6 +37,13 @@ def app():
33
  # Display the response
34
  st.write(response)
35
 
 
 
 
 
 
 
 
36
  # Run the Streamlit app
37
  if __name__ == '__main__':
38
  app()
 
1
  import streamlit as st
2
  from fhirclient import client
3
  from fhirclient.models import *
4
+ from fhiry.fhirsearch import Fhirsearch
5
 
6
  # Define the FHIR client
7
  settings = {
 
10
  }
11
  smart = client.FHIRClient(settings=settings)
12
 
13
+ # Define the FHIR search
14
+ fs = Fhirsearch(fhir_base_url='http://hapi.fhir.org/baseR4')
15
+
16
  # Define the Streamlit app
17
  def app():
18
  # Create a text area for the HL7 message input
 
37
  # Display the response
38
  st.write(response)
39
 
40
+ # Search for a FHIR resource
41
+ my_fhir_search_parameters = {
42
+ "code": "http://snomed.info/sct|39065001",
43
+ }
44
+ df = fs.search(resource_type="Condition", search_parameters=my_fhir_search_parameters)
45
+ st.write(df)
46
+
47
  # Run the Streamlit app
48
  if __name__ == '__main__':
49
  app()