ui_utilities

source

display_concept_info

def display_concept_info(
	concept: dict
)

Display the concept information. An OMOP concept is formatted as HTML to be streamed to the user.

Parameters

concept: dict The concept information

stream_message

def stream_message(
	message: str
)

Stream a message to the user, rendering HTML with a typewriter effect

The message is displayed character by character. Streamlit’s markdown functionality renders the message, allowing HTML formatting.

Parameters

message: str The message to stream

capitalize_words

def capitalize_words(
	s: str
)

Capitalize each word in a string

Parameters

s: str The string to capitalize

Returns

str The capitalized string

make_api_call

def make_api_call(
	names: str[list]
	skip_llm: bool
	vocab_id: 
)

Make a call to the Lettuce API to retrieve OMOP concepts.

Parameters

names: list[str] The informal names to send to the API

Returns

sseclient.SSEClient The stream of events from the API