{"columns":[{"name":"workflow_name","type":"string"},{"name":"count","type":"int64"},{"name":"email","type":"string"},{"name":"worklist_query","type":"string"},{"name":"workflow_table","type":"string"}],"n_rows":1,"rows_kept":1,"cut":false,"text_format":"parquet-jsonl-2026-10-02","bounds":{"document_bytes":16777216,"package_text_limit_bytes":33554432,"package_text_slack_bytes":1024,"rows_first":2000,"rows_last":500,"rows_between":2000,"halvings":0,"cell_chars":16384,"cell_head_chars":4096,"vector_min":64,"vector_head_fixed":16,"vector_head_variable":64,"kv_value_chars":1048576,"nesting_max":64,"binary_text":true},"cells_cut":0,"cells_bad_utf8":0,"cells_raw":0,"cells_binary":0,"cells_binary_text":0,"cells_vector":0,"n_row_groups":1,"reader":"pyarrow 23.0.1, python 3.13","created_by":"parquet-mr-trino version 430 (build n/a)","schema":{"fields":[{"name":"workflow_name","type":"string","nullable":true,"metadata":[["PARQUET:field_id","1"]],"children":null},{"name":"count","type":"int64","nullable":true,"metadata":[["PARQUET:field_id","2"]],"children":null},{"name":"email","type":"string","nullable":true,"metadata":[["PARQUET:field_id","3"]],"children":null},{"name":"worklist_query","type":"string","nullable":true,"metadata":[["PARQUET:field_id","4"]],"children":null},{"name":"workflow_table","type":"string","nullable":true,"metadata":[["PARQUET:field_id","5"]],"children":null}],"parquet":"required group field_id=-1 table {\n  optional binary field_id=1 workflow_name (String);\n  optional int64 field_id=2 count;\n  optional binary field_id=3 email (String);\n  optional binary field_id=4 worklist_query (String);\n  optional binary field_id=5 workflow_table (String);\n}\n"},"kv_metadata":[]}
["Encounter Errors",100,"marty.schoenthaler@desisiv.io","with worklist_base as (\n    select\n        case\n            when category_override IS NOT NULL THEN category_override\n            else category\n        end as category,\n        id,\n        interface_charge_id,\n        email,\n        notes,\n        patient_name,\n        mrn,\n        svcname,\n        servicedate,\n        qty,\n        rxqty,\n        rawqty,\n        enctype,\n        regdate,\n        encloc\n    from\n        analytics.datalake.encounter_errors\n    where\n        email = 'marty.schoenthaler@desisiv.io'\n    order by id\n),\nworklist_automation as (\n    select\n        wb.interface_charge_id,\n        (select listagg(concat(ti.task_description, '(', ti.status, ')',chr(13),chr(10)), '') within group (order by ti.extern_identifier)\n        from admin.public.task_item ti where ti.extern_id_type = 'INTERFACE_CHARGE_ID' and ti.extern_identifier = cast(wb.interface_charge_id as varchar)\n        group by ti.extern_identifier\n        order by ti.extern_identifier) as automation\n    from worklist_base wb\n),\nfinal as (\n    select\n        wb.*,\n        case when wa.automation is null then '' when wa.automation = '' then '' else wa.automation end as automation\n    from worklist_base wb\n    left join worklist_automation wa on wa.interface_charge_id = wb.interface_charge_id\n)\nselect * from final\n order by id","encounter_errors"]