File size: 1,208 Bytes
4105249
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.

"""Data models for the Blood Pathology Environment."""

from typing import Dict, Any
from openenv.core.env_server.types import Action, Observation
from pydantic import Field

class PathologyAction(Action):
    """Action for the Pathology environment - executing a simulated LIMS tool."""

    command: str = Field(
        ..., 
        description=(
            "Tool name. Valid: 'list_pending_cases', 'get_patient_demographics', "
            "'get_medications', 'get_lab_orders', 'get_lab_results', "
            "'get_previous_results', 'query_reference_ranges', "
            "'flag_critical_value', 'submit_diagnostic_report'"
        )
    )
    arguments: Dict[str, Any] = Field(
        default_factory=dict, 
        description="Arguments dict. E.g. {'patient_id': 1001} or {'order_id': 'ORD-E001'}"
    )

class PathologyObservation(Observation):
    """Observation from the Pathology environment - LIMS API output."""

    output: str = Field(default="", description="Structured JSON or text response from the LIMS.")
    error: str = Field(default="", description="Error message if the command failed, else empty.")