Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
import streamlit as st
|
2 |
-
from fhir.resources.observation import Observation
|
3 |
from datetime import datetime
|
4 |
import requests
|
5 |
import json
|
@@ -33,11 +33,11 @@ def create_observation_resource(activity, category, calories, duration, distance
|
|
33 |
# Function to create an Observation resource on the FHIR server
|
34 |
def create_observation(observation):
|
35 |
headers = {"Content-Type": "application/fhir+json"}
|
36 |
-
response = requests.post(base_url + "Observation", data=json.dumps(observation.as_json()), headers=headers)
|
37 |
-
if response.status_code == 201:
|
38 |
-
st.success("Observation created successfully!")
|
39 |
-
else:
|
40 |
-
st.error("Error creating Observation.")
|
41 |
|
42 |
# Streamlit user interface
|
43 |
def app():
|
|
|
1 |
import streamlit as st
|
2 |
+
#from fhir.resources.observation import Observation
|
3 |
from datetime import datetime
|
4 |
import requests
|
5 |
import json
|
|
|
33 |
# Function to create an Observation resource on the FHIR server
|
34 |
def create_observation(observation):
|
35 |
headers = {"Content-Type": "application/fhir+json"}
|
36 |
+
# response = requests.post(base_url + "Observation", data=json.dumps(observation.as_json()), headers=headers)
|
37 |
+
# if response.status_code == 201:
|
38 |
+
# st.success("Observation created successfully!")
|
39 |
+
# else:
|
40 |
+
# st.error("Error creating Observation.")
|
41 |
|
42 |
# Streamlit user interface
|
43 |
def app():
|