Skip to content

clinical_outputs

Classes:

LLMDiagnosis

Bases: BaseModel

Methods:

from_llm classmethod

from_llm(text: str) -> 'LLMDiagnosis'
Source code in src/hiperhealth/schema/clinical_outputs.py
@classmethod
def from_llm(cls, text: str) -> 'LLMDiagnosis':
    """
    title: Parse a JSON string generated by our medical LLM.
    parameters:
      text:
        type: str
        description: Value for text.
    returns:
      type: LLMDiagnosis
      description: Return value.
    """
    return cls.model_validate_json(_clean_json_text(text))

LLMInquiryItem

Bases: BaseModel

Does not include skill_name or stage — those are added by the calling skill after filtering. attributes: field: type: str description: Machine-readable key, e.g. "smoking_history". label: type: str description: Human-readable label, e.g. "Smoking History". description: type: str description: Why this information is needed. priority: type: Literal[required, supplementary, deferred] input_type: type: str description: Expected input widget (text, select, number, boolean). choices: type: list[str] | None description: Valid options when input_type is "select".

LLMInquiryList

Bases: BaseModel