{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://puranwater.com/schemas/postgres/compliance_mcp/observation.schema.json","title":"observation","type":"object","properties":{"result_id":{"type":"string","format":"uuid","x-pg-type":"uuid"},"sample_event_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"x-pg-type":"uuid"},"parameter_code":{"type":"string","x-pg-type":"text"},"measured_value":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"units":{"type":"string","x-pg-type":"text"},"detection_limit":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"below_detection":{"anyOf":[{"type":"boolean"},{"type":"null"}],"x-pg-type":"bool"},"lab_qualifier":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"analytical_method":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"analyzed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"x-pg-type":"timestamptz"},"reported_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"x-pg-type":"timestamptz"},"analyst":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"source_system":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"created_at":{"type":"string","format":"date-time","x-pg-type":"timestamptz"}},"x-table-schema":"public","required":["parameter_code","units"],"x-primary-key":["result_id"],"x-foreign-keys":[{"column":"parameter_code","references_table":"parameter_registry","references_column":"parameter_code","constraint":"observation_parameter_code_fkey"},{"column":"sample_event_id","references_table":"sample_event","references_column":"sample_id","constraint":"observation_sample_event_id_fkey"}]}